@kong-ui-public/entities-consumer-groups 2.1.8 → 2.1.9-pr.985.f73a9541.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.
@@ -2,7 +2,7 @@ import { defineComponent as ae, ref as E, computed as $, watch as Ae, renderSlot
2
2
  import { useRouter as _t } from "vue-router";
3
3
  import { createI18n as It, i18nTComponent as yn } from "@kong-ui-public/i18n";
4
4
  import wr from "axios";
5
- import { MethodsArray as _r } from "@kong/kongponents";
5
+ import { BadgeMethodAppearances as _r } from "@kong/kongponents";
6
6
  const Ir = {
7
7
  list: {
8
8
  table_headers: {
@@ -355,43 +355,43 @@ function Pr(e, n, t, r = {
355
355
  t || (t = "100");
356
356
  const { axiosInstance: a } = At({
357
357
  headers: e.requestHeaders
358
- }), { i18n: { t: o } } = xt(), { debounce: i } = Sr(), s = i(async (h) => {
359
- await K(h);
358
+ }), { i18n: { t: o } } = xt(), { debounce: i } = Sr(), s = i(async (_) => {
359
+ await K(_);
360
360
  }, 200), l = E(!1), c = E(""), d = E(""), u = E([]), g = E([]), f = E(void 0), I = y(n);
361
361
  let b = `${e.apiBaseUrl}${I}`;
362
362
  e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
363
363
  const { isValidUuid: p } = vn(), A = async () => {
364
364
  try {
365
365
  l.value = !0;
366
- const { data: h } = await a.get(`${b}?size=${t}`);
367
- h != null && h.next || (f.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : [], u.value = g.value;
366
+ const { data: _ } = await a.get(`${b}?size=${t}`);
367
+ _ != null && _.next || (f.value = r.fetchedItemsKey in _ ? _[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in _ ? _[r.fetchedItemsKey] : [], u.value = g.value;
368
368
  } catch {
369
369
  u.value = [], c.value = o("debouncedFilter.errors.fetch");
370
370
  } finally {
371
371
  l.value = !1;
372
372
  }
373
- }, C = E(""), K = async (h) => {
373
+ }, h = E(""), K = async (_) => {
374
374
  var D, se, Y;
375
- if (C.value !== h)
376
- if (C.value = h || "", f.value === void 0)
375
+ if (h.value !== _)
376
+ if (h.value = _ || "", f.value === void 0)
377
377
  try {
378
378
  if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
379
- let _ = b + "";
380
- h && (_ += `/${h}`);
381
- const { data: N } = await a.get(`${_}?size=${t}`);
379
+ let w = b + "";
380
+ _ && (w += `/${_}`);
381
+ const { data: N } = await a.get(`${w}?size=${t}`);
382
382
  r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
383
- } else if (h) {
384
- const _ = [];
385
- p(h) && r.searchKeys.includes("id") ? _.push((async () => {
386
- const { data: k } = await a.get(`${b}/${h}`);
383
+ } else if (_) {
384
+ const w = [];
385
+ p(_) && r.searchKeys.includes("id") ? w.push((async () => {
386
+ const { data: k } = await a.get(`${b}/${_}`);
387
387
  return [k[r.fetchedItemsKey] ?? k];
388
- })()) : _.push(
388
+ })()) : w.push(
389
389
  ...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
390
- const { data: x } = await a.get(`${b}?${k}=${h}`);
390
+ const { data: x } = await a.get(`${b}?${k}=${_}`);
391
391
  return x[r.fetchedItemsKey];
392
392
  })
393
393
  );
394
- const N = await Promise.all(_), R = /* @__PURE__ */ new Set();
394
+ const N = await Promise.all(w), R = /* @__PURE__ */ new Set();
395
395
  u.value = [], (D = N == null ? void 0 : N.forEach) == null || D.call(N, (k) => {
396
396
  var x;
397
397
  (x = k == null ? void 0 : k.forEach) == null || x.call(k, (S) => {
@@ -400,18 +400,18 @@ function Pr(e, n, t, r = {
400
400
  });
401
401
  } else
402
402
  u.value = g.value;
403
- } catch (_) {
404
- ((se = _ == null ? void 0 : _.response) == null ? void 0 : se.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
403
+ } catch (w) {
404
+ ((se = w == null ? void 0 : w.response) == null ? void 0 : se.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
405
405
  } finally {
406
406
  l.value = !1;
407
407
  }
408
408
  else
409
- l.value = !0, d.value = "", h ? (u.value = (Y = f.value) == null ? void 0 : Y.filter((_) => {
409
+ l.value = !0, d.value = "", _ ? (u.value = (Y = f.value) == null ? void 0 : Y.filter((w) => {
410
410
  var N;
411
411
  let R = !1;
412
412
  for (const k of r.searchKeys) {
413
- const x = typeof _[k] == "string" ? (N = _[k]) == null ? void 0 : N.toLowerCase() : _[k];
414
- x != null && x.includes(h.toLowerCase()) && (R = !0);
413
+ const x = typeof w[k] == "string" ? (N = w[k]) == null ? void 0 : N.toLowerCase() : w[k];
414
+ x != null && x.includes(_.toLowerCase()) && (R = !0);
415
415
  }
416
416
  return R;
417
417
  }), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
@@ -977,10 +977,10 @@ const ce = {
977
977
  setup(e, { emit: n }) {
978
978
  const t = e;
979
979
  gr((f) => ({
980
- "23f3018c": c.value ? "none" : `solid ${y(_a)} ${y(Ca)}`,
981
- "3815ec6d": l.value && i.value ? "block" : "flex",
982
- "1957f153": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
983
- "195a372e": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
980
+ "0fea14db": c.value ? "none" : `solid ${y(_a)} ${y(Ca)}`,
981
+ "1cf0460e": l.value && i.value ? "block" : "flex",
982
+ "328cca12": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
983
+ "328f0fed": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
984
984
  }));
985
985
  const r = lt(), { i18n: { t: a, formatUnixTimeStamp: o } } = ce.useI18n(), i = $(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = $(() => !!(t.item.tooltip || r["label-tooltip"])), l = $(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), c = $(() => t.item.type === ne.JsonArray), d = $(() => {
986
986
  switch (t.item.type) {
@@ -1110,7 +1110,7 @@ const ce = {
1110
1110
  }
1111
1111
  }), u = E(), { isTruncated: g } = ce.useTruncationDetector(u);
1112
1112
  return (f, I) => {
1113
- const b = L("KLabel"), p = L("KBadge"), A = L("KMethodBadge"), C = L("KTooltip");
1113
+ const b = L("KLabel"), p = L("KBadge"), A = L("KTooltip");
1114
1114
  return m(), M("div", Aa, [
1115
1115
  V("div", {
1116
1116
  class: "config-card-details-label",
@@ -1153,58 +1153,57 @@ const ce = {
1153
1153
  key: 0,
1154
1154
  "data-testid": `${e.item.key}-badge-tags`
1155
1155
  }, [
1156
- (m(!0), M(be, null, he(e.item.value, (K, h) => (m(), U(p, {
1157
- key: `${e.item.key}-badge-tag-${h}`,
1156
+ (m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(p, {
1157
+ key: `${e.item.key}-badge-tag-${K}`,
1158
1158
  class: "config-badge",
1159
- "data-testid": `${e.item.key}-badge-tag-${h}`,
1160
- "truncation-tooltip": K
1159
+ "data-testid": `${e.item.key}-badge-tag-${K}`,
1160
+ tooltip: h,
1161
+ "truncation-tooltip": ""
1161
1162
  }, {
1162
1163
  default: v(() => [
1163
- Q(O(K), 1)
1164
+ Q(O(h), 1)
1164
1165
  ]),
1165
1166
  _: 2
1166
- }, 1032, ["data-testid", "truncation-tooltip"]))), 128))
1167
+ }, 1032, ["data-testid", "tooltip"]))), 128))
1167
1168
  ], 8, ja)) : H("", !0),
1168
1169
  d.value.additionalComponent === "CopyUuid" ? (m(), M("div", {
1169
1170
  key: 1,
1170
1171
  class: "copy-uuid-array",
1171
1172
  "data-testid": `${e.item.key}-copy-uuid-array`
1172
1173
  }, [
1173
- (m(!0), M(be, null, he(e.item.value, (K, h) => (m(), U(y(wn), ht(d.value.childAttrs, {
1174
- key: `${e.item.key}-copy-uuid-${h}`,
1175
- "data-testid": `${e.item.key}-copy-uuid-${h}`,
1176
- uuid: K
1174
+ (m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(y(wn), ht(d.value.childAttrs, {
1175
+ key: `${e.item.key}-copy-uuid-${K}`,
1176
+ "data-testid": `${e.item.key}-copy-uuid-${K}`,
1177
+ uuid: h
1177
1178
  }), null, 16, ["data-testid", "uuid"]))), 128))
1178
1179
  ], 8, Ea)) : d.value.additionalComponent === "KMethodBadge" ? (m(), M("div", {
1179
1180
  key: 2,
1180
1181
  class: "method-badge-array",
1181
1182
  "data-testid": `${e.item.key}-badge-methods`
1182
1183
  }, [
1183
- (m(!0), M(be, null, he(e.item.value, (K, h) => (m(), U(A, {
1184
- key: `${e.item.key}-badge-method-${h}`,
1184
+ (m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(p, {
1185
+ key: `${e.item.key}-badge-method-${K}`,
1186
+ appearance: Object.values(y(_r)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
1185
1187
  class: "config-badge",
1186
- "data-testid": `${e.item.key}-badge-method-${h}`,
1187
- "is-rounded": "",
1188
- label: K,
1189
- method: y(_r).includes(K.toLowerCase()) ? K.toLowerCase() : "custom"
1188
+ "data-testid": `${e.item.key}-badge-method-${K}`
1190
1189
  }, {
1191
1190
  default: v(() => [
1192
- Q(O(K), 1)
1191
+ Q(O(h), 1)
1193
1192
  ]),
1194
1193
  _: 2
1195
- }, 1032, ["data-testid", "label", "method"]))), 128))
1194
+ }, 1032, ["appearance", "data-testid"]))), 128))
1196
1195
  ], 8, Oa)) : H("", !0),
1197
1196
  d.value.additionalComponent === "JsonCardItem" ? (m(), M("div", {
1198
1197
  key: 3,
1199
1198
  "data-testid": `${t.item.key}-json-array-content`
1200
1199
  }, [
1201
- (m(!0), M(be, null, he(e.item.value, (K, h) => (m(), U(_n, {
1202
- key: `json-array-item-${h}`,
1203
- index: h,
1200
+ (m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(_n, {
1201
+ key: `json-array-item-${K}`,
1202
+ index: K,
1204
1203
  "is-array-item": "",
1205
- item: K
1204
+ item: h
1206
1205
  }, null, 8, ["index", "item"]))), 128))
1207
- ], 8, Ka)) : (m(), U(C, {
1206
+ ], 8, Ka)) : (m(), U(A, {
1208
1207
  key: 4,
1209
1208
  label: y(g) ? e.item.value : ""
1210
1209
  }, {
@@ -1229,7 +1228,7 @@ const ce = {
1229
1228
  ]);
1230
1229
  };
1231
1230
  }
1232
- }), St = /* @__PURE__ */ Ce(Na, [["__scopeId", "data-v-e851fc7c"]]);
1231
+ }), St = /* @__PURE__ */ Ce(Na, [["__scopeId", "data-v-4c7d8cc3"]]);
1233
1232
  /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
1234
1233
  function In(e) {
1235
1234
  return typeof e > "u" || e === null;
@@ -2023,17 +2022,17 @@ function Yo(e, n) {
2023
2022
  j(e, "unexpected end of the stream within a double quoted scalar");
2024
2023
  }
2025
2024
  function Wo(e, n) {
2026
- var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), b, p, A, C;
2027
- if (C = e.input.charCodeAt(e.position), C === 91)
2025
+ var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), b, p, A, h;
2026
+ if (h = e.input.charCodeAt(e.position), h === 91)
2028
2027
  d = 93, f = !1, s = [];
2029
- else if (C === 123)
2028
+ else if (h === 123)
2030
2029
  d = 125, f = !0, s = {};
2031
2030
  else
2032
2031
  return !1;
2033
- for (e.anchor !== null && (e.anchorMap[e.anchor] = s), C = e.input.charCodeAt(++e.position); C !== 0; ) {
2034
- if (ie(e, !0, n), C = e.input.charCodeAt(e.position), C === d)
2032
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = s), h = e.input.charCodeAt(++e.position); h !== 0; ) {
2033
+ if (ie(e, !0, n), h = e.input.charCodeAt(e.position), h === d)
2035
2034
  return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
2036
- t ? C === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = g = !1, C === 63 && (c = e.input.charCodeAt(e.position + 1), ve(c) && (u = g = !0, e.position++, ie(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Re(e, n, rt, !1, !0), p = e.tag, b = e.result, ie(e, !0, n), C = e.input.charCodeAt(e.position), (g || e.line === r) && C === 58 && (u = !0, C = e.input.charCodeAt(++e.position), ie(e, !0, n), Re(e, n, rt, !1, !0), A = e.result), f ? Ve(e, s, I, p, b, A, r, a, o) : u ? s.push(Ve(e, null, I, p, b, A, r, a, o)) : s.push(b), ie(e, !0, n), C = e.input.charCodeAt(e.position), C === 44 ? (t = !0, C = e.input.charCodeAt(++e.position)) : t = !1;
2035
+ t ? h === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = g = !1, h === 63 && (c = e.input.charCodeAt(e.position + 1), ve(c) && (u = g = !0, e.position++, ie(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Re(e, n, rt, !1, !0), p = e.tag, b = e.result, ie(e, !0, n), h = e.input.charCodeAt(e.position), (g || e.line === r) && h === 58 && (u = !0, h = e.input.charCodeAt(++e.position), ie(e, !0, n), Re(e, n, rt, !1, !0), A = e.result), f ? Ve(e, s, I, p, b, A, r, a, o) : u ? s.push(Ve(e, null, I, p, b, A, r, a, o)) : s.push(b), ie(e, !0, n), h = e.input.charCodeAt(e.position), h === 44 ? (t = !0, h = e.input.charCodeAt(++e.position)) : t = !1;
2037
2036
  }
2038
2037
  j(e, "unexpected end of the stream within a flow collection");
2039
2038
  }
@@ -2101,20 +2100,20 @@ function en(e, n) {
2101
2100
  return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
2102
2101
  }
2103
2102
  function Qo(e, n, t) {
2104
- var r, a, o, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, b = null, p = !1, A = !1, C;
2103
+ var r, a, o, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, b = null, p = !1, A = !1, h;
2105
2104
  if (e.firstTabInLine !== -1)
2106
2105
  return !1;
2107
- for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
2108
- if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && ve(r))
2109
- C === 63 ? (p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !0, a = !0) : p ? (p = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = r;
2106
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = u), h = e.input.charCodeAt(e.position); h !== 0; ) {
2107
+ if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (h === 63 || h === 58) && ve(r))
2108
+ h === 63 ? (p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !0, a = !0) : p ? (p = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, h = r;
2110
2109
  else {
2111
2110
  if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Gn, !1, !0))
2112
2111
  break;
2113
2112
  if (e.line === o) {
2114
- for (C = e.input.charCodeAt(e.position); Ke(C); )
2115
- C = e.input.charCodeAt(++e.position);
2116
- if (C === 58)
2117
- C = e.input.charCodeAt(++e.position), ve(C) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, a = !1, f = e.tag, I = e.result;
2113
+ for (h = e.input.charCodeAt(e.position); Ke(h); )
2114
+ h = e.input.charCodeAt(++e.position);
2115
+ if (h === 58)
2116
+ h = e.input.charCodeAt(++e.position), ve(h) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, a = !1, f = e.tag, I = e.result;
2118
2117
  else if (A)
2119
2118
  j(e, "can not read an implicit mapping pair; a colon is missed");
2120
2119
  else
@@ -2124,7 +2123,7 @@ function Qo(e, n, t) {
2124
2123
  else
2125
2124
  return e.tag = c, e.anchor = d, !0;
2126
2125
  }
2127
- if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, a) && (p ? I = e.result : b = e.result), p || (Ve(e, u, g, f, I, b, i, s, l), f = I = b = null), ie(e, !0, -1), C = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && C !== 0)
2126
+ if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, a) && (p ? I = e.result : b = e.result), p || (Ve(e, u, g, f, I, b, i, s, l), f = I = b = null), ie(e, !0, -1), h = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && h !== 0)
2128
2127
  j(e, "bad indentation of a mapping entry");
2129
2128
  else if (e.lineIndent < n)
2130
2129
  break;
@@ -2899,8 +2898,8 @@ const as = {
2899
2898
  label: "YAML",
2900
2899
  value: "yaml"
2901
2900
  }
2902
- ], d = E("structured"), u = (_) => {
2903
- d.value = _ == null ? void 0 : _.value;
2901
+ ], d = E("structured"), u = (w) => {
2902
+ d.value = w == null ? void 0 : w.value;
2904
2903
  }, g = {
2905
2904
  id: {
2906
2905
  type: ne.ID,
@@ -2936,12 +2935,12 @@ const as = {
2936
2935
  section: ke.Basic
2937
2936
  }
2938
2937
  }, f = E(!1), I = E(!1), b = E(""), p = E(), A = $(() => {
2939
- var _, N, R;
2938
+ var w, N, R;
2940
2939
  if (!p.value)
2941
2940
  return [];
2942
2941
  const k = [], x = Object.keys(p.value).length;
2943
2942
  for (const S in p.value) {
2944
- const q = (N = (_ = r.configSchema) == null ? void 0 : _[S]) == null ? void 0 : N.order, J = (R = g[S]) == null ? void 0 : R.order;
2943
+ const q = (N = (w = r.configSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = (R = g[S]) == null ? void 0 : R.order;
2945
2944
  let X = x;
2946
2945
  (J || J === 0) && (X = J === -1 ? x + 1 : J), q && (X = q === -1 ? x + 1 : q), k.push([S, X]);
2947
2946
  }
@@ -2960,13 +2959,13 @@ const as = {
2960
2959
  section: te.section ?? ((le == null ? void 0 : le.section) || ke.Advanced)
2961
2960
  };
2962
2961
  }).filter((S) => !S.hidden && S.key !== r.pluginConfigKey);
2963
- }), C = $(() => {
2964
- var _, N;
2962
+ }), h = $(() => {
2963
+ var w, N;
2965
2964
  if (!p.value || !r.pluginConfigKey)
2966
2965
  return [];
2967
2966
  const R = p.value[r.pluginConfigKey] || {}, k = Object.keys(R).length, x = [];
2968
2967
  for (const S in R) {
2969
- const q = (N = (_ = r.pluginConfigSchema) == null ? void 0 : _[S]) == null ? void 0 : N.order, J = R[S];
2968
+ const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = R[S];
2970
2969
  let X = J != null && J !== "" ? k - 1 : k;
2971
2970
  q && (X = q === -1 ? k + 1 : q), x.push([S, X]);
2972
2971
  }
@@ -2986,50 +2985,50 @@ const as = {
2986
2985
  };
2987
2986
  }).filter((S) => !S.hidden);
2988
2987
  }), K = $(() => {
2989
- var _, N, R, k;
2988
+ var w, N, R, k;
2990
2989
  return {
2991
- basic: (_ = A.value) == null ? void 0 : _.filter((x) => x.section === ke.Basic),
2990
+ basic: (w = A.value) == null ? void 0 : w.filter((x) => x.section === ke.Basic),
2992
2991
  advanced: (N = A.value) == null ? void 0 : N.filter((x) => x.section === ke.Advanced),
2993
- plugin: (k = C.value) == null ? void 0 : k.concat((R = A.value) == null ? void 0 : R.filter((x) => x.section === ke.Plugin))
2992
+ plugin: (k = h.value) == null ? void 0 : k.concat((R = A.value) == null ? void 0 : R.filter((x) => x.section === ke.Plugin))
2994
2993
  };
2995
- }), h = $(() => {
2996
- const _ = [];
2997
- return K.value.basic.length && _.push("basic"), K.value.advanced.length && _.push("advanced"), K.value.plugin.length && _.push("plugin"), _;
2998
- }), D = (_) => !!(_.tooltip || a[`${_.key}-label-tooltip`]), se = $(() => {
2999
- var _, N;
2994
+ }), _ = $(() => {
2995
+ const w = [];
2996
+ return K.value.basic.length && w.push("basic"), K.value.advanced.length && w.push("advanced"), K.value.plugin.length && w.push("plugin"), w;
2997
+ }), D = (w) => !!(w.tooltip || a[`${w.key}-label-tooltip`]), se = $(() => {
2998
+ var w, N;
3000
2999
  let R = `${r.config.apiBaseUrl}${r.fetchUrl}`;
3001
- return r.config.app === "konnect" ? R = R.replace(/{controlPlaneId}/gi, ((_ = r.config) == null ? void 0 : _.controlPlaneId) || "") : r.config.app === "kongManager" && (R = R.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), R = R.replace(/{id}/gi, r.config.entityId), R;
3002
- }), Y = (_) => {
3003
- p.value && _(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
3000
+ return r.config.app === "konnect" ? R = R.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (R = R.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), R = R.replace(/{id}/gi, r.config.entityId), R;
3001
+ }), Y = (w) => {
3002
+ p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
3004
3003
  };
3005
- return Ae(f, (_) => {
3006
- n("loading", _);
3004
+ return Ae(f, (w) => {
3005
+ n("loading", w);
3007
3006
  }, { immediate: !0 }), ut(async () => {
3008
3007
  I.value = !1, f.value = !0;
3009
3008
  try {
3010
- const { data: _ } = await l.get(se.value);
3009
+ const { data: w } = await l.get(se.value);
3011
3010
  if (r.dataKey)
3012
- if (typeof _[r.dataKey] < "u")
3013
- p.value = { ..._[r.dataKey] };
3011
+ if (typeof w[r.dataKey] < "u")
3012
+ p.value = { ...w[r.dataKey] };
3014
3013
  else
3015
3014
  throw new Error(o("errors.dataKeyUndefined", { dataKey: r.dataKey }));
3016
3015
  else
3017
- p.value = { ..._ };
3016
+ p.value = { ...w };
3018
3017
  Object.keys(r.configSchema).filter((N) => r.configSchema[N].forceShow).forEach((N) => {
3019
3018
  p.value && typeof p.value[N] > "u" && (p.value[N] = null);
3020
- }), n("fetch:success", _);
3021
- } catch (_) {
3022
- const N = i(_);
3023
- b.value = N.startsWith("code") ? o("baseConfigCard.errors.load") : N, I.value = !0, n("fetch:error", _);
3019
+ }), n("fetch:success", w);
3020
+ } catch (w) {
3021
+ const N = i(w);
3022
+ b.value = N.startsWith("code") ? o("baseConfigCard.errors.load") : N, I.value = !0, n("fetch:error", w);
3024
3023
  } finally {
3025
3024
  f.value = !1;
3026
3025
  }
3027
- }), (_, N) => {
3026
+ }), (w, N) => {
3028
3027
  const R = L("KLabel"), k = L("KSelect"), x = L("KButton"), S = L("KClipboardProvider"), q = L("KSkeleton"), J = L("KEmptyState"), X = L("KCard");
3029
3028
  return m(), U(X, { class: "kong-ui-entity-base-config-card" }, $e({
3030
3029
  actions: v(() => [
3031
3030
  V("div", bs, [
3032
- Z(_.$slots, "actions", {}, void 0, !0),
3031
+ Z(w.$slots, "actions", {}, void 0, !0),
3033
3032
  e.config.jsonYamlEnabled ? (m(), U(R, {
3034
3033
  key: 0,
3035
3034
  class: "config-format-select-label",
@@ -3101,14 +3100,14 @@ const as = {
3101
3100
  e.config.jsonYamlEnabled ? (m(), M("div", Cs, [
3102
3101
  F(cs, {
3103
3102
  format: d.value,
3104
- "prop-list-types": h.value,
3103
+ "prop-list-types": _.value,
3105
3104
  "property-collections": K.value,
3106
3105
  record: p.value
3107
3106
  }, $e({ _: 2 }, [
3108
- he(Object.keys(_.$slots), (ee) => ({
3107
+ he(Object.keys(w.$slots), (ee) => ({
3109
3108
  name: ee,
3110
3109
  fn: v(({ row: te, rowValue: le }) => [
3111
- Z(_.$slots, ee, {
3110
+ Z(w.$slots, ee, {
3112
3111
  row: te,
3113
3112
  rowValue: le
3114
3113
  }, void 0, !0)
@@ -3116,7 +3115,7 @@ const as = {
3116
3115
  }))
3117
3116
  ]), 1032, ["format", "prop-list-types", "property-collections", "record"])
3118
3117
  ])) : (m(), M("div", ws, [
3119
- (m(!0), M(be, null, he(h.value, (ee) => (m(), M("div", {
3118
+ (m(!0), M(be, null, he(_.value, (ee) => (m(), M("div", {
3120
3119
  key: `config-card-details-${ee}-props`,
3121
3120
  class: Fe(`config-card-details-${ee}-props`),
3122
3121
  "data-testid": `config-card-details-${ee}-props`
@@ -3127,10 +3126,10 @@ const as = {
3127
3126
  item: te
3128
3127
  }, $e({
3129
3128
  label: v(() => [
3130
- Z(_.$slots, `${te.key}-label`, { row: te }, void 0, !0)
3129
+ Z(w.$slots, `${te.key}-label`, { row: te }, void 0, !0)
3131
3130
  ]),
3132
3131
  [te.key]: v(({ rowValue: le }) => [
3133
- Z(_.$slots, te.key, {
3132
+ Z(w.$slots, te.key, {
3134
3133
  row: te,
3135
3134
  rowValue: le
3136
3135
  }, void 0, !0)
@@ -3140,7 +3139,7 @@ const as = {
3140
3139
  D(te) ? {
3141
3140
  name: "label-tooltip",
3142
3141
  fn: v(() => [
3143
- Z(_.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
3142
+ Z(w.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
3144
3143
  ]),
3145
3144
  key: "0"
3146
3145
  } : void 0
@@ -3154,7 +3153,7 @@ const as = {
3154
3153
  name: "title",
3155
3154
  fn: v(() => [
3156
3155
  V("div", vs, [
3157
- Z(_.$slots, "title", {}, () => [
3156
+ Z(w.$slots, "title", {}, () => [
3158
3157
  Q(O(y(o)("baseConfigCard.title")), 1)
3159
3158
  ], !0)
3160
3159
  ])
@@ -3223,8 +3222,8 @@ const as = {
3223
3222
  var p, A;
3224
3223
  if (!r.editId)
3225
3224
  return "";
3226
- let C = `${r.config.apiBaseUrl}${r.fetchUrl}`;
3227
- return r.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), C = C.replace(/{id}/gi, r.editId), C;
3225
+ let h = `${r.config.apiBaseUrl}${r.fetchUrl}`;
3226
+ return r.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), h = h.replace(/{id}/gi, r.editId), h;
3228
3227
  }), f = () => {
3229
3228
  r.config.cancelRoute ? a.push(r.config.cancelRoute) : I();
3230
3229
  }, I = () => {
@@ -3247,10 +3246,10 @@ const as = {
3247
3246
  l.value = !1;
3248
3247
  }
3249
3248
  }), (p, A) => {
3250
- const C = L("KSkeleton"), K = L("KEmptyState"), h = L("KAlert"), D = L("KButton"), se = L("KCard");
3249
+ const h = L("KSkeleton"), K = L("KEmptyState"), _ = L("KAlert"), D = L("KButton"), se = L("KCard");
3251
3250
  return m(), U(se, { class: "kong-ui-entity-base-form" }, {
3252
3251
  default: v(() => [
3253
- l.value ? (m(), U(C, {
3252
+ l.value ? (m(), U(h, {
3254
3253
  key: 0,
3255
3254
  type: "form"
3256
3255
  })) : c.value ? (m(), U(K, {
@@ -3271,7 +3270,7 @@ const as = {
3271
3270
  onSubmit: nt(b, ["prevent"])
3272
3271
  }, [
3273
3272
  Z(p.$slots, "default", {}, void 0, !0),
3274
- e.errorMessage ? (m(), U(h, {
3273
+ e.errorMessage ? (m(), U(_, {
3275
3274
  key: 0,
3276
3275
  "alert-message": e.errorMessage,
3277
3276
  appearance: "danger",
@@ -3497,42 +3496,42 @@ const as = {
3497
3496
  emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
3498
3497
  setup(e, { emit: n }) {
3499
3498
  const t = e, { i18n: { t: r } } = ce.useI18n(), a = $(() => {
3500
- var h, D;
3499
+ var _, D;
3501
3500
  return typeof t.errorMessage == "string" ? {
3502
3501
  hasError: !!t.errorMessage,
3503
3502
  title: t.errorMessage,
3504
3503
  message: void 0
3505
3504
  } : {
3506
3505
  hasError: !!t.errorMessage,
3507
- title: (h = t.errorMessage) == null ? void 0 : h.title,
3506
+ title: (_ = t.errorMessage) == null ? void 0 : _.title,
3508
3507
  message: (D = t.errorMessage) == null ? void 0 : D.message
3509
3508
  };
3510
- }), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (h) => h.hasData || !!t.query, s = $(() => {
3511
- const h = [];
3509
+ }), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (_) => _.hasData || !!t.query, s = $(() => {
3510
+ const _ = [];
3512
3511
  return Object.keys(t.tableHeaders).forEach((D) => {
3513
3512
  const se = t.tableHeaders[D];
3514
- h.push({
3513
+ _.push({
3515
3514
  label: se.label ?? D,
3516
3515
  key: D,
3517
3516
  sortable: se.sortable ?? !1
3518
3517
  });
3519
- }), t.enableEntityActions && h.push({
3518
+ }), t.enableEntityActions && _.push({
3520
3519
  key: "actions",
3521
3520
  hideLabel: !0
3522
- }), h;
3523
- }), l = (h) => ({
3524
- "data-rowid": h.id,
3525
- "data-testid": h.name,
3526
- ...t.rowAttributes(h)
3527
- }), c = E({}), d = (h) => {
3521
+ }), _;
3522
+ }), l = (_) => ({
3523
+ "data-rowid": _.id,
3524
+ "data-testid": _.name,
3525
+ ...t.rowAttributes(_)
3526
+ }), c = E({}), d = (_) => {
3528
3527
  var D;
3529
- return (D = c.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${h.id}"]`);
3530
- }, u = (h) => {
3528
+ return (D = c.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${_.id}"]`);
3529
+ }, u = (_) => {
3531
3530
  const D = {
3532
- "data-testid": h.headerKey,
3533
- ...t.cellAttributes(h)
3531
+ "data-testid": _.headerKey,
3532
+ ...t.cellAttributes(_)
3534
3533
  };
3535
- return h.colIndex === 0 && (D.style = {
3534
+ return _.colIndex === 0 && (D.style = {
3536
3535
  maxWidth: "250px",
3537
3536
  overflowX: "hidden",
3538
3537
  textOverflow: "ellipsis"
@@ -3541,21 +3540,21 @@ const as = {
3541
3540
  n("empty-state-cta-clicked"), f();
3542
3541
  }, f = () => {
3543
3542
  n("clear-search-input");
3544
- }, I = $(() => t.disableRowClick ? void 0 : (h, D) => {
3543
+ }, I = $(() => t.disableRowClick ? void 0 : (_, D) => {
3545
3544
  n("click:row", D);
3546
- }), b = (h) => {
3547
- n("sort", h);
3548
- }, { setTablePreferences: p, getTablePreferences: A } = $r(), C = $(() => {
3549
- const h = A(t.preferencesStorageKey);
3545
+ }), b = (_) => {
3546
+ n("sort", _);
3547
+ }, { setTablePreferences: p, getTablePreferences: A } = $r(), h = $(() => {
3548
+ const _ = A(t.preferencesStorageKey);
3550
3549
  return {
3551
3550
  ...t.initialFetcherParams,
3552
- ...h
3551
+ ..._
3553
3552
  };
3554
- }), K = (h) => {
3555
- t.preferencesStorageKey && p(t.preferencesStorageKey, h);
3553
+ }), K = (_) => {
3554
+ t.preferencesStorageKey && p(t.preferencesStorageKey, _);
3556
3555
  };
3557
- return (h, D) => {
3558
- const se = L("KIcon"), Y = L("KButton"), _ = L("KDropdown"), N = L("KTable"), R = L("KCard");
3556
+ return (_, D) => {
3557
+ const se = L("KIcon"), Y = L("KButton"), w = L("KDropdown"), N = L("KTable"), R = L("KCard");
3559
3558
  return m(), U(R, {
3560
3559
  class: "kong-ui-entity-base-table",
3561
3560
  title: e.title
@@ -3583,7 +3582,7 @@ const as = {
3583
3582
  "has-error": a.value.hasError,
3584
3583
  headers: s.value,
3585
3584
  "hide-pagination-when-optional": "",
3586
- "initial-fetcher-params": C.value,
3585
+ "initial-fetcher-params": h.value,
3587
3586
  "is-loading": e.isLoading,
3588
3587
  "pagination-type": e.paginationType,
3589
3588
  "row-attrs": l,
@@ -3595,9 +3594,9 @@ const as = {
3595
3594
  }, $e({
3596
3595
  toolbar: v(({ state: k }) => [
3597
3596
  Je(V("div", Ks, [
3598
- Z(h.$slots, "toolbar-filter", {}, void 0, !0),
3599
- h.$slots["toolbar-button"] ? (m(), M("div", Fs, [
3600
- Z(h.$slots, "toolbar-button", {}, void 0, !0)
3597
+ Z(_.$slots, "toolbar-filter", {}, void 0, !0),
3598
+ _.$slots["toolbar-button"] ? (m(), M("div", Fs, [
3599
+ Z(_.$slots, "toolbar-button", {}, void 0, !0)
3601
3600
  ])) : H("", !0)
3602
3601
  ], 512), [
3603
3602
  [Ye, i(k)]
@@ -3608,12 +3607,12 @@ const as = {
3608
3607
  class: "actions-container",
3609
3608
  "data-testid": k.name
3610
3609
  }, [
3611
- F(_, {
3610
+ F(w, {
3612
3611
  "kpop-attributes": { placement: "bottomEnd" },
3613
3612
  width: e.dropdownMenuWidth
3614
3613
  }, {
3615
3614
  items: v(() => [
3616
- Z(h.$slots, "actions", {
3615
+ Z(_.$slots, "actions", {
3617
3616
  row: k,
3618
3617
  rowKey: x,
3619
3618
  rowValue: S
@@ -3649,7 +3648,7 @@ const as = {
3649
3648
  "row-el": d(S)
3650
3649
  }, {
3651
3650
  default: v(() => [
3652
- Z(h.$slots, x, {
3651
+ Z(_.$slots, x, {
3653
3652
  row: S,
3654
3653
  rowKey: q,
3655
3654
  rowValue: J
@@ -3831,8 +3830,8 @@ const as = {
3831
3830
  setup(e, { emit: n }) {
3832
3831
  const t = e, { i18n: { t: r } } = ce.useI18n(), a = E(!1), o = E({}), i = $(() => {
3833
3832
  const p = [];
3834
- return new URLSearchParams(t.modelValue).forEach((A, C) => {
3835
- A !== "" && p.push(C);
3833
+ return new URLSearchParams(t.modelValue).forEach((A, h) => {
3834
+ A !== "" && p.push(h);
3836
3835
  }), p;
3837
3836
  }), s = $(() => {
3838
3837
  const p = t.config.fields;
@@ -3842,8 +3841,8 @@ const as = {
3842
3841
  }));
3843
3842
  });
3844
3843
  Ae(() => t.modelValue, (p) => {
3845
- o.value = {}, new URLSearchParams(p).forEach((A, C) => {
3846
- o.value[C] = A;
3844
+ o.value = {}, new URLSearchParams(p).forEach((A, h) => {
3845
+ o.value[h] = A;
3847
3846
  });
3848
3847
  });
3849
3848
  const l = () => {
@@ -3851,14 +3850,14 @@ const as = {
3851
3850
  }, c = (p) => {
3852
3851
  n("update:modelValue", p);
3853
3852
  }, d = (p) => `filter-${p}`, u = (p) => {
3854
- var A, C;
3855
- return (((C = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : C.values) ?? []).map((K) => ({
3853
+ var A, h;
3854
+ return (((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.values) ?? []).map((K) => ({
3856
3855
  value: K,
3857
3856
  label: K
3858
3857
  }));
3859
3858
  }, g = (p) => {
3860
- var A, C;
3861
- return ((C = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : C.type) ?? "text";
3859
+ var A, h;
3860
+ return ((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.type) ?? "text";
3862
3861
  }, f = (p) => {
3863
3862
  o.value = {
3864
3863
  ...o.value,
@@ -3867,12 +3866,12 @@ const as = {
3867
3866
  }, I = () => {
3868
3867
  o.value = {}, b(!0);
3869
3868
  }, b = (p = !1) => {
3870
- const A = Object.keys(o.value).reduce((C, K) => (o.value[K] && (C[K] = `${o.value[K]}`), C), {});
3869
+ const A = Object.keys(o.value).reduce((h, K) => (o.value[K] && (h[K] = `${o.value[K]}`), h), {});
3871
3870
  p && (a.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
3872
3871
  };
3873
3872
  return (p, A) => {
3874
- const C = L("KInput"), K = L("KButton"), h = L("KSelect"), D = L("KMenuItem"), se = L("KMenu");
3875
- return e.config.isExactMatch ? (m(), U(C, {
3873
+ const h = L("KInput"), K = L("KButton"), _ = L("KSelect"), D = L("KMenuItem"), se = L("KMenu");
3874
+ return e.config.isExactMatch ? (m(), U(h, {
3876
3875
  key: 0,
3877
3876
  autocomplete: "off",
3878
3877
  class: "kong-ui-entity-filter-input",
@@ -3905,11 +3904,11 @@ const as = {
3905
3904
  ]),
3906
3905
  Je(F(se, { class: "kong-ui-entity-filter-menu" }, {
3907
3906
  body: v(() => [
3908
- (m(!0), M(be, null, he(s.value, (Y, _) => (m(), U(D, {
3907
+ (m(!0), M(be, null, he(s.value, (Y, w) => (m(), U(D, {
3909
3908
  key: Y.value,
3910
3909
  "data-testid": Y.value,
3911
3910
  expandable: "",
3912
- "last-menu-item": _ === s.value.length - 1
3911
+ "last-menu-item": w === s.value.length - 1
3913
3912
  }, {
3914
3913
  itemTitle: v(() => [
3915
3914
  V("span", Ys, [
@@ -3927,7 +3926,7 @@ const as = {
3927
3926
  class: "menu-item-label",
3928
3927
  for: d(Y.value)
3929
3928
  }, O(y(r)("filter.fieldLabel")), 9, Qs),
3930
- ((R = (N = e.config.schema) == null ? void 0 : N[Y.value]) == null ? void 0 : R.type) === "select" ? (m(), U(h, {
3929
+ ((R = (N = e.config.schema) == null ? void 0 : N[Y.value]) == null ? void 0 : R.type) === "select" ? (m(), U(_, {
3931
3930
  key: 0,
3932
3931
  id: d(Y.value),
3933
3932
  modelValue: o.value[Y.value],
@@ -3935,7 +3934,7 @@ const as = {
3935
3934
  appearance: "select",
3936
3935
  items: u(Y.value),
3937
3936
  placeholder: y(r)("filter.selectPlaceholder")
3938
- }, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), U(C, {
3937
+ }, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), U(h, {
3939
3938
  key: 1,
3940
3939
  id: d(Y.value),
3941
3940
  modelValue: o.value[Y.value],
@@ -4133,21 +4132,21 @@ const as = {
4133
4132
  const x = I.value ? u.value.find((q) => q.id === k) : (S = l.value) == null ? void 0 : S.find((q) => q.id === k);
4134
4133
  return x ? x.name : k;
4135
4134
  }, A = () => {
4136
- h.value = "", C.value = [], _.value = [], n("cancel");
4137
- }, C = E([]), K = E(!1), h = E(""), D = async () => {
4135
+ _.value = "", h.value = [], w.value = [], n("cancel");
4136
+ }, h = E([]), K = E(!1), _ = E(""), D = async () => {
4138
4137
  if (!o.value.length) {
4139
- h.value = "", _.value = [], n("cancel");
4138
+ _.value = "", w.value = [], n("cancel");
4140
4139
  return;
4141
4140
  }
4142
- K.value = !0, h.value = "", C.value = [], _.value = [];
4141
+ K.value = !0, _.value = "", h.value = [], w.value = [];
4143
4142
  try {
4144
4143
  const k = o.value.map((q) => Y(q)), x = await Promise.allSettled(k);
4145
4144
  let S = !0;
4146
4145
  x.forEach((q) => {
4147
4146
  q.status !== "fulfilled" && (S = !1);
4148
- }), S ? (C.value = [], _.value = [], n("add:success", o.value), o.value = []) : (C.value.length && n("add:partial-success", C.value), o.value = [], N(x));
4147
+ }), S ? (h.value = [], w.value = [], n("add:success", o.value), o.value = []) : (h.value.length && n("add:partial-success", h.value), o.value = [], N(x));
4149
4148
  } catch {
4150
- h.value = r("consumer_groups.errors.add"), n("error", h.value);
4149
+ _.value = r("consumer_groups.errors.add"), n("error", _.value);
4151
4150
  } finally {
4152
4151
  K.value = !1;
4153
4152
  }
@@ -4161,13 +4160,13 @@ const as = {
4161
4160
  };
4162
4161
  try {
4163
4162
  const S = await a.post(se.value, x);
4164
- return C.value.push(k), S;
4163
+ return h.value.push(k), S;
4165
4164
  } catch (S) {
4166
4165
  let q = `${p(k)} - ${S.message}`;
4167
4166
  return S.response.status === 409 && (q = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(q));
4168
4167
  }
4169
- }, _ = E([]), N = (k) => {
4170
- _.value = k.map((x) => {
4168
+ }, w = E([]), N = (k) => {
4169
+ w.value = k.map((x) => {
4171
4170
  var S;
4172
4171
  return (S = x.reason) == null ? void 0 : S.message;
4173
4172
  }).filter(Boolean);
@@ -4205,14 +4204,14 @@ const as = {
4205
4204
  width: "100%",
4206
4205
  onQueryChange: y(i)
4207
4206
  }, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
4208
- h.value || g.value || _.value.length ? (m(), M("div", ml, [
4207
+ _.value || g.value || w.value.length ? (m(), M("div", ml, [
4209
4208
  F(q, { appearance: "danger" }, {
4210
4209
  alertMessage: v(() => [
4211
4210
  V("p", null, O(y(r)("consumer_groups.errors.add")), 1),
4212
- _.value.length ? (m(), M("ul", gl, [
4213
- (m(!0), M(be, null, he(_.value, (X, ee) => (m(), M("li", { key: ee }, O(X), 1))), 128))
4211
+ w.value.length ? (m(), M("ul", gl, [
4212
+ (m(!0), M(be, null, he(w.value, (X, ee) => (m(), M("li", { key: ee }, O(X), 1))), 128))
4214
4213
  ])) : H("", !0),
4215
- V("div", null, O(h.value || g.value), 1)
4214
+ V("div", null, O(_.value || g.value), 1)
4216
4215
  ]),
4217
4216
  _: 1
4218
4217
  })
@@ -4303,9 +4302,9 @@ const as = {
4303
4302
  },
4304
4303
  schema: t.config.filterSchema
4305
4304
  };
4306
- }), p = $(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: C } = dl(t.config, f.value, p.value), K = () => {
4305
+ }), p = $(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: h } = dl(t.config, f.value, p.value), K = () => {
4307
4306
  I.value = "";
4308
- }, h = () => {
4307
+ }, _ = () => {
4309
4308
  s.value++;
4310
4309
  }, D = E(null), se = (T, z) => {
4311
4310
  const re = T.id;
@@ -4335,7 +4334,7 @@ const as = {
4335
4334
  entity: T,
4336
4335
  message: a("consumer_groups.copy.success_brief")
4337
4336
  });
4338
- }, _ = async (T) => {
4337
+ }, w = async (T) => {
4339
4338
  var re;
4340
4339
  await ((re = t.canRetrieve) == null ? void 0 : re.call(t, T)) && o.push(t.config.getViewRoute(T.id));
4341
4340
  }, N = (T) => ({
@@ -4362,10 +4361,10 @@ const as = {
4362
4361
  }
4363
4362
  }, le = E(!1), De = () => {
4364
4363
  le.value = !0;
4365
- }, w = () => {
4364
+ }, C = () => {
4366
4365
  le.value = !1;
4367
4366
  }, B = (T, z) => {
4368
- z || w(), s.value++, n("add:success", T);
4367
+ z || C(), s.value++, n("add:success", T);
4369
4368
  }, oe = () => {
4370
4369
  l.value && De();
4371
4370
  }, P = E(void 0), G = E(!1), ge = E(""), we = (T) => {
@@ -4389,7 +4388,7 @@ const as = {
4389
4388
  }
4390
4389
  }
4391
4390
  }, Nt = E(!0);
4392
- Ae(C, (T) => {
4391
+ Ae(h, (T) => {
4393
4392
  var z, re, ye, _e;
4394
4393
  if (Array.isArray((z = T == null ? void 0 : T.response) == null ? void 0 : z.data) && (Nt.value = T.response.data.length > 0), T.status === Oe.Error) {
4395
4394
  D.value = {
@@ -4427,9 +4426,9 @@ const as = {
4427
4426
  "table-headers": y(u),
4428
4427
  "use-action-outside": e.useActionOutside,
4429
4428
  onClearSearchInput: K,
4430
- "onClick:row": z[3] || (z[3] = (W) => _(W)),
4429
+ "onClick:row": z[3] || (z[3] = (W) => w(W)),
4431
4430
  onEmptyStateCtaClicked: oe,
4432
- onSort: h
4431
+ onSort: _
4433
4432
  }, {
4434
4433
  "toolbar-filter": v(() => [
4435
4434
  l.value ? H("", !0) : (m(), U(y(nl), {
@@ -4582,7 +4581,7 @@ const as = {
4582
4581
  visible: le.value,
4583
4582
  "onAdd:partialSuccess": z[4] || (z[4] = (W) => B(W, !0)),
4584
4583
  "onAdd:success": z[5] || (z[5] = (W) => B(W)),
4585
- onCancel: w
4584
+ onCancel: C
4586
4585
  }, null, 8, ["config", "visible"])) : H("", !0),
4587
4586
  e.config.consumerId && P.value ? (m(), U(fr, {
4588
4587
  key: 1,
@@ -4664,32 +4663,32 @@ const as = {
4664
4663
  searchKeys: ["username", "custom_id", "id"]
4665
4664
  }), { axiosInstance: g } = Kt({
4666
4665
  headers: (De = t.config) == null ? void 0 : De.requestHeaders
4667
- }), { getMessageFromError: f } = cl(), I = $(() => u.value.map((w) => ({
4668
- label: w.username || w.custom_id,
4669
- value: w.id,
4670
- selected: o.fields.consumers.includes(w.id),
4671
- data: w
4666
+ }), { getMessageFromError: f } = cl(), I = $(() => u.value.map((C) => ({
4667
+ label: C.username || C.custom_id,
4668
+ value: C.id,
4669
+ selected: o.fields.consumers.includes(C.id),
4670
+ data: C
4672
4671
  // we need this to determine whether or not to show the description text
4673
4672
  }))), b = $(() => {
4674
- var w, B;
4675
- return (B = Me.form[(w = t.config) == null ? void 0 : w.app]) == null ? void 0 : B.edit;
4676
- }), p = $(() => t.consumerGroupId ? tt.Edit : tt.Create), A = $(() => !!o.fields.name && !_.value), C = $(() => JSON.stringify(o.fields) !== JSON.stringify(i)), K = (w, B = "", oe = "") => {
4673
+ var C, B;
4674
+ return (B = Me.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : B.edit;
4675
+ }), p = $(() => t.consumerGroupId ? tt.Edit : tt.Create), A = $(() => !!o.fields.name && !w.value), h = $(() => JSON.stringify(o.fields) !== JSON.stringify(i)), K = (C, B = "", oe = "") => {
4677
4676
  var G, ge, we, de, Ne, Ge;
4678
- let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${Me.form[(ge = t.config) == null ? void 0 : ge.app][w]}`;
4679
- return ((we = t.config) == null ? void 0 : we.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, B || t.consumerGroupId), (w === "addConsumer" || w === "removeConsumer") && (P = P.replace(/{consumerId}/gi, oe)), P;
4680
- }, h = () => {
4681
- var w;
4682
- a.push(((w = t.config) == null ? void 0 : w.cancelRoute) || { name: "consumer-group-list" });
4683
- }, D = (w) => {
4684
- n("error", w);
4685
- }, se = (w) => {
4686
- n("loading", w);
4687
- }, Y = async (w) => {
4677
+ let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${Me.form[(ge = t.config) == null ? void 0 : ge.app][C]}`;
4678
+ return ((we = t.config) == null ? void 0 : we.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, B || t.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (P = P.replace(/{consumerId}/gi, oe)), P;
4679
+ }, _ = () => {
4680
+ var C;
4681
+ a.push(((C = t.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-group-list" });
4682
+ }, D = (C) => {
4683
+ n("error", C);
4684
+ }, se = (C) => {
4685
+ n("loading", C);
4686
+ }, Y = async (C) => {
4688
4687
  var oe, P, G, ge, we;
4689
- o.fields.name = ((oe = w == null ? void 0 : w.item) == null ? void 0 : oe.name) || ((P = w == null ? void 0 : w.consumer_group) == null ? void 0 : P.name) || (w == null ? void 0 : w.name) || "";
4690
- const B = ((G = w == null ? void 0 : w.item) == null ? void 0 : G.tags) || (w == null ? void 0 : w.consumer_group.tags) || (w == null ? void 0 : w.tags) || [];
4691
- if (o.fields.tags = (B == null ? void 0 : B.join(", ")) || "", "consumers" in w)
4692
- o.fields.consumers = ((ge = w == null ? void 0 : w.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
4688
+ o.fields.name = ((oe = C == null ? void 0 : C.item) == null ? void 0 : oe.name) || ((P = C == null ? void 0 : C.consumer_group) == null ? void 0 : P.name) || (C == null ? void 0 : C.name) || "";
4689
+ const B = ((G = C == null ? void 0 : C.item) == null ? void 0 : G.tags) || (C == null ? void 0 : C.consumer_group.tags) || (C == null ? void 0 : C.tags) || [];
4690
+ if (o.fields.tags = (B == null ? void 0 : B.join(", ")) || "", "consumers" in C)
4691
+ o.fields.consumers = ((ge = C == null ? void 0 : C.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
4693
4692
  else
4694
4693
  try {
4695
4694
  const { data: de } = await g.get(K("getConsumers"));
@@ -4698,39 +4697,39 @@ const as = {
4698
4697
  x(de);
4699
4698
  }
4700
4699
  Object.assign(i, o.fields);
4701
- }, _ = $(() => /^[0-9a-zA-Z.\-_~]*$/.test(o.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
4702
- var w, B;
4700
+ }, w = $(() => /^[0-9a-zA-Z.\-_~]*$/.test(o.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
4701
+ var C, B;
4703
4702
  return {
4704
4703
  name: o.fields.name,
4705
- tags: (B = (w = o.fields.tags.split(",")) == null ? void 0 : w.map((oe) => String(oe || "").trim())) == null ? void 0 : B.filter((oe) => oe !== "")
4704
+ tags: (B = (C = o.fields.tags.split(",")) == null ? void 0 : C.map((oe) => String(oe || "").trim())) == null ? void 0 : B.filter((oe) => oe !== "")
4706
4705
  };
4707
- }, R = async (w, B = "") => await g.post(K("addConsumer", B, w), { consumer: w }), k = async (w, B = "") => await g.delete(K("removeConsumer", B, w)), x = (w) => {
4708
- o.errorMessage = f(w), n("error", w);
4709
- }, S = (w = t.consumerGroupId) => {
4710
- Object.assign(i, o.fields), n("update", { ...o.fields, id: w });
4711
- }, q = (w, B, oe = t.consumerGroupId) => {
4712
- const P = w == null ? void 0 : w.find((G) => G.status !== "fulfilled");
4706
+ }, R = async (C, B = "") => await g.post(K("addConsumer", B, C), { consumer: C }), k = async (C, B = "") => await g.delete(K("removeConsumer", B, C)), x = (C) => {
4707
+ o.errorMessage = f(C), n("error", C);
4708
+ }, S = (C = t.consumerGroupId) => {
4709
+ Object.assign(i, o.fields), n("update", { ...o.fields, id: C });
4710
+ }, q = (C, B, oe = t.consumerGroupId) => {
4711
+ const P = C == null ? void 0 : C.find((G) => G.status !== "fulfilled");
4713
4712
  P ? x({
4714
4713
  code: P.status,
4715
4714
  message: B
4716
4715
  }) : S(oe);
4717
4716
  }, J = async () => {
4718
- let w = "";
4717
+ let C = "";
4719
4718
  try {
4720
4719
  const { data: B } = await g.post(K("create"), N());
4721
- w = "item" in B ? B.item.id : B.id;
4720
+ C = "item" in B ? B.item.id : B.id;
4722
4721
  } catch (B) {
4723
4722
  x(B);
4724
4723
  }
4725
- if (o.fields.consumers.length > 0 && w)
4724
+ if (o.fields.consumers.length > 0 && C)
4726
4725
  try {
4727
- const B = o.fields.consumers.map((P) => R(P, w)), oe = await Promise.allSettled(B);
4728
- q(oe, r("consumer_groups.errors.add_consumer"), w);
4726
+ const B = o.fields.consumers.map((P) => R(P, C)), oe = await Promise.allSettled(B);
4727
+ q(oe, r("consumer_groups.errors.add_consumer"), C);
4729
4728
  } catch (B) {
4730
4729
  x(B);
4731
4730
  }
4732
4731
  else
4733
- o.fields.consumers.length === 0 && w && S(w);
4732
+ o.fields.consumers.length === 0 && C && S(C);
4734
4733
  }, X = async () => {
4735
4734
  var oe;
4736
4735
  try {
@@ -4738,8 +4737,8 @@ const as = {
4738
4737
  } catch (P) {
4739
4738
  x(P);
4740
4739
  }
4741
- const w = o.fields.consumers.filter((P) => !i.consumers.includes(P)), B = i.consumers.filter((P) => !o.fields.consumers.includes(P));
4742
- if (B.length === 0 && w.length === 0)
4740
+ const C = o.fields.consumers.filter((P) => !i.consumers.includes(P)), B = i.consumers.filter((P) => !o.fields.consumers.includes(P));
4741
+ if (B.length === 0 && C.length === 0)
4743
4742
  S();
4744
4743
  else {
4745
4744
  if (B.length > 0)
@@ -4749,9 +4748,9 @@ const as = {
4749
4748
  } catch (P) {
4750
4749
  x(P);
4751
4750
  }
4752
- if (w.length > 0)
4751
+ if (C.length > 0)
4753
4752
  try {
4754
- const P = w.map((ge) => R(ge)), G = await Promise.allSettled(P);
4753
+ const P = C.map((ge) => R(ge)), G = await Promise.allSettled(P);
4755
4754
  q(G, r("consumer_groups.errors.add_consumer"));
4756
4755
  } catch (P) {
4757
4756
  x(P);
@@ -4766,17 +4765,17 @@ const as = {
4766
4765
  };
4767
4766
  return ut(async () => {
4768
4767
  await d();
4769
- }), (w, B) => {
4768
+ }), (C, B) => {
4770
4769
  const oe = L("KInput"), P = L("KMultiselect");
4771
4770
  return m(), M("div", Cl, [
4772
4771
  F(y(Ms), {
4773
- "can-submit": A.value && C.value,
4772
+ "can-submit": A.value && h.value,
4774
4773
  config: e.config,
4775
4774
  "edit-id": e.consumerGroupId,
4776
- "error-message": o.errorMessage || y(c) || _.value,
4775
+ "error-message": o.errorMessage || y(c) || w.value,
4777
4776
  "fetch-url": b.value,
4778
4777
  "is-readonly": o.readonly,
4779
- onCancel: h,
4778
+ onCancel: _,
4780
4779
  "onFetch:error": B[3] || (B[3] = (G) => D(G)),
4781
4780
  "onFetch:success": Y,
4782
4781
  onLoading: B[4] || (B[4] = (G) => se(G)),