@kong-ui-public/entities-consumer-groups 1.3.5-pr.913.73e7dbec.0 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ae, ref as O, computed as M, watch as Se, renderSlot as Y, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as g, createBlock as V, createSlots as Te, withCtx as h, createElementVNode as R, createTextVNode as Z, toDisplayString as K, createVNode as F, createElementBlock as j, renderList as ye, Fragment as ve, normalizeClass as Fe, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as ur, resolveDynamicComponent as He, normalizeProps as cr, guardReactiveProps as dr, mergeProps as ht, onMounted as pr, onUnmounted as fr, normalizeStyle as mr, inject as gr, pushScopeId as yr, popScopeId as hr, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
|
-
import { createI18n as It, i18nTComponent as
|
|
4
|
-
import
|
|
5
|
-
import { MethodsArray as
|
|
6
|
-
const
|
|
3
|
+
import { createI18n as It, i18nTComponent as cn } from "@kong-ui-public/i18n";
|
|
4
|
+
import vr from "axios";
|
|
5
|
+
import { ToastManager as br, MethodsArray as kr } from "@kong/kongponents";
|
|
6
|
+
const Cr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -95,20 +95,20 @@ const Ir = {
|
|
|
95
95
|
name: "The name can be any string containing letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
consumer_groups:
|
|
98
|
+
}, _r = {
|
|
99
|
+
consumer_groups: Cr
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
const e = It("en-us",
|
|
101
|
+
function wr() {
|
|
102
|
+
const e = It("en-us", _r);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
|
-
i18nT:
|
|
105
|
+
i18nT: cn(e)
|
|
106
106
|
// Translation component <i18n-t>
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
|
-
useI18n:
|
|
111
|
-
}, Ie = "/api/runtime_groups/{controlPlaneId}",
|
|
110
|
+
useI18n: wr
|
|
111
|
+
}, Ie = "/api/runtime_groups/{controlPlaneId}", xe = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
114
|
all: `${Ie}/consumer_groups`,
|
|
@@ -116,9 +116,9 @@ const ct = {
|
|
|
116
116
|
oneForConsumer: `${Ie}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
117
|
},
|
|
118
118
|
kongManager: {
|
|
119
|
-
all: `${
|
|
120
|
-
forConsumer: `${
|
|
121
|
-
oneForConsumer: `${
|
|
119
|
+
all: `${xe}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
@@ -131,26 +131,26 @@ const ct = {
|
|
|
131
131
|
getConsumers: `${Ie}/consumer_groups/{id}/consumers`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
|
-
consumersList: `${
|
|
135
|
-
create: `${
|
|
136
|
-
edit: `${
|
|
137
|
-
addConsumer: `${
|
|
138
|
-
removeConsumer: `${
|
|
139
|
-
getConsumers: `${
|
|
134
|
+
consumersList: `${xe}/consumers`,
|
|
135
|
+
create: `${xe}/consumer_groups`,
|
|
136
|
+
edit: `${xe}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var
|
|
144
|
-
function
|
|
143
|
+
var dn = /* @__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))(dn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), te = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(te || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
144
|
+
function xt(e = {}) {
|
|
145
145
|
return {
|
|
146
|
-
axiosInstance:
|
|
146
|
+
axiosInstance: vr.create({
|
|
147
147
|
withCredentials: !0,
|
|
148
148
|
timeout: 3e4,
|
|
149
149
|
...e
|
|
150
150
|
})
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ir() {
|
|
154
154
|
return {
|
|
155
155
|
debounce: (e, n) => {
|
|
156
156
|
let t;
|
|
@@ -162,12 +162,12 @@ function xr() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const ft = "khcp-user-table-preferences",
|
|
165
|
+
const ft = "khcp-user-table-preferences", xr = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Ar() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,17 +191,24 @@ function $r() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || xr;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(ft);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Sr = {
|
|
202
|
+
actions: {
|
|
203
|
+
copyId: "Copy ID",
|
|
204
|
+
copied_id: 'Copied "{id}" to the clipboard',
|
|
205
|
+
copyToClipboard: "Copied successfully!",
|
|
206
|
+
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
207
|
+
}
|
|
208
|
+
}, Tr = {
|
|
202
209
|
message: "Are you sure you want to delete this {entityType}?",
|
|
203
210
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
204
|
-
},
|
|
211
|
+
}, $r = {
|
|
205
212
|
actions: {
|
|
206
213
|
save: "Save",
|
|
207
214
|
cancel: "Cancel",
|
|
@@ -210,13 +217,13 @@ const Mr = {
|
|
|
210
217
|
errors: {
|
|
211
218
|
edit: "The entity could not be edited at this time."
|
|
212
219
|
}
|
|
213
|
-
},
|
|
220
|
+
}, Mr = {
|
|
214
221
|
emptyState: {
|
|
215
222
|
noSearchResultsTitle: "No results found",
|
|
216
223
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
217
224
|
noSearchResultsCtaText: "Clear"
|
|
218
225
|
}
|
|
219
|
-
},
|
|
226
|
+
}, jr = {
|
|
220
227
|
title: "Configuration",
|
|
221
228
|
actions: {
|
|
222
229
|
copy: "Copy JSON"
|
|
@@ -251,7 +258,7 @@ const Mr = {
|
|
|
251
258
|
entryTitle: "Entry {index}",
|
|
252
259
|
structuredFormat: "Structured"
|
|
253
260
|
}
|
|
254
|
-
},
|
|
261
|
+
}, Er = {
|
|
255
262
|
filterButtonText: "Filter",
|
|
256
263
|
fieldLabel: "Filter by:",
|
|
257
264
|
inputPlaceholder: "Enter a value",
|
|
@@ -259,15 +266,15 @@ const Mr = {
|
|
|
259
266
|
applyButtonText: "Apply",
|
|
260
267
|
clearButtonText: "Clear",
|
|
261
268
|
clearAllButtonText: "Clear all filters"
|
|
262
|
-
},
|
|
269
|
+
}, Or = {
|
|
263
270
|
errors: {
|
|
264
271
|
fetch: "Could not fetch available items",
|
|
265
272
|
invalid: "Please select a valid value"
|
|
266
273
|
}
|
|
267
|
-
},
|
|
274
|
+
}, Kr = {
|
|
268
275
|
unexpected: "An unexpected error has occurred",
|
|
269
276
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
270
|
-
},
|
|
277
|
+
}, Fr = {
|
|
271
278
|
enable: {
|
|
272
279
|
title: "Enable {entityType}",
|
|
273
280
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -278,25 +285,26 @@ const Mr = {
|
|
|
278
285
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
279
286
|
confirmText: "Yes, disable"
|
|
280
287
|
}
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
}, Nr = {
|
|
289
|
+
global: Sr,
|
|
290
|
+
deleteModal: Tr,
|
|
291
|
+
baseForm: $r,
|
|
292
|
+
baseTable: Mr,
|
|
293
|
+
baseConfigCard: jr,
|
|
294
|
+
filter: Er,
|
|
295
|
+
debouncedFilter: Or,
|
|
296
|
+
errors: Kr,
|
|
297
|
+
toggleModal: Fr
|
|
290
298
|
};
|
|
291
|
-
function
|
|
292
|
-
const e = It("en-us",
|
|
299
|
+
function At() {
|
|
300
|
+
const e = It("en-us", Nr);
|
|
293
301
|
return {
|
|
294
302
|
i18n: e,
|
|
295
|
-
i18nT:
|
|
303
|
+
i18nT: cn(e)
|
|
296
304
|
// Translation component <i18n-t>
|
|
297
305
|
};
|
|
298
306
|
}
|
|
299
|
-
function
|
|
307
|
+
function pn() {
|
|
300
308
|
return {
|
|
301
309
|
getPropValue: (e, n) => (n == null ? void 0 : n[e]) ?? void 0,
|
|
302
310
|
objectsAreEqual: (e, n) => {
|
|
@@ -313,72 +321,72 @@ function gn() {
|
|
|
313
321
|
isValidUuid: (e) => e ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(e) : !1
|
|
314
322
|
};
|
|
315
323
|
}
|
|
316
|
-
function
|
|
324
|
+
function Br(e, n, t, r = {
|
|
317
325
|
fetchedItemsKey: "data",
|
|
318
326
|
searchKeys: ["id"]
|
|
319
327
|
}) {
|
|
320
328
|
t || (t = "100");
|
|
321
|
-
const { axiosInstance: o } =
|
|
329
|
+
const { axiosInstance: o } = xt({
|
|
322
330
|
headers: e.requestHeaders
|
|
323
|
-
}), { i18n: { t: a } } =
|
|
324
|
-
await
|
|
325
|
-
}, 200), l =
|
|
331
|
+
}), { i18n: { t: a } } = At(), { debounce: i } = Ir(), s = i(async (x) => {
|
|
332
|
+
await k(x);
|
|
333
|
+
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), m = O([]), f = O(void 0), I = y(n);
|
|
326
334
|
let v = `${e.apiBaseUrl}${I}`;
|
|
327
335
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
328
|
-
const { isValidUuid: p } =
|
|
336
|
+
const { isValidUuid: p } = pn(), A = async () => {
|
|
329
337
|
try {
|
|
330
338
|
l.value = !0;
|
|
331
|
-
const { data:
|
|
332
|
-
|
|
339
|
+
const { data: x } = await o.get(`${v}?size=${t}`);
|
|
340
|
+
x != null && x.next || (f.value = r.fetchedItemsKey in x ? x[r.fetchedItemsKey] : []), m.value = r.fetchedItemsKey in x ? x[r.fetchedItemsKey] : [], u.value = m.value;
|
|
333
341
|
} catch {
|
|
334
342
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
335
343
|
} finally {
|
|
336
344
|
l.value = !1;
|
|
337
345
|
}
|
|
338
|
-
}, b =
|
|
346
|
+
}, b = O(""), k = async (x) => {
|
|
339
347
|
var ne, pe, z;
|
|
340
|
-
if (b.value !==
|
|
341
|
-
if (b.value =
|
|
348
|
+
if (b.value !== x)
|
|
349
|
+
if (b.value = x || "", f.value === void 0)
|
|
342
350
|
try {
|
|
343
351
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
344
352
|
let w = v + "";
|
|
345
|
-
|
|
346
|
-
const { data:
|
|
347
|
-
r.fetchedItemsKey in
|
|
348
|
-
} else if (
|
|
353
|
+
x && (w += `/${x}`);
|
|
354
|
+
const { data: N } = await o.get(`${w}?size=${t}`);
|
|
355
|
+
r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
|
|
356
|
+
} else if (x) {
|
|
349
357
|
const w = [];
|
|
350
|
-
p(
|
|
351
|
-
const { data:
|
|
352
|
-
return [
|
|
358
|
+
p(x) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
359
|
+
const { data: C } = await o.get(`${v}/${x}`);
|
|
360
|
+
return [C[r.fetchedItemsKey] ?? C];
|
|
353
361
|
})()) : w.push(
|
|
354
|
-
...r.searchKeys.filter((
|
|
355
|
-
const { data:
|
|
356
|
-
return
|
|
362
|
+
...r.searchKeys.filter((C) => C !== "id").map(async (C) => {
|
|
363
|
+
const { data: S } = await o.get(`${v}?${C}=${x}`);
|
|
364
|
+
return S[r.fetchedItemsKey];
|
|
357
365
|
})
|
|
358
366
|
);
|
|
359
|
-
const
|
|
360
|
-
u.value = [], (ne =
|
|
361
|
-
var
|
|
362
|
-
(
|
|
363
|
-
|
|
367
|
+
const N = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
368
|
+
u.value = [], (ne = N == null ? void 0 : N.forEach) == null || ne.call(N, (C) => {
|
|
369
|
+
var S;
|
|
370
|
+
(S = C == null ? void 0 : C.forEach) == null || S.call(C, (T) => {
|
|
371
|
+
B.has(T.id) || (B.add(T.id), u.value.push(T));
|
|
364
372
|
});
|
|
365
373
|
});
|
|
366
374
|
} else
|
|
367
|
-
u.value =
|
|
375
|
+
u.value = m.value;
|
|
368
376
|
} catch (w) {
|
|
369
377
|
((pe = w == null ? void 0 : w.response) == null ? void 0 : pe.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
370
378
|
} finally {
|
|
371
379
|
l.value = !1;
|
|
372
380
|
}
|
|
373
381
|
else
|
|
374
|
-
l.value = !0, d.value = "",
|
|
375
|
-
var
|
|
376
|
-
let
|
|
377
|
-
for (const
|
|
378
|
-
const
|
|
379
|
-
|
|
382
|
+
l.value = !0, d.value = "", x ? (u.value = (z = f.value) == null ? void 0 : z.filter((w) => {
|
|
383
|
+
var N;
|
|
384
|
+
let B = !1;
|
|
385
|
+
for (const C of r.searchKeys) {
|
|
386
|
+
const S = typeof w[C] == "string" ? (N = w[C]) == null ? void 0 : N.toLowerCase() : w[C];
|
|
387
|
+
S != null && S.includes(x.toLowerCase()) && (B = !0);
|
|
380
388
|
}
|
|
381
|
-
return
|
|
389
|
+
return B;
|
|
382
390
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
383
391
|
};
|
|
384
392
|
return {
|
|
@@ -387,18 +395,18 @@ function Lr(e, n, t, r = {
|
|
|
387
395
|
validationError: d,
|
|
388
396
|
results: u,
|
|
389
397
|
allRecords: f,
|
|
390
|
-
loadItems:
|
|
398
|
+
loadItems: A,
|
|
391
399
|
debouncedQueryChange: s
|
|
392
400
|
};
|
|
393
401
|
}
|
|
394
|
-
function
|
|
395
|
-
const t = y(n), r =
|
|
402
|
+
function Pr(e, n) {
|
|
403
|
+
const t = y(n), r = M(
|
|
396
404
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
397
405
|
);
|
|
398
406
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
399
407
|
}
|
|
400
|
-
function
|
|
401
|
-
const { i18n: { t: e } } =
|
|
408
|
+
function Lr() {
|
|
409
|
+
const { i18n: { t: e } } = At();
|
|
402
410
|
return {
|
|
403
411
|
getMessageFromError: (n) => {
|
|
404
412
|
var t, r, o;
|
|
@@ -425,17 +433,28 @@ function qr() {
|
|
|
425
433
|
}
|
|
426
434
|
};
|
|
427
435
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
436
|
+
function qr(e) {
|
|
437
|
+
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
438
|
+
try {
|
|
439
|
+
const r = e.join("/"), o = `${t}${r}`, a = e.some((i) => i.trim() === "");
|
|
440
|
+
if (!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(o) && !a && new URL(o))
|
|
441
|
+
return `${t}${r}`;
|
|
442
|
+
throw new Error("Invalid url");
|
|
443
|
+
} catch (r) {
|
|
444
|
+
return console.warn("Failed to build valid URL:", r), "";
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function fn(e, n) {
|
|
448
|
+
const t = O(y(e)), r = O(y(n)), o = M(
|
|
430
449
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
431
|
-
), a =
|
|
450
|
+
), a = M(
|
|
432
451
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
433
452
|
);
|
|
434
453
|
return (i) => {
|
|
435
|
-
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query:
|
|
454
|
+
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: m } = i;
|
|
436
455
|
try {
|
|
437
456
|
let f = new URL(a.value.href);
|
|
438
|
-
return o.value &&
|
|
457
|
+
return o.value && m ? (f.search = "", f = new URL(`${f.href}/${m}/`)) : (o.value || new URLSearchParams(m).forEach((I, v) => {
|
|
439
458
|
f.searchParams.append(v, I);
|
|
440
459
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), c && s !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
441
460
|
} catch (f) {
|
|
@@ -443,10 +462,10 @@ function yn(e, n) {
|
|
|
443
462
|
}
|
|
444
463
|
};
|
|
445
464
|
}
|
|
446
|
-
function
|
|
447
|
-
const r = y(n), { axiosInstance: o } =
|
|
465
|
+
function Ur(e, n, t = "data") {
|
|
466
|
+
const r = y(n), { axiosInstance: o } = xt({
|
|
448
467
|
headers: e.requestHeaders
|
|
449
|
-
}), a =
|
|
468
|
+
}), a = fn(e, r), i = O({
|
|
450
469
|
status: Oe.Idle
|
|
451
470
|
});
|
|
452
471
|
return { fetcher: async (s) => {
|
|
@@ -455,7 +474,7 @@ function Rr(e, n, t = "data") {
|
|
|
455
474
|
const l = a(s), { data: c } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
456
475
|
let u;
|
|
457
476
|
c[d] && Array.isArray(c[d]) ? u = c[d] : u = Object.keys(c).length ? [c] : [];
|
|
458
|
-
const
|
|
477
|
+
const m = {
|
|
459
478
|
data: u,
|
|
460
479
|
total: u.length,
|
|
461
480
|
...c.offset ? {
|
|
@@ -466,8 +485,8 @@ function Rr(e, n, t = "data") {
|
|
|
466
485
|
};
|
|
467
486
|
return i.value = {
|
|
468
487
|
status: Oe.Idle,
|
|
469
|
-
response:
|
|
470
|
-
},
|
|
488
|
+
response: m
|
|
489
|
+
}, m;
|
|
471
490
|
} catch (l) {
|
|
472
491
|
const c = {
|
|
473
492
|
data: [],
|
|
@@ -485,96 +504,114 @@ function Rr(e, n, t = "data") {
|
|
|
485
504
|
}
|
|
486
505
|
}, fetcherState: i };
|
|
487
506
|
}
|
|
488
|
-
function
|
|
507
|
+
function Rr() {
|
|
489
508
|
return {
|
|
490
509
|
convertKeyToTitle: (e, n = "_") => e ? e.split(n).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
491
510
|
};
|
|
492
511
|
}
|
|
493
|
-
const
|
|
512
|
+
const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Lt = (e) => {
|
|
494
513
|
if (typeof e != "string")
|
|
495
514
|
throw new TypeError("Invalid argument expected string");
|
|
496
|
-
const n = e.match(
|
|
515
|
+
const n = e.match(mn);
|
|
497
516
|
if (!n)
|
|
498
517
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
499
518
|
return n.shift(), n;
|
|
500
|
-
},
|
|
519
|
+
}, qt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
501
520
|
const n = parseInt(e, 10);
|
|
502
521
|
return isNaN(n) ? e : n;
|
|
503
|
-
},
|
|
504
|
-
if (
|
|
522
|
+
}, Vr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Dr = (e, n) => {
|
|
523
|
+
if (qt(e) || qt(n))
|
|
505
524
|
return 0;
|
|
506
|
-
const [t, r] =
|
|
525
|
+
const [t, r] = Vr(Ut(e), Ut(n));
|
|
507
526
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
508
|
-
},
|
|
527
|
+
}, Rt = (e, n) => {
|
|
509
528
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
510
|
-
const r =
|
|
529
|
+
const r = Dr(e[t] || "0", n[t] || "0");
|
|
511
530
|
if (r !== 0)
|
|
512
531
|
return r;
|
|
513
532
|
}
|
|
514
533
|
return 0;
|
|
515
|
-
},
|
|
516
|
-
const t =
|
|
517
|
-
return i !== 0 ? i : o && a ?
|
|
518
|
-
},
|
|
534
|
+
}, Gr = (e, n) => {
|
|
535
|
+
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Rt(t, r);
|
|
536
|
+
return i !== 0 ? i : o && a ? Rt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
537
|
+
}, Vt = (e, n, t) => {
|
|
519
538
|
zr(t);
|
|
520
|
-
const r =
|
|
521
|
-
return
|
|
522
|
-
},
|
|
539
|
+
const r = Gr(e, n);
|
|
540
|
+
return gn[t].includes(r);
|
|
541
|
+
}, gn = {
|
|
523
542
|
">": [1],
|
|
524
543
|
">=": [0, 1],
|
|
525
544
|
"=": [0],
|
|
526
545
|
"<=": [-1, 0],
|
|
527
546
|
"<": [-1],
|
|
528
547
|
"!=": [-1, 1]
|
|
529
|
-
},
|
|
548
|
+
}, Dt = Object.keys(gn), zr = (e) => {
|
|
530
549
|
if (typeof e != "string")
|
|
531
550
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
532
|
-
if (
|
|
533
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
534
|
-
},
|
|
535
|
-
function
|
|
551
|
+
if (Dt.indexOf(e) === -1)
|
|
552
|
+
throw new Error(`Invalid operator, expected one of ${Dt.join("|")}`);
|
|
553
|
+
}, Hr = (e) => typeof e == "string" && /^[v\d]/.test(e) && mn.test(e);
|
|
554
|
+
function Jr(e) {
|
|
536
555
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
537
556
|
if (!n)
|
|
538
557
|
return !0;
|
|
539
558
|
const { edition: r, version: o } = n;
|
|
540
|
-
if (!
|
|
559
|
+
if (!Hr(o))
|
|
541
560
|
return console.error("Invalid version"), !1;
|
|
542
561
|
const a = t[r];
|
|
543
562
|
if (!a)
|
|
544
563
|
return !1;
|
|
545
564
|
const [i, s] = a;
|
|
546
|
-
return !(i &&
|
|
565
|
+
return !(i && Vt(o, i, "<") || s && Vt(o, s, ">"));
|
|
547
566
|
}
|
|
548
|
-
function
|
|
549
|
-
const n =
|
|
550
|
-
return
|
|
567
|
+
function Wr(e) {
|
|
568
|
+
const n = O(0), t = O(0), r = O(!1);
|
|
569
|
+
return Se(e, (o) => {
|
|
551
570
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
552
571
|
}), {
|
|
553
|
-
isTruncated:
|
|
572
|
+
isTruncated: M(() => n.value < t.value)
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
const Yr = new br();
|
|
576
|
+
function Zr() {
|
|
577
|
+
return {
|
|
578
|
+
notify: async (e) => {
|
|
579
|
+
const n = {
|
|
580
|
+
appearance: "success",
|
|
581
|
+
message: "Success",
|
|
582
|
+
timeoutMilliseconds: 3e3
|
|
583
|
+
};
|
|
584
|
+
Yr.open({
|
|
585
|
+
...n,
|
|
586
|
+
...e
|
|
587
|
+
});
|
|
588
|
+
}
|
|
554
589
|
};
|
|
555
590
|
}
|
|
556
591
|
const ue = {
|
|
557
|
-
useAxios:
|
|
558
|
-
useDebouncedFilter:
|
|
559
|
-
useDeleteUrlBuilder:
|
|
560
|
-
useErrors:
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
592
|
+
useAxios: xt,
|
|
593
|
+
useDebouncedFilter: Br,
|
|
594
|
+
useDeleteUrlBuilder: Pr,
|
|
595
|
+
useErrors: Lr,
|
|
596
|
+
useExternalLinkCreator: qr,
|
|
597
|
+
useFetcher: Ur,
|
|
598
|
+
useFetchUrlBuilder: fn,
|
|
599
|
+
useHelpers: pn,
|
|
600
|
+
useStringHelpers: Rr,
|
|
601
|
+
useI18n: At,
|
|
602
|
+
useGatewayFeatureSupported: Jr,
|
|
603
|
+
useTruncationDetector: Wr,
|
|
604
|
+
useToaster: Zr
|
|
605
|
+
}, Qr = {
|
|
569
606
|
fail: "Failed to copy id to clipboard",
|
|
570
607
|
success: {
|
|
571
608
|
prefix: "Successfully",
|
|
572
609
|
content: " copied to clipboard"
|
|
573
610
|
}
|
|
574
|
-
},
|
|
575
|
-
message:
|
|
576
|
-
iconTitle:
|
|
577
|
-
},
|
|
611
|
+
}, Xr = "Copy to clipboard", eo = {
|
|
612
|
+
message: Qr,
|
|
613
|
+
iconTitle: Xr
|
|
614
|
+
}, to = "kong-ui-copy-uuid-notify", no = { class: "kong-ui-copy-uuid" }, ro = ["onClick"], Gt = 15, oo = /* @__PURE__ */ ae({
|
|
578
615
|
__name: "CopyUuid",
|
|
579
616
|
props: {
|
|
580
617
|
uuid: {
|
|
@@ -618,66 +655,66 @@ const ue = {
|
|
|
618
655
|
},
|
|
619
656
|
emits: ["success", "error"],
|
|
620
657
|
setup(e, { emit: n }) {
|
|
621
|
-
const t = e, { t: r } = It("en-us",
|
|
622
|
-
}), a =
|
|
658
|
+
const t = e, { t: r } = It("en-us", eo), o = t.notify || gr(to, () => {
|
|
659
|
+
}), a = M(() => t.idTooltip ? {
|
|
623
660
|
label: t.idTooltip,
|
|
624
661
|
positionFixed: !0,
|
|
625
662
|
placement: "bottomStart"
|
|
626
663
|
} : {
|
|
627
664
|
title: t.uuid
|
|
628
|
-
}), i =
|
|
665
|
+
}), i = M(() => !!(t.tooltip && t.successTooltip)), s = O(t.tooltip), l = M(() => t.tooltip ? {
|
|
629
666
|
label: s.value,
|
|
630
667
|
positionFixed: !0,
|
|
631
668
|
maxWidth: "500px",
|
|
632
669
|
placement: "bottomStart"
|
|
633
|
-
} : {}), c =
|
|
634
|
-
var
|
|
635
|
-
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(
|
|
636
|
-
}), d = (
|
|
637
|
-
s.value =
|
|
670
|
+
} : {}), c = M(() => {
|
|
671
|
+
var m;
|
|
672
|
+
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(m = t.uuid) == null ? void 0 : m.substring(0, 5)}` : t.uuid;
|
|
673
|
+
}), d = (m) => {
|
|
674
|
+
s.value = m, setTimeout(() => {
|
|
638
675
|
s.value = t.tooltip;
|
|
639
676
|
}, 1800);
|
|
640
|
-
}, u = (
|
|
677
|
+
}, u = (m) => {
|
|
641
678
|
var f, I;
|
|
642
|
-
if (!
|
|
679
|
+
if (!m(t.uuid)) {
|
|
643
680
|
typeof o == "function" && o({
|
|
644
681
|
type: "error",
|
|
645
682
|
message: r("message.fail")
|
|
646
683
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
647
684
|
return;
|
|
648
685
|
}
|
|
649
|
-
const v = ((f = t.uuid) == null ? void 0 : f.length) >
|
|
686
|
+
const v = ((f = t.uuid) == null ? void 0 : f.length) > Gt, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, Gt)) + (v ? "..." : "")}"`;
|
|
650
687
|
typeof o == "function" && o({
|
|
651
688
|
type: "success",
|
|
652
689
|
message: `${p}${r("message.success.content")}`
|
|
653
690
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
654
691
|
};
|
|
655
|
-
return (
|
|
656
|
-
const I =
|
|
657
|
-
return
|
|
658
|
-
e.format !== "hidden" ? (
|
|
692
|
+
return (m, f) => {
|
|
693
|
+
const I = q("KIcon"), v = q("KClipboardProvider");
|
|
694
|
+
return g(), j("div", no, [
|
|
695
|
+
e.format !== "hidden" ? (g(), V(He(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
659
696
|
default: h(() => [
|
|
660
|
-
|
|
661
|
-
class:
|
|
697
|
+
R("div", {
|
|
698
|
+
class: Fe([
|
|
662
699
|
"uuid-container",
|
|
663
700
|
e.truncated ? "truncated-uuid" : null,
|
|
664
701
|
e.useMono ? "mono" : null
|
|
665
702
|
])
|
|
666
|
-
},
|
|
703
|
+
}, K(c.value), 3)
|
|
667
704
|
]),
|
|
668
705
|
_: 1
|
|
669
|
-
}, 16)) :
|
|
670
|
-
(
|
|
706
|
+
}, 16)) : G("", !0),
|
|
707
|
+
(g(), V(He(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
671
708
|
default: h(() => [
|
|
672
|
-
|
|
709
|
+
F(v, null, {
|
|
673
710
|
default: h(({ copyToClipboard: p }) => [
|
|
674
|
-
|
|
711
|
+
R("span", {
|
|
675
712
|
"data-testid": "copy-to-clipboard",
|
|
676
713
|
role: "button",
|
|
677
714
|
tabindex: "0",
|
|
678
|
-
onClick: rt((
|
|
715
|
+
onClick: rt((A) => u(p), ["stop"])
|
|
679
716
|
}, [
|
|
680
|
-
|
|
717
|
+
F(I, {
|
|
681
718
|
class: "uuid-icon",
|
|
682
719
|
color: e.iconColor,
|
|
683
720
|
"hide-title": !!e.tooltip || void 0,
|
|
@@ -685,7 +722,7 @@ const ue = {
|
|
|
685
722
|
size: "16",
|
|
686
723
|
title: y(r)("iconTitle")
|
|
687
724
|
}, null, 8, ["color", "hide-title", "title"])
|
|
688
|
-
], 8,
|
|
725
|
+
], 8, ro)
|
|
689
726
|
]),
|
|
690
727
|
_: 1
|
|
691
728
|
})
|
|
@@ -695,15 +732,15 @@ const ue = {
|
|
|
695
732
|
]);
|
|
696
733
|
};
|
|
697
734
|
}
|
|
698
|
-
}),
|
|
735
|
+
}), ao = (e, n) => {
|
|
699
736
|
const t = e.__vccOpts || e;
|
|
700
737
|
for (const [r, o] of n)
|
|
701
738
|
t[r] = o;
|
|
702
739
|
return t;
|
|
703
|
-
},
|
|
740
|
+
}, yn = /* @__PURE__ */ ao(oo, [["__scopeId", "data-v-a2ebe0bb"]]), io = {
|
|
704
741
|
key: 0,
|
|
705
742
|
class: "config-card-fieldset-title"
|
|
706
|
-
},
|
|
743
|
+
}, so = /* @__PURE__ */ ae({
|
|
707
744
|
__name: "JsonCardItem",
|
|
708
745
|
props: {
|
|
709
746
|
item: {
|
|
@@ -720,21 +757,21 @@ const ue = {
|
|
|
720
757
|
}
|
|
721
758
|
},
|
|
722
759
|
setup(e) {
|
|
723
|
-
const n = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: r } = ue.useStringHelpers(), o =
|
|
760
|
+
const n = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: r } = ue.useStringHelpers(), o = M(() => n.item.key ?? "json-array-item"), a = M(() => n.item.value ?? n.item), i = M(() => {
|
|
724
761
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
725
762
|
return n.isArrayItem && delete l.name, l;
|
|
726
|
-
}), s =
|
|
763
|
+
}), s = M(() => {
|
|
727
764
|
var l;
|
|
728
765
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
729
766
|
});
|
|
730
|
-
return (l, c) => (
|
|
731
|
-
class:
|
|
767
|
+
return (l, c) => (g(), V(He(e.isArrayItem ? "fieldset" : "div"), {
|
|
768
|
+
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
732
769
|
}, {
|
|
733
770
|
default: h(() => [
|
|
734
|
-
e.isArrayItem ? (
|
|
735
|
-
|
|
736
|
-
])) :
|
|
737
|
-
(
|
|
771
|
+
e.isArrayItem ? (g(), j("legend", io, [
|
|
772
|
+
R("b", null, K(s.value), 1)
|
|
773
|
+
])) : G("", !0),
|
|
774
|
+
(g(!0), j(ve, null, ye(Object.keys(i.value), (d, u) => (g(), V(St, {
|
|
738
775
|
key: `${o.value}-property-${u}`,
|
|
739
776
|
item: {
|
|
740
777
|
key: d,
|
|
@@ -746,12 +783,12 @@ const ue = {
|
|
|
746
783
|
_: 1
|
|
747
784
|
}, 8, ["class"]));
|
|
748
785
|
}
|
|
749
|
-
}),
|
|
786
|
+
}), Ce = (e, n) => {
|
|
750
787
|
const t = e.__vccOpts || e;
|
|
751
788
|
for (const [r, o] of n)
|
|
752
789
|
t[r] = o;
|
|
753
790
|
return t;
|
|
754
|
-
},
|
|
791
|
+
}, hn = /* @__PURE__ */ Ce(so, [["__scopeId", "data-v-68ca83ec"]]), lo = /* @__PURE__ */ ae({
|
|
755
792
|
__name: "InternalLinkItem",
|
|
756
793
|
props: {
|
|
757
794
|
item: {
|
|
@@ -763,22 +800,22 @@ const ue = {
|
|
|
763
800
|
setup(e) {
|
|
764
801
|
const { i18n: { t: n } } = ue.useI18n();
|
|
765
802
|
return (t, r) => {
|
|
766
|
-
const o =
|
|
767
|
-
return
|
|
768
|
-
|
|
803
|
+
const o = q("KButton");
|
|
804
|
+
return g(), j("div", null, [
|
|
805
|
+
F(o, {
|
|
769
806
|
appearance: "btn-link",
|
|
770
807
|
class: "navigation-button",
|
|
771
808
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
772
809
|
}, {
|
|
773
810
|
default: h(() => [
|
|
774
|
-
Z(
|
|
811
|
+
Z(K(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
775
812
|
]),
|
|
776
813
|
_: 1
|
|
777
814
|
})
|
|
778
815
|
]);
|
|
779
816
|
};
|
|
780
817
|
}
|
|
781
|
-
}),
|
|
818
|
+
}), uo = /* @__PURE__ */ Ce(lo, [["__scopeId", "data-v-7410504d"]]), co = /* @__PURE__ */ ae({
|
|
782
819
|
__name: "StatusBadge",
|
|
783
820
|
props: {
|
|
784
821
|
status: {
|
|
@@ -789,21 +826,21 @@ const ue = {
|
|
|
789
826
|
setup(e) {
|
|
790
827
|
const { i18n: { t: n } } = ue.useI18n();
|
|
791
828
|
return (t, r) => {
|
|
792
|
-
const o =
|
|
793
|
-
return
|
|
829
|
+
const o = q("KBadge");
|
|
830
|
+
return g(), V(o, {
|
|
794
831
|
appearance: e.status ? "success" : "neutral"
|
|
795
832
|
}, {
|
|
796
833
|
default: h(() => [
|
|
797
|
-
Z(
|
|
834
|
+
Z(K(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
798
835
|
]),
|
|
799
836
|
_: 1
|
|
800
837
|
}, 8, ["appearance"]);
|
|
801
838
|
};
|
|
802
839
|
}
|
|
803
|
-
}),
|
|
840
|
+
}), po = "#0044f4", fo = "#e0e4ea", mo = "#3a3f51", go = "1px", yo = "20px", ho = { class: "config-card-details-row" }, vo = ["data-testid"], bo = ["data-testid"], ko = ["data-testid"], Co = ["data-testid"], _o = { key: 1 }, wo = ["data-testid"], Io = ["data-testid"], xo = ["data-testid"], Ao = ["data-testid"], So = {
|
|
804
841
|
name: "ConfigCardItem",
|
|
805
|
-
components: { CopyUuid:
|
|
806
|
-
},
|
|
842
|
+
components: { CopyUuid: yn, JsonCardItem: hn, StatusBadge: co, InternalLinkItem: uo }
|
|
843
|
+
}, To = /* @__PURE__ */ ae({
|
|
807
844
|
...So,
|
|
808
845
|
props: {
|
|
809
846
|
item: {
|
|
@@ -824,13 +861,13 @@ const ue = {
|
|
|
824
861
|
emits: ["navigation-click"],
|
|
825
862
|
setup(e, { emit: n }) {
|
|
826
863
|
const t = e;
|
|
827
|
-
|
|
828
|
-
"1df60db4": c.value ? "none" : `solid ${y(
|
|
864
|
+
ur((f) => ({
|
|
865
|
+
"1df60db4": c.value ? "none" : `solid ${y(go)} ${y(fo)}`,
|
|
829
866
|
"21d1d34e": l.value && i.value ? "block" : "flex",
|
|
830
867
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
831
868
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
832
869
|
}));
|
|
833
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ue.useI18n(), i =
|
|
870
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ue.useI18n(), i = M(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = M(() => !!(t.item.tooltip || r["label-tooltip"])), l = M(() => t.item.type === te.Json || t.item.type === te.JsonArray), c = M(() => t.item.type === te.JsonArray), d = M(() => {
|
|
834
871
|
switch (t.item.type) {
|
|
835
872
|
case te.ID:
|
|
836
873
|
return {
|
|
@@ -956,175 +993,175 @@ const ue = {
|
|
|
956
993
|
text: t.item.value
|
|
957
994
|
};
|
|
958
995
|
}
|
|
959
|
-
}), u =
|
|
996
|
+
}), u = O(), { isTruncated: m } = ue.useTruncationDetector(u);
|
|
960
997
|
return (f, I) => {
|
|
961
|
-
const v =
|
|
962
|
-
return
|
|
963
|
-
|
|
998
|
+
const v = q("KLabel"), p = q("KBadge"), A = q("KMethodBadge"), b = q("KTooltip");
|
|
999
|
+
return g(), j("div", ho, [
|
|
1000
|
+
R("div", {
|
|
964
1001
|
class: "config-card-details-label",
|
|
965
1002
|
"data-testid": `${e.item.key}-label`
|
|
966
1003
|
}, [
|
|
967
1004
|
Y(f.$slots, "label", { item: e.item }, () => [
|
|
968
|
-
|
|
1005
|
+
F(v, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
969
1006
|
default: h(() => [
|
|
970
|
-
Z(
|
|
1007
|
+
Z(K(e.item.label) + " ", 1)
|
|
971
1008
|
]),
|
|
972
1009
|
_: 2
|
|
973
1010
|
}, [
|
|
974
1011
|
s.value ? {
|
|
975
1012
|
name: "tooltip",
|
|
976
1013
|
fn: h(() => [
|
|
977
|
-
|
|
1014
|
+
R("div", {
|
|
978
1015
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
979
1016
|
}, [
|
|
980
1017
|
Y(f.$slots, "label-tooltip", {}, () => [
|
|
981
|
-
Z(
|
|
1018
|
+
Z(K(e.item.tooltip), 1)
|
|
982
1019
|
], !0)
|
|
983
|
-
], 8,
|
|
1020
|
+
], 8, bo)
|
|
984
1021
|
]),
|
|
985
1022
|
key: "0"
|
|
986
1023
|
} : void 0
|
|
987
1024
|
]), 1024)
|
|
988
1025
|
], !0)
|
|
989
|
-
], 8,
|
|
990
|
-
|
|
1026
|
+
], 8, vo),
|
|
1027
|
+
R("div", {
|
|
991
1028
|
class: "config-card-details-value",
|
|
992
1029
|
"data-testid": `${e.item.key}-property-value`
|
|
993
1030
|
}, [
|
|
994
1031
|
Y(f.$slots, e.item.key, {
|
|
995
1032
|
rowValue: e.item.value
|
|
996
1033
|
}, () => [
|
|
997
|
-
i.value ? (
|
|
998
|
-
(
|
|
1034
|
+
i.value ? (g(), j("div", _o, [
|
|
1035
|
+
(g(), V(He(d.value.tag), cr(dr(d.value.attrs)), {
|
|
999
1036
|
default: h(() => [
|
|
1000
|
-
d.value.additionalComponent === "KBadge" ? (
|
|
1037
|
+
d.value.additionalComponent === "KBadge" ? (g(), j("div", {
|
|
1001
1038
|
key: 0,
|
|
1002
1039
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1003
1040
|
}, [
|
|
1004
|
-
(
|
|
1005
|
-
key: `${e.item.key}-badge-tag-${
|
|
1041
|
+
(g(!0), j(ve, null, ye(e.item.value, (k, x) => (g(), V(p, {
|
|
1042
|
+
key: `${e.item.key}-badge-tag-${x}`,
|
|
1006
1043
|
class: "config-badge",
|
|
1007
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1008
|
-
"truncation-tooltip":
|
|
1044
|
+
"data-testid": `${e.item.key}-badge-tag-${x}`,
|
|
1045
|
+
"truncation-tooltip": k
|
|
1009
1046
|
}, {
|
|
1010
1047
|
default: h(() => [
|
|
1011
|
-
Z(
|
|
1048
|
+
Z(K(k), 1)
|
|
1012
1049
|
]),
|
|
1013
1050
|
_: 2
|
|
1014
1051
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1015
|
-
], 8,
|
|
1016
|
-
d.value.additionalComponent === "CopyUuid" ? (
|
|
1052
|
+
], 8, wo)) : G("", !0),
|
|
1053
|
+
d.value.additionalComponent === "CopyUuid" ? (g(), j("div", {
|
|
1017
1054
|
key: 1,
|
|
1018
1055
|
class: "copy-uuid-array",
|
|
1019
1056
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1020
1057
|
}, [
|
|
1021
|
-
(
|
|
1022
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1023
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1024
|
-
uuid:
|
|
1058
|
+
(g(!0), j(ve, null, ye(e.item.value, (k, x) => (g(), V(y(yn), ht(d.value.childAttrs, {
|
|
1059
|
+
key: `${e.item.key}-copy-uuid-${x}`,
|
|
1060
|
+
"data-testid": `${e.item.key}-copy-uuid-${x}`,
|
|
1061
|
+
uuid: k
|
|
1025
1062
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1026
|
-
], 8,
|
|
1063
|
+
], 8, Io)) : d.value.additionalComponent === "KMethodBadge" ? (g(), j("div", {
|
|
1027
1064
|
key: 2,
|
|
1028
1065
|
class: "method-badge-array",
|
|
1029
1066
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1030
1067
|
}, [
|
|
1031
|
-
(
|
|
1032
|
-
key: `${e.item.key}-badge-method-${
|
|
1068
|
+
(g(!0), j(ve, null, ye(e.item.value, (k, x) => (g(), V(A, {
|
|
1069
|
+
key: `${e.item.key}-badge-method-${x}`,
|
|
1033
1070
|
class: "config-badge",
|
|
1034
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1071
|
+
"data-testid": `${e.item.key}-badge-method-${x}`,
|
|
1035
1072
|
"is-rounded": "",
|
|
1036
|
-
label:
|
|
1037
|
-
method: y(
|
|
1073
|
+
label: k,
|
|
1074
|
+
method: y(kr).includes(k.toLowerCase()) ? k.toLowerCase() : "custom"
|
|
1038
1075
|
}, {
|
|
1039
1076
|
default: h(() => [
|
|
1040
|
-
Z(
|
|
1077
|
+
Z(K(k), 1)
|
|
1041
1078
|
]),
|
|
1042
1079
|
_: 2
|
|
1043
1080
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1044
|
-
], 8,
|
|
1045
|
-
d.value.additionalComponent === "JsonCardItem" ? (
|
|
1081
|
+
], 8, xo)) : G("", !0),
|
|
1082
|
+
d.value.additionalComponent === "JsonCardItem" ? (g(), j("div", {
|
|
1046
1083
|
key: 3,
|
|
1047
1084
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1048
1085
|
}, [
|
|
1049
|
-
(
|
|
1050
|
-
key: `json-array-item-${
|
|
1051
|
-
index:
|
|
1086
|
+
(g(!0), j(ve, null, ye(e.item.value, (k, x) => (g(), V(hn, {
|
|
1087
|
+
key: `json-array-item-${x}`,
|
|
1088
|
+
index: x,
|
|
1052
1089
|
"is-array-item": "",
|
|
1053
|
-
item:
|
|
1090
|
+
item: k
|
|
1054
1091
|
}, null, 8, ["index", "item"]))), 128))
|
|
1055
|
-
], 8, Ao)) : (
|
|
1092
|
+
], 8, Ao)) : (g(), V(b, {
|
|
1056
1093
|
key: 4,
|
|
1057
|
-
label: y(
|
|
1094
|
+
label: y(m) ? e.item.value : ""
|
|
1058
1095
|
}, {
|
|
1059
1096
|
default: h(() => [
|
|
1060
|
-
|
|
1097
|
+
R("span", {
|
|
1061
1098
|
ref_key: "textContent",
|
|
1062
1099
|
ref: u,
|
|
1063
|
-
class:
|
|
1064
|
-
},
|
|
1100
|
+
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1101
|
+
}, K(d.value.text), 3)
|
|
1065
1102
|
]),
|
|
1066
1103
|
_: 1
|
|
1067
1104
|
}, 8, ["label"]))
|
|
1068
1105
|
]),
|
|
1069
1106
|
_: 1
|
|
1070
1107
|
}, 16))
|
|
1071
|
-
])) : (
|
|
1108
|
+
])) : (g(), j("div", {
|
|
1072
1109
|
key: 0,
|
|
1073
1110
|
"data-testid": `${e.item.key}-no-value`
|
|
1074
1111
|
}, " – ", 8, Co))
|
|
1075
1112
|
], !0)
|
|
1076
|
-
], 8,
|
|
1113
|
+
], 8, ko)
|
|
1077
1114
|
]);
|
|
1078
1115
|
};
|
|
1079
1116
|
}
|
|
1080
|
-
}),
|
|
1117
|
+
}), St = /* @__PURE__ */ Ce(To, [["__scopeId", "data-v-307ab96d"]]);
|
|
1081
1118
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1082
|
-
function
|
|
1119
|
+
function vn(e) {
|
|
1083
1120
|
return typeof e > "u" || e === null;
|
|
1084
1121
|
}
|
|
1085
|
-
function
|
|
1122
|
+
function $o(e) {
|
|
1086
1123
|
return typeof e == "object" && e !== null;
|
|
1087
1124
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return Array.isArray(e) ? e :
|
|
1125
|
+
function Mo(e) {
|
|
1126
|
+
return Array.isArray(e) ? e : vn(e) ? [] : [e];
|
|
1090
1127
|
}
|
|
1091
|
-
function
|
|
1128
|
+
function jo(e, n) {
|
|
1092
1129
|
var t, r, o, a;
|
|
1093
1130
|
if (n)
|
|
1094
1131
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1095
1132
|
o = a[t], e[o] = n[o];
|
|
1096
1133
|
return e;
|
|
1097
1134
|
}
|
|
1098
|
-
function
|
|
1135
|
+
function Eo(e, n) {
|
|
1099
1136
|
var t = "", r;
|
|
1100
1137
|
for (r = 0; r < n; r += 1)
|
|
1101
1138
|
t += e;
|
|
1102
1139
|
return t;
|
|
1103
1140
|
}
|
|
1104
|
-
function
|
|
1141
|
+
function Oo(e) {
|
|
1105
1142
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1106
1143
|
}
|
|
1107
|
-
var
|
|
1108
|
-
isNothing:
|
|
1144
|
+
var Ko = vn, Fo = $o, No = Mo, Bo = Eo, Po = Oo, Lo = jo, se = {
|
|
1145
|
+
isNothing: Ko,
|
|
1109
1146
|
isObject: Fo,
|
|
1110
|
-
toArray:
|
|
1147
|
+
toArray: No,
|
|
1111
1148
|
repeat: Bo,
|
|
1112
|
-
isNegativeZero:
|
|
1113
|
-
extend:
|
|
1149
|
+
isNegativeZero: Po,
|
|
1150
|
+
extend: Lo
|
|
1114
1151
|
};
|
|
1115
|
-
function
|
|
1152
|
+
function bn(e, n) {
|
|
1116
1153
|
var t = "", r = e.reason || "(unknown reason)";
|
|
1117
1154
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
|
|
1118
1155
|
|
|
1119
1156
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1120
1157
|
}
|
|
1121
1158
|
function Je(e, n) {
|
|
1122
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1159
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = bn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1123
1160
|
}
|
|
1124
1161
|
Je.prototype = Object.create(Error.prototype);
|
|
1125
1162
|
Je.prototype.constructor = Je;
|
|
1126
1163
|
Je.prototype.toString = function(e) {
|
|
1127
|
-
return this.name + ": " +
|
|
1164
|
+
return this.name + ": " + bn(this, e);
|
|
1128
1165
|
};
|
|
1129
1166
|
var me = Je;
|
|
1130
1167
|
function mt(e, n, t, r, o) {
|
|
@@ -1136,9 +1173,9 @@ function mt(e, n, t, r, o) {
|
|
|
1136
1173
|
};
|
|
1137
1174
|
}
|
|
1138
1175
|
function gt(e, n) {
|
|
1139
|
-
return
|
|
1176
|
+
return se.repeat(" ", n - e.length) + e;
|
|
1140
1177
|
}
|
|
1141
|
-
function
|
|
1178
|
+
function qo(e, n) {
|
|
1142
1179
|
if (n = Object.create(n || null), !e.buffer)
|
|
1143
1180
|
return null;
|
|
1144
1181
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1153,10 +1190,10 @@ function Lo(e, n) {
|
|
|
1153
1190
|
o[i - l],
|
|
1154
1191
|
e.position - (r[i] - r[i - l]),
|
|
1155
1192
|
u
|
|
1156
|
-
), s =
|
|
1193
|
+
), s = se.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " + c.str + `
|
|
1157
1194
|
` + s;
|
|
1158
|
-
for (c = mt(e.buffer, r[i], o[i], e.position, u), s +=
|
|
1159
|
-
`, s +=
|
|
1195
|
+
for (c = mt(e.buffer, r[i], o[i], e.position, u), s += se.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1196
|
+
`, s += se.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1160
1197
|
`, l = 1; l <= n.linesAfter && !(i + l >= o.length); l++)
|
|
1161
1198
|
c = mt(
|
|
1162
1199
|
e.buffer,
|
|
@@ -1164,11 +1201,11 @@ function Lo(e, n) {
|
|
|
1164
1201
|
o[i + l],
|
|
1165
1202
|
e.position - (r[i] - r[i + l]),
|
|
1166
1203
|
u
|
|
1167
|
-
), s +=
|
|
1204
|
+
), s += se.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " + c.str + `
|
|
1168
1205
|
`;
|
|
1169
1206
|
return s.replace(/\n$/, "");
|
|
1170
1207
|
}
|
|
1171
|
-
var Uo =
|
|
1208
|
+
var Uo = qo, Ro = [
|
|
1172
1209
|
"kind",
|
|
1173
1210
|
"multi",
|
|
1174
1211
|
"resolve",
|
|
@@ -1179,12 +1216,12 @@ var Uo = Lo, qo = [
|
|
|
1179
1216
|
"representName",
|
|
1180
1217
|
"defaultStyle",
|
|
1181
1218
|
"styleAliases"
|
|
1182
|
-
],
|
|
1219
|
+
], Vo = [
|
|
1183
1220
|
"scalar",
|
|
1184
1221
|
"sequence",
|
|
1185
1222
|
"mapping"
|
|
1186
1223
|
];
|
|
1187
|
-
function
|
|
1224
|
+
function Do(e) {
|
|
1188
1225
|
var n = {};
|
|
1189
1226
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1190
1227
|
e[t].forEach(function(r) {
|
|
@@ -1192,19 +1229,19 @@ function Vo(e) {
|
|
|
1192
1229
|
});
|
|
1193
1230
|
}), n;
|
|
1194
1231
|
}
|
|
1195
|
-
function
|
|
1232
|
+
function Go(e, n) {
|
|
1196
1233
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1197
|
-
if (
|
|
1234
|
+
if (Ro.indexOf(t) === -1)
|
|
1198
1235
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1199
1236
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1200
1237
|
return !0;
|
|
1201
1238
|
}, this.construct = n.construct || function(t) {
|
|
1202
1239
|
return t;
|
|
1203
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1240
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Do(n.styleAliases || null), Vo.indexOf(this.kind) === -1)
|
|
1204
1241
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1205
1242
|
}
|
|
1206
|
-
var de =
|
|
1207
|
-
function
|
|
1243
|
+
var de = Go;
|
|
1244
|
+
function zt(e, n) {
|
|
1208
1245
|
var t = [];
|
|
1209
1246
|
return e[n].forEach(function(r) {
|
|
1210
1247
|
var o = t.length;
|
|
@@ -1213,7 +1250,7 @@ function Wt(e, n) {
|
|
|
1213
1250
|
}), t[o] = r;
|
|
1214
1251
|
}), t;
|
|
1215
1252
|
}
|
|
1216
|
-
function
|
|
1253
|
+
function zo() {
|
|
1217
1254
|
var e = {
|
|
1218
1255
|
scalar: {},
|
|
1219
1256
|
sequence: {},
|
|
@@ -1258,28 +1295,28 @@ vt.prototype.extend = function(e) {
|
|
|
1258
1295
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1259
1296
|
});
|
|
1260
1297
|
var r = Object.create(vt.prototype);
|
|
1261
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit =
|
|
1298
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = zt(r, "implicit"), r.compiledExplicit = zt(r, "explicit"), r.compiledTypeMap = zo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1262
1299
|
};
|
|
1263
|
-
var
|
|
1300
|
+
var kn = vt, Cn = new de("tag:yaml.org,2002:str", {
|
|
1264
1301
|
kind: "scalar",
|
|
1265
1302
|
construct: function(e) {
|
|
1266
1303
|
return e !== null ? e : "";
|
|
1267
1304
|
}
|
|
1268
|
-
}),
|
|
1305
|
+
}), _n = new de("tag:yaml.org,2002:seq", {
|
|
1269
1306
|
kind: "sequence",
|
|
1270
1307
|
construct: function(e) {
|
|
1271
1308
|
return e !== null ? e : [];
|
|
1272
1309
|
}
|
|
1273
|
-
}),
|
|
1310
|
+
}), wn = new de("tag:yaml.org,2002:map", {
|
|
1274
1311
|
kind: "mapping",
|
|
1275
1312
|
construct: function(e) {
|
|
1276
1313
|
return e !== null ? e : {};
|
|
1277
1314
|
}
|
|
1278
|
-
}),
|
|
1315
|
+
}), In = new kn({
|
|
1279
1316
|
explicit: [
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1317
|
+
Cn,
|
|
1318
|
+
_n,
|
|
1319
|
+
wn
|
|
1283
1320
|
]
|
|
1284
1321
|
});
|
|
1285
1322
|
function Ho(e) {
|
|
@@ -1288,17 +1325,17 @@ function Ho(e) {
|
|
|
1288
1325
|
var n = e.length;
|
|
1289
1326
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1290
1327
|
}
|
|
1291
|
-
function
|
|
1328
|
+
function Jo() {
|
|
1292
1329
|
return null;
|
|
1293
1330
|
}
|
|
1294
|
-
function
|
|
1331
|
+
function Wo(e) {
|
|
1295
1332
|
return e === null;
|
|
1296
1333
|
}
|
|
1297
|
-
var
|
|
1334
|
+
var xn = new de("tag:yaml.org,2002:null", {
|
|
1298
1335
|
kind: "scalar",
|
|
1299
1336
|
resolve: Ho,
|
|
1300
|
-
construct:
|
|
1301
|
-
predicate:
|
|
1337
|
+
construct: Jo,
|
|
1338
|
+
predicate: Wo,
|
|
1302
1339
|
represent: {
|
|
1303
1340
|
canonical: function() {
|
|
1304
1341
|
return "~";
|
|
@@ -1318,23 +1355,23 @@ var Tn = new de("tag:yaml.org,2002:null", {
|
|
|
1318
1355
|
},
|
|
1319
1356
|
defaultStyle: "lowercase"
|
|
1320
1357
|
});
|
|
1321
|
-
function
|
|
1358
|
+
function Yo(e) {
|
|
1322
1359
|
if (e === null)
|
|
1323
1360
|
return !1;
|
|
1324
1361
|
var n = e.length;
|
|
1325
1362
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1326
1363
|
}
|
|
1327
|
-
function
|
|
1364
|
+
function Zo(e) {
|
|
1328
1365
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1329
1366
|
}
|
|
1330
|
-
function
|
|
1367
|
+
function Qo(e) {
|
|
1331
1368
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1332
1369
|
}
|
|
1333
|
-
var
|
|
1370
|
+
var An = new de("tag:yaml.org,2002:bool", {
|
|
1334
1371
|
kind: "scalar",
|
|
1335
|
-
resolve:
|
|
1336
|
-
construct:
|
|
1337
|
-
predicate:
|
|
1372
|
+
resolve: Yo,
|
|
1373
|
+
construct: Zo,
|
|
1374
|
+
predicate: Qo,
|
|
1338
1375
|
represent: {
|
|
1339
1376
|
lowercase: function(e) {
|
|
1340
1377
|
return e ? "true" : "false";
|
|
@@ -1348,16 +1385,16 @@ var $n = new de("tag:yaml.org,2002:bool", {
|
|
|
1348
1385
|
},
|
|
1349
1386
|
defaultStyle: "lowercase"
|
|
1350
1387
|
});
|
|
1351
|
-
function
|
|
1388
|
+
function Xo(e) {
|
|
1352
1389
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1353
1390
|
}
|
|
1354
|
-
function
|
|
1391
|
+
function ea(e) {
|
|
1355
1392
|
return 48 <= e && e <= 55;
|
|
1356
1393
|
}
|
|
1357
|
-
function
|
|
1394
|
+
function ta(e) {
|
|
1358
1395
|
return 48 <= e && e <= 57;
|
|
1359
1396
|
}
|
|
1360
|
-
function
|
|
1397
|
+
function na(e) {
|
|
1361
1398
|
if (e === null)
|
|
1362
1399
|
return !1;
|
|
1363
1400
|
var n = e.length, t = 0, r = !1, o;
|
|
@@ -1378,7 +1415,7 @@ function ta(e) {
|
|
|
1378
1415
|
if (o === "x") {
|
|
1379
1416
|
for (t++; t < n; t++)
|
|
1380
1417
|
if (o = e[t], o !== "_") {
|
|
1381
|
-
if (!
|
|
1418
|
+
if (!Xo(e.charCodeAt(t)))
|
|
1382
1419
|
return !1;
|
|
1383
1420
|
r = !0;
|
|
1384
1421
|
}
|
|
@@ -1387,7 +1424,7 @@ function ta(e) {
|
|
|
1387
1424
|
if (o === "o") {
|
|
1388
1425
|
for (t++; t < n; t++)
|
|
1389
1426
|
if (o = e[t], o !== "_") {
|
|
1390
|
-
if (!
|
|
1427
|
+
if (!ea(e.charCodeAt(t)))
|
|
1391
1428
|
return !1;
|
|
1392
1429
|
r = !0;
|
|
1393
1430
|
}
|
|
@@ -1398,13 +1435,13 @@ function ta(e) {
|
|
|
1398
1435
|
return !1;
|
|
1399
1436
|
for (; t < n; t++)
|
|
1400
1437
|
if (o = e[t], o !== "_") {
|
|
1401
|
-
if (!
|
|
1438
|
+
if (!ta(e.charCodeAt(t)))
|
|
1402
1439
|
return !1;
|
|
1403
1440
|
r = !0;
|
|
1404
1441
|
}
|
|
1405
1442
|
return !(!r || o === "_");
|
|
1406
1443
|
}
|
|
1407
|
-
function
|
|
1444
|
+
function ra(e) {
|
|
1408
1445
|
var n = e, t = 1, r;
|
|
1409
1446
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), r = n[0], (r === "-" || r === "+") && (r === "-" && (t = -1), n = n.slice(1), r = n[0]), n === "0")
|
|
1410
1447
|
return 0;
|
|
@@ -1418,14 +1455,14 @@ function na(e) {
|
|
|
1418
1455
|
}
|
|
1419
1456
|
return t * parseInt(n, 10);
|
|
1420
1457
|
}
|
|
1421
|
-
function
|
|
1422
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1458
|
+
function oa(e) {
|
|
1459
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !se.isNegativeZero(e);
|
|
1423
1460
|
}
|
|
1424
|
-
var
|
|
1461
|
+
var Sn = new de("tag:yaml.org,2002:int", {
|
|
1425
1462
|
kind: "scalar",
|
|
1426
|
-
resolve:
|
|
1427
|
-
construct:
|
|
1428
|
-
predicate:
|
|
1463
|
+
resolve: na,
|
|
1464
|
+
construct: ra,
|
|
1465
|
+
predicate: oa,
|
|
1429
1466
|
represent: {
|
|
1430
1467
|
binary: function(e) {
|
|
1431
1468
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1448,21 +1485,21 @@ var Mn = new de("tag:yaml.org,2002:int", {
|
|
|
1448
1485
|
decimal: [10, "dec"],
|
|
1449
1486
|
hexadecimal: [16, "hex"]
|
|
1450
1487
|
}
|
|
1451
|
-
}),
|
|
1488
|
+
}), aa = new RegExp(
|
|
1452
1489
|
// 2.5e4, 2.5 and integers
|
|
1453
1490
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1454
1491
|
);
|
|
1455
|
-
function
|
|
1456
|
-
return !(e === null || !
|
|
1492
|
+
function ia(e) {
|
|
1493
|
+
return !(e === null || !aa.test(e) || // Quick hack to not allow integers end with `_`
|
|
1457
1494
|
// Probably should update regexp & check speed
|
|
1458
1495
|
e[e.length - 1] === "_");
|
|
1459
1496
|
}
|
|
1460
|
-
function
|
|
1497
|
+
function sa(e) {
|
|
1461
1498
|
var n, t;
|
|
1462
1499
|
return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
|
|
1463
1500
|
}
|
|
1464
|
-
var
|
|
1465
|
-
function
|
|
1501
|
+
var la = /^[-+]?[0-9]+e/;
|
|
1502
|
+
function ua(e, n) {
|
|
1466
1503
|
var t;
|
|
1467
1504
|
if (isNaN(e))
|
|
1468
1505
|
switch (n) {
|
|
@@ -1491,38 +1528,38 @@ function la(e, n) {
|
|
|
1491
1528
|
case "camelcase":
|
|
1492
1529
|
return "-.Inf";
|
|
1493
1530
|
}
|
|
1494
|
-
else if (
|
|
1531
|
+
else if (se.isNegativeZero(e))
|
|
1495
1532
|
return "-0.0";
|
|
1496
|
-
return t = e.toString(10),
|
|
1533
|
+
return t = e.toString(10), la.test(t) ? t.replace("e", ".e") : t;
|
|
1497
1534
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1535
|
+
function ca(e) {
|
|
1536
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || se.isNegativeZero(e));
|
|
1500
1537
|
}
|
|
1501
|
-
var
|
|
1538
|
+
var Tn = new de("tag:yaml.org,2002:float", {
|
|
1502
1539
|
kind: "scalar",
|
|
1503
|
-
resolve:
|
|
1504
|
-
construct:
|
|
1505
|
-
predicate:
|
|
1506
|
-
represent:
|
|
1540
|
+
resolve: ia,
|
|
1541
|
+
construct: sa,
|
|
1542
|
+
predicate: ca,
|
|
1543
|
+
represent: ua,
|
|
1507
1544
|
defaultStyle: "lowercase"
|
|
1508
|
-
}),
|
|
1545
|
+
}), $n = In.extend({
|
|
1509
1546
|
implicit: [
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1547
|
+
xn,
|
|
1548
|
+
An,
|
|
1549
|
+
Sn,
|
|
1550
|
+
Tn
|
|
1514
1551
|
]
|
|
1515
|
-
}),
|
|
1552
|
+
}), Mn = $n, jn = new RegExp(
|
|
1516
1553
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1517
|
-
),
|
|
1554
|
+
), En = new RegExp(
|
|
1518
1555
|
"^([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]))?))?$"
|
|
1519
1556
|
);
|
|
1520
|
-
function ca(e) {
|
|
1521
|
-
return e === null ? !1 : Fn.exec(e) !== null || Kn.exec(e) !== null;
|
|
1522
|
-
}
|
|
1523
1557
|
function da(e) {
|
|
1524
|
-
|
|
1525
|
-
|
|
1558
|
+
return e === null ? !1 : jn.exec(e) !== null || En.exec(e) !== null;
|
|
1559
|
+
}
|
|
1560
|
+
function pa(e) {
|
|
1561
|
+
var n, t, r, o, a, i, s, l = 0, c = null, d, u, m;
|
|
1562
|
+
if (n = jn.exec(e), n === null && (n = En.exec(e)), n === null)
|
|
1526
1563
|
throw new Error("Date resolve error");
|
|
1527
1564
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1528
1565
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1531,27 +1568,27 @@ function da(e) {
|
|
|
1531
1568
|
l += "0";
|
|
1532
1569
|
l = +l;
|
|
1533
1570
|
}
|
|
1534
|
-
return n[9] && (d = +n[10], u = +(n[11] || 0), c = (d * 60 + u) * 6e4, n[9] === "-" && (c = -c)),
|
|
1571
|
+
return n[9] && (d = +n[10], u = +(n[11] || 0), c = (d * 60 + u) * 6e4, n[9] === "-" && (c = -c)), m = new Date(Date.UTC(t, r, o, a, i, s, l)), c && m.setTime(m.getTime() - c), m;
|
|
1535
1572
|
}
|
|
1536
|
-
function
|
|
1573
|
+
function fa(e) {
|
|
1537
1574
|
return e.toISOString();
|
|
1538
1575
|
}
|
|
1539
|
-
var
|
|
1576
|
+
var On = new de("tag:yaml.org,2002:timestamp", {
|
|
1540
1577
|
kind: "scalar",
|
|
1541
|
-
resolve:
|
|
1542
|
-
construct:
|
|
1578
|
+
resolve: da,
|
|
1579
|
+
construct: pa,
|
|
1543
1580
|
instanceOf: Date,
|
|
1544
|
-
represent:
|
|
1581
|
+
represent: fa
|
|
1545
1582
|
});
|
|
1546
|
-
function
|
|
1583
|
+
function ma(e) {
|
|
1547
1584
|
return e === "<<" || e === null;
|
|
1548
1585
|
}
|
|
1549
|
-
var
|
|
1586
|
+
var Kn = new de("tag:yaml.org,2002:merge", {
|
|
1550
1587
|
kind: "scalar",
|
|
1551
|
-
resolve:
|
|
1588
|
+
resolve: ma
|
|
1552
1589
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1553
1590
|
\r`;
|
|
1554
|
-
function
|
|
1591
|
+
function ga(e) {
|
|
1555
1592
|
if (e === null)
|
|
1556
1593
|
return !1;
|
|
1557
1594
|
var n, t, r = 0, o = e.length, a = Tt;
|
|
@@ -1563,37 +1600,37 @@ function ma(e) {
|
|
|
1563
1600
|
}
|
|
1564
1601
|
return r % 8 === 0;
|
|
1565
1602
|
}
|
|
1566
|
-
function
|
|
1603
|
+
function ya(e) {
|
|
1567
1604
|
var n, t, r = e.replace(/[\r\n=]/g, ""), o = r.length, a = Tt, i = 0, s = [];
|
|
1568
1605
|
for (n = 0; n < o; n++)
|
|
1569
1606
|
n % 4 === 0 && n && (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)), i = i << 6 | a.indexOf(r.charAt(n));
|
|
1570
1607
|
return t = o % 4 * 6, t === 0 ? (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)) : t === 18 ? (s.push(i >> 10 & 255), s.push(i >> 2 & 255)) : t === 12 && s.push(i >> 4 & 255), new Uint8Array(s);
|
|
1571
1608
|
}
|
|
1572
|
-
function
|
|
1609
|
+
function ha(e) {
|
|
1573
1610
|
var n = "", t = 0, r, o, a = e.length, i = Tt;
|
|
1574
1611
|
for (r = 0; r < a; r++)
|
|
1575
1612
|
r % 3 === 0 && r && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[r];
|
|
1576
1613
|
return o = a % 3, o === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : o === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : o === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
|
|
1577
1614
|
}
|
|
1578
|
-
function
|
|
1615
|
+
function va(e) {
|
|
1579
1616
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1580
1617
|
}
|
|
1581
|
-
var
|
|
1618
|
+
var Fn = new de("tag:yaml.org,2002:binary", {
|
|
1582
1619
|
kind: "scalar",
|
|
1583
|
-
resolve:
|
|
1584
|
-
construct:
|
|
1585
|
-
predicate:
|
|
1586
|
-
represent:
|
|
1587
|
-
}),
|
|
1620
|
+
resolve: ga,
|
|
1621
|
+
construct: ya,
|
|
1622
|
+
predicate: va,
|
|
1623
|
+
represent: ha
|
|
1624
|
+
}), ba = Object.prototype.hasOwnProperty, ka = Object.prototype.toString;
|
|
1588
1625
|
function Ca(e) {
|
|
1589
1626
|
if (e === null)
|
|
1590
1627
|
return !0;
|
|
1591
1628
|
var n = [], t, r, o, a, i, s = e;
|
|
1592
1629
|
for (t = 0, r = s.length; t < r; t += 1) {
|
|
1593
|
-
if (o = s[t], i = !1,
|
|
1630
|
+
if (o = s[t], i = !1, ka.call(o) !== "[object Object]")
|
|
1594
1631
|
return !1;
|
|
1595
1632
|
for (a in o)
|
|
1596
|
-
if (
|
|
1633
|
+
if (ba.call(o, a))
|
|
1597
1634
|
if (!i)
|
|
1598
1635
|
i = !0;
|
|
1599
1636
|
else
|
|
@@ -1607,26 +1644,26 @@ function Ca(e) {
|
|
|
1607
1644
|
}
|
|
1608
1645
|
return !0;
|
|
1609
1646
|
}
|
|
1610
|
-
function
|
|
1647
|
+
function _a(e) {
|
|
1611
1648
|
return e !== null ? e : [];
|
|
1612
1649
|
}
|
|
1613
|
-
var
|
|
1650
|
+
var Nn = new de("tag:yaml.org,2002:omap", {
|
|
1614
1651
|
kind: "sequence",
|
|
1615
1652
|
resolve: Ca,
|
|
1616
|
-
construct:
|
|
1617
|
-
}),
|
|
1618
|
-
function
|
|
1653
|
+
construct: _a
|
|
1654
|
+
}), wa = Object.prototype.toString;
|
|
1655
|
+
function Ia(e) {
|
|
1619
1656
|
if (e === null)
|
|
1620
1657
|
return !0;
|
|
1621
1658
|
var n, t, r, o, a, i = e;
|
|
1622
1659
|
for (a = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1623
|
-
if (r = i[n],
|
|
1660
|
+
if (r = i[n], wa.call(r) !== "[object Object]" || (o = Object.keys(r), o.length !== 1))
|
|
1624
1661
|
return !1;
|
|
1625
1662
|
a[n] = [o[0], r[o[0]]];
|
|
1626
1663
|
}
|
|
1627
1664
|
return !0;
|
|
1628
1665
|
}
|
|
1629
|
-
function
|
|
1666
|
+
function xa(e) {
|
|
1630
1667
|
if (e === null)
|
|
1631
1668
|
return [];
|
|
1632
1669
|
var n, t, r, o, a, i = e;
|
|
@@ -1634,10 +1671,10 @@ function Ia(e) {
|
|
|
1634
1671
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1635
1672
|
return a;
|
|
1636
1673
|
}
|
|
1637
|
-
var
|
|
1674
|
+
var Bn = new de("tag:yaml.org,2002:pairs", {
|
|
1638
1675
|
kind: "sequence",
|
|
1639
|
-
resolve:
|
|
1640
|
-
construct:
|
|
1676
|
+
resolve: Ia,
|
|
1677
|
+
construct: xa
|
|
1641
1678
|
}), Aa = Object.prototype.hasOwnProperty;
|
|
1642
1679
|
function Sa(e) {
|
|
1643
1680
|
if (e === null)
|
|
@@ -1648,67 +1685,67 @@ function Sa(e) {
|
|
|
1648
1685
|
return !1;
|
|
1649
1686
|
return !0;
|
|
1650
1687
|
}
|
|
1651
|
-
function
|
|
1688
|
+
function Ta(e) {
|
|
1652
1689
|
return e !== null ? e : {};
|
|
1653
1690
|
}
|
|
1654
|
-
var
|
|
1691
|
+
var Pn = new de("tag:yaml.org,2002:set", {
|
|
1655
1692
|
kind: "mapping",
|
|
1656
1693
|
resolve: Sa,
|
|
1657
|
-
construct:
|
|
1658
|
-
}), $t =
|
|
1694
|
+
construct: Ta
|
|
1695
|
+
}), $t = Mn.extend({
|
|
1659
1696
|
implicit: [
|
|
1660
|
-
|
|
1661
|
-
|
|
1697
|
+
On,
|
|
1698
|
+
Kn
|
|
1662
1699
|
],
|
|
1663
1700
|
explicit: [
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1701
|
+
Fn,
|
|
1702
|
+
Nn,
|
|
1703
|
+
Bn,
|
|
1704
|
+
Pn
|
|
1668
1705
|
]
|
|
1669
|
-
}), je = Object.prototype.hasOwnProperty, ot = 1,
|
|
1670
|
-
function
|
|
1706
|
+
}), je = Object.prototype.hasOwnProperty, ot = 1, Ln = 2, qn = 3, at = 4, yt = 1, $a = 2, Ht = 3, Ma = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ja = /[\x85\u2028\u2029]/, Ea = /[,\[\]\{\}]/, Un = /^(?:!|!!|![a-z\-]+!)$/i, Rn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1707
|
+
function Jt(e) {
|
|
1671
1708
|
return Object.prototype.toString.call(e);
|
|
1672
1709
|
}
|
|
1673
1710
|
function we(e) {
|
|
1674
1711
|
return e === 10 || e === 13;
|
|
1675
1712
|
}
|
|
1676
|
-
function
|
|
1713
|
+
function Ke(e) {
|
|
1677
1714
|
return e === 9 || e === 32;
|
|
1678
1715
|
}
|
|
1679
1716
|
function he(e) {
|
|
1680
1717
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1681
1718
|
}
|
|
1682
|
-
function
|
|
1719
|
+
function qe(e) {
|
|
1683
1720
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1684
1721
|
}
|
|
1685
|
-
function
|
|
1722
|
+
function Oa(e) {
|
|
1686
1723
|
var n;
|
|
1687
1724
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1688
1725
|
}
|
|
1689
|
-
function
|
|
1726
|
+
function Ka(e) {
|
|
1690
1727
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1691
1728
|
}
|
|
1692
1729
|
function Fa(e) {
|
|
1693
1730
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1694
1731
|
}
|
|
1695
|
-
function
|
|
1732
|
+
function Wt(e) {
|
|
1696
1733
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1697
1734
|
` : 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" : "";
|
|
1698
1735
|
}
|
|
1699
|
-
function
|
|
1736
|
+
function Na(e) {
|
|
1700
1737
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1701
1738
|
(e - 65536 >> 10) + 55296,
|
|
1702
1739
|
(e - 65536 & 1023) + 56320
|
|
1703
1740
|
);
|
|
1704
1741
|
}
|
|
1705
|
-
var
|
|
1742
|
+
var Vn = new Array(256), Dn = new Array(256);
|
|
1706
1743
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1707
|
-
|
|
1744
|
+
Vn[Pe] = Wt(Pe) ? 1 : 0, Dn[Pe] = Wt(Pe);
|
|
1708
1745
|
function Ba(e, n) {
|
|
1709
1746
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || $t, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1710
1747
|
}
|
|
1711
|
-
function
|
|
1748
|
+
function Gn(e, n) {
|
|
1712
1749
|
var t = {
|
|
1713
1750
|
name: e.filename,
|
|
1714
1751
|
buffer: e.input.slice(0, -1),
|
|
@@ -1719,24 +1756,24 @@ function Jn(e, n) {
|
|
|
1719
1756
|
};
|
|
1720
1757
|
return t.snippet = Uo(t), new me(n, t);
|
|
1721
1758
|
}
|
|
1722
|
-
function
|
|
1723
|
-
throw
|
|
1759
|
+
function $(e, n) {
|
|
1760
|
+
throw Gn(e, n);
|
|
1724
1761
|
}
|
|
1725
1762
|
function it(e, n) {
|
|
1726
|
-
e.onWarning && e.onWarning.call(null,
|
|
1763
|
+
e.onWarning && e.onWarning.call(null, Gn(e, n));
|
|
1727
1764
|
}
|
|
1728
|
-
var
|
|
1765
|
+
var Yt = {
|
|
1729
1766
|
YAML: function(e, n, t) {
|
|
1730
1767
|
var r, o, a;
|
|
1731
|
-
e.version !== null &&
|
|
1768
|
+
e.version !== null && $(e, "duplication of %YAML directive"), t.length !== 1 && $(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && $(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && $(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && it(e, "unsupported YAML version of the document");
|
|
1732
1769
|
},
|
|
1733
1770
|
TAG: function(e, n, t) {
|
|
1734
1771
|
var r, o;
|
|
1735
|
-
t.length !== 2 &&
|
|
1772
|
+
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Un.test(r) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), je.call(e.tagMap, r) && $(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Rn.test(o) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1736
1773
|
try {
|
|
1737
1774
|
o = decodeURIComponent(o);
|
|
1738
1775
|
} catch {
|
|
1739
|
-
|
|
1776
|
+
$(e, "tag prefix is malformed: " + o);
|
|
1740
1777
|
}
|
|
1741
1778
|
e.tagMap[r] = o;
|
|
1742
1779
|
}
|
|
@@ -1746,30 +1783,30 @@ function Me(e, n, t, r) {
|
|
|
1746
1783
|
if (n < t) {
|
|
1747
1784
|
if (s = e.input.slice(n, t), r)
|
|
1748
1785
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1749
|
-
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1786
|
+
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || $(e, "expected valid JSON character");
|
|
1750
1787
|
else
|
|
1751
|
-
|
|
1788
|
+
Ma.test(s) && $(e, "the stream contains non-printable characters");
|
|
1752
1789
|
e.result += s;
|
|
1753
1790
|
}
|
|
1754
1791
|
}
|
|
1755
|
-
function
|
|
1792
|
+
function Zt(e, n, t, r) {
|
|
1756
1793
|
var o, a, i, s;
|
|
1757
|
-
for (
|
|
1794
|
+
for (se.isObject(t) || $(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1758
1795
|
a = o[i], je.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1759
1796
|
}
|
|
1760
|
-
function
|
|
1797
|
+
function Ue(e, n, t, r, o, a, i, s, l) {
|
|
1761
1798
|
var c, d;
|
|
1762
1799
|
if (Array.isArray(o))
|
|
1763
1800
|
for (o = Array.prototype.slice.call(o), c = 0, d = o.length; c < d; c += 1)
|
|
1764
|
-
Array.isArray(o[c]) &&
|
|
1765
|
-
if (typeof o == "object" &&
|
|
1801
|
+
Array.isArray(o[c]) && $(e, "nested arrays are not supported inside keys"), typeof o == "object" && Jt(o[c]) === "[object Object]" && (o[c] = "[object Object]");
|
|
1802
|
+
if (typeof o == "object" && Jt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1766
1803
|
if (Array.isArray(a))
|
|
1767
1804
|
for (c = 0, d = a.length; c < d; c += 1)
|
|
1768
|
-
|
|
1805
|
+
Zt(e, n, a[c], t);
|
|
1769
1806
|
else
|
|
1770
|
-
|
|
1807
|
+
Zt(e, n, a, t);
|
|
1771
1808
|
else
|
|
1772
|
-
!e.json && !je.call(t, o) && je.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position,
|
|
1809
|
+
!e.json && !je.call(t, o) && je.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, $(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1773
1810
|
configurable: !0,
|
|
1774
1811
|
enumerable: !0,
|
|
1775
1812
|
writable: !0,
|
|
@@ -1779,11 +1816,11 @@ function qe(e, n, t, r, o, a, i, s, l) {
|
|
|
1779
1816
|
}
|
|
1780
1817
|
function Mt(e) {
|
|
1781
1818
|
var n;
|
|
1782
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1819
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : $(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1783
1820
|
}
|
|
1784
|
-
function
|
|
1821
|
+
function oe(e, n, t) {
|
|
1785
1822
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1786
|
-
for (;
|
|
1823
|
+
for (; Ke(o); )
|
|
1787
1824
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1788
1825
|
if (n && o === 35)
|
|
1789
1826
|
do
|
|
@@ -1802,25 +1839,25 @@ function dt(e) {
|
|
|
1802
1839
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || he(t)));
|
|
1803
1840
|
}
|
|
1804
1841
|
function jt(e, n) {
|
|
1805
|
-
n === 1 ? e.result += " " : n > 1 && (e.result +=
|
|
1842
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += se.repeat(`
|
|
1806
1843
|
`, n - 1));
|
|
1807
1844
|
}
|
|
1808
|
-
function
|
|
1809
|
-
var r, o, a, i, s, l, c, d, u = e.kind,
|
|
1810
|
-
if (f = e.input.charCodeAt(e.position), he(f) ||
|
|
1845
|
+
function Pa(e, n, t) {
|
|
1846
|
+
var r, o, a, i, s, l, c, d, u = e.kind, m = e.result, f;
|
|
1847
|
+
if (f = e.input.charCodeAt(e.position), he(f) || qe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (o = e.input.charCodeAt(e.position + 1), he(o) || t && qe(o)))
|
|
1811
1848
|
return !1;
|
|
1812
1849
|
for (e.kind = "scalar", e.result = "", a = i = e.position, s = !1; f !== 0; ) {
|
|
1813
1850
|
if (f === 58) {
|
|
1814
|
-
if (o = e.input.charCodeAt(e.position + 1), he(o) || t &&
|
|
1851
|
+
if (o = e.input.charCodeAt(e.position + 1), he(o) || t && qe(o))
|
|
1815
1852
|
break;
|
|
1816
1853
|
} else if (f === 35) {
|
|
1817
1854
|
if (r = e.input.charCodeAt(e.position - 1), he(r))
|
|
1818
1855
|
break;
|
|
1819
1856
|
} else {
|
|
1820
|
-
if (e.position === e.lineStart && dt(e) || t &&
|
|
1857
|
+
if (e.position === e.lineStart && dt(e) || t && qe(f))
|
|
1821
1858
|
break;
|
|
1822
1859
|
if (we(f))
|
|
1823
|
-
if (l = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1860
|
+
if (l = e.line, c = e.lineStart, d = e.lineIndent, oe(e, !1, -1), e.lineIndent >= n) {
|
|
1824
1861
|
s = !0, f = e.input.charCodeAt(e.position);
|
|
1825
1862
|
continue;
|
|
1826
1863
|
} else {
|
|
@@ -1828,11 +1865,11 @@ function Na(e, n, t) {
|
|
|
1828
1865
|
break;
|
|
1829
1866
|
}
|
|
1830
1867
|
}
|
|
1831
|
-
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1),
|
|
1868
|
+
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1832
1869
|
}
|
|
1833
|
-
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1870
|
+
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = m, !1);
|
|
1834
1871
|
}
|
|
1835
|
-
function
|
|
1872
|
+
function La(e, n) {
|
|
1836
1873
|
var t, r, o;
|
|
1837
1874
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1838
1875
|
return !1;
|
|
@@ -1843,10 +1880,10 @@ function Pa(e, n) {
|
|
|
1843
1880
|
else
|
|
1844
1881
|
return !0;
|
|
1845
1882
|
else
|
|
1846
|
-
we(t) ? (Me(e, r, o, !0), jt(e,
|
|
1847
|
-
|
|
1883
|
+
we(t) ? (Me(e, r, o, !0), jt(e, oe(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1884
|
+
$(e, "unexpected end of the stream within a single quoted scalar");
|
|
1848
1885
|
}
|
|
1849
|
-
function
|
|
1886
|
+
function qa(e, n) {
|
|
1850
1887
|
var t, r, o, a, i, s;
|
|
1851
1888
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1852
1889
|
return !1;
|
|
@@ -1855,23 +1892,23 @@ function La(e, n) {
|
|
|
1855
1892
|
return Me(e, t, e.position, !0), e.position++, !0;
|
|
1856
1893
|
if (s === 92) {
|
|
1857
1894
|
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1858
|
-
|
|
1859
|
-
else if (s < 256 &&
|
|
1860
|
-
e.result +=
|
|
1861
|
-
else if ((i =
|
|
1895
|
+
oe(e, !1, n);
|
|
1896
|
+
else if (s < 256 && Vn[s])
|
|
1897
|
+
e.result += Dn[s], e.position++;
|
|
1898
|
+
else if ((i = Ka(s)) > 0) {
|
|
1862
1899
|
for (o = i, a = 0; o > 0; o--)
|
|
1863
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
1864
|
-
e.result +=
|
|
1900
|
+
s = e.input.charCodeAt(++e.position), (i = Oa(s)) >= 0 ? a = (a << 4) + i : $(e, "expected hexadecimal character");
|
|
1901
|
+
e.result += Na(a), e.position++;
|
|
1865
1902
|
} else
|
|
1866
|
-
|
|
1903
|
+
$(e, "unknown escape sequence");
|
|
1867
1904
|
t = r = e.position;
|
|
1868
1905
|
} else
|
|
1869
|
-
we(s) ? (Me(e, t, r, !0), jt(e,
|
|
1906
|
+
we(s) ? (Me(e, t, r, !0), jt(e, oe(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1870
1907
|
}
|
|
1871
|
-
|
|
1908
|
+
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
1872
1909
|
}
|
|
1873
1910
|
function Ua(e, n) {
|
|
1874
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u,
|
|
1911
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, m, f, I = /* @__PURE__ */ Object.create(null), v, p, A, b;
|
|
1875
1912
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1876
1913
|
d = 93, f = !1, s = [];
|
|
1877
1914
|
else if (b === 123)
|
|
@@ -1879,13 +1916,13 @@ function Ua(e, n) {
|
|
|
1879
1916
|
else
|
|
1880
1917
|
return !1;
|
|
1881
1918
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1882
|
-
if (
|
|
1919
|
+
if (oe(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
1883
1920
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1884
|
-
t ? b === 44 &&
|
|
1921
|
+
t ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = v = A = null, u = m = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = m = !0, e.position++, oe(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, oe(e, !0, n), b = e.input.charCodeAt(e.position), (m || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), oe(e, !0, n), Re(e, n, ot, !1, !0), A = e.result), f ? Ue(e, s, I, p, v, A, r, o, a) : u ? s.push(Ue(e, null, I, p, v, A, r, o, a)) : s.push(v), oe(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1885
1922
|
}
|
|
1886
|
-
|
|
1923
|
+
$(e, "unexpected end of the stream within a flow collection");
|
|
1887
1924
|
}
|
|
1888
|
-
function
|
|
1925
|
+
function Ra(e, n) {
|
|
1889
1926
|
var t, r, o = yt, a = !1, i = !1, s = n, l = 0, c = !1, d, u;
|
|
1890
1927
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1891
1928
|
r = !1;
|
|
@@ -1895,15 +1932,15 @@ function qa(e, n) {
|
|
|
1895
1932
|
return !1;
|
|
1896
1933
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1897
1934
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1898
|
-
yt === o ? o = u === 43 ?
|
|
1935
|
+
yt === o ? o = u === 43 ? Ht : $a : $(e, "repeat of a chomping mode identifier");
|
|
1899
1936
|
else if ((d = Fa(u)) >= 0)
|
|
1900
|
-
d === 0 ?
|
|
1937
|
+
d === 0 ? $(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? $(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
1901
1938
|
else
|
|
1902
1939
|
break;
|
|
1903
|
-
if (
|
|
1940
|
+
if (Ke(u)) {
|
|
1904
1941
|
do
|
|
1905
1942
|
u = e.input.charCodeAt(++e.position);
|
|
1906
|
-
while (
|
|
1943
|
+
while (Ke(u));
|
|
1907
1944
|
if (u === 35)
|
|
1908
1945
|
do
|
|
1909
1946
|
u = e.input.charCodeAt(++e.position);
|
|
@@ -1917,115 +1954,115 @@ function qa(e, n) {
|
|
|
1917
1954
|
continue;
|
|
1918
1955
|
}
|
|
1919
1956
|
if (e.lineIndent < s) {
|
|
1920
|
-
o ===
|
|
1957
|
+
o === Ht ? e.result += se.repeat(`
|
|
1921
1958
|
`, a ? 1 + l : l) : o === yt && a && (e.result += `
|
|
1922
1959
|
`);
|
|
1923
1960
|
break;
|
|
1924
1961
|
}
|
|
1925
|
-
for (r ?
|
|
1926
|
-
`, a ? 1 + l : l)) : c ? (c = !1, e.result +=
|
|
1927
|
-
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result +=
|
|
1928
|
-
`, l) : e.result +=
|
|
1962
|
+
for (r ? Ke(u) ? (c = !0, e.result += se.repeat(`
|
|
1963
|
+
`, a ? 1 + l : l)) : c ? (c = !1, e.result += se.repeat(`
|
|
1964
|
+
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += se.repeat(`
|
|
1965
|
+
`, l) : e.result += se.repeat(`
|
|
1929
1966
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
1930
1967
|
u = e.input.charCodeAt(++e.position);
|
|
1931
1968
|
Me(e, t, e.position, !1);
|
|
1932
1969
|
}
|
|
1933
1970
|
return !0;
|
|
1934
1971
|
}
|
|
1935
|
-
function
|
|
1972
|
+
function Qt(e, n) {
|
|
1936
1973
|
var t, r = e.tag, o = e.anchor, a = [], i, s = !1, l;
|
|
1937
1974
|
if (e.firstTabInLine !== -1)
|
|
1938
1975
|
return !1;
|
|
1939
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1940
|
-
if (s = !0, e.position++,
|
|
1976
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !he(i)))); ) {
|
|
1977
|
+
if (s = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= n) {
|
|
1941
1978
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
1942
1979
|
continue;
|
|
1943
1980
|
}
|
|
1944
|
-
if (t = e.line, Re(e, n,
|
|
1945
|
-
|
|
1981
|
+
if (t = e.line, Re(e, n, qn, !1, !0), a.push(e.result), oe(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
1982
|
+
$(e, "bad indentation of a sequence entry");
|
|
1946
1983
|
else if (e.lineIndent < n)
|
|
1947
1984
|
break;
|
|
1948
1985
|
}
|
|
1949
1986
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1950
1987
|
}
|
|
1951
|
-
function
|
|
1952
|
-
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {},
|
|
1988
|
+
function Va(e, n, t) {
|
|
1989
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, m = /* @__PURE__ */ Object.create(null), f = null, I = null, v = null, p = !1, A = !1, b;
|
|
1953
1990
|
if (e.firstTabInLine !== -1)
|
|
1954
1991
|
return !1;
|
|
1955
1992
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1956
|
-
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1957
|
-
b === 63 ? (p && (
|
|
1993
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (b === 63 || b === 58) && he(r))
|
|
1994
|
+
b === 63 ? (p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null), A = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
1958
1995
|
else {
|
|
1959
|
-
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t,
|
|
1996
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Ln, !1, !0))
|
|
1960
1997
|
break;
|
|
1961
1998
|
if (e.line === a) {
|
|
1962
|
-
for (b = e.input.charCodeAt(e.position);
|
|
1999
|
+
for (b = e.input.charCodeAt(e.position); Ke(b); )
|
|
1963
2000
|
b = e.input.charCodeAt(++e.position);
|
|
1964
2001
|
if (b === 58)
|
|
1965
|
-
b = e.input.charCodeAt(++e.position), he(b) ||
|
|
1966
|
-
else if (
|
|
1967
|
-
|
|
2002
|
+
b = e.input.charCodeAt(++e.position), he(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null), A = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
2003
|
+
else if (A)
|
|
2004
|
+
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1968
2005
|
else
|
|
1969
2006
|
return e.tag = c, e.anchor = d, !0;
|
|
1970
|
-
} else if (
|
|
1971
|
-
|
|
2007
|
+
} else if (A)
|
|
2008
|
+
$(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1972
2009
|
else
|
|
1973
2010
|
return e.tag = c, e.anchor = d, !0;
|
|
1974
2011
|
}
|
|
1975
|
-
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? I = e.result : v = e.result), p || (
|
|
1976
|
-
|
|
2012
|
+
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? I = e.result : v = e.result), p || (Ue(e, u, m, f, I, v, i, s, l), f = I = v = null), oe(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && b !== 0)
|
|
2013
|
+
$(e, "bad indentation of a mapping entry");
|
|
1977
2014
|
else if (e.lineIndent < n)
|
|
1978
2015
|
break;
|
|
1979
2016
|
}
|
|
1980
|
-
return p &&
|
|
2017
|
+
return p && Ue(e, u, m, f, I, null, i, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
1981
2018
|
}
|
|
1982
|
-
function
|
|
2019
|
+
function Da(e) {
|
|
1983
2020
|
var n, t = !1, r = !1, o, a, i;
|
|
1984
2021
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
1985
2022
|
return !1;
|
|
1986
|
-
if (e.tag !== null &&
|
|
2023
|
+
if (e.tag !== null && $(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, o = "!!", i = e.input.charCodeAt(++e.position)) : o = "!", n = e.position, t) {
|
|
1987
2024
|
do
|
|
1988
2025
|
i = e.input.charCodeAt(++e.position);
|
|
1989
2026
|
while (i !== 0 && i !== 62);
|
|
1990
|
-
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2027
|
+
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : $(e, "unexpected end of the stream within a verbatim tag");
|
|
1991
2028
|
} else {
|
|
1992
2029
|
for (; i !== 0 && !he(i); )
|
|
1993
|
-
i === 33 && (r ?
|
|
1994
|
-
a = e.input.slice(n, e.position),
|
|
2030
|
+
i === 33 && (r ? $(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Un.test(o) || $(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2031
|
+
a = e.input.slice(n, e.position), Ea.test(a) && $(e, "tag suffix cannot contain flow indicator characters");
|
|
1995
2032
|
}
|
|
1996
|
-
a && !
|
|
2033
|
+
a && !Rn.test(a) && $(e, "tag name cannot contain such characters: " + a);
|
|
1997
2034
|
try {
|
|
1998
2035
|
a = decodeURIComponent(a);
|
|
1999
2036
|
} catch {
|
|
2000
|
-
|
|
2037
|
+
$(e, "tag name is malformed: " + a);
|
|
2001
2038
|
}
|
|
2002
|
-
return t ? e.tag = a : je.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a :
|
|
2039
|
+
return t ? e.tag = a : je.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : $(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2003
2040
|
}
|
|
2004
|
-
function
|
|
2041
|
+
function Ga(e) {
|
|
2005
2042
|
var n, t;
|
|
2006
2043
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2007
2044
|
return !1;
|
|
2008
|
-
for (e.anchor !== null &&
|
|
2045
|
+
for (e.anchor !== null && $(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !he(t) && !qe(t); )
|
|
2009
2046
|
t = e.input.charCodeAt(++e.position);
|
|
2010
|
-
return e.position === n &&
|
|
2047
|
+
return e.position === n && $(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2011
2048
|
}
|
|
2012
|
-
function
|
|
2049
|
+
function za(e) {
|
|
2013
2050
|
var n, t, r;
|
|
2014
2051
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2015
2052
|
return !1;
|
|
2016
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !
|
|
2053
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !qe(r); )
|
|
2017
2054
|
r = e.input.charCodeAt(++e.position);
|
|
2018
|
-
return e.position === n &&
|
|
2055
|
+
return e.position === n && $(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), je.call(e.anchorMap, t) || $(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2019
2056
|
}
|
|
2020
2057
|
function Re(e, n, t, r, o) {
|
|
2021
|
-
var a, i, s, l = 1, c = !1, d = !1, u,
|
|
2022
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t ||
|
|
2023
|
-
for (;
|
|
2024
|
-
|
|
2025
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t ||
|
|
2058
|
+
var a, i, s, l = 1, c = !1, d = !1, u, m, f, I, v, p;
|
|
2059
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || qn === t, r && oe(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2060
|
+
for (; Da(e) || Ga(e); )
|
|
2061
|
+
oe(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2062
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Ln === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Qt(e, p) || Va(e, p, v)) || Ua(e, v) ? d = !0 : (i && Ra(e, v) || La(e, v) || qa(e, v) ? d = !0 : za(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && $(e, "alias node should not have any properties")) : Pa(e, v, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Qt(e, p))), e.tag === null)
|
|
2026
2063
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2027
2064
|
else if (e.tag === "?") {
|
|
2028
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2065
|
+
for (e.result !== null && e.kind !== "scalar" && $(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, m = e.implicitTypes.length; u < m; u += 1)
|
|
2029
2066
|
if (I = e.implicitTypes[u], I.resolve(e.result)) {
|
|
2030
2067
|
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2031
2068
|
break;
|
|
@@ -2034,22 +2071,22 @@ function Re(e, n, t, r, o) {
|
|
|
2034
2071
|
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2035
2072
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2036
2073
|
else
|
|
2037
|
-
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0,
|
|
2074
|
+
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, m = f.length; u < m; u += 1)
|
|
2038
2075
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2039
2076
|
I = f[u];
|
|
2040
2077
|
break;
|
|
2041
2078
|
}
|
|
2042
|
-
I ||
|
|
2079
|
+
I || $(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && $(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : $(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2043
2080
|
}
|
|
2044
2081
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2045
2082
|
}
|
|
2046
2083
|
function Ha(e) {
|
|
2047
2084
|
var n = e.position, t, r, o, a = !1, i;
|
|
2048
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2085
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2049
2086
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !he(i); )
|
|
2050
2087
|
i = e.input.charCodeAt(++e.position);
|
|
2051
|
-
for (r = e.input.slice(t, e.position), o = [], r.length < 1 &&
|
|
2052
|
-
for (;
|
|
2088
|
+
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && $(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2089
|
+
for (; Ke(i); )
|
|
2053
2090
|
i = e.input.charCodeAt(++e.position);
|
|
2054
2091
|
if (i === 35) {
|
|
2055
2092
|
do
|
|
@@ -2063,47 +2100,47 @@ function Ha(e) {
|
|
|
2063
2100
|
i = e.input.charCodeAt(++e.position);
|
|
2064
2101
|
o.push(e.input.slice(t, e.position));
|
|
2065
2102
|
}
|
|
2066
|
-
i !== 0 && Mt(e), je.call(
|
|
2103
|
+
i !== 0 && Mt(e), je.call(Yt, r) ? Yt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2067
2104
|
}
|
|
2068
|
-
if (
|
|
2069
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2105
|
+
if (oe(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, oe(e, !0, -1)) : a && $(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), oe(e, !0, -1), e.checkLineBreaks && ja.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2106
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2070
2107
|
return;
|
|
2071
2108
|
}
|
|
2072
2109
|
if (e.position < e.length - 1)
|
|
2073
|
-
|
|
2110
|
+
$(e, "end of the stream or a document separator is expected");
|
|
2074
2111
|
else
|
|
2075
2112
|
return;
|
|
2076
2113
|
}
|
|
2077
|
-
function
|
|
2114
|
+
function zn(e, n) {
|
|
2078
2115
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2079
2116
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2080
2117
|
var t = new Ba(e, n), r = e.indexOf("\0");
|
|
2081
|
-
for (r !== -1 && (t.position = r,
|
|
2118
|
+
for (r !== -1 && (t.position = r, $(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2082
2119
|
t.lineIndent += 1, t.position += 1;
|
|
2083
2120
|
for (; t.position < t.length - 1; )
|
|
2084
2121
|
Ha(t);
|
|
2085
2122
|
return t.documents;
|
|
2086
2123
|
}
|
|
2087
|
-
function
|
|
2124
|
+
function Ja(e, n, t) {
|
|
2088
2125
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2089
|
-
var r =
|
|
2126
|
+
var r = zn(e, t);
|
|
2090
2127
|
if (typeof n != "function")
|
|
2091
2128
|
return r;
|
|
2092
2129
|
for (var o = 0, a = r.length; o < a; o += 1)
|
|
2093
2130
|
n(r[o]);
|
|
2094
2131
|
}
|
|
2095
|
-
function
|
|
2096
|
-
var t =
|
|
2132
|
+
function Wa(e, n) {
|
|
2133
|
+
var t = zn(e, n);
|
|
2097
2134
|
if (t.length !== 0) {
|
|
2098
2135
|
if (t.length === 1)
|
|
2099
2136
|
return t[0];
|
|
2100
2137
|
throw new me("expected a single document in the stream, but found more");
|
|
2101
2138
|
}
|
|
2102
2139
|
}
|
|
2103
|
-
var
|
|
2104
|
-
loadAll:
|
|
2105
|
-
load:
|
|
2106
|
-
},
|
|
2140
|
+
var Ya = Ja, Za = Wa, Hn = {
|
|
2141
|
+
loadAll: Ya,
|
|
2142
|
+
load: Za
|
|
2143
|
+
}, Jn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty, Et = 65279, Qa = 9, We = 10, Xa = 13, ei = 32, ti = 33, ni = 34, bt = 35, ri = 37, oi = 38, ai = 39, ii = 42, Yn = 44, si = 45, st = 58, li = 61, ui = 62, ci = 63, di = 64, Zn = 91, Qn = 93, pi = 96, Xn = 123, fi = 124, er = 125, fe = {};
|
|
2107
2144
|
fe[0] = "\\0";
|
|
2108
2145
|
fe[7] = "\\a";
|
|
2109
2146
|
fe[8] = "\\b";
|
|
@@ -2119,7 +2156,7 @@ fe[133] = "\\N";
|
|
|
2119
2156
|
fe[160] = "\\_";
|
|
2120
2157
|
fe[8232] = "\\L";
|
|
2121
2158
|
fe[8233] = "\\P";
|
|
2122
|
-
var
|
|
2159
|
+
var mi = [
|
|
2123
2160
|
"y",
|
|
2124
2161
|
"Y",
|
|
2125
2162
|
"yes",
|
|
@@ -2136,16 +2173,16 @@ var fi = [
|
|
|
2136
2173
|
"off",
|
|
2137
2174
|
"Off",
|
|
2138
2175
|
"OFF"
|
|
2139
|
-
],
|
|
2140
|
-
function
|
|
2176
|
+
], gi = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2177
|
+
function yi(e, n) {
|
|
2141
2178
|
var t, r, o, a, i, s, l;
|
|
2142
2179
|
if (n === null)
|
|
2143
2180
|
return {};
|
|
2144
2181
|
for (t = {}, r = Object.keys(n), o = 0, a = r.length; o < a; o += 1)
|
|
2145
|
-
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l &&
|
|
2182
|
+
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l && Wn.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[i] = s;
|
|
2146
2183
|
return t;
|
|
2147
2184
|
}
|
|
2148
|
-
function
|
|
2185
|
+
function hi(e) {
|
|
2149
2186
|
var n, t, r;
|
|
2150
2187
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2151
2188
|
t = "x", r = 2;
|
|
@@ -2155,24 +2192,24 @@ function yi(e) {
|
|
|
2155
2192
|
t = "U", r = 8;
|
|
2156
2193
|
else
|
|
2157
2194
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2158
|
-
return "\\" + t +
|
|
2195
|
+
return "\\" + t + se.repeat("0", r - n.length) + n;
|
|
2159
2196
|
}
|
|
2160
|
-
var
|
|
2161
|
-
function
|
|
2162
|
-
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2197
|
+
var vi = 1, Ye = 2;
|
|
2198
|
+
function bi(e) {
|
|
2199
|
+
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = yi(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 === '"' ? Ye : vi, 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;
|
|
2163
2200
|
}
|
|
2164
|
-
function
|
|
2165
|
-
for (var t =
|
|
2201
|
+
function Xt(e, n) {
|
|
2202
|
+
for (var t = se.repeat(" ", n), r = 0, o = -1, a = "", i, s = e.length; r < s; )
|
|
2166
2203
|
o = e.indexOf(`
|
|
2167
2204
|
`, r), o === -1 ? (i = e.slice(r), r = s) : (i = e.slice(r, o + 1), r = o + 1), i.length && i !== `
|
|
2168
2205
|
` && (a += t), a += i;
|
|
2169
2206
|
return a;
|
|
2170
2207
|
}
|
|
2171
|
-
function
|
|
2208
|
+
function kt(e, n) {
|
|
2172
2209
|
return `
|
|
2173
|
-
` +
|
|
2210
|
+
` + se.repeat(" ", e.indent * n);
|
|
2174
2211
|
}
|
|
2175
|
-
function
|
|
2212
|
+
function ki(e, n) {
|
|
2176
2213
|
var t, r, o;
|
|
2177
2214
|
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2178
2215
|
if (o = e.implicitTypes[t], o.resolve(n))
|
|
@@ -2180,71 +2217,71 @@ function bi(e, n) {
|
|
|
2180
2217
|
return !1;
|
|
2181
2218
|
}
|
|
2182
2219
|
function lt(e) {
|
|
2183
|
-
return e ===
|
|
2220
|
+
return e === ei || e === Qa;
|
|
2184
2221
|
}
|
|
2185
2222
|
function Ze(e) {
|
|
2186
2223
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2187
2224
|
}
|
|
2188
|
-
function
|
|
2189
|
-
return Ze(e) && e !== Et && e !==
|
|
2225
|
+
function en(e) {
|
|
2226
|
+
return Ze(e) && e !== Et && e !== Xa && e !== We;
|
|
2190
2227
|
}
|
|
2191
|
-
function
|
|
2192
|
-
var r =
|
|
2228
|
+
function tn(e, n, t) {
|
|
2229
|
+
var r = en(e), o = r && !lt(e);
|
|
2193
2230
|
return (
|
|
2194
2231
|
// ns-plain-safe
|
|
2195
2232
|
(t ? (
|
|
2196
2233
|
// c = flow-in
|
|
2197
2234
|
r
|
|
2198
|
-
) : r && e !==
|
|
2235
|
+
) : r && e !== Yn && e !== Zn && e !== Qn && e !== Xn && e !== er) && e !== bt && !(n === st && !o) || en(n) && !lt(n) && e === bt || n === st && o
|
|
2199
2236
|
);
|
|
2200
2237
|
}
|
|
2201
2238
|
function Ci(e) {
|
|
2202
|
-
return Ze(e) && e !== Et && !lt(e) && e !==
|
|
2239
|
+
return Ze(e) && e !== Et && !lt(e) && e !== si && e !== ci && e !== st && e !== Yn && e !== Zn && e !== Qn && e !== Xn && e !== er && e !== bt && e !== oi && e !== ii && e !== ti && e !== fi && e !== li && e !== ui && e !== ai && e !== ni && e !== ri && e !== di && e !== pi;
|
|
2203
2240
|
}
|
|
2204
|
-
function
|
|
2241
|
+
function _i(e) {
|
|
2205
2242
|
return !lt(e) && e !== st;
|
|
2206
2243
|
}
|
|
2207
|
-
function
|
|
2244
|
+
function ze(e, n) {
|
|
2208
2245
|
var t = e.charCodeAt(n), r;
|
|
2209
2246
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2210
2247
|
}
|
|
2211
|
-
function
|
|
2248
|
+
function tr(e) {
|
|
2212
2249
|
var n = /^\n* /;
|
|
2213
2250
|
return n.test(e);
|
|
2214
2251
|
}
|
|
2215
|
-
var
|
|
2216
|
-
function
|
|
2217
|
-
var l, c = 0, d = null, u = !1,
|
|
2252
|
+
var nr = 1, Ct = 2, rr = 3, or = 4, Le = 5;
|
|
2253
|
+
function wi(e, n, t, r, o, a, i, s) {
|
|
2254
|
+
var l, c = 0, d = null, u = !1, m = !1, f = r !== -1, I = -1, v = Ci(ze(e, 0)) && _i(ze(e, e.length - 1));
|
|
2218
2255
|
if (n || i)
|
|
2219
2256
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2220
|
-
if (c =
|
|
2257
|
+
if (c = ze(e, l), !Ze(c))
|
|
2221
2258
|
return Le;
|
|
2222
|
-
v = v &&
|
|
2259
|
+
v = v && tn(c, d, s), d = c;
|
|
2223
2260
|
}
|
|
2224
2261
|
else {
|
|
2225
2262
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2226
|
-
if (c =
|
|
2227
|
-
u = !0, f && (
|
|
2263
|
+
if (c = ze(e, l), c === We)
|
|
2264
|
+
u = !0, f && (m = m || // Foldable line = too long, and not more-indented.
|
|
2228
2265
|
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2229
2266
|
else if (!Ze(c))
|
|
2230
2267
|
return Le;
|
|
2231
|
-
v = v &&
|
|
2268
|
+
v = v && tn(c, d, s), d = c;
|
|
2232
2269
|
}
|
|
2233
|
-
|
|
2270
|
+
m = m || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2234
2271
|
}
|
|
2235
|
-
return !u && !
|
|
2272
|
+
return !u && !m ? v && !i && !o(e) ? nr : a === Ye ? Le : Ct : t > 9 && tr(e) ? Le : i ? a === Ye ? Le : Ct : m ? or : rr;
|
|
2236
2273
|
}
|
|
2237
|
-
function
|
|
2274
|
+
function Ii(e, n, t, r, o) {
|
|
2238
2275
|
e.dump = function() {
|
|
2239
2276
|
if (n.length === 0)
|
|
2240
2277
|
return e.quotingType === Ye ? '""' : "''";
|
|
2241
|
-
if (!e.noCompatMode && (
|
|
2278
|
+
if (!e.noCompatMode && (mi.indexOf(n) !== -1 || gi.test(n)))
|
|
2242
2279
|
return e.quotingType === Ye ? '"' + n + '"' : "'" + n + "'";
|
|
2243
2280
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2244
2281
|
function l(c) {
|
|
2245
|
-
return
|
|
2282
|
+
return ki(e, c);
|
|
2246
2283
|
}
|
|
2247
|
-
switch (
|
|
2284
|
+
switch (wi(
|
|
2248
2285
|
n,
|
|
2249
2286
|
s,
|
|
2250
2287
|
e.indent,
|
|
@@ -2254,14 +2291,14 @@ function wi(e, n, t, r, o) {
|
|
|
2254
2291
|
e.forceQuotes && !r,
|
|
2255
2292
|
o
|
|
2256
2293
|
)) {
|
|
2257
|
-
case
|
|
2294
|
+
case nr:
|
|
2258
2295
|
return n;
|
|
2259
|
-
case
|
|
2296
|
+
case Ct:
|
|
2260
2297
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2261
|
-
case
|
|
2262
|
-
return "|" +
|
|
2263
|
-
case
|
|
2264
|
-
return ">" +
|
|
2298
|
+
case rr:
|
|
2299
|
+
return "|" + nn(n, e.indent) + rn(Xt(n, a));
|
|
2300
|
+
case or:
|
|
2301
|
+
return ">" + nn(n, e.indent) + rn(Xt(xi(n, i), a));
|
|
2265
2302
|
case Le:
|
|
2266
2303
|
return '"' + Ai(n) + '"';
|
|
2267
2304
|
default:
|
|
@@ -2269,32 +2306,32 @@ function wi(e, n, t, r, o) {
|
|
|
2269
2306
|
}
|
|
2270
2307
|
}();
|
|
2271
2308
|
}
|
|
2272
|
-
function
|
|
2273
|
-
var t =
|
|
2309
|
+
function nn(e, n) {
|
|
2310
|
+
var t = tr(e) ? String(n) : "", r = e[e.length - 1] === `
|
|
2274
2311
|
`, o = r && (e[e.length - 2] === `
|
|
2275
2312
|
` || e === `
|
|
2276
2313
|
`), a = o ? "+" : r ? "" : "-";
|
|
2277
2314
|
return t + a + `
|
|
2278
2315
|
`;
|
|
2279
2316
|
}
|
|
2280
|
-
function
|
|
2317
|
+
function rn(e) {
|
|
2281
2318
|
return e[e.length - 1] === `
|
|
2282
2319
|
` ? e.slice(0, -1) : e;
|
|
2283
2320
|
}
|
|
2284
|
-
function
|
|
2321
|
+
function xi(e, n) {
|
|
2285
2322
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2286
2323
|
var c = e.indexOf(`
|
|
2287
2324
|
`);
|
|
2288
|
-
return c = c !== -1 ? c : e.length, t.lastIndex = c,
|
|
2325
|
+
return c = c !== -1 ? c : e.length, t.lastIndex = c, on(e.slice(0, c), n);
|
|
2289
2326
|
}(), o = e[0] === `
|
|
2290
2327
|
` || e[0] === " ", a, i; i = t.exec(e); ) {
|
|
2291
2328
|
var s = i[1], l = i[2];
|
|
2292
2329
|
a = l[0] === " ", r += s + (!o && !a && l !== "" ? `
|
|
2293
|
-
` : "") +
|
|
2330
|
+
` : "") + on(l, n), o = a;
|
|
2294
2331
|
}
|
|
2295
2332
|
return r;
|
|
2296
2333
|
}
|
|
2297
|
-
function
|
|
2334
|
+
function on(e, n) {
|
|
2298
2335
|
if (e === "" || e[0] === " ")
|
|
2299
2336
|
return e;
|
|
2300
2337
|
for (var t = / [^ ]/g, r, o = 0, a, i = 0, s = 0, l = ""; r = t.exec(e); )
|
|
@@ -2306,29 +2343,29 @@ function ln(e, n) {
|
|
|
2306
2343
|
}
|
|
2307
2344
|
function Ai(e) {
|
|
2308
2345
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2309
|
-
t =
|
|
2346
|
+
t = ze(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || hi(t);
|
|
2310
2347
|
return n;
|
|
2311
2348
|
}
|
|
2312
2349
|
function Si(e, n, t) {
|
|
2313
2350
|
var r = "", o = e.tag, a, i, s;
|
|
2314
2351
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2315
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2352
|
+
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (Ae(e, n, s, !1, !1) || typeof s > "u" && Ae(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2316
2353
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2317
2354
|
}
|
|
2318
|
-
function
|
|
2355
|
+
function an(e, n, t, r) {
|
|
2319
2356
|
var o = "", a = e.tag, i, s, l;
|
|
2320
2357
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2321
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2358
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Ae(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Ae(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += kt(e, n)), e.dump && We === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2322
2359
|
e.tag = a, e.dump = o || "[]";
|
|
2323
2360
|
}
|
|
2324
|
-
function
|
|
2361
|
+
function Ti(e, n, t) {
|
|
2325
2362
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2326
2363
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2327
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)),
|
|
2364
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), Ae(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Ae(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2328
2365
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2329
2366
|
}
|
|
2330
|
-
function
|
|
2331
|
-
var o = "", a = e.tag, i = Object.keys(t), s, l, c, d, u,
|
|
2367
|
+
function $i(e, n, t, r) {
|
|
2368
|
+
var o = "", a = e.tag, i = Object.keys(t), s, l, c, d, u, m;
|
|
2332
2369
|
if (e.sortKeys === !0)
|
|
2333
2370
|
i.sort();
|
|
2334
2371
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2336,17 +2373,17 @@ function Ti(e, n, t, r) {
|
|
|
2336
2373
|
else if (e.sortKeys)
|
|
2337
2374
|
throw new me("sortKeys must be a boolean or a function");
|
|
2338
2375
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2339
|
-
|
|
2376
|
+
m = "", (!r || o !== "") && (m += kt(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), Ae(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && We === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, u && (m += kt(e, n)), Ae(e, n + 1, d, !0, u) && (e.dump && We === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, o += m));
|
|
2340
2377
|
e.tag = a, e.dump = o || "{}";
|
|
2341
2378
|
}
|
|
2342
|
-
function
|
|
2379
|
+
function sn(e, n, t) {
|
|
2343
2380
|
var r, o, a, i, s, l;
|
|
2344
2381
|
for (o = t ? e.explicitTypes : e.implicitTypes, a = 0, i = o.length; a < i; a += 1)
|
|
2345
2382
|
if (s = o[a], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof n == "object" && n instanceof s.instanceOf) && (!s.predicate || s.predicate(n))) {
|
|
2346
2383
|
if (t ? s.multi && s.representName ? e.tag = s.representName(n) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2347
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2384
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Jn.call(s.represent) === "[object Function]")
|
|
2348
2385
|
r = s.represent(n, l);
|
|
2349
|
-
else if (
|
|
2386
|
+
else if (Wn.call(s.represent, l))
|
|
2350
2387
|
r = s.represent[l](n, l);
|
|
2351
2388
|
else
|
|
2352
2389
|
throw new me("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2356,20 +2393,20 @@ function cn(e, n, t) {
|
|
|
2356
2393
|
}
|
|
2357
2394
|
return !1;
|
|
2358
2395
|
}
|
|
2359
|
-
function
|
|
2360
|
-
e.tag = null, e.dump = t,
|
|
2361
|
-
var s =
|
|
2396
|
+
function Ae(e, n, t, r, o, a, i) {
|
|
2397
|
+
e.tag = null, e.dump = t, sn(e, t, !1) || sn(e, t, !0);
|
|
2398
|
+
var s = Jn.call(e.dump), l = r, c;
|
|
2362
2399
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
2363
|
-
var d = s === "[object Object]" || s === "[object Array]", u,
|
|
2364
|
-
if (d && (u = e.duplicates.indexOf(t),
|
|
2400
|
+
var d = s === "[object Object]" || s === "[object Array]", u, m;
|
|
2401
|
+
if (d && (u = e.duplicates.indexOf(t), m = u !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && n > 0) && (o = !1), m && e.usedDuplicates[u])
|
|
2365
2402
|
e.dump = "*ref_" + u;
|
|
2366
2403
|
else {
|
|
2367
|
-
if (d &&
|
|
2368
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2404
|
+
if (d && m && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2405
|
+
r && Object.keys(e.dump).length !== 0 ? ($i(e, n, e.dump, o), m && (e.dump = "&ref_" + u + e.dump)) : (Ti(e, n, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2369
2406
|
else if (s === "[object Array]")
|
|
2370
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ?
|
|
2407
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? an(e, n - 1, e.dump, o) : an(e, n, e.dump, o), m && (e.dump = "&ref_" + u + e.dump)) : (Si(e, n, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2371
2408
|
else if (s === "[object String]")
|
|
2372
|
-
e.tag !== "?" &&
|
|
2409
|
+
e.tag !== "?" && Ii(e, e.dump, n, a, l);
|
|
2373
2410
|
else {
|
|
2374
2411
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2375
2412
|
return !1;
|
|
@@ -2381,7 +2418,7 @@ function Se(e, n, t, r, o, a, i) {
|
|
|
2381
2418
|
}
|
|
2382
2419
|
return !0;
|
|
2383
2420
|
}
|
|
2384
|
-
function
|
|
2421
|
+
function Mi(e, n) {
|
|
2385
2422
|
var t = [], r = [], o, a;
|
|
2386
2423
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2387
2424
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2399,65 +2436,65 @@ function _t(e, n, t) {
|
|
|
2399
2436
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2400
2437
|
_t(e[r[o]], n, t);
|
|
2401
2438
|
}
|
|
2402
|
-
function
|
|
2439
|
+
function ji(e, n) {
|
|
2403
2440
|
n = n || {};
|
|
2404
|
-
var t = new
|
|
2405
|
-
t.noRefs ||
|
|
2441
|
+
var t = new bi(n);
|
|
2442
|
+
t.noRefs || Mi(e, t);
|
|
2406
2443
|
var r = e;
|
|
2407
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2444
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Ae(t, 0, r, !0, !0) ? t.dump + `
|
|
2408
2445
|
` : "";
|
|
2409
2446
|
}
|
|
2410
|
-
var
|
|
2411
|
-
dump:
|
|
2447
|
+
var Ei = ji, Oi = {
|
|
2448
|
+
dump: Ei
|
|
2412
2449
|
};
|
|
2413
2450
|
function Ot(e, n) {
|
|
2414
2451
|
return function() {
|
|
2415
2452
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2416
2453
|
};
|
|
2417
2454
|
}
|
|
2418
|
-
var
|
|
2419
|
-
binary:
|
|
2420
|
-
float:
|
|
2421
|
-
map:
|
|
2422
|
-
null:
|
|
2423
|
-
pairs:
|
|
2424
|
-
set:
|
|
2425
|
-
timestamp:
|
|
2426
|
-
bool:
|
|
2427
|
-
int:
|
|
2428
|
-
merge:
|
|
2429
|
-
omap:
|
|
2430
|
-
seq:
|
|
2431
|
-
str:
|
|
2432
|
-
},
|
|
2433
|
-
Type:
|
|
2455
|
+
var Ki = de, Fi = kn, Ni = In, Bi = $n, Pi = Mn, Li = $t, qi = Hn.load, Ui = Hn.loadAll, Ri = Oi.dump, Vi = me, Di = {
|
|
2456
|
+
binary: Fn,
|
|
2457
|
+
float: Tn,
|
|
2458
|
+
map: wn,
|
|
2459
|
+
null: xn,
|
|
2460
|
+
pairs: Bn,
|
|
2461
|
+
set: Pn,
|
|
2462
|
+
timestamp: On,
|
|
2463
|
+
bool: An,
|
|
2464
|
+
int: Sn,
|
|
2465
|
+
merge: Kn,
|
|
2466
|
+
omap: Nn,
|
|
2467
|
+
seq: _n,
|
|
2468
|
+
str: Cn
|
|
2469
|
+
}, Gi = Ot("safeLoad", "load"), zi = Ot("safeLoadAll", "loadAll"), Hi = Ot("safeDump", "dump"), Ji = {
|
|
2470
|
+
Type: Ki,
|
|
2434
2471
|
Schema: Fi,
|
|
2435
|
-
FAILSAFE_SCHEMA:
|
|
2472
|
+
FAILSAFE_SCHEMA: Ni,
|
|
2436
2473
|
JSON_SCHEMA: Bi,
|
|
2437
|
-
CORE_SCHEMA:
|
|
2438
|
-
DEFAULT_SCHEMA:
|
|
2439
|
-
load:
|
|
2474
|
+
CORE_SCHEMA: Pi,
|
|
2475
|
+
DEFAULT_SCHEMA: Li,
|
|
2476
|
+
load: qi,
|
|
2440
2477
|
loadAll: Ui,
|
|
2441
|
-
dump:
|
|
2442
|
-
YAMLException:
|
|
2443
|
-
types:
|
|
2444
|
-
safeLoad:
|
|
2445
|
-
safeLoadAll:
|
|
2478
|
+
dump: Ri,
|
|
2479
|
+
YAMLException: Vi,
|
|
2480
|
+
types: Di,
|
|
2481
|
+
safeLoad: Gi,
|
|
2482
|
+
safeLoadAll: zi,
|
|
2446
2483
|
safeDump: Hi
|
|
2447
2484
|
};
|
|
2448
|
-
const
|
|
2485
|
+
const Wi = {
|
|
2449
2486
|
key: 0,
|
|
2450
2487
|
class: "config-card-display-form"
|
|
2451
|
-
},
|
|
2488
|
+
}, Yi = ["data-testid"], Zi = {
|
|
2452
2489
|
key: 0,
|
|
2453
2490
|
class: "config-card-prop-section-title"
|
|
2454
|
-
},
|
|
2491
|
+
}, Qi = {
|
|
2455
2492
|
key: 1,
|
|
2456
2493
|
class: "config-card-display-json"
|
|
2457
|
-
},
|
|
2494
|
+
}, Xi = {
|
|
2458
2495
|
key: 2,
|
|
2459
2496
|
class: "config-card-display-yaml"
|
|
2460
|
-
},
|
|
2497
|
+
}, es = /* @__PURE__ */ ae({
|
|
2461
2498
|
__name: "ConfigCardDisplay",
|
|
2462
2499
|
props: {
|
|
2463
2500
|
propertyCollections: {
|
|
@@ -2483,30 +2520,30 @@ const Ji = {
|
|
|
2483
2520
|
}
|
|
2484
2521
|
},
|
|
2485
2522
|
setup(e) {
|
|
2486
|
-
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a =
|
|
2487
|
-
return
|
|
2488
|
-
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value =
|
|
2523
|
+
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = O(""), i = O("");
|
|
2524
|
+
return Se(() => n.format, (s) => {
|
|
2525
|
+
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = Ji.dump(n.record));
|
|
2489
2526
|
}, { immediate: !0 }), (s, l) => {
|
|
2490
|
-
const c =
|
|
2491
|
-
return
|
|
2492
|
-
e.format === "structured" ? (
|
|
2493
|
-
(
|
|
2527
|
+
const c = q("KCodeBlock");
|
|
2528
|
+
return g(), j(ve, null, [
|
|
2529
|
+
e.format === "structured" ? (g(), j("div", Wi, [
|
|
2530
|
+
(g(!0), j(ve, null, ye(e.propListTypes, (d) => (g(), j("div", {
|
|
2494
2531
|
key: `config-card-details-${d}-props`,
|
|
2495
|
-
class:
|
|
2532
|
+
class: Fe(`config-card-details-${d}-props`),
|
|
2496
2533
|
"data-testid": `config-card-details-${d}-props`
|
|
2497
2534
|
}, [
|
|
2498
|
-
d !== "basic" ? (
|
|
2499
|
-
(
|
|
2535
|
+
d !== "basic" ? (g(), j("div", Zi, K(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2536
|
+
(g(!0), j(ve, null, ye(e.propertyCollections[d], (u) => (g(), V(St, {
|
|
2500
2537
|
key: u.key,
|
|
2501
2538
|
item: u
|
|
2502
2539
|
}, Te({
|
|
2503
2540
|
label: h(() => [
|
|
2504
2541
|
Y(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2505
2542
|
]),
|
|
2506
|
-
[u.key]: h(({ rowValue:
|
|
2543
|
+
[u.key]: h(({ rowValue: m }) => [
|
|
2507
2544
|
Y(s.$slots, u.key, {
|
|
2508
2545
|
row: u,
|
|
2509
|
-
rowValue:
|
|
2546
|
+
rowValue: m
|
|
2510
2547
|
}, void 0, !0)
|
|
2511
2548
|
]),
|
|
2512
2549
|
_: 2
|
|
@@ -2519,39 +2556,39 @@ const Ji = {
|
|
|
2519
2556
|
key: "0"
|
|
2520
2557
|
} : void 0
|
|
2521
2558
|
]), 1032, ["item"]))), 128))
|
|
2522
|
-
], 10,
|
|
2523
|
-
])) :
|
|
2524
|
-
e.format === "json" ? (
|
|
2525
|
-
|
|
2559
|
+
], 10, Yi))), 128))
|
|
2560
|
+
])) : G("", !0),
|
|
2561
|
+
e.format === "json" ? (g(), j("div", Qi, [
|
|
2562
|
+
F(c, {
|
|
2526
2563
|
id: "config-card-codeblock",
|
|
2527
2564
|
code: a.value,
|
|
2528
2565
|
language: "json",
|
|
2529
2566
|
theme: "dark"
|
|
2530
2567
|
}, null, 8, ["code"])
|
|
2531
|
-
])) :
|
|
2532
|
-
e.format === "yaml" ? (
|
|
2533
|
-
|
|
2568
|
+
])) : G("", !0),
|
|
2569
|
+
e.format === "yaml" ? (g(), j("div", Xi, [
|
|
2570
|
+
F(c, {
|
|
2534
2571
|
id: "config-card-codeblock",
|
|
2535
2572
|
code: i.value,
|
|
2536
2573
|
language: "yaml",
|
|
2537
2574
|
theme: "dark"
|
|
2538
2575
|
}, null, 8, ["code"])
|
|
2539
|
-
])) :
|
|
2576
|
+
])) : G("", !0)
|
|
2540
2577
|
], 64);
|
|
2541
2578
|
};
|
|
2542
2579
|
}
|
|
2543
|
-
}),
|
|
2580
|
+
}), ts = /* @__PURE__ */ Ce(es, [["__scopeId", "data-v-6c45e9e4"]]), ln = "24px", ns = (e, n) => {
|
|
2544
2581
|
const t = e.__vccOpts || e;
|
|
2545
2582
|
for (const [r, o] of n)
|
|
2546
2583
|
t[r] = o;
|
|
2547
2584
|
return t;
|
|
2548
|
-
},
|
|
2585
|
+
}, rs = (e) => (yr("data-v-dd88a2bb"), e = e(), hr(), e), os = ["aria-hidden"], as = {
|
|
2549
2586
|
key: 0,
|
|
2550
2587
|
"data-testid": "kui-icon-svg-title"
|
|
2551
|
-
},
|
|
2588
|
+
}, is = /* @__PURE__ */ rs(() => /* @__PURE__ */ R("path", {
|
|
2552
2589
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2553
2590
|
fill: "currentColor"
|
|
2554
|
-
}, null, -1)),
|
|
2591
|
+
}, null, -1)), ss = /* @__PURE__ */ ae({
|
|
2555
2592
|
__name: "BookIcon",
|
|
2556
2593
|
props: {
|
|
2557
2594
|
/** The accessibility text provided to screen readers */
|
|
@@ -2582,7 +2619,7 @@ const Ji = {
|
|
|
2582
2619
|
size: {
|
|
2583
2620
|
type: [Number, String],
|
|
2584
2621
|
required: !1,
|
|
2585
|
-
default:
|
|
2622
|
+
default: ln,
|
|
2586
2623
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2587
2624
|
validator: (e) => {
|
|
2588
2625
|
if (typeof e == "number" && e > 0)
|
|
@@ -2603,7 +2640,7 @@ const Ji = {
|
|
|
2603
2640
|
}
|
|
2604
2641
|
},
|
|
2605
2642
|
setup(e) {
|
|
2606
|
-
const n = e, t =
|
|
2643
|
+
const n = e, t = M(() => {
|
|
2607
2644
|
if (typeof n.size == "number" && n.size > 0)
|
|
2608
2645
|
return `${n.size}px`;
|
|
2609
2646
|
if (typeof n.size == "string") {
|
|
@@ -2611,8 +2648,8 @@ const Ji = {
|
|
|
2611
2648
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2612
2649
|
return `${a}px`;
|
|
2613
2650
|
}
|
|
2614
|
-
return
|
|
2615
|
-
}), r =
|
|
2651
|
+
return ln;
|
|
2652
|
+
}), r = M(() => ({
|
|
2616
2653
|
boxSizing: "border-box",
|
|
2617
2654
|
color: n.color,
|
|
2618
2655
|
display: n.display,
|
|
@@ -2620,14 +2657,14 @@ const Ji = {
|
|
|
2620
2657
|
lineHeight: "0",
|
|
2621
2658
|
width: t.value
|
|
2622
2659
|
}));
|
|
2623
|
-
return (o, a) => (
|
|
2660
|
+
return (o, a) => (g(), V(He(e.as), {
|
|
2624
2661
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2625
2662
|
class: "kui-icon book-icon",
|
|
2626
2663
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2627
|
-
style:
|
|
2664
|
+
style: mr(r.value)
|
|
2628
2665
|
}, {
|
|
2629
2666
|
default: h(() => [
|
|
2630
|
-
(
|
|
2667
|
+
(g(), j("svg", {
|
|
2631
2668
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2632
2669
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2633
2670
|
fill: "none",
|
|
@@ -2637,23 +2674,23 @@ const Ji = {
|
|
|
2637
2674
|
width: "100%",
|
|
2638
2675
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2639
2676
|
}, [
|
|
2640
|
-
e.title ? (
|
|
2641
|
-
|
|
2642
|
-
], 8,
|
|
2677
|
+
e.title ? (g(), j("title", as, K(e.title), 1)) : G("", !0),
|
|
2678
|
+
is
|
|
2679
|
+
], 8, os))
|
|
2643
2680
|
]),
|
|
2644
2681
|
_: 1
|
|
2645
2682
|
}, 8, ["aria-hidden", "style"]));
|
|
2646
2683
|
}
|
|
2647
|
-
}),
|
|
2684
|
+
}), ls = /* @__PURE__ */ ns(ss, [["__scopeId", "data-v-dd88a2bb"]]), us = { "data-testid": "config-card-title" }, cs = { class: "config-card-actions" }, ds = ["href"], ps = {
|
|
2648
2685
|
key: 2,
|
|
2649
2686
|
class: "config-card-details-section"
|
|
2650
|
-
},
|
|
2687
|
+
}, fs = {
|
|
2651
2688
|
key: 3,
|
|
2652
2689
|
class: "config-card-details-section"
|
|
2653
|
-
},
|
|
2690
|
+
}, ms = ["data-testid"], gs = {
|
|
2654
2691
|
key: 0,
|
|
2655
2692
|
class: "config-card-prop-section-title"
|
|
2656
|
-
},
|
|
2693
|
+
}, ys = /* @__PURE__ */ ae({
|
|
2657
2694
|
__name: "EntityBaseConfigCard",
|
|
2658
2695
|
props: {
|
|
2659
2696
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2744,9 +2781,9 @@ const Ji = {
|
|
|
2744
2781
|
label: "YAML",
|
|
2745
2782
|
value: "yaml"
|
|
2746
2783
|
}
|
|
2747
|
-
], d =
|
|
2784
|
+
], d = O("structured"), u = (w) => {
|
|
2748
2785
|
d.value = w == null ? void 0 : w.value;
|
|
2749
|
-
},
|
|
2786
|
+
}, m = {
|
|
2750
2787
|
id: {
|
|
2751
2788
|
type: te.ID,
|
|
2752
2789
|
label: a("baseConfigCard.commonFields.id_label"),
|
|
@@ -2780,46 +2817,46 @@ const Ji = {
|
|
|
2780
2817
|
// the last property displayed
|
|
2781
2818
|
section: be.Basic
|
|
2782
2819
|
}
|
|
2783
|
-
}, f =
|
|
2784
|
-
var w,
|
|
2820
|
+
}, f = O(!1), I = O(!1), v = O(""), p = O(), A = M(() => {
|
|
2821
|
+
var w, N, B;
|
|
2785
2822
|
if (!p.value)
|
|
2786
2823
|
return [];
|
|
2787
|
-
const
|
|
2824
|
+
const C = [], S = Object.keys(p.value).length;
|
|
2788
2825
|
for (const T in p.value) {
|
|
2789
|
-
const P = (
|
|
2790
|
-
let Q =
|
|
2791
|
-
(J || J === 0) && (Q = J === -1 ?
|
|
2826
|
+
const P = (N = (w = r.configSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = (B = m[T]) == null ? void 0 : B.order;
|
|
2827
|
+
let Q = S;
|
|
2828
|
+
(J || J === 0) && (Q = J === -1 ? S + 1 : J), P && (Q = P === -1 ? S + 1 : P), C.push([T, Q]);
|
|
2792
2829
|
}
|
|
2793
|
-
return
|
|
2830
|
+
return C.sort(function(T, P) {
|
|
2794
2831
|
return T[1] - P[1];
|
|
2795
|
-
}),
|
|
2832
|
+
}), C.map((T) => {
|
|
2796
2833
|
var P, J;
|
|
2797
|
-
const Q = T[0], X = (P = p.value) == null ? void 0 : P[Q], ee = ((J = r.configSchema) == null ? void 0 : J[Q]) || {},
|
|
2834
|
+
const Q = T[0], X = (P = p.value) == null ? void 0 : P[Q], ee = ((J = r.configSchema) == null ? void 0 : J[Q]) || {}, ie = m[Q];
|
|
2798
2835
|
return {
|
|
2799
2836
|
key: Q,
|
|
2800
2837
|
value: X,
|
|
2801
2838
|
hidden: ee.hidden || !1,
|
|
2802
|
-
type: ee.type ?? ((
|
|
2803
|
-
label: ee.label ?? ((
|
|
2804
|
-
tooltip: ee.tooltip ?? ((
|
|
2805
|
-
section: ee.section ?? ((
|
|
2839
|
+
type: ee.type ?? ((ie == null ? void 0 : ie.type) || te.Text),
|
|
2840
|
+
label: ee.label ?? ((ie == null ? void 0 : ie.label) || s(Q)),
|
|
2841
|
+
tooltip: ee.tooltip ?? ((ie == null ? void 0 : ie.tooltip) || void 0),
|
|
2842
|
+
section: ee.section ?? ((ie == null ? void 0 : ie.section) || be.Advanced)
|
|
2806
2843
|
};
|
|
2807
2844
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
2808
|
-
}), b =
|
|
2809
|
-
var w,
|
|
2845
|
+
}), b = M(() => {
|
|
2846
|
+
var w, N;
|
|
2810
2847
|
if (!p.value || !r.pluginConfigKey)
|
|
2811
2848
|
return [];
|
|
2812
|
-
const
|
|
2813
|
-
for (const T in
|
|
2814
|
-
const P = (
|
|
2815
|
-
let Q = J != null && J !== "" ?
|
|
2816
|
-
P && (Q = P === -1 ?
|
|
2849
|
+
const B = p.value[r.pluginConfigKey] || {}, C = Object.keys(B).length, S = [];
|
|
2850
|
+
for (const T in B) {
|
|
2851
|
+
const P = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = B[T];
|
|
2852
|
+
let Q = J != null && J !== "" ? C - 1 : C;
|
|
2853
|
+
P && (Q = P === -1 ? C + 1 : P), S.push([T, Q]);
|
|
2817
2854
|
}
|
|
2818
|
-
return
|
|
2855
|
+
return S.sort(function(T, P) {
|
|
2819
2856
|
return T[1] - P[1];
|
|
2820
|
-
}),
|
|
2857
|
+
}), S.map((T) => {
|
|
2821
2858
|
var P;
|
|
2822
|
-
const J = T[0], Q =
|
|
2859
|
+
const J = T[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2823
2860
|
return {
|
|
2824
2861
|
key: J,
|
|
2825
2862
|
value: Q,
|
|
@@ -2830,24 +2867,24 @@ const Ji = {
|
|
|
2830
2867
|
section: be.Plugin
|
|
2831
2868
|
};
|
|
2832
2869
|
}).filter((T) => !T.hidden);
|
|
2833
|
-
}),
|
|
2834
|
-
var w,
|
|
2870
|
+
}), k = M(() => {
|
|
2871
|
+
var w, N, B, C;
|
|
2835
2872
|
return {
|
|
2836
|
-
basic: (w =
|
|
2837
|
-
advanced: (
|
|
2838
|
-
plugin: (
|
|
2873
|
+
basic: (w = A.value) == null ? void 0 : w.filter((S) => S.section === be.Basic),
|
|
2874
|
+
advanced: (N = A.value) == null ? void 0 : N.filter((S) => S.section === be.Advanced),
|
|
2875
|
+
plugin: (C = b.value) == null ? void 0 : C.concat((B = A.value) == null ? void 0 : B.filter((S) => S.section === be.Plugin))
|
|
2839
2876
|
};
|
|
2840
|
-
}),
|
|
2877
|
+
}), x = M(() => {
|
|
2841
2878
|
const w = [];
|
|
2842
|
-
return
|
|
2843
|
-
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe =
|
|
2844
|
-
var w,
|
|
2845
|
-
let
|
|
2846
|
-
return r.config.app === "konnect" ?
|
|
2879
|
+
return k.value.basic.length && w.push("basic"), k.value.advanced.length && w.push("advanced"), k.value.plugin.length && w.push("plugin"), w;
|
|
2880
|
+
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe = M(() => {
|
|
2881
|
+
var w, N;
|
|
2882
|
+
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2883
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2847
2884
|
}), z = (w) => {
|
|
2848
2885
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2849
2886
|
};
|
|
2850
|
-
return
|
|
2887
|
+
return Se(f, (w) => {
|
|
2851
2888
|
n("loading", w);
|
|
2852
2889
|
}, { immediate: !0 }), Qe(async () => {
|
|
2853
2890
|
I.value = !1, f.value = !0;
|
|
@@ -2860,124 +2897,124 @@ const Ji = {
|
|
|
2860
2897
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2861
2898
|
else
|
|
2862
2899
|
p.value = { ...w };
|
|
2863
|
-
Object.keys(r.configSchema).filter((
|
|
2864
|
-
p.value && typeof p.value[
|
|
2900
|
+
Object.keys(r.configSchema).filter((N) => r.configSchema[N].forceShow).forEach((N) => {
|
|
2901
|
+
p.value && typeof p.value[N] > "u" && (p.value[N] = null);
|
|
2865
2902
|
}), n("fetch:success", w);
|
|
2866
2903
|
} catch (w) {
|
|
2867
|
-
const
|
|
2868
|
-
v.value =
|
|
2904
|
+
const N = i(w);
|
|
2905
|
+
v.value = N.startsWith("code") ? a("baseConfigCard.errors.load") : N, I.value = !0, n("fetch:error", w);
|
|
2869
2906
|
} finally {
|
|
2870
2907
|
f.value = !1;
|
|
2871
2908
|
}
|
|
2872
|
-
}), (w,
|
|
2873
|
-
const
|
|
2874
|
-
return
|
|
2909
|
+
}), (w, N) => {
|
|
2910
|
+
const B = q("KLabel"), C = q("KSelect"), S = q("KButton"), T = q("KClipboardProvider"), P = q("KSkeleton"), J = q("KEmptyState"), Q = q("KCard");
|
|
2911
|
+
return g(), V(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2875
2912
|
actions: h(() => [
|
|
2876
|
-
|
|
2913
|
+
R("div", cs, [
|
|
2877
2914
|
Y(w.$slots, "actions", {}, void 0, !0),
|
|
2878
|
-
e.config.jsonYamlEnabled ? (
|
|
2915
|
+
e.config.jsonYamlEnabled ? (g(), V(B, {
|
|
2879
2916
|
key: 0,
|
|
2880
2917
|
class: "config-format-select-label",
|
|
2881
2918
|
"data-testid": "config-format-select-label"
|
|
2882
2919
|
}, {
|
|
2883
2920
|
default: h(() => [
|
|
2884
|
-
Z(
|
|
2921
|
+
Z(K(e.label), 1)
|
|
2885
2922
|
]),
|
|
2886
2923
|
_: 1
|
|
2887
|
-
})) :
|
|
2888
|
-
e.config.jsonYamlEnabled ? (
|
|
2924
|
+
})) : G("", !0),
|
|
2925
|
+
e.config.jsonYamlEnabled ? (g(), V(C, {
|
|
2889
2926
|
key: 1,
|
|
2890
2927
|
appearance: "select",
|
|
2891
2928
|
"data-testid": "select-config-format",
|
|
2892
2929
|
items: c,
|
|
2893
2930
|
onChange: u
|
|
2894
|
-
})) :
|
|
2895
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (
|
|
2931
|
+
})) : G("", !0),
|
|
2932
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (g(), V(S, {
|
|
2896
2933
|
key: 2,
|
|
2897
2934
|
appearance: "btn-link",
|
|
2898
2935
|
class: "book-icon",
|
|
2899
2936
|
"data-testid": "book-icon"
|
|
2900
2937
|
}, {
|
|
2901
2938
|
default: h(() => [
|
|
2902
|
-
|
|
2939
|
+
R("a", {
|
|
2903
2940
|
href: e.configCardDoc,
|
|
2904
2941
|
rel: "noopener",
|
|
2905
2942
|
target: "_blank"
|
|
2906
2943
|
}, [
|
|
2907
|
-
|
|
2908
|
-
], 8,
|
|
2944
|
+
F(y(ls), { size: y(yo) }, null, 8, ["size"])
|
|
2945
|
+
], 8, ds)
|
|
2909
2946
|
]),
|
|
2910
2947
|
_: 1
|
|
2911
|
-
})) :
|
|
2912
|
-
e.config.jsonYamlEnabled ?
|
|
2948
|
+
})) : G("", !0),
|
|
2949
|
+
e.config.jsonYamlEnabled ? G("", !0) : (g(), V(T, { key: 3 }, {
|
|
2913
2950
|
default: h(({ copyToClipboard: X }) => [
|
|
2914
|
-
!f.value && !I.value ? (
|
|
2951
|
+
!f.value && !I.value ? (g(), V(S, {
|
|
2915
2952
|
key: 0,
|
|
2916
2953
|
appearance: "btn-link",
|
|
2917
2954
|
"data-testid": "json-copy-button",
|
|
2918
2955
|
onClick: (ee) => z(X)
|
|
2919
2956
|
}, {
|
|
2920
2957
|
default: h(() => [
|
|
2921
|
-
Z(
|
|
2958
|
+
Z(K(y(a)("baseConfigCard.actions.copy")), 1)
|
|
2922
2959
|
]),
|
|
2923
2960
|
_: 2
|
|
2924
|
-
}, 1032, ["onClick"])) :
|
|
2961
|
+
}, 1032, ["onClick"])) : G("", !0)
|
|
2925
2962
|
]),
|
|
2926
2963
|
_: 1
|
|
2927
2964
|
}))
|
|
2928
2965
|
])
|
|
2929
2966
|
]),
|
|
2930
2967
|
body: h(() => [
|
|
2931
|
-
f.value ? (
|
|
2968
|
+
f.value ? (g(), V(P, {
|
|
2932
2969
|
key: 0,
|
|
2933
2970
|
"data-testid": "config-card-loader",
|
|
2934
2971
|
"table-columns": 2,
|
|
2935
2972
|
type: "table"
|
|
2936
|
-
})) : I.value ? (
|
|
2973
|
+
})) : I.value ? (g(), V(J, {
|
|
2937
2974
|
key: 1,
|
|
2938
2975
|
"data-testid": "config-card-fetch-error",
|
|
2939
2976
|
"is-error": ""
|
|
2940
2977
|
}, {
|
|
2941
2978
|
message: h(() => [
|
|
2942
|
-
|
|
2979
|
+
R("h3", null, K(v.value), 1)
|
|
2943
2980
|
]),
|
|
2944
2981
|
_: 1
|
|
2945
|
-
})) :
|
|
2946
|
-
e.config.jsonYamlEnabled ? (
|
|
2947
|
-
|
|
2982
|
+
})) : G("", !0),
|
|
2983
|
+
e.config.jsonYamlEnabled ? (g(), j("div", ps, [
|
|
2984
|
+
F(ts, {
|
|
2948
2985
|
format: d.value,
|
|
2949
|
-
"prop-list-types":
|
|
2950
|
-
"property-collections":
|
|
2986
|
+
"prop-list-types": x.value,
|
|
2987
|
+
"property-collections": k.value,
|
|
2951
2988
|
record: p.value
|
|
2952
2989
|
}, Te({ _: 2 }, [
|
|
2953
2990
|
ye(Object.keys(w.$slots), (X) => ({
|
|
2954
2991
|
name: X,
|
|
2955
|
-
fn: h(({ row: ee, rowValue:
|
|
2992
|
+
fn: h(({ row: ee, rowValue: ie }) => [
|
|
2956
2993
|
Y(w.$slots, X, {
|
|
2957
2994
|
row: ee,
|
|
2958
|
-
rowValue:
|
|
2995
|
+
rowValue: ie
|
|
2959
2996
|
}, void 0, !0)
|
|
2960
2997
|
])
|
|
2961
2998
|
}))
|
|
2962
2999
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2963
|
-
])) : (
|
|
2964
|
-
(
|
|
3000
|
+
])) : (g(), j("div", fs, [
|
|
3001
|
+
(g(!0), j(ve, null, ye(x.value, (X) => (g(), j("div", {
|
|
2965
3002
|
key: `config-card-details-${X}-props`,
|
|
2966
|
-
class:
|
|
3003
|
+
class: Fe(`config-card-details-${X}-props`),
|
|
2967
3004
|
"data-testid": `config-card-details-${X}-props`
|
|
2968
3005
|
}, [
|
|
2969
|
-
X !== "basic" ? (
|
|
2970
|
-
(
|
|
3006
|
+
X !== "basic" ? (g(), j("div", gs, K(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3007
|
+
(g(!0), j(ve, null, ye(k.value[X], (ee) => (g(), V(St, {
|
|
2971
3008
|
key: ee.key,
|
|
2972
3009
|
item: ee
|
|
2973
3010
|
}, Te({
|
|
2974
3011
|
label: h(() => [
|
|
2975
3012
|
Y(w.$slots, `${ee.key}-label`, { row: ee }, void 0, !0)
|
|
2976
3013
|
]),
|
|
2977
|
-
[ee.key]: h(({ rowValue:
|
|
3014
|
+
[ee.key]: h(({ rowValue: ie }) => [
|
|
2978
3015
|
Y(w.$slots, ee.key, {
|
|
2979
3016
|
row: ee,
|
|
2980
|
-
rowValue:
|
|
3017
|
+
rowValue: ie
|
|
2981
3018
|
}, void 0, !0)
|
|
2982
3019
|
]),
|
|
2983
3020
|
_: 2
|
|
@@ -2990,7 +3027,7 @@ const Ji = {
|
|
|
2990
3027
|
key: "0"
|
|
2991
3028
|
} : void 0
|
|
2992
3029
|
]), 1032, ["item"]))), 128))
|
|
2993
|
-
], 10,
|
|
3030
|
+
], 10, ms))), 128))
|
|
2994
3031
|
]))
|
|
2995
3032
|
]),
|
|
2996
3033
|
_: 2
|
|
@@ -2998,9 +3035,9 @@ const Ji = {
|
|
|
2998
3035
|
e.hideTitle ? void 0 : {
|
|
2999
3036
|
name: "title",
|
|
3000
3037
|
fn: h(() => [
|
|
3001
|
-
|
|
3038
|
+
R("div", us, [
|
|
3002
3039
|
Y(w.$slots, "title", {}, () => [
|
|
3003
|
-
Z(
|
|
3040
|
+
Z(K(y(a)("baseConfigCard.title")), 1)
|
|
3004
3041
|
], !0)
|
|
3005
3042
|
])
|
|
3006
3043
|
]),
|
|
@@ -3009,10 +3046,10 @@ const Ji = {
|
|
|
3009
3046
|
]), 1024);
|
|
3010
3047
|
};
|
|
3011
3048
|
}
|
|
3012
|
-
}),
|
|
3049
|
+
}), hs = /* @__PURE__ */ Ce(ys, [["__scopeId", "data-v-64349aa2"]]), vs = ["onReset", "onSubmit"], bs = {
|
|
3013
3050
|
class: "form-actions",
|
|
3014
3051
|
"data-testid": "form-actions"
|
|
3015
|
-
},
|
|
3052
|
+
}, ks = /* @__PURE__ */ ae({
|
|
3016
3053
|
__name: "EntityBaseForm",
|
|
3017
3054
|
props: {
|
|
3018
3055
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3064,12 +3101,12 @@ const Ji = {
|
|
|
3064
3101
|
var t;
|
|
3065
3102
|
const r = e, o = wt(), { i18n: { t: a } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3066
3103
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3067
|
-
}), l =
|
|
3068
|
-
var p,
|
|
3104
|
+
}), l = O(!1), c = O(!1), d = O(""), u = M(() => r.canSubmit === !1 || r.isReadonly), m = M(() => {
|
|
3105
|
+
var p, A;
|
|
3069
3106
|
if (!r.editId)
|
|
3070
3107
|
return "";
|
|
3071
3108
|
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3072
|
-
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
3109
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3073
3110
|
}), f = () => {
|
|
3074
3111
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3075
3112
|
}, I = () => {
|
|
@@ -3077,28 +3114,28 @@ const Ji = {
|
|
|
3077
3114
|
}, v = () => {
|
|
3078
3115
|
u.value || n("submit");
|
|
3079
3116
|
};
|
|
3080
|
-
return
|
|
3117
|
+
return Se(() => l.value, (p) => {
|
|
3081
3118
|
n("loading", p);
|
|
3082
3119
|
}, { immediate: !0 }), Qe(async () => {
|
|
3083
3120
|
if (r.editId)
|
|
3084
3121
|
try {
|
|
3085
3122
|
c.value = !1, l.value = !0;
|
|
3086
|
-
const { data: p } = await s.get(
|
|
3123
|
+
const { data: p } = await s.get(m.value);
|
|
3087
3124
|
n("fetch:success", p);
|
|
3088
3125
|
} catch (p) {
|
|
3089
|
-
const
|
|
3090
|
-
d.value =
|
|
3126
|
+
const A = i(p);
|
|
3127
|
+
d.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, c.value = !0, n("fetch:error", p);
|
|
3091
3128
|
} finally {
|
|
3092
3129
|
l.value = !1;
|
|
3093
3130
|
}
|
|
3094
|
-
}), (p,
|
|
3095
|
-
const b =
|
|
3096
|
-
return
|
|
3131
|
+
}), (p, A) => {
|
|
3132
|
+
const b = q("KSkeleton"), k = q("KEmptyState"), x = q("KAlert"), ne = q("KButton"), pe = q("KCard");
|
|
3133
|
+
return g(), V(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3097
3134
|
body: h(() => [
|
|
3098
|
-
l.value ? (
|
|
3135
|
+
l.value ? (g(), V(b, {
|
|
3099
3136
|
key: 0,
|
|
3100
3137
|
type: "form"
|
|
3101
|
-
})) : c.value ? (
|
|
3138
|
+
})) : c.value ? (g(), V(k, {
|
|
3102
3139
|
key: 1,
|
|
3103
3140
|
"cta-text": y(a)("baseForm.actions.back"),
|
|
3104
3141
|
"data-testid": "form-fetch-error",
|
|
@@ -3106,58 +3143,58 @@ const Ji = {
|
|
|
3106
3143
|
"is-error": !0
|
|
3107
3144
|
}, {
|
|
3108
3145
|
message: h(() => [
|
|
3109
|
-
|
|
3146
|
+
R("h3", null, K(d.value), 1)
|
|
3110
3147
|
]),
|
|
3111
3148
|
_: 1
|
|
3112
|
-
}, 8, ["cta-text"])) : (
|
|
3149
|
+
}, 8, ["cta-text"])) : (g(), j("form", {
|
|
3113
3150
|
key: 2,
|
|
3114
3151
|
"data-testid": "form-content",
|
|
3115
3152
|
onReset: rt(I, ["prevent"]),
|
|
3116
3153
|
onSubmit: rt(v, ["prevent"])
|
|
3117
3154
|
}, [
|
|
3118
3155
|
Y(p.$slots, "default", {}, void 0, !0),
|
|
3119
|
-
e.errorMessage ? (
|
|
3156
|
+
e.errorMessage ? (g(), V(x, {
|
|
3120
3157
|
key: 0,
|
|
3121
3158
|
"alert-message": e.errorMessage,
|
|
3122
3159
|
appearance: "danger",
|
|
3123
3160
|
"data-testid": "form-error"
|
|
3124
|
-
}, null, 8, ["alert-message"])) :
|
|
3125
|
-
|
|
3161
|
+
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3162
|
+
R("div", bs, [
|
|
3126
3163
|
Y(p.$slots, "form-actions", {}, () => [
|
|
3127
|
-
|
|
3164
|
+
F(ne, {
|
|
3128
3165
|
appearance: "outline",
|
|
3129
3166
|
"data-testid": "form-cancel",
|
|
3130
3167
|
disabled: e.isReadonly,
|
|
3131
3168
|
type: "reset"
|
|
3132
3169
|
}, {
|
|
3133
3170
|
default: h(() => [
|
|
3134
|
-
Z(
|
|
3171
|
+
Z(K(y(a)("baseForm.actions.cancel")), 1)
|
|
3135
3172
|
]),
|
|
3136
3173
|
_: 1
|
|
3137
3174
|
}, 8, ["disabled"]),
|
|
3138
|
-
|
|
3175
|
+
F(ne, {
|
|
3139
3176
|
appearance: "primary",
|
|
3140
3177
|
"data-testid": "form-submit",
|
|
3141
3178
|
disabled: u.value,
|
|
3142
3179
|
type: "submit"
|
|
3143
3180
|
}, {
|
|
3144
3181
|
default: h(() => [
|
|
3145
|
-
Z(
|
|
3182
|
+
Z(K(y(a)("baseForm.actions.save")), 1)
|
|
3146
3183
|
]),
|
|
3147
3184
|
_: 1
|
|
3148
3185
|
}, 8, ["disabled"])
|
|
3149
3186
|
], !0)
|
|
3150
3187
|
])
|
|
3151
|
-
], 40,
|
|
3188
|
+
], 40, vs))
|
|
3152
3189
|
]),
|
|
3153
3190
|
_: 3
|
|
3154
3191
|
});
|
|
3155
3192
|
};
|
|
3156
3193
|
}
|
|
3157
|
-
}), Cs = /* @__PURE__ */
|
|
3194
|
+
}), Cs = /* @__PURE__ */ Ce(ks, [["__scopeId", "data-v-44a90aae"]]), _s = {
|
|
3158
3195
|
key: 0,
|
|
3159
3196
|
"data-testid": "first-col"
|
|
3160
|
-
},
|
|
3197
|
+
}, ws = /* @__PURE__ */ ae({
|
|
3161
3198
|
__name: "EntityBaseTableCell",
|
|
3162
3199
|
props: {
|
|
3163
3200
|
keyName: {
|
|
@@ -3170,25 +3207,25 @@ const Ji = {
|
|
|
3170
3207
|
}
|
|
3171
3208
|
},
|
|
3172
3209
|
setup(e) {
|
|
3173
|
-
const n = e, t =
|
|
3210
|
+
const n = e, t = M(() => {
|
|
3174
3211
|
var v;
|
|
3175
3212
|
return ((v = n.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3176
|
-
}), r =
|
|
3213
|
+
}), r = M(() => {
|
|
3177
3214
|
var v;
|
|
3178
3215
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3179
|
-
}), o =
|
|
3216
|
+
}), o = M(() => {
|
|
3180
3217
|
var v, p;
|
|
3181
|
-
const
|
|
3182
|
-
return
|
|
3218
|
+
const A = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3219
|
+
return A ? ((p = A[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3183
3220
|
});
|
|
3184
3221
|
let a;
|
|
3185
3222
|
const i = () => {
|
|
3186
3223
|
a && (a.disconnect(), a = void 0);
|
|
3187
3224
|
}, s = () => {
|
|
3188
|
-
var v, p,
|
|
3189
|
-
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3190
|
-
}, l =
|
|
3191
|
-
|
|
3225
|
+
var v, p, A;
|
|
3226
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3227
|
+
}, l = O({}), c = O(0), d = O(0), u = O(""), m = M(() => [r.value, t.value]), f = Se(
|
|
3228
|
+
m,
|
|
3192
3229
|
(v) => {
|
|
3193
3230
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
3194
3231
|
a = new ResizeObserver((p) => {
|
|
@@ -3201,20 +3238,20 @@ const Ji = {
|
|
|
3201
3238
|
}
|
|
3202
3239
|
},
|
|
3203
3240
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3204
|
-
), I =
|
|
3205
|
-
return
|
|
3241
|
+
), I = M(() => o.value ? c.value > d.value : !1);
|
|
3242
|
+
return pr(() => {
|
|
3206
3243
|
s();
|
|
3207
|
-
}),
|
|
3244
|
+
}), fr(() => {
|
|
3208
3245
|
f();
|
|
3209
3246
|
}), (v, p) => {
|
|
3210
|
-
const
|
|
3211
|
-
return
|
|
3247
|
+
const A = q("KTooltip");
|
|
3248
|
+
return g(), j("span", {
|
|
3212
3249
|
ref_key: "contentRef",
|
|
3213
3250
|
ref: l,
|
|
3214
3251
|
class: "content-wrapper"
|
|
3215
3252
|
}, [
|
|
3216
|
-
o.value ? (
|
|
3217
|
-
|
|
3253
|
+
o.value ? (g(), j("span", _s, [
|
|
3254
|
+
F(A, {
|
|
3218
3255
|
label: I.value ? u.value : "",
|
|
3219
3256
|
"max-width": "300",
|
|
3220
3257
|
placement: "bottomStart"
|
|
@@ -3228,10 +3265,10 @@ const Ji = {
|
|
|
3228
3265
|
], 512);
|
|
3229
3266
|
};
|
|
3230
3267
|
}
|
|
3231
|
-
}),
|
|
3268
|
+
}), Is = /* @__PURE__ */ Ce(ws, [["__scopeId", "data-v-e42a20c9"]]), xs = { class: "toolbar-container" }, As = {
|
|
3232
3269
|
key: 0,
|
|
3233
3270
|
class: "toolbar-button-container"
|
|
3234
|
-
}, Ss = ["data-testid"],
|
|
3271
|
+
}, Ss = ["data-testid"], Ts = /* @__PURE__ */ ae({
|
|
3235
3272
|
__name: "EntityBaseTable",
|
|
3236
3273
|
props: {
|
|
3237
3274
|
// table header configuration
|
|
@@ -3340,61 +3377,61 @@ const Ji = {
|
|
|
3340
3377
|
},
|
|
3341
3378
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3342
3379
|
setup(e, { emit: n }) {
|
|
3343
|
-
const t = e, { i18n: { t: r } } = ue.useI18n(), o =
|
|
3344
|
-
const
|
|
3345
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3346
|
-
const ne = t.tableHeaders[
|
|
3347
|
-
|
|
3348
|
-
label: ne.label ??
|
|
3349
|
-
key:
|
|
3380
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = M(() => t.cacheIdentifier || t.preferencesStorageKey), a = (k) => k.hasData || !!t.query, i = M(() => {
|
|
3381
|
+
const k = [];
|
|
3382
|
+
return Object.keys(t.tableHeaders).forEach((x) => {
|
|
3383
|
+
const ne = t.tableHeaders[x];
|
|
3384
|
+
k.push({
|
|
3385
|
+
label: ne.label ?? x,
|
|
3386
|
+
key: x,
|
|
3350
3387
|
sortable: ne.sortable ?? !1
|
|
3351
3388
|
});
|
|
3352
|
-
}), t.enableEntityActions &&
|
|
3389
|
+
}), t.enableEntityActions && k.push({
|
|
3353
3390
|
key: "actions",
|
|
3354
3391
|
hideLabel: !0
|
|
3355
|
-
}),
|
|
3356
|
-
}), s = (
|
|
3357
|
-
"data-rowid":
|
|
3358
|
-
"data-testid":
|
|
3359
|
-
...t.rowAttributes(
|
|
3360
|
-
}), l =
|
|
3361
|
-
var
|
|
3362
|
-
return (
|
|
3363
|
-
}, d = (
|
|
3364
|
-
const
|
|
3365
|
-
"data-testid":
|
|
3366
|
-
...t.cellAttributes(
|
|
3392
|
+
}), k;
|
|
3393
|
+
}), s = (k) => ({
|
|
3394
|
+
"data-rowid": k.id,
|
|
3395
|
+
"data-testid": k.name,
|
|
3396
|
+
...t.rowAttributes(k)
|
|
3397
|
+
}), l = O({}), c = (k) => {
|
|
3398
|
+
var x;
|
|
3399
|
+
return (x = l.value) == null ? void 0 : x.$el.querySelector(`[data-rowid="${k.id}"]`);
|
|
3400
|
+
}, d = (k) => {
|
|
3401
|
+
const x = {
|
|
3402
|
+
"data-testid": k.headerKey,
|
|
3403
|
+
...t.cellAttributes(k)
|
|
3367
3404
|
};
|
|
3368
|
-
return
|
|
3405
|
+
return k.colIndex === 0 && (x.style = {
|
|
3369
3406
|
maxWidth: "250px",
|
|
3370
3407
|
overflowX: "hidden",
|
|
3371
3408
|
textOverflow: "ellipsis"
|
|
3372
|
-
}),
|
|
3409
|
+
}), x;
|
|
3373
3410
|
}, u = () => {
|
|
3374
|
-
n("empty-state-cta-clicked"),
|
|
3375
|
-
},
|
|
3411
|
+
n("empty-state-cta-clicked"), m();
|
|
3412
|
+
}, m = () => {
|
|
3376
3413
|
n("clear-search-input");
|
|
3377
|
-
}, f =
|
|
3378
|
-
n("click:row",
|
|
3379
|
-
}), I = (
|
|
3380
|
-
n("sort",
|
|
3381
|
-
}, { setTablePreferences: v, getTablePreferences: p } =
|
|
3382
|
-
const
|
|
3414
|
+
}, f = M(() => t.disableRowClick ? void 0 : (k, x) => {
|
|
3415
|
+
n("click:row", x);
|
|
3416
|
+
}), I = (k) => {
|
|
3417
|
+
n("sort", k);
|
|
3418
|
+
}, { setTablePreferences: v, getTablePreferences: p } = Ar(), A = M(() => {
|
|
3419
|
+
const k = p(t.preferencesStorageKey);
|
|
3383
3420
|
return {
|
|
3384
3421
|
...t.initialFetcherParams,
|
|
3385
|
-
...
|
|
3422
|
+
...k
|
|
3386
3423
|
};
|
|
3387
|
-
}), b = (
|
|
3388
|
-
t.preferencesStorageKey && v(t.preferencesStorageKey,
|
|
3424
|
+
}), b = (k) => {
|
|
3425
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, k);
|
|
3389
3426
|
};
|
|
3390
|
-
return (
|
|
3391
|
-
const ne =
|
|
3392
|
-
return
|
|
3427
|
+
return (k, x) => {
|
|
3428
|
+
const ne = q("KIcon"), pe = q("KButton"), z = q("KDropdownMenu"), w = q("KTable"), N = q("KCard");
|
|
3429
|
+
return g(), V(N, {
|
|
3393
3430
|
class: "kong-ui-entity-base-table",
|
|
3394
3431
|
title: e.title
|
|
3395
3432
|
}, {
|
|
3396
3433
|
body: h(() => [
|
|
3397
|
-
|
|
3434
|
+
F(w, {
|
|
3398
3435
|
ref_key: "tableRefs",
|
|
3399
3436
|
ref: l,
|
|
3400
3437
|
"cache-identifier": o.value,
|
|
@@ -3415,51 +3452,51 @@ const Ji = {
|
|
|
3415
3452
|
"has-error": !!e.errorMessage,
|
|
3416
3453
|
headers: i.value,
|
|
3417
3454
|
"hide-pagination-when-optional": "",
|
|
3418
|
-
"initial-fetcher-params":
|
|
3455
|
+
"initial-fetcher-params": A.value,
|
|
3419
3456
|
"is-loading": e.isLoading,
|
|
3420
3457
|
"pagination-type": e.paginationType,
|
|
3421
3458
|
"row-attrs": s,
|
|
3422
3459
|
"search-input": e.query,
|
|
3423
3460
|
onKtableEmptyStateCtaClicked: u,
|
|
3424
3461
|
"onRow:click": f.value,
|
|
3425
|
-
onSort:
|
|
3462
|
+
onSort: x[0] || (x[0] = (B) => I(B)),
|
|
3426
3463
|
"onUpdate:tablePreferences": b
|
|
3427
3464
|
}, Te({
|
|
3428
|
-
toolbar: h(({ state:
|
|
3429
|
-
et(
|
|
3430
|
-
Y(
|
|
3431
|
-
|
|
3432
|
-
Y(
|
|
3433
|
-
])) :
|
|
3465
|
+
toolbar: h(({ state: B }) => [
|
|
3466
|
+
et(R("div", xs, [
|
|
3467
|
+
Y(k.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3468
|
+
k.$slots["toolbar-button"] ? (g(), j("div", As, [
|
|
3469
|
+
Y(k.$slots, "toolbar-button", {}, void 0, !0)
|
|
3470
|
+
])) : G("", !0)
|
|
3434
3471
|
], 512), [
|
|
3435
|
-
[tt, a(
|
|
3472
|
+
[tt, a(B)]
|
|
3436
3473
|
])
|
|
3437
3474
|
]),
|
|
3438
|
-
actions: h(({ row:
|
|
3439
|
-
|
|
3475
|
+
actions: h(({ row: B, rowKey: C, rowValue: S }) => [
|
|
3476
|
+
R("div", {
|
|
3440
3477
|
class: "actions-container",
|
|
3441
|
-
"data-testid":
|
|
3478
|
+
"data-testid": B.name
|
|
3442
3479
|
}, [
|
|
3443
|
-
|
|
3480
|
+
F(z, {
|
|
3444
3481
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3445
3482
|
width: e.dropdownMenuWidth
|
|
3446
3483
|
}, {
|
|
3447
3484
|
items: h(() => [
|
|
3448
|
-
Y(
|
|
3449
|
-
row:
|
|
3450
|
-
rowKey:
|
|
3451
|
-
rowValue:
|
|
3485
|
+
Y(k.$slots, "actions", {
|
|
3486
|
+
row: B,
|
|
3487
|
+
rowKey: C,
|
|
3488
|
+
rowValue: S
|
|
3452
3489
|
}, void 0, !0)
|
|
3453
3490
|
]),
|
|
3454
3491
|
default: h(() => [
|
|
3455
|
-
|
|
3492
|
+
F(pe, {
|
|
3456
3493
|
class: "actions-trigger",
|
|
3457
3494
|
"data-testid": "overflow-actions-button",
|
|
3458
3495
|
size: "small"
|
|
3459
3496
|
}, {
|
|
3460
3497
|
icon: h(() => [
|
|
3461
|
-
|
|
3462
|
-
color: y(
|
|
3498
|
+
F(ne, {
|
|
3499
|
+
color: y(mo),
|
|
3463
3500
|
icon: "more",
|
|
3464
3501
|
size: "16"
|
|
3465
3502
|
}, null, 8, ["color"])
|
|
@@ -3473,20 +3510,20 @@ const Ji = {
|
|
|
3473
3510
|
]),
|
|
3474
3511
|
_: 2
|
|
3475
3512
|
}, [
|
|
3476
|
-
ye(e.tableHeaders, (
|
|
3477
|
-
name:
|
|
3478
|
-
fn: h(({ row:
|
|
3479
|
-
|
|
3480
|
-
"key-name": String(
|
|
3481
|
-
"row-el": c(
|
|
3513
|
+
ye(e.tableHeaders, (B, C) => ({
|
|
3514
|
+
name: C,
|
|
3515
|
+
fn: h(({ row: S, rowKey: T, rowValue: P }) => [
|
|
3516
|
+
F(Is, {
|
|
3517
|
+
"key-name": String(C),
|
|
3518
|
+
"row-el": c(S)
|
|
3482
3519
|
}, {
|
|
3483
3520
|
default: h(() => [
|
|
3484
|
-
Y(
|
|
3485
|
-
row:
|
|
3521
|
+
Y(k.$slots, C, {
|
|
3522
|
+
row: S,
|
|
3486
3523
|
rowKey: T,
|
|
3487
3524
|
rowValue: P
|
|
3488
3525
|
}, () => [
|
|
3489
|
-
Z(
|
|
3526
|
+
Z(K(P), 1)
|
|
3490
3527
|
], !0)
|
|
3491
3528
|
]),
|
|
3492
3529
|
_: 2
|
|
@@ -3499,13 +3536,13 @@ const Ji = {
|
|
|
3499
3536
|
}, 8, ["title"]);
|
|
3500
3537
|
};
|
|
3501
3538
|
}
|
|
3502
|
-
}),
|
|
3539
|
+
}), $s = /* @__PURE__ */ Ce(Ts, [["__scopeId", "data-v-6bf92df6"]]), Ms = {
|
|
3503
3540
|
key: 0,
|
|
3504
3541
|
class: "kong-ui-entity-delete-error"
|
|
3505
|
-
},
|
|
3542
|
+
}, js = {
|
|
3506
3543
|
key: 1,
|
|
3507
3544
|
class: "description"
|
|
3508
|
-
},
|
|
3545
|
+
}, Es = /* @__PURE__ */ ae({
|
|
3509
3546
|
__name: "EntityDeleteModal",
|
|
3510
3547
|
props: {
|
|
3511
3548
|
visible: {
|
|
@@ -3544,14 +3581,14 @@ const Ji = {
|
|
|
3544
3581
|
},
|
|
3545
3582
|
emits: ["cancel", "proceed"],
|
|
3546
3583
|
setup(e, { emit: n }) {
|
|
3547
|
-
const t = e, { i18nT: r } = ue.useI18n(), o =
|
|
3584
|
+
const t = e, { i18nT: r } = ue.useI18n(), o = M(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3548
3585
|
n("cancel");
|
|
3549
3586
|
}, i = () => {
|
|
3550
3587
|
n("proceed");
|
|
3551
3588
|
};
|
|
3552
3589
|
return (s, l) => {
|
|
3553
|
-
const c =
|
|
3554
|
-
return
|
|
3590
|
+
const c = q("KAlert"), d = q("KPrompt");
|
|
3591
|
+
return g(), V(d, {
|
|
3555
3592
|
"action-button-text": "Yes, delete",
|
|
3556
3593
|
"action-pending": e.actionPending,
|
|
3557
3594
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3563,43 +3600,43 @@ const Ji = {
|
|
|
3563
3600
|
onProceed: i
|
|
3564
3601
|
}, {
|
|
3565
3602
|
"body-content": h(() => [
|
|
3566
|
-
e.error ? (
|
|
3567
|
-
|
|
3603
|
+
e.error ? (g(), j("div", Ms, [
|
|
3604
|
+
F(c, { appearance: "danger" }, {
|
|
3568
3605
|
alertMessage: h(() => [
|
|
3569
|
-
Z(
|
|
3606
|
+
Z(K(e.error), 1)
|
|
3570
3607
|
]),
|
|
3571
3608
|
_: 1
|
|
3572
3609
|
})
|
|
3573
|
-
])) :
|
|
3574
|
-
|
|
3610
|
+
])) : G("", !0),
|
|
3611
|
+
F(y(r), {
|
|
3575
3612
|
class: "message",
|
|
3576
3613
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3577
3614
|
tag: "p"
|
|
3578
3615
|
}, Te({
|
|
3579
3616
|
entityType: h(() => [
|
|
3580
|
-
Z(
|
|
3617
|
+
Z(K(t.entityType), 1)
|
|
3581
3618
|
]),
|
|
3582
3619
|
_: 2
|
|
3583
3620
|
}, [
|
|
3584
3621
|
t.entityName ? {
|
|
3585
3622
|
name: "entityName",
|
|
3586
3623
|
fn: h(() => [
|
|
3587
|
-
|
|
3624
|
+
R("strong", null, K(t.entityName), 1)
|
|
3588
3625
|
]),
|
|
3589
3626
|
key: "0"
|
|
3590
3627
|
} : void 0
|
|
3591
3628
|
]), 1032, ["keypath"]),
|
|
3592
|
-
t.description || s.$slots.description ? (
|
|
3629
|
+
t.description || s.$slots.description ? (g(), j("div", js, [
|
|
3593
3630
|
Y(s.$slots, "description", {}, () => [
|
|
3594
|
-
|
|
3631
|
+
R("p", null, K(t.description), 1)
|
|
3595
3632
|
], !0)
|
|
3596
|
-
])) :
|
|
3633
|
+
])) : G("", !0)
|
|
3597
3634
|
]),
|
|
3598
3635
|
_: 3
|
|
3599
3636
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3600
3637
|
};
|
|
3601
3638
|
}
|
|
3602
|
-
}),
|
|
3639
|
+
}), Os = /* @__PURE__ */ Ce(Es, [["__scopeId", "data-v-1c9a2a07"]]), Ks = {
|
|
3603
3640
|
fill: "none",
|
|
3604
3641
|
height: "20",
|
|
3605
3642
|
viewBox: "0 0 20 20",
|
|
@@ -3613,35 +3650,35 @@ const Ji = {
|
|
|
3613
3650
|
width: "20",
|
|
3614
3651
|
x: "0",
|
|
3615
3652
|
y: "0"
|
|
3616
|
-
},
|
|
3653
|
+
}, Ns = ["fill"], Bs = { mask: "url(#mask0_180_20349)" }, Ps = ["fill"], Ls = /* @__PURE__ */ ae({
|
|
3617
3654
|
__name: "IconFilter",
|
|
3618
3655
|
props: {
|
|
3619
3656
|
color: {
|
|
3620
3657
|
type: String,
|
|
3621
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3658
|
+
default: `var(--kong-ui-entity-filter-color, ${po})`
|
|
3622
3659
|
}
|
|
3623
3660
|
},
|
|
3624
3661
|
setup(e) {
|
|
3625
|
-
return (n, t) => (
|
|
3626
|
-
|
|
3627
|
-
|
|
3662
|
+
return (n, t) => (g(), j("svg", Ks, [
|
|
3663
|
+
R("mask", Fs, [
|
|
3664
|
+
R("rect", {
|
|
3628
3665
|
fill: e.color,
|
|
3629
3666
|
height: "20",
|
|
3630
3667
|
width: "20"
|
|
3631
|
-
}, null, 8,
|
|
3668
|
+
}, null, 8, Ns)
|
|
3632
3669
|
]),
|
|
3633
|
-
|
|
3634
|
-
|
|
3670
|
+
R("g", Bs, [
|
|
3671
|
+
R("path", {
|
|
3635
3672
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3636
3673
|
fill: e.color
|
|
3637
|
-
}, null, 8,
|
|
3674
|
+
}, null, 8, Ps)
|
|
3638
3675
|
])
|
|
3639
3676
|
]));
|
|
3640
3677
|
}
|
|
3641
|
-
}),
|
|
3678
|
+
}), qs = {
|
|
3642
3679
|
key: 1,
|
|
3643
3680
|
class: "kong-ui-entity-filter"
|
|
3644
|
-
}, Us = { class: "menu-item-title" },
|
|
3681
|
+
}, Us = { class: "menu-item-title" }, Rs = { class: "menu-item-indicator" }, Vs = { class: "menu-item-body" }, Ds = ["for"], Gs = { class: "menu-item-buttons" }, zs = /* @__PURE__ */ ae({
|
|
3645
3682
|
__name: "EntityFilter",
|
|
3646
3683
|
props: {
|
|
3647
3684
|
// filter config, either exact match or fuzzy match
|
|
@@ -3661,21 +3698,21 @@ const Ji = {
|
|
|
3661
3698
|
},
|
|
3662
3699
|
emits: ["update:modelValue"],
|
|
3663
3700
|
setup(e, { emit: n }) {
|
|
3664
|
-
const t = e, { i18n: { t: r } } = ue.useI18n(), o =
|
|
3701
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = O(!1), a = O({}), i = M(() => {
|
|
3665
3702
|
const p = [];
|
|
3666
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3667
|
-
|
|
3703
|
+
return new URLSearchParams(t.modelValue).forEach((A, b) => {
|
|
3704
|
+
A !== "" && p.push(b);
|
|
3668
3705
|
}), p;
|
|
3669
|
-
}), s =
|
|
3706
|
+
}), s = M(() => {
|
|
3670
3707
|
const p = t.config.fields;
|
|
3671
|
-
return Object.keys(p).filter((
|
|
3672
|
-
label: p[
|
|
3673
|
-
value:
|
|
3708
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3709
|
+
label: p[A].label || A,
|
|
3710
|
+
value: A
|
|
3674
3711
|
}));
|
|
3675
3712
|
});
|
|
3676
|
-
|
|
3677
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3678
|
-
a.value[b] =
|
|
3713
|
+
Se(() => t.modelValue, (p) => {
|
|
3714
|
+
a.value = {}, new URLSearchParams(p).forEach((A, b) => {
|
|
3715
|
+
a.value[b] = A;
|
|
3679
3716
|
});
|
|
3680
3717
|
});
|
|
3681
3718
|
const l = () => {
|
|
@@ -3683,14 +3720,14 @@ const Ji = {
|
|
|
3683
3720
|
}, c = (p) => {
|
|
3684
3721
|
n("update:modelValue", p);
|
|
3685
3722
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3686
|
-
var
|
|
3687
|
-
return (((b = (
|
|
3688
|
-
value:
|
|
3689
|
-
label:
|
|
3723
|
+
var A, b;
|
|
3724
|
+
return (((b = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : b.values) ?? []).map((k) => ({
|
|
3725
|
+
value: k,
|
|
3726
|
+
label: k
|
|
3690
3727
|
}));
|
|
3691
|
-
},
|
|
3692
|
-
var
|
|
3693
|
-
return ((b = (
|
|
3728
|
+
}, m = (p) => {
|
|
3729
|
+
var A, b;
|
|
3730
|
+
return ((b = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : b.type) ?? "text";
|
|
3694
3731
|
}, f = (p) => {
|
|
3695
3732
|
a.value = {
|
|
3696
3733
|
...a.value,
|
|
@@ -3699,12 +3736,12 @@ const Ji = {
|
|
|
3699
3736
|
}, I = () => {
|
|
3700
3737
|
a.value = {}, v(!0);
|
|
3701
3738
|
}, v = (p = !1) => {
|
|
3702
|
-
const
|
|
3703
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3739
|
+
const A = Object.keys(a.value).reduce((b, k) => (a.value[k] && (b[k] = `${a.value[k]}`), b), {});
|
|
3740
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3704
3741
|
};
|
|
3705
|
-
return (p,
|
|
3706
|
-
const b =
|
|
3707
|
-
return e.config.isExactMatch ? (
|
|
3742
|
+
return (p, A) => {
|
|
3743
|
+
const b = q("KInput"), k = q("KButton"), x = q("KSelect"), ne = q("KMenuItem"), pe = q("KMenu");
|
|
3744
|
+
return e.config.isExactMatch ? (g(), V(b, {
|
|
3708
3745
|
key: 0,
|
|
3709
3746
|
autocomplete: "off",
|
|
3710
3747
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3714,90 +3751,90 @@ const Ji = {
|
|
|
3714
3751
|
"onUpdate:modelValue": c
|
|
3715
3752
|
}, {
|
|
3716
3753
|
icon: h(() => [
|
|
3717
|
-
|
|
3754
|
+
F(Ls)
|
|
3718
3755
|
]),
|
|
3719
3756
|
_: 1
|
|
3720
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3721
|
-
|
|
3757
|
+
}, 8, ["model-value", "placeholder"])) : (g(), j("div", qs, [
|
|
3758
|
+
F(k, {
|
|
3722
3759
|
appearance: "btn-link",
|
|
3723
3760
|
"data-testid": "filter-button",
|
|
3724
3761
|
icon: "filter",
|
|
3725
3762
|
onClick: l
|
|
3726
3763
|
}, {
|
|
3727
3764
|
default: h(() => [
|
|
3728
|
-
Z(
|
|
3765
|
+
Z(K(y(r)("filter.filterButtonText")) + " " + K(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3729
3766
|
]),
|
|
3730
3767
|
_: 1
|
|
3731
3768
|
}),
|
|
3732
|
-
et(
|
|
3769
|
+
et(R("div", {
|
|
3733
3770
|
class: "kong-ui-entity-filter-backdrop",
|
|
3734
3771
|
onClick: l
|
|
3735
3772
|
}, null, 512), [
|
|
3736
3773
|
[tt, o.value]
|
|
3737
3774
|
]),
|
|
3738
|
-
et(
|
|
3775
|
+
et(F(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3739
3776
|
body: h(() => [
|
|
3740
|
-
(
|
|
3777
|
+
(g(!0), j(ve, null, ye(s.value, (z, w) => (g(), V(ne, {
|
|
3741
3778
|
key: z.value,
|
|
3742
3779
|
"data-testid": z.value,
|
|
3743
3780
|
expandable: "",
|
|
3744
3781
|
"last-menu-item": w === s.value.length - 1
|
|
3745
3782
|
}, {
|
|
3746
3783
|
itemTitle: h(() => [
|
|
3747
|
-
|
|
3748
|
-
Z(
|
|
3749
|
-
et(
|
|
3784
|
+
R("span", Us, [
|
|
3785
|
+
Z(K(z.label) + " ", 1),
|
|
3786
|
+
et(R("span", Rs, null, 512), [
|
|
3750
3787
|
[tt, i.value.includes(z.value)]
|
|
3751
3788
|
])
|
|
3752
3789
|
])
|
|
3753
3790
|
]),
|
|
3754
3791
|
itemBody: h(() => {
|
|
3755
|
-
var
|
|
3792
|
+
var N, B;
|
|
3756
3793
|
return [
|
|
3757
|
-
|
|
3758
|
-
|
|
3794
|
+
R("div", Vs, [
|
|
3795
|
+
R("label", {
|
|
3759
3796
|
class: "menu-item-label",
|
|
3760
3797
|
for: d(z.value)
|
|
3761
|
-
},
|
|
3762
|
-
((
|
|
3798
|
+
}, K(y(r)("filter.fieldLabel")), 9, Ds),
|
|
3799
|
+
((B = (N = e.config.schema) == null ? void 0 : N[z.value]) == null ? void 0 : B.type) === "select" ? (g(), V(x, {
|
|
3763
3800
|
key: 0,
|
|
3764
3801
|
id: d(z.value),
|
|
3765
3802
|
modelValue: a.value[z.value],
|
|
3766
|
-
"onUpdate:modelValue": (
|
|
3803
|
+
"onUpdate:modelValue": (C) => a.value[z.value] = C,
|
|
3767
3804
|
appearance: "select",
|
|
3768
3805
|
items: u(z.value),
|
|
3769
3806
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
3770
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3807
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (g(), V(b, {
|
|
3771
3808
|
key: 1,
|
|
3772
3809
|
id: d(z.value),
|
|
3773
3810
|
modelValue: a.value[z.value],
|
|
3774
|
-
"onUpdate:modelValue": (
|
|
3811
|
+
"onUpdate:modelValue": (C) => a.value[z.value] = C,
|
|
3775
3812
|
autocomplete: "off",
|
|
3776
3813
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3777
3814
|
size: "small",
|
|
3778
|
-
type:
|
|
3815
|
+
type: m(z.value)
|
|
3779
3816
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3780
3817
|
]),
|
|
3781
|
-
|
|
3782
|
-
|
|
3818
|
+
R("div", Gs, [
|
|
3819
|
+
F(k, {
|
|
3783
3820
|
appearance: "btn-link",
|
|
3784
3821
|
"data-testid": "apply-filter",
|
|
3785
3822
|
size: "small",
|
|
3786
|
-
onClick:
|
|
3823
|
+
onClick: A[0] || (A[0] = (C) => v(!0))
|
|
3787
3824
|
}, {
|
|
3788
3825
|
default: h(() => [
|
|
3789
|
-
Z(
|
|
3826
|
+
Z(K(y(r)("filter.applyButtonText")), 1)
|
|
3790
3827
|
]),
|
|
3791
3828
|
_: 1
|
|
3792
3829
|
}),
|
|
3793
|
-
|
|
3830
|
+
F(k, {
|
|
3794
3831
|
appearance: "btn-link",
|
|
3795
3832
|
"data-testid": "clear-filter",
|
|
3796
3833
|
size: "small",
|
|
3797
|
-
onClick: (
|
|
3834
|
+
onClick: (C) => f(z.value)
|
|
3798
3835
|
}, {
|
|
3799
3836
|
default: h(() => [
|
|
3800
|
-
Z(
|
|
3837
|
+
Z(K(y(r)("filter.clearButtonText")), 1)
|
|
3801
3838
|
]),
|
|
3802
3839
|
_: 2
|
|
3803
3840
|
}, 1032, ["onClick"])
|
|
@@ -3808,9 +3845,9 @@ const Ji = {
|
|
|
3808
3845
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3809
3846
|
]),
|
|
3810
3847
|
actionButton: h(() => [
|
|
3811
|
-
|
|
3848
|
+
F(k, { onClick: I }, {
|
|
3812
3849
|
default: h(() => [
|
|
3813
|
-
Z(
|
|
3850
|
+
Z(K(y(r)("filter.clearAllButtonText")), 1)
|
|
3814
3851
|
]),
|
|
3815
3852
|
_: 1
|
|
3816
3853
|
})
|
|
@@ -3822,7 +3859,7 @@ const Ji = {
|
|
|
3822
3859
|
]));
|
|
3823
3860
|
};
|
|
3824
3861
|
}
|
|
3825
|
-
}), Hs = /* @__PURE__ */
|
|
3862
|
+
}), Hs = /* @__PURE__ */ Ce(zs, [["__scopeId", "data-v-745f38c0"]]), Xe = /* @__PURE__ */ ae({
|
|
3826
3863
|
__name: "PermissionsWrapper",
|
|
3827
3864
|
props: {
|
|
3828
3865
|
/**
|
|
@@ -3844,24 +3881,24 @@ const Ji = {
|
|
|
3844
3881
|
}
|
|
3845
3882
|
},
|
|
3846
3883
|
setup(e) {
|
|
3847
|
-
const n = e, t =
|
|
3848
|
-
return
|
|
3884
|
+
const n = e, t = O(void 0), r = M(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3885
|
+
return Se(() => n.authFunction, async () => {
|
|
3849
3886
|
t.value = await n.authFunction();
|
|
3850
3887
|
}, { immediate: !0 }), (o, a) => r.value ? Y(o.$slots, "default", {
|
|
3851
3888
|
key: 0,
|
|
3852
3889
|
isAllowed: t.value
|
|
3853
|
-
}) :
|
|
3890
|
+
}) : G("", !0);
|
|
3854
3891
|
}
|
|
3855
|
-
}),
|
|
3892
|
+
}), Js = { class: "form-section-wrapper" }, Ws = {
|
|
3856
3893
|
key: 0,
|
|
3857
3894
|
class: "form-section-title"
|
|
3858
|
-
},
|
|
3895
|
+
}, Ys = {
|
|
3859
3896
|
key: 1,
|
|
3860
3897
|
class: "form-section-description"
|
|
3861
|
-
},
|
|
3898
|
+
}, Zs = {
|
|
3862
3899
|
key: 2,
|
|
3863
3900
|
class: "form-section-footer"
|
|
3864
|
-
},
|
|
3901
|
+
}, Qs = { class: "form-section-content" }, Xs = /* @__PURE__ */ ae({
|
|
3865
3902
|
__name: "EntityFormSection",
|
|
3866
3903
|
props: {
|
|
3867
3904
|
title: {
|
|
@@ -3887,35 +3924,35 @@ const Ji = {
|
|
|
3887
3924
|
},
|
|
3888
3925
|
setup(e) {
|
|
3889
3926
|
const n = ut();
|
|
3890
|
-
return (t, r) => (
|
|
3891
|
-
class:
|
|
3927
|
+
return (t, r) => (g(), j("fieldset", {
|
|
3928
|
+
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3892
3929
|
}, [
|
|
3893
|
-
|
|
3894
|
-
e.hideInfoHeader ?
|
|
3930
|
+
R("div", Js, [
|
|
3931
|
+
e.hideInfoHeader ? G("", !0) : (g(), j("div", {
|
|
3895
3932
|
key: 0,
|
|
3896
|
-
class:
|
|
3933
|
+
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3897
3934
|
}, [
|
|
3898
|
-
e.title ? (
|
|
3899
|
-
e.description || y(n).description ? (
|
|
3935
|
+
e.title ? (g(), j("h4", Ws, K(e.title), 1)) : G("", !0),
|
|
3936
|
+
e.description || y(n).description ? (g(), j("div", Ys, [
|
|
3900
3937
|
Y(t.$slots, "description", {}, () => [
|
|
3901
|
-
|
|
3938
|
+
R("p", null, K(e.description), 1)
|
|
3902
3939
|
], !0)
|
|
3903
|
-
])) :
|
|
3904
|
-
y(n).footer ? (
|
|
3940
|
+
])) : G("", !0),
|
|
3941
|
+
y(n).footer ? (g(), j("div", Zs, [
|
|
3905
3942
|
Y(t.$slots, "footer", {}, void 0, !0)
|
|
3906
|
-
])) :
|
|
3943
|
+
])) : G("", !0)
|
|
3907
3944
|
], 2)),
|
|
3908
|
-
|
|
3945
|
+
R("div", Qs, [
|
|
3909
3946
|
Y(t.$slots, "default", {}, void 0, !0)
|
|
3910
3947
|
])
|
|
3911
3948
|
])
|
|
3912
3949
|
], 2));
|
|
3913
3950
|
}
|
|
3914
|
-
}),
|
|
3915
|
-
const
|
|
3951
|
+
}), un = /* @__PURE__ */ Ce(Xs, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: el, useErrors: tl, useExternalLinkCreator: _l, useFetchUrlBuilder: wl, useFetcher: nl, useDebouncedFilter: ar, useStringHelpers: Il, useHelpers: xl, useGatewayFeatureSupported: Al, useTruncationDetector: Sl } = ue;
|
|
3952
|
+
const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group-cta-text" }, al = {
|
|
3916
3953
|
key: 0,
|
|
3917
3954
|
class: "kong-ui-entity-add-to-groups-error"
|
|
3918
|
-
},
|
|
3955
|
+
}, il = { key: 0 }, sl = /* @__PURE__ */ ae({
|
|
3919
3956
|
__name: "AddToGroupModal",
|
|
3920
3957
|
props: {
|
|
3921
3958
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3932,17 +3969,17 @@ const nl = { class: "add-to-group-form-container" }, rl = { class: "add-to-group
|
|
|
3932
3969
|
},
|
|
3933
3970
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
3934
3971
|
setup(e, { emit: n }) {
|
|
3935
|
-
var
|
|
3936
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
3937
|
-
headers: (
|
|
3938
|
-
}), a =
|
|
3972
|
+
var B;
|
|
3973
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Kt({
|
|
3974
|
+
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
3975
|
+
}), a = O([]), {
|
|
3939
3976
|
debouncedQueryChange: i,
|
|
3940
3977
|
loading: s,
|
|
3941
3978
|
allRecords: l,
|
|
3942
3979
|
error: c,
|
|
3943
3980
|
loadItems: d,
|
|
3944
3981
|
results: u
|
|
3945
|
-
} =
|
|
3982
|
+
} = ar(
|
|
3946
3983
|
t.config,
|
|
3947
3984
|
$e.list[t.config.app].all,
|
|
3948
3985
|
"",
|
|
@@ -3950,77 +3987,77 @@ const nl = { class: "add-to-group-form-container" }, rl = { class: "add-to-group
|
|
|
3950
3987
|
fetchedItemsKey: "data",
|
|
3951
3988
|
searchKeys: ["name", "id"]
|
|
3952
3989
|
}
|
|
3953
|
-
),
|
|
3954
|
-
label:
|
|
3955
|
-
value:
|
|
3956
|
-
selected: a.value.includes(
|
|
3957
|
-
data:
|
|
3990
|
+
), m = M(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0), I = M(() => l.value === void 0), v = M(() => u.value.map((C) => ({
|
|
3991
|
+
label: C.name,
|
|
3992
|
+
value: C.id,
|
|
3993
|
+
selected: a.value.includes(C.id),
|
|
3994
|
+
data: C
|
|
3958
3995
|
// we need this to determine whether or not to show the description text
|
|
3959
|
-
}))), p = (
|
|
3996
|
+
}))), p = (C) => {
|
|
3960
3997
|
var T;
|
|
3961
|
-
const
|
|
3962
|
-
return
|
|
3963
|
-
},
|
|
3964
|
-
|
|
3965
|
-
}, b =
|
|
3998
|
+
const S = I.value ? u.value.find((P) => P.id === C) : (T = l.value) == null ? void 0 : T.find((P) => P.id === C);
|
|
3999
|
+
return S ? S.name : C;
|
|
4000
|
+
}, A = () => {
|
|
4001
|
+
x.value = "", b.value = [], w.value = [], n("cancel");
|
|
4002
|
+
}, b = O([]), k = O(!1), x = O(""), ne = async () => {
|
|
3966
4003
|
if (!a.value.length) {
|
|
3967
|
-
|
|
4004
|
+
x.value = "", w.value = [], n("cancel");
|
|
3968
4005
|
return;
|
|
3969
4006
|
}
|
|
3970
|
-
|
|
4007
|
+
k.value = !0, x.value = "", b.value = [], w.value = [];
|
|
3971
4008
|
try {
|
|
3972
|
-
const
|
|
4009
|
+
const C = a.value.map((P) => z(P)), S = await Promise.allSettled(C);
|
|
3973
4010
|
let T = !0;
|
|
3974
|
-
|
|
4011
|
+
S.forEach((P) => {
|
|
3975
4012
|
P.status !== "fulfilled" && (T = !1);
|
|
3976
|
-
}), T ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [],
|
|
4013
|
+
}), T ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], N(S));
|
|
3977
4014
|
} catch {
|
|
3978
|
-
|
|
4015
|
+
x.value = r("consumer_groups.errors.add"), n("error", x.value);
|
|
3979
4016
|
} finally {
|
|
3980
|
-
|
|
4017
|
+
k.value = !1;
|
|
3981
4018
|
}
|
|
3982
|
-
}, pe =
|
|
3983
|
-
var
|
|
3984
|
-
let
|
|
3985
|
-
return t.config.app === "konnect" ?
|
|
3986
|
-
}), z = async (
|
|
3987
|
-
const
|
|
3988
|
-
group:
|
|
4019
|
+
}, pe = M(() => {
|
|
4020
|
+
var S, T, P, J;
|
|
4021
|
+
let C = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4022
|
+
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((S = t.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{consumerId}/gi, ((T = t.config) == null ? void 0 : T.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), C;
|
|
4023
|
+
}), z = async (C) => {
|
|
4024
|
+
const S = {
|
|
4025
|
+
group: C
|
|
3989
4026
|
};
|
|
3990
4027
|
try {
|
|
3991
|
-
const T = await o.post(pe.value,
|
|
3992
|
-
return b.value.push(
|
|
4028
|
+
const T = await o.post(pe.value, S);
|
|
4029
|
+
return b.value.push(C), T;
|
|
3993
4030
|
} catch (T) {
|
|
3994
|
-
let P = `${p(
|
|
3995
|
-
return T.response.status === 409 && (P = `${p(
|
|
4031
|
+
let P = `${p(C)} - ${T.message}`;
|
|
4032
|
+
return T.response.status === 409 && (P = `${p(C)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
3996
4033
|
}
|
|
3997
|
-
}, w =
|
|
3998
|
-
w.value =
|
|
4034
|
+
}, w = O([]), N = (C) => {
|
|
4035
|
+
w.value = C.map((S) => {
|
|
3999
4036
|
var T;
|
|
4000
|
-
return (T =
|
|
4037
|
+
return (T = S.reason) == null ? void 0 : T.message;
|
|
4001
4038
|
}).filter(Boolean);
|
|
4002
4039
|
};
|
|
4003
|
-
return
|
|
4040
|
+
return Se(v, () => {
|
|
4004
4041
|
f.value++;
|
|
4005
4042
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4006
4043
|
await d();
|
|
4007
|
-
}), (
|
|
4008
|
-
const T =
|
|
4009
|
-
return
|
|
4010
|
-
"action-pending":
|
|
4044
|
+
}), (C, S) => {
|
|
4045
|
+
const T = q("KMultiselect"), P = q("KAlert"), J = q("KPrompt");
|
|
4046
|
+
return g(), V(J, {
|
|
4047
|
+
"action-pending": k.value,
|
|
4011
4048
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4012
4049
|
"data-testid": "add-to-group-modal",
|
|
4013
4050
|
"is-visible": e.visible,
|
|
4014
4051
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4015
|
-
onCanceled:
|
|
4052
|
+
onCanceled: A,
|
|
4016
4053
|
onProceed: ne
|
|
4017
4054
|
}, {
|
|
4018
4055
|
"body-content": h(() => [
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4056
|
+
R("div", rl, [
|
|
4057
|
+
R("p", ol, K(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4058
|
+
F(T, {
|
|
4022
4059
|
modelValue: a.value,
|
|
4023
|
-
"onUpdate:modelValue":
|
|
4060
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Q) => a.value = Q),
|
|
4024
4061
|
autosuggest: "",
|
|
4025
4062
|
"data-testid": "add-to-groups-multiselect",
|
|
4026
4063
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4028,23 +4065,23 @@ const nl = { class: "add-to-group-form-container" }, rl = { class: "add-to-group
|
|
|
4028
4065
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4029
4066
|
loading: y(s),
|
|
4030
4067
|
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4031
|
-
readonly:
|
|
4068
|
+
readonly: k.value,
|
|
4032
4069
|
required: "",
|
|
4033
4070
|
width: "100%",
|
|
4034
4071
|
onQueryChange: y(i)
|
|
4035
4072
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4036
|
-
|
|
4037
|
-
|
|
4073
|
+
x.value || m.value || w.value.length ? (g(), j("div", al, [
|
|
4074
|
+
F(P, { appearance: "danger" }, {
|
|
4038
4075
|
alertMessage: h(() => [
|
|
4039
|
-
|
|
4040
|
-
w.value.length ? (
|
|
4041
|
-
(
|
|
4042
|
-
])) :
|
|
4043
|
-
|
|
4076
|
+
R("p", null, K(y(r)("consumer_groups.errors.add")), 1),
|
|
4077
|
+
w.value.length ? (g(), j("ul", il, [
|
|
4078
|
+
(g(!0), j(ve, null, ye(w.value, (Q, X) => (g(), j("li", { key: X }, K(Q), 1))), 128))
|
|
4079
|
+
])) : G("", !0),
|
|
4080
|
+
R("div", null, K(x.value || m.value), 1)
|
|
4044
4081
|
]),
|
|
4045
4082
|
_: 1
|
|
4046
4083
|
})
|
|
4047
|
-
])) :
|
|
4084
|
+
])) : G("", !0)
|
|
4048
4085
|
])
|
|
4049
4086
|
]),
|
|
4050
4087
|
_: 1
|
|
@@ -4052,12 +4089,12 @@ const nl = { class: "add-to-group-form-container" }, rl = { class: "add-to-group
|
|
|
4052
4089
|
};
|
|
4053
4090
|
}
|
|
4054
4091
|
});
|
|
4055
|
-
const
|
|
4092
|
+
const Ft = (e, n) => {
|
|
4056
4093
|
const t = e.__vccOpts || e;
|
|
4057
4094
|
for (const [r, o] of n)
|
|
4058
4095
|
t[r] = o;
|
|
4059
4096
|
return t;
|
|
4060
|
-
},
|
|
4097
|
+
}, ll = /* @__PURE__ */ Ft(sl, [["__scopeId", "data-v-4d30f3c5"]]), ul = { class: "kong-ui-entities-consumer-groups-list" }, cl = { key: 1 }, dl = /* @__PURE__ */ ae({
|
|
4061
4098
|
__name: "ConsumerGroupList",
|
|
4062
4099
|
props: {
|
|
4063
4100
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4094,139 +4131,133 @@ const Kt = (e, n) => {
|
|
|
4094
4131
|
type: Function,
|
|
4095
4132
|
required: !1,
|
|
4096
4133
|
default: async () => !0
|
|
4097
|
-
},
|
|
4098
|
-
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
4099
|
-
useActionOutside: {
|
|
4100
|
-
type: Boolean,
|
|
4101
|
-
default: !1
|
|
4102
4134
|
}
|
|
4103
4135
|
},
|
|
4104
4136
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4105
4137
|
setup(e, { emit: n }) {
|
|
4106
|
-
var
|
|
4107
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4108
|
-
headers: (
|
|
4109
|
-
}), s =
|
|
4138
|
+
var Nt;
|
|
4139
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Kt({
|
|
4140
|
+
headers: (Nt = t.config) == null ? void 0 : Nt.requestHeaders
|
|
4141
|
+
}), s = O(1), l = M(() => !!t.config.consumerId), c = M(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4110
4142
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4111
4143
|
};
|
|
4112
4144
|
t.config.app === "kongManager" && (d.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4113
|
-
const u = d,
|
|
4114
|
-
"data-testid":
|
|
4115
|
-
}), f =
|
|
4116
|
-
var
|
|
4117
|
-
let
|
|
4118
|
-
return t.config.app === "konnect" ?
|
|
4119
|
-
}), I =
|
|
4120
|
-
const
|
|
4121
|
-
return
|
|
4122
|
-
isExactMatch:
|
|
4145
|
+
const u = d, m = (E) => ({
|
|
4146
|
+
"data-testid": E.username ?? E.custom_id ?? E.id
|
|
4147
|
+
}), f = M(() => {
|
|
4148
|
+
var H, le, ke, Ee;
|
|
4149
|
+
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4150
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (ke = t.config) != null && ke.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4151
|
+
}), I = O(""), v = M(() => {
|
|
4152
|
+
const E = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4153
|
+
return E ? {
|
|
4154
|
+
isExactMatch: E,
|
|
4123
4155
|
fields: {
|
|
4124
4156
|
username: d.name,
|
|
4125
4157
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4126
4158
|
},
|
|
4127
4159
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4128
4160
|
} : {
|
|
4129
|
-
isExactMatch:
|
|
4161
|
+
isExactMatch: E,
|
|
4130
4162
|
fields: {
|
|
4131
4163
|
name: d.name
|
|
4132
4164
|
},
|
|
4133
4165
|
schema: t.config.filterSchema
|
|
4134
4166
|
};
|
|
4135
|
-
}), p =
|
|
4167
|
+
}), p = M(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: b } = nl(t.config, f.value, p.value), k = () => {
|
|
4136
4168
|
I.value = "";
|
|
4137
|
-
},
|
|
4169
|
+
}, x = () => {
|
|
4138
4170
|
s.value++;
|
|
4139
|
-
}, ne =
|
|
4140
|
-
const
|
|
4141
|
-
if (!
|
|
4171
|
+
}, ne = O(""), pe = (E, H) => {
|
|
4172
|
+
const le = E.id;
|
|
4173
|
+
if (!H(le)) {
|
|
4142
4174
|
n("copy:error", {
|
|
4143
|
-
entity:
|
|
4175
|
+
entity: E,
|
|
4144
4176
|
field: "id",
|
|
4145
4177
|
message: o("consumer_groups.errors.copy")
|
|
4146
4178
|
});
|
|
4147
4179
|
return;
|
|
4148
4180
|
}
|
|
4149
4181
|
n("copy:success", {
|
|
4150
|
-
entity:
|
|
4182
|
+
entity: E,
|
|
4151
4183
|
field: "id",
|
|
4152
|
-
message: o("consumer_groups.copy.success", { val:
|
|
4184
|
+
message: o("consumer_groups.copy.success", { val: le })
|
|
4153
4185
|
});
|
|
4154
|
-
}, z = (
|
|
4155
|
-
const
|
|
4156
|
-
if (!
|
|
4186
|
+
}, z = (E, H) => {
|
|
4187
|
+
const le = JSON.stringify(E);
|
|
4188
|
+
if (!H(le)) {
|
|
4157
4189
|
n("copy:error", {
|
|
4158
|
-
entity:
|
|
4190
|
+
entity: E,
|
|
4159
4191
|
message: o("consumer_groups.errors.copy")
|
|
4160
4192
|
});
|
|
4161
4193
|
return;
|
|
4162
4194
|
}
|
|
4163
4195
|
n("copy:success", {
|
|
4164
|
-
entity:
|
|
4196
|
+
entity: E,
|
|
4165
4197
|
message: o("consumer_groups.copy.success_brief")
|
|
4166
4198
|
});
|
|
4167
|
-
}, w = async (
|
|
4168
|
-
var
|
|
4169
|
-
await ((
|
|
4170
|
-
},
|
|
4199
|
+
}, w = async (E) => {
|
|
4200
|
+
var le;
|
|
4201
|
+
await ((le = t.canRetrieve) == null ? void 0 : le.call(t, E)) && a.push(t.config.getViewRoute(E.id));
|
|
4202
|
+
}, N = (E) => ({
|
|
4171
4203
|
label: o("consumer_groups.actions.view"),
|
|
4172
|
-
to: t.config.getViewRoute(
|
|
4173
|
-
}),
|
|
4204
|
+
to: t.config.getViewRoute(E)
|
|
4205
|
+
}), B = (E) => ({
|
|
4174
4206
|
label: o("consumer_groups.actions.edit"),
|
|
4175
|
-
to: t.config.getEditRoute(
|
|
4176
|
-
}),
|
|
4177
|
-
|
|
4207
|
+
to: t.config.getEditRoute(E)
|
|
4208
|
+
}), C = O(void 0), S = O(!1), T = O(!1), P = O(""), J = el(t.config, f.value), Q = (E) => {
|
|
4209
|
+
C.value = E, S.value = !0;
|
|
4178
4210
|
}, X = () => {
|
|
4179
|
-
|
|
4211
|
+
S.value = !1;
|
|
4180
4212
|
}, ee = async () => {
|
|
4181
|
-
var
|
|
4182
|
-
if ((
|
|
4213
|
+
var E, H, le;
|
|
4214
|
+
if ((E = C.value) != null && E.id) {
|
|
4183
4215
|
T.value = !0;
|
|
4184
4216
|
try {
|
|
4185
|
-
await i.delete(J(
|
|
4186
|
-
} catch (
|
|
4187
|
-
P.value = ((
|
|
4217
|
+
await i.delete(J(C.value.id)), T.value = !1, S.value = !1, s.value++, n("delete:success", C.value);
|
|
4218
|
+
} catch (ke) {
|
|
4219
|
+
P.value = ((le = (H = ke.response) == null ? void 0 : H.data) == null ? void 0 : le.message) || ke.message || o("consumer_groups.errors.delete"), n("error", ke);
|
|
4188
4220
|
} finally {
|
|
4189
4221
|
T.value = !1;
|
|
4190
4222
|
}
|
|
4191
4223
|
}
|
|
4192
|
-
},
|
|
4193
|
-
|
|
4224
|
+
}, ie = O(!1), Ve = () => {
|
|
4225
|
+
ie.value = !0;
|
|
4194
4226
|
}, _ = () => {
|
|
4195
|
-
|
|
4196
|
-
}, L = (
|
|
4197
|
-
|
|
4198
|
-
},
|
|
4227
|
+
ie.value = !1;
|
|
4228
|
+
}, L = (E, H) => {
|
|
4229
|
+
H || _(), s.value++, n("add:success", E);
|
|
4230
|
+
}, re = () => {
|
|
4199
4231
|
l.value && Ve();
|
|
4200
|
-
},
|
|
4201
|
-
|
|
4232
|
+
}, U = O(void 0), D = O(!1), ge = O(""), _e = (E) => {
|
|
4233
|
+
U.value = E, D.value = !0;
|
|
4202
4234
|
}, ce = () => {
|
|
4203
|
-
D.value = !1,
|
|
4204
|
-
},
|
|
4205
|
-
var
|
|
4206
|
-
let
|
|
4207
|
-
return t.config.app === "konnect" ?
|
|
4208
|
-
}), De =
|
|
4209
|
-
if (
|
|
4235
|
+
D.value = !1, U.value = void 0;
|
|
4236
|
+
}, Ne = M(() => {
|
|
4237
|
+
var H, le, ke, Ee;
|
|
4238
|
+
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4239
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (ke = t.config) != null && ke.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4240
|
+
}), De = O(!1), ir = async () => {
|
|
4241
|
+
if (U.value) {
|
|
4210
4242
|
De.value = !0;
|
|
4211
4243
|
try {
|
|
4212
|
-
const
|
|
4213
|
-
await i.delete(
|
|
4214
|
-
} catch (
|
|
4215
|
-
ge.value =
|
|
4244
|
+
const E = Ne.value.replace(/{consumerGroupId}/gi, U.value.id);
|
|
4245
|
+
await i.delete(E), n("remove:success", U.value), ce(), s.value++;
|
|
4246
|
+
} catch (E) {
|
|
4247
|
+
ge.value = E.message || o("consumer_groups.errors.delete"), n("error", E);
|
|
4216
4248
|
} finally {
|
|
4217
4249
|
De.value = !1;
|
|
4218
4250
|
}
|
|
4219
4251
|
}
|
|
4220
|
-
}
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
ne.value = o("consumer_groups.errors.general"), n("error", O.error);
|
|
4252
|
+
};
|
|
4253
|
+
Se(b, (E) => {
|
|
4254
|
+
if (E.status === Oe.Error) {
|
|
4255
|
+
ne.value = o("consumer_groups.errors.general"), n("error", E.error);
|
|
4225
4256
|
return;
|
|
4226
4257
|
}
|
|
4227
4258
|
ne.value = "";
|
|
4228
4259
|
});
|
|
4229
|
-
const pt =
|
|
4260
|
+
const pt = O({
|
|
4230
4261
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4231
4262
|
ctaText: void 0,
|
|
4232
4263
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4234,11 +4265,10 @@ const Kt = (e, n) => {
|
|
|
4234
4265
|
});
|
|
4235
4266
|
return Qe(async () => {
|
|
4236
4267
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4237
|
-
}), (
|
|
4238
|
-
const
|
|
4239
|
-
return
|
|
4240
|
-
(
|
|
4241
|
-
key: Bt.value,
|
|
4268
|
+
}), (E, H) => {
|
|
4269
|
+
const le = q("KButton"), ke = q("KBadge"), Ee = q("KTruncate"), Ge = q("KDropdownItem"), Bt = q("KClipboardProvider"), sr = q("KPrompt");
|
|
4270
|
+
return g(), j("div", ul, [
|
|
4271
|
+
F(y($s), {
|
|
4242
4272
|
"cache-identifier": e.cacheIdentifier,
|
|
4243
4273
|
"disable-pagination": l.value,
|
|
4244
4274
|
"disable-pagination-page-jump": "",
|
|
@@ -4246,140 +4276,134 @@ const Kt = (e, n) => {
|
|
|
4246
4276
|
"empty-state-options": pt.value,
|
|
4247
4277
|
"enable-entity-actions": "",
|
|
4248
4278
|
"error-message": ne.value,
|
|
4249
|
-
fetcher: y(
|
|
4279
|
+
fetcher: y(A),
|
|
4250
4280
|
"fetcher-cache-key": s.value,
|
|
4251
4281
|
"pagination-type": "offset",
|
|
4252
4282
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4253
4283
|
query: I.value,
|
|
4254
|
-
"row-attributes":
|
|
4284
|
+
"row-attributes": m,
|
|
4255
4285
|
"table-headers": y(u),
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
onSort: A
|
|
4286
|
+
onClearSearchInput: k,
|
|
4287
|
+
"onClick:row": H[3] || (H[3] = (W) => w(W)),
|
|
4288
|
+
onEmptyStateCtaClicked: re,
|
|
4289
|
+
onSort: x
|
|
4261
4290
|
}, {
|
|
4262
4291
|
"toolbar-filter": h(() => [
|
|
4263
|
-
l.value ?
|
|
4292
|
+
l.value ? G("", !0) : (g(), V(y(Hs), {
|
|
4264
4293
|
key: 0,
|
|
4265
4294
|
modelValue: I.value,
|
|
4266
|
-
"onUpdate:modelValue":
|
|
4295
|
+
"onUpdate:modelValue": H[0] || (H[0] = (W) => I.value = W),
|
|
4267
4296
|
config: v.value
|
|
4268
4297
|
}, null, 8, ["modelValue", "config"]))
|
|
4269
4298
|
]),
|
|
4270
4299
|
"toolbar-button": h(() => [
|
|
4271
|
-
(
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
}, 8, ["to"])
|
|
4291
|
-
]),
|
|
4292
|
-
_: 1
|
|
4293
|
-
}, 8, ["auth-function"])
|
|
4294
|
-
], 8, ["disabled"]))
|
|
4300
|
+
F(y(Xe), {
|
|
4301
|
+
"auth-function": () => e.canCreate()
|
|
4302
|
+
}, {
|
|
4303
|
+
default: h(() => [
|
|
4304
|
+
F(le, {
|
|
4305
|
+
appearance: "primary",
|
|
4306
|
+
"data-testid": "toolbar-add-consumer-group",
|
|
4307
|
+
icon: "plus",
|
|
4308
|
+
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4309
|
+
onClick: H[1] || (H[1] = () => e.config.consumerId ? Ve() : void 0)
|
|
4310
|
+
}, {
|
|
4311
|
+
default: h(() => [
|
|
4312
|
+
Z(K(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4313
|
+
]),
|
|
4314
|
+
_: 1
|
|
4315
|
+
}, 8, ["to"])
|
|
4316
|
+
]),
|
|
4317
|
+
_: 1
|
|
4318
|
+
}, 8, ["auth-function"])
|
|
4295
4319
|
]),
|
|
4296
4320
|
name: h(({ rowValue: W }) => [
|
|
4297
|
-
|
|
4321
|
+
R("b", null, K(W ?? "-"), 1)
|
|
4298
4322
|
]),
|
|
4299
4323
|
consumers_count: h(({ rowValue: W }) => [
|
|
4300
|
-
Z(
|
|
4324
|
+
Z(K(W ?? "-"), 1)
|
|
4301
4325
|
]),
|
|
4302
4326
|
tags: h(({ rowValue: W }) => [
|
|
4303
|
-
(W == null ? void 0 : W.length) > 0 ? (
|
|
4327
|
+
(W == null ? void 0 : W.length) > 0 ? (g(), V(Ee, { key: 0 }, {
|
|
4304
4328
|
default: h(() => [
|
|
4305
|
-
(
|
|
4306
|
-
key:
|
|
4307
|
-
onClick:
|
|
4329
|
+
(g(!0), j(ve, null, ye(W, (Be) => (g(), V(ke, {
|
|
4330
|
+
key: Be,
|
|
4331
|
+
onClick: H[2] || (H[2] = rt(() => {
|
|
4308
4332
|
}, ["stop"]))
|
|
4309
4333
|
}, {
|
|
4310
4334
|
default: h(() => [
|
|
4311
|
-
Z(
|
|
4335
|
+
Z(K(Be), 1)
|
|
4312
4336
|
]),
|
|
4313
4337
|
_: 2
|
|
4314
4338
|
}, 1024))), 128))
|
|
4315
4339
|
]),
|
|
4316
4340
|
_: 2
|
|
4317
|
-
}, 1024)) : (
|
|
4341
|
+
}, 1024)) : (g(), j("span", cl, "-"))
|
|
4318
4342
|
]),
|
|
4319
4343
|
actions: h(({ row: W }) => [
|
|
4320
|
-
|
|
4321
|
-
default: h(({ copyToClipboard:
|
|
4322
|
-
|
|
4344
|
+
F(Bt, null, {
|
|
4345
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4346
|
+
F(Ge, {
|
|
4323
4347
|
"data-testid": "action-entity-copy-id",
|
|
4324
|
-
onClick: (
|
|
4348
|
+
onClick: (lr) => pe(W, Be)
|
|
4325
4349
|
}, {
|
|
4326
4350
|
default: h(() => [
|
|
4327
|
-
Z(
|
|
4351
|
+
Z(K(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4328
4352
|
]),
|
|
4329
4353
|
_: 2
|
|
4330
4354
|
}, 1032, ["onClick"])
|
|
4331
4355
|
]),
|
|
4332
4356
|
_: 2
|
|
4333
4357
|
}, 1024),
|
|
4334
|
-
|
|
4335
|
-
default: h(({ copyToClipboard:
|
|
4336
|
-
|
|
4358
|
+
F(Bt, null, {
|
|
4359
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4360
|
+
F(Ge, {
|
|
4337
4361
|
"data-testid": "action-entity-copy-json",
|
|
4338
|
-
onClick: (
|
|
4362
|
+
onClick: (lr) => z(W, Be)
|
|
4339
4363
|
}, {
|
|
4340
4364
|
default: h(() => [
|
|
4341
|
-
Z(
|
|
4365
|
+
Z(K(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4342
4366
|
]),
|
|
4343
4367
|
_: 2
|
|
4344
4368
|
}, 1032, ["onClick"])
|
|
4345
4369
|
]),
|
|
4346
4370
|
_: 2
|
|
4347
4371
|
}, 1024),
|
|
4348
|
-
|
|
4372
|
+
F(y(Xe), {
|
|
4349
4373
|
"auth-function": () => e.canRetrieve(W)
|
|
4350
4374
|
}, {
|
|
4351
4375
|
default: h(() => [
|
|
4352
|
-
|
|
4376
|
+
F(Ge, {
|
|
4353
4377
|
"data-testid": "action-entity-view",
|
|
4354
4378
|
"has-divider": "",
|
|
4355
|
-
item:
|
|
4379
|
+
item: N(W.id)
|
|
4356
4380
|
}, null, 8, ["item"])
|
|
4357
4381
|
]),
|
|
4358
4382
|
_: 2
|
|
4359
4383
|
}, 1032, ["auth-function"]),
|
|
4360
|
-
|
|
4384
|
+
F(y(Xe), {
|
|
4361
4385
|
"auth-function": () => e.canEdit(W)
|
|
4362
4386
|
}, {
|
|
4363
4387
|
default: h(() => [
|
|
4364
|
-
|
|
4388
|
+
F(Ge, {
|
|
4365
4389
|
"data-testid": "action-entity-edit",
|
|
4366
|
-
item:
|
|
4390
|
+
item: B(W.id)
|
|
4367
4391
|
}, null, 8, ["item"])
|
|
4368
4392
|
]),
|
|
4369
4393
|
_: 2
|
|
4370
4394
|
}, 1032, ["auth-function"]),
|
|
4371
|
-
|
|
4395
|
+
F(y(Xe), {
|
|
4372
4396
|
"auth-function": () => e.canDelete(W)
|
|
4373
4397
|
}, {
|
|
4374
4398
|
default: h(() => [
|
|
4375
|
-
|
|
4399
|
+
F(Ge, {
|
|
4376
4400
|
"data-testid": "action-entity-delete",
|
|
4377
4401
|
"has-divider": "",
|
|
4378
4402
|
"is-dangerous": "",
|
|
4379
4403
|
onClick: () => e.config.consumerId ? _e(W) : Q(W)
|
|
4380
4404
|
}, {
|
|
4381
4405
|
default: h(() => [
|
|
4382
|
-
Z(
|
|
4406
|
+
Z(K(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4383
4407
|
]),
|
|
4384
4408
|
_: 2
|
|
4385
4409
|
}, 1032, ["onClick"])
|
|
@@ -4388,68 +4412,68 @@ const Kt = (e, n) => {
|
|
|
4388
4412
|
}, 1032, ["auth-function"])
|
|
4389
4413
|
]),
|
|
4390
4414
|
_: 1
|
|
4391
|
-
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"
|
|
4392
|
-
|
|
4415
|
+
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4416
|
+
F(y(Os), {
|
|
4393
4417
|
"action-pending": T.value,
|
|
4394
4418
|
"data-testid": "delete-consumer-group-modal",
|
|
4395
4419
|
description: y(o)("consumer_groups.delete.description"),
|
|
4396
|
-
"entity-name":
|
|
4397
|
-
"entity-type": y(
|
|
4420
|
+
"entity-name": C.value && (C.value.name || C.value.id),
|
|
4421
|
+
"entity-type": y(dn).ConsumerGroup,
|
|
4398
4422
|
error: P.value,
|
|
4399
4423
|
title: y(o)("consumer_groups.delete.title"),
|
|
4400
|
-
visible:
|
|
4424
|
+
visible: S.value,
|
|
4401
4425
|
onCancel: X,
|
|
4402
4426
|
onProceed: ee
|
|
4403
4427
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4404
|
-
e.config.consumerId ? (
|
|
4428
|
+
e.config.consumerId ? (g(), V(ll, {
|
|
4405
4429
|
key: 0,
|
|
4406
4430
|
config: e.config,
|
|
4407
4431
|
"data-testid": "add-to-group-modal",
|
|
4408
|
-
visible:
|
|
4409
|
-
"onAdd:partialSuccess":
|
|
4410
|
-
"onAdd:success":
|
|
4432
|
+
visible: ie.value,
|
|
4433
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (W) => L(W, !0)),
|
|
4434
|
+
"onAdd:success": H[5] || (H[5] = (W) => L(W)),
|
|
4411
4435
|
onCancel: _
|
|
4412
|
-
}, null, 8, ["config", "visible"])) :
|
|
4413
|
-
e.config.consumerId &&
|
|
4436
|
+
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4437
|
+
e.config.consumerId && U.value ? (g(), V(sr, {
|
|
4414
4438
|
key: 1,
|
|
4415
4439
|
"data-testid": "exit-group-modal",
|
|
4416
4440
|
"is-visible": D.value,
|
|
4417
4441
|
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4418
4442
|
type: "danger",
|
|
4419
4443
|
onCanceled: ce,
|
|
4420
|
-
onProceed:
|
|
4444
|
+
onProceed: ir
|
|
4421
4445
|
}, {
|
|
4422
4446
|
"body-content": h(() => [
|
|
4423
|
-
|
|
4447
|
+
F(y(r), {
|
|
4424
4448
|
class: "exit-modal-message",
|
|
4425
4449
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4426
4450
|
tag: "p"
|
|
4427
4451
|
}, Te({
|
|
4428
4452
|
consumerGroup: h(() => [
|
|
4429
|
-
|
|
4453
|
+
R("strong", null, K(U.value.name || U.value.id), 1)
|
|
4430
4454
|
]),
|
|
4431
4455
|
_: 2
|
|
4432
4456
|
}, [
|
|
4433
4457
|
e.config.consumerUsername ? {
|
|
4434
4458
|
name: "consumer",
|
|
4435
4459
|
fn: h(() => [
|
|
4436
|
-
|
|
4460
|
+
R("strong", null, K(e.config.consumerUsername), 1)
|
|
4437
4461
|
]),
|
|
4438
4462
|
key: "0"
|
|
4439
4463
|
} : void 0
|
|
4440
4464
|
]), 1032, ["keypath"]),
|
|
4441
|
-
|
|
4465
|
+
R("p", null, K(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4442
4466
|
]),
|
|
4443
4467
|
_: 1
|
|
4444
|
-
}, 8, ["is-visible", "title"])) :
|
|
4468
|
+
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
4445
4469
|
]);
|
|
4446
4470
|
};
|
|
4447
4471
|
}
|
|
4448
4472
|
});
|
|
4449
|
-
const
|
|
4473
|
+
const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { class: "kong-ui-entities-consumer-group-form" }, fl = { class: "select-item-label" }, ml = {
|
|
4450
4474
|
key: 0,
|
|
4451
4475
|
class: "select-item-desc"
|
|
4452
|
-
},
|
|
4476
|
+
}, gl = /* @__PURE__ */ ae({
|
|
4453
4477
|
__name: "ConsumerGroupForm",
|
|
4454
4478
|
props: {
|
|
4455
4479
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4467,8 +4491,8 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4467
4491
|
},
|
|
4468
4492
|
emits: ["update", "error", "loading"],
|
|
4469
4493
|
setup(e, { emit: n }) {
|
|
4470
|
-
var ee,
|
|
4471
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a =
|
|
4494
|
+
var ee, ie, Ve;
|
|
4495
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a = Pt({
|
|
4472
4496
|
fields: {
|
|
4473
4497
|
name: "",
|
|
4474
4498
|
tags: "",
|
|
@@ -4476,7 +4500,7 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4476
4500
|
},
|
|
4477
4501
|
errorMessage: "",
|
|
4478
4502
|
readonly: !1
|
|
4479
|
-
}), i =
|
|
4503
|
+
}), i = Pt({
|
|
4480
4504
|
name: "",
|
|
4481
4505
|
tags: "",
|
|
4482
4506
|
consumers: []
|
|
@@ -4486,25 +4510,25 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4486
4510
|
error: c,
|
|
4487
4511
|
loadItems: d,
|
|
4488
4512
|
results: u
|
|
4489
|
-
} =
|
|
4513
|
+
} = ar(t.config, (ie = $e.form[(ee = t.config) == null ? void 0 : ee.app]) == null ? void 0 : ie.consumersList, "", {
|
|
4490
4514
|
fetchedItemsKey: "data",
|
|
4491
4515
|
searchKeys: ["username", "custom_id", "id"]
|
|
4492
|
-
}), { axiosInstance:
|
|
4516
|
+
}), { axiosInstance: m } = Kt({
|
|
4493
4517
|
headers: (Ve = t.config) == null ? void 0 : Ve.requestHeaders
|
|
4494
|
-
}), { getMessageFromError: f } =
|
|
4518
|
+
}), { getMessageFromError: f } = tl(), I = M(() => u.value.map((_) => ({
|
|
4495
4519
|
label: _.username || _.custom_id,
|
|
4496
4520
|
value: _.id,
|
|
4497
4521
|
selected: a.fields.consumers.includes(_.id),
|
|
4498
4522
|
data: _
|
|
4499
4523
|
// we need this to determine whether or not to show the description text
|
|
4500
|
-
}))), v =
|
|
4524
|
+
}))), v = M(() => {
|
|
4501
4525
|
var _, L;
|
|
4502
4526
|
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4503
|
-
}), p =
|
|
4504
|
-
var D, ge, _e, ce,
|
|
4505
|
-
let
|
|
4506
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4507
|
-
},
|
|
4527
|
+
}), p = M(() => t.consumerGroupId ? nt.Edit : nt.Create), A = M(() => !!a.fields.name && !w.value), b = M(() => JSON.stringify(a.fields) !== JSON.stringify(i)), k = (_, L = "", re = "") => {
|
|
4528
|
+
var D, ge, _e, ce, Ne, De;
|
|
4529
|
+
let U = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4530
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (De = t.config) != null && De.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (U = U.replace(/{consumerId}/gi, re)), U;
|
|
4531
|
+
}, x = () => {
|
|
4508
4532
|
var _;
|
|
4509
4533
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4510
4534
|
}, ne = (_) => {
|
|
@@ -4512,76 +4536,76 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4512
4536
|
}, pe = (_) => {
|
|
4513
4537
|
n("loading", _);
|
|
4514
4538
|
}, z = async (_) => {
|
|
4515
|
-
var
|
|
4516
|
-
a.fields.name = ((
|
|
4539
|
+
var re, U, D, ge, _e;
|
|
4540
|
+
a.fields.name = ((re = _ == null ? void 0 : _.item) == null ? void 0 : re.name) || ((U = _ == null ? void 0 : _.consumer_group) == null ? void 0 : U.name) || (_ == null ? void 0 : _.name) || "";
|
|
4517
4541
|
const L = ((D = _ == null ? void 0 : _.item) == null ? void 0 : D.tags) || (_ == null ? void 0 : _.consumer_group.tags) || (_ == null ? void 0 : _.tags) || [];
|
|
4518
4542
|
if (a.fields.tags = (L == null ? void 0 : L.join(", ")) || "", "consumers" in _)
|
|
4519
4543
|
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((ce) => ce.id)) || [];
|
|
4520
4544
|
else
|
|
4521
4545
|
try {
|
|
4522
|
-
const { data: ce } = await
|
|
4523
|
-
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((
|
|
4546
|
+
const { data: ce } = await m.get(k("getConsumers"));
|
|
4547
|
+
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4524
4548
|
} catch (ce) {
|
|
4525
|
-
|
|
4549
|
+
S(ce);
|
|
4526
4550
|
}
|
|
4527
4551
|
Object.assign(i, a.fields);
|
|
4528
|
-
}, w =
|
|
4552
|
+
}, w = M(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4529
4553
|
var _, L;
|
|
4530
4554
|
return {
|
|
4531
4555
|
name: a.fields.name,
|
|
4532
|
-
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((
|
|
4556
|
+
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((re) => String(re || "").trim())) == null ? void 0 : L.filter((re) => re !== "")
|
|
4533
4557
|
};
|
|
4534
|
-
},
|
|
4558
|
+
}, B = async (_, L = "") => await m.post(k("addConsumer", L, _), { consumer: _ }), C = async (_, L = "") => await m.delete(k("removeConsumer", L, _)), S = (_) => {
|
|
4535
4559
|
a.errorMessage = f(_), n("error", _);
|
|
4536
4560
|
}, T = (_ = t.consumerGroupId) => {
|
|
4537
4561
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4538
|
-
}, P = (_, L,
|
|
4539
|
-
const
|
|
4540
|
-
|
|
4541
|
-
code:
|
|
4562
|
+
}, P = (_, L, re = t.consumerGroupId) => {
|
|
4563
|
+
const U = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4564
|
+
U ? S({
|
|
4565
|
+
code: U.status,
|
|
4542
4566
|
message: L
|
|
4543
|
-
}) : T(
|
|
4567
|
+
}) : T(re);
|
|
4544
4568
|
}, J = async () => {
|
|
4545
4569
|
let _ = "";
|
|
4546
4570
|
try {
|
|
4547
|
-
const { data: L } = await
|
|
4571
|
+
const { data: L } = await m.post(k("create"), N());
|
|
4548
4572
|
_ = "item" in L ? L.item.id : L.id;
|
|
4549
4573
|
} catch (L) {
|
|
4550
|
-
|
|
4574
|
+
S(L);
|
|
4551
4575
|
}
|
|
4552
4576
|
if (a.fields.consumers.length > 0 && _)
|
|
4553
4577
|
try {
|
|
4554
|
-
const L = a.fields.consumers.map((
|
|
4555
|
-
P(
|
|
4578
|
+
const L = a.fields.consumers.map((U) => B(U, _)), re = await Promise.allSettled(L);
|
|
4579
|
+
P(re, r("consumer_groups.errors.add_consumer"), _);
|
|
4556
4580
|
} catch (L) {
|
|
4557
|
-
|
|
4581
|
+
S(L);
|
|
4558
4582
|
}
|
|
4559
4583
|
else
|
|
4560
4584
|
a.fields.consumers.length === 0 && _ && T(_);
|
|
4561
4585
|
}, Q = async () => {
|
|
4562
|
-
var
|
|
4586
|
+
var re;
|
|
4563
4587
|
try {
|
|
4564
|
-
((
|
|
4565
|
-
} catch (
|
|
4566
|
-
|
|
4588
|
+
((re = t.config) == null ? void 0 : re.app) === "konnect" ? await m.put(k("edit"), N()) : await m.patch(k("edit"), N());
|
|
4589
|
+
} catch (U) {
|
|
4590
|
+
S(U);
|
|
4567
4591
|
}
|
|
4568
|
-
const _ = a.fields.consumers.filter((
|
|
4592
|
+
const _ = a.fields.consumers.filter((U) => !i.consumers.includes(U)), L = i.consumers.filter((U) => !a.fields.consumers.includes(U));
|
|
4569
4593
|
if (L.length === 0 && _.length === 0)
|
|
4570
4594
|
T();
|
|
4571
4595
|
else {
|
|
4572
4596
|
if (L.length > 0)
|
|
4573
4597
|
try {
|
|
4574
|
-
const
|
|
4598
|
+
const U = L.map((ge) => C(ge)), D = await Promise.allSettled(U);
|
|
4575
4599
|
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4576
|
-
} catch (
|
|
4577
|
-
|
|
4600
|
+
} catch (U) {
|
|
4601
|
+
S(U);
|
|
4578
4602
|
}
|
|
4579
4603
|
if (_.length > 0)
|
|
4580
4604
|
try {
|
|
4581
|
-
const
|
|
4605
|
+
const U = _.map((ge) => B(ge)), D = await Promise.allSettled(U);
|
|
4582
4606
|
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4583
|
-
} catch (
|
|
4584
|
-
|
|
4607
|
+
} catch (U) {
|
|
4608
|
+
S(U);
|
|
4585
4609
|
}
|
|
4586
4610
|
}
|
|
4587
4611
|
}, X = async () => {
|
|
@@ -4594,28 +4618,28 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4594
4618
|
return Qe(async () => {
|
|
4595
4619
|
await d();
|
|
4596
4620
|
}), (_, L) => {
|
|
4597
|
-
const
|
|
4598
|
-
return
|
|
4599
|
-
|
|
4600
|
-
"can-submit":
|
|
4621
|
+
const re = q("KInput"), U = q("KMultiselect");
|
|
4622
|
+
return g(), j("div", pl, [
|
|
4623
|
+
F(y(Cs), {
|
|
4624
|
+
"can-submit": A.value && b.value,
|
|
4601
4625
|
config: e.config,
|
|
4602
4626
|
"edit-id": e.consumerGroupId,
|
|
4603
4627
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4604
4628
|
"fetch-url": v.value,
|
|
4605
4629
|
"is-readonly": a.readonly,
|
|
4606
|
-
onCancel:
|
|
4630
|
+
onCancel: x,
|
|
4607
4631
|
"onFetch:error": L[3] || (L[3] = (D) => ne(D)),
|
|
4608
4632
|
"onFetch:success": z,
|
|
4609
4633
|
onLoading: L[4] || (L[4] = (D) => pe(D)),
|
|
4610
4634
|
onSubmit: X
|
|
4611
4635
|
}, {
|
|
4612
4636
|
default: h(() => [
|
|
4613
|
-
|
|
4637
|
+
F(y(un), {
|
|
4614
4638
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4615
4639
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4616
4640
|
}, {
|
|
4617
4641
|
default: h(() => [
|
|
4618
|
-
|
|
4642
|
+
F(re, {
|
|
4619
4643
|
modelValue: a.fields.name,
|
|
4620
4644
|
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.fields.name = D),
|
|
4621
4645
|
modelModifiers: { trim: !0 },
|
|
@@ -4626,7 +4650,7 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4626
4650
|
required: "",
|
|
4627
4651
|
type: "text"
|
|
4628
4652
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4629
|
-
|
|
4653
|
+
F(re, {
|
|
4630
4654
|
modelValue: a.fields.tags,
|
|
4631
4655
|
"onUpdate:modelValue": L[1] || (L[1] = (D) => a.fields.tags = D),
|
|
4632
4656
|
modelModifiers: { trim: !0 },
|
|
@@ -4644,13 +4668,13 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4644
4668
|
]),
|
|
4645
4669
|
_: 1
|
|
4646
4670
|
}, 8, ["description", "title"]),
|
|
4647
|
-
|
|
4671
|
+
F(y(un), {
|
|
4648
4672
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4649
4673
|
"has-divider": "",
|
|
4650
4674
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4651
4675
|
}, {
|
|
4652
4676
|
default: h(() => [
|
|
4653
|
-
|
|
4677
|
+
F(U, {
|
|
4654
4678
|
modelValue: a.fields.consumers,
|
|
4655
4679
|
"onUpdate:modelValue": L[2] || (L[2] = (D) => a.fields.consumers = D),
|
|
4656
4680
|
appearance: "select",
|
|
@@ -4666,8 +4690,8 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4666
4690
|
"item-template": h(({ item: D }) => {
|
|
4667
4691
|
var ge, _e, ce;
|
|
4668
4692
|
return [
|
|
4669
|
-
|
|
4670
|
-
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (
|
|
4693
|
+
R("div", fl, K(D.label), 1),
|
|
4694
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (g(), j("div", ml, K((ce = D == null ? void 0 : D.data) == null ? void 0 : ce.custom_id), 1)) : G("", !0)
|
|
4671
4695
|
];
|
|
4672
4696
|
}),
|
|
4673
4697
|
_: 1
|
|
@@ -4682,7 +4706,7 @@ const Sl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-63ea450f"]]), dl = { cl
|
|
|
4682
4706
|
};
|
|
4683
4707
|
}
|
|
4684
4708
|
});
|
|
4685
|
-
const
|
|
4709
|
+
const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { class: "kong-ui-consumer-group-entity-config-card" }, Ml = /* @__PURE__ */ ae({
|
|
4686
4710
|
__name: "ConsumerGroupConfigCard",
|
|
4687
4711
|
props: {
|
|
4688
4712
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4709,7 +4733,7 @@ const xl = /* @__PURE__ */ Kt(ml, [["__scopeId", "data-v-102d40d2"]]), gl = { cl
|
|
|
4709
4733
|
},
|
|
4710
4734
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4711
4735
|
setup(e) {
|
|
4712
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4736
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = M(() => $e.form[n.config.app].edit), o = O({
|
|
4713
4737
|
id: {},
|
|
4714
4738
|
name: {},
|
|
4715
4739
|
created_at: {},
|
|
@@ -4718,8 +4742,8 @@ const xl = /* @__PURE__ */ Kt(ml, [["__scopeId", "data-v-102d40d2"]]), gl = { cl
|
|
|
4718
4742
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4719
4743
|
}
|
|
4720
4744
|
});
|
|
4721
|
-
return (a, i) => (
|
|
4722
|
-
|
|
4745
|
+
return (a, i) => (g(), j("div", yl, [
|
|
4746
|
+
F(y(hs), {
|
|
4723
4747
|
config: e.config,
|
|
4724
4748
|
"config-card-doc": e.configCardDoc,
|
|
4725
4749
|
"config-schema": o.value,
|
|
@@ -4735,7 +4759,7 @@ const xl = /* @__PURE__ */ Kt(ml, [["__scopeId", "data-v-102d40d2"]]), gl = { cl
|
|
|
4735
4759
|
}
|
|
4736
4760
|
});
|
|
4737
4761
|
export {
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4762
|
+
Ml as ConsumerGroupConfigCard,
|
|
4763
|
+
$l as ConsumerGroupForm,
|
|
4764
|
+
Tl as ConsumerGroupList
|
|
4741
4765
|
};
|