@kong-ui-public/entities-shared 3.33.2-pr.2622.e4dc8379f.0 → 3.33.2-pr.2640.fb8bab909.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +780 -773
- package/dist/entities-shared.umd.js +17 -17
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts +6 -2
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/constants.d.ts +0 -4
- package/dist/types/constants.d.ts.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { inject as Dt, ref as K, computed as F, unref as $, toValue as he, watch as be, toRef as
|
|
1
|
+
import { inject as Dt, ref as K, computed as F, unref as $, toValue as he, watch as be, toRef as Jn, provide as Pt, defineComponent as z, createBlock as D, openBlock as m, resolveDynamicComponent as je, normalizeClass as fe, withCtx as _, createElementBlock as S, createCommentVNode as N, createElementVNode as R, toDisplayString as L, Fragment as ue, renderList as ce, resolveComponent as P, createVNode as M, createTextVNode as q, useCssVars as Ut, useId as Gn, useSlots as De, renderSlot as j, createSlots as Se, normalizeProps as qt, guardReactiveProps as Ht, mergeProps as Vt, onMounted as tt, onBeforeMount as nt, withModifiers as Le, Teleport as Yt, onUnmounted as zn, withDirectives as xe, vShow as Ce, withKeys as Qn, warn as Zn } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { BadgeMethodAppearances as
|
|
5
|
-
import { BookIcon as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
var
|
|
8
|
-
const Pe = Object.values(it),
|
|
3
|
+
import { createI18n as Xn, i18nTComponent as ei } from "@kong-ui-public/i18n";
|
|
4
|
+
import { BadgeMethodAppearances as ti, KButton as mt, KTruncate as ni, KBadge as ii } from "@kong/kongponents";
|
|
5
|
+
import { BookIcon as Wt, AddIcon as Jt, CloseIcon as ri, ChevronDownIcon as ai, CopyIcon as oi } from "@kong/icons";
|
|
6
|
+
import { useRouter as li } from "vue-router";
|
|
7
|
+
var si = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(si || {}), ci = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ci || {}), me = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(me || {}), it = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.ProducePolicy = "produce_policy", e.ConsumePolicy = "consume_policy", e.ClusterPolicy = "cluster_policy", e.ListenerPolicy = "listener_policy", e.SchemaRegistry = "schema_registry", e.StaticKey = "static_key", e.Other = "other", e))(it || {});
|
|
8
|
+
const Pe = Object.values(it), ui = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key"];
|
|
9
9
|
var V = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(V || {}), ae = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(ae || {});
|
|
10
10
|
const ht = [
|
|
11
11
|
"primary",
|
|
12
12
|
"secondary"
|
|
13
13
|
];
|
|
14
|
-
function
|
|
14
|
+
function di() {
|
|
15
15
|
return {
|
|
16
16
|
getAxiosInstance: (e = {}) => {
|
|
17
17
|
try {
|
|
@@ -35,7 +35,7 @@ function ui() {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function fi() {
|
|
39
39
|
return {
|
|
40
40
|
debounce: (e, t) => {
|
|
41
41
|
let n;
|
|
@@ -47,13 +47,13 @@ function di() {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
const He = "khcp-user-table-preferences",
|
|
50
|
+
const He = "khcp-user-table-preferences", pi = {
|
|
51
51
|
pageSize: 30,
|
|
52
52
|
sortColumnKey: void 0,
|
|
53
53
|
sortColumnOrder: void 0,
|
|
54
54
|
columnVisibility: {}
|
|
55
55
|
};
|
|
56
|
-
function
|
|
56
|
+
function mi() {
|
|
57
57
|
const e = (n) => {
|
|
58
58
|
if (typeof n == "string")
|
|
59
59
|
try {
|
|
@@ -77,7 +77,7 @@ function pi() {
|
|
|
77
77
|
},
|
|
78
78
|
getTablePreferences: (n, i) => {
|
|
79
79
|
const r = t();
|
|
80
|
-
return (r == null ? void 0 : r.get(n)) || void 0 || i ||
|
|
80
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || i || pi;
|
|
81
81
|
},
|
|
82
82
|
deleteAllTablePreferences: () => {
|
|
83
83
|
localStorage.removeItem(He);
|
|
@@ -85,22 +85,22 @@ function pi() {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
function rt(e = {}) {
|
|
88
|
-
const { getAxiosInstance: t } =
|
|
88
|
+
const { getAxiosInstance: t } = di();
|
|
89
89
|
return {
|
|
90
90
|
axiosInstance: t(e)
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const hi = {
|
|
94
94
|
actions: {
|
|
95
95
|
copyId: "Copy ID",
|
|
96
96
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
97
97
|
copyToClipboard: "Copied successfully!",
|
|
98
98
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, gi = {
|
|
101
101
|
message: "Are you sure you want to delete this {entityType}?",
|
|
102
102
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
103
|
-
},
|
|
103
|
+
}, yi = {
|
|
104
104
|
actions: {
|
|
105
105
|
viewConfiguration: "View Configuration",
|
|
106
106
|
save: "Save",
|
|
@@ -117,13 +117,13 @@ const mi = {
|
|
|
117
117
|
errors: {
|
|
118
118
|
edit: "The entity could not be edited at this time."
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, vi = {
|
|
121
121
|
emptyState: {
|
|
122
122
|
noSearchResultsTitle: "No results found",
|
|
123
123
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
124
124
|
noSearchResultsCtaText: "Clear"
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, bi = {
|
|
127
127
|
title: "Configuration",
|
|
128
128
|
actions: {
|
|
129
129
|
copy: "Copy JSON"
|
|
@@ -160,10 +160,10 @@ const mi = {
|
|
|
160
160
|
entryTitle: "Entry {index}",
|
|
161
161
|
structuredFormat: "Structured"
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, xi = {
|
|
164
164
|
learnMore: "Learn more",
|
|
165
165
|
pricingTitle: "Pricing: "
|
|
166
|
-
},
|
|
166
|
+
}, Ci = {
|
|
167
167
|
filterButtonText: "Filter",
|
|
168
168
|
fieldLabel: "Filter by:",
|
|
169
169
|
inputPlaceholder: "Enter a value",
|
|
@@ -171,17 +171,17 @@ const mi = {
|
|
|
171
171
|
applyButtonText: "Apply",
|
|
172
172
|
clearButtonText: "Clear",
|
|
173
173
|
clearAllButtonText: "Clear all filters"
|
|
174
|
-
},
|
|
174
|
+
}, ki = {
|
|
175
175
|
errors: {
|
|
176
176
|
fetch: "Could not fetch available items",
|
|
177
177
|
invalid: "Please select a valid value"
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, Ai = {
|
|
180
180
|
unexpected: "An unexpected error has occurred",
|
|
181
181
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
182
|
-
}, Ai = {
|
|
183
|
-
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
184
182
|
}, _i = {
|
|
183
|
+
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
184
|
+
}, wi = {
|
|
185
185
|
enable: {
|
|
186
186
|
title: "Enable {entityType}",
|
|
187
187
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -192,28 +192,28 @@ const mi = {
|
|
|
192
192
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
193
193
|
confirmText: "Yes, disable"
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
global:
|
|
197
|
-
deleteModal:
|
|
198
|
-
baseForm:
|
|
199
|
-
baseTable:
|
|
200
|
-
baseConfigCard:
|
|
201
|
-
emptyState:
|
|
202
|
-
filter:
|
|
203
|
-
debouncedFilter:
|
|
204
|
-
errors:
|
|
205
|
-
validationErrors:
|
|
206
|
-
toggleModal:
|
|
195
|
+
}, Si = {
|
|
196
|
+
global: hi,
|
|
197
|
+
deleteModal: gi,
|
|
198
|
+
baseForm: yi,
|
|
199
|
+
baseTable: vi,
|
|
200
|
+
baseConfigCard: bi,
|
|
201
|
+
emptyState: xi,
|
|
202
|
+
filter: Ci,
|
|
203
|
+
debouncedFilter: ki,
|
|
204
|
+
errors: Ai,
|
|
205
|
+
validationErrors: _i,
|
|
206
|
+
toggleModal: wi
|
|
207
207
|
};
|
|
208
208
|
function Ue() {
|
|
209
|
-
const e =
|
|
209
|
+
const e = Xn("en-us", Si);
|
|
210
210
|
return {
|
|
211
211
|
i18n: e,
|
|
212
|
-
i18nT:
|
|
212
|
+
i18nT: ei(e)
|
|
213
213
|
// Translation component <i18n-t>
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Gt() {
|
|
217
217
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
218
218
|
if (o.length !== a.length) return !1;
|
|
219
219
|
const s = /* @__PURE__ */ new Set([...o, ...a]);
|
|
@@ -255,17 +255,17 @@ function Wt() {
|
|
|
255
255
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function $i(e, t, n, i = {
|
|
259
259
|
fetchedItemsKey: "data",
|
|
260
260
|
searchKeys: ["id"]
|
|
261
261
|
}) {
|
|
262
262
|
n || (n = "1000");
|
|
263
|
-
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } =
|
|
263
|
+
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } = fi(), s = a(async (T) => {
|
|
264
264
|
await C(T);
|
|
265
265
|
}, 200), l = K(!1), c = K(""), d = K(""), u = K([]), p = K([]), g = K(void 0), h = F(() => {
|
|
266
266
|
const T = `${e.apiBaseUrl}${$(t)}`;
|
|
267
267
|
return e.app === "konnect" ? T.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? T.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : T;
|
|
268
|
-
}), { isValidUuid: x } =
|
|
268
|
+
}), { isValidUuid: x } = Gt(), y = async () => {
|
|
269
269
|
try {
|
|
270
270
|
l.value = !0;
|
|
271
271
|
const { data: T } = await r.get(`${h.value}?size=${n}`);
|
|
@@ -276,7 +276,7 @@ function Si(e, t, n, i = {
|
|
|
276
276
|
l.value = !1;
|
|
277
277
|
}
|
|
278
278
|
}, k = K(""), C = async (T) => {
|
|
279
|
-
var
|
|
279
|
+
var J, X, w;
|
|
280
280
|
if (k.value !== T) {
|
|
281
281
|
if (k.value = T ?? "", !T) {
|
|
282
282
|
u.value = p.value;
|
|
@@ -299,7 +299,7 @@ function Si(e, t, n, i = {
|
|
|
299
299
|
})
|
|
300
300
|
);
|
|
301
301
|
const O = await Promise.all(A), f = /* @__PURE__ */ new Set();
|
|
302
|
-
u.value = [], (
|
|
302
|
+
u.value = [], (J = O == null ? void 0 : O.forEach) == null || J.call(O, (v) => {
|
|
303
303
|
var b;
|
|
304
304
|
(b = v == null ? void 0 : v.forEach) == null || b.call(v, (H) => {
|
|
305
305
|
f.has(H.id) || (f.add(H.id), u.value.push(H));
|
|
@@ -312,7 +312,7 @@ function Si(e, t, n, i = {
|
|
|
312
312
|
l.value = !1;
|
|
313
313
|
}
|
|
314
314
|
else
|
|
315
|
-
l.value = !0, d.value = "", u.value = (
|
|
315
|
+
l.value = !0, d.value = "", u.value = (w = g.value) == null ? void 0 : w.filter((A) => {
|
|
316
316
|
var f;
|
|
317
317
|
let O = !1;
|
|
318
318
|
for (const v of i.searchKeys) {
|
|
@@ -333,13 +333,13 @@ function Si(e, t, n, i = {
|
|
|
333
333
|
debouncedQueryChange: s
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ti(e, t) {
|
|
337
337
|
const n = $(t), i = F(
|
|
338
338
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
339
339
|
);
|
|
340
340
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Ii() {
|
|
343
343
|
const { i18n: { t: e } } = Ue();
|
|
344
344
|
return {
|
|
345
345
|
getErrorFieldsFromError: (i) => {
|
|
@@ -411,7 +411,7 @@ function Ti() {
|
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Ei(e) {
|
|
415
415
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
416
416
|
try {
|
|
417
417
|
const i = e.join("/"), r = `${n}${i}`, o = e.some((s) => s.trim() === "");
|
|
@@ -422,7 +422,7 @@ function Ii(e) {
|
|
|
422
422
|
return console.warn("Failed to build valid URL:", i), "";
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function zt(e, t) {
|
|
426
426
|
const n = F(() => {
|
|
427
427
|
const r = he(e);
|
|
428
428
|
return r.app === "konnect" || !!r.isExactMatch;
|
|
@@ -443,8 +443,8 @@ function Gt(e, t) {
|
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
const gt = /* @__PURE__ */ new Map();
|
|
446
|
-
function
|
|
447
|
-
const i = K(!0), r = he(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a =
|
|
446
|
+
function Fi(e, t, n) {
|
|
447
|
+
const i = K(!0), r = he(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a = zt(e, t), s = K({
|
|
448
448
|
status: me.Idle
|
|
449
449
|
}), l = async (u) => {
|
|
450
450
|
var g;
|
|
@@ -490,71 +490,71 @@ function Ei(e, t, n) {
|
|
|
490
490
|
error: h.response ? h : { response: h }
|
|
491
491
|
}, x);
|
|
492
492
|
}
|
|
493
|
-
}, c = r.cacheIdentifier, d =
|
|
493
|
+
}, c = r.cacheIdentifier, d = Qt(c);
|
|
494
494
|
return { fetcher: l, fetcherState: s, fetcherCacheKey: d };
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Qt(e) {
|
|
497
497
|
if (e) {
|
|
498
498
|
let t = gt.get(e);
|
|
499
499
|
return t || (t = K(1), gt.set(e, t)), t;
|
|
500
500
|
}
|
|
501
501
|
return K(1);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Oi() {
|
|
504
504
|
const e = (i, r = "_") => i ? i.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
505
505
|
return {
|
|
506
506
|
capitalize: (i) => i ? i.replace(t, (r) => r.toUpperCase()) : "",
|
|
507
507
|
convertKeyToTitle: e
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const Zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, yt = (e) => {
|
|
511
511
|
if (typeof e != "string")
|
|
512
512
|
throw new TypeError("Invalid argument expected string");
|
|
513
|
-
const t = e.match(
|
|
513
|
+
const t = e.match(Zt);
|
|
514
514
|
if (!t)
|
|
515
515
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
516
516
|
return t.shift(), t;
|
|
517
517
|
}, vt = (e) => e === "*" || e === "x" || e === "X", bt = (e) => {
|
|
518
518
|
const t = parseInt(e, 10);
|
|
519
519
|
return isNaN(t) ? e : t;
|
|
520
|
-
},
|
|
520
|
+
}, Li = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Bi = (e, t) => {
|
|
521
521
|
if (vt(e) || vt(t))
|
|
522
522
|
return 0;
|
|
523
|
-
const [n, i] =
|
|
523
|
+
const [n, i] = Li(bt(e), bt(t));
|
|
524
524
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
525
525
|
}, xt = (e, t) => {
|
|
526
526
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
527
|
-
const i =
|
|
527
|
+
const i = Bi(e[n] || "0", t[n] || "0");
|
|
528
528
|
if (i !== 0)
|
|
529
529
|
return i;
|
|
530
530
|
}
|
|
531
531
|
return 0;
|
|
532
|
-
},
|
|
532
|
+
}, Ri = (e, t) => {
|
|
533
533
|
const n = yt(e), i = yt(t), r = n.pop(), o = i.pop(), a = xt(n, i);
|
|
534
534
|
return a !== 0 ? a : r && o ? xt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
535
535
|
}, Ct = (e, t, n) => {
|
|
536
|
-
|
|
537
|
-
const i =
|
|
538
|
-
return
|
|
539
|
-
},
|
|
536
|
+
Ki(n);
|
|
537
|
+
const i = Ri(e, t);
|
|
538
|
+
return Xt[n].includes(i);
|
|
539
|
+
}, Xt = {
|
|
540
540
|
">": [1],
|
|
541
541
|
">=": [0, 1],
|
|
542
542
|
"=": [0],
|
|
543
543
|
"<=": [-1, 0],
|
|
544
544
|
"<": [-1],
|
|
545
545
|
"!=": [-1, 1]
|
|
546
|
-
}, kt = Object.keys(
|
|
546
|
+
}, kt = Object.keys(Xt), Ki = (e) => {
|
|
547
547
|
if (typeof e != "string")
|
|
548
548
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
549
549
|
if (kt.indexOf(e) === -1)
|
|
550
550
|
throw new Error(`Invalid operator, expected one of ${kt.join("|")}`);
|
|
551
|
-
},
|
|
552
|
-
function
|
|
551
|
+
}, Ni = (e) => typeof e == "string" && /^[v\d]/.test(e) && Zt.test(e);
|
|
552
|
+
function Mi(e) {
|
|
553
553
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
554
554
|
if (!t)
|
|
555
555
|
return !0;
|
|
556
556
|
const { edition: i, version: r } = t;
|
|
557
|
-
if (!
|
|
557
|
+
if (!Ni(r))
|
|
558
558
|
return console.error("Invalid version"), !1;
|
|
559
559
|
const o = n[i];
|
|
560
560
|
if (!o)
|
|
@@ -562,7 +562,7 @@ function Ni(e) {
|
|
|
562
562
|
const [a, s] = o;
|
|
563
563
|
return !(a && Ct(r, a, "<") || s && Ct(r, s, ">"));
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function ji(e) {
|
|
566
566
|
const t = K(0), n = K(0), i = K(!1);
|
|
567
567
|
return be(e, (o) => {
|
|
568
568
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
@@ -570,20 +570,20 @@ function Mi(e) {
|
|
|
570
570
|
isTruncated: F(() => t.value < n.value)
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Di() {
|
|
574
574
|
const { i18n: { t: e } } = Ue();
|
|
575
575
|
return {
|
|
576
576
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
const
|
|
580
|
-
Pt(
|
|
581
|
-
},
|
|
579
|
+
const Ge = Symbol("schema"), Pi = (e) => {
|
|
580
|
+
Pt(Ge, e);
|
|
581
|
+
}, Ui = (e) => {
|
|
582
582
|
var r, o;
|
|
583
|
-
const t = Dt(
|
|
584
|
-
return Pt(
|
|
583
|
+
const t = Dt(Ge, void 0), n = (o = (r = t == null ? void 0 : t.value) == null ? void 0 : r.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), i = Jn(n == null ? void 0 : n[e]);
|
|
584
|
+
return Pt(Ge, i), i;
|
|
585
585
|
};
|
|
586
|
-
function
|
|
586
|
+
function qi(e) {
|
|
587
587
|
let t = "";
|
|
588
588
|
const n = K(!1), i = K(null), r = F(() => {
|
|
589
589
|
let a;
|
|
@@ -598,28 +598,28 @@ function Ui(e) {
|
|
|
598
598
|
}
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
const
|
|
601
|
+
const W = {
|
|
602
602
|
useAxios: rt,
|
|
603
|
-
useDebouncedFilter:
|
|
604
|
-
useDeleteUrlBuilder:
|
|
605
|
-
useErrors:
|
|
606
|
-
useExternalLinkCreator:
|
|
607
|
-
useFetcher:
|
|
608
|
-
useFetcherCacheKey:
|
|
609
|
-
useFetchUrlBuilder:
|
|
610
|
-
useHelpers:
|
|
611
|
-
useStringHelpers:
|
|
603
|
+
useDebouncedFilter: $i,
|
|
604
|
+
useDeleteUrlBuilder: Ti,
|
|
605
|
+
useErrors: Ii,
|
|
606
|
+
useExternalLinkCreator: Ei,
|
|
607
|
+
useFetcher: Fi,
|
|
608
|
+
useFetcherCacheKey: Qt,
|
|
609
|
+
useFetchUrlBuilder: zt,
|
|
610
|
+
useHelpers: Gt,
|
|
611
|
+
useStringHelpers: Oi,
|
|
612
612
|
useI18n: Ue,
|
|
613
|
-
useGatewayFeatureSupported:
|
|
614
|
-
useTruncationDetector:
|
|
615
|
-
useValidators:
|
|
616
|
-
useSchemaProvider:
|
|
617
|
-
useSubSchema:
|
|
618
|
-
useTableState:
|
|
619
|
-
},
|
|
613
|
+
useGatewayFeatureSupported: Mi,
|
|
614
|
+
useTruncationDetector: ji,
|
|
615
|
+
useValidators: Di,
|
|
616
|
+
useSchemaProvider: Pi,
|
|
617
|
+
useSubSchema: Ui,
|
|
618
|
+
useTableState: qi
|
|
619
|
+
}, Hi = {
|
|
620
620
|
key: 0,
|
|
621
621
|
class: "config-card-fieldset-title"
|
|
622
|
-
},
|
|
622
|
+
}, Vi = /* @__PURE__ */ z({
|
|
623
623
|
__name: "JsonCardItem",
|
|
624
624
|
props: {
|
|
625
625
|
item: {
|
|
@@ -636,21 +636,21 @@ const Y = {
|
|
|
636
636
|
}
|
|
637
637
|
},
|
|
638
638
|
setup(e) {
|
|
639
|
-
const t = e, { i18n: { t: n } } =
|
|
639
|
+
const t = e, { i18n: { t: n } } = W.useI18n(), { convertKeyToTitle: i } = W.useStringHelpers(), r = F(() => t.item.key ?? "json-array-item"), o = F(() => t.item.value ?? t.item), a = F(() => {
|
|
640
640
|
const l = JSON.parse(JSON.stringify(o.value));
|
|
641
641
|
return t.isArrayItem && delete l.name, l;
|
|
642
642
|
}), s = F(() => {
|
|
643
643
|
var l;
|
|
644
644
|
return t.isArrayItem ? (l = o.value) != null && l.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
645
645
|
});
|
|
646
|
-
return (l, c) => (m(),
|
|
646
|
+
return (l, c) => (m(), D(je(e.isArrayItem ? "fieldset" : "div"), {
|
|
647
647
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
648
648
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
e.isArrayItem ? (m(), S("legend",
|
|
649
|
+
default: _(() => [
|
|
650
|
+
e.isArrayItem ? (m(), S("legend", Hi, [
|
|
651
651
|
R("b", null, L(s.value), 1)
|
|
652
652
|
])) : N("", !0),
|
|
653
|
-
(m(!0), S(ue, null, ce(Object.keys(a.value), (d, u) => (m(),
|
|
653
|
+
(m(!0), S(ue, null, ce(Object.keys(a.value), (d, u) => (m(), D(tn, {
|
|
654
654
|
key: `${r.value}-property-${u}`,
|
|
655
655
|
item: {
|
|
656
656
|
key: d,
|
|
@@ -667,7 +667,7 @@ const Y = {
|
|
|
667
667
|
for (const [i, r] of t)
|
|
668
668
|
n[i] = r;
|
|
669
669
|
return n;
|
|
670
|
-
},
|
|
670
|
+
}, en = /* @__PURE__ */ se(Vi, [["__scopeId", "data-v-dc1e39a1"]]), Yi = /* @__PURE__ */ z({
|
|
671
671
|
__name: "InternalLinkItem",
|
|
672
672
|
props: {
|
|
673
673
|
item: {
|
|
@@ -677,7 +677,7 @@ const Y = {
|
|
|
677
677
|
},
|
|
678
678
|
emits: ["navigation-click"],
|
|
679
679
|
setup(e) {
|
|
680
|
-
const { i18n: { t } } =
|
|
680
|
+
const { i18n: { t } } = W.useI18n();
|
|
681
681
|
return (n, i) => {
|
|
682
682
|
const r = P("KButton");
|
|
683
683
|
return m(), S("div", null, [
|
|
@@ -686,7 +686,7 @@ const Y = {
|
|
|
686
686
|
class: "navigation-button",
|
|
687
687
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
688
688
|
}, {
|
|
689
|
-
default:
|
|
689
|
+
default: _(() => [
|
|
690
690
|
q(L(e.item.value || $(t)("baseConfigCard.commonFields.link")), 1)
|
|
691
691
|
]),
|
|
692
692
|
_: 1
|
|
@@ -694,7 +694,7 @@ const Y = {
|
|
|
694
694
|
]);
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
697
|
+
}), Wi = /* @__PURE__ */ se(Yi, [["__scopeId", "data-v-2feb8c2e"]]), Ji = /* @__PURE__ */ z({
|
|
698
698
|
__name: "StatusBadge",
|
|
699
699
|
props: {
|
|
700
700
|
status: {
|
|
@@ -703,24 +703,24 @@ const Y = {
|
|
|
703
703
|
}
|
|
704
704
|
},
|
|
705
705
|
setup(e) {
|
|
706
|
-
const { i18n: { t } } =
|
|
706
|
+
const { i18n: { t } } = W.useI18n();
|
|
707
707
|
return (n, i) => {
|
|
708
708
|
const r = P("KBadge");
|
|
709
|
-
return m(),
|
|
709
|
+
return m(), D(r, {
|
|
710
710
|
appearance: e.status ? "success" : "neutral"
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
712
|
+
default: _(() => [
|
|
713
713
|
q(L(e.status ? $(t)("baseConfigCard.statusBadge.enabledLabel") : $(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
714
714
|
]),
|
|
715
715
|
_: 1
|
|
716
716
|
}, 8, ["appearance"]);
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
|
-
}), Gi = "#0044f4",
|
|
719
|
+
}), Gi = "#0044f4", zi = "#e0e4ea", Qi = "#afb7c5", Zi = "#0044f4", Xi = "1px", er = "16px", tr = "20px", nr = { class: "config-card-details-row" }, ir = ["data-testid"], rr = ["data-testid"], ar = ["data-testid"], or = ["data-testid"], lr = { key: 1 }, sr = ["data-testid"], cr = ["data-testid"], ur = ["data-testid"], dr = ["data-testid"], fr = {
|
|
720
720
|
name: "ConfigCardItem",
|
|
721
|
-
components: { JsonCardItem:
|
|
722
|
-
},
|
|
723
|
-
...
|
|
721
|
+
components: { JsonCardItem: en, StatusBadge: Ji, InternalLinkItem: Wi }
|
|
722
|
+
}, pr = /* @__PURE__ */ z({
|
|
723
|
+
...fr,
|
|
724
724
|
props: {
|
|
725
725
|
item: {
|
|
726
726
|
type: Object,
|
|
@@ -739,15 +739,15 @@ const Y = {
|
|
|
739
739
|
},
|
|
740
740
|
emits: ["navigation-click"],
|
|
741
741
|
setup(e, { emit: t }) {
|
|
742
|
-
Ut((
|
|
743
|
-
v70f369b3: p.value ? "none" : `solid ${$(
|
|
742
|
+
Ut((J) => ({
|
|
743
|
+
v70f369b3: p.value ? "none" : `solid ${$(Xi)} ${$(zi)}`,
|
|
744
744
|
v67c2fae6: u.value && c.value ? "block" : "flex",
|
|
745
745
|
v847b138c: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
746
746
|
v847687d6: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
747
747
|
}));
|
|
748
|
-
const n = e, i = t, r =
|
|
749
|
-
var
|
|
750
|
-
return n.item.type ? n.item.type : (
|
|
748
|
+
const n = e, i = t, r = Gn(), o = De(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = W.useI18n(), c = F(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = F(() => !!(n.item.tooltip || o["label-tooltip"])), u = F(() => n.item.type === V.Json || n.item.type === V.JsonArray), p = F(() => n.item.type === V.JsonArray), g = W.useSubSchema(n.item.key), h = F(() => {
|
|
749
|
+
var J;
|
|
750
|
+
return n.item.type ? n.item.type : (J = g == null ? void 0 : g.value) != null && J.encrypted ? V.Redacted : void 0;
|
|
751
751
|
}), x = F(() => {
|
|
752
752
|
switch (h.value) {
|
|
753
753
|
case V.ID:
|
|
@@ -829,8 +829,8 @@ const Y = {
|
|
|
829
829
|
attrs: {
|
|
830
830
|
"data-testid": `${n.item.key}-internal-link`,
|
|
831
831
|
item: n.item,
|
|
832
|
-
onNavigationClick: (
|
|
833
|
-
i("navigation-click",
|
|
832
|
+
onNavigationClick: (J) => {
|
|
833
|
+
i("navigation-click", J);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
};
|
|
@@ -879,21 +879,21 @@ const Y = {
|
|
|
879
879
|
text: n.item.value
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
}), y = K(), k = K(), { isTruncated: C } =
|
|
883
|
-
return (
|
|
884
|
-
const
|
|
885
|
-
return m(), S("div",
|
|
882
|
+
}), y = K(), k = K(), { isTruncated: C } = W.useTruncationDetector(y), { isTruncated: T } = W.useTruncationDetector(k);
|
|
883
|
+
return (J, X) => {
|
|
884
|
+
const w = P("KTooltip"), A = P("KLabel"), O = P("KBadge"), f = P("KCopy");
|
|
885
|
+
return m(), S("div", nr, [
|
|
886
886
|
R("div", {
|
|
887
887
|
class: "config-card-details-label",
|
|
888
888
|
"data-testid": `${e.item.key}-label`
|
|
889
889
|
}, [
|
|
890
|
-
|
|
890
|
+
j(J.$slots, "label", { item: e.item }, () => [
|
|
891
891
|
M(A, { "tooltip-attributes": { maxWidth: "500px" } }, Se({
|
|
892
|
-
default:
|
|
893
|
-
M(
|
|
892
|
+
default: _(() => [
|
|
893
|
+
M(w, {
|
|
894
894
|
text: $(C) ? e.item.label : ""
|
|
895
895
|
}, {
|
|
896
|
-
default:
|
|
896
|
+
default: _(() => [
|
|
897
897
|
R("span", {
|
|
898
898
|
ref_key: "labelContent",
|
|
899
899
|
ref: y,
|
|
@@ -907,87 +907,87 @@ const Y = {
|
|
|
907
907
|
}, [
|
|
908
908
|
d.value ? {
|
|
909
909
|
name: "tooltip",
|
|
910
|
-
fn:
|
|
910
|
+
fn: _(() => [
|
|
911
911
|
R("div", {
|
|
912
912
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
913
913
|
}, [
|
|
914
|
-
|
|
914
|
+
j(J.$slots, "label-tooltip", {}, () => [
|
|
915
915
|
q(L(e.item.tooltip), 1)
|
|
916
916
|
], !0)
|
|
917
|
-
], 8,
|
|
917
|
+
], 8, rr)
|
|
918
918
|
]),
|
|
919
919
|
key: "0"
|
|
920
920
|
} : void 0
|
|
921
921
|
]), 1024)
|
|
922
922
|
], !0)
|
|
923
|
-
], 8,
|
|
923
|
+
], 8, ir),
|
|
924
924
|
R("div", {
|
|
925
925
|
class: "config-card-details-value",
|
|
926
926
|
"data-testid": `${e.item.key}-property-value`
|
|
927
927
|
}, [
|
|
928
|
-
|
|
928
|
+
j(J.$slots, e.item.key, {
|
|
929
929
|
rowValue: e.item.value
|
|
930
930
|
}, () => [
|
|
931
|
-
c.value ? (m(), S("div",
|
|
932
|
-
(m(),
|
|
933
|
-
default:
|
|
931
|
+
c.value ? (m(), S("div", lr, [
|
|
932
|
+
(m(), D(je(x.value.tag), qt(Ht(x.value.attrs)), {
|
|
933
|
+
default: _(() => [
|
|
934
934
|
x.value.additionalComponent === "KBadge" ? (m(), S("div", {
|
|
935
935
|
key: 0,
|
|
936
936
|
"data-testid": `${e.item.key}-badge-tags`
|
|
937
937
|
}, [
|
|
938
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(),
|
|
938
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), D(O, {
|
|
939
939
|
key: `${e.item.key}-badge-tag-${b}`,
|
|
940
940
|
class: "config-badge",
|
|
941
941
|
"data-testid": `${e.item.key}-badge-tag-${b}`,
|
|
942
942
|
tooltip: v,
|
|
943
943
|
"truncation-tooltip": ""
|
|
944
944
|
}, {
|
|
945
|
-
default:
|
|
945
|
+
default: _(() => [
|
|
946
946
|
q(L(v), 1)
|
|
947
947
|
]),
|
|
948
948
|
_: 2
|
|
949
949
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
950
|
-
], 8,
|
|
950
|
+
], 8, sr)) : x.value.additionalComponent === "KCopy" ? (m(), S("div", {
|
|
951
951
|
key: 1,
|
|
952
952
|
class: "copy-uuid-array",
|
|
953
953
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
954
954
|
}, [
|
|
955
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(),
|
|
955
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), D(f, Vt({ ref_for: !0 }, x.value.childAttrs, {
|
|
956
956
|
key: `${e.item.key}-copy-uuid-${b}`,
|
|
957
957
|
"data-testid": `${e.item.key}-copy-uuid-${b}`,
|
|
958
958
|
text: v
|
|
959
959
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
960
|
-
], 8,
|
|
960
|
+
], 8, cr)) : x.value.additionalComponent === "KMethodBadge" ? (m(), S("div", {
|
|
961
961
|
key: 2,
|
|
962
962
|
class: "method-badge-array",
|
|
963
963
|
"data-testid": `${e.item.key}-badge-methods`
|
|
964
964
|
}, [
|
|
965
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(),
|
|
965
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), D(O, {
|
|
966
966
|
key: `${e.item.key}-badge-method-${b}`,
|
|
967
|
-
appearance: Object.values($(
|
|
967
|
+
appearance: Object.values($(ti)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
968
968
|
class: "config-badge",
|
|
969
969
|
"data-testid": `${e.item.key}-badge-method-${b}`
|
|
970
970
|
}, {
|
|
971
|
-
default:
|
|
971
|
+
default: _(() => [
|
|
972
972
|
q(L(v), 1)
|
|
973
973
|
]),
|
|
974
974
|
_: 2
|
|
975
975
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
976
|
-
], 8,
|
|
976
|
+
], 8, ur)) : x.value.additionalComponent === "JsonCardItem" ? (m(), S("div", {
|
|
977
977
|
key: 3,
|
|
978
978
|
"data-testid": `${n.item.key}-json-array-content`
|
|
979
979
|
}, [
|
|
980
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(),
|
|
980
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), D(en, {
|
|
981
981
|
key: `json-array-item-${b}`,
|
|
982
982
|
index: b,
|
|
983
983
|
"is-array-item": "",
|
|
984
984
|
item: v
|
|
985
985
|
}, null, 8, ["index", "item"]))), 128))
|
|
986
|
-
], 8,
|
|
986
|
+
], 8, dr)) : (m(), D(w, {
|
|
987
987
|
key: 4,
|
|
988
988
|
text: $(T) ? e.item.value : ""
|
|
989
989
|
}, {
|
|
990
|
-
default:
|
|
990
|
+
default: _(() => [
|
|
991
991
|
R("span", {
|
|
992
992
|
ref_key: "textContent",
|
|
993
993
|
ref: k,
|
|
@@ -1002,16 +1002,16 @@ const Y = {
|
|
|
1002
1002
|
])) : (m(), S("div", {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
"data-testid": `${e.item.key}-no-value`
|
|
1005
|
-
}, " – ", 8,
|
|
1005
|
+
}, " – ", 8, or))
|
|
1006
1006
|
], !0)
|
|
1007
|
-
], 8,
|
|
1007
|
+
], 8, ar)
|
|
1008
1008
|
]);
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
|
-
}),
|
|
1011
|
+
}), tn = /* @__PURE__ */ se(pr, [["__scopeId", "data-v-66d61bea"]]), mr = { class: "json-config config-card-code-block" }, hr = {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
class: "json-endpoint"
|
|
1014
|
-
},
|
|
1014
|
+
}, nn = /* @__PURE__ */ z({
|
|
1015
1015
|
__name: "JsonCodeBlock",
|
|
1016
1016
|
props: {
|
|
1017
1017
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1051,12 +1051,12 @@ const Y = {
|
|
|
1051
1051
|
});
|
|
1052
1052
|
return (r, o) => {
|
|
1053
1053
|
const a = P("KBadge"), s = P("KCodeBlock");
|
|
1054
|
-
return m(), S("div",
|
|
1055
|
-
t.fetcherUrl ? (m(), S("div",
|
|
1054
|
+
return m(), S("div", mr, [
|
|
1055
|
+
t.fetcherUrl ? (m(), S("div", hr, [
|
|
1056
1056
|
M(a, {
|
|
1057
1057
|
appearance: t.requestMethod
|
|
1058
1058
|
}, {
|
|
1059
|
-
default:
|
|
1059
|
+
default: _(() => [
|
|
1060
1060
|
q(L(t.requestMethod), 1)
|
|
1061
1061
|
]),
|
|
1062
1062
|
_: 1
|
|
@@ -1069,7 +1069,7 @@ const Y = {
|
|
|
1069
1069
|
theme: "dark"
|
|
1070
1070
|
}, null, 8, ["code"])
|
|
1071
1071
|
])) : N("", !0),
|
|
1072
|
-
t.entityRecord ? (m(),
|
|
1072
|
+
t.entityRecord ? (m(), D(s, {
|
|
1073
1073
|
key: 1,
|
|
1074
1074
|
id: "json-codeblock",
|
|
1075
1075
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
@@ -1081,53 +1081,53 @@ const Y = {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
1083
|
});
|
|
1084
|
-
/*! js-yaml 4.1.
|
|
1085
|
-
function
|
|
1084
|
+
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
1085
|
+
function rn(e) {
|
|
1086
1086
|
return typeof e > "u" || e === null;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function gr(e) {
|
|
1089
1089
|
return typeof e == "object" && e !== null;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1092
|
-
return Array.isArray(e) ? e :
|
|
1091
|
+
function yr(e) {
|
|
1092
|
+
return Array.isArray(e) ? e : rn(e) ? [] : [e];
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function vr(e, t) {
|
|
1095
1095
|
var n, i, r, o;
|
|
1096
1096
|
if (t)
|
|
1097
1097
|
for (o = Object.keys(t), n = 0, i = o.length; n < i; n += 1)
|
|
1098
1098
|
r = o[n], e[r] = t[r];
|
|
1099
1099
|
return e;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function br(e, t) {
|
|
1102
1102
|
var n = "", i;
|
|
1103
1103
|
for (i = 0; i < t; i += 1)
|
|
1104
1104
|
n += e;
|
|
1105
1105
|
return n;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function xr(e) {
|
|
1108
1108
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1109
1109
|
}
|
|
1110
|
-
var
|
|
1111
|
-
isNothing:
|
|
1112
|
-
isObject:
|
|
1113
|
-
toArray:
|
|
1114
|
-
repeat:
|
|
1115
|
-
isNegativeZero:
|
|
1116
|
-
extend:
|
|
1110
|
+
var Cr = rn, kr = gr, Ar = yr, _r = br, wr = xr, Sr = vr, ee = {
|
|
1111
|
+
isNothing: Cr,
|
|
1112
|
+
isObject: kr,
|
|
1113
|
+
toArray: Ar,
|
|
1114
|
+
repeat: _r,
|
|
1115
|
+
isNegativeZero: wr,
|
|
1116
|
+
extend: Sr
|
|
1117
1117
|
};
|
|
1118
|
-
function
|
|
1118
|
+
function an(e, t) {
|
|
1119
1119
|
var n = "", i = e.reason || "(unknown reason)";
|
|
1120
1120
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1121
1121
|
|
|
1122
1122
|
` + e.mark.snippet), i + " " + n) : i;
|
|
1123
1123
|
}
|
|
1124
1124
|
function Ie(e, t) {
|
|
1125
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1125
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = an(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1126
1126
|
}
|
|
1127
1127
|
Ie.prototype = Object.create(Error.prototype);
|
|
1128
1128
|
Ie.prototype.constructor = Ie;
|
|
1129
1129
|
Ie.prototype.toString = function(t) {
|
|
1130
|
-
return this.name + ": " +
|
|
1130
|
+
return this.name + ": " + an(this, t);
|
|
1131
1131
|
};
|
|
1132
1132
|
var oe = Ie;
|
|
1133
1133
|
function Ve(e, t, n, i, r) {
|
|
@@ -1141,7 +1141,7 @@ function Ve(e, t, n, i, r) {
|
|
|
1141
1141
|
function Ye(e, t) {
|
|
1142
1142
|
return ee.repeat(" ", t - e.length) + e;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function $r(e, t) {
|
|
1145
1145
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1146
1146
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1147
1147
|
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
@@ -1170,7 +1170,7 @@ function Sr(e, t) {
|
|
|
1170
1170
|
`;
|
|
1171
1171
|
return s.replace(/\n$/, "");
|
|
1172
1172
|
}
|
|
1173
|
-
var
|
|
1173
|
+
var Tr = $r, Ir = [
|
|
1174
1174
|
"kind",
|
|
1175
1175
|
"multi",
|
|
1176
1176
|
"resolve",
|
|
@@ -1181,12 +1181,12 @@ var $r = Sr, Tr = [
|
|
|
1181
1181
|
"representName",
|
|
1182
1182
|
"defaultStyle",
|
|
1183
1183
|
"styleAliases"
|
|
1184
|
-
],
|
|
1184
|
+
], Er = [
|
|
1185
1185
|
"scalar",
|
|
1186
1186
|
"sequence",
|
|
1187
1187
|
"mapping"
|
|
1188
1188
|
];
|
|
1189
|
-
function
|
|
1189
|
+
function Fr(e) {
|
|
1190
1190
|
var t = {};
|
|
1191
1191
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1192
1192
|
e[n].forEach(function(i) {
|
|
@@ -1194,18 +1194,18 @@ function Er(e) {
|
|
|
1194
1194
|
});
|
|
1195
1195
|
}), t;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function Or(e, t) {
|
|
1198
1198
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1199
|
-
if (
|
|
1199
|
+
if (Ir.indexOf(n) === -1)
|
|
1200
1200
|
throw new oe('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1201
1201
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1202
1202
|
return !0;
|
|
1203
1203
|
}, this.construct = t.construct || function(n) {
|
|
1204
1204
|
return n;
|
|
1205
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1205
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = Fr(t.styleAliases || null), Er.indexOf(this.kind) === -1)
|
|
1206
1206
|
throw new oe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1207
1207
|
}
|
|
1208
|
-
var ne =
|
|
1208
|
+
var ne = Or;
|
|
1209
1209
|
function At(e, t) {
|
|
1210
1210
|
var n = [];
|
|
1211
1211
|
return e[t].forEach(function(i) {
|
|
@@ -1215,7 +1215,7 @@ function At(e, t) {
|
|
|
1215
1215
|
}), n[r] = i;
|
|
1216
1216
|
}), n;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Lr() {
|
|
1219
1219
|
var e = {
|
|
1220
1220
|
scalar: {},
|
|
1221
1221
|
sequence: {},
|
|
@@ -1260,46 +1260,46 @@ ze.prototype.extend = function(t) {
|
|
|
1260
1260
|
throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1261
1261
|
});
|
|
1262
1262
|
var r = Object.create(ze.prototype);
|
|
1263
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = At(r, "implicit"), r.compiledExplicit = At(r, "explicit"), r.compiledTypeMap =
|
|
1263
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = At(r, "implicit"), r.compiledExplicit = At(r, "explicit"), r.compiledTypeMap = Lr(r.compiledImplicit, r.compiledExplicit), r;
|
|
1264
1264
|
};
|
|
1265
|
-
var
|
|
1265
|
+
var on = ze, ln = new ne("tag:yaml.org,2002:str", {
|
|
1266
1266
|
kind: "scalar",
|
|
1267
1267
|
construct: function(e) {
|
|
1268
1268
|
return e !== null ? e : "";
|
|
1269
1269
|
}
|
|
1270
|
-
}),
|
|
1270
|
+
}), sn = new ne("tag:yaml.org,2002:seq", {
|
|
1271
1271
|
kind: "sequence",
|
|
1272
1272
|
construct: function(e) {
|
|
1273
1273
|
return e !== null ? e : [];
|
|
1274
1274
|
}
|
|
1275
|
-
}),
|
|
1275
|
+
}), cn = new ne("tag:yaml.org,2002:map", {
|
|
1276
1276
|
kind: "mapping",
|
|
1277
1277
|
construct: function(e) {
|
|
1278
1278
|
return e !== null ? e : {};
|
|
1279
1279
|
}
|
|
1280
|
-
}),
|
|
1280
|
+
}), un = new on({
|
|
1281
1281
|
explicit: [
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1282
|
+
ln,
|
|
1283
|
+
sn,
|
|
1284
|
+
cn
|
|
1285
1285
|
]
|
|
1286
1286
|
});
|
|
1287
|
-
function
|
|
1287
|
+
function Br(e) {
|
|
1288
1288
|
if (e === null) return !0;
|
|
1289
1289
|
var t = e.length;
|
|
1290
1290
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Rr() {
|
|
1293
1293
|
return null;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Kr(e) {
|
|
1296
1296
|
return e === null;
|
|
1297
1297
|
}
|
|
1298
|
-
var
|
|
1298
|
+
var dn = new ne("tag:yaml.org,2002:null", {
|
|
1299
1299
|
kind: "scalar",
|
|
1300
|
-
resolve:
|
|
1301
|
-
construct:
|
|
1302
|
-
predicate:
|
|
1300
|
+
resolve: Br,
|
|
1301
|
+
construct: Rr,
|
|
1302
|
+
predicate: Kr,
|
|
1303
1303
|
represent: {
|
|
1304
1304
|
canonical: function() {
|
|
1305
1305
|
return "~";
|
|
@@ -1319,22 +1319,22 @@ var cn = new ne("tag:yaml.org,2002:null", {
|
|
|
1319
1319
|
},
|
|
1320
1320
|
defaultStyle: "lowercase"
|
|
1321
1321
|
});
|
|
1322
|
-
function
|
|
1322
|
+
function Nr(e) {
|
|
1323
1323
|
if (e === null) return !1;
|
|
1324
1324
|
var t = e.length;
|
|
1325
1325
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Mr(e) {
|
|
1328
1328
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function jr(e) {
|
|
1331
1331
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1332
1332
|
}
|
|
1333
|
-
var
|
|
1333
|
+
var fn = new ne("tag:yaml.org,2002:bool", {
|
|
1334
1334
|
kind: "scalar",
|
|
1335
|
-
resolve:
|
|
1336
|
-
construct:
|
|
1337
|
-
predicate:
|
|
1335
|
+
resolve: Nr,
|
|
1336
|
+
construct: Mr,
|
|
1337
|
+
predicate: jr,
|
|
1338
1338
|
represent: {
|
|
1339
1339
|
lowercase: function(e) {
|
|
1340
1340
|
return e ? "true" : "false";
|
|
@@ -1348,16 +1348,16 @@ var un = new ne("tag:yaml.org,2002:bool", {
|
|
|
1348
1348
|
},
|
|
1349
1349
|
defaultStyle: "lowercase"
|
|
1350
1350
|
});
|
|
1351
|
-
function
|
|
1351
|
+
function Dr(e) {
|
|
1352
1352
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Pr(e) {
|
|
1355
1355
|
return 48 <= e && e <= 55;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function Ur(e) {
|
|
1358
1358
|
return 48 <= e && e <= 57;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function qr(e) {
|
|
1361
1361
|
if (e === null) return !1;
|
|
1362
1362
|
var t = e.length, n = 0, i = !1, r;
|
|
1363
1363
|
if (!t) return !1;
|
|
@@ -1374,7 +1374,7 @@ function Ur(e) {
|
|
|
1374
1374
|
if (r === "x") {
|
|
1375
1375
|
for (n++; n < t; n++)
|
|
1376
1376
|
if (r = e[n], r !== "_") {
|
|
1377
|
-
if (!
|
|
1377
|
+
if (!Dr(e.charCodeAt(n))) return !1;
|
|
1378
1378
|
i = !0;
|
|
1379
1379
|
}
|
|
1380
1380
|
return i && r !== "_";
|
|
@@ -1382,7 +1382,7 @@ function Ur(e) {
|
|
|
1382
1382
|
if (r === "o") {
|
|
1383
1383
|
for (n++; n < t; n++)
|
|
1384
1384
|
if (r = e[n], r !== "_") {
|
|
1385
|
-
if (!
|
|
1385
|
+
if (!Pr(e.charCodeAt(n))) return !1;
|
|
1386
1386
|
i = !0;
|
|
1387
1387
|
}
|
|
1388
1388
|
return i && r !== "_";
|
|
@@ -1391,13 +1391,13 @@ function Ur(e) {
|
|
|
1391
1391
|
if (r === "_") return !1;
|
|
1392
1392
|
for (; n < t; n++)
|
|
1393
1393
|
if (r = e[n], r !== "_") {
|
|
1394
|
-
if (!
|
|
1394
|
+
if (!Ur(e.charCodeAt(n)))
|
|
1395
1395
|
return !1;
|
|
1396
1396
|
i = !0;
|
|
1397
1397
|
}
|
|
1398
1398
|
return !(!i || r === "_");
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Hr(e) {
|
|
1401
1401
|
var t = e, n = 1, i;
|
|
1402
1402
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), i = t[0], (i === "-" || i === "+") && (i === "-" && (n = -1), t = t.slice(1), i = t[0]), t === "0") return 0;
|
|
1403
1403
|
if (i === "0") {
|
|
@@ -1407,14 +1407,14 @@ function qr(e) {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
return n * parseInt(t, 10);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function Vr(e) {
|
|
1411
1411
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ee.isNegativeZero(e);
|
|
1412
1412
|
}
|
|
1413
|
-
var
|
|
1413
|
+
var pn = new ne("tag:yaml.org,2002:int", {
|
|
1414
1414
|
kind: "scalar",
|
|
1415
|
-
resolve:
|
|
1416
|
-
construct:
|
|
1417
|
-
predicate:
|
|
1415
|
+
resolve: qr,
|
|
1416
|
+
construct: Hr,
|
|
1417
|
+
predicate: Vr,
|
|
1418
1418
|
represent: {
|
|
1419
1419
|
binary: function(e) {
|
|
1420
1420
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1437,21 +1437,21 @@ var dn = new ne("tag:yaml.org,2002:int", {
|
|
|
1437
1437
|
decimal: [10, "dec"],
|
|
1438
1438
|
hexadecimal: [16, "hex"]
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), Yr = new RegExp(
|
|
1441
1441
|
// 2.5e4, 2.5 and integers
|
|
1442
1442
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1443
1443
|
);
|
|
1444
|
-
function
|
|
1445
|
-
return !(e === null || !
|
|
1444
|
+
function Wr(e) {
|
|
1445
|
+
return !(e === null || !Yr.test(e) || // Quick hack to not allow integers end with `_`
|
|
1446
1446
|
// Probably should update regexp & check speed
|
|
1447
1447
|
e[e.length - 1] === "_");
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Jr(e) {
|
|
1450
1450
|
var t, n;
|
|
1451
1451
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1452
1452
|
}
|
|
1453
1453
|
var Gr = /^[-+]?[0-9]+e/;
|
|
1454
|
-
function
|
|
1454
|
+
function zr(e, t) {
|
|
1455
1455
|
var n;
|
|
1456
1456
|
if (isNaN(e))
|
|
1457
1457
|
switch (t) {
|
|
@@ -1484,34 +1484,34 @@ function Jr(e, t) {
|
|
|
1484
1484
|
return "-0.0";
|
|
1485
1485
|
return n = e.toString(10), Gr.test(n) ? n.replace("e", ".e") : n;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Qr(e) {
|
|
1488
1488
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ee.isNegativeZero(e));
|
|
1489
1489
|
}
|
|
1490
|
-
var
|
|
1490
|
+
var mn = new ne("tag:yaml.org,2002:float", {
|
|
1491
1491
|
kind: "scalar",
|
|
1492
|
-
resolve:
|
|
1493
|
-
construct:
|
|
1494
|
-
predicate:
|
|
1495
|
-
represent:
|
|
1492
|
+
resolve: Wr,
|
|
1493
|
+
construct: Jr,
|
|
1494
|
+
predicate: Qr,
|
|
1495
|
+
represent: zr,
|
|
1496
1496
|
defaultStyle: "lowercase"
|
|
1497
|
-
}),
|
|
1497
|
+
}), hn = un.extend({
|
|
1498
1498
|
implicit: [
|
|
1499
|
-
cn,
|
|
1500
|
-
un,
|
|
1501
1499
|
dn,
|
|
1502
|
-
fn
|
|
1500
|
+
fn,
|
|
1501
|
+
pn,
|
|
1502
|
+
mn
|
|
1503
1503
|
]
|
|
1504
|
-
}),
|
|
1504
|
+
}), gn = hn, yn = new RegExp(
|
|
1505
1505
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1506
|
-
),
|
|
1506
|
+
), vn = new RegExp(
|
|
1507
1507
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1508
1508
|
);
|
|
1509
|
-
function Qr(e) {
|
|
1510
|
-
return e === null ? !1 : hn.exec(e) !== null || gn.exec(e) !== null;
|
|
1511
|
-
}
|
|
1512
1509
|
function Zr(e) {
|
|
1510
|
+
return e === null ? !1 : yn.exec(e) !== null || vn.exec(e) !== null;
|
|
1511
|
+
}
|
|
1512
|
+
function Xr(e) {
|
|
1513
1513
|
var t, n, i, r, o, a, s, l = 0, c = null, d, u, p;
|
|
1514
|
-
if (t =
|
|
1514
|
+
if (t = yn.exec(e), t === null && (t = vn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1515
1515
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1516
1516
|
return new Date(Date.UTC(n, i, r));
|
|
1517
1517
|
if (o = +t[4], a = +t[5], s = +t[6], t[7]) {
|
|
@@ -1521,25 +1521,25 @@ function Zr(e) {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), p = new Date(Date.UTC(n, i, r, o, a, s, l)), c && p.setTime(p.getTime() - c), p;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function ea(e) {
|
|
1525
1525
|
return e.toISOString();
|
|
1526
1526
|
}
|
|
1527
|
-
var
|
|
1527
|
+
var bn = new ne("tag:yaml.org,2002:timestamp", {
|
|
1528
1528
|
kind: "scalar",
|
|
1529
|
-
resolve:
|
|
1530
|
-
construct:
|
|
1529
|
+
resolve: Zr,
|
|
1530
|
+
construct: Xr,
|
|
1531
1531
|
instanceOf: Date,
|
|
1532
|
-
represent:
|
|
1532
|
+
represent: ea
|
|
1533
1533
|
});
|
|
1534
|
-
function
|
|
1534
|
+
function ta(e) {
|
|
1535
1535
|
return e === "<<" || e === null;
|
|
1536
1536
|
}
|
|
1537
|
-
var
|
|
1537
|
+
var xn = new ne("tag:yaml.org,2002:merge", {
|
|
1538
1538
|
kind: "scalar",
|
|
1539
|
-
resolve:
|
|
1539
|
+
resolve: ta
|
|
1540
1540
|
}), at = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1541
1541
|
\r`;
|
|
1542
|
-
function
|
|
1542
|
+
function na(e) {
|
|
1543
1543
|
if (e === null) return !1;
|
|
1544
1544
|
var t, n, i = 0, r = e.length, o = at;
|
|
1545
1545
|
for (n = 0; n < r; n++)
|
|
@@ -1549,35 +1549,35 @@ function ta(e) {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
return i % 8 === 0;
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function ia(e) {
|
|
1553
1553
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = at, a = 0, s = [];
|
|
1554
1554
|
for (t = 0; t < r; t++)
|
|
1555
1555
|
t % 4 === 0 && t && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1556
1556
|
return n = r % 4 * 6, n === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : n === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : n === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function ra(e) {
|
|
1559
1559
|
var t = "", n = 0, i, r, o = e.length, a = at;
|
|
1560
1560
|
for (i = 0; i < o; i++)
|
|
1561
1561
|
i % 3 === 0 && i && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[i];
|
|
1562
1562
|
return r = o % 3, r === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : r === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : r === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function aa(e) {
|
|
1565
1565
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1566
1566
|
}
|
|
1567
|
-
var
|
|
1567
|
+
var Cn = new ne("tag:yaml.org,2002:binary", {
|
|
1568
1568
|
kind: "scalar",
|
|
1569
|
-
resolve:
|
|
1570
|
-
construct:
|
|
1571
|
-
predicate:
|
|
1572
|
-
represent:
|
|
1573
|
-
}),
|
|
1574
|
-
function
|
|
1569
|
+
resolve: na,
|
|
1570
|
+
construct: ia,
|
|
1571
|
+
predicate: aa,
|
|
1572
|
+
represent: ra
|
|
1573
|
+
}), oa = Object.prototype.hasOwnProperty, la = Object.prototype.toString;
|
|
1574
|
+
function sa(e) {
|
|
1575
1575
|
if (e === null) return !0;
|
|
1576
1576
|
var t = [], n, i, r, o, a, s = e;
|
|
1577
1577
|
for (n = 0, i = s.length; n < i; n += 1) {
|
|
1578
|
-
if (r = s[n], a = !1,
|
|
1578
|
+
if (r = s[n], a = !1, la.call(r) !== "[object Object]") return !1;
|
|
1579
1579
|
for (o in r)
|
|
1580
|
-
if (
|
|
1580
|
+
if (oa.call(r, o))
|
|
1581
1581
|
if (!a) a = !0;
|
|
1582
1582
|
else return !1;
|
|
1583
1583
|
if (!a) return !1;
|
|
@@ -1586,62 +1586,62 @@ function la(e) {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
return !0;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function ca(e) {
|
|
1590
1590
|
return e !== null ? e : [];
|
|
1591
1591
|
}
|
|
1592
|
-
var
|
|
1592
|
+
var kn = new ne("tag:yaml.org,2002:omap", {
|
|
1593
1593
|
kind: "sequence",
|
|
1594
|
-
resolve:
|
|
1595
|
-
construct:
|
|
1596
|
-
}),
|
|
1597
|
-
function
|
|
1594
|
+
resolve: sa,
|
|
1595
|
+
construct: ca
|
|
1596
|
+
}), ua = Object.prototype.toString;
|
|
1597
|
+
function da(e) {
|
|
1598
1598
|
if (e === null) return !0;
|
|
1599
1599
|
var t, n, i, r, o, a = e;
|
|
1600
1600
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1601
|
-
if (i = a[t],
|
|
1601
|
+
if (i = a[t], ua.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1)) return !1;
|
|
1602
1602
|
o[t] = [r[0], i[r[0]]];
|
|
1603
1603
|
}
|
|
1604
1604
|
return !0;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function fa(e) {
|
|
1607
1607
|
if (e === null) return [];
|
|
1608
1608
|
var t, n, i, r, o, a = e;
|
|
1609
1609
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1610
1610
|
i = a[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
1611
1611
|
return o;
|
|
1612
1612
|
}
|
|
1613
|
-
var
|
|
1613
|
+
var An = new ne("tag:yaml.org,2002:pairs", {
|
|
1614
1614
|
kind: "sequence",
|
|
1615
|
-
resolve:
|
|
1616
|
-
construct:
|
|
1617
|
-
}),
|
|
1618
|
-
function
|
|
1615
|
+
resolve: da,
|
|
1616
|
+
construct: fa
|
|
1617
|
+
}), pa = Object.prototype.hasOwnProperty;
|
|
1618
|
+
function ma(e) {
|
|
1619
1619
|
if (e === null) return !0;
|
|
1620
1620
|
var t, n = e;
|
|
1621
1621
|
for (t in n)
|
|
1622
|
-
if (
|
|
1622
|
+
if (pa.call(n, t) && n[t] !== null)
|
|
1623
1623
|
return !1;
|
|
1624
1624
|
return !0;
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1626
|
+
function ha(e) {
|
|
1627
1627
|
return e !== null ? e : {};
|
|
1628
1628
|
}
|
|
1629
|
-
var
|
|
1629
|
+
var _n = new ne("tag:yaml.org,2002:set", {
|
|
1630
1630
|
kind: "mapping",
|
|
1631
|
-
resolve:
|
|
1632
|
-
construct:
|
|
1633
|
-
}), ot =
|
|
1631
|
+
resolve: ma,
|
|
1632
|
+
construct: ha
|
|
1633
|
+
}), ot = gn.extend({
|
|
1634
1634
|
implicit: [
|
|
1635
|
-
|
|
1636
|
-
|
|
1635
|
+
bn,
|
|
1636
|
+
xn
|
|
1637
1637
|
],
|
|
1638
1638
|
explicit: [
|
|
1639
|
-
bn,
|
|
1640
|
-
xn,
|
|
1641
1639
|
Cn,
|
|
1642
|
-
kn
|
|
1640
|
+
kn,
|
|
1641
|
+
An,
|
|
1642
|
+
_n
|
|
1643
1643
|
]
|
|
1644
|
-
}), ye = Object.prototype.hasOwnProperty, Be = 1,
|
|
1644
|
+
}), ye = Object.prototype.hasOwnProperty, Be = 1, wn = 2, Sn = 3, Re = 4, We = 1, ga = 2, _t = 3, ya = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, va = /[\x85\u2028\u2029]/, ba = /[,\[\]\{\}]/, $n = /^(?:!|!!|![a-z\-]+!)$/i, Tn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1645
1645
|
function wt(e) {
|
|
1646
1646
|
return Object.prototype.toString.call(e);
|
|
1647
1647
|
}
|
|
@@ -1657,33 +1657,41 @@ function le(e) {
|
|
|
1657
1657
|
function _e(e) {
|
|
1658
1658
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function xa(e) {
|
|
1661
1661
|
var t;
|
|
1662
1662
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function Ca(e) {
|
|
1665
1665
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1667
|
+
function ka(e) {
|
|
1668
1668
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1669
1669
|
}
|
|
1670
1670
|
function St(e) {
|
|
1671
1671
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1672
1672
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function Aa(e) {
|
|
1675
1675
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1676
1676
|
(e - 65536 >> 10) + 55296,
|
|
1677
1677
|
(e - 65536 & 1023) + 56320
|
|
1678
1678
|
);
|
|
1679
1679
|
}
|
|
1680
|
-
|
|
1680
|
+
function In(e, t, n) {
|
|
1681
|
+
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1682
|
+
configurable: !0,
|
|
1683
|
+
enumerable: !0,
|
|
1684
|
+
writable: !0,
|
|
1685
|
+
value: n
|
|
1686
|
+
}) : e[t] = n;
|
|
1687
|
+
}
|
|
1688
|
+
var En = new Array(256), Fn = new Array(256);
|
|
1681
1689
|
for (var ke = 0; ke < 256; ke++)
|
|
1682
|
-
|
|
1683
|
-
function
|
|
1690
|
+
En[ke] = St(ke) ? 1 : 0, Fn[ke] = St(ke);
|
|
1691
|
+
function _a(e, t) {
|
|
1684
1692
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || ot, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1685
1693
|
}
|
|
1686
|
-
function
|
|
1694
|
+
function On(e, t) {
|
|
1687
1695
|
var n = {
|
|
1688
1696
|
name: e.filename,
|
|
1689
1697
|
buffer: e.input.slice(0, -1),
|
|
@@ -1692,13 +1700,13 @@ function In(e, t) {
|
|
|
1692
1700
|
line: e.line,
|
|
1693
1701
|
column: e.position - e.lineStart
|
|
1694
1702
|
};
|
|
1695
|
-
return n.snippet =
|
|
1703
|
+
return n.snippet = Tr(n), new oe(t, n);
|
|
1696
1704
|
}
|
|
1697
1705
|
function E(e, t) {
|
|
1698
|
-
throw
|
|
1706
|
+
throw On(e, t);
|
|
1699
1707
|
}
|
|
1700
1708
|
function Ke(e, t) {
|
|
1701
|
-
e.onWarning && e.onWarning.call(null,
|
|
1709
|
+
e.onWarning && e.onWarning.call(null, On(e, t));
|
|
1702
1710
|
}
|
|
1703
1711
|
var $t = {
|
|
1704
1712
|
YAML: function(t, n, i) {
|
|
@@ -1707,7 +1715,7 @@ var $t = {
|
|
|
1707
1715
|
},
|
|
1708
1716
|
TAG: function(t, n, i) {
|
|
1709
1717
|
var r, o;
|
|
1710
|
-
i.length !== 2 && E(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1],
|
|
1718
|
+
i.length !== 2 && E(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], $n.test(r) || E(t, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(t.tagMap, r) && E(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Tn.test(o) || E(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1711
1719
|
try {
|
|
1712
1720
|
o = decodeURIComponent(o);
|
|
1713
1721
|
} catch {
|
|
@@ -1722,14 +1730,14 @@ function ge(e, t, n, i) {
|
|
|
1722
1730
|
if (s = e.input.slice(t, n), i)
|
|
1723
1731
|
for (r = 0, o = s.length; r < o; r += 1)
|
|
1724
1732
|
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || E(e, "expected valid JSON character");
|
|
1725
|
-
else
|
|
1733
|
+
else ya.test(s) && E(e, "the stream contains non-printable characters");
|
|
1726
1734
|
e.result += s;
|
|
1727
1735
|
}
|
|
1728
1736
|
}
|
|
1729
1737
|
function Tt(e, t, n, i) {
|
|
1730
1738
|
var r, o, a, s;
|
|
1731
1739
|
for (ee.isObject(n) || E(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, s = r.length; a < s; a += 1)
|
|
1732
|
-
o = r[a], ye.call(t, o) || (t
|
|
1740
|
+
o = r[a], ye.call(t, o) || (In(t, o, n[o]), i[o] = !0);
|
|
1733
1741
|
}
|
|
1734
1742
|
function we(e, t, n, i, r, o, a, s, l) {
|
|
1735
1743
|
var c, d;
|
|
@@ -1743,12 +1751,7 @@ function we(e, t, n, i, r, o, a, s, l) {
|
|
|
1743
1751
|
else
|
|
1744
1752
|
Tt(e, t, o, n);
|
|
1745
1753
|
else
|
|
1746
|
-
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, E(e, "duplicated mapping key")),
|
|
1747
|
-
configurable: !0,
|
|
1748
|
-
enumerable: !0,
|
|
1749
|
-
writable: !0,
|
|
1750
|
-
value: o
|
|
1751
|
-
}) : t[r] = o, delete n[r];
|
|
1754
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, E(e, "duplicated mapping key")), In(t, r, o), delete n[r];
|
|
1752
1755
|
return t;
|
|
1753
1756
|
}
|
|
1754
1757
|
function lt(e) {
|
|
@@ -1779,7 +1782,7 @@ function st(e, t) {
|
|
|
1779
1782
|
t === 1 ? e.result += " " : t > 1 && (e.result += ee.repeat(`
|
|
1780
1783
|
`, t - 1));
|
|
1781
1784
|
}
|
|
1782
|
-
function
|
|
1785
|
+
function wa(e, t, n) {
|
|
1783
1786
|
var i, r, o, a, s, l, c, d, u = e.kind, p = e.result, g;
|
|
1784
1787
|
if (g = e.input.charCodeAt(e.position), le(g) || _e(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) && (r = e.input.charCodeAt(e.position + 1), le(r) || n && _e(r)))
|
|
1785
1788
|
return !1;
|
|
@@ -1806,7 +1809,7 @@ function _a(e, t, n) {
|
|
|
1806
1809
|
}
|
|
1807
1810
|
return ge(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1808
1811
|
}
|
|
1809
|
-
function
|
|
1812
|
+
function Sa(e, t) {
|
|
1810
1813
|
var n, i, r;
|
|
1811
1814
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1812
1815
|
return !1;
|
|
@@ -1819,7 +1822,7 @@ function wa(e, t) {
|
|
|
1819
1822
|
else de(n) ? (ge(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && qe(e) ? E(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1820
1823
|
E(e, "unexpected end of the stream within a single quoted scalar");
|
|
1821
1824
|
}
|
|
1822
|
-
function
|
|
1825
|
+
function $a(e, t) {
|
|
1823
1826
|
var n, i, r, o, a, s;
|
|
1824
1827
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1825
1828
|
return !1;
|
|
@@ -1829,12 +1832,12 @@ function Sa(e, t) {
|
|
|
1829
1832
|
if (s === 92) {
|
|
1830
1833
|
if (ge(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), de(s))
|
|
1831
1834
|
Z(e, !1, t);
|
|
1832
|
-
else if (s < 256 &&
|
|
1833
|
-
e.result +=
|
|
1834
|
-
else if ((a =
|
|
1835
|
+
else if (s < 256 && En[s])
|
|
1836
|
+
e.result += Fn[s], e.position++;
|
|
1837
|
+
else if ((a = Ca(s)) > 0) {
|
|
1835
1838
|
for (r = a, o = 0; r > 0; r--)
|
|
1836
|
-
s = e.input.charCodeAt(++e.position), (a =
|
|
1837
|
-
e.result +=
|
|
1839
|
+
s = e.input.charCodeAt(++e.position), (a = xa(s)) >= 0 ? o = (o << 4) + a : E(e, "expected hexadecimal character");
|
|
1840
|
+
e.result += Aa(o), e.position++;
|
|
1838
1841
|
} else
|
|
1839
1842
|
E(e, "unknown escape sequence");
|
|
1840
1843
|
n = i = e.position;
|
|
@@ -1842,7 +1845,7 @@ function Sa(e, t) {
|
|
|
1842
1845
|
}
|
|
1843
1846
|
E(e, "unexpected end of the stream within a double quoted scalar");
|
|
1844
1847
|
}
|
|
1845
|
-
function
|
|
1848
|
+
function Ta(e, t) {
|
|
1846
1849
|
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p, g, h = /* @__PURE__ */ Object.create(null), x, y, k, C;
|
|
1847
1850
|
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
1848
1851
|
d = 93, g = !1, s = [];
|
|
@@ -1857,7 +1860,7 @@ function $a(e, t) {
|
|
|
1857
1860
|
}
|
|
1858
1861
|
E(e, "unexpected end of the stream within a flow collection");
|
|
1859
1862
|
}
|
|
1860
|
-
function
|
|
1863
|
+
function Ia(e, t) {
|
|
1861
1864
|
var n, i, r = We, o = !1, a = !1, s = t, l = 0, c = !1, d, u;
|
|
1862
1865
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1863
1866
|
i = !1;
|
|
@@ -1867,8 +1870,8 @@ function Ta(e, t) {
|
|
|
1867
1870
|
return !1;
|
|
1868
1871
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1869
1872
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1870
|
-
We === r ? r = u === 43 ? _t :
|
|
1871
|
-
else if ((d =
|
|
1873
|
+
We === r ? r = u === 43 ? _t : ga : E(e, "repeat of a chomping mode identifier");
|
|
1874
|
+
else if ((d = ka(u)) >= 0)
|
|
1872
1875
|
d === 0 ? E(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? E(e, "repeat of an indentation width identifier") : (s = t + d - 1, a = !0);
|
|
1873
1876
|
else
|
|
1874
1877
|
break;
|
|
@@ -1912,21 +1915,21 @@ function It(e, t) {
|
|
|
1912
1915
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
1913
1916
|
continue;
|
|
1914
1917
|
}
|
|
1915
|
-
if (n = e.line, $e(e, t,
|
|
1918
|
+
if (n = e.line, $e(e, t, Sn, !1, !0), o.push(e.result), Z(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && l !== 0)
|
|
1916
1919
|
E(e, "bad indentation of a sequence entry");
|
|
1917
1920
|
else if (e.lineIndent < t)
|
|
1918
1921
|
break;
|
|
1919
1922
|
}
|
|
1920
1923
|
return s ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1921
1924
|
}
|
|
1922
|
-
function
|
|
1925
|
+
function Ea(e, t, n) {
|
|
1923
1926
|
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), g = null, h = null, x = null, y = !1, k = !1, C;
|
|
1924
1927
|
if (e.firstTabInLine !== -1) return !1;
|
|
1925
1928
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
1926
1929
|
if (!y && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && le(i))
|
|
1927
1930
|
C === 63 ? (y && (we(e, u, p, g, h, null, a, s, l), g = h = x = null), k = !0, y = !0, r = !0) : y ? (y = !1, r = !0) : E(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = i;
|
|
1928
1931
|
else {
|
|
1929
|
-
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n,
|
|
1932
|
+
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n, wn, !1, !0))
|
|
1930
1933
|
break;
|
|
1931
1934
|
if (e.line === o) {
|
|
1932
1935
|
for (C = e.input.charCodeAt(e.position); ve(C); )
|
|
@@ -1949,7 +1952,7 @@ function Ia(e, t, n) {
|
|
|
1949
1952
|
}
|
|
1950
1953
|
return y && we(e, u, p, g, h, null, a, s, l), k && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), k;
|
|
1951
1954
|
}
|
|
1952
|
-
function
|
|
1955
|
+
function Fa(e) {
|
|
1953
1956
|
var t, n = !1, i = !1, r, o, a;
|
|
1954
1957
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1955
1958
|
if (e.tag !== null && E(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
@@ -1959,10 +1962,10 @@ function Ea(e) {
|
|
|
1959
1962
|
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : E(e, "unexpected end of the stream within a verbatim tag");
|
|
1960
1963
|
} else {
|
|
1961
1964
|
for (; a !== 0 && !le(a); )
|
|
1962
|
-
a === 33 && (i ? E(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1),
|
|
1963
|
-
o = e.input.slice(t, e.position),
|
|
1965
|
+
a === 33 && (i ? E(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), $n.test(r) || E(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1966
|
+
o = e.input.slice(t, e.position), ba.test(o) && E(e, "tag suffix cannot contain flow indicator characters");
|
|
1964
1967
|
}
|
|
1965
|
-
o && !
|
|
1968
|
+
o && !Tn.test(o) && E(e, "tag name cannot contain such characters: " + o);
|
|
1966
1969
|
try {
|
|
1967
1970
|
o = decodeURIComponent(o);
|
|
1968
1971
|
} catch {
|
|
@@ -1970,14 +1973,14 @@ function Ea(e) {
|
|
|
1970
1973
|
}
|
|
1971
1974
|
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : E(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1972
1975
|
}
|
|
1973
|
-
function
|
|
1976
|
+
function Oa(e) {
|
|
1974
1977
|
var t, n;
|
|
1975
1978
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1976
1979
|
for (e.anchor !== null && E(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !le(n) && !_e(n); )
|
|
1977
1980
|
n = e.input.charCodeAt(++e.position);
|
|
1978
1981
|
return e.position === t && E(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1979
1982
|
}
|
|
1980
|
-
function
|
|
1983
|
+
function La(e) {
|
|
1981
1984
|
var t, n, i;
|
|
1982
1985
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
1983
1986
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !le(i) && !_e(i); )
|
|
@@ -1986,10 +1989,10 @@ function Oa(e) {
|
|
|
1986
1989
|
}
|
|
1987
1990
|
function $e(e, t, n, i, r) {
|
|
1988
1991
|
var o, a, s, l = 1, c = !1, d = !1, u, p, g, h, x, y;
|
|
1989
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s = Re === n ||
|
|
1990
|
-
for (;
|
|
1992
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s = Re === n || Sn === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)), l === 1)
|
|
1993
|
+
for (; Fa(e) || Oa(e); )
|
|
1991
1994
|
Z(e, !0, -1) ? (c = !0, s = o, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)) : s = !1;
|
|
1992
|
-
if (s && (s = c || r), (l === 1 || Re === n) && (Be === n ||
|
|
1995
|
+
if (s && (s = c || r), (l === 1 || Re === n) && (Be === n || wn === n ? x = t : x = t + 1, y = e.position - e.lineStart, l === 1 ? s && (It(e, y) || Ea(e, y, x)) || Ta(e, x) ? d = !0 : (a && Ia(e, x) || Sa(e, x) || $a(e, x) ? d = !0 : La(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && E(e, "alias node should not have any properties")) : wa(e, x, Be === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && It(e, y))), e.tag === null)
|
|
1993
1996
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1994
1997
|
else if (e.tag === "?") {
|
|
1995
1998
|
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
@@ -2010,7 +2013,7 @@ function $e(e, t, n, i, r) {
|
|
|
2010
2013
|
}
|
|
2011
2014
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2012
2015
|
}
|
|
2013
|
-
function
|
|
2016
|
+
function Ba(e) {
|
|
2014
2017
|
var t = e.position, n, i, r, o = !1, a;
|
|
2015
2018
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (Z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2016
2019
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !le(a); )
|
|
@@ -2031,7 +2034,7 @@ function La(e) {
|
|
|
2031
2034
|
}
|
|
2032
2035
|
a !== 0 && lt(e), ye.call($t, i) ? $t[i](e, i, r) : Ke(e, 'unknown document directive "' + i + '"');
|
|
2033
2036
|
}
|
|
2034
|
-
if (Z(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, Z(e, !0, -1)) : o && E(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks &&
|
|
2037
|
+
if (Z(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, Z(e, !0, -1)) : o && E(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks && va.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && qe(e)) {
|
|
2035
2038
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2036
2039
|
return;
|
|
2037
2040
|
}
|
|
@@ -2040,36 +2043,36 @@ function La(e) {
|
|
|
2040
2043
|
else
|
|
2041
2044
|
return;
|
|
2042
2045
|
}
|
|
2043
|
-
function
|
|
2046
|
+
function Ln(e, t) {
|
|
2044
2047
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2045
2048
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2046
|
-
var n = new
|
|
2049
|
+
var n = new _a(e, t), i = e.indexOf("\0");
|
|
2047
2050
|
for (i !== -1 && (n.position = i, E(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2048
2051
|
n.lineIndent += 1, n.position += 1;
|
|
2049
2052
|
for (; n.position < n.length - 1; )
|
|
2050
|
-
|
|
2053
|
+
Ba(n);
|
|
2051
2054
|
return n.documents;
|
|
2052
2055
|
}
|
|
2053
|
-
function
|
|
2056
|
+
function Ra(e, t, n) {
|
|
2054
2057
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2055
|
-
var i =
|
|
2058
|
+
var i = Ln(e, n);
|
|
2056
2059
|
if (typeof t != "function")
|
|
2057
2060
|
return i;
|
|
2058
2061
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
2059
2062
|
t(i[r]);
|
|
2060
2063
|
}
|
|
2061
|
-
function
|
|
2062
|
-
var n =
|
|
2064
|
+
function Ka(e, t) {
|
|
2065
|
+
var n = Ln(e, t);
|
|
2063
2066
|
if (n.length !== 0) {
|
|
2064
2067
|
if (n.length === 1)
|
|
2065
2068
|
return n[0];
|
|
2066
2069
|
throw new oe("expected a single document in the stream, but found more");
|
|
2067
2070
|
}
|
|
2068
2071
|
}
|
|
2069
|
-
var
|
|
2070
|
-
loadAll:
|
|
2071
|
-
load:
|
|
2072
|
-
},
|
|
2072
|
+
var Na = Ra, Ma = Ka, Bn = {
|
|
2073
|
+
loadAll: Na,
|
|
2074
|
+
load: Ma
|
|
2075
|
+
}, Rn = Object.prototype.toString, Kn = Object.prototype.hasOwnProperty, ct = 65279, ja = 9, Ee = 10, Da = 13, Pa = 32, Ua = 33, qa = 34, Qe = 35, Ha = 37, Va = 38, Ya = 39, Wa = 42, Nn = 44, Ja = 45, Ne = 58, Ga = 61, za = 62, Qa = 63, Za = 64, Mn = 91, jn = 93, Xa = 96, Dn = 123, eo = 124, Pn = 125, re = {};
|
|
2073
2076
|
re[0] = "\\0";
|
|
2074
2077
|
re[7] = "\\a";
|
|
2075
2078
|
re[8] = "\\b";
|
|
@@ -2085,7 +2088,7 @@ re[133] = "\\N";
|
|
|
2085
2088
|
re[160] = "\\_";
|
|
2086
2089
|
re[8232] = "\\L";
|
|
2087
2090
|
re[8233] = "\\P";
|
|
2088
|
-
var
|
|
2091
|
+
var to = [
|
|
2089
2092
|
"y",
|
|
2090
2093
|
"Y",
|
|
2091
2094
|
"yes",
|
|
@@ -2102,15 +2105,15 @@ var eo = [
|
|
|
2102
2105
|
"off",
|
|
2103
2106
|
"Off",
|
|
2104
2107
|
"OFF"
|
|
2105
|
-
],
|
|
2106
|
-
function
|
|
2108
|
+
], no = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2109
|
+
function io(e, t) {
|
|
2107
2110
|
var n, i, r, o, a, s, l;
|
|
2108
2111
|
if (t === null) return {};
|
|
2109
2112
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
2110
|
-
a = i[r], s = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l &&
|
|
2113
|
+
a = i[r], s = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l && Kn.call(l.styleAliases, s) && (s = l.styleAliases[s]), n[a] = s;
|
|
2111
2114
|
return n;
|
|
2112
2115
|
}
|
|
2113
|
-
function
|
|
2116
|
+
function ro(e) {
|
|
2114
2117
|
var t, n, i;
|
|
2115
2118
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2116
2119
|
n = "x", i = 2;
|
|
@@ -2122,9 +2125,9 @@ function io(e) {
|
|
|
2122
2125
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2123
2126
|
return "\\" + n + ee.repeat("0", i - t.length) + t;
|
|
2124
2127
|
}
|
|
2125
|
-
var
|
|
2126
|
-
function
|
|
2127
|
-
this.schema = e.schema || ot, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ee.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2128
|
+
var ao = 1, Fe = 2;
|
|
2129
|
+
function oo(e) {
|
|
2130
|
+
this.schema = e.schema || ot, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ee.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = io(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 === '"' ? Fe : ao, 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;
|
|
2128
2131
|
}
|
|
2129
2132
|
function Et(e, t) {
|
|
2130
2133
|
for (var n = ee.repeat(" ", t), i = 0, r = -1, o = "", a, s = e.length; i < s; )
|
|
@@ -2137,7 +2140,7 @@ function Ze(e, t) {
|
|
|
2137
2140
|
return `
|
|
2138
2141
|
` + ee.repeat(" ", e.indent * t);
|
|
2139
2142
|
}
|
|
2140
|
-
function
|
|
2143
|
+
function lo(e, t) {
|
|
2141
2144
|
var n, i, r;
|
|
2142
2145
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
2143
2146
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
@@ -2145,13 +2148,13 @@ function oo(e, t) {
|
|
|
2145
2148
|
return !1;
|
|
2146
2149
|
}
|
|
2147
2150
|
function Me(e) {
|
|
2148
|
-
return e ===
|
|
2151
|
+
return e === Pa || e === ja;
|
|
2149
2152
|
}
|
|
2150
2153
|
function Oe(e) {
|
|
2151
2154
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ct || 65536 <= e && e <= 1114111;
|
|
2152
2155
|
}
|
|
2153
2156
|
function Ft(e) {
|
|
2154
|
-
return Oe(e) && e !== ct && e !==
|
|
2157
|
+
return Oe(e) && e !== ct && e !== Da && e !== Ee;
|
|
2155
2158
|
}
|
|
2156
2159
|
function Ot(e, t, n) {
|
|
2157
2160
|
var i = Ft(e), r = i && !Me(e);
|
|
@@ -2160,26 +2163,26 @@ function Ot(e, t, n) {
|
|
|
2160
2163
|
(n ? (
|
|
2161
2164
|
// c = flow-in
|
|
2162
2165
|
i
|
|
2163
|
-
) : i && e !==
|
|
2166
|
+
) : i && e !== Nn && e !== Mn && e !== jn && e !== Dn && e !== Pn) && e !== Qe && !(t === Ne && !r) || Ft(t) && !Me(t) && e === Qe || t === Ne && r
|
|
2164
2167
|
);
|
|
2165
2168
|
}
|
|
2166
|
-
function lo(e) {
|
|
2167
|
-
return Oe(e) && e !== ct && !Me(e) && e !== Wa && e !== za && e !== Ne && e !== Bn && e !== Rn && e !== Kn && e !== Nn && e !== Mn && e !== Qe && e !== Ha && e !== Ya && e !== Pa && e !== Xa && e !== Ga && e !== Ja && e !== Va && e !== Ua && e !== qa && e !== Qa && e !== Za;
|
|
2168
|
-
}
|
|
2169
2169
|
function so(e) {
|
|
2170
|
+
return Oe(e) && e !== ct && !Me(e) && e !== Ja && e !== Qa && e !== Ne && e !== Nn && e !== Mn && e !== jn && e !== Dn && e !== Pn && e !== Qe && e !== Va && e !== Wa && e !== Ua && e !== eo && e !== Ga && e !== za && e !== Ya && e !== qa && e !== Ha && e !== Za && e !== Xa;
|
|
2171
|
+
}
|
|
2172
|
+
function co(e) {
|
|
2170
2173
|
return !Me(e) && e !== Ne;
|
|
2171
2174
|
}
|
|
2172
2175
|
function Te(e, t) {
|
|
2173
2176
|
var n = e.charCodeAt(t), i;
|
|
2174
2177
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
2175
2178
|
}
|
|
2176
|
-
function
|
|
2179
|
+
function Un(e) {
|
|
2177
2180
|
var t = /^\n* /;
|
|
2178
2181
|
return t.test(e);
|
|
2179
2182
|
}
|
|
2180
|
-
var
|
|
2181
|
-
function
|
|
2182
|
-
var l, c = 0, d = null, u = !1, p = !1, g = i !== -1, h = -1, x =
|
|
2183
|
+
var qn = 1, Xe = 2, Hn = 3, Vn = 4, Ae = 5;
|
|
2184
|
+
function uo(e, t, n, i, r, o, a, s) {
|
|
2185
|
+
var l, c = 0, d = null, u = !1, p = !1, g = i !== -1, h = -1, x = so(Te(e, 0)) && co(Te(e, e.length - 1));
|
|
2183
2186
|
if (t || a)
|
|
2184
2187
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2185
2188
|
if (c = Te(e, l), !Oe(c))
|
|
@@ -2197,19 +2200,19 @@ function co(e, t, n, i, r, o, a, s) {
|
|
|
2197
2200
|
}
|
|
2198
2201
|
p = p || g && l - h - 1 > i && e[h + 1] !== " ";
|
|
2199
2202
|
}
|
|
2200
|
-
return !u && !p ? x && !a && !r(e) ?
|
|
2203
|
+
return !u && !p ? x && !a && !r(e) ? qn : o === Fe ? Ae : Xe : n > 9 && Un(e) ? Ae : a ? o === Fe ? Ae : Xe : p ? Vn : Hn;
|
|
2201
2204
|
}
|
|
2202
|
-
function
|
|
2205
|
+
function fo(e, t, n, i, r) {
|
|
2203
2206
|
e.dump = function() {
|
|
2204
2207
|
if (t.length === 0)
|
|
2205
2208
|
return e.quotingType === Fe ? '""' : "''";
|
|
2206
|
-
if (!e.noCompatMode && (
|
|
2209
|
+
if (!e.noCompatMode && (to.indexOf(t) !== -1 || no.test(t)))
|
|
2207
2210
|
return e.quotingType === Fe ? '"' + t + '"' : "'" + t + "'";
|
|
2208
2211
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), s = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2209
2212
|
function l(c) {
|
|
2210
|
-
return
|
|
2213
|
+
return lo(e, c);
|
|
2211
2214
|
}
|
|
2212
|
-
switch (
|
|
2215
|
+
switch (uo(
|
|
2213
2216
|
t,
|
|
2214
2217
|
s,
|
|
2215
2218
|
e.indent,
|
|
@@ -2219,23 +2222,23 @@ function uo(e, t, n, i, r) {
|
|
|
2219
2222
|
e.forceQuotes && !i,
|
|
2220
2223
|
r
|
|
2221
2224
|
)) {
|
|
2222
|
-
case
|
|
2225
|
+
case qn:
|
|
2223
2226
|
return t;
|
|
2224
2227
|
case Xe:
|
|
2225
2228
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2226
|
-
case
|
|
2229
|
+
case Hn:
|
|
2227
2230
|
return "|" + Lt(t, e.indent) + Bt(Et(t, o));
|
|
2228
|
-
case
|
|
2229
|
-
return ">" + Lt(t, e.indent) + Bt(Et(
|
|
2231
|
+
case Vn:
|
|
2232
|
+
return ">" + Lt(t, e.indent) + Bt(Et(po(t, a), o));
|
|
2230
2233
|
case Ae:
|
|
2231
|
-
return '"' +
|
|
2234
|
+
return '"' + mo(t) + '"';
|
|
2232
2235
|
default:
|
|
2233
2236
|
throw new oe("impossible error: invalid scalar style");
|
|
2234
2237
|
}
|
|
2235
2238
|
}();
|
|
2236
2239
|
}
|
|
2237
2240
|
function Lt(e, t) {
|
|
2238
|
-
var n =
|
|
2241
|
+
var n = Un(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
2239
2242
|
`, r = i && (e[e.length - 2] === `
|
|
2240
2243
|
` || e === `
|
|
2241
2244
|
`), o = r ? "+" : i ? "" : "-";
|
|
@@ -2246,7 +2249,7 @@ function Bt(e) {
|
|
|
2246
2249
|
return e[e.length - 1] === `
|
|
2247
2250
|
` ? e.slice(0, -1) : e;
|
|
2248
2251
|
}
|
|
2249
|
-
function
|
|
2252
|
+
function po(e, t) {
|
|
2250
2253
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2251
2254
|
var c = e.indexOf(`
|
|
2252
2255
|
`);
|
|
@@ -2268,12 +2271,12 @@ function Rt(e, t) {
|
|
|
2268
2271
|
`, e.length - r > t && a > r ? l += e.slice(r, a) + `
|
|
2269
2272
|
` + e.slice(a + 1) : l += e.slice(r), l.slice(1);
|
|
2270
2273
|
}
|
|
2271
|
-
function
|
|
2274
|
+
function mo(e) {
|
|
2272
2275
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2273
|
-
n = Te(e, r), i = re[n], !i && Oe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i ||
|
|
2276
|
+
n = Te(e, r), i = re[n], !i && Oe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || ro(n);
|
|
2274
2277
|
return t;
|
|
2275
2278
|
}
|
|
2276
|
-
function
|
|
2279
|
+
function ho(e, t, n) {
|
|
2277
2280
|
var i = "", r = e.tag, o, a, s;
|
|
2278
2281
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2279
2282
|
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (pe(e, t, s, !1, !1) || typeof s > "u" && pe(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
@@ -2285,13 +2288,13 @@ function Kt(e, t, n, i) {
|
|
|
2285
2288
|
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (pe(e, t + 1, l, !0, !0, !1, !0) || typeof l > "u" && pe(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += Ze(e, t)), e.dump && Ee === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2286
2289
|
e.tag = o, e.dump = r || "[]";
|
|
2287
2290
|
}
|
|
2288
|
-
function
|
|
2291
|
+
function go(e, t, n) {
|
|
2289
2292
|
var i = "", r = e.tag, o = Object.keys(n), a, s, l, c, d;
|
|
2290
2293
|
for (a = 0, s = o.length; a < s; a += 1)
|
|
2291
2294
|
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[a], c = n[l], e.replacer && (c = e.replacer.call(n, l, c)), pe(e, t, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), pe(e, t, c, !1, !1) && (d += e.dump, i += d));
|
|
2292
2295
|
e.tag = r, e.dump = "{" + i + "}";
|
|
2293
2296
|
}
|
|
2294
|
-
function
|
|
2297
|
+
function yo(e, t, n, i) {
|
|
2295
2298
|
var r = "", o = e.tag, a = Object.keys(n), s, l, c, d, u, p;
|
|
2296
2299
|
if (e.sortKeys === !0)
|
|
2297
2300
|
a.sort();
|
|
@@ -2308,9 +2311,9 @@ function Nt(e, t, n) {
|
|
|
2308
2311
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2309
2312
|
if (s = r[o], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
|
|
2310
2313
|
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2311
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2314
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Rn.call(s.represent) === "[object Function]")
|
|
2312
2315
|
i = s.represent(t, l);
|
|
2313
|
-
else if (
|
|
2316
|
+
else if (Kn.call(s.represent, l))
|
|
2314
2317
|
i = s.represent[l](t, l);
|
|
2315
2318
|
else
|
|
2316
2319
|
throw new oe("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2322,18 +2325,18 @@ function Nt(e, t, n) {
|
|
|
2322
2325
|
}
|
|
2323
2326
|
function pe(e, t, n, i, r, o, a) {
|
|
2324
2327
|
e.tag = null, e.dump = n, Nt(e, n, !1) || Nt(e, n, !0);
|
|
2325
|
-
var s =
|
|
2328
|
+
var s = Rn.call(e.dump), l = i, c;
|
|
2326
2329
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2327
2330
|
var d = s === "[object Object]" || s === "[object Array]", u, p;
|
|
2328
2331
|
if (d && (u = e.duplicates.indexOf(n), p = u !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (r = !1), p && e.usedDuplicates[u])
|
|
2329
2332
|
e.dump = "*ref_" + u;
|
|
2330
2333
|
else {
|
|
2331
2334
|
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2332
|
-
i && Object.keys(e.dump).length !== 0 ? (
|
|
2335
|
+
i && Object.keys(e.dump).length !== 0 ? (yo(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (go(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2333
2336
|
else if (s === "[object Array]")
|
|
2334
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Kt(e, t - 1, e.dump, r) : Kt(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2337
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Kt(e, t - 1, e.dump, r) : Kt(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (ho(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2335
2338
|
else if (s === "[object String]")
|
|
2336
|
-
e.tag !== "?" &&
|
|
2339
|
+
e.tag !== "?" && fo(e, e.dump, t, o, l);
|
|
2337
2340
|
else {
|
|
2338
2341
|
if (s === "[object Undefined]")
|
|
2339
2342
|
return !1;
|
|
@@ -2346,7 +2349,7 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2346
2349
|
}
|
|
2347
2350
|
return !0;
|
|
2348
2351
|
}
|
|
2349
|
-
function
|
|
2352
|
+
function vo(e, t) {
|
|
2350
2353
|
var n = [], i = [], r, o;
|
|
2351
2354
|
for (et(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2352
2355
|
t.duplicates.push(n[i[r]]);
|
|
@@ -2364,53 +2367,53 @@ function et(e, t, n) {
|
|
|
2364
2367
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2365
2368
|
et(e[i[r]], t, n);
|
|
2366
2369
|
}
|
|
2367
|
-
function
|
|
2370
|
+
function bo(e, t) {
|
|
2368
2371
|
t = t || {};
|
|
2369
|
-
var n = new
|
|
2370
|
-
n.noRefs ||
|
|
2372
|
+
var n = new oo(t);
|
|
2373
|
+
n.noRefs || vo(e, n);
|
|
2371
2374
|
var i = e;
|
|
2372
2375
|
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), pe(n, 0, i, !0, !0) ? n.dump + `
|
|
2373
2376
|
` : "";
|
|
2374
2377
|
}
|
|
2375
|
-
var
|
|
2376
|
-
dump:
|
|
2378
|
+
var xo = bo, Co = {
|
|
2379
|
+
dump: xo
|
|
2377
2380
|
};
|
|
2378
2381
|
function ut(e, t) {
|
|
2379
2382
|
return function() {
|
|
2380
2383
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2381
2384
|
};
|
|
2382
2385
|
}
|
|
2383
|
-
var
|
|
2384
|
-
binary:
|
|
2385
|
-
float:
|
|
2386
|
-
map:
|
|
2387
|
-
null:
|
|
2388
|
-
pairs:
|
|
2389
|
-
set:
|
|
2390
|
-
timestamp:
|
|
2391
|
-
bool:
|
|
2392
|
-
int:
|
|
2393
|
-
merge:
|
|
2394
|
-
omap:
|
|
2395
|
-
seq:
|
|
2396
|
-
str:
|
|
2397
|
-
},
|
|
2398
|
-
Type:
|
|
2399
|
-
Schema:
|
|
2400
|
-
FAILSAFE_SCHEMA:
|
|
2401
|
-
JSON_SCHEMA:
|
|
2402
|
-
CORE_SCHEMA:
|
|
2403
|
-
DEFAULT_SCHEMA:
|
|
2404
|
-
load:
|
|
2405
|
-
loadAll:
|
|
2406
|
-
dump:
|
|
2407
|
-
YAMLException:
|
|
2408
|
-
types:
|
|
2409
|
-
safeLoad:
|
|
2410
|
-
safeLoadAll:
|
|
2411
|
-
safeDump:
|
|
2386
|
+
var ko = ne, Ao = on, _o = un, wo = hn, So = gn, $o = ot, To = Bn.load, Io = Bn.loadAll, Eo = Co.dump, Fo = oe, Oo = {
|
|
2387
|
+
binary: Cn,
|
|
2388
|
+
float: mn,
|
|
2389
|
+
map: cn,
|
|
2390
|
+
null: dn,
|
|
2391
|
+
pairs: An,
|
|
2392
|
+
set: _n,
|
|
2393
|
+
timestamp: bn,
|
|
2394
|
+
bool: fn,
|
|
2395
|
+
int: pn,
|
|
2396
|
+
merge: xn,
|
|
2397
|
+
omap: kn,
|
|
2398
|
+
seq: sn,
|
|
2399
|
+
str: ln
|
|
2400
|
+
}, Lo = ut("safeLoad", "load"), Bo = ut("safeLoadAll", "loadAll"), Ro = ut("safeDump", "dump"), Ko = {
|
|
2401
|
+
Type: ko,
|
|
2402
|
+
Schema: Ao,
|
|
2403
|
+
FAILSAFE_SCHEMA: _o,
|
|
2404
|
+
JSON_SCHEMA: wo,
|
|
2405
|
+
CORE_SCHEMA: So,
|
|
2406
|
+
DEFAULT_SCHEMA: $o,
|
|
2407
|
+
load: To,
|
|
2408
|
+
loadAll: Io,
|
|
2409
|
+
dump: Eo,
|
|
2410
|
+
YAMLException: Fo,
|
|
2411
|
+
types: Oo,
|
|
2412
|
+
safeLoad: Lo,
|
|
2413
|
+
safeLoadAll: Bo,
|
|
2414
|
+
safeDump: Ro
|
|
2412
2415
|
};
|
|
2413
|
-
const
|
|
2416
|
+
const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */ z({
|
|
2414
2417
|
__name: "YamlCodeBlock",
|
|
2415
2418
|
props: {
|
|
2416
2419
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2422,12 +2425,12 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2422
2425
|
setup(e) {
|
|
2423
2426
|
const t = e, n = F(() => {
|
|
2424
2427
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2425
|
-
return Object.keys(i).length === 0 && i.constructor === Object ? "" :
|
|
2428
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Ko.dump(i).trim();
|
|
2426
2429
|
});
|
|
2427
2430
|
return (i, r) => {
|
|
2428
2431
|
const o = P("KCodeBlock");
|
|
2429
|
-
return m(), S("div",
|
|
2430
|
-
t.entityRecord ? (m(),
|
|
2432
|
+
return m(), S("div", No, [
|
|
2433
|
+
t.entityRecord ? (m(), D(o, {
|
|
2431
2434
|
key: 0,
|
|
2432
2435
|
id: "yaml-codeblock",
|
|
2433
2436
|
code: n.value,
|
|
@@ -2437,7 +2440,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2437
2440
|
]);
|
|
2438
2441
|
};
|
|
2439
2442
|
}
|
|
2440
|
-
}),
|
|
2443
|
+
}), Mo = { class: "terraform-config config-card-code-block" }, ie = " ", Wn = /* @__PURE__ */ z({
|
|
2441
2444
|
__name: "TerraformCodeBlock",
|
|
2442
2445
|
props: {
|
|
2443
2446
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2461,7 +2464,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2461
2464
|
}
|
|
2462
2465
|
},
|
|
2463
2466
|
setup(e) {
|
|
2464
|
-
const t = e, n = F(() =>
|
|
2467
|
+
const t = e, n = F(() => ui.includes(t.entityType)), i = (l, c) => {
|
|
2465
2468
|
const d = ie;
|
|
2466
2469
|
let u = "";
|
|
2467
2470
|
return typeof l == "string" ? u += `${d}${c} = "${l}"
|
|
@@ -2533,8 +2536,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2533
2536
|
});
|
|
2534
2537
|
return (l, c) => {
|
|
2535
2538
|
const d = P("KCodeBlock");
|
|
2536
|
-
return m(), S("div",
|
|
2537
|
-
t.entityRecord ? (m(),
|
|
2539
|
+
return m(), S("div", Mo, [
|
|
2540
|
+
t.entityRecord ? (m(), D(d, {
|
|
2538
2541
|
key: 0,
|
|
2539
2542
|
id: "terraform-codeblock",
|
|
2540
2543
|
code: s.value,
|
|
@@ -2544,13 +2547,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2544
2547
|
]);
|
|
2545
2548
|
};
|
|
2546
2549
|
}
|
|
2547
|
-
}),
|
|
2550
|
+
}), jo = {
|
|
2548
2551
|
key: 0,
|
|
2549
2552
|
class: "config-card-display-form"
|
|
2550
|
-
},
|
|
2553
|
+
}, Do = ["data-testid"], Po = {
|
|
2551
2554
|
key: 0,
|
|
2552
2555
|
class: "config-card-prop-section-title"
|
|
2553
|
-
},
|
|
2556
|
+
}, Uo = /* @__PURE__ */ z({
|
|
2554
2557
|
__name: "ConfigCardDisplay",
|
|
2555
2558
|
props: {
|
|
2556
2559
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2607,7 +2610,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2607
2610
|
}
|
|
2608
2611
|
},
|
|
2609
2612
|
setup(e) {
|
|
2610
|
-
const t = e, n = De(), { i18n: { t: i } } =
|
|
2613
|
+
const t = e, n = De(), { i18n: { t: i } } = W.useI18n(), r = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), o = F(() => {
|
|
2611
2614
|
if (!t.record)
|
|
2612
2615
|
return t.record;
|
|
2613
2616
|
let s = t.record;
|
|
@@ -2616,23 +2619,23 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2616
2619
|
return delete l.created_at, delete l.updated_at, l;
|
|
2617
2620
|
}), a = F(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2618
2621
|
return (s, l) => (m(), S(ue, null, [
|
|
2619
|
-
e.format === "structured" ? (m(), S("div",
|
|
2622
|
+
e.format === "structured" ? (m(), S("div", jo, [
|
|
2620
2623
|
(m(!0), S(ue, null, ce(e.propListTypes, (c) => (m(), S("div", {
|
|
2621
2624
|
key: `config-card-details-${c}-props`,
|
|
2622
2625
|
class: fe(`config-card-details-${c}-props`),
|
|
2623
2626
|
"data-testid": `config-card-details-${c}-props`
|
|
2624
2627
|
}, [
|
|
2625
|
-
c !== "basic" ? (m(), S("div",
|
|
2626
|
-
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) =>
|
|
2628
|
+
c !== "basic" ? (m(), S("div", Po, L(c === "advanced" ? $(i)("baseConfigCard.sections.advanced") : c === "plugin" ? $(i)("baseConfigCard.sections.plugin") : $(i)("baseConfigCard.sections.policy")), 1)) : N("", !0),
|
|
2629
|
+
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => j(s.$slots, `config-card-item-${d.key}`, {
|
|
2627
2630
|
key: d.key,
|
|
2628
2631
|
item: d
|
|
2629
2632
|
}, () => [
|
|
2630
|
-
M(
|
|
2631
|
-
label:
|
|
2632
|
-
|
|
2633
|
+
M(tn, { item: d }, Se({
|
|
2634
|
+
label: _(() => [
|
|
2635
|
+
j(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2633
2636
|
]),
|
|
2634
|
-
[d.key]:
|
|
2635
|
-
|
|
2637
|
+
[d.key]: _(({ rowValue: u }) => [
|
|
2638
|
+
j(s.$slots, d.key, {
|
|
2636
2639
|
row: d,
|
|
2637
2640
|
rowValue: u
|
|
2638
2641
|
}, void 0, !0)
|
|
@@ -2641,27 +2644,27 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2641
2644
|
}, [
|
|
2642
2645
|
r(d) ? {
|
|
2643
2646
|
name: "label-tooltip",
|
|
2644
|
-
fn:
|
|
2645
|
-
|
|
2647
|
+
fn: _(() => [
|
|
2648
|
+
j(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2646
2649
|
]),
|
|
2647
2650
|
key: "0"
|
|
2648
2651
|
} : void 0
|
|
2649
2652
|
]), 1032, ["item"])
|
|
2650
2653
|
], !0)), 128))
|
|
2651
|
-
], 10,
|
|
2654
|
+
], 10, Do))), 128))
|
|
2652
2655
|
])) : N("", !0),
|
|
2653
|
-
e.format === "json" && o.value ? (m(),
|
|
2656
|
+
e.format === "json" && o.value ? (m(), D(nn, {
|
|
2654
2657
|
key: 1,
|
|
2655
2658
|
config: t.config,
|
|
2656
2659
|
"entity-record": o.value,
|
|
2657
2660
|
"fetcher-url": a.value,
|
|
2658
2661
|
"request-method": "get"
|
|
2659
2662
|
}, null, 8, ["config", "entity-record", "fetcher-url"])) : N("", !0),
|
|
2660
|
-
e.format === "yaml" && o.value ? (m(),
|
|
2663
|
+
e.format === "yaml" && o.value ? (m(), D(Yn, {
|
|
2661
2664
|
key: 2,
|
|
2662
2665
|
"entity-record": o.value
|
|
2663
2666
|
}, null, 8, ["entity-record"])) : N("", !0),
|
|
2664
|
-
e.format === "terraform" && o.value ? (m(),
|
|
2667
|
+
e.format === "terraform" && o.value ? (m(), D(Wn, {
|
|
2665
2668
|
key: 3,
|
|
2666
2669
|
"entity-record": o.value,
|
|
2667
2670
|
"entity-type": t.entityType,
|
|
@@ -2669,10 +2672,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2669
2672
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : N("", !0)
|
|
2670
2673
|
], 64));
|
|
2671
2674
|
}
|
|
2672
|
-
}),
|
|
2675
|
+
}), qo = /* @__PURE__ */ se(Uo, [["__scopeId", "data-v-a7689049"]]), Ho = {
|
|
2673
2676
|
class: "config-card-title",
|
|
2674
2677
|
"data-testid": "config-card-title"
|
|
2675
|
-
},
|
|
2678
|
+
}, Vo = { class: "config-card-actions" }, Yo = ["href"], Wo = { class: "config-card-details-section" }, Jo = /* @__PURE__ */ z({
|
|
2676
2679
|
__name: "EntityBaseConfigCard",
|
|
2677
2680
|
props: {
|
|
2678
2681
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2795,9 +2798,9 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2795
2798
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2796
2799
|
setup(e, { emit: t }) {
|
|
2797
2800
|
var O;
|
|
2798
|
-
const n = t, i = e, { i18n: { t: r } } =
|
|
2799
|
-
|
|
2800
|
-
const { axiosInstance: s } =
|
|
2801
|
+
const n = t, i = e, { i18n: { t: r } } = W.useI18n(), { getMessageFromError: o } = W.useErrors(), { convertKeyToTitle: a } = W.useStringHelpers();
|
|
2802
|
+
W.useSubSchema(i.pluginConfigKey);
|
|
2803
|
+
const { axiosInstance: s } = W.useAxios((O = i.config) == null ? void 0 : O.axiosRequestConfig), l = [
|
|
2801
2804
|
{
|
|
2802
2805
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2803
2806
|
value: "structured",
|
|
@@ -2871,24 +2874,24 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2871
2874
|
section: ae.Basic
|
|
2872
2875
|
}
|
|
2873
2876
|
}, h = K(!1), x = K(!1), y = K(""), k = K({}), C = F(() => {
|
|
2874
|
-
var b, H,
|
|
2877
|
+
var b, H, Y;
|
|
2875
2878
|
if (!k.value)
|
|
2876
2879
|
return [];
|
|
2877
2880
|
const f = [], v = Object.keys(k.value).length;
|
|
2878
2881
|
for (const I in k.value) {
|
|
2879
2882
|
if (I === "__ui_data") continue;
|
|
2880
|
-
const B = (H = (b = i.configSchema) == null ? void 0 : b[I]) == null ? void 0 : H.order,
|
|
2883
|
+
const B = (H = (b = i.configSchema) == null ? void 0 : b[I]) == null ? void 0 : H.order, G = (Y = g[I]) == null ? void 0 : Y.order;
|
|
2881
2884
|
let U = v;
|
|
2882
|
-
(
|
|
2885
|
+
(G || G === 0) && (U = G === -1 ? v + 1 : G), B && (U = B === -1 ? v + 1 : B), f.push([I, U]);
|
|
2883
2886
|
}
|
|
2884
2887
|
return f.sort(function(I, B) {
|
|
2885
2888
|
return I[1] - B[1];
|
|
2886
2889
|
}), f.map((I) => {
|
|
2887
2890
|
var dt, ft;
|
|
2888
|
-
const B = I[0],
|
|
2891
|
+
const B = I[0], G = (dt = k.value) == null ? void 0 : dt[B], U = ((ft = i.configSchema) == null ? void 0 : ft[B]) || {}, Q = g[B];
|
|
2889
2892
|
return {
|
|
2890
2893
|
key: B,
|
|
2891
|
-
value:
|
|
2894
|
+
value: G,
|
|
2892
2895
|
hidden: U.hidden || !1,
|
|
2893
2896
|
type: U.type ?? ((Q == null ? void 0 : Q.type) || V.Text),
|
|
2894
2897
|
label: U.label ?? ((Q == null ? void 0 : Q.label) || a(B)),
|
|
@@ -2897,23 +2900,23 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2897
2900
|
};
|
|
2898
2901
|
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2899
2902
|
}), T = F(() => {
|
|
2900
|
-
var H,
|
|
2903
|
+
var H, Y;
|
|
2901
2904
|
if (!k.value || !i.pluginConfigKey)
|
|
2902
2905
|
return [];
|
|
2903
2906
|
const f = k.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2904
2907
|
for (const I in f) {
|
|
2905
|
-
const B = (
|
|
2906
|
-
let U =
|
|
2908
|
+
const B = (Y = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : Y.order, G = f[I];
|
|
2909
|
+
let U = G != null && G !== "" ? v - 1 : v;
|
|
2907
2910
|
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2908
2911
|
}
|
|
2909
2912
|
return b.sort(function(I, B) {
|
|
2910
2913
|
return I[1] - B[1];
|
|
2911
2914
|
}), b.map((I) => {
|
|
2912
2915
|
var Q;
|
|
2913
|
-
const B = I[0],
|
|
2916
|
+
const B = I[0], G = f[B], U = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[B]) || {};
|
|
2914
2917
|
return {
|
|
2915
2918
|
key: B,
|
|
2916
|
-
value:
|
|
2919
|
+
value: G,
|
|
2917
2920
|
hidden: U.hidden || !1,
|
|
2918
2921
|
type: U.type ?? V.Text,
|
|
2919
2922
|
label: U.label ?? a(B),
|
|
@@ -2921,24 +2924,24 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2921
2924
|
section: ae.Plugin
|
|
2922
2925
|
};
|
|
2923
2926
|
}).filter((I) => !I.hidden);
|
|
2924
|
-
}),
|
|
2925
|
-
var H,
|
|
2927
|
+
}), J = F(() => {
|
|
2928
|
+
var H, Y;
|
|
2926
2929
|
if (!k.value || !i.policyConfigKey)
|
|
2927
2930
|
return [];
|
|
2928
2931
|
const f = k.value[i.policyConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2929
2932
|
for (const I in f) {
|
|
2930
|
-
const B = (
|
|
2931
|
-
let U =
|
|
2933
|
+
const B = (Y = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : Y.order, G = f[I];
|
|
2934
|
+
let U = G != null && G !== "" ? v - 1 : v;
|
|
2932
2935
|
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2933
2936
|
}
|
|
2934
2937
|
return b.sort(function(I, B) {
|
|
2935
2938
|
return I[1] - B[1];
|
|
2936
2939
|
}), b.map((I) => {
|
|
2937
2940
|
var Q;
|
|
2938
|
-
const B = I[0],
|
|
2941
|
+
const B = I[0], G = f[B], U = ((Q = i.policyConfigSchema) == null ? void 0 : Q[B]) || {};
|
|
2939
2942
|
return {
|
|
2940
2943
|
key: B,
|
|
2941
|
-
value:
|
|
2944
|
+
value: G,
|
|
2942
2945
|
hidden: U.hidden || !1,
|
|
2943
2946
|
type: U.type ?? V.Text,
|
|
2944
2947
|
label: U.label ?? a(B),
|
|
@@ -2947,14 +2950,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2947
2950
|
};
|
|
2948
2951
|
}).filter((I) => !I.hidden);
|
|
2949
2952
|
}), X = F(() => {
|
|
2950
|
-
var f, v, b, H,
|
|
2953
|
+
var f, v, b, H, Y, I;
|
|
2951
2954
|
return {
|
|
2952
2955
|
basic: (f = C.value) == null ? void 0 : f.filter((B) => B.section === ae.Basic),
|
|
2953
2956
|
advanced: (v = C.value) == null ? void 0 : v.filter((B) => B.section === ae.Advanced),
|
|
2954
2957
|
plugin: (H = T.value) == null ? void 0 : H.concat((b = C.value) == null ? void 0 : b.filter((B) => B.section === ae.Plugin)),
|
|
2955
|
-
policy: (I =
|
|
2958
|
+
policy: (I = J.value) == null ? void 0 : I.concat((Y = C.value) == null ? void 0 : Y.filter((B) => B.section === ae.Policy))
|
|
2956
2959
|
};
|
|
2957
|
-
}),
|
|
2960
|
+
}), w = F(() => {
|
|
2958
2961
|
const f = [];
|
|
2959
2962
|
return X.value.basic.length && f.push("basic"), X.value.advanced.length && f.push("advanced"), X.value.plugin.length && f.push("plugin"), X.value.policy.length && f.push("policy"), f;
|
|
2960
2963
|
}), A = F(() => {
|
|
@@ -2984,19 +2987,19 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2984
2987
|
h.value = !1;
|
|
2985
2988
|
}
|
|
2986
2989
|
}), (f, v) => {
|
|
2987
|
-
const b = P("KLabel"), H = P("KSelect"),
|
|
2988
|
-
return m(),
|
|
2990
|
+
const b = P("KLabel"), H = P("KSelect"), Y = P("KButton"), I = P("KSkeleton"), B = P("KEmptyState"), G = P("KCard");
|
|
2991
|
+
return m(), D(G, {
|
|
2989
2992
|
class: "kong-ui-entity-base-config-card",
|
|
2990
2993
|
"title-tag": e.titleTag
|
|
2991
2994
|
}, Se({
|
|
2992
|
-
actions:
|
|
2993
|
-
R("div",
|
|
2994
|
-
|
|
2995
|
+
actions: _(() => [
|
|
2996
|
+
R("div", Vo, [
|
|
2997
|
+
j(f.$slots, "actions", {}, void 0, !0),
|
|
2995
2998
|
M(b, {
|
|
2996
2999
|
class: "config-format-select-label",
|
|
2997
3000
|
"data-testid": "config-format-select-label"
|
|
2998
3001
|
}, {
|
|
2999
|
-
default:
|
|
3002
|
+
default: _(() => [
|
|
3000
3003
|
q(L(e.label), 1)
|
|
3001
3004
|
]),
|
|
3002
3005
|
_: 1
|
|
@@ -3008,57 +3011,57 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3008
3011
|
items: l,
|
|
3009
3012
|
onChange: u
|
|
3010
3013
|
}, null, 8, ["modelValue"]),
|
|
3011
|
-
e.configCardDoc ? (m(),
|
|
3014
|
+
e.configCardDoc ? (m(), D(Y, {
|
|
3012
3015
|
key: 0,
|
|
3013
3016
|
appearance: "tertiary",
|
|
3014
3017
|
class: "book-icon",
|
|
3015
3018
|
"data-testid": "book-icon"
|
|
3016
3019
|
}, {
|
|
3017
|
-
default:
|
|
3020
|
+
default: _(() => [
|
|
3018
3021
|
R("a", {
|
|
3019
3022
|
href: e.configCardDoc,
|
|
3020
3023
|
rel: "noopener",
|
|
3021
3024
|
target: "_blank"
|
|
3022
3025
|
}, [
|
|
3023
|
-
M($(
|
|
3024
|
-
], 8,
|
|
3026
|
+
M($(Wt), { size: $(tr) }, null, 8, ["size"])
|
|
3027
|
+
], 8, Yo)
|
|
3025
3028
|
]),
|
|
3026
3029
|
_: 1
|
|
3027
3030
|
})) : N("", !0)
|
|
3028
3031
|
])
|
|
3029
3032
|
]),
|
|
3030
|
-
default:
|
|
3031
|
-
h.value ? (m(),
|
|
3033
|
+
default: _(() => [
|
|
3034
|
+
h.value ? (m(), D(I, {
|
|
3032
3035
|
key: 0,
|
|
3033
3036
|
"data-testid": "config-card-loader",
|
|
3034
3037
|
"table-columns": 2,
|
|
3035
3038
|
type: "table"
|
|
3036
|
-
})) : x.value ? (m(),
|
|
3039
|
+
})) : x.value ? (m(), D(B, {
|
|
3037
3040
|
key: 1,
|
|
3038
3041
|
"data-testid": "config-card-fetch-error",
|
|
3039
3042
|
"icon-variant": "error"
|
|
3040
3043
|
}, {
|
|
3041
|
-
default:
|
|
3044
|
+
default: _(() => [
|
|
3042
3045
|
R("h3", null, L(y.value), 1)
|
|
3043
3046
|
]),
|
|
3044
3047
|
_: 1
|
|
3045
3048
|
})) : N("", !0),
|
|
3046
|
-
R("div",
|
|
3047
|
-
M(
|
|
3049
|
+
R("div", Wo, [
|
|
3050
|
+
M(qo, {
|
|
3048
3051
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3049
3052
|
config: e.config,
|
|
3050
3053
|
"entity-type": e.entityType,
|
|
3051
3054
|
"fetcher-url": A.value,
|
|
3052
3055
|
format: d.value,
|
|
3053
|
-
"prop-list-types":
|
|
3056
|
+
"prop-list-types": w.value,
|
|
3054
3057
|
"property-collections": X.value,
|
|
3055
3058
|
record: k.value,
|
|
3056
3059
|
"sub-entity-type": e.subEntityType
|
|
3057
3060
|
}, Se({ _: 2 }, [
|
|
3058
3061
|
ce(Object.keys(f.$slots), (U) => ({
|
|
3059
3062
|
name: U,
|
|
3060
|
-
fn:
|
|
3061
|
-
|
|
3063
|
+
fn: _((Q) => [
|
|
3064
|
+
j(f.$slots, U, Vt({ record: k.value }, Q), void 0, !0)
|
|
3062
3065
|
])
|
|
3063
3066
|
}))
|
|
3064
3067
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3068,9 +3071,9 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3068
3071
|
}, [
|
|
3069
3072
|
e.hideTitle ? void 0 : {
|
|
3070
3073
|
name: "title",
|
|
3071
|
-
fn:
|
|
3072
|
-
R("span",
|
|
3073
|
-
|
|
3074
|
+
fn: _(() => [
|
|
3075
|
+
R("span", Ho, [
|
|
3076
|
+
j(f.$slots, "title", {}, () => [
|
|
3074
3077
|
q(L($(r)("baseConfigCard.title")), 1)
|
|
3075
3078
|
], !0)
|
|
3076
3079
|
])
|
|
@@ -3080,7 +3083,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3080
3083
|
]), 1032, ["title-tag"]);
|
|
3081
3084
|
};
|
|
3082
3085
|
}
|
|
3083
|
-
}),
|
|
3086
|
+
}), ms = /* @__PURE__ */ se(Jo, [["__scopeId", "data-v-f2b42324"]]), Go = ["novalidate"], zo = /* @__PURE__ */ z({
|
|
3084
3087
|
__name: "EntityBaseForm",
|
|
3085
3088
|
props: {
|
|
3086
3089
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3204,10 +3207,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3204
3207
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3205
3208
|
setup(e, { expose: t, emit: n }) {
|
|
3206
3209
|
var X;
|
|
3207
|
-
const i = n, r = e, o =
|
|
3210
|
+
const i = n, r = e, o = li(), { i18n: { t: a } } = W.useI18n(), { getMessageFromError: s } = W.useErrors(), { axiosInstance: l } = W.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = K(!1), d = F(() => !!r.editId), u = K(!1), p = K(""), g = F(() => r.canSubmit === !1 || r.isReadonly), h = K(!1), x = F(() => {
|
|
3208
3211
|
var A, O;
|
|
3209
|
-
let
|
|
3210
|
-
return r.config.app === "konnect" ?
|
|
3212
|
+
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3213
|
+
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), r.editId ? (w = w.replace(/{id}/gi, r.editId), w) : (w = w.replace(/\/{id}/gi, ""), w);
|
|
3211
3214
|
}), y = () => {
|
|
3212
3215
|
h.value = !h.value;
|
|
3213
3216
|
}, k = () => {
|
|
@@ -3216,7 +3219,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3216
3219
|
i("cancel");
|
|
3217
3220
|
}, T = () => {
|
|
3218
3221
|
g.value || i("submit");
|
|
3219
|
-
},
|
|
3222
|
+
}, J = K([
|
|
3220
3223
|
{
|
|
3221
3224
|
title: a("baseForm.configuration.json"),
|
|
3222
3225
|
hash: "#json"
|
|
@@ -3226,20 +3229,20 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3226
3229
|
hash: "#yaml"
|
|
3227
3230
|
}
|
|
3228
3231
|
]);
|
|
3229
|
-
return r.config.app === "konnect" && r.entityType !== it.Other &&
|
|
3232
|
+
return r.config.app === "konnect" && r.entityType !== it.Other && J.value.splice(1, 0, {
|
|
3230
3233
|
title: a("baseForm.configuration.terraform"),
|
|
3231
3234
|
hash: "#terraform"
|
|
3232
|
-
}), be(() => c.value, (
|
|
3233
|
-
i("loading",
|
|
3235
|
+
}), be(() => c.value, (w) => {
|
|
3236
|
+
i("loading", w);
|
|
3234
3237
|
}, { immediate: !0 }), nt(async () => {
|
|
3235
3238
|
if (r.editId)
|
|
3236
3239
|
try {
|
|
3237
3240
|
u.value = !1, c.value = !0;
|
|
3238
|
-
const { data:
|
|
3239
|
-
i("fetch:success",
|
|
3240
|
-
} catch (
|
|
3241
|
-
const A = s(
|
|
3242
|
-
p.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, u.value = !0, i("fetch:error",
|
|
3241
|
+
const { data: w } = await l.get(x.value);
|
|
3242
|
+
i("fetch:success", w);
|
|
3243
|
+
} catch (w) {
|
|
3244
|
+
const A = s(w);
|
|
3245
|
+
p.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, u.value = !0, i("fetch:error", w);
|
|
3243
3246
|
} finally {
|
|
3244
3247
|
c.value = !1;
|
|
3245
3248
|
}
|
|
@@ -3247,21 +3250,21 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3247
3250
|
viewConfig: y,
|
|
3248
3251
|
formCancel: C,
|
|
3249
3252
|
formSubmit: T
|
|
3250
|
-
}), (
|
|
3251
|
-
const O = P("KSkeleton"), f = P("KEmptyState"), v = P("KAlert"), b = P("KButton"), H = P("KTabs"),
|
|
3252
|
-
return m(),
|
|
3253
|
-
default:
|
|
3254
|
-
c.value ? (m(),
|
|
3253
|
+
}), (w, A) => {
|
|
3254
|
+
const O = P("KSkeleton"), f = P("KEmptyState"), v = P("KAlert"), b = P("KButton"), H = P("KTabs"), Y = P("KSlideout");
|
|
3255
|
+
return m(), D(je(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3256
|
+
default: _(() => [
|
|
3257
|
+
c.value ? (m(), D(O, {
|
|
3255
3258
|
key: 0,
|
|
3256
3259
|
type: "form"
|
|
3257
|
-
})) : u.value ? (m(),
|
|
3260
|
+
})) : u.value ? (m(), D(f, {
|
|
3258
3261
|
key: 1,
|
|
3259
3262
|
"action-button-text": $(a)("baseForm.actions.back"),
|
|
3260
3263
|
"data-testid": "form-fetch-error",
|
|
3261
3264
|
"icon-variant": "error",
|
|
3262
3265
|
onClickAction: k
|
|
3263
3266
|
}, {
|
|
3264
|
-
default:
|
|
3267
|
+
default: _(() => [
|
|
3265
3268
|
R("h3", null, L(p.value), 1)
|
|
3266
3269
|
]),
|
|
3267
3270
|
_: 1
|
|
@@ -3272,14 +3275,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3272
3275
|
onReset: Le(C, ["prevent"]),
|
|
3273
3276
|
onSubmit: Le(T, ["prevent"])
|
|
3274
3277
|
}, [
|
|
3275
|
-
|
|
3276
|
-
e.errorMessage ? (m(),
|
|
3278
|
+
j(w.$slots, "default", {}, void 0, !0),
|
|
3279
|
+
e.errorMessage ? (m(), D(v, {
|
|
3277
3280
|
key: 0,
|
|
3278
3281
|
appearance: "danger",
|
|
3279
3282
|
"data-testid": "form-error",
|
|
3280
3283
|
message: e.errorMessage
|
|
3281
3284
|
}, null, 8, ["message"])) : N("", !0),
|
|
3282
|
-
e.hideActions ? N("", !0) : (m(),
|
|
3285
|
+
e.hideActions ? N("", !0) : (m(), D(Yt, {
|
|
3283
3286
|
key: 1,
|
|
3284
3287
|
disabled: !e.actionTeleportTarget,
|
|
3285
3288
|
to: e.actionTeleportTarget
|
|
@@ -3288,13 +3291,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3288
3291
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3289
3292
|
"data-testid": "form-actions"
|
|
3290
3293
|
}, [
|
|
3291
|
-
|
|
3294
|
+
j(w.$slots, "form-actions", {}, () => [
|
|
3292
3295
|
M(b, {
|
|
3293
3296
|
appearance: "tertiary",
|
|
3294
3297
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3295
3298
|
onClick: A[0] || (A[0] = (I) => y())
|
|
3296
3299
|
}, {
|
|
3297
|
-
default:
|
|
3300
|
+
default: _(() => [
|
|
3298
3301
|
q(L($(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3299
3302
|
]),
|
|
3300
3303
|
_: 1
|
|
@@ -3306,7 +3309,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3306
3309
|
type: "reset",
|
|
3307
3310
|
onClick: A[1] || (A[1] = (I) => !!e.actionTeleportTarget && C())
|
|
3308
3311
|
}, {
|
|
3309
|
-
default:
|
|
3312
|
+
default: _(() => [
|
|
3310
3313
|
q(L(e.cancelButtonText ?? $(a)("baseForm.actions.cancel")), 1)
|
|
3311
3314
|
]),
|
|
3312
3315
|
_: 1
|
|
@@ -3318,7 +3321,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3318
3321
|
type: "submit",
|
|
3319
3322
|
onClick: A[2] || (A[2] = (I) => !!e.actionTeleportTarget && T())
|
|
3320
3323
|
}, {
|
|
3321
|
-
default:
|
|
3324
|
+
default: _(() => [
|
|
3322
3325
|
q(L(e.saveButtonText ?? $(a)("baseForm.actions.save")), 1)
|
|
3323
3326
|
]),
|
|
3324
3327
|
_: 1
|
|
@@ -3327,7 +3330,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3327
3330
|
], 2)
|
|
3328
3331
|
], 8, ["disabled", "to"]))
|
|
3329
3332
|
], 40, Go)),
|
|
3330
|
-
M(
|
|
3333
|
+
M(Y, {
|
|
3331
3334
|
"close-on-blur": !1,
|
|
3332
3335
|
"data-testid": "form-view-configuration-slideout",
|
|
3333
3336
|
"has-overlay": !1,
|
|
@@ -3336,28 +3339,28 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3336
3339
|
visible: h.value,
|
|
3337
3340
|
onClose: A[4] || (A[4] = (I) => y())
|
|
3338
3341
|
}, {
|
|
3339
|
-
default:
|
|
3342
|
+
default: _(() => [
|
|
3340
3343
|
R("div", null, L($(a)("baseForm.configuration.message")), 1),
|
|
3341
3344
|
M(H, {
|
|
3342
3345
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3343
|
-
tabs:
|
|
3346
|
+
tabs: J.value,
|
|
3344
3347
|
onChange: A[3] || (A[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3345
3348
|
}, {
|
|
3346
|
-
json:
|
|
3347
|
-
M(
|
|
3349
|
+
json: _(() => [
|
|
3350
|
+
M(nn, {
|
|
3348
3351
|
config: e.config,
|
|
3349
3352
|
"entity-record": r.formFields,
|
|
3350
3353
|
"fetcher-url": x.value,
|
|
3351
3354
|
"request-method": r.editId ? "put" : "post"
|
|
3352
3355
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3353
3356
|
]),
|
|
3354
|
-
yaml:
|
|
3355
|
-
M(
|
|
3357
|
+
yaml: _(() => [
|
|
3358
|
+
M(Yn, {
|
|
3356
3359
|
"entity-record": r.formFields
|
|
3357
3360
|
}, null, 8, ["entity-record"])
|
|
3358
3361
|
]),
|
|
3359
|
-
terraform:
|
|
3360
|
-
M(
|
|
3362
|
+
terraform: _(() => [
|
|
3363
|
+
M(Wn, {
|
|
3361
3364
|
"entity-record": r.formFields,
|
|
3362
3365
|
"entity-type": e.entityType,
|
|
3363
3366
|
"sub-entity-type": e.subEntityType
|
|
@@ -3373,7 +3376,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3373
3376
|
});
|
|
3374
3377
|
};
|
|
3375
3378
|
}
|
|
3376
|
-
}),
|
|
3379
|
+
}), hs = /* @__PURE__ */ se(zo, [["__scopeId", "data-v-10f3d6b0"]]), Qo = ["data-truncate"], Zo = /* @__PURE__ */ z({
|
|
3377
3380
|
__name: "EntityBaseTableCell",
|
|
3378
3381
|
props: {
|
|
3379
3382
|
keyName: {
|
|
@@ -3408,8 +3411,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3408
3411
|
var k, C, T;
|
|
3409
3412
|
let y = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3410
3413
|
if (n.value && "getComputedStyle" in window) {
|
|
3411
|
-
const
|
|
3412
|
-
y -= (parseFloat(
|
|
3414
|
+
const J = window.getComputedStyle(n.value);
|
|
3415
|
+
y -= (parseFloat(J.paddingLeft) || 0) + (parseFloat(J.paddingRight) || 0);
|
|
3413
3416
|
}
|
|
3414
3417
|
d.value = ((C = i.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, u.value = y, p.value = ((T = c.value) == null ? void 0 : T.innerText) || "";
|
|
3415
3418
|
}, c = K({}), d = K(0), u = K(0), p = K(""), g = F(() => [i.value, n.value]), h = be(
|
|
@@ -3429,7 +3432,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3429
3432
|
), x = F(() => o.value ? d.value > u.value : !1);
|
|
3430
3433
|
return tt(() => {
|
|
3431
3434
|
l();
|
|
3432
|
-
}),
|
|
3435
|
+
}), zn(() => {
|
|
3433
3436
|
h();
|
|
3434
3437
|
}), (y, k) => {
|
|
3435
3438
|
const C = P("KTooltip");
|
|
@@ -3447,22 +3450,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3447
3450
|
placement: "bottom-start",
|
|
3448
3451
|
text: x.value ? p.value : ""
|
|
3449
3452
|
}, {
|
|
3450
|
-
default:
|
|
3451
|
-
|
|
3453
|
+
default: _(() => [
|
|
3454
|
+
j(y.$slots, "default", {}, void 0, !0)
|
|
3452
3455
|
]),
|
|
3453
3456
|
_: 3
|
|
3454
3457
|
}, 8, ["text"])
|
|
3455
|
-
], 8,
|
|
3458
|
+
], 8, Qo)) : j(y.$slots, "default", { key: 1 }, void 0, !0)
|
|
3456
3459
|
], 512);
|
|
3457
3460
|
};
|
|
3458
3461
|
}
|
|
3459
|
-
}),
|
|
3462
|
+
}), Xo = /* @__PURE__ */ se(Zo, [["__scopeId", "data-v-a3a65cac"]]), el = { class: "toolbar-container" }, tl = {
|
|
3460
3463
|
key: 0,
|
|
3461
3464
|
class: "toolbar-button-container"
|
|
3462
|
-
},
|
|
3465
|
+
}, nl = {
|
|
3463
3466
|
key: 0,
|
|
3464
3467
|
class: "hidden"
|
|
3465
|
-
},
|
|
3468
|
+
}, il = /* @__PURE__ */ z({
|
|
3466
3469
|
__name: "EntityBaseTable",
|
|
3467
3470
|
props: {
|
|
3468
3471
|
// table header configuration
|
|
@@ -3607,7 +3610,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3607
3610
|
},
|
|
3608
3611
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3609
3612
|
setup(e, { emit: t }) {
|
|
3610
|
-
const n = e, i = t, { i18n: { t: r } } =
|
|
3613
|
+
const n = e, i = t, { i18n: { t: r } } = W.useI18n(), o = F(() => {
|
|
3611
3614
|
var f, v;
|
|
3612
3615
|
return typeof n.errorMessage == "string" ? {
|
|
3613
3616
|
hasError: !!n.errorMessage,
|
|
@@ -3659,8 +3662,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3659
3662
|
i("click:row", v);
|
|
3660
3663
|
}), y = (f) => {
|
|
3661
3664
|
i("sort", f);
|
|
3662
|
-
}, { hideTableToolbar: k, handleStateChange: C } =
|
|
3663
|
-
const f =
|
|
3665
|
+
}, { hideTableToolbar: k, handleStateChange: C } = W.useTableState(() => n.query), { setTablePreferences: T, getTablePreferences: J } = mi(), X = K(J(a.value, n.defaultTablePreferences)), w = F(() => {
|
|
3666
|
+
const f = J(a.value);
|
|
3664
3667
|
return {
|
|
3665
3668
|
...n.initialFetcherParams,
|
|
3666
3669
|
...f
|
|
@@ -3676,12 +3679,12 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3676
3679
|
}));
|
|
3677
3680
|
return (f, v) => {
|
|
3678
3681
|
const b = P("KTableData"), H = P("KCard");
|
|
3679
|
-
return m(),
|
|
3682
|
+
return m(), D(H, {
|
|
3680
3683
|
class: "kong-ui-entity-base-table",
|
|
3681
3684
|
title: e.title,
|
|
3682
3685
|
"title-tag": e.titleTag
|
|
3683
3686
|
}, {
|
|
3684
|
-
default:
|
|
3687
|
+
default: _(() => [
|
|
3685
3688
|
M(b, {
|
|
3686
3689
|
ref_key: "tableRefs",
|
|
3687
3690
|
ref: c,
|
|
@@ -3702,7 +3705,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3702
3705
|
"hide-pagination": e.hidePagination,
|
|
3703
3706
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3704
3707
|
"hide-toolbar": e.hideToolbar ?? $(k),
|
|
3705
|
-
"initial-fetcher-params":
|
|
3708
|
+
"initial-fetcher-params": w.value,
|
|
3706
3709
|
loading: e.isLoading,
|
|
3707
3710
|
"pagination-attributes": O.value,
|
|
3708
3711
|
"resize-columns": "",
|
|
@@ -3714,74 +3717,81 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3714
3717
|
"table-preferences": X.value,
|
|
3715
3718
|
onEmptyStateActionClick: g,
|
|
3716
3719
|
"onRow:click": x.value,
|
|
3717
|
-
onSort: v[0] || (v[0] = (
|
|
3720
|
+
onSort: v[0] || (v[0] = (Y) => y(Y)),
|
|
3718
3721
|
onState: p,
|
|
3719
3722
|
"onUpdate:tablePreferences": A
|
|
3720
3723
|
}, Se({
|
|
3721
|
-
toolbar:
|
|
3722
|
-
R("div",
|
|
3723
|
-
|
|
3724
|
-
f.$slots["toolbar-button"] ? (m(), S("div",
|
|
3725
|
-
|
|
3724
|
+
toolbar: _(() => [
|
|
3725
|
+
R("div", el, [
|
|
3726
|
+
j(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3727
|
+
f.$slots["toolbar-button"] ? (m(), S("div", tl, [
|
|
3728
|
+
j(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3726
3729
|
])) : N("", !0)
|
|
3727
3730
|
])
|
|
3728
3731
|
]),
|
|
3729
|
-
"action-items":
|
|
3730
|
-
|
|
3732
|
+
"action-items": _(({ row: Y }) => [
|
|
3733
|
+
j(f.$slots, "actions", { row: Y }, void 0, !0)
|
|
3731
3734
|
]),
|
|
3732
3735
|
_: 2
|
|
3733
3736
|
}, [
|
|
3734
3737
|
f.$slots["empty-state"] ? {
|
|
3735
3738
|
name: "empty-state",
|
|
3736
|
-
fn:
|
|
3737
|
-
|
|
3739
|
+
fn: _(() => [
|
|
3740
|
+
j(f.$slots, "empty-state", {}, void 0, !0)
|
|
3738
3741
|
]),
|
|
3739
3742
|
key: "0"
|
|
3740
3743
|
} : void 0,
|
|
3741
|
-
ce(e.tableHeaders, (
|
|
3744
|
+
ce(e.tableHeaders, (Y, I) => ({
|
|
3742
3745
|
name: I,
|
|
3743
|
-
fn:
|
|
3744
|
-
M(
|
|
3746
|
+
fn: _(({ row: B, rowValue: G }) => [
|
|
3747
|
+
M(Xo, {
|
|
3745
3748
|
"key-name": String(I),
|
|
3746
3749
|
"row-el": d(B),
|
|
3747
|
-
tooltip:
|
|
3750
|
+
tooltip: Y.tooltip
|
|
3748
3751
|
}, {
|
|
3749
|
-
default:
|
|
3750
|
-
|
|
3752
|
+
default: _(() => [
|
|
3753
|
+
j(f.$slots, I, {
|
|
3751
3754
|
row: B,
|
|
3752
3755
|
rowKey: e.rowKey,
|
|
3753
|
-
rowValue:
|
|
3756
|
+
rowValue: G
|
|
3754
3757
|
}, () => [
|
|
3755
|
-
q(L(
|
|
3758
|
+
q(L(G), 1)
|
|
3756
3759
|
], !0)
|
|
3757
3760
|
]),
|
|
3758
3761
|
_: 2
|
|
3759
3762
|
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3760
3763
|
])
|
|
3761
3764
|
})),
|
|
3765
|
+
f.$slots["bulk-actions"] ? {
|
|
3766
|
+
name: "bulk-actions",
|
|
3767
|
+
fn: _((Y) => [
|
|
3768
|
+
j(f.$slots, "bulk-actions", qt(Ht(Y)), void 0, !0)
|
|
3769
|
+
]),
|
|
3770
|
+
key: "1"
|
|
3771
|
+
} : void 0,
|
|
3762
3772
|
e.query ? void 0 : {
|
|
3763
3773
|
name: "empty-state-action-icon",
|
|
3764
|
-
fn:
|
|
3765
|
-
M($(
|
|
3774
|
+
fn: _(() => [
|
|
3775
|
+
M($(Jt))
|
|
3766
3776
|
]),
|
|
3767
|
-
key: "
|
|
3777
|
+
key: "2"
|
|
3768
3778
|
}
|
|
3769
3779
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3770
|
-
f.$slots["outside-actions"] && $(k) ? (m(), S("div",
|
|
3771
|
-
|
|
3780
|
+
f.$slots["outside-actions"] && $(k) ? (m(), S("div", nl, [
|
|
3781
|
+
j(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3772
3782
|
])) : N("", !0)
|
|
3773
3783
|
]),
|
|
3774
3784
|
_: 3
|
|
3775
3785
|
}, 8, ["title", "title-tag"]);
|
|
3776
3786
|
};
|
|
3777
3787
|
}
|
|
3778
|
-
}),
|
|
3788
|
+
}), gs = /* @__PURE__ */ se(il, [["__scopeId", "data-v-ece1f103"]]), rl = {
|
|
3779
3789
|
key: 0,
|
|
3780
3790
|
class: "kong-ui-entity-delete-error"
|
|
3781
|
-
},
|
|
3791
|
+
}, al = {
|
|
3782
3792
|
key: 1,
|
|
3783
3793
|
class: "description"
|
|
3784
|
-
},
|
|
3794
|
+
}, ol = /* @__PURE__ */ z({
|
|
3785
3795
|
__name: "EntityDeleteModal",
|
|
3786
3796
|
props: {
|
|
3787
3797
|
visible: {
|
|
@@ -3820,14 +3830,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3820
3830
|
},
|
|
3821
3831
|
emits: ["cancel", "proceed"],
|
|
3822
3832
|
setup(e, { emit: t }) {
|
|
3823
|
-
const { i18nT: n } =
|
|
3833
|
+
const { i18nT: n } = W.useI18n(), i = e, r = t, o = F(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3824
3834
|
r("cancel");
|
|
3825
3835
|
}, s = () => {
|
|
3826
3836
|
r("proceed");
|
|
3827
3837
|
};
|
|
3828
3838
|
return (l, c) => {
|
|
3829
3839
|
const d = P("KAlert"), u = P("KPrompt");
|
|
3830
|
-
return m(),
|
|
3840
|
+
return m(), D(u, {
|
|
3831
3841
|
"action-button-appearance": "danger",
|
|
3832
3842
|
"action-button-disabled": e.actionPending,
|
|
3833
3843
|
"action-button-text": "Yes, delete",
|
|
@@ -3838,10 +3848,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3838
3848
|
onCancel: a,
|
|
3839
3849
|
onProceed: s
|
|
3840
3850
|
}, {
|
|
3841
|
-
default:
|
|
3842
|
-
e.error ? (m(), S("div",
|
|
3851
|
+
default: _(() => [
|
|
3852
|
+
e.error ? (m(), S("div", rl, [
|
|
3843
3853
|
M(d, { appearance: "danger" }, {
|
|
3844
|
-
default:
|
|
3854
|
+
default: _(() => [
|
|
3845
3855
|
q(L(e.error), 1)
|
|
3846
3856
|
]),
|
|
3847
3857
|
_: 1
|
|
@@ -3852,21 +3862,21 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3852
3862
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3853
3863
|
tag: "p"
|
|
3854
3864
|
}, Se({
|
|
3855
|
-
entityType:
|
|
3865
|
+
entityType: _(() => [
|
|
3856
3866
|
q(L(i.entityType), 1)
|
|
3857
3867
|
]),
|
|
3858
3868
|
_: 2
|
|
3859
3869
|
}, [
|
|
3860
3870
|
i.entityName ? {
|
|
3861
3871
|
name: "entityName",
|
|
3862
|
-
fn:
|
|
3872
|
+
fn: _(() => [
|
|
3863
3873
|
R("strong", null, L(i.entityName), 1)
|
|
3864
3874
|
]),
|
|
3865
3875
|
key: "0"
|
|
3866
3876
|
} : void 0
|
|
3867
3877
|
]), 1032, ["keypath"]),
|
|
3868
|
-
i.description || l.$slots.description ? (m(), S("div",
|
|
3869
|
-
|
|
3878
|
+
i.description || l.$slots.description ? (m(), S("div", al, [
|
|
3879
|
+
j(l.$slots, "description", {}, () => [
|
|
3870
3880
|
R("p", null, L(i.description), 1)
|
|
3871
3881
|
], !0)
|
|
3872
3882
|
])) : N("", !0)
|
|
@@ -3875,13 +3885,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3875
3885
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3876
3886
|
};
|
|
3877
3887
|
}
|
|
3878
|
-
}),
|
|
3888
|
+
}), ys = /* @__PURE__ */ se(ol, [["__scopeId", "data-v-4361d622"]]), ll = {
|
|
3879
3889
|
fill: "none",
|
|
3880
3890
|
height: "20",
|
|
3881
3891
|
viewBox: "0 0 20 20",
|
|
3882
3892
|
width: "20",
|
|
3883
3893
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3884
|
-
},
|
|
3894
|
+
}, sl = {
|
|
3885
3895
|
id: "mask0_180_20349",
|
|
3886
3896
|
height: "20",
|
|
3887
3897
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3889,7 +3899,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3889
3899
|
width: "20",
|
|
3890
3900
|
x: "0",
|
|
3891
3901
|
y: "0"
|
|
3892
|
-
},
|
|
3902
|
+
}, cl = ["fill"], ul = { mask: "url(#mask0_180_20349)" }, dl = ["fill"], Mt = /* @__PURE__ */ z({
|
|
3893
3903
|
__name: "IconFilter",
|
|
3894
3904
|
props: {
|
|
3895
3905
|
color: {
|
|
@@ -3898,26 +3908,26 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3898
3908
|
}
|
|
3899
3909
|
},
|
|
3900
3910
|
setup(e) {
|
|
3901
|
-
return (t, n) => (m(), S("svg",
|
|
3902
|
-
R("mask",
|
|
3911
|
+
return (t, n) => (m(), S("svg", ll, [
|
|
3912
|
+
R("mask", sl, [
|
|
3903
3913
|
R("rect", {
|
|
3904
3914
|
fill: e.color,
|
|
3905
3915
|
height: "20",
|
|
3906
3916
|
width: "20"
|
|
3907
|
-
}, null, 8,
|
|
3917
|
+
}, null, 8, cl)
|
|
3908
3918
|
]),
|
|
3909
|
-
R("g",
|
|
3919
|
+
R("g", ul, [
|
|
3910
3920
|
R("path", {
|
|
3911
3921
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3912
3922
|
fill: e.color
|
|
3913
|
-
}, null, 8,
|
|
3923
|
+
}, null, 8, dl)
|
|
3914
3924
|
])
|
|
3915
3925
|
]));
|
|
3916
3926
|
}
|
|
3917
|
-
}),
|
|
3927
|
+
}), fl = {
|
|
3918
3928
|
key: 1,
|
|
3919
3929
|
class: "kong-ui-entity-filter"
|
|
3920
|
-
},
|
|
3930
|
+
}, pl = { class: "kong-ui-entity-filter-menu" }, ml = ["data-testid"], hl = ["onClick", "onKeydown"], gl = { class: "menu-item-indicator" }, yl = { class: "menu-item-body" }, vl = ["for"], bl = { class: "menu-item-buttons" }, xl = { class: "filter-clear-button-container" }, Cl = /* @__PURE__ */ z({
|
|
3921
3931
|
__name: "EntityFilter",
|
|
3922
3932
|
props: {
|
|
3923
3933
|
// filter config, either exact match or fuzzy match
|
|
@@ -3937,62 +3947,62 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3937
3947
|
},
|
|
3938
3948
|
emits: ["update:modelValue"],
|
|
3939
3949
|
setup(e, { emit: t }) {
|
|
3940
|
-
const { i18n: { t: n } } =
|
|
3941
|
-
const
|
|
3950
|
+
const { i18n: { t: n } } = W.useI18n(), i = e, r = t, o = K(!1), a = K({}), s = K(/* @__PURE__ */ new Set()), l = F(() => {
|
|
3951
|
+
const w = [];
|
|
3942
3952
|
return new URLSearchParams(i.modelValue).forEach((A, O) => {
|
|
3943
|
-
A !== "" &&
|
|
3944
|
-
}),
|
|
3953
|
+
A !== "" && w.push(O);
|
|
3954
|
+
}), w;
|
|
3945
3955
|
}), c = F(() => {
|
|
3946
|
-
const
|
|
3947
|
-
return Object.keys(
|
|
3956
|
+
const w = i.config.fields;
|
|
3957
|
+
return Object.keys(w).filter((A) => {
|
|
3948
3958
|
var O;
|
|
3949
|
-
return (O =
|
|
3959
|
+
return (O = w == null ? void 0 : w[A]) == null ? void 0 : O.searchable;
|
|
3950
3960
|
}).map((A) => ({
|
|
3951
|
-
label:
|
|
3961
|
+
label: w[A].label || A,
|
|
3952
3962
|
value: A,
|
|
3953
3963
|
expanded: !1
|
|
3954
3964
|
}));
|
|
3955
3965
|
});
|
|
3956
|
-
be(() => i.modelValue, (
|
|
3957
|
-
a.value = {}, new URLSearchParams(
|
|
3966
|
+
be(() => i.modelValue, (w) => {
|
|
3967
|
+
a.value = {}, new URLSearchParams(w).forEach((A, O) => {
|
|
3958
3968
|
a.value[O] = A;
|
|
3959
3969
|
});
|
|
3960
3970
|
});
|
|
3961
3971
|
const d = () => {
|
|
3962
3972
|
o.value = !o.value;
|
|
3963
|
-
}, u = (
|
|
3964
|
-
s.value.has(
|
|
3965
|
-
}, p = (
|
|
3966
|
-
r("update:modelValue",
|
|
3973
|
+
}, u = (w) => {
|
|
3974
|
+
s.value.has(w) ? s.value.delete(w) : s.value.add(w);
|
|
3975
|
+
}, p = (w) => {
|
|
3976
|
+
r("update:modelValue", w);
|
|
3967
3977
|
}, g = () => {
|
|
3968
3978
|
p("");
|
|
3969
|
-
}, h = (
|
|
3979
|
+
}, h = (w) => `filter-${w}`, x = (w) => {
|
|
3970
3980
|
var A, O;
|
|
3971
|
-
return (((O = (A = i.config.schema) == null ? void 0 : A[
|
|
3972
|
-
}, y = (
|
|
3981
|
+
return (((O = (A = i.config.schema) == null ? void 0 : A[w]) == null ? void 0 : O.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
3982
|
+
}, y = (w) => {
|
|
3973
3983
|
var A, O;
|
|
3974
|
-
return ((O = (A = i.config.schema) == null ? void 0 : A[
|
|
3975
|
-
}, k = (
|
|
3984
|
+
return ((O = (A = i.config.schema) == null ? void 0 : A[w]) == null ? void 0 : O.type) ?? "text";
|
|
3985
|
+
}, k = (w) => {
|
|
3976
3986
|
a.value = {
|
|
3977
3987
|
...a.value,
|
|
3978
|
-
[
|
|
3988
|
+
[w]: ""
|
|
3979
3989
|
}, T();
|
|
3980
3990
|
}, C = () => {
|
|
3981
3991
|
a.value = {}, T(!0);
|
|
3982
|
-
}, T = (
|
|
3992
|
+
}, T = (w = !1) => {
|
|
3983
3993
|
const A = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
3984
|
-
|
|
3985
|
-
},
|
|
3994
|
+
w && (o.value = !1), r("update:modelValue", new URLSearchParams(A).toString());
|
|
3995
|
+
}, J = (w) => {
|
|
3986
3996
|
var A, O;
|
|
3987
|
-
return !!((O = (A = i.config.schema) == null ? void 0 : A[
|
|
3988
|
-
}, X = (
|
|
3997
|
+
return !!((O = (A = i.config.schema) == null ? void 0 : A[w]) != null && O.filterFunction);
|
|
3998
|
+
}, X = (w, A) => {
|
|
3989
3999
|
var f;
|
|
3990
|
-
const O = (f = i.config.schema) == null ? void 0 : f[
|
|
4000
|
+
const O = (f = i.config.schema) == null ? void 0 : f[w];
|
|
3991
4001
|
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(A);
|
|
3992
4002
|
};
|
|
3993
|
-
return (
|
|
4003
|
+
return (w, A) => {
|
|
3994
4004
|
const O = P("KInput"), f = P("KButton"), v = P("KSelect");
|
|
3995
|
-
return e.config.isExactMatch ? (m(),
|
|
4005
|
+
return e.config.isExactMatch ? (m(), D(O, {
|
|
3996
4006
|
key: 0,
|
|
3997
4007
|
autocomplete: "off",
|
|
3998
4008
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4001,11 +4011,11 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4001
4011
|
placeholder: e.config.placeholder,
|
|
4002
4012
|
"onUpdate:modelValue": p
|
|
4003
4013
|
}, {
|
|
4004
|
-
before:
|
|
4014
|
+
before: _(() => [
|
|
4005
4015
|
M(Mt)
|
|
4006
4016
|
]),
|
|
4007
|
-
after:
|
|
4008
|
-
xe(M($(
|
|
4017
|
+
after: _(() => [
|
|
4018
|
+
xe(M($(ri), {
|
|
4009
4019
|
class: "kong-ui-entity-filter-clear",
|
|
4010
4020
|
role: "button",
|
|
4011
4021
|
tabindex: "0",
|
|
@@ -4015,13 +4025,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4015
4025
|
])
|
|
4016
4026
|
]),
|
|
4017
4027
|
_: 1
|
|
4018
|
-
}, 8, ["model-value", "placeholder"])) : (m(), S("div",
|
|
4028
|
+
}, 8, ["model-value", "placeholder"])) : (m(), S("div", fl, [
|
|
4019
4029
|
M(f, {
|
|
4020
4030
|
appearance: "tertiary",
|
|
4021
4031
|
"data-testid": "filter-button",
|
|
4022
4032
|
onClick: d
|
|
4023
4033
|
}, {
|
|
4024
|
-
default:
|
|
4034
|
+
default: _(() => [
|
|
4025
4035
|
M(Mt),
|
|
4026
4036
|
q(" " + L($(n)("filter.filterButtonText")) + " " + L(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4027
4037
|
]),
|
|
@@ -4033,9 +4043,9 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4033
4043
|
}, null, 512), [
|
|
4034
4044
|
[Ce, o.value]
|
|
4035
4045
|
]),
|
|
4036
|
-
xe(R("div",
|
|
4046
|
+
xe(R("div", pl, [
|
|
4037
4047
|
(m(!0), S(ue, null, ce(c.value, (b) => {
|
|
4038
|
-
var H,
|
|
4048
|
+
var H, Y;
|
|
4039
4049
|
return m(), S("div", {
|
|
4040
4050
|
key: b.value,
|
|
4041
4051
|
class: "kong-ui-entity-filter-menu-item",
|
|
@@ -4046,32 +4056,32 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4046
4056
|
role: "button",
|
|
4047
4057
|
tabindex: "0",
|
|
4048
4058
|
onClick: (I) => u(b.value),
|
|
4049
|
-
onKeydown:
|
|
4059
|
+
onKeydown: Qn((I) => u(b.value), ["enter"])
|
|
4050
4060
|
}, [
|
|
4051
4061
|
q(L(b.label) + " ", 1),
|
|
4052
|
-
xe(R("span",
|
|
4062
|
+
xe(R("span", gl, null, 512), [
|
|
4053
4063
|
[Ce, l.value.includes(b.value)]
|
|
4054
4064
|
]),
|
|
4055
|
-
M($(
|
|
4065
|
+
M($(ai), {
|
|
4056
4066
|
class: fe(["menu-item-expand-icon", { expanded: s.value.has(b.value) }]),
|
|
4057
|
-
color: $(
|
|
4067
|
+
color: $(Qi)
|
|
4058
4068
|
}, null, 8, ["class", "color"])
|
|
4059
|
-
], 42,
|
|
4060
|
-
xe(R("div",
|
|
4069
|
+
], 42, hl),
|
|
4070
|
+
xe(R("div", yl, [
|
|
4061
4071
|
R("label", {
|
|
4062
4072
|
class: "menu-item-label",
|
|
4063
4073
|
for: h(b.value)
|
|
4064
|
-
}, L($(n)("filter.fieldLabel")), 9,
|
|
4065
|
-
((
|
|
4074
|
+
}, L($(n)("filter.fieldLabel")), 9, vl),
|
|
4075
|
+
((Y = (H = e.config.schema) == null ? void 0 : H[b.value]) == null ? void 0 : Y.type) === "select" ? (m(), D(v, {
|
|
4066
4076
|
key: 0,
|
|
4067
4077
|
id: h(b.value),
|
|
4068
4078
|
modelValue: a.value[b.value],
|
|
4069
4079
|
"onUpdate:modelValue": (I) => a.value[b.value] = I,
|
|
4070
|
-
"enable-filtering":
|
|
4080
|
+
"enable-filtering": J(b.value),
|
|
4071
4081
|
"filter-function": (I) => X(b.value, I),
|
|
4072
4082
|
items: x(b.value),
|
|
4073
4083
|
placeholder: $(n)("filter.selectPlaceholder")
|
|
4074
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(),
|
|
4084
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), D(O, {
|
|
4075
4085
|
key: 1,
|
|
4076
4086
|
id: h(b.value),
|
|
4077
4087
|
modelValue: a.value[b.value],
|
|
@@ -4083,14 +4093,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4083
4093
|
], 512), [
|
|
4084
4094
|
[Ce, s.value.has(b.value)]
|
|
4085
4095
|
]),
|
|
4086
|
-
xe(R("div",
|
|
4096
|
+
xe(R("div", bl, [
|
|
4087
4097
|
M(f, {
|
|
4088
4098
|
appearance: "tertiary",
|
|
4089
4099
|
"data-testid": "apply-filter",
|
|
4090
4100
|
size: "small",
|
|
4091
4101
|
onClick: A[0] || (A[0] = (I) => T(!0))
|
|
4092
4102
|
}, {
|
|
4093
|
-
default:
|
|
4103
|
+
default: _(() => [
|
|
4094
4104
|
q(L($(n)("filter.applyButtonText")), 1)
|
|
4095
4105
|
]),
|
|
4096
4106
|
_: 1
|
|
@@ -4101,7 +4111,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4101
4111
|
size: "small",
|
|
4102
4112
|
onClick: (I) => k(b.value)
|
|
4103
4113
|
}, {
|
|
4104
|
-
default:
|
|
4114
|
+
default: _(() => [
|
|
4105
4115
|
q(L($(n)("filter.clearButtonText")), 1)
|
|
4106
4116
|
]),
|
|
4107
4117
|
_: 1
|
|
@@ -4109,15 +4119,15 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4109
4119
|
], 512), [
|
|
4110
4120
|
[Ce, s.value.has(b.value)]
|
|
4111
4121
|
])
|
|
4112
|
-
], 8,
|
|
4122
|
+
], 8, ml);
|
|
4113
4123
|
}), 128)),
|
|
4114
|
-
R("div",
|
|
4124
|
+
R("div", xl, [
|
|
4115
4125
|
M(f, {
|
|
4116
4126
|
appearance: "tertiary",
|
|
4117
4127
|
size: "small",
|
|
4118
4128
|
onClick: C
|
|
4119
4129
|
}, {
|
|
4120
|
-
default:
|
|
4130
|
+
default: _(() => [
|
|
4121
4131
|
q(L($(n)("filter.clearAllButtonText")), 1)
|
|
4122
4132
|
]),
|
|
4123
4133
|
_: 1
|
|
@@ -4129,7 +4139,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4129
4139
|
]));
|
|
4130
4140
|
};
|
|
4131
4141
|
}
|
|
4132
|
-
}),
|
|
4142
|
+
}), vs = /* @__PURE__ */ se(Cl, [["__scopeId", "data-v-084f7978"]]), bs = /* @__PURE__ */ z({
|
|
4133
4143
|
__name: "EntityToggleModal",
|
|
4134
4144
|
props: {
|
|
4135
4145
|
visible: {
|
|
@@ -4161,7 +4171,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4161
4171
|
},
|
|
4162
4172
|
emits: ["cancel", "proceed"],
|
|
4163
4173
|
setup(e, { emit: t }) {
|
|
4164
|
-
const { i18n: { t: n }, i18nT: i } =
|
|
4174
|
+
const { i18n: { t: n }, i18nT: i } = W.useI18n(), r = e, o = t, a = K(!1), s = F(
|
|
4165
4175
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4166
4176
|
), l = F(
|
|
4167
4177
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
@@ -4179,7 +4189,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4179
4189
|
};
|
|
4180
4190
|
return (u, p) => {
|
|
4181
4191
|
const g = P("KPrompt");
|
|
4182
|
-
return m(),
|
|
4192
|
+
return m(), D(Yt, { to: "body" }, [
|
|
4183
4193
|
M(g, {
|
|
4184
4194
|
"action-button-disabled": a.value,
|
|
4185
4195
|
"action-button-text": l.value,
|
|
@@ -4189,15 +4199,15 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4189
4199
|
onCancel: c,
|
|
4190
4200
|
onProceed: d
|
|
4191
4201
|
}, {
|
|
4192
|
-
default:
|
|
4202
|
+
default: _(() => [
|
|
4193
4203
|
M($(i), {
|
|
4194
4204
|
keypath: `toggleModal.${r.action}.message`,
|
|
4195
4205
|
scope: "global"
|
|
4196
4206
|
}, {
|
|
4197
|
-
entityType:
|
|
4207
|
+
entityType: _(() => [
|
|
4198
4208
|
q(L(e.entityType), 1)
|
|
4199
4209
|
]),
|
|
4200
|
-
entityName:
|
|
4210
|
+
entityName: _(() => [
|
|
4201
4211
|
R("strong", null, L(e.entityName), 1)
|
|
4202
4212
|
]),
|
|
4203
4213
|
_: 1
|
|
@@ -4208,7 +4218,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4208
4218
|
]);
|
|
4209
4219
|
};
|
|
4210
4220
|
}
|
|
4211
|
-
}),
|
|
4221
|
+
}), xs = /* @__PURE__ */ z({
|
|
4212
4222
|
__name: "PermissionsWrapper",
|
|
4213
4223
|
props: {
|
|
4214
4224
|
/**
|
|
@@ -4233,7 +4243,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4233
4243
|
const t = e, n = K(void 0), i = F(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4234
4244
|
return be(() => t.authFunction, async () => {
|
|
4235
4245
|
n.value = await t.authFunction();
|
|
4236
|
-
}, { immediate: !0 }), (r, o) => i.value ?
|
|
4246
|
+
}, { immediate: !0 }), (r, o) => i.value ? j(r.$slots, "default", {
|
|
4237
4247
|
key: 0,
|
|
4238
4248
|
isAllowed: n.value
|
|
4239
4249
|
}) : N("", !0);
|
|
@@ -4241,37 +4251,37 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4241
4251
|
}), te = [];
|
|
4242
4252
|
for (let e = 0; e < 256; ++e)
|
|
4243
4253
|
te.push((e + 256).toString(16).slice(1));
|
|
4244
|
-
function
|
|
4254
|
+
function kl(e, t = 0) {
|
|
4245
4255
|
return (te[e[t + 0]] + te[e[t + 1]] + te[e[t + 2]] + te[e[t + 3]] + "-" + te[e[t + 4]] + te[e[t + 5]] + "-" + te[e[t + 6]] + te[e[t + 7]] + "-" + te[e[t + 8]] + te[e[t + 9]] + "-" + te[e[t + 10]] + te[e[t + 11]] + te[e[t + 12]] + te[e[t + 13]] + te[e[t + 14]] + te[e[t + 15]]).toLowerCase();
|
|
4246
4256
|
}
|
|
4247
|
-
let
|
|
4248
|
-
const
|
|
4249
|
-
function
|
|
4250
|
-
if (!
|
|
4257
|
+
let Je;
|
|
4258
|
+
const Al = new Uint8Array(16);
|
|
4259
|
+
function _l() {
|
|
4260
|
+
if (!Je) {
|
|
4251
4261
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
4252
4262
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4253
|
-
|
|
4263
|
+
Je = crypto.getRandomValues.bind(crypto);
|
|
4254
4264
|
}
|
|
4255
|
-
return
|
|
4265
|
+
return Je(Al);
|
|
4256
4266
|
}
|
|
4257
|
-
const
|
|
4258
|
-
function
|
|
4267
|
+
const wl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), jt = { randomUUID: wl };
|
|
4268
|
+
function Sl(e, t, n) {
|
|
4259
4269
|
var r;
|
|
4260
4270
|
if (jt.randomUUID && !e)
|
|
4261
4271
|
return jt.randomUUID();
|
|
4262
4272
|
e = e || {};
|
|
4263
|
-
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ??
|
|
4273
|
+
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? _l();
|
|
4264
4274
|
if (i.length < 16)
|
|
4265
4275
|
throw new Error("Random bytes length must be >= 16");
|
|
4266
|
-
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128,
|
|
4276
|
+
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, kl(i);
|
|
4267
4277
|
}
|
|
4268
|
-
const
|
|
4278
|
+
const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
4269
4279
|
key: 1,
|
|
4270
4280
|
class: "form-section-description"
|
|
4271
|
-
},
|
|
4281
|
+
}, El = {
|
|
4272
4282
|
key: 2,
|
|
4273
4283
|
class: "form-section-footer"
|
|
4274
|
-
},
|
|
4284
|
+
}, Fl = { class: "form-section-content" }, Ol = /* @__PURE__ */ z({
|
|
4275
4285
|
__name: "EntityFormSection",
|
|
4276
4286
|
props: {
|
|
4277
4287
|
title: {
|
|
@@ -4300,52 +4310,52 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4300
4310
|
}
|
|
4301
4311
|
},
|
|
4302
4312
|
setup(e) {
|
|
4303
|
-
const t = De(), n =
|
|
4313
|
+
const t = De(), n = Sl();
|
|
4304
4314
|
return (i, r) => (m(), S("div", {
|
|
4305
4315
|
"aria-labelledby": e.title ? $(n) : void 0,
|
|
4306
4316
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4307
4317
|
role: "group"
|
|
4308
4318
|
}, [
|
|
4309
|
-
R("div",
|
|
4319
|
+
R("div", Tl, [
|
|
4310
4320
|
e.hideInfoHeader ? N("", !0) : (m(), S("div", {
|
|
4311
4321
|
key: 0,
|
|
4312
4322
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4313
4323
|
}, [
|
|
4314
|
-
e.title ? (m(),
|
|
4324
|
+
e.title ? (m(), D(je(e.titleTag), {
|
|
4315
4325
|
key: 0,
|
|
4316
4326
|
id: $(n),
|
|
4317
4327
|
class: "form-section-title"
|
|
4318
4328
|
}, {
|
|
4319
|
-
default:
|
|
4329
|
+
default: _(() => [
|
|
4320
4330
|
q(L(e.title), 1)
|
|
4321
4331
|
]),
|
|
4322
4332
|
_: 1
|
|
4323
4333
|
}, 8, ["id"])) : N("", !0),
|
|
4324
|
-
e.description || $(t).description ? (m(), S("div",
|
|
4325
|
-
|
|
4334
|
+
e.description || $(t).description ? (m(), S("div", Il, [
|
|
4335
|
+
j(i.$slots, "description", {}, () => [
|
|
4326
4336
|
R("p", null, L(e.description), 1)
|
|
4327
4337
|
], !0)
|
|
4328
4338
|
])) : N("", !0),
|
|
4329
|
-
$(t).footer ? (m(), S("div",
|
|
4330
|
-
|
|
4339
|
+
$(t).footer ? (m(), S("div", El, [
|
|
4340
|
+
j(i.$slots, "footer", {}, void 0, !0)
|
|
4331
4341
|
])) : N("", !0)
|
|
4332
4342
|
], 2)),
|
|
4333
|
-
R("div",
|
|
4334
|
-
|
|
4343
|
+
R("div", Fl, [
|
|
4344
|
+
j(i.$slots, "default", {}, void 0, !0)
|
|
4335
4345
|
])
|
|
4336
4346
|
])
|
|
4337
|
-
], 10,
|
|
4347
|
+
], 10, $l));
|
|
4338
4348
|
}
|
|
4339
|
-
}),
|
|
4349
|
+
}), Cs = /* @__PURE__ */ se(Ol, [["__scopeId", "data-v-b1f74200"]]), Ll = { class: "ff-form-section" }, Bl = { class: "header" }, Rl = {
|
|
4340
4350
|
key: 0,
|
|
4341
4351
|
class: "step"
|
|
4342
|
-
},
|
|
4352
|
+
}, Kl = { class: "header-content" }, Nl = { class: "header-title" }, Ml = {
|
|
4343
4353
|
key: 0,
|
|
4344
4354
|
class: "header-description"
|
|
4345
|
-
},
|
|
4355
|
+
}, jl = {
|
|
4346
4356
|
key: 1,
|
|
4347
4357
|
class: "header-extra"
|
|
4348
|
-
},
|
|
4358
|
+
}, Dl = { class: "content" }, Pl = /* @__PURE__ */ z({
|
|
4349
4359
|
__name: "EntityFormBlock",
|
|
4350
4360
|
props: {
|
|
4351
4361
|
step: {},
|
|
@@ -4354,37 +4364,37 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4354
4364
|
},
|
|
4355
4365
|
setup(e) {
|
|
4356
4366
|
const t = De();
|
|
4357
|
-
return (n, i) => (m(), S("div",
|
|
4358
|
-
R("header",
|
|
4359
|
-
e.step != null ? (m(), S("div",
|
|
4360
|
-
R("div",
|
|
4361
|
-
R("h2",
|
|
4362
|
-
|
|
4367
|
+
return (n, i) => (m(), S("div", Ll, [
|
|
4368
|
+
R("header", Bl, [
|
|
4369
|
+
e.step != null ? (m(), S("div", Rl, L(e.step), 1)) : N("", !0),
|
|
4370
|
+
R("div", Kl, [
|
|
4371
|
+
R("h2", Nl, [
|
|
4372
|
+
j(n.$slots, "title", {}, () => [
|
|
4363
4373
|
q(L(e.title), 1)
|
|
4364
4374
|
], !0)
|
|
4365
4375
|
]),
|
|
4366
|
-
e.description || t.description ? (m(), S("div",
|
|
4367
|
-
|
|
4376
|
+
e.description || t.description ? (m(), S("div", Ml, [
|
|
4377
|
+
j(n.$slots, "description", {}, () => [
|
|
4368
4378
|
q(L(e.description), 1)
|
|
4369
4379
|
], !0)
|
|
4370
4380
|
])) : N("", !0)
|
|
4371
4381
|
]),
|
|
4372
|
-
t.extra ? (m(), S("div",
|
|
4373
|
-
|
|
4382
|
+
t.extra ? (m(), S("div", jl, [
|
|
4383
|
+
j(n.$slots, "extra", {}, void 0, !0)
|
|
4374
4384
|
])) : N("", !0)
|
|
4375
4385
|
]),
|
|
4376
|
-
R("div",
|
|
4377
|
-
|
|
4386
|
+
R("div", Dl, [
|
|
4387
|
+
j(n.$slots, "default", {}, void 0, !0)
|
|
4378
4388
|
])
|
|
4379
4389
|
]));
|
|
4380
4390
|
}
|
|
4381
|
-
}),
|
|
4391
|
+
}), ks = /* @__PURE__ */ se(Pl, [["__scopeId", "data-v-cb6d2e95"]]), Ul = {
|
|
4382
4392
|
class: "kong-ui-public-entity-link",
|
|
4383
4393
|
"data-testid": "entity-link-parent"
|
|
4384
|
-
},
|
|
4394
|
+
}, ql = {
|
|
4385
4395
|
key: 0,
|
|
4386
4396
|
class: "deleted-entity"
|
|
4387
|
-
},
|
|
4397
|
+
}, Hl = { key: 1 }, Vl = ["onClick"], Yl = /* @__PURE__ */ z({
|
|
4388
4398
|
__name: "EntityLink",
|
|
4389
4399
|
props: {
|
|
4390
4400
|
entityLinkData: {
|
|
@@ -4408,7 +4418,7 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4408
4418
|
}
|
|
4409
4419
|
},
|
|
4410
4420
|
setup(e) {
|
|
4411
|
-
const t = e, n = K(), { isTruncated: i } =
|
|
4421
|
+
const t = e, n = K(), { isTruncated: i } = W.useTruncationDetector(n), { i18n: { t: r } } = W.useI18n(), o = r("global.actions.copyId"), a = K(o), s = F(() => t.entityLinkData.deleted ?? !1), l = F(() => {
|
|
4412
4422
|
var u;
|
|
4413
4423
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4414
4424
|
}), c = F(() => {
|
|
@@ -4421,19 +4431,19 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4421
4431
|
};
|
|
4422
4432
|
return (u, p) => {
|
|
4423
4433
|
const g = P("KTooltip"), h = P("KExternalLink"), x = P("KClipboardProvider");
|
|
4424
|
-
return m(), S("div",
|
|
4425
|
-
s.value ? (m(), S("div",
|
|
4434
|
+
return m(), S("div", Ul, [
|
|
4435
|
+
s.value ? (m(), S("div", ql, L(c.value), 1)) : l.value ? l.value ? (m(), D(h, {
|
|
4426
4436
|
key: 2,
|
|
4427
4437
|
class: "entity-link",
|
|
4428
4438
|
"hide-icon": !e.newWindow,
|
|
4429
4439
|
href: e.externalLink,
|
|
4430
4440
|
target: e.newWindow ? "_blank" : "_self"
|
|
4431
4441
|
}, {
|
|
4432
|
-
default:
|
|
4442
|
+
default: _(() => [
|
|
4433
4443
|
M(g, {
|
|
4434
4444
|
text: $(i) && e.entityLinkData.label || ""
|
|
4435
4445
|
}, {
|
|
4436
|
-
default:
|
|
4446
|
+
default: _(() => [
|
|
4437
4447
|
R("span", {
|
|
4438
4448
|
ref_key: "textContent",
|
|
4439
4449
|
ref: n,
|
|
@@ -4444,28 +4454,28 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4444
4454
|
}, 8, ["text"])
|
|
4445
4455
|
]),
|
|
4446
4456
|
_: 1
|
|
4447
|
-
}, 8, ["hide-icon", "href", "target"])) : N("", !0) : (m(), S("div",
|
|
4448
|
-
l.value && e.allowCopy ? (m(),
|
|
4457
|
+
}, 8, ["hide-icon", "href", "target"])) : N("", !0) : (m(), S("div", Hl, L(" – "))),
|
|
4458
|
+
l.value && e.allowCopy ? (m(), D(g, {
|
|
4449
4459
|
key: a.value,
|
|
4450
4460
|
class: "copy-uuid-tooltip",
|
|
4451
4461
|
"max-width": "160",
|
|
4452
4462
|
placement: "bottom-end",
|
|
4453
4463
|
text: a.value
|
|
4454
4464
|
}, {
|
|
4455
|
-
default:
|
|
4465
|
+
default: _(() => [
|
|
4456
4466
|
M(x, null, {
|
|
4457
|
-
default:
|
|
4467
|
+
default: _(({ copyToClipboard: y }) => [
|
|
4458
4468
|
R("span", {
|
|
4459
4469
|
class: "entity-link-copy-id",
|
|
4460
4470
|
onClick: Le((k) => d(y), ["stop"])
|
|
4461
4471
|
}, [
|
|
4462
|
-
M($(
|
|
4472
|
+
M($(oi), {
|
|
4463
4473
|
class: "copy-icon",
|
|
4464
|
-
color: $(
|
|
4474
|
+
color: $(Zi),
|
|
4465
4475
|
"data-testid": "copy-id",
|
|
4466
|
-
size: $(
|
|
4476
|
+
size: $(er)
|
|
4467
4477
|
}, null, 8, ["color", "size"])
|
|
4468
|
-
], 8,
|
|
4478
|
+
], 8, Vl)
|
|
4469
4479
|
]),
|
|
4470
4480
|
_: 1
|
|
4471
4481
|
})
|
|
@@ -4475,34 +4485,34 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4475
4485
|
]);
|
|
4476
4486
|
};
|
|
4477
4487
|
}
|
|
4478
|
-
}),
|
|
4488
|
+
}), As = /* @__PURE__ */ se(Yl, [["__scopeId", "data-v-96efdfa5"]]), Wl = { class: "kong-ui-public-entity-empty-state" }, Jl = { class: "entity-empty-state-content" }, Gl = {
|
|
4479
4489
|
key: 0,
|
|
4480
4490
|
class: "empty-state-image"
|
|
4481
|
-
},
|
|
4491
|
+
}, zl = {
|
|
4482
4492
|
key: 1,
|
|
4483
4493
|
class: "entity-empty-state-title"
|
|
4484
|
-
},
|
|
4494
|
+
}, Ql = {
|
|
4485
4495
|
key: 2,
|
|
4486
4496
|
class: "entity-empty-state-description"
|
|
4487
|
-
},
|
|
4497
|
+
}, Zl = {
|
|
4488
4498
|
key: 3,
|
|
4489
4499
|
class: "entity-empty-state-pricing"
|
|
4490
|
-
},
|
|
4500
|
+
}, Xl = {
|
|
4491
4501
|
key: 0,
|
|
4492
4502
|
class: "entity-empty-state-message"
|
|
4493
|
-
},
|
|
4503
|
+
}, es = {
|
|
4494
4504
|
key: 1,
|
|
4495
4505
|
class: "entity-empty-state-action"
|
|
4496
|
-
},
|
|
4506
|
+
}, ts = {
|
|
4497
4507
|
key: 2,
|
|
4498
4508
|
class: "entity-empty-state-card-container"
|
|
4499
|
-
},
|
|
4509
|
+
}, ns = {
|
|
4500
4510
|
key: 0,
|
|
4501
4511
|
class: "feature-icon"
|
|
4502
|
-
},
|
|
4512
|
+
}, is = { class: "card-header" }, rs = ["title"], as = {
|
|
4503
4513
|
key: 3,
|
|
4504
4514
|
class: "entity-empty-state-bottom-container"
|
|
4505
|
-
},
|
|
4515
|
+
}, os = /* @__PURE__ */ z({
|
|
4506
4516
|
__name: "EntityEmptyState",
|
|
4507
4517
|
props: {
|
|
4508
4518
|
appearance: {
|
|
@@ -4543,100 +4553,100 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4543
4553
|
},
|
|
4544
4554
|
emits: ["click:create", "click:learn-more"],
|
|
4545
4555
|
setup(e) {
|
|
4546
|
-
const t = e, { i18n: { t: n } } =
|
|
4556
|
+
const t = e, { i18n: { t: n } } = W.useI18n(), i = K(!1), r = F(() => i.value && !!t.actionButtonText), o = F(() => ht.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4547
4557
|
return nt(async () => {
|
|
4548
4558
|
i.value = await t.canCreate();
|
|
4549
|
-
}), tt(() =>
|
|
4559
|
+
}), tt(() => Zn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4550
4560
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) => {
|
|
4551
4561
|
const l = P("KCard");
|
|
4552
|
-
return m(), S("div",
|
|
4553
|
-
R("div",
|
|
4562
|
+
return m(), S("div", Wl, [
|
|
4563
|
+
R("div", Jl, [
|
|
4554
4564
|
a.$slots.image ? (m(), S("div", Gl, [
|
|
4555
|
-
|
|
4565
|
+
j(a.$slots, "image", {}, void 0, !0)
|
|
4556
4566
|
])) : N("", !0),
|
|
4557
|
-
e.title || a.$slots.title ? (m(), S("div",
|
|
4567
|
+
e.title || a.$slots.title ? (m(), S("div", zl, [
|
|
4558
4568
|
R("h1", {
|
|
4559
4569
|
class: fe(o.value)
|
|
4560
4570
|
}, [
|
|
4561
|
-
|
|
4571
|
+
j(a.$slots, "title", {}, () => [
|
|
4562
4572
|
q(L(e.title), 1)
|
|
4563
4573
|
], !0)
|
|
4564
4574
|
], 2)
|
|
4565
4575
|
])) : N("", !0),
|
|
4566
|
-
e.description || a.$slots.default ? (m(), S("div",
|
|
4567
|
-
|
|
4576
|
+
e.description || a.$slots.default ? (m(), S("div", Ql, [
|
|
4577
|
+
j(a.$slots, "default", {}, () => [
|
|
4568
4578
|
R("p", null, L(e.description), 1)
|
|
4569
4579
|
], !0)
|
|
4570
4580
|
])) : N("", !0),
|
|
4571
|
-
e.pricing || a.$slots.pricing ? (m(), S("div",
|
|
4581
|
+
e.pricing || a.$slots.pricing ? (m(), S("div", Zl, [
|
|
4572
4582
|
R("p", null, [
|
|
4573
4583
|
R("b", null, L($(n)("emptyState.pricingTitle")), 1),
|
|
4574
4584
|
s[2] || (s[2] = q()),
|
|
4575
|
-
|
|
4585
|
+
j(a.$slots, "pricing", {}, () => [
|
|
4576
4586
|
q(L(e.pricing), 1)
|
|
4577
4587
|
], !0)
|
|
4578
4588
|
])
|
|
4579
4589
|
])) : N("", !0)
|
|
4580
4590
|
]),
|
|
4581
|
-
a.$slots.message ? (m(), S("div",
|
|
4582
|
-
|
|
4591
|
+
a.$slots.message ? (m(), S("div", Xl, [
|
|
4592
|
+
j(a.$slots, "message", {}, void 0, !0)
|
|
4583
4593
|
])) : N("", !0),
|
|
4584
|
-
r.value || e.learnMore || a.$slots.actions ? (m(), S("div",
|
|
4585
|
-
|
|
4586
|
-
r.value ? (m(),
|
|
4594
|
+
r.value || e.learnMore || a.$slots.actions ? (m(), S("div", es, [
|
|
4595
|
+
j(a.$slots, "actions", {}, () => [
|
|
4596
|
+
r.value ? (m(), D($(mt), {
|
|
4587
4597
|
key: 0,
|
|
4588
4598
|
appearance: "primary",
|
|
4589
4599
|
"data-testid": "entity-create-button",
|
|
4590
4600
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4591
4601
|
onClick: s[0] || (s[0] = (c) => a.$emit("click:create"))
|
|
4592
4602
|
}, {
|
|
4593
|
-
default:
|
|
4594
|
-
M($(
|
|
4603
|
+
default: _(() => [
|
|
4604
|
+
M($(Jt)),
|
|
4595
4605
|
q(" " + L(e.actionButtonText), 1)
|
|
4596
4606
|
]),
|
|
4597
4607
|
_: 1
|
|
4598
4608
|
}, 8, ["size"])) : N("", !0),
|
|
4599
|
-
e.learnMore ? (m(),
|
|
4609
|
+
e.learnMore ? (m(), D($(mt), {
|
|
4600
4610
|
key: 1,
|
|
4601
4611
|
appearance: "secondary",
|
|
4602
4612
|
"data-testid": "entity-learn-more-button",
|
|
4603
4613
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4604
4614
|
onClick: s[1] || (s[1] = (c) => a.$emit("click:learn-more"))
|
|
4605
4615
|
}, {
|
|
4606
|
-
default:
|
|
4607
|
-
M($(
|
|
4616
|
+
default: _(() => [
|
|
4617
|
+
M($(Wt), { decorative: "" }),
|
|
4608
4618
|
q(" " + L($(n)("emptyState.learnMore")), 1)
|
|
4609
4619
|
]),
|
|
4610
4620
|
_: 1
|
|
4611
4621
|
}, 8, ["size"])) : N("", !0)
|
|
4612
4622
|
], !0)
|
|
4613
4623
|
])) : N("", !0),
|
|
4614
|
-
e.features.length ? (m(), S("div",
|
|
4615
|
-
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(),
|
|
4624
|
+
e.features.length ? (m(), S("div", ts, [
|
|
4625
|
+
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(), D(l, {
|
|
4616
4626
|
key: c,
|
|
4617
4627
|
class: "entity-empty-state-card"
|
|
4618
4628
|
}, {
|
|
4619
|
-
title:
|
|
4620
|
-
a.$slots[`feature-${d}-icon`] ? (m(), S("div",
|
|
4621
|
-
|
|
4629
|
+
title: _(() => [
|
|
4630
|
+
a.$slots[`feature-${d}-icon`] ? (m(), S("div", ns, [
|
|
4631
|
+
j(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4622
4632
|
])) : N("", !0),
|
|
4623
|
-
R("div",
|
|
4633
|
+
R("div", is, L(c.title), 1)
|
|
4624
4634
|
]),
|
|
4625
|
-
default:
|
|
4635
|
+
default: _(() => [
|
|
4626
4636
|
R("div", {
|
|
4627
4637
|
title: c.description
|
|
4628
|
-
}, L(c.description), 9,
|
|
4638
|
+
}, L(c.description), 9, rs)
|
|
4629
4639
|
]),
|
|
4630
4640
|
_: 2
|
|
4631
4641
|
}, 1024))), 128))
|
|
4632
4642
|
])) : N("", !0),
|
|
4633
|
-
a.$slots.bottom ? (m(), S("div",
|
|
4634
|
-
|
|
4643
|
+
a.$slots.bottom ? (m(), S("div", as, [
|
|
4644
|
+
j(a.$slots, "bottom", {}, void 0, !0)
|
|
4635
4645
|
])) : N("", !0)
|
|
4636
4646
|
]);
|
|
4637
4647
|
};
|
|
4638
4648
|
}
|
|
4639
|
-
}),
|
|
4649
|
+
}), _s = /* @__PURE__ */ se(os, [["__scopeId", "data-v-645aae54"]]), ls = { key: 1 }, ws = /* @__PURE__ */ z({
|
|
4640
4650
|
__name: "TableTags",
|
|
4641
4651
|
props: {
|
|
4642
4652
|
/** The tags to display in the table */
|
|
@@ -4664,56 +4674,53 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4664
4674
|
});
|
|
4665
4675
|
return (i, r) => {
|
|
4666
4676
|
var o;
|
|
4667
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(),
|
|
4668
|
-
default:
|
|
4669
|
-
(m(!0), S(ue, null, ce(n.value, (a) => (m(),
|
|
4677
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(), D($(ni), { key: 0 }, {
|
|
4678
|
+
default: _(() => [
|
|
4679
|
+
(m(!0), S(ue, null, ce(n.value, (a) => (m(), D($(ii), {
|
|
4670
4680
|
key: a,
|
|
4671
4681
|
"max-width": e.tagMaxWidth,
|
|
4672
4682
|
onClick: r[0] || (r[0] = Le(() => {
|
|
4673
4683
|
}, ["stop"]))
|
|
4674
4684
|
}, {
|
|
4675
|
-
default:
|
|
4685
|
+
default: _(() => [
|
|
4676
4686
|
q(L(a), 1)
|
|
4677
4687
|
]),
|
|
4678
4688
|
_: 2
|
|
4679
4689
|
}, 1032, ["max-width"]))), 128))
|
|
4680
4690
|
]),
|
|
4681
4691
|
_: 1
|
|
4682
|
-
})) : (m(), S("span",
|
|
4692
|
+
})) : (m(), S("span", ls, "-"));
|
|
4683
4693
|
};
|
|
4684
4694
|
}
|
|
4685
|
-
}),
|
|
4686
|
-
KM_1945_NEW_PLUGIN_CONFIG_FORM: Symbol("KM_1945_NEW_PLUGIN_CONFIG_FORM")
|
|
4687
|
-
}, { useAxios: Ss, useDeleteUrlBuilder: $s, useErrors: Ts, useExternalLinkCreator: Is, useFetchUrlBuilder: Es, useFetcher: Fs, useFetcherCacheKey: Os, useDebouncedFilter: Ls, useStringHelpers: Bs, useHelpers: Rs, useGatewayFeatureSupported: Ks, useTruncationDetector: Ns, useValidators: Ms, useSchemaProvider: js, useTableState: Ds } = Y;
|
|
4695
|
+
}), { useAxios: Ss, useDeleteUrlBuilder: $s, useErrors: Ts, useExternalLinkCreator: Is, useFetchUrlBuilder: Es, useFetcher: Fs, useFetcherCacheKey: Os, useDebouncedFilter: Ls, useStringHelpers: Bs, useHelpers: Rs, useGatewayFeatureSupported: Ks, useTruncationDetector: Ns, useValidators: Ms, useSchemaProvider: js, useTableState: Ds } = W;
|
|
4688
4696
|
export {
|
|
4689
4697
|
ht as Appearances,
|
|
4690
|
-
|
|
4691
|
-
|
|
4698
|
+
qo as ConfigCardDisplay,
|
|
4699
|
+
tn as ConfigCardItem,
|
|
4692
4700
|
ae as ConfigurationSchemaSection,
|
|
4693
4701
|
V as ConfigurationSchemaType,
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
ws as FEATURE_FLAGS,
|
|
4702
|
+
ms as EntityBaseConfigCard,
|
|
4703
|
+
hs as EntityBaseForm,
|
|
4704
|
+
ci as EntityBaseFormType,
|
|
4705
|
+
gs as EntityBaseTable,
|
|
4706
|
+
ys as EntityDeleteModal,
|
|
4707
|
+
_s as EntityEmptyState,
|
|
4708
|
+
vs as EntityFilter,
|
|
4709
|
+
ks as EntityFormBlock,
|
|
4710
|
+
Cs as EntityFormSection,
|
|
4711
|
+
As as EntityLink,
|
|
4712
|
+
bs as EntityToggleModal,
|
|
4713
|
+
si as EntityTypes,
|
|
4714
|
+
ui as EventGatewayTypesArray,
|
|
4708
4715
|
me as FetcherStatus,
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4716
|
+
Wi as InternalLinkItem,
|
|
4717
|
+
nn as JsonCodeBlock,
|
|
4718
|
+
xs as PermissionsWrapper,
|
|
4712
4719
|
it as SupportedEntityType,
|
|
4713
4720
|
Pe as SupportedEntityTypesArray,
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4721
|
+
ws as TableTags,
|
|
4722
|
+
Wn as TerraformCodeBlock,
|
|
4723
|
+
Yn as YamlCodeBlock,
|
|
4717
4724
|
Ss as useAxios,
|
|
4718
4725
|
Ls as useDebouncedFilter,
|
|
4719
4726
|
$s as useDeleteUrlBuilder,
|