@kong-ui-public/entities-keys 2.3.7 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-keys.es.js +707 -707
- package/dist/entities-keys.umd.js +2 -2
- package/package.json +8 -8
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ie, ref as K, computed as A, watch as ke, renderSlot as ee, createCommentVNode as H, unref as m, resolveComponent as q, openBlock as p, createElementBlock as j, createVNode as O, withCtx as h, createTextVNode as G, toDisplayString as E, useCssVars as Xt, useSlots as et, createElementVNode as U, createSlots as _e, createBlock as N, resolveDynamicComponent as Oe, normalizeProps as aa, guardReactiveProps as ia, Fragment as ge, renderList as me, mergeProps as lt, normalizeClass as Ae, onBeforeMount as tt, withModifiers as Ye, withDirectives as Ue, vShow as Ve, onMounted as ra, onUnmounted as oa, inject as la, normalizeStyle as en, pushScopeId as tn, popScopeId as nn, reactive as At } from "vue";
|
|
2
2
|
import { useRouter as ft } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as an } from "@kong-ui-public/i18n";
|
|
4
|
-
import
|
|
5
|
-
import { BadgeMethodAppearances as
|
|
6
|
-
const
|
|
4
|
+
import sa from "axios";
|
|
5
|
+
import { BadgeMethodAppearances as ca } from "@kong/kongponents";
|
|
6
|
+
const ua = {
|
|
7
7
|
title: "Keys",
|
|
8
8
|
list: {
|
|
9
9
|
toolbar_actions: {
|
|
@@ -115,11 +115,11 @@ const ui = {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
},
|
|
119
|
-
keys:
|
|
118
|
+
}, da = {
|
|
119
|
+
keys: ua
|
|
120
120
|
};
|
|
121
|
-
function
|
|
122
|
-
const e = yt("en-us",
|
|
121
|
+
function pa() {
|
|
122
|
+
const e = yt("en-us", da);
|
|
123
123
|
return {
|
|
124
124
|
i18n: e,
|
|
125
125
|
i18nT: an(e)
|
|
@@ -127,7 +127,7 @@ function pi() {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
const mt = {
|
|
130
|
-
useI18n:
|
|
130
|
+
useI18n: pa
|
|
131
131
|
}, Se = {
|
|
132
132
|
list: {
|
|
133
133
|
konnect: {
|
|
@@ -169,72 +169,72 @@ const mt = {
|
|
|
169
169
|
var rn = /* @__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))(rn || {}), Be = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Be || {}), je = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(je || {}), Z = /* @__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))(Z || {}), fe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(fe || {});
|
|
170
170
|
function gt(e = {}) {
|
|
171
171
|
return {
|
|
172
|
-
axiosInstance:
|
|
172
|
+
axiosInstance: sa.create({
|
|
173
173
|
withCredentials: !0,
|
|
174
174
|
timeout: 3e4,
|
|
175
175
|
...e
|
|
176
176
|
})
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function fa() {
|
|
180
180
|
return {
|
|
181
181
|
debounce: (e, n) => {
|
|
182
182
|
let t;
|
|
183
|
-
return (...
|
|
183
|
+
return (...a) => {
|
|
184
184
|
clearTimeout(t), t = window == null ? void 0 : window.setTimeout(() => {
|
|
185
|
-
e(...
|
|
185
|
+
e(...a);
|
|
186
186
|
}, n);
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
const
|
|
191
|
+
const at = "khcp-user-table-preferences", ya = {
|
|
192
192
|
pageSize: 30,
|
|
193
193
|
sortColumnKey: void 0,
|
|
194
194
|
sortColumnOrder: void 0
|
|
195
195
|
};
|
|
196
|
-
function
|
|
196
|
+
function ma() {
|
|
197
197
|
const e = (t) => {
|
|
198
198
|
if (typeof t == "string")
|
|
199
199
|
try {
|
|
200
200
|
return JSON.parse(t);
|
|
201
|
-
} catch (
|
|
202
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
201
|
+
} catch (a) {
|
|
202
|
+
console.error("useTablePreferences(tryParseJson)", a);
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
}, n = () => {
|
|
206
|
-
const t = e(localStorage.getItem(
|
|
206
|
+
const t = e(localStorage.getItem(at));
|
|
207
207
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
208
208
|
};
|
|
209
209
|
return {
|
|
210
|
-
setTablePreferences: (t,
|
|
210
|
+
setTablePreferences: (t, a) => {
|
|
211
211
|
try {
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
} catch (
|
|
215
|
-
console.error("useTablePreferences(setTablePreferences)",
|
|
212
|
+
const i = n();
|
|
213
|
+
i.set(t, a), localStorage.setItem(at, JSON.stringify(Object.fromEntries(i.entries())));
|
|
214
|
+
} catch (i) {
|
|
215
|
+
console.error("useTablePreferences(setTablePreferences)", i);
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
getTablePreferences: (t) => {
|
|
219
|
-
const
|
|
220
|
-
return (
|
|
219
|
+
const a = n();
|
|
220
|
+
return (a == null ? void 0 : a.get(t)) || void 0 || ya;
|
|
221
221
|
},
|
|
222
222
|
deleteAllTablePreferences: () => {
|
|
223
|
-
localStorage.removeItem(
|
|
223
|
+
localStorage.removeItem(at);
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const
|
|
227
|
+
const ga = {
|
|
228
228
|
actions: {
|
|
229
229
|
copyId: "Copy ID",
|
|
230
230
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
231
231
|
copyToClipboard: "Copied successfully!",
|
|
232
232
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
233
233
|
}
|
|
234
|
-
},
|
|
234
|
+
}, ha = {
|
|
235
235
|
message: "Are you sure you want to delete this {entityType}?",
|
|
236
236
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
237
|
-
},
|
|
237
|
+
}, va = {
|
|
238
238
|
actions: {
|
|
239
239
|
viewConfiguration: "View Configuration",
|
|
240
240
|
save: "Save",
|
|
@@ -250,13 +250,13 @@ const gi = {
|
|
|
250
250
|
errors: {
|
|
251
251
|
edit: "The entity could not be edited at this time."
|
|
252
252
|
}
|
|
253
|
-
},
|
|
253
|
+
}, ka = {
|
|
254
254
|
emptyState: {
|
|
255
255
|
noSearchResultsTitle: "No results found",
|
|
256
256
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
257
257
|
noSearchResultsCtaText: "Clear"
|
|
258
258
|
}
|
|
259
|
-
},
|
|
259
|
+
}, ba = {
|
|
260
260
|
title: "Configuration",
|
|
261
261
|
actions: {
|
|
262
262
|
copy: "Copy JSON"
|
|
@@ -291,7 +291,7 @@ const gi = {
|
|
|
291
291
|
entryTitle: "Entry {index}",
|
|
292
292
|
structuredFormat: "Structured"
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, Ca = {
|
|
295
295
|
filterButtonText: "Filter",
|
|
296
296
|
fieldLabel: "Filter by:",
|
|
297
297
|
inputPlaceholder: "Enter a value",
|
|
@@ -299,15 +299,15 @@ const gi = {
|
|
|
299
299
|
applyButtonText: "Apply",
|
|
300
300
|
clearButtonText: "Clear",
|
|
301
301
|
clearAllButtonText: "Clear all filters"
|
|
302
|
-
},
|
|
302
|
+
}, wa = {
|
|
303
303
|
errors: {
|
|
304
304
|
fetch: "Could not fetch available items",
|
|
305
305
|
invalid: "Please select a valid value"
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, Sa = {
|
|
308
308
|
unexpected: "An unexpected error has occurred",
|
|
309
309
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
310
|
-
},
|
|
310
|
+
}, _a = {
|
|
311
311
|
enable: {
|
|
312
312
|
title: "Enable {entityType}",
|
|
313
313
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -318,19 +318,19 @@ const gi = {
|
|
|
318
318
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
319
319
|
confirmText: "Yes, disable"
|
|
320
320
|
}
|
|
321
|
-
},
|
|
322
|
-
global:
|
|
323
|
-
deleteModal:
|
|
324
|
-
baseForm:
|
|
325
|
-
baseTable:
|
|
326
|
-
baseConfigCard:
|
|
327
|
-
filter:
|
|
328
|
-
debouncedFilter:
|
|
329
|
-
errors:
|
|
330
|
-
toggleModal:
|
|
321
|
+
}, Ia = {
|
|
322
|
+
global: ga,
|
|
323
|
+
deleteModal: ha,
|
|
324
|
+
baseForm: va,
|
|
325
|
+
baseTable: ka,
|
|
326
|
+
baseConfigCard: ba,
|
|
327
|
+
filter: Ca,
|
|
328
|
+
debouncedFilter: wa,
|
|
329
|
+
errors: Sa,
|
|
330
|
+
toggleModal: _a
|
|
331
331
|
};
|
|
332
332
|
function ht() {
|
|
333
|
-
const e = yt("en-us",
|
|
333
|
+
const e = yt("en-us", Ia);
|
|
334
334
|
return {
|
|
335
335
|
i18n: e,
|
|
336
336
|
i18nT: an(e)
|
|
@@ -338,12 +338,12 @@ function ht() {
|
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
340
|
function on() {
|
|
341
|
-
const e = (t,
|
|
342
|
-
if (t.length !==
|
|
341
|
+
const e = (t, a) => (a == null ? void 0 : a[t]) ?? void 0, n = (t, a) => {
|
|
342
|
+
if (t.length !== a.length)
|
|
343
343
|
return !1;
|
|
344
|
-
const
|
|
345
|
-
for (const o of
|
|
346
|
-
const r = t.filter((s) => s === o).length, l =
|
|
344
|
+
const i = /* @__PURE__ */ new Set([...t, ...a]);
|
|
345
|
+
for (const o of i) {
|
|
346
|
+
const r = t.filter((s) => s === o).length, l = a.filter((s) => s === o).length;
|
|
347
347
|
if (r !== l)
|
|
348
348
|
return !1;
|
|
349
349
|
}
|
|
@@ -351,16 +351,16 @@ function on() {
|
|
|
351
351
|
};
|
|
352
352
|
return {
|
|
353
353
|
getPropValue: e,
|
|
354
|
-
objectsAreEqual: (t,
|
|
355
|
-
if (
|
|
356
|
-
if (Object.keys(t).length === Object.keys(
|
|
354
|
+
objectsAreEqual: (t, a, i) => {
|
|
355
|
+
if (i) {
|
|
356
|
+
if (Object.keys(t).length === Object.keys(a).length)
|
|
357
357
|
for (const o in t)
|
|
358
|
-
if (Array.isArray(t[o]) && Array.isArray(
|
|
359
|
-
if (n(t[o],
|
|
358
|
+
if (Array.isArray(t[o]) && Array.isArray(a[o])) {
|
|
359
|
+
if (n(t[o], a[o]))
|
|
360
360
|
continue;
|
|
361
361
|
return !1;
|
|
362
362
|
} else {
|
|
363
|
-
if (t[o] ===
|
|
363
|
+
if (t[o] === a[o])
|
|
364
364
|
continue;
|
|
365
365
|
return !1;
|
|
366
366
|
}
|
|
@@ -369,26 +369,26 @@ function on() {
|
|
|
369
369
|
return !0;
|
|
370
370
|
}
|
|
371
371
|
try {
|
|
372
|
-
return JSON.stringify(t) === JSON.stringify(
|
|
372
|
+
return JSON.stringify(t) === JSON.stringify(a);
|
|
373
373
|
} catch {
|
|
374
374
|
return !1;
|
|
375
375
|
}
|
|
376
376
|
},
|
|
377
|
-
sortAlpha: (t) => (
|
|
378
|
-
let o =
|
|
379
|
-
return Array.isArray(
|
|
377
|
+
sortAlpha: (t) => (a, i) => {
|
|
378
|
+
let o = a[t] === void 0 || a[t] === null ? "" : a[t], r = i[t] === void 0 || i[t] === null ? "" : i[t];
|
|
379
|
+
return Array.isArray(a[t]) && (o = a[t][0]), Array.isArray(i[t]) && (r = i[t][0]), o.localeCompare(r);
|
|
380
380
|
},
|
|
381
381
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Aa(e, n, t, a = {
|
|
385
385
|
fetchedItemsKey: "data",
|
|
386
386
|
searchKeys: ["id"]
|
|
387
387
|
}) {
|
|
388
388
|
t || (t = "100");
|
|
389
|
-
const { axiosInstance:
|
|
389
|
+
const { axiosInstance: i } = gt({
|
|
390
390
|
headers: e.requestHeaders
|
|
391
|
-
}), { i18n: { t: o } } = ht(), { debounce: r } =
|
|
391
|
+
}), { i18n: { t: o } } = ht(), { debounce: r } = fa(), l = r(async (C) => {
|
|
392
392
|
await T(C);
|
|
393
393
|
}, 200), s = K(!1), u = K(""), c = K(""), d = K([]), v = K([]), g = K(void 0), _ = m(n);
|
|
394
394
|
let k = `${e.apiBaseUrl}${_}`;
|
|
@@ -396,8 +396,8 @@ function Ai(e, n, t, i = {
|
|
|
396
396
|
const { isValidUuid: x } = on(), b = async () => {
|
|
397
397
|
try {
|
|
398
398
|
s.value = !0;
|
|
399
|
-
const { data: C } = await
|
|
400
|
-
C != null && C.next || (g.value =
|
|
399
|
+
const { data: C } = await i.get(`${k}?size=${t}`);
|
|
400
|
+
C != null && C.next || (g.value = a.fetchedItemsKey in C ? C[a.fetchedItemsKey] : []), v.value = a.fetchedItemsKey in C ? C[a.fetchedItemsKey] : [], d.value = v.value;
|
|
401
401
|
} catch {
|
|
402
402
|
d.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
403
403
|
} finally {
|
|
@@ -411,17 +411,17 @@ function Ai(e, n, t, i = {
|
|
|
411
411
|
if (s.value = !0, u.value = "", c.value = "", e.app === "konnect") {
|
|
412
412
|
let V = k + "";
|
|
413
413
|
C && (V += `/${C}`);
|
|
414
|
-
const { data: I } = await
|
|
415
|
-
|
|
414
|
+
const { data: I } = await i.get(`${V}?size=${t}`);
|
|
415
|
+
a.fetchedItemsKey in I ? d.value = I[a.fetchedItemsKey] : I != null && I.id ? d.value = [I] : d.value = [];
|
|
416
416
|
} else if (C) {
|
|
417
417
|
const V = [];
|
|
418
|
-
x(C) &&
|
|
419
|
-
const { data: M } = await
|
|
420
|
-
return [M[
|
|
418
|
+
x(C) && a.searchKeys.includes("id") ? V.push((async () => {
|
|
419
|
+
const { data: M } = await i.get(`${k}/${C}`);
|
|
420
|
+
return [M[a.fetchedItemsKey] ?? M];
|
|
421
421
|
})()) : V.push(
|
|
422
|
-
...
|
|
423
|
-
const { data: B } = await
|
|
424
|
-
return B[
|
|
422
|
+
...a.searchKeys.filter((M) => M !== "id").map(async (M) => {
|
|
423
|
+
const { data: B } = await i.get(`${k}?${M}=${C}`);
|
|
424
|
+
return B[a.fetchedItemsKey];
|
|
425
425
|
})
|
|
426
426
|
);
|
|
427
427
|
const I = await Promise.all(V), R = /* @__PURE__ */ new Set();
|
|
@@ -442,7 +442,7 @@ function Ai(e, n, t, i = {
|
|
|
442
442
|
s.value = !0, c.value = "", C ? (d.value = (L = g.value) == null ? void 0 : L.filter((V) => {
|
|
443
443
|
var I;
|
|
444
444
|
let R = !1;
|
|
445
|
-
for (const M of
|
|
445
|
+
for (const M of a.searchKeys) {
|
|
446
446
|
const B = typeof V[M] == "string" ? (I = V[M]) == null ? void 0 : I.toLowerCase() : V[M];
|
|
447
447
|
B != null && B.includes(C.toLowerCase()) && (R = !0);
|
|
448
448
|
}
|
|
@@ -459,25 +459,25 @@ function Ai(e, n, t, i = {
|
|
|
459
459
|
debouncedQueryChange: l
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
const t = m(n),
|
|
462
|
+
function xa(e, n) {
|
|
463
|
+
const t = m(n), a = A(
|
|
464
464
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
465
465
|
);
|
|
466
|
-
return
|
|
466
|
+
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function ja() {
|
|
469
469
|
const { i18n: { t: e } } = ht();
|
|
470
470
|
return {
|
|
471
471
|
getMessageFromError: (n) => {
|
|
472
|
-
var t,
|
|
472
|
+
var t, a, i, o;
|
|
473
473
|
if (!n)
|
|
474
474
|
return e("errors.unexpected");
|
|
475
475
|
if (((t = n == null ? void 0 : n.response) == null ? void 0 : t.status) === 401)
|
|
476
476
|
return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."), "";
|
|
477
|
-
if ((
|
|
477
|
+
if ((a = n == null ? void 0 : n.response) != null && a.data) {
|
|
478
478
|
if (n.response.data.detail)
|
|
479
479
|
return n.response.data.detail;
|
|
480
|
-
if ((
|
|
480
|
+
if ((i = n.response.data.details) != null && i.length)
|
|
481
481
|
return n.response.data.details.map((r) => {
|
|
482
482
|
let l = e("errors.unexpected");
|
|
483
483
|
return r.messages && typeof r.messages == "object" && r.messages.length && (l = r.messages.join(", ")), r.field ? `${r.field} - ${l}` : l;
|
|
@@ -495,39 +495,39 @@ function ji() {
|
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Ta(e) {
|
|
499
499
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
500
500
|
try {
|
|
501
|
-
const
|
|
502
|
-
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(
|
|
503
|
-
return `${t}${
|
|
501
|
+
const a = e.join("/"), i = `${t}${a}`, o = e.some((r) => r.trim() === "");
|
|
502
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(i) && !o && new URL(i))
|
|
503
|
+
return `${t}${a}`;
|
|
504
504
|
throw new Error("Invalid url");
|
|
505
|
-
} catch (
|
|
506
|
-
return console.warn("Failed to build valid URL:",
|
|
505
|
+
} catch (a) {
|
|
506
|
+
return console.warn("Failed to build valid URL:", a), "";
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
function ln(e, n) {
|
|
510
|
-
const t = K(m(e)),
|
|
510
|
+
const t = K(m(e)), a = K(m(n)), i = A(
|
|
511
511
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
512
512
|
), o = A(
|
|
513
|
-
() =>
|
|
513
|
+
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
514
514
|
);
|
|
515
515
|
return (r) => {
|
|
516
516
|
const { page: l, pageSize: s, offset: u, sortColumnKey: c, sortColumnOrder: d, query: v } = r;
|
|
517
517
|
try {
|
|
518
518
|
let g = new URL(o.value.href);
|
|
519
|
-
return
|
|
519
|
+
return i.value && v ? (g.search = "", g = t.value.app === "konnect" ? new URL(`${g.href}?filter[name][contains]=${v}`) : new URL(`${g.href}/${v}/`)) : (i.value || new URLSearchParams(v).forEach((_, k) => {
|
|
520
520
|
g.searchParams.append(k, _);
|
|
521
521
|
}), c && g.searchParams.append("sort_by", c), d === "desc" && g.searchParams.append("sort_desc", "1"), g.searchParams.append("size", String(s))), u && l !== 1 && g.searchParams.append("offset", String(u)), g.href;
|
|
522
522
|
} catch (g) {
|
|
523
|
-
return console.error("RouteList(fetcher)", g),
|
|
523
|
+
return console.error("RouteList(fetcher)", g), a.value;
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
const
|
|
527
|
+
function Oa(e, n, t = "data") {
|
|
528
|
+
const a = m(n), { axiosInstance: i } = gt({
|
|
529
529
|
headers: e.requestHeaders
|
|
530
|
-
}), o = ln(e,
|
|
530
|
+
}), o = ln(e, a), r = K({
|
|
531
531
|
status: je.Idle
|
|
532
532
|
});
|
|
533
533
|
return { fetcher: async (l) => {
|
|
@@ -535,7 +535,7 @@ function Oi(e, n, t = "data") {
|
|
|
535
535
|
r.value = { status: je.Loading };
|
|
536
536
|
let s = o(l);
|
|
537
537
|
s.includes("filter[name]") && (s = `${s}&page[size]=${l.pageSize}&page[number]=${l.page}`);
|
|
538
|
-
const { data: u } = await
|
|
538
|
+
const { data: u } = await i.get(s), c = t && t.replace(/[^\w-_]/gi, "");
|
|
539
539
|
let d;
|
|
540
540
|
u[c] && Array.isArray(u[c]) ? d = u[c] : Array.isArray(u) ? d = u : d = Object.keys(u).length ? [u] : [];
|
|
541
541
|
const v = {
|
|
@@ -568,10 +568,10 @@ function Oi(e, n, t = "data") {
|
|
|
568
568
|
}
|
|
569
569
|
}, fetcherState: r };
|
|
570
570
|
}
|
|
571
|
-
function $
|
|
572
|
-
const e = (t,
|
|
571
|
+
function $a() {
|
|
572
|
+
const e = (t, a = "_") => t ? t.split(a).map((i) => i.toLowerCase() === "id" ? i.toUpperCase() : i.charAt(0).toUpperCase() + i.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
|
|
573
573
|
return {
|
|
574
|
-
capitalize: (t) => t ? t.replace(n, (
|
|
574
|
+
capitalize: (t) => t ? t.replace(n, (a) => a.toUpperCase()) : "",
|
|
575
575
|
convertKeyToTitle: e
|
|
576
576
|
};
|
|
577
577
|
}
|
|
@@ -585,25 +585,25 @@ const sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
585
585
|
}, jt = (e) => e === "*" || e === "x" || e === "X", Tt = (e) => {
|
|
586
586
|
const n = parseInt(e, 10);
|
|
587
587
|
return isNaN(n) ? e : n;
|
|
588
|
-
},
|
|
588
|
+
}, Ma = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Ka = (e, n) => {
|
|
589
589
|
if (jt(e) || jt(n))
|
|
590
590
|
return 0;
|
|
591
|
-
const [t,
|
|
592
|
-
return t >
|
|
591
|
+
const [t, a] = Ma(Tt(e), Tt(n));
|
|
592
|
+
return t > a ? 1 : t < a ? -1 : 0;
|
|
593
593
|
}, Ot = (e, n) => {
|
|
594
594
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
return
|
|
595
|
+
const a = Ka(e[t] || "0", n[t] || "0");
|
|
596
|
+
if (a !== 0)
|
|
597
|
+
return a;
|
|
598
598
|
}
|
|
599
599
|
return 0;
|
|
600
|
-
},
|
|
601
|
-
const t = xt(e),
|
|
602
|
-
return r !== 0 ? r :
|
|
600
|
+
}, Ea = (e, n) => {
|
|
601
|
+
const t = xt(e), a = xt(n), i = t.pop(), o = a.pop(), r = Ot(t, a);
|
|
602
|
+
return r !== 0 ? r : i && o ? Ot(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
603
603
|
}, $t = (e, n, t) => {
|
|
604
|
-
|
|
605
|
-
const
|
|
606
|
-
return cn[t].includes(
|
|
604
|
+
Fa(t);
|
|
605
|
+
const a = Ea(e, n);
|
|
606
|
+
return cn[t].includes(a);
|
|
607
607
|
}, cn = {
|
|
608
608
|
">": [1],
|
|
609
609
|
">=": [0, 1],
|
|
@@ -611,67 +611,67 @@ const sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
611
611
|
"<=": [-1, 0],
|
|
612
612
|
"<": [-1],
|
|
613
613
|
"!=": [-1, 1]
|
|
614
|
-
}, Mt = Object.keys(cn),
|
|
614
|
+
}, Mt = Object.keys(cn), Fa = (e) => {
|
|
615
615
|
if (typeof e != "string")
|
|
616
616
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
617
617
|
if (Mt.indexOf(e) === -1)
|
|
618
618
|
throw new Error(`Invalid operator, expected one of ${Mt.join("|")}`);
|
|
619
|
-
},
|
|
620
|
-
function
|
|
619
|
+
}, Na = (e) => typeof e == "string" && /^[v\d]/.test(e) && sn.test(e);
|
|
620
|
+
function qa(e) {
|
|
621
621
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
622
622
|
if (!n)
|
|
623
623
|
return !0;
|
|
624
|
-
const { edition:
|
|
625
|
-
if (!
|
|
624
|
+
const { edition: a, version: i } = n;
|
|
625
|
+
if (!Na(i))
|
|
626
626
|
return console.error("Invalid version"), !1;
|
|
627
|
-
const o = t[
|
|
627
|
+
const o = t[a];
|
|
628
628
|
if (!o)
|
|
629
629
|
return !1;
|
|
630
630
|
const [r, l] = o;
|
|
631
|
-
return !(r && $t(
|
|
631
|
+
return !(r && $t(i, r, "<") || l && $t(i, l, ">"));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
const n = K(0), t = K(0),
|
|
635
|
-
return ke(e, (
|
|
636
|
-
|
|
633
|
+
function Ba(e) {
|
|
634
|
+
const n = K(0), t = K(0), a = K(!1);
|
|
635
|
+
return ke(e, (i) => {
|
|
636
|
+
i && !a.value && (n.value = i.offsetWidth, t.value = i.scrollWidth, a.value = !0);
|
|
637
637
|
}), {
|
|
638
638
|
isTruncated: A(() => n.value < t.value)
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
const ce = {
|
|
642
642
|
useAxios: gt,
|
|
643
|
-
useDebouncedFilter:
|
|
644
|
-
useDeleteUrlBuilder:
|
|
645
|
-
useErrors:
|
|
646
|
-
useExternalLinkCreator:
|
|
647
|
-
useFetcher:
|
|
643
|
+
useDebouncedFilter: Aa,
|
|
644
|
+
useDeleteUrlBuilder: xa,
|
|
645
|
+
useErrors: ja,
|
|
646
|
+
useExternalLinkCreator: Ta,
|
|
647
|
+
useFetcher: Oa,
|
|
648
648
|
useFetchUrlBuilder: ln,
|
|
649
649
|
useHelpers: on,
|
|
650
|
-
useStringHelpers: $
|
|
650
|
+
useStringHelpers: $a,
|
|
651
651
|
useI18n: ht,
|
|
652
|
-
useGatewayFeatureSupported:
|
|
653
|
-
useTruncationDetector:
|
|
654
|
-
},
|
|
652
|
+
useGatewayFeatureSupported: qa,
|
|
653
|
+
useTruncationDetector: Ba
|
|
654
|
+
}, La = {
|
|
655
655
|
fail: "Failed to copy id to clipboard",
|
|
656
656
|
success: {
|
|
657
657
|
prefix: "Successfully",
|
|
658
658
|
content: " copied to clipboard"
|
|
659
659
|
}
|
|
660
|
-
},
|
|
661
|
-
message:
|
|
662
|
-
iconTitle:
|
|
663
|
-
},
|
|
660
|
+
}, Ua = "Copy to clipboard", Va = {
|
|
661
|
+
message: La,
|
|
662
|
+
iconTitle: Ua
|
|
663
|
+
}, Ra = "kong-ui-copy-uuid-notify", Kt = "24px", Da = (e, n) => {
|
|
664
664
|
const t = e.__vccOpts || e;
|
|
665
|
-
for (const [
|
|
666
|
-
t[
|
|
665
|
+
for (const [a, i] of n)
|
|
666
|
+
t[a] = i;
|
|
667
667
|
return t;
|
|
668
|
-
},
|
|
668
|
+
}, Pa = (e) => (tn("data-v-13f41aa3"), e = e(), nn(), e), Ja = ["aria-hidden"], Ha = {
|
|
669
669
|
key: 0,
|
|
670
670
|
"data-testid": "kui-icon-svg-title"
|
|
671
|
-
},
|
|
671
|
+
}, za = /* @__PURE__ */ Pa(() => /* @__PURE__ */ U("path", {
|
|
672
672
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
673
673
|
fill: "currentColor"
|
|
674
|
-
}, null, -1)),
|
|
674
|
+
}, null, -1)), Ya = /* @__PURE__ */ ie({
|
|
675
675
|
__name: "CopyIcon",
|
|
676
676
|
props: {
|
|
677
677
|
/** The accessibility text provided to screen readers */
|
|
@@ -727,12 +727,12 @@ const ce = {
|
|
|
727
727
|
if (typeof n.size == "number" && n.size > 0)
|
|
728
728
|
return `${n.size}px`;
|
|
729
729
|
if (typeof n.size == "string") {
|
|
730
|
-
const
|
|
730
|
+
const i = String(n.size).replace(/px/gi, ""), o = Number(i);
|
|
731
731
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
732
732
|
return `${o}px`;
|
|
733
733
|
}
|
|
734
734
|
return Kt;
|
|
735
|
-
}),
|
|
735
|
+
}), a = A(() => ({
|
|
736
736
|
boxSizing: "border-box",
|
|
737
737
|
color: n.color,
|
|
738
738
|
display: n.display,
|
|
@@ -740,11 +740,11 @@ const ce = {
|
|
|
740
740
|
lineHeight: "0",
|
|
741
741
|
width: t.value
|
|
742
742
|
}));
|
|
743
|
-
return (
|
|
743
|
+
return (i, o) => (p(), N(Oe(e.as), {
|
|
744
744
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
745
745
|
class: "kui-icon copy-icon",
|
|
746
746
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
747
|
-
style: en(
|
|
747
|
+
style: en(a.value)
|
|
748
748
|
}, {
|
|
749
749
|
default: h(() => [
|
|
750
750
|
(p(), j("svg", {
|
|
@@ -757,14 +757,14 @@ const ce = {
|
|
|
757
757
|
width: "100%",
|
|
758
758
|
xmlns: "http://www.w3.org/2000/svg"
|
|
759
759
|
}, [
|
|
760
|
-
e.title ? (p(), j("title",
|
|
761
|
-
|
|
762
|
-
], 8,
|
|
760
|
+
e.title ? (p(), j("title", Ha, E(e.title), 1)) : H("", !0),
|
|
761
|
+
za
|
|
762
|
+
], 8, Ja))
|
|
763
763
|
]),
|
|
764
764
|
_: 1
|
|
765
765
|
}, 8, ["aria-hidden", "style"]));
|
|
766
766
|
}
|
|
767
|
-
}),
|
|
767
|
+
}), Wa = /* @__PURE__ */ Da(Ya, [["__scopeId", "data-v-13f41aa3"]]), Za = "16px", Ga = { class: "kong-ui-copy-uuid" }, Qa = ["onClick"], Et = 15, Xa = /* @__PURE__ */ ie({
|
|
768
768
|
__name: "CopyUuid",
|
|
769
769
|
props: {
|
|
770
770
|
uuid: {
|
|
@@ -808,43 +808,43 @@ const ce = {
|
|
|
808
808
|
},
|
|
809
809
|
emits: ["success", "error"],
|
|
810
810
|
setup(e, { emit: n }) {
|
|
811
|
-
const { t } = yt("en-us",
|
|
812
|
-
}), r = A(() =>
|
|
813
|
-
label:
|
|
811
|
+
const { t } = yt("en-us", Va), a = e, i = n, o = a.notify || la(Ra, () => {
|
|
812
|
+
}), r = A(() => a.idTooltip ? {
|
|
813
|
+
label: a.idTooltip,
|
|
814
814
|
positionFixed: !0,
|
|
815
815
|
placement: "bottomStart"
|
|
816
816
|
} : {
|
|
817
|
-
title:
|
|
818
|
-
}), l = A(() => !!(
|
|
817
|
+
title: a.uuid
|
|
818
|
+
}), l = A(() => !!(a.tooltip && a.successTooltip)), s = K(a.tooltip), u = A(() => a.tooltip ? {
|
|
819
819
|
label: s.value,
|
|
820
820
|
positionFixed: !0,
|
|
821
821
|
maxWidth: "500px",
|
|
822
822
|
placement: "bottomStart"
|
|
823
823
|
} : {}), c = A(() => {
|
|
824
824
|
var g;
|
|
825
|
-
return
|
|
825
|
+
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(g = a.uuid) == null ? void 0 : g.substring(0, 5)}` : a.uuid;
|
|
826
826
|
}), d = (g) => {
|
|
827
827
|
s.value = g, setTimeout(() => {
|
|
828
|
-
s.value =
|
|
828
|
+
s.value = a.tooltip;
|
|
829
829
|
}, 1800);
|
|
830
830
|
}, v = (g) => {
|
|
831
831
|
var _, k;
|
|
832
|
-
if (!g(
|
|
832
|
+
if (!g(a.uuid)) {
|
|
833
833
|
typeof o == "function" && o({
|
|
834
834
|
type: "error",
|
|
835
835
|
message: t("message.fail")
|
|
836
|
-
}), l.value ? d(t("message.fail")) :
|
|
836
|
+
}), l.value ? d(t("message.fail")) : i("error", a.uuid);
|
|
837
837
|
return;
|
|
838
838
|
}
|
|
839
|
-
const x = ((_ =
|
|
839
|
+
const x = ((_ = a.uuid) == null ? void 0 : _.length) > Et, b = a.format === "hidden" || a.format === "redacted" ? t("message.success.prefix") : `"${((k = a.uuid) == null ? void 0 : k.substring(0, Et)) + (x ? "..." : "")}"`;
|
|
840
840
|
typeof o == "function" && o({
|
|
841
841
|
type: "success",
|
|
842
842
|
message: `${b}${t("message.success.content")}`
|
|
843
|
-
}), l.value ? d(
|
|
843
|
+
}), l.value ? d(a.successTooltip) : i("success", a.uuid);
|
|
844
844
|
};
|
|
845
845
|
return (g, _) => {
|
|
846
846
|
const k = q("KClipboardProvider");
|
|
847
|
-
return p(), j("div",
|
|
847
|
+
return p(), j("div", Ga, [
|
|
848
848
|
e.format !== "hidden" ? (p(), N(Oe(e.idTooltip ? "KTooltip" : "div"), lt({ key: 0 }, r.value, { "data-testid": "copy-id" }), {
|
|
849
849
|
default: h(() => [
|
|
850
850
|
U("div", {
|
|
@@ -867,14 +867,14 @@ const ce = {
|
|
|
867
867
|
tabindex: "0",
|
|
868
868
|
onClick: Ye((b) => v(x), ["stop"])
|
|
869
869
|
}, [
|
|
870
|
-
O(m(
|
|
870
|
+
O(m(Wa), {
|
|
871
871
|
class: "uuid-icon",
|
|
872
872
|
color: e.iconColor,
|
|
873
873
|
decorative: !!e.tooltip,
|
|
874
|
-
size: m(
|
|
874
|
+
size: m(Za),
|
|
875
875
|
title: m(t)("iconTitle")
|
|
876
876
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
877
|
-
], 8,
|
|
877
|
+
], 8, Qa)
|
|
878
878
|
]),
|
|
879
879
|
_: 1
|
|
880
880
|
})
|
|
@@ -884,15 +884,15 @@ const ce = {
|
|
|
884
884
|
]);
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
}),
|
|
887
|
+
}), ei = (e, n) => {
|
|
888
888
|
const t = e.__vccOpts || e;
|
|
889
|
-
for (const [
|
|
890
|
-
t[
|
|
889
|
+
for (const [a, i] of n)
|
|
890
|
+
t[a] = i;
|
|
891
891
|
return t;
|
|
892
|
-
}, un = /* @__PURE__ */
|
|
892
|
+
}, un = /* @__PURE__ */ ei(Xa, [["__scopeId", "data-v-0c07874b"]]), ti = {
|
|
893
893
|
key: 0,
|
|
894
894
|
class: "config-card-fieldset-title"
|
|
895
|
-
},
|
|
895
|
+
}, ni = /* @__PURE__ */ ie({
|
|
896
896
|
__name: "JsonCardItem",
|
|
897
897
|
props: {
|
|
898
898
|
item: {
|
|
@@ -909,25 +909,25 @@ const ce = {
|
|
|
909
909
|
}
|
|
910
910
|
},
|
|
911
911
|
setup(e) {
|
|
912
|
-
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle:
|
|
912
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: a } = ce.useStringHelpers(), i = A(() => n.item.key ?? "json-array-item"), o = A(() => n.item.value ?? n.item), r = A(() => {
|
|
913
913
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
914
914
|
return n.isArrayItem && delete s.name, s;
|
|
915
915
|
}), l = A(() => {
|
|
916
916
|
var s;
|
|
917
|
-
return n.isArrayItem ? (s = o.value) != null && s.name ?
|
|
917
|
+
return n.isArrayItem ? (s = o.value) != null && s.name ? a(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
918
918
|
});
|
|
919
919
|
return (s, u) => (p(), N(Oe(e.isArrayItem ? "fieldset" : "div"), {
|
|
920
920
|
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
921
921
|
}, {
|
|
922
922
|
default: h(() => [
|
|
923
|
-
e.isArrayItem ? (p(), j("legend",
|
|
923
|
+
e.isArrayItem ? (p(), j("legend", ti, [
|
|
924
924
|
U("b", null, E(l.value), 1)
|
|
925
925
|
])) : H("", !0),
|
|
926
926
|
(p(!0), j(ge, null, me(Object.keys(r.value), (c, d) => (p(), N(Re, {
|
|
927
|
-
key: `${
|
|
927
|
+
key: `${i.value}-property-${d}`,
|
|
928
928
|
item: {
|
|
929
929
|
key: c,
|
|
930
|
-
label: m(
|
|
930
|
+
label: m(a)(c),
|
|
931
931
|
value: r.value[c]
|
|
932
932
|
}
|
|
933
933
|
}, null, 8, ["item"]))), 128))
|
|
@@ -937,10 +937,10 @@ const ce = {
|
|
|
937
937
|
}
|
|
938
938
|
}), be = (e, n) => {
|
|
939
939
|
const t = e.__vccOpts || e;
|
|
940
|
-
for (const [
|
|
941
|
-
t[
|
|
940
|
+
for (const [a, i] of n)
|
|
941
|
+
t[a] = i;
|
|
942
942
|
return t;
|
|
943
|
-
}, dn = /* @__PURE__ */ be(
|
|
943
|
+
}, dn = /* @__PURE__ */ be(ni, [["__scopeId", "data-v-68ca83ec"]]), ai = /* @__PURE__ */ ie({
|
|
944
944
|
__name: "InternalLinkItem",
|
|
945
945
|
props: {
|
|
946
946
|
item: {
|
|
@@ -951,13 +951,13 @@ const ce = {
|
|
|
951
951
|
emits: ["navigation-click"],
|
|
952
952
|
setup(e) {
|
|
953
953
|
const { i18n: { t: n } } = ce.useI18n();
|
|
954
|
-
return (t,
|
|
955
|
-
const
|
|
954
|
+
return (t, a) => {
|
|
955
|
+
const i = q("KButton");
|
|
956
956
|
return p(), j("div", null, [
|
|
957
|
-
O(
|
|
957
|
+
O(i, {
|
|
958
958
|
appearance: "tertiary",
|
|
959
959
|
class: "navigation-button",
|
|
960
|
-
onClick:
|
|
960
|
+
onClick: a[0] || (a[0] = (o) => t.$emit("navigation-click", e.item))
|
|
961
961
|
}, {
|
|
962
962
|
default: h(() => [
|
|
963
963
|
G(E(e.item.value || m(n)("baseConfigCard.commonFields.link")), 1)
|
|
@@ -967,7 +967,7 @@ const ce = {
|
|
|
967
967
|
]);
|
|
968
968
|
};
|
|
969
969
|
}
|
|
970
|
-
}), pn = /* @__PURE__ */ be(
|
|
970
|
+
}), pn = /* @__PURE__ */ be(ai, [["__scopeId", "data-v-c96811e5"]]), ii = /* @__PURE__ */ ie({
|
|
971
971
|
__name: "StatusBadge",
|
|
972
972
|
props: {
|
|
973
973
|
status: {
|
|
@@ -977,9 +977,9 @@ const ce = {
|
|
|
977
977
|
},
|
|
978
978
|
setup(e) {
|
|
979
979
|
const { i18n: { t: n } } = ce.useI18n();
|
|
980
|
-
return (t,
|
|
981
|
-
const
|
|
982
|
-
return p(), N(
|
|
980
|
+
return (t, a) => {
|
|
981
|
+
const i = q("KBadge");
|
|
982
|
+
return p(), N(i, {
|
|
983
983
|
appearance: e.status ? "success" : "neutral"
|
|
984
984
|
}, {
|
|
985
985
|
default: h(() => [
|
|
@@ -989,11 +989,11 @@ const ce = {
|
|
|
989
989
|
}, 8, ["appearance"]);
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
}),
|
|
992
|
+
}), ri = "#0044f4", oi = "#e0e4ea", li = "#3a3f51", si = "1px", ci = "20px", ui = { class: "config-card-details-row" }, di = ["data-testid"], pi = ["data-testid"], fi = ["data-testid"], yi = ["data-testid"], mi = { key: 1 }, gi = ["data-testid"], hi = ["data-testid"], vi = ["data-testid"], ki = ["data-testid"], bi = {
|
|
993
993
|
name: "ConfigCardItem",
|
|
994
|
-
components: { CopyUuid: un, JsonCardItem: dn, StatusBadge:
|
|
995
|
-
},
|
|
996
|
-
...
|
|
994
|
+
components: { CopyUuid: un, JsonCardItem: dn, StatusBadge: ii, InternalLinkItem: pn }
|
|
995
|
+
}, Ci = /* @__PURE__ */ ie({
|
|
996
|
+
...bi,
|
|
997
997
|
props: {
|
|
998
998
|
item: {
|
|
999
999
|
type: Object,
|
|
@@ -1013,12 +1013,12 @@ const ce = {
|
|
|
1013
1013
|
emits: ["navigation-click"],
|
|
1014
1014
|
setup(e, { emit: n }) {
|
|
1015
1015
|
Xt((_) => ({
|
|
1016
|
-
"0da74440": c.value ? "none" : `solid ${m(
|
|
1016
|
+
"0da74440": c.value ? "none" : `solid ${m(si)} ${m(oi)}`,
|
|
1017
1017
|
"02a039da": u.value && l.value ? "block" : "flex",
|
|
1018
1018
|
"690f3ced": u.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1019
1019
|
"691182c8": u.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1020
1020
|
}));
|
|
1021
|
-
const t = e,
|
|
1021
|
+
const t = e, a = n, i = et(), { i18n: { t: o, formatUnixTimeStamp: r } } = ce.useI18n(), l = A(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = A(() => !!(t.item.tooltip || i["label-tooltip"])), u = A(() => t.item.type === Z.Json || t.item.type === Z.JsonArray), c = A(() => t.item.type === Z.JsonArray), d = A(() => {
|
|
1022
1022
|
switch (t.item.type) {
|
|
1023
1023
|
case Z.ID:
|
|
1024
1024
|
return {
|
|
@@ -1105,7 +1105,7 @@ const ce = {
|
|
|
1105
1105
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1106
1106
|
item: t.item,
|
|
1107
1107
|
onNavigationClick: (_) => {
|
|
1108
|
-
|
|
1108
|
+
a("navigation-click", _);
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
};
|
|
@@ -1147,7 +1147,7 @@ const ce = {
|
|
|
1147
1147
|
}), v = K(), { isTruncated: g } = ce.useTruncationDetector(v);
|
|
1148
1148
|
return (_, k) => {
|
|
1149
1149
|
const x = q("KLabel"), b = q("KBadge"), f = q("KTooltip");
|
|
1150
|
-
return p(), j("div",
|
|
1150
|
+
return p(), j("div", ui, [
|
|
1151
1151
|
U("div", {
|
|
1152
1152
|
class: "config-card-details-label",
|
|
1153
1153
|
"data-testid": `${e.item.key}-label`
|
|
@@ -1168,13 +1168,13 @@ const ce = {
|
|
|
1168
1168
|
ee(_.$slots, "label-tooltip", {}, () => [
|
|
1169
1169
|
G(E(e.item.tooltip), 1)
|
|
1170
1170
|
], !0)
|
|
1171
|
-
], 8,
|
|
1171
|
+
], 8, pi)
|
|
1172
1172
|
]),
|
|
1173
1173
|
key: "0"
|
|
1174
1174
|
} : void 0
|
|
1175
1175
|
]), 1024)
|
|
1176
1176
|
], !0)
|
|
1177
|
-
], 8,
|
|
1177
|
+
], 8, di),
|
|
1178
1178
|
U("div", {
|
|
1179
1179
|
class: "config-card-details-value",
|
|
1180
1180
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -1182,8 +1182,8 @@ const ce = {
|
|
|
1182
1182
|
ee(_.$slots, e.item.key, {
|
|
1183
1183
|
rowValue: e.item.value
|
|
1184
1184
|
}, () => [
|
|
1185
|
-
l.value ? (p(), j("div",
|
|
1186
|
-
(p(), N(Oe(d.value.tag),
|
|
1185
|
+
l.value ? (p(), j("div", mi, [
|
|
1186
|
+
(p(), N(Oe(d.value.tag), aa(ia(d.value.attrs)), {
|
|
1187
1187
|
default: h(() => [
|
|
1188
1188
|
d.value.additionalComponent === "KBadge" ? (p(), j("div", {
|
|
1189
1189
|
key: 0,
|
|
@@ -1201,7 +1201,7 @@ const ce = {
|
|
|
1201
1201
|
]),
|
|
1202
1202
|
_: 2
|
|
1203
1203
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1204
|
-
], 8,
|
|
1204
|
+
], 8, gi)) : H("", !0),
|
|
1205
1205
|
d.value.additionalComponent === "CopyUuid" ? (p(), j("div", {
|
|
1206
1206
|
key: 1,
|
|
1207
1207
|
class: "copy-uuid-array",
|
|
@@ -1212,14 +1212,14 @@ const ce = {
|
|
|
1212
1212
|
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1213
1213
|
uuid: T
|
|
1214
1214
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1215
|
-
], 8,
|
|
1215
|
+
], 8, hi)) : d.value.additionalComponent === "KMethodBadge" ? (p(), j("div", {
|
|
1216
1216
|
key: 2,
|
|
1217
1217
|
class: "method-badge-array",
|
|
1218
1218
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1219
1219
|
}, [
|
|
1220
1220
|
(p(!0), j(ge, null, me(e.item.value, (T, C) => (p(), N(b, {
|
|
1221
1221
|
key: `${e.item.key}-badge-method-${C}`,
|
|
1222
|
-
appearance: Object.values(m(
|
|
1222
|
+
appearance: Object.values(m(ca)).includes(T.toLowerCase()) ? T.toLowerCase() : "custom",
|
|
1223
1223
|
class: "config-badge",
|
|
1224
1224
|
"data-testid": `${e.item.key}-badge-method-${C}`
|
|
1225
1225
|
}, {
|
|
@@ -1228,7 +1228,7 @@ const ce = {
|
|
|
1228
1228
|
]),
|
|
1229
1229
|
_: 2
|
|
1230
1230
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1231
|
-
], 8,
|
|
1231
|
+
], 8, vi)) : H("", !0),
|
|
1232
1232
|
d.value.additionalComponent === "JsonCardItem" ? (p(), j("div", {
|
|
1233
1233
|
key: 3,
|
|
1234
1234
|
"data-testid": `${t.item.key}-json-array-content`
|
|
@@ -1239,7 +1239,7 @@ const ce = {
|
|
|
1239
1239
|
"is-array-item": "",
|
|
1240
1240
|
item: T
|
|
1241
1241
|
}, null, 8, ["index", "item"]))), 128))
|
|
1242
|
-
], 8,
|
|
1242
|
+
], 8, ki)) : (p(), N(f, {
|
|
1243
1243
|
key: 4,
|
|
1244
1244
|
label: m(g) ? e.item.value : ""
|
|
1245
1245
|
}, {
|
|
@@ -1258,16 +1258,16 @@ const ce = {
|
|
|
1258
1258
|
])) : (p(), j("div", {
|
|
1259
1259
|
key: 0,
|
|
1260
1260
|
"data-testid": `${e.item.key}-no-value`
|
|
1261
|
-
}, " – ", 8,
|
|
1261
|
+
}, " – ", 8, yi))
|
|
1262
1262
|
], !0)
|
|
1263
|
-
], 8,
|
|
1263
|
+
], 8, fi)
|
|
1264
1264
|
]);
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
|
-
}), Re = /* @__PURE__ */ be(
|
|
1267
|
+
}), Re = /* @__PURE__ */ be(Ci, [["__scopeId", "data-v-9c87856b"]]), wi = { class: "json-config" }, Si = {
|
|
1268
1268
|
key: 0,
|
|
1269
1269
|
class: "json-endpoint"
|
|
1270
|
-
}, fn = /* @__PURE__ */
|
|
1270
|
+
}, fn = /* @__PURE__ */ ie({
|
|
1271
1271
|
__name: "JsonCodeBlock",
|
|
1272
1272
|
props: {
|
|
1273
1273
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1295,21 +1295,21 @@ const ce = {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
},
|
|
1297
1297
|
setup(e) {
|
|
1298
|
-
Xt((
|
|
1299
|
-
"2d178975": `${
|
|
1298
|
+
Xt((i) => ({
|
|
1299
|
+
"2d178975": `${a.value}ch`
|
|
1300
1300
|
}));
|
|
1301
|
-
const n = e, t = A(() => n.jsonRecord),
|
|
1302
|
-
var
|
|
1301
|
+
const n = e, t = A(() => n.jsonRecord), a = A(() => {
|
|
1302
|
+
var i;
|
|
1303
1303
|
if (!n.fetcherUrl)
|
|
1304
1304
|
return 0;
|
|
1305
|
-
const o = (
|
|
1305
|
+
const o = (i = n.fetcherUrl) == null ? void 0 : i.split("/");
|
|
1306
1306
|
return o.length < 2 ? 0 : 41 + (n.requestMethod === "post" ? o[o.length - 1] : o[o.length - 2]).length;
|
|
1307
1307
|
});
|
|
1308
|
-
return (
|
|
1308
|
+
return (i, o) => {
|
|
1309
1309
|
var r;
|
|
1310
1310
|
const l = q("KBadge"), s = q("KCodeBlock");
|
|
1311
|
-
return p(), j("div",
|
|
1312
|
-
n.fetcherUrl && (r = n.config) != null && r.jsonYamlFormsEnabled ? (p(), j("div",
|
|
1311
|
+
return p(), j("div", wi, [
|
|
1312
|
+
n.fetcherUrl && (r = n.config) != null && r.jsonYamlFormsEnabled ? (p(), j("div", Si, [
|
|
1313
1313
|
O(l, {
|
|
1314
1314
|
appearance: n.requestMethod
|
|
1315
1315
|
}, {
|
|
@@ -1342,41 +1342,41 @@ const ce = {
|
|
|
1342
1342
|
function yn(e) {
|
|
1343
1343
|
return typeof e > "u" || e === null;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function _i(e) {
|
|
1346
1346
|
return typeof e == "object" && e !== null;
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function Ii(e) {
|
|
1349
1349
|
return Array.isArray(e) ? e : yn(e) ? [] : [e];
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1352
|
-
var t,
|
|
1351
|
+
function Ai(e, n) {
|
|
1352
|
+
var t, a, i, o;
|
|
1353
1353
|
if (n)
|
|
1354
|
-
for (o = Object.keys(n), t = 0,
|
|
1355
|
-
|
|
1354
|
+
for (o = Object.keys(n), t = 0, a = o.length; t < a; t += 1)
|
|
1355
|
+
i = o[t], e[i] = n[i];
|
|
1356
1356
|
return e;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
var t = "",
|
|
1360
|
-
for (
|
|
1358
|
+
function xi(e, n) {
|
|
1359
|
+
var t = "", a;
|
|
1360
|
+
for (a = 0; a < n; a += 1)
|
|
1361
1361
|
t += e;
|
|
1362
1362
|
return t;
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function ji(e) {
|
|
1365
1365
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1366
1366
|
}
|
|
1367
|
-
var
|
|
1368
|
-
isNothing:
|
|
1369
|
-
isObject:
|
|
1370
|
-
toArray: $
|
|
1371
|
-
repeat:
|
|
1372
|
-
isNegativeZero:
|
|
1373
|
-
extend:
|
|
1367
|
+
var Ti = yn, Oi = _i, $i = Ii, Mi = xi, Ki = ji, Ei = Ai, le = {
|
|
1368
|
+
isNothing: Ti,
|
|
1369
|
+
isObject: Oi,
|
|
1370
|
+
toArray: $i,
|
|
1371
|
+
repeat: Mi,
|
|
1372
|
+
isNegativeZero: Ki,
|
|
1373
|
+
extend: Ei
|
|
1374
1374
|
};
|
|
1375
1375
|
function mn(e, n) {
|
|
1376
|
-
var t = "",
|
|
1376
|
+
var t = "", a = e.reason || "(unknown reason)";
|
|
1377
1377
|
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 += `
|
|
1378
1378
|
|
|
1379
|
-
` + e.mark.snippet),
|
|
1379
|
+
` + e.mark.snippet), a + " " + t) : a;
|
|
1380
1380
|
}
|
|
1381
1381
|
function De(e, n) {
|
|
1382
1382
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = mn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
@@ -1387,48 +1387,48 @@ De.prototype.toString = function(e) {
|
|
|
1387
1387
|
return this.name + ": " + mn(this, e);
|
|
1388
1388
|
};
|
|
1389
1389
|
var ye = De;
|
|
1390
|
-
function
|
|
1391
|
-
var o = "", r = "", l = Math.floor(
|
|
1392
|
-
return
|
|
1390
|
+
function it(e, n, t, a, i) {
|
|
1391
|
+
var o = "", r = "", l = Math.floor(i / 2) - 1;
|
|
1392
|
+
return a - n > l && (o = " ... ", n = a - l + o.length), t - a > l && (r = " ...", t = a + l - r.length), {
|
|
1393
1393
|
str: o + e.slice(n, t).replace(/\t/g, "→") + r,
|
|
1394
|
-
pos:
|
|
1394
|
+
pos: a - n + o.length
|
|
1395
1395
|
// relative position
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
1398
1398
|
function rt(e, n) {
|
|
1399
1399
|
return le.repeat(" ", n - e.length) + e;
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Fi(e, n) {
|
|
1402
1402
|
if (n = Object.create(n || null), !e.buffer)
|
|
1403
1403
|
return null;
|
|
1404
1404
|
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);
|
|
1405
|
-
for (var t = /\r?\n|\r|\0/g,
|
|
1406
|
-
|
|
1407
|
-
r < 0 && (r =
|
|
1408
|
-
var l = "", s, u, c = Math.min(e.line + n.linesAfter,
|
|
1405
|
+
for (var t = /\r?\n|\r|\0/g, a = [0], i = [], o, r = -1; o = t.exec(e.buffer); )
|
|
1406
|
+
i.push(o.index), a.push(o.index + o[0].length), e.position <= o.index && r < 0 && (r = a.length - 2);
|
|
1407
|
+
r < 0 && (r = a.length - 1);
|
|
1408
|
+
var l = "", s, u, c = Math.min(e.line + n.linesAfter, i.length).toString().length, d = n.maxLength - (n.indent + c + 3);
|
|
1409
1409
|
for (s = 1; s <= n.linesBefore && !(r - s < 0); s++)
|
|
1410
|
-
u =
|
|
1410
|
+
u = it(
|
|
1411
1411
|
e.buffer,
|
|
1412
|
-
i[r - s],
|
|
1413
1412
|
a[r - s],
|
|
1414
|
-
|
|
1413
|
+
i[r - s],
|
|
1414
|
+
e.position - (a[r] - a[r - s]),
|
|
1415
1415
|
d
|
|
1416
1416
|
), l = le.repeat(" ", n.indent) + rt((e.line - s + 1).toString(), c) + " | " + u.str + `
|
|
1417
1417
|
` + l;
|
|
1418
|
-
for (u =
|
|
1418
|
+
for (u = it(e.buffer, a[r], i[r], e.position, d), l += le.repeat(" ", n.indent) + rt((e.line + 1).toString(), c) + " | " + u.str + `
|
|
1419
1419
|
`, l += le.repeat("-", n.indent + c + 3 + u.pos) + `^
|
|
1420
|
-
`, s = 1; s <= n.linesAfter && !(r + s >=
|
|
1421
|
-
u =
|
|
1420
|
+
`, s = 1; s <= n.linesAfter && !(r + s >= i.length); s++)
|
|
1421
|
+
u = it(
|
|
1422
1422
|
e.buffer,
|
|
1423
|
-
i[r + s],
|
|
1424
1423
|
a[r + s],
|
|
1425
|
-
|
|
1424
|
+
i[r + s],
|
|
1425
|
+
e.position - (a[r] - a[r + s]),
|
|
1426
1426
|
d
|
|
1427
1427
|
), l += le.repeat(" ", n.indent) + rt((e.line + s + 1).toString(), c) + " | " + u.str + `
|
|
1428
1428
|
`;
|
|
1429
1429
|
return l.replace(/\n$/, "");
|
|
1430
1430
|
}
|
|
1431
|
-
var
|
|
1431
|
+
var Ni = Fi, qi = [
|
|
1432
1432
|
"kind",
|
|
1433
1433
|
"multi",
|
|
1434
1434
|
"resolve",
|
|
@@ -1439,41 +1439,41 @@ var Na = Fa, qa = [
|
|
|
1439
1439
|
"representName",
|
|
1440
1440
|
"defaultStyle",
|
|
1441
1441
|
"styleAliases"
|
|
1442
|
-
],
|
|
1442
|
+
], Bi = [
|
|
1443
1443
|
"scalar",
|
|
1444
1444
|
"sequence",
|
|
1445
1445
|
"mapping"
|
|
1446
1446
|
];
|
|
1447
|
-
function
|
|
1447
|
+
function Li(e) {
|
|
1448
1448
|
var n = {};
|
|
1449
1449
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1450
|
-
e[t].forEach(function(
|
|
1451
|
-
n[String(
|
|
1450
|
+
e[t].forEach(function(a) {
|
|
1451
|
+
n[String(a)] = t;
|
|
1452
1452
|
});
|
|
1453
1453
|
}), n;
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function Ui(e, n) {
|
|
1456
1456
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1457
|
-
if (
|
|
1457
|
+
if (qi.indexOf(t) === -1)
|
|
1458
1458
|
throw new ye('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1459
1459
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1460
1460
|
return !0;
|
|
1461
1461
|
}, this.construct = n.construct || function(t) {
|
|
1462
1462
|
return t;
|
|
1463
|
-
}, 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 =
|
|
1463
|
+
}, 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 = Li(n.styleAliases || null), Bi.indexOf(this.kind) === -1)
|
|
1464
1464
|
throw new ye('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1465
1465
|
}
|
|
1466
|
-
var de =
|
|
1466
|
+
var de = Ui;
|
|
1467
1467
|
function Ft(e, n) {
|
|
1468
1468
|
var t = [];
|
|
1469
|
-
return e[n].forEach(function(
|
|
1470
|
-
var
|
|
1469
|
+
return e[n].forEach(function(a) {
|
|
1470
|
+
var i = t.length;
|
|
1471
1471
|
t.forEach(function(o, r) {
|
|
1472
|
-
o.tag ===
|
|
1473
|
-
}), t[
|
|
1472
|
+
o.tag === a.tag && o.kind === a.kind && o.multi === a.multi && (i = r);
|
|
1473
|
+
}), t[i] = a;
|
|
1474
1474
|
}), t;
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Vi() {
|
|
1477
1477
|
var e = {
|
|
1478
1478
|
scalar: {},
|
|
1479
1479
|
sequence: {},
|
|
@@ -1486,11 +1486,11 @@ function Va() {
|
|
|
1486
1486
|
fallback: []
|
|
1487
1487
|
}
|
|
1488
1488
|
}, n, t;
|
|
1489
|
-
function i
|
|
1490
|
-
|
|
1489
|
+
function a(i) {
|
|
1490
|
+
i.multi ? (e.multi[i.kind].push(i), e.multi.fallback.push(i)) : e[i.kind][i.tag] = e.fallback[i.tag] = i;
|
|
1491
1491
|
}
|
|
1492
1492
|
for (n = 0, t = arguments.length; n < t; n += 1)
|
|
1493
|
-
arguments[n].forEach(
|
|
1493
|
+
arguments[n].forEach(a);
|
|
1494
1494
|
return e;
|
|
1495
1495
|
}
|
|
1496
1496
|
function st(e) {
|
|
@@ -1506,19 +1506,19 @@ st.prototype.extend = function(e) {
|
|
|
1506
1506
|
e.implicit && (n = n.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1507
1507
|
else
|
|
1508
1508
|
throw new ye("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1509
|
-
n.forEach(function(
|
|
1510
|
-
if (!(
|
|
1509
|
+
n.forEach(function(i) {
|
|
1510
|
+
if (!(i instanceof de))
|
|
1511
1511
|
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1512
|
-
if (
|
|
1512
|
+
if (i.loadKind && i.loadKind !== "scalar")
|
|
1513
1513
|
throw new ye("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1514
|
-
if (
|
|
1514
|
+
if (i.multi)
|
|
1515
1515
|
throw new ye("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1516
|
-
}), t.forEach(function(
|
|
1517
|
-
if (!(
|
|
1516
|
+
}), t.forEach(function(i) {
|
|
1517
|
+
if (!(i instanceof de))
|
|
1518
1518
|
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1519
1519
|
});
|
|
1520
|
-
var
|
|
1521
|
-
return
|
|
1520
|
+
var a = Object.create(st.prototype);
|
|
1521
|
+
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Ft(a, "implicit"), a.compiledExplicit = Ft(a, "explicit"), a.compiledTypeMap = Vi(a.compiledImplicit, a.compiledExplicit), a;
|
|
1522
1522
|
};
|
|
1523
1523
|
var gn = st, hn = new de("tag:yaml.org,2002:str", {
|
|
1524
1524
|
kind: "scalar",
|
|
@@ -1542,23 +1542,23 @@ var gn = st, hn = new de("tag:yaml.org,2002:str", {
|
|
|
1542
1542
|
kn
|
|
1543
1543
|
]
|
|
1544
1544
|
});
|
|
1545
|
-
function
|
|
1545
|
+
function Ri(e) {
|
|
1546
1546
|
if (e === null)
|
|
1547
1547
|
return !0;
|
|
1548
1548
|
var n = e.length;
|
|
1549
1549
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Di() {
|
|
1552
1552
|
return null;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function Pi(e) {
|
|
1555
1555
|
return e === null;
|
|
1556
1556
|
}
|
|
1557
1557
|
var Cn = new de("tag:yaml.org,2002:null", {
|
|
1558
1558
|
kind: "scalar",
|
|
1559
|
-
resolve:
|
|
1560
|
-
construct:
|
|
1561
|
-
predicate:
|
|
1559
|
+
resolve: Ri,
|
|
1560
|
+
construct: Di,
|
|
1561
|
+
predicate: Pi,
|
|
1562
1562
|
represent: {
|
|
1563
1563
|
canonical: function() {
|
|
1564
1564
|
return "~";
|
|
@@ -1578,23 +1578,23 @@ var Cn = new de("tag:yaml.org,2002:null", {
|
|
|
1578
1578
|
},
|
|
1579
1579
|
defaultStyle: "lowercase"
|
|
1580
1580
|
});
|
|
1581
|
-
function
|
|
1581
|
+
function Ji(e) {
|
|
1582
1582
|
if (e === null)
|
|
1583
1583
|
return !1;
|
|
1584
1584
|
var n = e.length;
|
|
1585
1585
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function Hi(e) {
|
|
1588
1588
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function zi(e) {
|
|
1591
1591
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1592
1592
|
}
|
|
1593
1593
|
var wn = new de("tag:yaml.org,2002:bool", {
|
|
1594
1594
|
kind: "scalar",
|
|
1595
|
-
resolve:
|
|
1596
|
-
construct:
|
|
1597
|
-
predicate:
|
|
1595
|
+
resolve: Ji,
|
|
1596
|
+
construct: Hi,
|
|
1597
|
+
predicate: zi,
|
|
1598
1598
|
represent: {
|
|
1599
1599
|
lowercase: function(e) {
|
|
1600
1600
|
return e ? "true" : "false";
|
|
@@ -1608,67 +1608,67 @@ var wn = new de("tag:yaml.org,2002:bool", {
|
|
|
1608
1608
|
},
|
|
1609
1609
|
defaultStyle: "lowercase"
|
|
1610
1610
|
});
|
|
1611
|
-
function
|
|
1611
|
+
function Yi(e) {
|
|
1612
1612
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function Wi(e) {
|
|
1615
1615
|
return 48 <= e && e <= 55;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function Zi(e) {
|
|
1618
1618
|
return 48 <= e && e <= 57;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function Gi(e) {
|
|
1621
1621
|
if (e === null)
|
|
1622
1622
|
return !1;
|
|
1623
|
-
var n = e.length, t = 0,
|
|
1623
|
+
var n = e.length, t = 0, a = !1, i;
|
|
1624
1624
|
if (!n)
|
|
1625
1625
|
return !1;
|
|
1626
|
-
if (
|
|
1626
|
+
if (i = e[t], (i === "-" || i === "+") && (i = e[++t]), i === "0") {
|
|
1627
1627
|
if (t + 1 === n)
|
|
1628
1628
|
return !0;
|
|
1629
|
-
if (
|
|
1629
|
+
if (i = e[++t], i === "b") {
|
|
1630
1630
|
for (t++; t < n; t++)
|
|
1631
|
-
if (
|
|
1632
|
-
if (
|
|
1631
|
+
if (i = e[t], i !== "_") {
|
|
1632
|
+
if (i !== "0" && i !== "1")
|
|
1633
1633
|
return !1;
|
|
1634
|
-
|
|
1634
|
+
a = !0;
|
|
1635
1635
|
}
|
|
1636
|
-
return
|
|
1636
|
+
return a && i !== "_";
|
|
1637
1637
|
}
|
|
1638
|
-
if (
|
|
1638
|
+
if (i === "x") {
|
|
1639
1639
|
for (t++; t < n; t++)
|
|
1640
|
-
if (
|
|
1641
|
-
if (!
|
|
1640
|
+
if (i = e[t], i !== "_") {
|
|
1641
|
+
if (!Yi(e.charCodeAt(t)))
|
|
1642
1642
|
return !1;
|
|
1643
|
-
|
|
1643
|
+
a = !0;
|
|
1644
1644
|
}
|
|
1645
|
-
return
|
|
1645
|
+
return a && i !== "_";
|
|
1646
1646
|
}
|
|
1647
|
-
if (
|
|
1647
|
+
if (i === "o") {
|
|
1648
1648
|
for (t++; t < n; t++)
|
|
1649
|
-
if (
|
|
1650
|
-
if (!
|
|
1649
|
+
if (i = e[t], i !== "_") {
|
|
1650
|
+
if (!Wi(e.charCodeAt(t)))
|
|
1651
1651
|
return !1;
|
|
1652
|
-
|
|
1652
|
+
a = !0;
|
|
1653
1653
|
}
|
|
1654
|
-
return
|
|
1654
|
+
return a && i !== "_";
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
|
-
if (
|
|
1657
|
+
if (i === "_")
|
|
1658
1658
|
return !1;
|
|
1659
1659
|
for (; t < n; t++)
|
|
1660
|
-
if (
|
|
1661
|
-
if (!
|
|
1660
|
+
if (i = e[t], i !== "_") {
|
|
1661
|
+
if (!Zi(e.charCodeAt(t)))
|
|
1662
1662
|
return !1;
|
|
1663
|
-
|
|
1663
|
+
a = !0;
|
|
1664
1664
|
}
|
|
1665
|
-
return !(!
|
|
1665
|
+
return !(!a || i === "_");
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1668
|
-
var n = e, t = 1,
|
|
1669
|
-
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")),
|
|
1667
|
+
function Qi(e) {
|
|
1668
|
+
var n = e, t = 1, a;
|
|
1669
|
+
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), a = n[0], (a === "-" || a === "+") && (a === "-" && (t = -1), n = n.slice(1), a = n[0]), n === "0")
|
|
1670
1670
|
return 0;
|
|
1671
|
-
if (
|
|
1671
|
+
if (a === "0") {
|
|
1672
1672
|
if (n[1] === "b")
|
|
1673
1673
|
return t * parseInt(n.slice(2), 2);
|
|
1674
1674
|
if (n[1] === "x")
|
|
@@ -1678,14 +1678,14 @@ function Qa(e) {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
return t * parseInt(n, 10);
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function Xi(e) {
|
|
1682
1682
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !le.isNegativeZero(e);
|
|
1683
1683
|
}
|
|
1684
1684
|
var Sn = new de("tag:yaml.org,2002:int", {
|
|
1685
1685
|
kind: "scalar",
|
|
1686
|
-
resolve:
|
|
1687
|
-
construct:
|
|
1688
|
-
predicate:
|
|
1686
|
+
resolve: Gi,
|
|
1687
|
+
construct: Qi,
|
|
1688
|
+
predicate: Xi,
|
|
1689
1689
|
represent: {
|
|
1690
1690
|
binary: function(e) {
|
|
1691
1691
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1721,8 +1721,8 @@ function nr(e) {
|
|
|
1721
1721
|
var n, t;
|
|
1722
1722
|
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);
|
|
1723
1723
|
}
|
|
1724
|
-
var
|
|
1725
|
-
function
|
|
1724
|
+
var ar = /^[-+]?[0-9]+e/;
|
|
1725
|
+
function ir(e, n) {
|
|
1726
1726
|
var t;
|
|
1727
1727
|
if (isNaN(e))
|
|
1728
1728
|
switch (n) {
|
|
@@ -1753,7 +1753,7 @@ function ar(e, n) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
else if (le.isNegativeZero(e))
|
|
1755
1755
|
return "-0.0";
|
|
1756
|
-
return t = e.toString(10),
|
|
1756
|
+
return t = e.toString(10), ar.test(t) ? t.replace("e", ".e") : t;
|
|
1757
1757
|
}
|
|
1758
1758
|
function rr(e) {
|
|
1759
1759
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || le.isNegativeZero(e));
|
|
@@ -1763,7 +1763,7 @@ var _n = new de("tag:yaml.org,2002:float", {
|
|
|
1763
1763
|
resolve: tr,
|
|
1764
1764
|
construct: nr,
|
|
1765
1765
|
predicate: rr,
|
|
1766
|
-
represent:
|
|
1766
|
+
represent: ir,
|
|
1767
1767
|
defaultStyle: "lowercase"
|
|
1768
1768
|
}), In = bn.extend({
|
|
1769
1769
|
implicit: [
|
|
@@ -1781,17 +1781,17 @@ function or(e) {
|
|
|
1781
1781
|
return e === null ? !1 : xn.exec(e) !== null || jn.exec(e) !== null;
|
|
1782
1782
|
}
|
|
1783
1783
|
function lr(e) {
|
|
1784
|
-
var n, t,
|
|
1784
|
+
var n, t, a, i, o, r, l, s = 0, u = null, c, d, v;
|
|
1785
1785
|
if (n = xn.exec(e), n === null && (n = jn.exec(e)), n === null)
|
|
1786
1786
|
throw new Error("Date resolve error");
|
|
1787
|
-
if (t = +n[1],
|
|
1788
|
-
return new Date(Date.UTC(t,
|
|
1787
|
+
if (t = +n[1], a = +n[2] - 1, i = +n[3], !n[4])
|
|
1788
|
+
return new Date(Date.UTC(t, a, i));
|
|
1789
1789
|
if (o = +n[4], r = +n[5], l = +n[6], n[7]) {
|
|
1790
1790
|
for (s = n[7].slice(0, 3); s.length < 3; )
|
|
1791
1791
|
s += "0";
|
|
1792
1792
|
s = +s;
|
|
1793
1793
|
}
|
|
1794
|
-
return n[9] && (c = +n[10], d = +(n[11] || 0), u = (c * 60 + d) * 6e4, n[9] === "-" && (u = -u)), v = new Date(Date.UTC(t,
|
|
1794
|
+
return n[9] && (c = +n[10], d = +(n[11] || 0), u = (c * 60 + d) * 6e4, n[9] === "-" && (u = -u)), v = new Date(Date.UTC(t, a, i, o, r, l, s)), u && v.setTime(v.getTime() - u), v;
|
|
1795
1795
|
}
|
|
1796
1796
|
function sr(e) {
|
|
1797
1797
|
return e.toISOString();
|
|
@@ -1814,26 +1814,26 @@ var On = new de("tag:yaml.org,2002:merge", {
|
|
|
1814
1814
|
function ur(e) {
|
|
1815
1815
|
if (e === null)
|
|
1816
1816
|
return !1;
|
|
1817
|
-
var n, t,
|
|
1818
|
-
for (t = 0; t <
|
|
1817
|
+
var n, t, a = 0, i = e.length, o = vt;
|
|
1818
|
+
for (t = 0; t < i; t++)
|
|
1819
1819
|
if (n = o.indexOf(e.charAt(t)), !(n > 64)) {
|
|
1820
1820
|
if (n < 0)
|
|
1821
1821
|
return !1;
|
|
1822
|
-
|
|
1822
|
+
a += 6;
|
|
1823
1823
|
}
|
|
1824
|
-
return
|
|
1824
|
+
return a % 8 === 0;
|
|
1825
1825
|
}
|
|
1826
1826
|
function dr(e) {
|
|
1827
|
-
var n, t,
|
|
1828
|
-
for (n = 0; n <
|
|
1829
|
-
n % 4 === 0 && n && (l.push(r >> 16 & 255), l.push(r >> 8 & 255), l.push(r & 255)), r = r << 6 | o.indexOf(
|
|
1830
|
-
return t =
|
|
1827
|
+
var n, t, a = e.replace(/[\r\n=]/g, ""), i = a.length, o = vt, r = 0, l = [];
|
|
1828
|
+
for (n = 0; n < i; n++)
|
|
1829
|
+
n % 4 === 0 && n && (l.push(r >> 16 & 255), l.push(r >> 8 & 255), l.push(r & 255)), r = r << 6 | o.indexOf(a.charAt(n));
|
|
1830
|
+
return t = i % 4 * 6, t === 0 ? (l.push(r >> 16 & 255), l.push(r >> 8 & 255), l.push(r & 255)) : t === 18 ? (l.push(r >> 10 & 255), l.push(r >> 2 & 255)) : t === 12 && l.push(r >> 4 & 255), new Uint8Array(l);
|
|
1831
1831
|
}
|
|
1832
1832
|
function pr(e) {
|
|
1833
|
-
var n = "", t = 0,
|
|
1834
|
-
for (
|
|
1835
|
-
|
|
1836
|
-
return
|
|
1833
|
+
var n = "", t = 0, a, i, o = e.length, r = vt;
|
|
1834
|
+
for (a = 0; a < o; a++)
|
|
1835
|
+
a % 3 === 0 && a && (n += r[t >> 18 & 63], n += r[t >> 12 & 63], n += r[t >> 6 & 63], n += r[t & 63]), t = (t << 8) + e[a];
|
|
1836
|
+
return i = o % 3, i === 0 ? (n += r[t >> 18 & 63], n += r[t >> 12 & 63], n += r[t >> 6 & 63], n += r[t & 63]) : i === 2 ? (n += r[t >> 10 & 63], n += r[t >> 4 & 63], n += r[t << 2 & 63], n += r[64]) : i === 1 && (n += r[t >> 2 & 63], n += r[t << 4 & 63], n += r[64], n += r[64]), n;
|
|
1837
1837
|
}
|
|
1838
1838
|
function fr(e) {
|
|
1839
1839
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
@@ -1848,12 +1848,12 @@ var $n = new de("tag:yaml.org,2002:binary", {
|
|
|
1848
1848
|
function gr(e) {
|
|
1849
1849
|
if (e === null)
|
|
1850
1850
|
return !0;
|
|
1851
|
-
var n = [], t,
|
|
1852
|
-
for (t = 0,
|
|
1853
|
-
if (
|
|
1851
|
+
var n = [], t, a, i, o, r, l = e;
|
|
1852
|
+
for (t = 0, a = l.length; t < a; t += 1) {
|
|
1853
|
+
if (i = l[t], r = !1, mr.call(i) !== "[object Object]")
|
|
1854
1854
|
return !1;
|
|
1855
|
-
for (o in
|
|
1856
|
-
if (yr.call(
|
|
1855
|
+
for (o in i)
|
|
1856
|
+
if (yr.call(i, o))
|
|
1857
1857
|
if (!r)
|
|
1858
1858
|
r = !0;
|
|
1859
1859
|
else
|
|
@@ -1878,20 +1878,20 @@ var Mn = new de("tag:yaml.org,2002:omap", {
|
|
|
1878
1878
|
function kr(e) {
|
|
1879
1879
|
if (e === null)
|
|
1880
1880
|
return !0;
|
|
1881
|
-
var n, t,
|
|
1881
|
+
var n, t, a, i, o, r = e;
|
|
1882
1882
|
for (o = new Array(r.length), n = 0, t = r.length; n < t; n += 1) {
|
|
1883
|
-
if (
|
|
1883
|
+
if (a = r[n], vr.call(a) !== "[object Object]" || (i = Object.keys(a), i.length !== 1))
|
|
1884
1884
|
return !1;
|
|
1885
|
-
o[n] = [
|
|
1885
|
+
o[n] = [i[0], a[i[0]]];
|
|
1886
1886
|
}
|
|
1887
1887
|
return !0;
|
|
1888
1888
|
}
|
|
1889
1889
|
function br(e) {
|
|
1890
1890
|
if (e === null)
|
|
1891
1891
|
return [];
|
|
1892
|
-
var n, t,
|
|
1892
|
+
var n, t, a, i, o, r = e;
|
|
1893
1893
|
for (o = new Array(r.length), n = 0, t = r.length; n < t; n += 1)
|
|
1894
|
-
|
|
1894
|
+
a = r[n], i = Object.keys(a), o[n] = [i[0], a[i[0]]];
|
|
1895
1895
|
return o;
|
|
1896
1896
|
}
|
|
1897
1897
|
var Kn = new de("tag:yaml.org,2002:pairs", {
|
|
@@ -1977,7 +1977,7 @@ function Vn(e, n) {
|
|
|
1977
1977
|
line: e.line,
|
|
1978
1978
|
column: e.position - e.lineStart
|
|
1979
1979
|
};
|
|
1980
|
-
return t.snippet =
|
|
1980
|
+
return t.snippet = Ni(t), new ye(n, t);
|
|
1981
1981
|
}
|
|
1982
1982
|
function $(e, n) {
|
|
1983
1983
|
throw Vn(e, n);
|
|
@@ -1987,54 +1987,54 @@ function Ge(e, n) {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
var Lt = {
|
|
1989
1989
|
YAML: function(e, n, t) {
|
|
1990
|
-
var
|
|
1991
|
-
e.version !== null && $(e, "duplication of %YAML directive"), t.length !== 1 && $(e, "YAML directive accepts exactly one argument"),
|
|
1990
|
+
var a, i, o;
|
|
1991
|
+
e.version !== null && $(e, "duplication of %YAML directive"), t.length !== 1 && $(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && $(e, "ill-formed argument of the YAML directive"), i = parseInt(a[1], 10), o = parseInt(a[2], 10), i !== 1 && $(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ge(e, "unsupported YAML version of the document");
|
|
1992
1992
|
},
|
|
1993
1993
|
TAG: function(e, n, t) {
|
|
1994
|
-
var
|
|
1995
|
-
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"),
|
|
1994
|
+
var a, i;
|
|
1995
|
+
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), a = t[0], i = t[1], qn.test(a) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), xe.call(e.tagMap, a) && $(e, 'there is a previously declared suffix for "' + a + '" tag handle'), Bn.test(i) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1996
1996
|
try {
|
|
1997
|
-
|
|
1997
|
+
i = decodeURIComponent(i);
|
|
1998
1998
|
} catch {
|
|
1999
|
-
$(e, "tag prefix is malformed: " +
|
|
1999
|
+
$(e, "tag prefix is malformed: " + i);
|
|
2000
2000
|
}
|
|
2001
|
-
e.tagMap[
|
|
2001
|
+
e.tagMap[a] = i;
|
|
2002
2002
|
}
|
|
2003
2003
|
};
|
|
2004
|
-
function Ie(e, n, t,
|
|
2005
|
-
var
|
|
2004
|
+
function Ie(e, n, t, a) {
|
|
2005
|
+
var i, o, r, l;
|
|
2006
2006
|
if (n < t) {
|
|
2007
|
-
if (l = e.input.slice(n, t),
|
|
2008
|
-
for (
|
|
2009
|
-
r = l.charCodeAt(
|
|
2007
|
+
if (l = e.input.slice(n, t), a)
|
|
2008
|
+
for (i = 0, o = l.length; i < o; i += 1)
|
|
2009
|
+
r = l.charCodeAt(i), r === 9 || 32 <= r && r <= 1114111 || $(e, "expected valid JSON character");
|
|
2010
2010
|
else
|
|
2011
2011
|
Ir.test(l) && $(e, "the stream contains non-printable characters");
|
|
2012
2012
|
e.result += l;
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
|
-
function Ut(e, n, t,
|
|
2016
|
-
var
|
|
2017
|
-
for (le.isObject(t) || $(e, "cannot merge mappings; the provided source object is unacceptable"),
|
|
2018
|
-
o =
|
|
2015
|
+
function Ut(e, n, t, a) {
|
|
2016
|
+
var i, o, r, l;
|
|
2017
|
+
for (le.isObject(t) || $(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(t), r = 0, l = i.length; r < l; r += 1)
|
|
2018
|
+
o = i[r], xe.call(n, o) || (n[o] = t[o], a[o] = !0);
|
|
2019
2019
|
}
|
|
2020
|
-
function Ee(e, n, t,
|
|
2020
|
+
function Ee(e, n, t, a, i, o, r, l, s) {
|
|
2021
2021
|
var u, c;
|
|
2022
|
-
if (Array.isArray(
|
|
2023
|
-
for (
|
|
2024
|
-
Array.isArray(
|
|
2025
|
-
if (typeof
|
|
2022
|
+
if (Array.isArray(i))
|
|
2023
|
+
for (i = Array.prototype.slice.call(i), u = 0, c = i.length; u < c; u += 1)
|
|
2024
|
+
Array.isArray(i[u]) && $(e, "nested arrays are not supported inside keys"), typeof i == "object" && qt(i[u]) === "[object Object]" && (i[u] = "[object Object]");
|
|
2025
|
+
if (typeof i == "object" && qt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), n === null && (n = {}), a === "tag:yaml.org,2002:merge")
|
|
2026
2026
|
if (Array.isArray(o))
|
|
2027
2027
|
for (u = 0, c = o.length; u < c; u += 1)
|
|
2028
2028
|
Ut(e, n, o[u], t);
|
|
2029
2029
|
else
|
|
2030
2030
|
Ut(e, n, o, t);
|
|
2031
2031
|
else
|
|
2032
|
-
!e.json && !xe.call(t,
|
|
2032
|
+
!e.json && !xe.call(t, i) && xe.call(n, i) && (e.line = r || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, $(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(n, i, {
|
|
2033
2033
|
configurable: !0,
|
|
2034
2034
|
enumerable: !0,
|
|
2035
2035
|
writable: !0,
|
|
2036
2036
|
value: o
|
|
2037
|
-
}) : n[
|
|
2037
|
+
}) : n[i] = o, delete t[i];
|
|
2038
2038
|
return n;
|
|
2039
2039
|
}
|
|
2040
2040
|
function bt(e) {
|
|
@@ -2042,20 +2042,20 @@ function bt(e) {
|
|
|
2042
2042
|
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;
|
|
2043
2043
|
}
|
|
2044
2044
|
function oe(e, n, t) {
|
|
2045
|
-
for (var
|
|
2046
|
-
for (; Te(
|
|
2047
|
-
|
|
2048
|
-
if (n &&
|
|
2045
|
+
for (var a = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
2046
|
+
for (; Te(i); )
|
|
2047
|
+
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
2048
|
+
if (n && i === 35)
|
|
2049
2049
|
do
|
|
2050
|
-
|
|
2051
|
-
while (
|
|
2052
|
-
if (Ce(
|
|
2053
|
-
for (bt(e),
|
|
2054
|
-
e.lineIndent++,
|
|
2050
|
+
i = e.input.charCodeAt(++e.position);
|
|
2051
|
+
while (i !== 10 && i !== 13 && i !== 0);
|
|
2052
|
+
if (Ce(i))
|
|
2053
|
+
for (bt(e), i = e.input.charCodeAt(e.position), a++, e.lineIndent = 0; i === 32; )
|
|
2054
|
+
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
2055
2055
|
else
|
|
2056
2056
|
break;
|
|
2057
2057
|
}
|
|
2058
|
-
return t !== -1 &&
|
|
2058
|
+
return t !== -1 && a !== 0 && e.lineIndent < t && Ge(e, "deficient indentation"), a;
|
|
2059
2059
|
}
|
|
2060
2060
|
function nt(e) {
|
|
2061
2061
|
var n = e.position, t;
|
|
@@ -2066,15 +2066,15 @@ function Ct(e, n) {
|
|
|
2066
2066
|
`, n - 1));
|
|
2067
2067
|
}
|
|
2068
2068
|
function Kr(e, n, t) {
|
|
2069
|
-
var
|
|
2070
|
-
if (g = e.input.charCodeAt(e.position), he(g) || Ke(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (
|
|
2069
|
+
var a, i, o, r, l, s, u, c, d = e.kind, v = e.result, g;
|
|
2070
|
+
if (g = e.input.charCodeAt(e.position), he(g) || Ke(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (i = e.input.charCodeAt(e.position + 1), he(i) || t && Ke(i)))
|
|
2071
2071
|
return !1;
|
|
2072
2072
|
for (e.kind = "scalar", e.result = "", o = r = e.position, l = !1; g !== 0; ) {
|
|
2073
2073
|
if (g === 58) {
|
|
2074
|
-
if (
|
|
2074
|
+
if (i = e.input.charCodeAt(e.position + 1), he(i) || t && Ke(i))
|
|
2075
2075
|
break;
|
|
2076
2076
|
} else if (g === 35) {
|
|
2077
|
-
if (
|
|
2077
|
+
if (a = e.input.charCodeAt(e.position - 1), he(a))
|
|
2078
2078
|
break;
|
|
2079
2079
|
} else {
|
|
2080
2080
|
if (e.position === e.lineStart && nt(e) || t && Ke(g))
|
|
@@ -2093,24 +2093,24 @@ function Kr(e, n, t) {
|
|
|
2093
2093
|
return Ie(e, o, r, !1), e.result ? !0 : (e.kind = d, e.result = v, !1);
|
|
2094
2094
|
}
|
|
2095
2095
|
function Er(e, n) {
|
|
2096
|
-
var t,
|
|
2096
|
+
var t, a, i;
|
|
2097
2097
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
2098
2098
|
return !1;
|
|
2099
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
2099
|
+
for (e.kind = "scalar", e.result = "", e.position++, a = i = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2100
2100
|
if (t === 39)
|
|
2101
|
-
if (Ie(e,
|
|
2102
|
-
|
|
2101
|
+
if (Ie(e, a, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2102
|
+
a = e.position, e.position++, i = e.position;
|
|
2103
2103
|
else
|
|
2104
2104
|
return !0;
|
|
2105
2105
|
else
|
|
2106
|
-
Ce(t) ? (Ie(e,
|
|
2106
|
+
Ce(t) ? (Ie(e, a, i, !0), Ct(e, oe(e, !1, n)), a = i = e.position) : e.position === e.lineStart && nt(e) ? $(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
2107
2107
|
$(e, "unexpected end of the stream within a single quoted scalar");
|
|
2108
2108
|
}
|
|
2109
2109
|
function Fr(e, n) {
|
|
2110
|
-
var t,
|
|
2110
|
+
var t, a, i, o, r, l;
|
|
2111
2111
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
2112
2112
|
return !1;
|
|
2113
|
-
for (e.kind = "scalar", e.result = "", e.position++, t =
|
|
2113
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2114
2114
|
if (l === 34)
|
|
2115
2115
|
return Ie(e, t, e.position, !0), e.position++, !0;
|
|
2116
2116
|
if (l === 92) {
|
|
@@ -2119,19 +2119,19 @@ function Fr(e, n) {
|
|
|
2119
2119
|
else if (l < 256 && Ln[l])
|
|
2120
2120
|
e.result += Un[l], e.position++;
|
|
2121
2121
|
else if ((r = Tr(l)) > 0) {
|
|
2122
|
-
for (
|
|
2122
|
+
for (i = r, o = 0; i > 0; i--)
|
|
2123
2123
|
l = e.input.charCodeAt(++e.position), (r = jr(l)) >= 0 ? o = (o << 4) + r : $(e, "expected hexadecimal character");
|
|
2124
2124
|
e.result += $r(o), e.position++;
|
|
2125
2125
|
} else
|
|
2126
2126
|
$(e, "unknown escape sequence");
|
|
2127
|
-
t =
|
|
2127
|
+
t = a = e.position;
|
|
2128
2128
|
} else
|
|
2129
|
-
Ce(l) ? (Ie(e, t,
|
|
2129
|
+
Ce(l) ? (Ie(e, t, a, !0), Ct(e, oe(e, !1, n)), t = a = e.position) : e.position === e.lineStart && nt(e) ? $(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
2130
2130
|
}
|
|
2131
2131
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
2132
2132
|
}
|
|
2133
2133
|
function Nr(e, n) {
|
|
2134
|
-
var t = !0,
|
|
2134
|
+
var t = !0, a, i, o, r = e.tag, l, s = e.anchor, u, c, d, v, g, _ = /* @__PURE__ */ Object.create(null), k, x, b, f;
|
|
2135
2135
|
if (f = e.input.charCodeAt(e.position), f === 91)
|
|
2136
2136
|
c = 93, g = !1, l = [];
|
|
2137
2137
|
else if (f === 123)
|
|
@@ -2141,21 +2141,21 @@ function Nr(e, n) {
|
|
|
2141
2141
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), f = e.input.charCodeAt(++e.position); f !== 0; ) {
|
|
2142
2142
|
if (oe(e, !0, n), f = e.input.charCodeAt(e.position), f === c)
|
|
2143
2143
|
return e.position++, e.tag = r, e.anchor = s, e.kind = g ? "mapping" : "sequence", e.result = l, !0;
|
|
2144
|
-
t ? f === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), x = k = b = null, d = v = !1, f === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (d = v = !0, e.position++, oe(e, !0, n))),
|
|
2144
|
+
t ? f === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), x = k = b = null, d = v = !1, f === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (d = v = !0, e.position++, oe(e, !0, n))), a = e.line, i = e.lineStart, o = e.position, Fe(e, n, We, !1, !0), x = e.tag, k = e.result, oe(e, !0, n), f = e.input.charCodeAt(e.position), (v || e.line === a) && f === 58 && (d = !0, f = e.input.charCodeAt(++e.position), oe(e, !0, n), Fe(e, n, We, !1, !0), b = e.result), g ? Ee(e, l, _, x, k, b, a, i, o) : d ? l.push(Ee(e, null, _, x, k, b, a, i, o)) : l.push(k), oe(e, !0, n), f = e.input.charCodeAt(e.position), f === 44 ? (t = !0, f = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2145
2145
|
}
|
|
2146
2146
|
$(e, "unexpected end of the stream within a flow collection");
|
|
2147
2147
|
}
|
|
2148
2148
|
function qr(e, n) {
|
|
2149
|
-
var t,
|
|
2149
|
+
var t, a, i = ot, o = !1, r = !1, l = n, s = 0, u = !1, c, d;
|
|
2150
2150
|
if (d = e.input.charCodeAt(e.position), d === 124)
|
|
2151
|
-
|
|
2151
|
+
a = !1;
|
|
2152
2152
|
else if (d === 62)
|
|
2153
|
-
|
|
2153
|
+
a = !0;
|
|
2154
2154
|
else
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
for (e.kind = "scalar", e.result = ""; d !== 0; )
|
|
2157
2157
|
if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
|
|
2158
|
-
ot ===
|
|
2158
|
+
ot === i ? i = d === 43 ? Nt : _r : $(e, "repeat of a chomping mode identifier");
|
|
2159
2159
|
else if ((c = Or(d)) >= 0)
|
|
2160
2160
|
c === 0 ? $(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : r ? $(e, "repeat of an indentation width identifier") : (l = n + c - 1, r = !0);
|
|
2161
2161
|
else
|
|
@@ -2177,12 +2177,12 @@ function qr(e, n) {
|
|
|
2177
2177
|
continue;
|
|
2178
2178
|
}
|
|
2179
2179
|
if (e.lineIndent < l) {
|
|
2180
|
-
|
|
2181
|
-
`, o ? 1 + s : s) :
|
|
2180
|
+
i === Nt ? e.result += le.repeat(`
|
|
2181
|
+
`, o ? 1 + s : s) : i === ot && o && (e.result += `
|
|
2182
2182
|
`);
|
|
2183
2183
|
break;
|
|
2184
2184
|
}
|
|
2185
|
-
for (
|
|
2185
|
+
for (a ? Te(d) ? (u = !0, e.result += le.repeat(`
|
|
2186
2186
|
`, o ? 1 + s : s)) : u ? (u = !1, e.result += le.repeat(`
|
|
2187
2187
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += le.repeat(`
|
|
2188
2188
|
`, s) : e.result += le.repeat(`
|
|
@@ -2193,7 +2193,7 @@ function qr(e, n) {
|
|
|
2193
2193
|
return !0;
|
|
2194
2194
|
}
|
|
2195
2195
|
function Vt(e, n) {
|
|
2196
|
-
var t,
|
|
2196
|
+
var t, a = e.tag, i = e.anchor, o = [], r, l = !1, s;
|
|
2197
2197
|
if (e.firstTabInLine !== -1)
|
|
2198
2198
|
return !1;
|
|
2199
2199
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), !(s !== 45 || (r = e.input.charCodeAt(e.position + 1), !he(r)))); ) {
|
|
@@ -2206,15 +2206,15 @@ function Vt(e, n) {
|
|
|
2206
2206
|
else if (e.lineIndent < n)
|
|
2207
2207
|
break;
|
|
2208
2208
|
}
|
|
2209
|
-
return l ? (e.tag =
|
|
2209
|
+
return l ? (e.tag = a, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2210
2210
|
}
|
|
2211
2211
|
function Br(e, n, t) {
|
|
2212
|
-
var
|
|
2212
|
+
var a, i, o, r, l, s, u = e.tag, c = e.anchor, d = {}, v = /* @__PURE__ */ Object.create(null), g = null, _ = null, k = null, x = !1, b = !1, f;
|
|
2213
2213
|
if (e.firstTabInLine !== -1)
|
|
2214
2214
|
return !1;
|
|
2215
2215
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), f = e.input.charCodeAt(e.position); f !== 0; ) {
|
|
2216
|
-
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")),
|
|
2217
|
-
f === 63 ? (x && (Ee(e, d, v, g, _, null, r, l, s), g = _ = k = null), b = !0, x = !0,
|
|
2216
|
+
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), o = e.line, (f === 63 || f === 58) && he(a))
|
|
2217
|
+
f === 63 ? (x && (Ee(e, d, v, g, _, null, r, l, s), g = _ = k = null), b = !0, x = !0, i = !0) : x ? (x = !1, i = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, f = a;
|
|
2218
2218
|
else {
|
|
2219
2219
|
if (r = e.line, l = e.lineStart, s = e.position, !Fe(e, t, Fn, !1, !0))
|
|
2220
2220
|
break;
|
|
@@ -2222,7 +2222,7 @@ function Br(e, n, t) {
|
|
|
2222
2222
|
for (f = e.input.charCodeAt(e.position); Te(f); )
|
|
2223
2223
|
f = e.input.charCodeAt(++e.position);
|
|
2224
2224
|
if (f === 58)
|
|
2225
|
-
f = e.input.charCodeAt(++e.position), he(f) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ee(e, d, v, g, _, null, r, l, s), g = _ = k = null), b = !0, x = !1,
|
|
2225
|
+
f = e.input.charCodeAt(++e.position), he(f) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ee(e, d, v, g, _, null, r, l, s), g = _ = k = null), b = !0, x = !1, i = !1, g = e.tag, _ = e.result;
|
|
2226
2226
|
else if (b)
|
|
2227
2227
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2228
2228
|
else
|
|
@@ -2232,7 +2232,7 @@ function Br(e, n, t) {
|
|
|
2232
2232
|
else
|
|
2233
2233
|
return e.tag = u, e.anchor = c, !0;
|
|
2234
2234
|
}
|
|
2235
|
-
if ((e.line === o || e.lineIndent > n) && (x && (r = e.line, l = e.lineStart, s = e.position), Fe(e, n, Ze, !0,
|
|
2235
|
+
if ((e.line === o || e.lineIndent > n) && (x && (r = e.line, l = e.lineStart, s = e.position), Fe(e, n, Ze, !0, i) && (x ? _ = e.result : k = e.result), x || (Ee(e, d, v, g, _, k, r, l, s), g = _ = k = null), oe(e, !0, -1), f = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && f !== 0)
|
|
2236
2236
|
$(e, "bad indentation of a mapping entry");
|
|
2237
2237
|
else if (e.lineIndent < n)
|
|
2238
2238
|
break;
|
|
@@ -2240,17 +2240,17 @@ function Br(e, n, t) {
|
|
|
2240
2240
|
return x && Ee(e, d, v, g, _, null, r, l, s), b && (e.tag = u, e.anchor = c, e.kind = "mapping", e.result = d), b;
|
|
2241
2241
|
}
|
|
2242
2242
|
function Lr(e) {
|
|
2243
|
-
var n, t = !1,
|
|
2243
|
+
var n, t = !1, a = !1, i, o, r;
|
|
2244
2244
|
if (r = e.input.charCodeAt(e.position), r !== 33)
|
|
2245
2245
|
return !1;
|
|
2246
|
-
if (e.tag !== null && $(e, "duplication of a tag property"), r = e.input.charCodeAt(++e.position), r === 60 ? (t = !0, r = e.input.charCodeAt(++e.position)) : r === 33 ? (
|
|
2246
|
+
if (e.tag !== null && $(e, "duplication of a tag property"), r = e.input.charCodeAt(++e.position), r === 60 ? (t = !0, r = e.input.charCodeAt(++e.position)) : r === 33 ? (a = !0, i = "!!", r = e.input.charCodeAt(++e.position)) : i = "!", n = e.position, t) {
|
|
2247
2247
|
do
|
|
2248
2248
|
r = e.input.charCodeAt(++e.position);
|
|
2249
2249
|
while (r !== 0 && r !== 62);
|
|
2250
2250
|
e.position < e.length ? (o = e.input.slice(n, e.position), r = e.input.charCodeAt(++e.position)) : $(e, "unexpected end of the stream within a verbatim tag");
|
|
2251
2251
|
} else {
|
|
2252
2252
|
for (; r !== 0 && !he(r); )
|
|
2253
|
-
r === 33 && (
|
|
2253
|
+
r === 33 && (a ? $(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(n - 1, e.position + 1), qn.test(i) || $(e, "named tag handle cannot contain such characters"), a = !0, n = e.position + 1)), r = e.input.charCodeAt(++e.position);
|
|
2254
2254
|
o = e.input.slice(n, e.position), xr.test(o) && $(e, "tag suffix cannot contain flow indicator characters");
|
|
2255
2255
|
}
|
|
2256
2256
|
o && !Bn.test(o) && $(e, "tag name cannot contain such characters: " + o);
|
|
@@ -2259,7 +2259,7 @@ function Lr(e) {
|
|
|
2259
2259
|
} catch {
|
|
2260
2260
|
$(e, "tag name is malformed: " + o);
|
|
2261
2261
|
}
|
|
2262
|
-
return t ? e.tag = o : xe.call(e.tagMap,
|
|
2262
|
+
return t ? e.tag = o : xe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : $(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2263
2263
|
}
|
|
2264
2264
|
function Ur(e) {
|
|
2265
2265
|
var n, t;
|
|
@@ -2270,19 +2270,19 @@ function Ur(e) {
|
|
|
2270
2270
|
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;
|
|
2271
2271
|
}
|
|
2272
2272
|
function Vr(e) {
|
|
2273
|
-
var n, t,
|
|
2274
|
-
if (
|
|
2273
|
+
var n, t, a;
|
|
2274
|
+
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2275
2275
|
return !1;
|
|
2276
|
-
for (
|
|
2277
|
-
|
|
2276
|
+
for (a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !he(a) && !Ke(a); )
|
|
2277
|
+
a = e.input.charCodeAt(++e.position);
|
|
2278
2278
|
return e.position === n && $(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), xe.call(e.anchorMap, t) || $(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2279
2279
|
}
|
|
2280
|
-
function Fe(e, n, t,
|
|
2280
|
+
function Fe(e, n, t, a, i) {
|
|
2281
2281
|
var o, r, l, s = 1, u = !1, c = !1, d, v, g, _, k, x;
|
|
2282
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = r = l = Ze === t || Nn === t,
|
|
2282
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = r = l = Ze === t || Nn === t, a && oe(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2283
2283
|
for (; Lr(e) || Ur(e); )
|
|
2284
2284
|
oe(e, !0, -1) ? (u = !0, l = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2285
|
-
if (l && (l = u ||
|
|
2285
|
+
if (l && (l = u || i), (s === 1 || Ze === t) && (We === t || Fn === t ? k = n : k = n + 1, x = e.position - e.lineStart, s === 1 ? l && (Vt(e, x) || Br(e, x, k)) || Nr(e, k) ? c = !0 : (r && qr(e, k) || Er(e, k) || Fr(e, k) ? c = !0 : Vr(e) ? (c = !0, (e.tag !== null || e.anchor !== null) && $(e, "alias node should not have any properties")) : Kr(e, k, We === t) && (c = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (c = l && Vt(e, x))), e.tag === null)
|
|
2286
2286
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2287
2287
|
else if (e.tag === "?") {
|
|
2288
2288
|
for (e.result !== null && e.kind !== "scalar" && $(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0, v = e.implicitTypes.length; d < v; d += 1)
|
|
@@ -2304,11 +2304,11 @@ function Fe(e, n, t, i, a) {
|
|
|
2304
2304
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || c;
|
|
2305
2305
|
}
|
|
2306
2306
|
function Rr(e) {
|
|
2307
|
-
var n = e.position, t,
|
|
2307
|
+
var n = e.position, t, a, i, o = !1, r;
|
|
2308
2308
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (r = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), r = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || r !== 37)); ) {
|
|
2309
2309
|
for (o = !0, r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !he(r); )
|
|
2310
2310
|
r = e.input.charCodeAt(++e.position);
|
|
2311
|
-
for (
|
|
2311
|
+
for (a = e.input.slice(t, e.position), i = [], a.length < 1 && $(e, "directive name must not be less than one character in length"); r !== 0; ) {
|
|
2312
2312
|
for (; Te(r); )
|
|
2313
2313
|
r = e.input.charCodeAt(++e.position);
|
|
2314
2314
|
if (r === 35) {
|
|
@@ -2321,9 +2321,9 @@ function Rr(e) {
|
|
|
2321
2321
|
break;
|
|
2322
2322
|
for (t = e.position; r !== 0 && !he(r); )
|
|
2323
2323
|
r = e.input.charCodeAt(++e.position);
|
|
2324
|
-
|
|
2324
|
+
i.push(e.input.slice(t, e.position));
|
|
2325
2325
|
}
|
|
2326
|
-
r !== 0 && bt(e), xe.call(Lt,
|
|
2326
|
+
r !== 0 && bt(e), xe.call(Lt, a) ? Lt[a](e, a, i) : Ge(e, 'unknown document directive "' + a + '"');
|
|
2327
2327
|
}
|
|
2328
2328
|
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)) : o && $(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, Ze, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Ar.test(e.input.slice(n, e.position)) && Ge(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && nt(e)) {
|
|
2329
2329
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
@@ -2337,8 +2337,8 @@ function Rr(e) {
|
|
|
2337
2337
|
function Rn(e, n) {
|
|
2338
2338
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2339
2339
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2340
|
-
var t = new Mr(e, n),
|
|
2341
|
-
for (
|
|
2340
|
+
var t = new Mr(e, n), a = e.indexOf("\0");
|
|
2341
|
+
for (a !== -1 && (t.position = a, $(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2342
2342
|
t.lineIndent += 1, t.position += 1;
|
|
2343
2343
|
for (; t.position < t.length - 1; )
|
|
2344
2344
|
Rr(t);
|
|
@@ -2346,11 +2346,11 @@ function Rn(e, n) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
function Dr(e, n, t) {
|
|
2348
2348
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2349
|
-
var
|
|
2349
|
+
var a = Rn(e, t);
|
|
2350
2350
|
if (typeof n != "function")
|
|
2351
|
-
return
|
|
2352
|
-
for (var
|
|
2353
|
-
n(i
|
|
2351
|
+
return a;
|
|
2352
|
+
for (var i = 0, o = a.length; i < o; i += 1)
|
|
2353
|
+
n(a[i]);
|
|
2354
2354
|
}
|
|
2355
2355
|
function Pr(e, n) {
|
|
2356
2356
|
var t = Rn(e, n);
|
|
@@ -2363,7 +2363,7 @@ function Pr(e, n) {
|
|
|
2363
2363
|
var Jr = Dr, Hr = Pr, Dn = {
|
|
2364
2364
|
loadAll: Jr,
|
|
2365
2365
|
load: Hr
|
|
2366
|
-
}, Pn = Object.prototype.toString, Jn = Object.prototype.hasOwnProperty, wt = 65279, zr = 9, Pe = 10, Yr = 13, Wr = 32, Zr = 33, Gr = 34, ct = 35, Qr = 37, Xr = 38, eo = 39, to = 42, Hn = 44, no = 45, Qe = 58,
|
|
2366
|
+
}, Pn = Object.prototype.toString, Jn = Object.prototype.hasOwnProperty, wt = 65279, zr = 9, Pe = 10, Yr = 13, Wr = 32, Zr = 33, Gr = 34, ct = 35, Qr = 37, Xr = 38, eo = 39, to = 42, Hn = 44, no = 45, Qe = 58, ao = 61, io = 62, ro = 63, oo = 64, zn = 91, Yn = 93, lo = 96, Wn = 123, so = 124, Zn = 125, pe = {};
|
|
2367
2367
|
pe[0] = "\\0";
|
|
2368
2368
|
pe[7] = "\\a";
|
|
2369
2369
|
pe[8] = "\\b";
|
|
@@ -2398,33 +2398,33 @@ var co = [
|
|
|
2398
2398
|
"OFF"
|
|
2399
2399
|
], uo = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2400
2400
|
function po(e, n) {
|
|
2401
|
-
var t,
|
|
2401
|
+
var t, a, i, o, r, l, s;
|
|
2402
2402
|
if (n === null)
|
|
2403
2403
|
return {};
|
|
2404
|
-
for (t = {},
|
|
2405
|
-
r = i
|
|
2404
|
+
for (t = {}, a = Object.keys(n), i = 0, o = a.length; i < o; i += 1)
|
|
2405
|
+
r = a[i], l = String(n[r]), r.slice(0, 2) === "!!" && (r = "tag:yaml.org,2002:" + r.slice(2)), s = e.compiledTypeMap.fallback[r], s && Jn.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[r] = l;
|
|
2406
2406
|
return t;
|
|
2407
2407
|
}
|
|
2408
2408
|
function fo(e) {
|
|
2409
|
-
var n, t,
|
|
2409
|
+
var n, t, a;
|
|
2410
2410
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2411
|
-
t = "x",
|
|
2411
|
+
t = "x", a = 2;
|
|
2412
2412
|
else if (e <= 65535)
|
|
2413
|
-
t = "u",
|
|
2413
|
+
t = "u", a = 4;
|
|
2414
2414
|
else if (e <= 4294967295)
|
|
2415
|
-
t = "U",
|
|
2415
|
+
t = "U", a = 8;
|
|
2416
2416
|
else
|
|
2417
2417
|
throw new ye("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2418
|
-
return "\\" + t + le.repeat("0",
|
|
2418
|
+
return "\\" + t + le.repeat("0", a - n.length) + n;
|
|
2419
2419
|
}
|
|
2420
2420
|
var yo = 1, Je = 2;
|
|
2421
2421
|
function mo(e) {
|
|
2422
2422
|
this.schema = e.schema || kt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = po(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 === '"' ? Je : yo, 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;
|
|
2423
2423
|
}
|
|
2424
2424
|
function Rt(e, n) {
|
|
2425
|
-
for (var t = le.repeat(" ", n),
|
|
2426
|
-
|
|
2427
|
-
`,
|
|
2425
|
+
for (var t = le.repeat(" ", n), a = 0, i = -1, o = "", r, l = e.length; a < l; )
|
|
2426
|
+
i = e.indexOf(`
|
|
2427
|
+
`, a), i === -1 ? (r = e.slice(a), a = l) : (r = e.slice(a, i + 1), a = i + 1), r.length && r !== `
|
|
2428
2428
|
` && (o += t), o += r;
|
|
2429
2429
|
return o;
|
|
2430
2430
|
}
|
|
@@ -2433,9 +2433,9 @@ function ut(e, n) {
|
|
|
2433
2433
|
` + le.repeat(" ", e.indent * n);
|
|
2434
2434
|
}
|
|
2435
2435
|
function go(e, n) {
|
|
2436
|
-
var t,
|
|
2437
|
-
for (t = 0,
|
|
2438
|
-
if (
|
|
2436
|
+
var t, a, i;
|
|
2437
|
+
for (t = 0, a = e.implicitTypes.length; t < a; t += 1)
|
|
2438
|
+
if (i = e.implicitTypes[t], i.resolve(n))
|
|
2439
2439
|
return !0;
|
|
2440
2440
|
return !1;
|
|
2441
2441
|
}
|
|
@@ -2449,32 +2449,32 @@ function Dt(e) {
|
|
|
2449
2449
|
return He(e) && e !== wt && e !== Yr && e !== Pe;
|
|
2450
2450
|
}
|
|
2451
2451
|
function Pt(e, n, t) {
|
|
2452
|
-
var
|
|
2452
|
+
var a = Dt(e), i = a && !Xe(e);
|
|
2453
2453
|
return (
|
|
2454
2454
|
// ns-plain-safe
|
|
2455
2455
|
(t ? (
|
|
2456
2456
|
// c = flow-in
|
|
2457
|
-
|
|
2458
|
-
) :
|
|
2457
|
+
a
|
|
2458
|
+
) : a && e !== Hn && e !== zn && e !== Yn && e !== Wn && e !== Zn) && e !== ct && !(n === Qe && !i) || Dt(n) && !Xe(n) && e === ct || n === Qe && i
|
|
2459
2459
|
);
|
|
2460
2460
|
}
|
|
2461
2461
|
function ho(e) {
|
|
2462
|
-
return He(e) && e !== wt && !Xe(e) && e !== no && e !== ro && e !== Qe && e !== Hn && e !== zn && e !== Yn && e !== Wn && e !== Zn && e !== ct && e !== Xr && e !== to && e !== Zr && e !== so && e !==
|
|
2462
|
+
return He(e) && e !== wt && !Xe(e) && e !== no && e !== ro && e !== Qe && e !== Hn && e !== zn && e !== Yn && e !== Wn && e !== Zn && e !== ct && e !== Xr && e !== to && e !== Zr && e !== so && e !== ao && e !== io && e !== eo && e !== Gr && e !== Qr && e !== oo && e !== lo;
|
|
2463
2463
|
}
|
|
2464
2464
|
function vo(e) {
|
|
2465
2465
|
return !Xe(e) && e !== Qe;
|
|
2466
2466
|
}
|
|
2467
2467
|
function Le(e, n) {
|
|
2468
|
-
var t = e.charCodeAt(n),
|
|
2469
|
-
return t >= 55296 && t <= 56319 && n + 1 < e.length && (
|
|
2468
|
+
var t = e.charCodeAt(n), a;
|
|
2469
|
+
return t >= 55296 && t <= 56319 && n + 1 < e.length && (a = e.charCodeAt(n + 1), a >= 56320 && a <= 57343) ? (t - 55296) * 1024 + a - 56320 + 65536 : t;
|
|
2470
2470
|
}
|
|
2471
2471
|
function Gn(e) {
|
|
2472
2472
|
var n = /^\n* /;
|
|
2473
2473
|
return n.test(e);
|
|
2474
2474
|
}
|
|
2475
|
-
var Qn = 1, dt = 2, Xn = 3,
|
|
2476
|
-
function ko(e, n, t,
|
|
2477
|
-
var s, u = 0, c = null, d = !1, v = !1, g =
|
|
2475
|
+
var Qn = 1, dt = 2, Xn = 3, ea = 4, Me = 5;
|
|
2476
|
+
function ko(e, n, t, a, i, o, r, l) {
|
|
2477
|
+
var s, u = 0, c = null, d = !1, v = !1, g = a !== -1, _ = -1, k = ho(Le(e, 0)) && vo(Le(e, e.length - 1));
|
|
2478
2478
|
if (n || r)
|
|
2479
2479
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2480
2480
|
if (u = Le(e, s), !He(u))
|
|
@@ -2485,22 +2485,22 @@ function ko(e, n, t, i, a, o, r, l) {
|
|
|
2485
2485
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2486
2486
|
if (u = Le(e, s), u === Pe)
|
|
2487
2487
|
d = !0, g && (v = v || // Foldable line = too long, and not more-indented.
|
|
2488
|
-
s - _ - 1 >
|
|
2488
|
+
s - _ - 1 > a && e[_ + 1] !== " ", _ = s);
|
|
2489
2489
|
else if (!He(u))
|
|
2490
2490
|
return Me;
|
|
2491
2491
|
k = k && Pt(u, c, l), c = u;
|
|
2492
2492
|
}
|
|
2493
|
-
v = v || g && s - _ - 1 >
|
|
2493
|
+
v = v || g && s - _ - 1 > a && e[_ + 1] !== " ";
|
|
2494
2494
|
}
|
|
2495
|
-
return !d && !v ? k && !r && !
|
|
2495
|
+
return !d && !v ? k && !r && !i(e) ? Qn : o === Je ? Me : dt : t > 9 && Gn(e) ? Me : r ? o === Je ? Me : dt : v ? ea : Xn;
|
|
2496
2496
|
}
|
|
2497
|
-
function bo(e, n, t,
|
|
2497
|
+
function bo(e, n, t, a, i) {
|
|
2498
2498
|
e.dump = function() {
|
|
2499
2499
|
if (n.length === 0)
|
|
2500
2500
|
return e.quotingType === Je ? '""' : "''";
|
|
2501
2501
|
if (!e.noCompatMode && (co.indexOf(n) !== -1 || uo.test(n)))
|
|
2502
2502
|
return e.quotingType === Je ? '"' + n + '"' : "'" + n + "'";
|
|
2503
|
-
var o = e.indent * Math.max(1, t), r = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l =
|
|
2503
|
+
var o = e.indent * Math.max(1, t), r = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2504
2504
|
function s(u) {
|
|
2505
2505
|
return go(e, u);
|
|
2506
2506
|
}
|
|
@@ -2511,8 +2511,8 @@ function bo(e, n, t, i, a) {
|
|
|
2511
2511
|
r,
|
|
2512
2512
|
s,
|
|
2513
2513
|
e.quotingType,
|
|
2514
|
-
e.forceQuotes && !
|
|
2515
|
-
|
|
2514
|
+
e.forceQuotes && !a,
|
|
2515
|
+
i
|
|
2516
2516
|
)) {
|
|
2517
2517
|
case Qn:
|
|
2518
2518
|
return n;
|
|
@@ -2520,7 +2520,7 @@ function bo(e, n, t, i, a) {
|
|
|
2520
2520
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2521
2521
|
case Xn:
|
|
2522
2522
|
return "|" + Jt(n, e.indent) + Ht(Rt(n, o));
|
|
2523
|
-
case
|
|
2523
|
+
case ea:
|
|
2524
2524
|
return ">" + Jt(n, e.indent) + Ht(Rt(Co(n, r), o));
|
|
2525
2525
|
case Me:
|
|
2526
2526
|
return '"' + wo(n) + '"';
|
|
@@ -2530,10 +2530,10 @@ function bo(e, n, t, i, a) {
|
|
|
2530
2530
|
}();
|
|
2531
2531
|
}
|
|
2532
2532
|
function Jt(e, n) {
|
|
2533
|
-
var t = Gn(e) ? String(n) : "",
|
|
2534
|
-
`,
|
|
2533
|
+
var t = Gn(e) ? String(n) : "", a = e[e.length - 1] === `
|
|
2534
|
+
`, i = a && (e[e.length - 2] === `
|
|
2535
2535
|
` || e === `
|
|
2536
|
-
`), o =
|
|
2536
|
+
`), o = i ? "+" : a ? "" : "-";
|
|
2537
2537
|
return t + o + `
|
|
2538
2538
|
`;
|
|
2539
2539
|
}
|
|
@@ -2542,53 +2542,53 @@ function Ht(e) {
|
|
|
2542
2542
|
` ? e.slice(0, -1) : e;
|
|
2543
2543
|
}
|
|
2544
2544
|
function Co(e, n) {
|
|
2545
|
-
for (var t = /(\n+)([^\n]*)/g,
|
|
2545
|
+
for (var t = /(\n+)([^\n]*)/g, a = function() {
|
|
2546
2546
|
var u = e.indexOf(`
|
|
2547
2547
|
`);
|
|
2548
2548
|
return u = u !== -1 ? u : e.length, t.lastIndex = u, zt(e.slice(0, u), n);
|
|
2549
|
-
}(),
|
|
2549
|
+
}(), i = e[0] === `
|
|
2550
2550
|
` || e[0] === " ", o, r; r = t.exec(e); ) {
|
|
2551
2551
|
var l = r[1], s = r[2];
|
|
2552
|
-
o = s[0] === " ",
|
|
2553
|
-
` : "") + zt(s, n),
|
|
2552
|
+
o = s[0] === " ", a += l + (!i && !o && s !== "" ? `
|
|
2553
|
+
` : "") + zt(s, n), i = o;
|
|
2554
2554
|
}
|
|
2555
|
-
return
|
|
2555
|
+
return a;
|
|
2556
2556
|
}
|
|
2557
2557
|
function zt(e, n) {
|
|
2558
2558
|
if (e === "" || e[0] === " ")
|
|
2559
2559
|
return e;
|
|
2560
|
-
for (var t = / [^ ]/g,
|
|
2561
|
-
l =
|
|
2562
|
-
` + e.slice(
|
|
2560
|
+
for (var t = / [^ ]/g, a, i = 0, o, r = 0, l = 0, s = ""; a = t.exec(e); )
|
|
2561
|
+
l = a.index, l - i > n && (o = r > i ? r : l, s += `
|
|
2562
|
+
` + e.slice(i, o), i = o + 1), r = l;
|
|
2563
2563
|
return s += `
|
|
2564
|
-
`, e.length -
|
|
2565
|
-
` + e.slice(r + 1) : s += e.slice(
|
|
2564
|
+
`, e.length - i > n && r > i ? s += e.slice(i, r) + `
|
|
2565
|
+
` + e.slice(r + 1) : s += e.slice(i), s.slice(1);
|
|
2566
2566
|
}
|
|
2567
2567
|
function wo(e) {
|
|
2568
|
-
for (var n = "", t = 0,
|
|
2569
|
-
t = Le(e,
|
|
2568
|
+
for (var n = "", t = 0, a, i = 0; i < e.length; t >= 65536 ? i += 2 : i++)
|
|
2569
|
+
t = Le(e, i), a = pe[t], !a && He(t) ? (n += e[i], t >= 65536 && (n += e[i + 1])) : n += a || fo(t);
|
|
2570
2570
|
return n;
|
|
2571
2571
|
}
|
|
2572
2572
|
function So(e, n, t) {
|
|
2573
|
-
var
|
|
2573
|
+
var a = "", i = e.tag, o, r, l;
|
|
2574
2574
|
for (o = 0, r = t.length; o < r; o += 1)
|
|
2575
|
-
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (we(e, n, l, !1, !1) || typeof l > "u" && we(e, n, null, !1, !1)) && (
|
|
2576
|
-
e.tag =
|
|
2575
|
+
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (we(e, n, l, !1, !1) || typeof l > "u" && we(e, n, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
2576
|
+
e.tag = i, e.dump = "[" + a + "]";
|
|
2577
2577
|
}
|
|
2578
|
-
function Yt(e, n, t,
|
|
2579
|
-
var
|
|
2578
|
+
function Yt(e, n, t, a) {
|
|
2579
|
+
var i = "", o = e.tag, r, l, s;
|
|
2580
2580
|
for (r = 0, l = t.length; r < l; r += 1)
|
|
2581
|
-
s = t[r], e.replacer && (s = e.replacer.call(t, String(r), s)), (we(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && we(e, n + 1, null, !0, !0, !1, !0)) && ((!
|
|
2582
|
-
e.tag = o, e.dump =
|
|
2581
|
+
s = t[r], e.replacer && (s = e.replacer.call(t, String(r), s)), (we(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && we(e, n + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += ut(e, n)), e.dump && Pe === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2582
|
+
e.tag = o, e.dump = i || "[]";
|
|
2583
2583
|
}
|
|
2584
2584
|
function _o(e, n, t) {
|
|
2585
|
-
var
|
|
2585
|
+
var a = "", i = e.tag, o = Object.keys(t), r, l, s, u, c;
|
|
2586
2586
|
for (r = 0, l = o.length; r < l; r += 1)
|
|
2587
|
-
c = "",
|
|
2588
|
-
e.tag =
|
|
2587
|
+
c = "", a !== "" && (c += ", "), e.condenseFlow && (c += '"'), s = o[r], u = t[s], e.replacer && (u = e.replacer.call(t, s, u)), we(e, n, s, !1, !1) && (e.dump.length > 1024 && (c += "? "), c += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), we(e, n, u, !1, !1) && (c += e.dump, a += c));
|
|
2588
|
+
e.tag = i, e.dump = "{" + a + "}";
|
|
2589
2589
|
}
|
|
2590
|
-
function Io(e, n, t,
|
|
2591
|
-
var
|
|
2590
|
+
function Io(e, n, t, a) {
|
|
2591
|
+
var i = "", o = e.tag, r = Object.keys(t), l, s, u, c, d, v;
|
|
2592
2592
|
if (e.sortKeys === !0)
|
|
2593
2593
|
r.sort();
|
|
2594
2594
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2596,38 +2596,38 @@ function Io(e, n, t, i) {
|
|
|
2596
2596
|
else if (e.sortKeys)
|
|
2597
2597
|
throw new ye("sortKeys must be a boolean or a function");
|
|
2598
2598
|
for (l = 0, s = r.length; l < s; l += 1)
|
|
2599
|
-
v = "", (!
|
|
2600
|
-
e.tag = o, e.dump =
|
|
2599
|
+
v = "", (!a || i !== "") && (v += ut(e, n)), u = r[l], c = t[u], e.replacer && (c = e.replacer.call(t, u, c)), we(e, n + 1, u, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && Pe === e.dump.charCodeAt(0) ? v += "?" : v += "? "), v += e.dump, d && (v += ut(e, n)), we(e, n + 1, c, !0, d) && (e.dump && Pe === e.dump.charCodeAt(0) ? v += ":" : v += ": ", v += e.dump, i += v));
|
|
2600
|
+
e.tag = o, e.dump = i || "{}";
|
|
2601
2601
|
}
|
|
2602
2602
|
function Wt(e, n, t) {
|
|
2603
|
-
var
|
|
2604
|
-
for (
|
|
2605
|
-
if (l =
|
|
2603
|
+
var a, i, o, r, l, s;
|
|
2604
|
+
for (i = t ? e.explicitTypes : e.implicitTypes, o = 0, r = i.length; o < r; o += 1)
|
|
2605
|
+
if (l = i[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof n == "object" && n instanceof l.instanceOf) && (!l.predicate || l.predicate(n))) {
|
|
2606
2606
|
if (t ? l.multi && l.representName ? e.tag = l.representName(n) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2607
2607
|
if (s = e.styleMap[l.tag] || l.defaultStyle, Pn.call(l.represent) === "[object Function]")
|
|
2608
|
-
|
|
2608
|
+
a = l.represent(n, s);
|
|
2609
2609
|
else if (Jn.call(l.represent, s))
|
|
2610
|
-
|
|
2610
|
+
a = l.represent[s](n, s);
|
|
2611
2611
|
else
|
|
2612
2612
|
throw new ye("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2613
|
-
e.dump =
|
|
2613
|
+
e.dump = a;
|
|
2614
2614
|
}
|
|
2615
2615
|
return !0;
|
|
2616
2616
|
}
|
|
2617
2617
|
return !1;
|
|
2618
2618
|
}
|
|
2619
|
-
function we(e, n, t,
|
|
2619
|
+
function we(e, n, t, a, i, o, r) {
|
|
2620
2620
|
e.tag = null, e.dump = t, Wt(e, t, !1) || Wt(e, t, !0);
|
|
2621
|
-
var l = Pn.call(e.dump), s =
|
|
2622
|
-
|
|
2621
|
+
var l = Pn.call(e.dump), s = a, u;
|
|
2622
|
+
a && (a = e.flowLevel < 0 || e.flowLevel > n);
|
|
2623
2623
|
var c = l === "[object Object]" || l === "[object Array]", d, v;
|
|
2624
|
-
if (c && (d = e.duplicates.indexOf(t), v = d !== -1), (e.tag !== null && e.tag !== "?" || v || e.indent !== 2 && n > 0) && (
|
|
2624
|
+
if (c && (d = e.duplicates.indexOf(t), v = d !== -1), (e.tag !== null && e.tag !== "?" || v || e.indent !== 2 && n > 0) && (i = !1), v && e.usedDuplicates[d])
|
|
2625
2625
|
e.dump = "*ref_" + d;
|
|
2626
2626
|
else {
|
|
2627
2627
|
if (c && v && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), l === "[object Object]")
|
|
2628
|
-
|
|
2628
|
+
a && Object.keys(e.dump).length !== 0 ? (Io(e, n, e.dump, i), v && (e.dump = "&ref_" + d + e.dump)) : (_o(e, n, e.dump), v && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2629
2629
|
else if (l === "[object Array]")
|
|
2630
|
-
|
|
2630
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !r && n > 0 ? Yt(e, n - 1, e.dump, i) : Yt(e, n, e.dump, i), v && (e.dump = "&ref_" + d + e.dump)) : (So(e, n, e.dump), v && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2631
2631
|
else if (l === "[object String]")
|
|
2632
2632
|
e.tag !== "?" && bo(e, e.dump, n, o, s);
|
|
2633
2633
|
else {
|
|
@@ -2642,29 +2642,29 @@ function we(e, n, t, i, a, o, r) {
|
|
|
2642
2642
|
return !0;
|
|
2643
2643
|
}
|
|
2644
2644
|
function Ao(e, n) {
|
|
2645
|
-
var t = [],
|
|
2646
|
-
for (pt(e, t,
|
|
2647
|
-
n.duplicates.push(t[i
|
|
2645
|
+
var t = [], a = [], i, o;
|
|
2646
|
+
for (pt(e, t, a), i = 0, o = a.length; i < o; i += 1)
|
|
2647
|
+
n.duplicates.push(t[a[i]]);
|
|
2648
2648
|
n.usedDuplicates = new Array(o);
|
|
2649
2649
|
}
|
|
2650
2650
|
function pt(e, n, t) {
|
|
2651
|
-
var
|
|
2651
|
+
var a, i, o;
|
|
2652
2652
|
if (e !== null && typeof e == "object")
|
|
2653
|
-
if (
|
|
2654
|
-
t.indexOf(
|
|
2653
|
+
if (i = n.indexOf(e), i !== -1)
|
|
2654
|
+
t.indexOf(i) === -1 && t.push(i);
|
|
2655
2655
|
else if (n.push(e), Array.isArray(e))
|
|
2656
|
-
for (
|
|
2657
|
-
pt(e[
|
|
2656
|
+
for (i = 0, o = e.length; i < o; i += 1)
|
|
2657
|
+
pt(e[i], n, t);
|
|
2658
2658
|
else
|
|
2659
|
-
for (
|
|
2660
|
-
pt(e[i
|
|
2659
|
+
for (a = Object.keys(e), i = 0, o = a.length; i < o; i += 1)
|
|
2660
|
+
pt(e[a[i]], n, t);
|
|
2661
2661
|
}
|
|
2662
2662
|
function xo(e, n) {
|
|
2663
2663
|
n = n || {};
|
|
2664
2664
|
var t = new mo(n);
|
|
2665
2665
|
t.noRefs || Ao(e, t);
|
|
2666
|
-
var
|
|
2667
|
-
return t.replacer && (
|
|
2666
|
+
var a = e;
|
|
2667
|
+
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), we(t, 0, a, !0, !0) ? t.dump + `
|
|
2668
2668
|
` : "";
|
|
2669
2669
|
}
|
|
2670
2670
|
var jo = xo, To = {
|
|
@@ -2705,7 +2705,7 @@ var Oo = de, $o = gn, Mo = bn, Ko = In, Eo = An, Fo = kt, No = Dn.load, qo = Dn.
|
|
|
2705
2705
|
safeLoadAll: Ro,
|
|
2706
2706
|
safeDump: Do
|
|
2707
2707
|
};
|
|
2708
|
-
const Jo = { class: "yaml-config" },
|
|
2708
|
+
const Jo = { class: "yaml-config" }, ta = /* @__PURE__ */ ie({
|
|
2709
2709
|
__name: "YamlCodeBlock",
|
|
2710
2710
|
props: {
|
|
2711
2711
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2716,7 +2716,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2716
2716
|
},
|
|
2717
2717
|
setup(e) {
|
|
2718
2718
|
const n = e, t = A(() => n.yamlRecord);
|
|
2719
|
-
return (
|
|
2719
|
+
return (a, i) => {
|
|
2720
2720
|
const o = q("KCodeBlock");
|
|
2721
2721
|
return p(), j("div", Jo, [
|
|
2722
2722
|
n.yamlRecord ? (p(), N(o, {
|
|
@@ -2735,7 +2735,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2735
2735
|
}, zo = ["data-testid"], Yo = {
|
|
2736
2736
|
key: 0,
|
|
2737
2737
|
class: "config-card-prop-section-title"
|
|
2738
|
-
}, Wo = /* @__PURE__ */
|
|
2738
|
+
}, Wo = /* @__PURE__ */ ie({
|
|
2739
2739
|
__name: "ConfigCardDisplay",
|
|
2740
2740
|
props: {
|
|
2741
2741
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2774,7 +2774,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2774
2774
|
}
|
|
2775
2775
|
},
|
|
2776
2776
|
setup(e) {
|
|
2777
|
-
const n = e, t = et(), { i18n: { t:
|
|
2777
|
+
const n = e, t = et(), { i18n: { t: a } } = ce.useI18n(), i = (r) => !!(r.tooltip || t[`${r.key}-label-tooltip`]), o = A(() => {
|
|
2778
2778
|
if (!n.record)
|
|
2779
2779
|
return n.record;
|
|
2780
2780
|
const r = JSON.parse(JSON.stringify(n.record));
|
|
@@ -2787,7 +2787,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2787
2787
|
class: Ae(`config-card-details-${s}-props`),
|
|
2788
2788
|
"data-testid": `config-card-details-${s}-props`
|
|
2789
2789
|
}, [
|
|
2790
|
-
s !== "basic" ? (p(), j("div", Yo, E(s === "advanced" ? m(
|
|
2790
|
+
s !== "basic" ? (p(), j("div", Yo, E(s === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2791
2791
|
(p(!0), j(ge, null, me(e.propertyCollections[s], (u) => (p(), N(Re, {
|
|
2792
2792
|
key: u.key,
|
|
2793
2793
|
item: u
|
|
@@ -2803,7 +2803,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2803
2803
|
]),
|
|
2804
2804
|
_: 2
|
|
2805
2805
|
}, [
|
|
2806
|
-
|
|
2806
|
+
i(u) ? {
|
|
2807
2807
|
name: "label-tooltip",
|
|
2808
2808
|
fn: h(() => [
|
|
2809
2809
|
ee(r.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
@@ -2820,7 +2820,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2820
2820
|
"json-record": o.value,
|
|
2821
2821
|
"request-method": "get"
|
|
2822
2822
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : H("", !0),
|
|
2823
|
-
e.format === "yaml" && n.record ? (p(), N(
|
|
2823
|
+
e.format === "yaml" && n.record ? (p(), N(ta, {
|
|
2824
2824
|
key: 2,
|
|
2825
2825
|
"yaml-record": o.value
|
|
2826
2826
|
}, null, 8, ["yaml-record"])) : H("", !0)
|
|
@@ -2828,16 +2828,16 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2828
2828
|
}
|
|
2829
2829
|
}), Zo = /* @__PURE__ */ be(Wo, [["__scopeId", "data-v-2b74ac63"]]), Zt = "24px", Go = (e, n) => {
|
|
2830
2830
|
const t = e.__vccOpts || e;
|
|
2831
|
-
for (const [
|
|
2832
|
-
t[
|
|
2831
|
+
for (const [a, i] of n)
|
|
2832
|
+
t[a] = i;
|
|
2833
2833
|
return t;
|
|
2834
|
-
}, Qo = (e) => (tn("data-v-
|
|
2834
|
+
}, Qo = (e) => (tn("data-v-40a7f387"), e = e(), nn(), e), Xo = ["aria-hidden"], el = {
|
|
2835
2835
|
key: 0,
|
|
2836
2836
|
"data-testid": "kui-icon-svg-title"
|
|
2837
2837
|
}, tl = /* @__PURE__ */ Qo(() => /* @__PURE__ */ U("path", {
|
|
2838
2838
|
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",
|
|
2839
2839
|
fill: "currentColor"
|
|
2840
|
-
}, null, -1)), nl = /* @__PURE__ */
|
|
2840
|
+
}, null, -1)), nl = /* @__PURE__ */ ie({
|
|
2841
2841
|
__name: "BookIcon",
|
|
2842
2842
|
props: {
|
|
2843
2843
|
/** The accessibility text provided to screen readers */
|
|
@@ -2893,12 +2893,12 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2893
2893
|
if (typeof n.size == "number" && n.size > 0)
|
|
2894
2894
|
return `${n.size}px`;
|
|
2895
2895
|
if (typeof n.size == "string") {
|
|
2896
|
-
const
|
|
2896
|
+
const i = String(n.size).replace(/px/gi, ""), o = Number(i);
|
|
2897
2897
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2898
2898
|
return `${o}px`;
|
|
2899
2899
|
}
|
|
2900
2900
|
return Zt;
|
|
2901
|
-
}),
|
|
2901
|
+
}), a = A(() => ({
|
|
2902
2902
|
boxSizing: "border-box",
|
|
2903
2903
|
color: n.color,
|
|
2904
2904
|
display: n.display,
|
|
@@ -2906,11 +2906,11 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2906
2906
|
lineHeight: "0",
|
|
2907
2907
|
width: t.value
|
|
2908
2908
|
}));
|
|
2909
|
-
return (
|
|
2909
|
+
return (i, o) => (p(), N(Oe(e.as), {
|
|
2910
2910
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2911
2911
|
class: "kui-icon book-icon",
|
|
2912
2912
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2913
|
-
style: en(
|
|
2913
|
+
style: en(a.value)
|
|
2914
2914
|
}, {
|
|
2915
2915
|
default: h(() => [
|
|
2916
2916
|
(p(), j("svg", {
|
|
@@ -2930,7 +2930,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2930
2930
|
_: 1
|
|
2931
2931
|
}, 8, ["aria-hidden", "style"]));
|
|
2932
2932
|
}
|
|
2933
|
-
}),
|
|
2933
|
+
}), al = /* @__PURE__ */ Go(nl, [["__scopeId", "data-v-40a7f387"]]), il = { "data-testid": "config-card-title" }, rl = { class: "config-card-actions" }, ol = ["href"], ll = {
|
|
2934
2934
|
key: 2,
|
|
2935
2935
|
class: "config-card-details-section"
|
|
2936
2936
|
}, sl = {
|
|
@@ -2939,7 +2939,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
2939
2939
|
}, cl = ["data-testid"], ul = {
|
|
2940
2940
|
key: 0,
|
|
2941
2941
|
class: "config-card-prop-section-title"
|
|
2942
|
-
}, dl = /* @__PURE__ */
|
|
2942
|
+
}, dl = /* @__PURE__ */ ie({
|
|
2943
2943
|
__name: "EntityBaseConfigCard",
|
|
2944
2944
|
props: {
|
|
2945
2945
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3014,8 +3014,8 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3014
3014
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
3015
3015
|
setup(e, { emit: n }) {
|
|
3016
3016
|
var t;
|
|
3017
|
-
const
|
|
3018
|
-
headers: (t =
|
|
3017
|
+
const a = n, i = e, o = et(), { i18n: { t: r } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { convertKeyToTitle: s } = ce.useStringHelpers(), { axiosInstance: u } = ce.useAxios({
|
|
3018
|
+
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
3019
3019
|
}), c = [
|
|
3020
3020
|
{
|
|
3021
3021
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
@@ -3072,7 +3072,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3072
3072
|
return [];
|
|
3073
3073
|
const B = [], J = Object.keys(b.value).length;
|
|
3074
3074
|
for (const z in b.value) {
|
|
3075
|
-
const Q = (R = (I =
|
|
3075
|
+
const Q = (R = (I = i.configSchema) == null ? void 0 : I[z]) == null ? void 0 : R.order, te = (M = g[z]) == null ? void 0 : M.order;
|
|
3076
3076
|
let re = J;
|
|
3077
3077
|
(te || te === 0) && (re = te === -1 ? J + 1 : te), Q && (re = Q === -1 ? J + 1 : Q), B.push([z, re]);
|
|
3078
3078
|
}
|
|
@@ -3080,7 +3080,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3080
3080
|
return z[1] - Q[1];
|
|
3081
3081
|
}), B.map((z) => {
|
|
3082
3082
|
var Q, te;
|
|
3083
|
-
const re = z[0], ne = (Q = b.value) == null ? void 0 : Q[re], X = ((te =
|
|
3083
|
+
const re = z[0], ne = (Q = b.value) == null ? void 0 : Q[re], X = ((te = i.configSchema) == null ? void 0 : te[re]) || {}, se = g[re];
|
|
3084
3084
|
return {
|
|
3085
3085
|
key: re,
|
|
3086
3086
|
value: ne,
|
|
@@ -3090,14 +3090,14 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3090
3090
|
tooltip: X.tooltip ?? ((se == null ? void 0 : se.tooltip) || void 0),
|
|
3091
3091
|
section: X.section ?? ((se == null ? void 0 : se.section) || fe.Advanced)
|
|
3092
3092
|
};
|
|
3093
|
-
}).filter((z) => !z.hidden && z.key !==
|
|
3093
|
+
}).filter((z) => !z.hidden && z.key !== i.pluginConfigKey);
|
|
3094
3094
|
}), T = A(() => {
|
|
3095
3095
|
var I, R;
|
|
3096
|
-
if (!b.value || !
|
|
3096
|
+
if (!b.value || !i.pluginConfigKey)
|
|
3097
3097
|
return [];
|
|
3098
|
-
const M = b.value[
|
|
3098
|
+
const M = b.value[i.pluginConfigKey] || {}, B = Object.keys(M).length, J = [];
|
|
3099
3099
|
for (const z in M) {
|
|
3100
|
-
const Q = (R = (I =
|
|
3100
|
+
const Q = (R = (I = i.pluginConfigSchema) == null ? void 0 : I[z]) == null ? void 0 : R.order, te = M[z];
|
|
3101
3101
|
let re = te != null && te !== "" ? B - 1 : B;
|
|
3102
3102
|
Q && (re = Q === -1 ? B + 1 : Q), J.push([z, re]);
|
|
3103
3103
|
}
|
|
@@ -3105,7 +3105,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3105
3105
|
return z[1] - Q[1];
|
|
3106
3106
|
}), J.map((z) => {
|
|
3107
3107
|
var Q;
|
|
3108
|
-
const te = z[0], re = M[te], ne = ((Q =
|
|
3108
|
+
const te = z[0], re = M[te], ne = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[te]) || {};
|
|
3109
3109
|
return {
|
|
3110
3110
|
key: te,
|
|
3111
3111
|
value: re,
|
|
@@ -3128,30 +3128,30 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3128
3128
|
return C.value.basic.length && I.push("basic"), C.value.advanced.length && I.push("advanced"), C.value.plugin.length && I.push("plugin"), I;
|
|
3129
3129
|
}), F = (I) => !!(I.tooltip || o[`${I.key}-label-tooltip`]), L = A(() => {
|
|
3130
3130
|
var I, R;
|
|
3131
|
-
let M = `${
|
|
3132
|
-
return
|
|
3131
|
+
let M = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3132
|
+
return i.config.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, ((I = i.config) == null ? void 0 : I.controlPlaneId) || "") : i.config.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, (R = i.config) != null && R.workspace ? `/${i.config.workspace}` : "")), M = M.replace(/{id}/gi, i.config.entityId), M;
|
|
3133
3133
|
}), V = (I) => {
|
|
3134
|
-
b.value && I(JSON.stringify(b.value)) ?
|
|
3134
|
+
b.value && I(JSON.stringify(b.value)) ? a("copy:success", b.value) : a("copy:error");
|
|
3135
3135
|
};
|
|
3136
3136
|
return ke(_, (I) => {
|
|
3137
|
-
|
|
3137
|
+
a("loading", I);
|
|
3138
3138
|
}, { immediate: !0 }), tt(async () => {
|
|
3139
3139
|
k.value = !1, _.value = !0;
|
|
3140
3140
|
try {
|
|
3141
3141
|
const { data: I } = await u.get(L.value);
|
|
3142
|
-
if (
|
|
3143
|
-
if (typeof I[
|
|
3144
|
-
b.value = { ...I[
|
|
3142
|
+
if (i.dataKey)
|
|
3143
|
+
if (typeof I[i.dataKey] < "u")
|
|
3144
|
+
b.value = { ...I[i.dataKey] };
|
|
3145
3145
|
else
|
|
3146
|
-
throw new Error(r("errors.dataKeyUndefined", { dataKey:
|
|
3146
|
+
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3147
3147
|
else
|
|
3148
3148
|
b.value = { ...I };
|
|
3149
|
-
Object.keys(
|
|
3149
|
+
Object.keys(i.configSchema).filter((R) => i.configSchema[R].forceShow).forEach((R) => {
|
|
3150
3150
|
b.value && typeof b.value[R] > "u" && (b.value[R] = null);
|
|
3151
|
-
}),
|
|
3151
|
+
}), a("fetch:success", I);
|
|
3152
3152
|
} catch (I) {
|
|
3153
3153
|
const R = l(I);
|
|
3154
|
-
x.value = R.startsWith("code") ? r("baseConfigCard.errors.load") : R, k.value = !0,
|
|
3154
|
+
x.value = R.startsWith("code") ? r("baseConfigCard.errors.load") : R, k.value = !0, a("fetch:error", I);
|
|
3155
3155
|
} finally {
|
|
3156
3156
|
_.value = !1;
|
|
3157
3157
|
}
|
|
@@ -3177,7 +3177,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3177
3177
|
items: c,
|
|
3178
3178
|
onChange: v
|
|
3179
3179
|
})) : H("", !0),
|
|
3180
|
-
|
|
3180
|
+
i.config.jsonYamlEnabled && e.configCardDoc ? (p(), N(J, {
|
|
3181
3181
|
key: 2,
|
|
3182
3182
|
appearance: "tertiary",
|
|
3183
3183
|
class: "book-icon",
|
|
@@ -3189,7 +3189,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3189
3189
|
rel: "noopener",
|
|
3190
3190
|
target: "_blank"
|
|
3191
3191
|
}, [
|
|
3192
|
-
O(m(
|
|
3192
|
+
O(m(al), { size: m(ci) }, null, 8, ["size"])
|
|
3193
3193
|
], 8, ol)
|
|
3194
3194
|
]),
|
|
3195
3195
|
_: 1
|
|
@@ -3285,7 +3285,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3285
3285
|
e.hideTitle ? void 0 : {
|
|
3286
3286
|
name: "title",
|
|
3287
3287
|
fn: h(() => [
|
|
3288
|
-
U("div",
|
|
3288
|
+
U("div", il, [
|
|
3289
3289
|
ee(I.$slots, "title", {}, () => [
|
|
3290
3290
|
G(E(m(r)("baseConfigCard.title")), 1)
|
|
3291
3291
|
], !0)
|
|
@@ -3299,7 +3299,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3299
3299
|
}), pl = /* @__PURE__ */ be(dl, [["__scopeId", "data-v-3fd4a3a4"]]), fl = {
|
|
3300
3300
|
class: "form-actions",
|
|
3301
3301
|
"data-testid": "form-actions"
|
|
3302
|
-
}, yl = { key: 0 }, ml = /* @__PURE__ */
|
|
3302
|
+
}, yl = { key: 0 }, ml = /* @__PURE__ */ ie({
|
|
3303
3303
|
__name: "EntityBaseForm",
|
|
3304
3304
|
props: {
|
|
3305
3305
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3354,20 +3354,20 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3354
3354
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3355
3355
|
setup(e, { emit: n }) {
|
|
3356
3356
|
var t;
|
|
3357
|
-
const
|
|
3358
|
-
headers: (t =
|
|
3359
|
-
}), u = K(!1), c = K(!1), d = K(""), v = A(() =>
|
|
3357
|
+
const a = n, i = e, o = ft(), { i18n: { t: r } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3358
|
+
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
3359
|
+
}), u = K(!1), c = K(!1), d = K(""), v = A(() => i.canSubmit === !1 || i.isReadonly), g = K(!1), _ = A(() => {
|
|
3360
3360
|
var C, w;
|
|
3361
|
-
let F = `${
|
|
3362
|
-
return
|
|
3361
|
+
let F = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3362
|
+
return i.config.app === "konnect" ? F = F.replace(/{controlPlaneId}/gi, ((C = i.config) == null ? void 0 : C.controlPlaneId) || "") : i.config.app === "kongManager" && (F = F.replace(/\/{workspace}/gi, (w = i.config) != null && w.workspace ? `/${i.config.workspace}` : "")), i.editId ? (F = F.replace(/{id}/gi, i.editId), F) : (F = F.replace(/\/{id}/gi, ""), F);
|
|
3363
3363
|
}), k = () => {
|
|
3364
3364
|
g.value = !g.value;
|
|
3365
3365
|
}, x = () => {
|
|
3366
|
-
|
|
3366
|
+
i.config.cancelRoute ? o.push(i.config.cancelRoute) : b();
|
|
3367
3367
|
}, b = () => {
|
|
3368
|
-
|
|
3368
|
+
a("cancel");
|
|
3369
3369
|
}, f = () => {
|
|
3370
|
-
v.value ||
|
|
3370
|
+
v.value || a("submit");
|
|
3371
3371
|
}, T = K([
|
|
3372
3372
|
{
|
|
3373
3373
|
title: r("baseForm.configuration.yaml"),
|
|
@@ -3379,16 +3379,16 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3379
3379
|
}
|
|
3380
3380
|
]);
|
|
3381
3381
|
return ke(() => u.value, (C) => {
|
|
3382
|
-
|
|
3382
|
+
a("loading", C);
|
|
3383
3383
|
}, { immediate: !0 }), tt(async () => {
|
|
3384
|
-
if (
|
|
3384
|
+
if (i.editId)
|
|
3385
3385
|
try {
|
|
3386
3386
|
c.value = !1, u.value = !0;
|
|
3387
3387
|
const { data: C } = await s.get(_.value);
|
|
3388
|
-
|
|
3388
|
+
a("fetch:success", C);
|
|
3389
3389
|
} catch (C) {
|
|
3390
3390
|
const w = l(C);
|
|
3391
|
-
d.value = w.startsWith("code") ? r("baseForm.errors.edit") : w, c.value = !0,
|
|
3391
|
+
d.value = w.startsWith("code") ? r("baseForm.errors.edit") : w, c.value = !0, a("fetch:error", C);
|
|
3392
3392
|
} finally {
|
|
3393
3393
|
u.value = !1;
|
|
3394
3394
|
}
|
|
@@ -3481,13 +3481,13 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3481
3481
|
O(fn, {
|
|
3482
3482
|
config: e.config,
|
|
3483
3483
|
"fetcher-url": _.value,
|
|
3484
|
-
"json-record":
|
|
3485
|
-
"request-method":
|
|
3484
|
+
"json-record": i.formFields,
|
|
3485
|
+
"request-method": i.editId ? "put" : "post"
|
|
3486
3486
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3487
3487
|
]),
|
|
3488
3488
|
yaml: h(() => [
|
|
3489
|
-
O(
|
|
3490
|
-
"yaml-record":
|
|
3489
|
+
O(ta, {
|
|
3490
|
+
"yaml-record": i.formFields
|
|
3491
3491
|
}, null, 8, ["yaml-record"])
|
|
3492
3492
|
]),
|
|
3493
3493
|
_: 1
|
|
@@ -3503,7 +3503,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3503
3503
|
}), gl = /* @__PURE__ */ be(ml, [["__scopeId", "data-v-4ef70725"]]), hl = {
|
|
3504
3504
|
key: 0,
|
|
3505
3505
|
"data-testid": "first-col"
|
|
3506
|
-
}, vl = /* @__PURE__ */
|
|
3506
|
+
}, vl = /* @__PURE__ */ ie({
|
|
3507
3507
|
__name: "EntityBaseTableCell",
|
|
3508
3508
|
props: {
|
|
3509
3509
|
keyName: {
|
|
@@ -3519,10 +3519,10 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3519
3519
|
const n = e, t = A(() => {
|
|
3520
3520
|
var k;
|
|
3521
3521
|
return ((k = n.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3522
|
-
}),
|
|
3522
|
+
}), a = A(() => {
|
|
3523
3523
|
var k;
|
|
3524
3524
|
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3525
|
-
}),
|
|
3525
|
+
}), i = A(() => {
|
|
3526
3526
|
var k, x;
|
|
3527
3527
|
const b = (k = n.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3528
3528
|
return b ? ((x = b[0]) == null ? void 0 : x.getAttribute("data-testid")) === n.keyName : !1;
|
|
@@ -3532,11 +3532,11 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3532
3532
|
o && (o.disconnect(), o = void 0);
|
|
3533
3533
|
}, l = () => {
|
|
3534
3534
|
var k, x, b;
|
|
3535
|
-
u.value = ((k =
|
|
3536
|
-
}, s = K({}), u = K(0), c = K(0), d = K(""), v = A(() => [
|
|
3535
|
+
u.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, c.value = ((x = t.value) == null ? void 0 : x.clientWidth) || 0, d.value = ((b = s.value) == null ? void 0 : b.innerText) || "";
|
|
3536
|
+
}, s = K({}), u = K(0), c = K(0), d = K(""), v = A(() => [a.value, t.value]), g = ke(
|
|
3537
3537
|
v,
|
|
3538
3538
|
(k) => {
|
|
3539
|
-
if (
|
|
3539
|
+
if (i.value && (r(), "ResizeObserver" in window && window)) {
|
|
3540
3540
|
o = new ResizeObserver((x) => {
|
|
3541
3541
|
window.requestAnimationFrame(() => {
|
|
3542
3542
|
!Array.isArray(x) || !x.length || l();
|
|
@@ -3547,10 +3547,10 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3547
3547
|
}
|
|
3548
3548
|
},
|
|
3549
3549
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3550
|
-
), _ = A(() =>
|
|
3551
|
-
return
|
|
3550
|
+
), _ = A(() => i.value ? u.value > c.value : !1);
|
|
3551
|
+
return ra(() => {
|
|
3552
3552
|
l();
|
|
3553
|
-
}),
|
|
3553
|
+
}), oa(() => {
|
|
3554
3554
|
g();
|
|
3555
3555
|
}), (k, x) => {
|
|
3556
3556
|
const b = q("KTooltip");
|
|
@@ -3559,7 +3559,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3559
3559
|
ref: s,
|
|
3560
3560
|
class: "content-wrapper"
|
|
3561
3561
|
}, [
|
|
3562
|
-
|
|
3562
|
+
i.value ? (p(), j("span", hl, [
|
|
3563
3563
|
O(b, {
|
|
3564
3564
|
label: _.value ? d.value : "",
|
|
3565
3565
|
"max-width": "300",
|
|
@@ -3577,7 +3577,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3577
3577
|
}), kl = /* @__PURE__ */ be(vl, [["__scopeId", "data-v-e42a20c9"]]), bl = { class: "toolbar-container" }, Cl = {
|
|
3578
3578
|
key: 0,
|
|
3579
3579
|
class: "toolbar-button-container"
|
|
3580
|
-
}, wl = ["data-testid"], Sl = /* @__PURE__ */
|
|
3580
|
+
}, wl = ["data-testid"], Sl = /* @__PURE__ */ ie({
|
|
3581
3581
|
__name: "EntityBaseTable",
|
|
3582
3582
|
props: {
|
|
3583
3583
|
// table header configuration
|
|
@@ -3687,7 +3687,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3687
3687
|
},
|
|
3688
3688
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3689
3689
|
setup(e, { emit: n }) {
|
|
3690
|
-
const t = e,
|
|
3690
|
+
const t = e, a = n, { i18n: { t: i } } = ce.useI18n(), o = A(() => {
|
|
3691
3691
|
var w, F;
|
|
3692
3692
|
return typeof t.errorMessage == "string" ? {
|
|
3693
3693
|
hasError: !!t.errorMessage,
|
|
@@ -3729,14 +3729,14 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3729
3729
|
textOverflow: "ellipsis"
|
|
3730
3730
|
}), F;
|
|
3731
3731
|
}, g = () => {
|
|
3732
|
-
|
|
3732
|
+
a("empty-state-cta-clicked"), _();
|
|
3733
3733
|
}, _ = () => {
|
|
3734
|
-
|
|
3734
|
+
a("clear-search-input");
|
|
3735
3735
|
}, k = A(() => t.disableRowClick ? void 0 : (w, F) => {
|
|
3736
|
-
|
|
3736
|
+
a("click:row", F);
|
|
3737
3737
|
}), x = (w) => {
|
|
3738
|
-
|
|
3739
|
-
}, { setTablePreferences: b, getTablePreferences: f } =
|
|
3738
|
+
a("sort", w);
|
|
3739
|
+
}, { setTablePreferences: b, getTablePreferences: f } = ma(), T = A(() => {
|
|
3740
3740
|
const w = f(t.preferencesStorageKey);
|
|
3741
3741
|
return {
|
|
3742
3742
|
...t.initialFetcherParams,
|
|
@@ -3760,12 +3760,12 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3760
3760
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3761
3761
|
"disable-sorting": e.disableSorting,
|
|
3762
3762
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3763
|
-
"empty-state-action-message": e.query ? m(
|
|
3763
|
+
"empty-state-action-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3764
3764
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3765
3765
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3766
3766
|
"empty-state-icon-size": "96",
|
|
3767
|
-
"empty-state-message": e.query ? m(
|
|
3768
|
-
"empty-state-title": e.query ? m(
|
|
3767
|
+
"empty-state-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3768
|
+
"empty-state-title": e.query ? m(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3769
3769
|
"enable-client-sort": e.enableClientSort,
|
|
3770
3770
|
"error-state-message": o.value.message,
|
|
3771
3771
|
"error-state-title": o.value.title,
|
|
@@ -3818,7 +3818,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3818
3818
|
}, {
|
|
3819
3819
|
icon: h(() => [
|
|
3820
3820
|
O(L, {
|
|
3821
|
-
color: m(
|
|
3821
|
+
color: m(li),
|
|
3822
3822
|
icon: "more",
|
|
3823
3823
|
size: "16"
|
|
3824
3824
|
}, null, 8, ["color"])
|
|
@@ -3864,7 +3864,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3864
3864
|
}, Al = {
|
|
3865
3865
|
key: 1,
|
|
3866
3866
|
class: "description"
|
|
3867
|
-
}, xl = /* @__PURE__ */
|
|
3867
|
+
}, xl = /* @__PURE__ */ ie({
|
|
3868
3868
|
__name: "EntityDeleteModal",
|
|
3869
3869
|
props: {
|
|
3870
3870
|
visible: {
|
|
@@ -3903,10 +3903,10 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3903
3903
|
},
|
|
3904
3904
|
emits: ["cancel", "proceed"],
|
|
3905
3905
|
setup(e, { emit: n }) {
|
|
3906
|
-
const { i18nT: t } = ce.useI18n(),
|
|
3907
|
-
|
|
3906
|
+
const { i18nT: t } = ce.useI18n(), a = e, i = n, o = A(() => a.needConfirm ? a.entityName : ""), r = () => {
|
|
3907
|
+
i("cancel");
|
|
3908
3908
|
}, l = () => {
|
|
3909
|
-
|
|
3909
|
+
i("proceed");
|
|
3910
3910
|
};
|
|
3911
3911
|
return (s, u) => {
|
|
3912
3912
|
const c = q("KAlert"), d = q("KPrompt");
|
|
@@ -3932,25 +3932,25 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3932
3932
|
])) : H("", !0),
|
|
3933
3933
|
O(m(t), {
|
|
3934
3934
|
class: "message",
|
|
3935
|
-
keypath:
|
|
3935
|
+
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3936
3936
|
tag: "p"
|
|
3937
3937
|
}, _e({
|
|
3938
3938
|
entityType: h(() => [
|
|
3939
|
-
G(E(
|
|
3939
|
+
G(E(a.entityType), 1)
|
|
3940
3940
|
]),
|
|
3941
3941
|
_: 2
|
|
3942
3942
|
}, [
|
|
3943
|
-
|
|
3943
|
+
a.entityName ? {
|
|
3944
3944
|
name: "entityName",
|
|
3945
3945
|
fn: h(() => [
|
|
3946
|
-
U("strong", null, E(
|
|
3946
|
+
U("strong", null, E(a.entityName), 1)
|
|
3947
3947
|
]),
|
|
3948
3948
|
key: "0"
|
|
3949
3949
|
} : void 0
|
|
3950
3950
|
]), 1032, ["keypath"]),
|
|
3951
|
-
|
|
3951
|
+
a.description || s.$slots.description ? (p(), j("div", Al, [
|
|
3952
3952
|
ee(s.$slots, "description", {}, () => [
|
|
3953
|
-
U("p", null, E(
|
|
3953
|
+
U("p", null, E(a.description), 1)
|
|
3954
3954
|
], !0)
|
|
3955
3955
|
])) : H("", !0)
|
|
3956
3956
|
]),
|
|
@@ -3972,12 +3972,12 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
3972
3972
|
width: "20",
|
|
3973
3973
|
x: "0",
|
|
3974
3974
|
y: "0"
|
|
3975
|
-
}, $l = ["fill"], Ml = { mask: "url(#mask0_180_20349)" }, Kl = ["fill"], Gt = /* @__PURE__ */
|
|
3975
|
+
}, $l = ["fill"], Ml = { mask: "url(#mask0_180_20349)" }, Kl = ["fill"], Gt = /* @__PURE__ */ ie({
|
|
3976
3976
|
__name: "IconFilter",
|
|
3977
3977
|
props: {
|
|
3978
3978
|
color: {
|
|
3979
3979
|
type: String,
|
|
3980
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3980
|
+
default: `var(--kong-ui-entity-filter-color, ${ri})`
|
|
3981
3981
|
}
|
|
3982
3982
|
},
|
|
3983
3983
|
setup(e) {
|
|
@@ -4000,7 +4000,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4000
4000
|
}), El = {
|
|
4001
4001
|
key: 1,
|
|
4002
4002
|
class: "kong-ui-entity-filter"
|
|
4003
|
-
}, Fl = { class: "menu-item-title" }, Nl = { class: "menu-item-indicator" }, ql = { class: "menu-item-body" }, Bl = ["for"], Ll = { class: "menu-item-buttons" }, Ul = { class: "filter-clear-button-container" }, Vl = /* @__PURE__ */
|
|
4003
|
+
}, Fl = { class: "menu-item-title" }, Nl = { class: "menu-item-indicator" }, ql = { class: "menu-item-body" }, Bl = ["for"], Ll = { class: "menu-item-buttons" }, Ul = { class: "filter-clear-button-container" }, Vl = /* @__PURE__ */ ie({
|
|
4004
4004
|
__name: "EntityFilter",
|
|
4005
4005
|
props: {
|
|
4006
4006
|
// filter config, either exact match or fuzzy match
|
|
@@ -4020,19 +4020,19 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4020
4020
|
},
|
|
4021
4021
|
emits: ["update:modelValue"],
|
|
4022
4022
|
setup(e, { emit: n }) {
|
|
4023
|
-
const { i18n: { t } } = ce.useI18n(),
|
|
4023
|
+
const { i18n: { t } } = ce.useI18n(), a = e, i = n, o = K(!1), r = K({}), l = A(() => {
|
|
4024
4024
|
const b = [];
|
|
4025
|
-
return new URLSearchParams(
|
|
4025
|
+
return new URLSearchParams(a.modelValue).forEach((f, T) => {
|
|
4026
4026
|
f !== "" && b.push(T);
|
|
4027
4027
|
}), b;
|
|
4028
4028
|
}), s = A(() => {
|
|
4029
|
-
const b =
|
|
4029
|
+
const b = a.config.fields;
|
|
4030
4030
|
return Object.keys(b).filter((f) => b[f].searchable).map((f) => ({
|
|
4031
4031
|
label: b[f].label || f,
|
|
4032
4032
|
value: f
|
|
4033
4033
|
}));
|
|
4034
4034
|
});
|
|
4035
|
-
ke(() =>
|
|
4035
|
+
ke(() => a.modelValue, (b) => {
|
|
4036
4036
|
r.value = {}, new URLSearchParams(b).forEach((f, T) => {
|
|
4037
4037
|
r.value[T] = f;
|
|
4038
4038
|
});
|
|
@@ -4040,16 +4040,16 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4040
4040
|
const u = () => {
|
|
4041
4041
|
o.value = !o.value;
|
|
4042
4042
|
}, c = (b) => {
|
|
4043
|
-
|
|
4043
|
+
i("update:modelValue", b);
|
|
4044
4044
|
}, d = (b) => `filter-${b}`, v = (b) => {
|
|
4045
4045
|
var f, T;
|
|
4046
|
-
return (((T = (f =
|
|
4046
|
+
return (((T = (f = a.config.schema) == null ? void 0 : f[b]) == null ? void 0 : T.values) ?? []).map((C) => ({
|
|
4047
4047
|
value: C,
|
|
4048
4048
|
label: C
|
|
4049
4049
|
}));
|
|
4050
4050
|
}, g = (b) => {
|
|
4051
4051
|
var f, T;
|
|
4052
|
-
return ((T = (f =
|
|
4052
|
+
return ((T = (f = a.config.schema) == null ? void 0 : f[b]) == null ? void 0 : T.type) ?? "text";
|
|
4053
4053
|
}, _ = (b) => {
|
|
4054
4054
|
r.value = {
|
|
4055
4055
|
...r.value,
|
|
@@ -4059,7 +4059,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4059
4059
|
r.value = {}, x(!0);
|
|
4060
4060
|
}, x = (b = !1) => {
|
|
4061
4061
|
const f = Object.keys(r.value).reduce((T, C) => (r.value[C] && (T[C] = `${r.value[C]}`), T), {});
|
|
4062
|
-
b && (o.value = !1),
|
|
4062
|
+
b && (o.value = !1), i("update:modelValue", new URLSearchParams(f).toString());
|
|
4063
4063
|
};
|
|
4064
4064
|
return (b, f) => {
|
|
4065
4065
|
const T = q("KInput"), C = q("KButton"), w = q("KSelect"), F = q("KMenuItem"), L = q("KMenu");
|
|
@@ -4185,7 +4185,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4185
4185
|
]));
|
|
4186
4186
|
};
|
|
4187
4187
|
}
|
|
4188
|
-
}), Rl = /* @__PURE__ */ be(Vl, [["__scopeId", "data-v-e9512e8f"]]), ze = /* @__PURE__ */
|
|
4188
|
+
}), Rl = /* @__PURE__ */ be(Vl, [["__scopeId", "data-v-e9512e8f"]]), ze = /* @__PURE__ */ ie({
|
|
4189
4189
|
__name: "PermissionsWrapper",
|
|
4190
4190
|
props: {
|
|
4191
4191
|
/**
|
|
@@ -4207,10 +4207,10 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4207
4207
|
}
|
|
4208
4208
|
},
|
|
4209
4209
|
setup(e) {
|
|
4210
|
-
const n = e, t = K(void 0),
|
|
4210
|
+
const n = e, t = K(void 0), a = A(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4211
4211
|
return ke(() => n.authFunction, async () => {
|
|
4212
4212
|
t.value = await n.authFunction();
|
|
4213
|
-
}, { immediate: !0 }), (
|
|
4213
|
+
}, { immediate: !0 }), (i, o) => a.value ? ee(i.$slots, "default", {
|
|
4214
4214
|
key: 0,
|
|
4215
4215
|
isAllowed: t.value
|
|
4216
4216
|
}) : H("", !0);
|
|
@@ -4224,7 +4224,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4224
4224
|
}, Hl = {
|
|
4225
4225
|
key: 2,
|
|
4226
4226
|
class: "form-section-footer"
|
|
4227
|
-
}, zl = { class: "form-section-content" }, Yl = /* @__PURE__ */
|
|
4227
|
+
}, zl = { class: "form-section-content" }, Yl = /* @__PURE__ */ ie({
|
|
4228
4228
|
__name: "EntityFormSection",
|
|
4229
4229
|
props: {
|
|
4230
4230
|
title: {
|
|
@@ -4250,7 +4250,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4250
4250
|
},
|
|
4251
4251
|
setup(e) {
|
|
4252
4252
|
const n = et();
|
|
4253
|
-
return (t,
|
|
4253
|
+
return (t, a) => (p(), j("fieldset", {
|
|
4254
4254
|
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4255
4255
|
}, [
|
|
4256
4256
|
U("div", Dl, [
|
|
@@ -4274,7 +4274,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4274
4274
|
])
|
|
4275
4275
|
], 2));
|
|
4276
4276
|
}
|
|
4277
|
-
}), Qt = /* @__PURE__ */ be(Yl, [["__scopeId", "data-v-3565daa7"]]), { useAxios: _t, useDeleteUrlBuilder: Wl, useErrors: Zl, useExternalLinkCreator: vs, useFetchUrlBuilder: ks, useFetcher: Gl, useDebouncedFilter: Ql, useStringHelpers: Xl, useHelpers: bs, useGatewayFeatureSupported: Cs, useTruncationDetector: ws } = ce, es = { class: "kong-ui-entities-keys-list" }, ts = { key: 1 }, ns = /* @__PURE__ */
|
|
4277
|
+
}), Qt = /* @__PURE__ */ be(Yl, [["__scopeId", "data-v-3565daa7"]]), { useAxios: _t, useDeleteUrlBuilder: Wl, useErrors: Zl, useExternalLinkCreator: vs, useFetchUrlBuilder: ks, useFetcher: Gl, useDebouncedFilter: Ql, useStringHelpers: Xl, useHelpers: bs, useGatewayFeatureSupported: Cs, useTruncationDetector: ws } = ce, es = { class: "kong-ui-entities-keys-list" }, ts = { key: 1 }, ns = /* @__PURE__ */ ie({
|
|
4278
4278
|
__name: "KeyList",
|
|
4279
4279
|
props: {
|
|
4280
4280
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4321,31 +4321,31 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4321
4321
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
4322
4322
|
setup(e, { emit: n }) {
|
|
4323
4323
|
var Ne;
|
|
4324
|
-
const t = n,
|
|
4325
|
-
headers: (Ne =
|
|
4326
|
-
}), l = K(1), s = A(() =>
|
|
4327
|
-
name: { label:
|
|
4328
|
-
kid: { label:
|
|
4329
|
-
tags: { label:
|
|
4330
|
-
id: { label:
|
|
4324
|
+
const t = n, a = e, { i18n: { t: i } } = mt.useI18n(), o = ft(), { axiosInstance: r } = _t({
|
|
4325
|
+
headers: (Ne = a.config) == null ? void 0 : Ne.requestHeaders
|
|
4326
|
+
}), l = K(1), s = A(() => a.config.app !== "kongManager" || !!a.config.disableSorting), u = {
|
|
4327
|
+
name: { label: i("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4328
|
+
kid: { label: i("keys.list.table_headers.key_id"), sortable: !0 },
|
|
4329
|
+
tags: { label: i("keys.list.table_headers.tags") },
|
|
4330
|
+
id: { label: i("keys.list.table_headers.id"), sortable: !0 }
|
|
4331
4331
|
}, c = u, d = A(() => {
|
|
4332
4332
|
var S, P, W, ue;
|
|
4333
|
-
let y = `${
|
|
4334
|
-
return
|
|
4333
|
+
let y = `${a.config.apiBaseUrl}${Se.list[a.config.app][a.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4334
|
+
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{keySetId}/gi, ((P = a.config) == null ? void 0 : P.keySetId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (W = a.config) != null && W.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, ((ue = a.config) == null ? void 0 : ue.keySetId) || "")), y;
|
|
4335
4335
|
}), v = K(""), g = A(() => {
|
|
4336
|
-
const y =
|
|
4336
|
+
const y = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4337
4337
|
if (y)
|
|
4338
4338
|
return {
|
|
4339
4339
|
isExactMatch: y,
|
|
4340
|
-
placeholder:
|
|
4340
|
+
placeholder: i("keys.search.placeholder")
|
|
4341
4341
|
};
|
|
4342
4342
|
const S = { name: u.name };
|
|
4343
4343
|
return {
|
|
4344
4344
|
isExactMatch: y,
|
|
4345
4345
|
fields: S,
|
|
4346
|
-
schema:
|
|
4346
|
+
schema: a.config.filterSchema
|
|
4347
4347
|
};
|
|
4348
|
-
}), { fetcher: _, fetcherState: k } = Gl(
|
|
4348
|
+
}), { fetcher: _, fetcherState: k } = Gl(a.config, d.value), x = () => {
|
|
4349
4349
|
v.value = "";
|
|
4350
4350
|
}, b = () => {
|
|
4351
4351
|
l.value++;
|
|
@@ -4361,13 +4361,13 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4361
4361
|
if (!S(P)) {
|
|
4362
4362
|
t("copy:error", {
|
|
4363
4363
|
entity: y,
|
|
4364
|
-
message:
|
|
4364
|
+
message: i("keys.errors.copy")
|
|
4365
4365
|
});
|
|
4366
4366
|
return;
|
|
4367
4367
|
}
|
|
4368
4368
|
t("copy:success", {
|
|
4369
4369
|
entity: y,
|
|
4370
|
-
message:
|
|
4370
|
+
message: i("keys.copy.success_brief")
|
|
4371
4371
|
});
|
|
4372
4372
|
}, w = (y, S, P) => {
|
|
4373
4373
|
const { type: W } = y;
|
|
@@ -4376,24 +4376,24 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4376
4376
|
t("copy:success", {
|
|
4377
4377
|
entity: y,
|
|
4378
4378
|
field: S,
|
|
4379
|
-
message:
|
|
4379
|
+
message: i("keys.copy.success", { val: y[S] })
|
|
4380
4380
|
});
|
|
4381
4381
|
}, L = (y, S) => {
|
|
4382
4382
|
t("copy:error", {
|
|
4383
4383
|
entity: y,
|
|
4384
4384
|
field: S,
|
|
4385
|
-
message:
|
|
4385
|
+
message: i("keys.errors.copy")
|
|
4386
4386
|
});
|
|
4387
4387
|
}, V = async (y) => {
|
|
4388
4388
|
var P;
|
|
4389
|
-
await ((P =
|
|
4389
|
+
await ((P = a.canRetrieve) == null ? void 0 : P.call(a, y)) && o.push(a.config.getViewRoute(y.id));
|
|
4390
4390
|
}, I = (y) => ({
|
|
4391
|
-
label:
|
|
4392
|
-
to:
|
|
4391
|
+
label: i("keys.actions.view"),
|
|
4392
|
+
to: a.config.getViewRoute(y)
|
|
4393
4393
|
}), R = (y) => ({
|
|
4394
|
-
label:
|
|
4395
|
-
to:
|
|
4396
|
-
}), M = K(void 0), B = K(!1), J = K(!1), z = K(""), Q = Wl(
|
|
4394
|
+
label: i("keys.actions.edit"),
|
|
4395
|
+
to: a.config.getEditRoute(y)
|
|
4396
|
+
}), M = K(void 0), B = K(!1), J = K(!1), z = K(""), Q = Wl(a.config, d.value), te = (y) => {
|
|
4397
4397
|
M.value = y, B.value = !0;
|
|
4398
4398
|
}, re = () => {
|
|
4399
4399
|
B.value = !1;
|
|
@@ -4404,7 +4404,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4404
4404
|
try {
|
|
4405
4405
|
await r.delete(Q(M.value.id)), J.value = !1, B.value = !1, l.value++, t("delete:success", M.value);
|
|
4406
4406
|
} catch (W) {
|
|
4407
|
-
z.value = ((P = (S = W.response) == null ? void 0 : S.data) == null ? void 0 : P.message) || W.message ||
|
|
4407
|
+
z.value = ((P = (S = W.response) == null ? void 0 : S.data) == null ? void 0 : P.message) || W.message || i("keys.errors.delete"), t("error", W);
|
|
4408
4408
|
} finally {
|
|
4409
4409
|
J.value = !1;
|
|
4410
4410
|
}
|
|
@@ -4414,20 +4414,20 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4414
4414
|
var S, P, W, ue;
|
|
4415
4415
|
if (Array.isArray((S = y == null ? void 0 : y.response) == null ? void 0 : S.data) && (X.value = y.response.data.length > 0), y.status === je.Error) {
|
|
4416
4416
|
f.value = {
|
|
4417
|
-
title:
|
|
4417
|
+
title: i("keys.errors.general")
|
|
4418
4418
|
}, (ue = (W = (P = y.error) == null ? void 0 : P.response) == null ? void 0 : W.data) != null && ue.message && (f.value.message = y.error.response.data.message), t("error", y.error);
|
|
4419
4419
|
return;
|
|
4420
4420
|
}
|
|
4421
4421
|
f.value = null;
|
|
4422
4422
|
});
|
|
4423
4423
|
const se = K({
|
|
4424
|
-
ctaPath:
|
|
4424
|
+
ctaPath: a.config.createRoute,
|
|
4425
4425
|
ctaText: void 0,
|
|
4426
|
-
message:
|
|
4427
|
-
title:
|
|
4426
|
+
message: i("keys.list.empty_state.description"),
|
|
4427
|
+
title: i("keys.title")
|
|
4428
4428
|
});
|
|
4429
4429
|
return tt(async () => {
|
|
4430
|
-
await
|
|
4430
|
+
await a.canCreate() && (se.value.title = i("keys.list.empty_state.title"), se.value.ctaText = i("keys.actions.create"));
|
|
4431
4431
|
}), (y, S) => {
|
|
4432
4432
|
const P = q("KButton"), W = q("CopyUuid"), ue = q("KBadge"), D = q("KTruncate"), Y = q("KDropdownItem"), It = q("KClipboardProvider");
|
|
4433
4433
|
return p(), j("div", es, [
|
|
@@ -4446,13 +4446,13 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4446
4446
|
"table-headers": m(c),
|
|
4447
4447
|
"use-action-outside": e.useActionOutside,
|
|
4448
4448
|
onClearSearchInput: x,
|
|
4449
|
-
"onClick:row": S[2] || (S[2] = (
|
|
4449
|
+
"onClick:row": S[2] || (S[2] = (ae) => V(ae)),
|
|
4450
4450
|
onSort: b
|
|
4451
4451
|
}, {
|
|
4452
4452
|
"toolbar-filter": h(() => [
|
|
4453
4453
|
O(m(Rl), {
|
|
4454
4454
|
modelValue: v.value,
|
|
4455
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
4455
|
+
"onUpdate:modelValue": S[0] || (S[0] = (ae) => v.value = ae),
|
|
4456
4456
|
config: g.value
|
|
4457
4457
|
}, null, 8, ["modelValue", "config"])
|
|
4458
4458
|
]),
|
|
@@ -4472,7 +4472,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4472
4472
|
to: e.config.createRoute
|
|
4473
4473
|
}, {
|
|
4474
4474
|
default: h(() => [
|
|
4475
|
-
G(E(m(
|
|
4475
|
+
G(E(m(i)("keys.list.toolbar_actions.new_key")), 1)
|
|
4476
4476
|
]),
|
|
4477
4477
|
_: 1
|
|
4478
4478
|
}, 8, ["to"]), [
|
|
@@ -4485,19 +4485,19 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4485
4485
|
_: 1
|
|
4486
4486
|
}, 8, ["to"]))
|
|
4487
4487
|
]),
|
|
4488
|
-
name: h(({ rowValue:
|
|
4489
|
-
U("b", null, E(
|
|
4488
|
+
name: h(({ rowValue: ae }) => [
|
|
4489
|
+
U("b", null, E(ae ?? "-"), 1)
|
|
4490
4490
|
]),
|
|
4491
|
-
kid: h(({ row:
|
|
4491
|
+
kid: h(({ row: ae, rowValue: ve }) => [
|
|
4492
4492
|
O(W, {
|
|
4493
|
-
notify: (qe) => w(qe,
|
|
4493
|
+
notify: (qe) => w(qe, ae, "kid"),
|
|
4494
4494
|
uuid: ve
|
|
4495
4495
|
}, null, 8, ["notify", "uuid"])
|
|
4496
4496
|
]),
|
|
4497
|
-
tags: h(({ rowValue:
|
|
4498
|
-
(
|
|
4497
|
+
tags: h(({ rowValue: ae }) => [
|
|
4498
|
+
(ae == null ? void 0 : ae.length) > 0 ? (p(), N(D, { key: 0 }, {
|
|
4499
4499
|
default: h(() => [
|
|
4500
|
-
(p(!0), j(ge, null, me(
|
|
4500
|
+
(p(!0), j(ge, null, me(ae, (ve) => (p(), N(ue, {
|
|
4501
4501
|
key: ve,
|
|
4502
4502
|
onClick: S[1] || (S[1] = Ye(() => {
|
|
4503
4503
|
}, ["stop"]))
|
|
@@ -4511,21 +4511,21 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4511
4511
|
_: 2
|
|
4512
4512
|
}, 1024)) : (p(), j("span", ts, "-"))
|
|
4513
4513
|
]),
|
|
4514
|
-
id: h(({ row:
|
|
4514
|
+
id: h(({ row: ae, rowValue: ve }) => [
|
|
4515
4515
|
O(W, {
|
|
4516
|
-
notify: (qe) => w(qe,
|
|
4516
|
+
notify: (qe) => w(qe, ae, "id"),
|
|
4517
4517
|
uuid: ve
|
|
4518
4518
|
}, null, 8, ["notify", "uuid"])
|
|
4519
4519
|
]),
|
|
4520
|
-
actions: h(({ row:
|
|
4520
|
+
actions: h(({ row: ae }) => [
|
|
4521
4521
|
O(It, null, {
|
|
4522
4522
|
default: h(({ copyToClipboard: ve }) => [
|
|
4523
4523
|
O(Y, {
|
|
4524
4524
|
"data-testid": "action-entity-copy-id",
|
|
4525
|
-
onClick: (qe) => T(
|
|
4525
|
+
onClick: (qe) => T(ae, ve)
|
|
4526
4526
|
}, {
|
|
4527
4527
|
default: h(() => [
|
|
4528
|
-
G(E(m(
|
|
4528
|
+
G(E(m(i)("keys.actions.copy_id")), 1)
|
|
4529
4529
|
]),
|
|
4530
4530
|
_: 2
|
|
4531
4531
|
}, 1032, ["onClick"])
|
|
@@ -4536,10 +4536,10 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4536
4536
|
default: h(({ copyToClipboard: ve }) => [
|
|
4537
4537
|
O(Y, {
|
|
4538
4538
|
"data-testid": "action-entity-copy-json",
|
|
4539
|
-
onClick: (qe) => C(
|
|
4539
|
+
onClick: (qe) => C(ae, ve)
|
|
4540
4540
|
}, {
|
|
4541
4541
|
default: h(() => [
|
|
4542
|
-
G(E(m(
|
|
4542
|
+
G(E(m(i)("keys.actions.copy_json")), 1)
|
|
4543
4543
|
]),
|
|
4544
4544
|
_: 2
|
|
4545
4545
|
}, 1032, ["onClick"])
|
|
@@ -4547,40 +4547,40 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4547
4547
|
_: 2
|
|
4548
4548
|
}, 1024),
|
|
4549
4549
|
O(m(ze), {
|
|
4550
|
-
"auth-function": () => e.canRetrieve(
|
|
4550
|
+
"auth-function": () => e.canRetrieve(ae)
|
|
4551
4551
|
}, {
|
|
4552
4552
|
default: h(() => [
|
|
4553
4553
|
O(Y, {
|
|
4554
4554
|
"data-testid": "action-entity-view",
|
|
4555
4555
|
"has-divider": "",
|
|
4556
|
-
item: I(
|
|
4556
|
+
item: I(ae.id)
|
|
4557
4557
|
}, null, 8, ["item"])
|
|
4558
4558
|
]),
|
|
4559
4559
|
_: 2
|
|
4560
4560
|
}, 1032, ["auth-function"]),
|
|
4561
4561
|
O(m(ze), {
|
|
4562
|
-
"auth-function": () => e.canEdit(
|
|
4562
|
+
"auth-function": () => e.canEdit(ae)
|
|
4563
4563
|
}, {
|
|
4564
4564
|
default: h(() => [
|
|
4565
4565
|
O(Y, {
|
|
4566
4566
|
"data-testid": "action-entity-edit",
|
|
4567
|
-
item: R(
|
|
4567
|
+
item: R(ae.id)
|
|
4568
4568
|
}, null, 8, ["item"])
|
|
4569
4569
|
]),
|
|
4570
4570
|
_: 2
|
|
4571
4571
|
}, 1032, ["auth-function"]),
|
|
4572
4572
|
O(m(ze), {
|
|
4573
|
-
"auth-function": () => e.canDelete(
|
|
4573
|
+
"auth-function": () => e.canDelete(ae)
|
|
4574
4574
|
}, {
|
|
4575
4575
|
default: h(() => [
|
|
4576
4576
|
O(Y, {
|
|
4577
4577
|
danger: "",
|
|
4578
4578
|
"data-testid": "action-entity-delete",
|
|
4579
4579
|
"has-divider": "",
|
|
4580
|
-
onClick: (ve) => te(
|
|
4580
|
+
onClick: (ve) => te(ae)
|
|
4581
4581
|
}, {
|
|
4582
4582
|
default: h(() => [
|
|
4583
|
-
G(E(m(
|
|
4583
|
+
G(E(m(i)("keys.actions.delete")), 1)
|
|
4584
4584
|
]),
|
|
4585
4585
|
_: 2
|
|
4586
4586
|
}, 1032, ["onClick"])
|
|
@@ -4592,12 +4592,12 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4592
4592
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4593
4593
|
O(m(jl), {
|
|
4594
4594
|
"action-pending": J.value,
|
|
4595
|
-
description: m(
|
|
4595
|
+
description: m(i)("keys.delete.description"),
|
|
4596
4596
|
"entity-name": M.value && (M.value.name || M.value.id),
|
|
4597
4597
|
"entity-type": m(rn).Key,
|
|
4598
4598
|
error: z.value,
|
|
4599
4599
|
"need-confirm": !1,
|
|
4600
|
-
title: m(
|
|
4600
|
+
title: m(i)("keys.delete.title"),
|
|
4601
4601
|
visible: B.value,
|
|
4602
4602
|
onCancel: re,
|
|
4603
4603
|
onProceed: ne
|
|
@@ -4605,16 +4605,16 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4605
4605
|
]);
|
|
4606
4606
|
};
|
|
4607
4607
|
}
|
|
4608
|
-
}),
|
|
4608
|
+
}), na = (e, n) => {
|
|
4609
4609
|
const t = e.__vccOpts || e;
|
|
4610
|
-
for (const [
|
|
4611
|
-
t[
|
|
4610
|
+
for (const [a, i] of n)
|
|
4611
|
+
t[a] = i;
|
|
4612
4612
|
return t;
|
|
4613
|
-
}, Ss = /* @__PURE__ */
|
|
4613
|
+
}, Ss = /* @__PURE__ */ na(ns, [["__scopeId", "data-v-0d47ab80"]]), as = { class: "kong-ui-entities-keys-form" }, is = { "data-testid": "no-search-results" }, rs = { class: "select-item-container" }, os = { class: "select-item-label" }, ls = { class: "select-item-description" }, ss = {
|
|
4614
4614
|
key: 0,
|
|
4615
4615
|
class: "invalid-key-set-message",
|
|
4616
4616
|
"data-testid": "invalid-key-set-message"
|
|
4617
|
-
}, cs = { "data-testid": "key-format-container" }, us = /* @__PURE__ */
|
|
4617
|
+
}, cs = { "data-testid": "key-format-container" }, us = /* @__PURE__ */ ie({
|
|
4618
4618
|
__name: "KeyForm",
|
|
4619
4619
|
props: {
|
|
4620
4620
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4645,9 +4645,9 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4645
4645
|
emits: ["update", "error", "loading"],
|
|
4646
4646
|
setup(e, { emit: n }) {
|
|
4647
4647
|
var Ne;
|
|
4648
|
-
const t = n,
|
|
4649
|
-
headers: (Ne =
|
|
4650
|
-
}), s = A(() =>
|
|
4648
|
+
const t = n, a = e, i = ft(), { i18n: { t: o } } = mt.useI18n(), { getMessageFromError: r } = Zl(), { axiosInstance: l } = _t({
|
|
4649
|
+
headers: (Ne = a.config) == null ? void 0 : Ne.requestHeaders
|
|
4650
|
+
}), s = A(() => a.keySetId ? Se.form[a.config.app].edit.forKeySet.replace(/{keySetId}/gi, a.keySetId) : Se.form[a.config.app].edit.all), u = A(() => a.keyId ? Be.Edit : Be.Create), c = At({
|
|
4651
4651
|
fields: {
|
|
4652
4652
|
name: "",
|
|
4653
4653
|
tags: "",
|
|
@@ -4678,19 +4678,19 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4678
4678
|
label: o("keys.form.fields.key_format.options.pem"),
|
|
4679
4679
|
value: "pem"
|
|
4680
4680
|
}
|
|
4681
|
-
], g = A(() => c.isReadonly || u.value === Be.Create && !!
|
|
4682
|
-
ke(() =>
|
|
4681
|
+
], g = A(() => c.isReadonly || u.value === Be.Create && !!a.fixedKeySetId), _ = A(() => !g.value);
|
|
4682
|
+
ke(() => a.fixedKeySetId, (y) => {
|
|
4683
4683
|
u.value === Be.Create && (c.fields.key_set = y);
|
|
4684
4684
|
}, { immediate: !0 });
|
|
4685
4685
|
const k = A(() => JSON.stringify(c.fields) !== JSON.stringify(d) && !!c.fields.key_id && !!c.fields.key_format && (c.fields.key_format === "jwk" && !!c.fields.jwk || c.fields.key_format === "pem" && !!c.fields.private_key && !!c.fields.public_key)), x = (y) => {
|
|
4686
4686
|
var S, P, W, ue;
|
|
4687
4687
|
c.fields.key_id = (y == null ? void 0 : y.kid) || "", c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((S = y == null ? void 0 : y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((P = y == null ? void 0 : y.set) == null ? void 0 : P.id) || "", c.fields.key_format = y != null && y.pem ? "pem" : "jwk", c.fields.jwk = (y == null ? void 0 : y.jwk) || "", c.fields.private_key = ((W = y == null ? void 0 : y.pem) == null ? void 0 : W.private_key) || "", c.fields.public_key = ((ue = y == null ? void 0 : y.pem) == null ? void 0 : ue.public_key) || "", Object.assign(d, c.fields);
|
|
4688
4688
|
}, b = () => {
|
|
4689
|
-
|
|
4689
|
+
i.push(a.config.cancelRoute);
|
|
4690
4690
|
}, f = A(() => {
|
|
4691
4691
|
var S, P;
|
|
4692
|
-
let y = `${
|
|
4693
|
-
return
|
|
4692
|
+
let y = `${a.config.apiBaseUrl}${Se.form[a.config.app][u.value][a.keySetId ? "forKeySet" : "all"]}`;
|
|
4693
|
+
return a.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "") : a.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (P = a.config) != null && P.workspace ? `/${a.config.workspace}` : "")), y = y.replace(/{id}/gi, a.keyId).replace(/{keySetId}/gi, a.keySetId || ""), y;
|
|
4694
4694
|
}), T = A(() => {
|
|
4695
4695
|
var y, S, P;
|
|
4696
4696
|
return {
|
|
@@ -4706,7 +4706,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4706
4706
|
try {
|
|
4707
4707
|
c.isReadonly = !0;
|
|
4708
4708
|
let D;
|
|
4709
|
-
if (u.value === "create" ? D = await l.post(f.value, T.value) : u.value === "edit" && (D = ((y =
|
|
4709
|
+
if (u.value === "create" ? D = await l.post(f.value, T.value) : u.value === "edit" && (D = ((y = a.config) == null ? void 0 : y.app) === "konnect" ? await l.put(f.value, T.value) : await l.patch(f.value, T.value)), D) {
|
|
4710
4710
|
const { data: Y } = D;
|
|
4711
4711
|
c.fields.key_id = (Y == null ? void 0 : Y.kid) || "", c.fields.name = (Y == null ? void 0 : Y.name) || "", c.fields.tags = ((S = Y == null ? void 0 : Y.tags) == null ? void 0 : S.join(", ")) || "", c.fields.key_set = ((P = Y == null ? void 0 : Y.set) == null ? void 0 : P.id) || "", c.fields.key_format = Y != null && Y.pem ? "pem" : "jwk", c.fields.jwk = (Y == null ? void 0 : Y.jwk) || "", c.fields.private_key = ((W = Y == null ? void 0 : Y.pem) == null ? void 0 : W.private_key) || "", c.fields.public_key = ((ue = Y == null ? void 0 : Y.pem) == null ? void 0 : ue.public_key) || "", Object.assign(d, c.fields), t("update", D == null ? void 0 : D.data);
|
|
4712
4712
|
}
|
|
@@ -4723,14 +4723,14 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4723
4723
|
validationError: I,
|
|
4724
4724
|
loadItems: R,
|
|
4725
4725
|
results: M
|
|
4726
|
-
} = Ql(
|
|
4726
|
+
} = Ql(a.config, Se.form[a.config.app].keySets, void 0, {
|
|
4727
4727
|
fetchedItemsKey: "data",
|
|
4728
4728
|
searchKeys: ["id", "name"]
|
|
4729
4729
|
}), B = (y) => {
|
|
4730
4730
|
(!y || y !== c.fields.key_set && y !== d.key_set) && w(y);
|
|
4731
4731
|
}, J = A(() => V.value ? o("keys.errors.key_sets.fetch") : ""), z = A(() => I.value ? o("keys.errors.key_sets.invalid") : ""), Q = K(0), te = A(() => L.value === void 0), re = A(() => {
|
|
4732
4732
|
if (te.value)
|
|
4733
|
-
return
|
|
4733
|
+
return a.config.app === "konnect" ? o("keys.form.fields.key_set.footer") : void 0;
|
|
4734
4734
|
}), ne = K(/* @__PURE__ */ new Set()), X = A(() => Array.from(ne.value).map((S) => ({
|
|
4735
4735
|
name: S.name || "",
|
|
4736
4736
|
// can't use name for label or it tries to search => 404
|
|
@@ -4752,7 +4752,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4752
4752
|
await R();
|
|
4753
4753
|
}), (y, S) => {
|
|
4754
4754
|
const P = q("KInput"), W = q("KSelect"), ue = q("KTextArea");
|
|
4755
|
-
return p(), j("div",
|
|
4755
|
+
return p(), j("div", as, [
|
|
4756
4756
|
O(m(gl), {
|
|
4757
4757
|
"can-submit": k.value,
|
|
4758
4758
|
config: e.config,
|
|
@@ -4818,7 +4818,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4818
4818
|
U("div", null, E(m(o)("keys.actions.loading")), 1)
|
|
4819
4819
|
]),
|
|
4820
4820
|
empty: h(() => [
|
|
4821
|
-
U("div",
|
|
4821
|
+
U("div", is, E(m(o)("keys.search.no_results")), 1)
|
|
4822
4822
|
]),
|
|
4823
4823
|
"selected-item-template": h(({ item: D }) => [
|
|
4824
4824
|
U("div", null, E(D.name), 1)
|
|
@@ -4912,7 +4912,7 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4912
4912
|
]);
|
|
4913
4913
|
};
|
|
4914
4914
|
}
|
|
4915
|
-
}), _s = /* @__PURE__ */
|
|
4915
|
+
}), _s = /* @__PURE__ */ na(us, [["__scopeId", "data-v-c9c325df"]]), ds = { class: "kong-ui-entities-keys-entity-config-card" }, ps = { key: 2 }, Is = /* @__PURE__ */ ie({
|
|
4916
4916
|
__name: "KeyConfigCard",
|
|
4917
4917
|
props: {
|
|
4918
4918
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4947,12 +4947,12 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4947
4947
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success", "navigation-click"],
|
|
4948
4948
|
setup(e, { emit: n }) {
|
|
4949
4949
|
var b;
|
|
4950
|
-
const t = n,
|
|
4951
|
-
headers: (b =
|
|
4952
|
-
}), { convertKeyToTitle: o } = Xl(), { i18n: { t: r } } = mt.useI18n(), l = A(() =>
|
|
4950
|
+
const t = n, a = e, { axiosInstance: i } = _t({
|
|
4951
|
+
headers: (b = a.config) == null ? void 0 : b.requestHeaders
|
|
4952
|
+
}), { convertKeyToTitle: o } = Xl(), { i18n: { t: r } } = mt.useI18n(), l = A(() => a.keySetId ? `${Se.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Se.form[a.config.app].edit.all), s = A(() => {
|
|
4953
4953
|
var f;
|
|
4954
|
-
return (f = Se.form[
|
|
4955
|
-
}), u = K(), c = K({}), d = K(
|
|
4954
|
+
return (f = Se.form[a.config.app]) == null ? void 0 : f.getKeySet;
|
|
4955
|
+
}), u = K(), c = K({}), d = K(a.keySetId || ""), v = K(""), g = K(!1), _ = async (f) => {
|
|
4956
4956
|
var T;
|
|
4957
4957
|
u.value = f, d.value = (T = f == null ? void 0 : f.set) == null ? void 0 : T.id, t("fetch:success", f), k(f);
|
|
4958
4958
|
};
|
|
@@ -4960,11 +4960,11 @@ const Jo = { class: "yaml-config" }, ti = /* @__PURE__ */ ae({
|
|
|
4960
4960
|
var T, C;
|
|
4961
4961
|
if (!d.value)
|
|
4962
4962
|
return;
|
|
4963
|
-
let f = `${
|
|
4964
|
-
|
|
4963
|
+
let f = `${a.config.apiBaseUrl}${s.value}`;
|
|
4964
|
+
a.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((T = a.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{keySetId}/gi, d.value || "") : a.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (C = a.config) != null && C.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, d.value || ""));
|
|
4965
4965
|
try {
|
|
4966
4966
|
g.value = !0;
|
|
4967
|
-
const { data: w } = await
|
|
4967
|
+
const { data: w } = await i.get(f);
|
|
4968
4968
|
v.value = (w == null ? void 0 : w.name) || (w == null ? void 0 : w.id);
|
|
4969
4969
|
} catch (w) {
|
|
4970
4970
|
t("fetch:error", w);
|