@kong-ui-public/analytics-metric-provider 7.0.5 → 7.1.1

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.
Files changed (34) hide show
  1. package/README.md +44 -8
  2. package/dist/style.css +1 -1
  3. package/dist/types/components/MetricCardContainer.vue.d.ts +91 -0
  4. package/dist/types/components/MetricCardContainer.vue.d.ts.map +1 -0
  5. package/dist/types/components/MetricsConsumer.vue.d.ts +3 -4
  6. package/dist/types/components/MetricsConsumer.vue.d.ts.map +1 -1
  7. package/dist/types/components/MetricsProvider.vue.d.ts +2 -2
  8. package/dist/types/components/MetricsTestHarness.vue.d.ts +2 -2
  9. package/dist/types/components/MetricsTestHarness.vue.d.ts.map +1 -1
  10. package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts +3 -0
  11. package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts.map +1 -0
  12. package/dist/types/components/display/MetricsCard.vue.d.ts +511 -0
  13. package/dist/types/components/display/MetricsCard.vue.d.ts.map +1 -0
  14. package/dist/types/composables/useMetricCardBuilder.d.ts +2 -1
  15. package/dist/types/composables/useMetricCardBuilder.d.ts.map +1 -1
  16. package/dist/types/enums/index.d.ts +3 -0
  17. package/dist/types/enums/index.d.ts.map +1 -0
  18. package/dist/types/enums/metric-card-size.enum.d.ts +7 -0
  19. package/dist/types/enums/metric-card-size.enum.d.ts.map +1 -0
  20. package/dist/types/enums/metric-card-type.enum.d.ts +7 -0
  21. package/dist/types/enums/metric-card-type.enum.d.ts.map +1 -0
  22. package/dist/types/index.d.ts +2 -0
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/dist/types/types/index.d.ts +1 -0
  25. package/dist/types/types/index.d.ts.map +1 -1
  26. package/dist/types/types/metric-card.d.ts +36 -0
  27. package/dist/types/types/metric-card.d.ts.map +1 -0
  28. package/dist/types/utilities/index.d.ts +2 -0
  29. package/dist/types/utilities/index.d.ts.map +1 -0
  30. package/dist/types/utilities/trend-display.d.ts +24 -0
  31. package/dist/types/utilities/trend-display.d.ts.map +1 -0
  32. package/dist/vitals-metric-provider.es.js +736 -732
  33. package/dist/vitals-metric-provider.umd.js +1 -1
  34. package/package.json +9 -7
@@ -1,10 +1,10 @@
1
- import { ref as te, watchEffect as Be, computed as g, getCurrentInstance as $e, reactive as Pe, onMounted as Ke, onUnmounted as Ze, watch as Ue, isReadonly as Ge, toRefs as je, defineComponent as k, inject as ke, toRef as J, provide as Xe, renderSlot as qe, resolveComponent as ze, openBlock as p, createElementBlock as y, createElementVNode as x, normalizeClass as G, unref as _, createCommentVNode as T, createBlock as E, resolveDynamicComponent as z, withCtx as L, createTextVNode as Le, toDisplayString as R, createVNode as X, normalizeStyle as A, Fragment as _e, renderList as Ye, mergeProps as Qe, pushScopeId as V, popScopeId as D, normalizeProps as We, guardReactiveProps as Je } from "vue";
2
- import { TimePeriods as ie, TimeframeKeys as ne, queryableExploreDimensions as er, DeltaQueryTime as rr, UnaryQueryTime as tr } from "@kong-ui-public/analytics-utilities";
3
- import { createI18n as ir, i18nTComponent as nr } from "@kong-ui-public/i18n";
4
- import { useAnalyticsConfigStore as ar } from "@kong-ui-public/analytics-config-store";
5
- const or = {
1
+ import { ref as re, watchEffect as $e, computed as g, getCurrentInstance as Be, reactive as Ue, onMounted as Ke, onUnmounted as Pe, watch as Ge, isReadonly as Ze, toRefs as Xe, defineComponent as k, inject as ke, toRef as J, provide as je, renderSlot as Le, openBlock as p, createBlock as I, resolveDynamicComponent as L, normalizeStyle as q, withCtx as A, createElementBlock as y, toDisplayString as w, createCommentVNode as N, pushScopeId as z, popScopeId as D, createElementVNode as x, resolveComponent as Ae, normalizeClass as Y, unref as R, createTextVNode as qe, createVNode as X, Fragment as _e, renderList as Ye, mergeProps as Qe, normalizeProps as We, guardReactiveProps as Je } from "vue";
2
+ import { TimePeriods as ie, TimeframeKeys as ne, queryableExploreDimensions as et, DeltaQueryTime as tt, UnaryQueryTime as rt } from "@kong-ui-public/analytics-utilities";
3
+ import { createI18n as it, i18nTComponent as nt } from "@kong-ui-public/i18n";
4
+ import { useAnalyticsConfigStore as at } from "@kong-ui-public/analytics-config-store";
5
+ const ot = {
6
6
  notAvailable: "N/A"
7
- }, sr = {
7
+ }, st = {
8
8
  short: {
9
9
  traffic: "Requests",
10
10
  errorRate: "Error Rate",
@@ -17,7 +17,7 @@ const or = {
17
17
  averageLatency: "Average Latency",
18
18
  p99Latency: "P99 Latency"
19
19
  }
20
- }, ur = {
20
+ }, lt = {
21
21
  custom: "vs previous {numDays, plural, =1 {day} other {# days}}",
22
22
  "15m": "vs previous 15 minutes",
23
23
  "1h": "vs previous hour",
@@ -32,287 +32,287 @@ const or = {
32
32
  previous_week: "vs previous time period",
33
33
  previous_month: "vs previous time period",
34
34
  previous_quarter: "vs previous quarter"
35
- }, lr = {
36
- general: or,
37
- metricCard: sr,
38
- trendRange: ur
35
+ }, ut = {
36
+ general: ot,
37
+ metricCard: st,
38
+ trendRange: lt
39
39
  };
40
- function dr() {
41
- const e = ir("en-us", lr);
40
+ function dt() {
41
+ const e = it("en-us", ut);
42
42
  return {
43
43
  i18n: e,
44
- i18nT: nr(e)
44
+ i18nT: nt(e)
45
45
  // Translation component <i18n-t>
46
46
  };
47
47
  }
48
- const cr = 2, Q = ["1XX", "2XX", "3XX", "4XX", "5XX"], we = ["4XX", "5XX"], fr = 30 * 1e3, pr = "analytics-query-provider";
49
- var Ae = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(Ae || {});
50
- const vr = (e) => {
51
- var r, t, a, n, i;
48
+ const ct = 2, Q = ["1XX", "2XX", "3XX", "4XX", "5XX"], we = ["4XX", "5XX"], mi = ["1XX", "2XX", "3XX"], ft = 30 * 1e3, vt = "analytics-query-provider";
49
+ var ze = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(ze || {});
50
+ const pt = (e) => {
51
+ var t, r, a, n, i;
52
52
  return e ? !!// TODO: revisit: currently only the first check ever matters?
53
- ((r = Object.keys(e)) != null && r.length || (t = e.data) != null && t.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
53
+ ((t = Object.keys(e)) != null && t.length || (r = e.data) != null && r.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
54
54
  };
55
- function gr(e = te({}), r, t, a = vr) {
56
- const n = te(
55
+ function gt(e = re({}), t, r, a = pt) {
56
+ const n = re(
57
57
  "PENDING"
58
58
  /* PENDING */
59
59
  );
60
- return Be(() => {
60
+ return $e(() => {
61
61
  const i = a(e.value);
62
- if (e.value && i && t.value) {
62
+ if (e.value && i && r.value) {
63
63
  n.value = "VALIDATING_HAS_DATA";
64
64
  return;
65
65
  }
66
- if (e.value && t.value) {
66
+ if (e.value && r.value) {
67
67
  n.value = "VALIDATING";
68
68
  return;
69
69
  }
70
- if (e.value && r.value) {
70
+ if (e.value && t.value) {
71
71
  n.value = "STALE_IF_ERROR";
72
72
  return;
73
73
  }
74
- if (e.value === void 0 && !r.value) {
74
+ if (e.value === void 0 && !t.value) {
75
75
  n.value = "PENDING";
76
76
  return;
77
77
  }
78
- if (e.value && !r.value && i) {
78
+ if (e.value && !t.value && i) {
79
79
  n.value = "SUCCESS_HAS_DATA";
80
80
  return;
81
81
  }
82
- if (e.value && !r.value) {
82
+ if (e.value && !t.value) {
83
83
  n.value = "SUCCESS";
84
84
  return;
85
85
  }
86
- e.value === void 0 && r && (n.value = "ERROR");
86
+ e.value === void 0 && t && (n.value = "ERROR");
87
87
  }), {
88
88
  state: n,
89
- swrvState: Ae
89
+ swrvState: ze
90
90
  };
91
91
  }
92
- const B = Symbol("default"), de = "status_code_grouped", Re = (e, r, t, a, n) => {
93
- e[r][t] || (e[r][t] = {}), e[r][t][a] = n;
92
+ const $ = Symbol("default"), de = "status_code_grouped", Re = (e, t, r, a, n) => {
93
+ e[t][r] || (e[t][r] = {}), e[t][r][a] = n;
94
94
  };
95
- function yr(e, r) {
96
- var v;
97
- const t = ((v = e.meta.metric_names) == null ? void 0 : v[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((d) => d === de), u = n.find((d) => d !== de);
95
+ function yt(e, t) {
96
+ var f;
97
+ const r = ((f = e.meta.metric_names) == null ? void 0 : f[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((c) => c === de), l = n.find((c) => c !== de);
98
98
  return n.length > 2 || n.length > 1 && !i ? (console.error("Don't know how to work with provided dimensions:", n), {
99
- previous: { [B]: { [B]: 0 } },
100
- current: { [B]: { [B]: 0 } }
101
- }) : e.data.reduce((d, o) => {
102
- const s = o.event[t], l = u ? o.event[u] : B, c = i ? o.event[de] : B;
103
- return new Date(o.timestamp).getTime() === a && r ? Re(d, "previous", l, c, s) : Re(d, "current", l, c, s), d;
99
+ previous: { [$]: { [$]: 0 } },
100
+ current: { [$]: { [$]: 0 } }
101
+ }) : e.data.reduce((c, o) => {
102
+ const s = o.event[r], u = l ? o.event[l] : $, d = i ? o.event[de] : $;
103
+ return new Date(o.timestamp).getTime() === a && t ? Re(c, "previous", u, d, s) : Re(c, "current", u, d, s), c;
104
104
  }, {
105
105
  previous: {},
106
106
  current: {}
107
107
  });
108
108
  }
109
- function mr(e) {
109
+ function mt(e) {
110
110
  e.queryReady === void 0 && (e.queryReady = g(() => !0));
111
- const { i18n: r } = K.useI18n(), t = g(() => {
112
- var l, c;
111
+ const { i18n: t } = K.useI18n(), r = g(() => {
112
+ var u, d;
113
113
  return {
114
114
  metrics: e.metrics.value,
115
115
  dimensions: [
116
- ...(l = e.dimensions) != null && l.length ? [...e.dimensions] : [],
116
+ ...(u = e.dimensions) != null && u.length ? [...e.dimensions] : [],
117
117
  ...e.withTrend.value ? ["time"] : []
118
118
  ],
119
119
  granularity: e.withTrend.value ? "trend" : void 0,
120
- ...(c = e.filter.value) != null && c.length ? { filters: e.filter.value } : {},
120
+ ...(d = e.filter.value) != null && d.length ? { filters: e.filter.value } : {},
121
121
  time_range: e.timeframe.value.v4Query(e.tz.value)
122
122
  };
123
123
  }), a = g(() => {
124
- var c, f, C, m;
125
- if (!((c = e.queryReady) != null && c.value))
124
+ var d, v, C, m;
125
+ if (!((d = e.queryReady) != null && d.value))
126
126
  return null;
127
- const l = (f = e.filter) != null && f.value ? JSON.stringify(e.filter.value) : "";
128
- return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(C = e.dimensions) == null ? void 0 : C.join("-")}-${(m = e.metrics.value) == null ? void 0 : m.join("-")}-${l}`;
129
- }), { response: n, error: i, isValidating: u } = K.useRequest(
127
+ const u = (v = e.filter) != null && v.value ? JSON.stringify(e.filter.value) : "";
128
+ return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(C = e.dimensions) == null ? void 0 : C.join("-")}-${(m = e.metrics.value) == null ? void 0 : m.join("-")}-${u}`;
129
+ }), { response: n, error: i, isValidating: l } = K.useRequest(
130
130
  () => a.value,
131
- () => e.queryFn(t.value, e.abortController ?? new AbortController()),
131
+ () => e.queryFn(r.value, e.abortController ?? new AbortController()),
132
132
  {
133
133
  refreshInterval: e.refreshInterval,
134
134
  revalidateOnFocus: !1,
135
- errorRetryCount: cr
135
+ errorRetryCount: ct
136
136
  }
137
- ), { state: v, swrvState: d } = gr(n, i, u), o = g(() => {
138
- var l, c, f, C, m, b, N;
139
- return !((c = (l = n.value) == null ? void 0 : l.data) != null && c.length) || !((C = (f = n.value) == null ? void 0 : f.meta) != null && C.display) || !((N = (b = (m = n.value) == null ? void 0 : m.meta) == null ? void 0 : b.metric_names) != null && N.length) ? { current: {}, previous: {} } : yr(n.value, e.withTrend.value);
137
+ ), { state: f, swrvState: c } = gt(n, i, l), o = g(() => {
138
+ var u, d, v, C, m, S, T;
139
+ return !((d = (u = n.value) == null ? void 0 : u.data) != null && d.length) || !((C = (v = n.value) == null ? void 0 : v.meta) != null && C.display) || !((T = (S = (m = n.value) == null ? void 0 : m.meta) == null ? void 0 : S.metric_names) != null && T.length) ? { current: {}, previous: {} } : yt(n.value, e.withTrend.value);
140
140
  }), s = g(() => {
141
- var l, c, f;
141
+ var u, d, v;
142
142
  if (e.timeframe.value.key === "custom") {
143
- if (!((c = (l = n.value) == null ? void 0 : l.meta) != null && c.start_ms))
143
+ if (!((d = (u = n.value) == null ? void 0 : u.meta) != null && d.start_ms))
144
144
  return "";
145
145
  const { start_ms: C, end_ms: m } = n.value.meta;
146
- let b = (m - C) / (1e3 * 60 * 60 * 24);
147
- return e.withTrend.value && (b /= 2), r.t("trendRange.custom", { numDays: Math.round(b) });
146
+ let S = (m - C) / (1e3 * 60 * 60 * 24);
147
+ return e.withTrend.value && (S /= 2), t.t("trendRange.custom", { numDays: Math.round(S) });
148
148
  } else
149
- return e.withTrend.value ? r.t(`trendRange.${e.timeframe.value.key}`) : r.t(`trendRange.${(f = ie.get(ne.ONE_DAY)) == null ? void 0 : f.key}`);
149
+ return e.withTrend.value ? t.t(`trendRange.${e.timeframe.value.key}`) : t.t(`trendRange.${(v = ie.get(ne.ONE_DAY)) == null ? void 0 : v.key}`);
150
150
  });
151
151
  return {
152
- isLoading: g(() => d.PENDING === v.value),
153
- hasError: g(() => d.ERROR === v.value),
152
+ isLoading: g(() => c.PENDING === f.value),
153
+ hasError: g(() => c.ERROR === f.value),
154
154
  raw: n,
155
155
  mapped: o,
156
156
  trendRange: s
157
157
  };
158
158
  }
159
- const j = (e, r, t = B, a) => (a ?? [B]).reduce((i, u) => {
160
- const v = e[r][t];
161
- return v ? i + (v[u] || 0) : i;
159
+ const Z = (e, t, r = $, a) => (a ?? [$]).reduce((i, l) => {
160
+ const f = e[t][r];
161
+ return f ? i + (f[l] || 0) : i;
162
162
  }, 0);
163
- function hr(e) {
163
+ function ht(e) {
164
164
  const {
165
- cardType: r,
166
- title: t,
165
+ cardType: t,
166
+ title: r,
167
167
  description: a,
168
168
  record: n,
169
169
  hasError: i,
170
- increaseIsBad: u,
171
- formatValueFn: v,
172
- trendRange: d
170
+ increaseIsBad: l,
171
+ formatValueFn: f,
172
+ trendRange: c
173
173
  } = e;
174
174
  return g(() => {
175
175
  let o = 0, s = 0;
176
176
  if (n != null && n.value)
177
177
  try {
178
- o = j(n.value, "current", e.lookupKey, e.sumGroupedValues), s = j(n.value, "previous", e.lookupKey, e.sumGroupedValues);
179
- } catch (l) {
178
+ o = Z(n.value, "current", e.lookupKey, e.sumGroupedValues), s = Z(n.value, "previous", e.lookupKey, e.sumGroupedValues);
179
+ } catch (u) {
180
180
  console.error(
181
181
  "Metric card data doesn't have the expected structure:",
182
- l
182
+ u
183
183
  );
184
184
  }
185
185
  return {
186
- cardType: r,
186
+ cardType: t,
187
187
  hasError: i.value,
188
188
  currentValue: o,
189
189
  previousValue: s,
190
- title: t.value,
190
+ title: r.value,
191
191
  description: a,
192
- increaseIsBad: !!u,
192
+ increaseIsBad: !!l,
193
193
  // Coerce undefined to false
194
- formatValueFn: v,
195
- trendRange: d == null ? void 0 : d.value
194
+ formatValueFn: f,
195
+ trendRange: c == null ? void 0 : c.value
196
196
  };
197
197
  });
198
198
  }
199
- var ce = /* @__PURE__ */ new WeakMap(), Te = 0;
200
- function Cr(e) {
199
+ var ce = /* @__PURE__ */ new WeakMap(), Ne = 0;
200
+ function Ct(e) {
201
201
  if (!e.length)
202
202
  return "";
203
- for (var r = "arg", t = 0; t < e.length; ++t) {
203
+ for (var t = "arg", r = 0; r < e.length; ++r) {
204
204
  var a = void 0;
205
- e[t] === null || typeof e[t] != "object" && typeof e[t] != "function" ? typeof e[t] == "string" ? a = '"' + e[t] + '"' : a = String(e[t]) : ce.has(e[t]) ? a = ce.get(e[t]) : (a = Te, ce.set(e[t], Te++)), r += "@" + a;
205
+ e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? a = '"' + e[r] + '"' : a = String(e[r]) : ce.has(e[r]) ? a = ce.get(e[r]) : (a = Ne, ce.set(e[r], Ne++)), t += "@" + a;
206
206
  }
207
- return r;
207
+ return t;
208
208
  }
209
- function br(e) {
209
+ function St(e) {
210
210
  if (typeof e == "function")
211
211
  try {
212
212
  e = e();
213
213
  } catch {
214
214
  e = "";
215
215
  }
216
- return Array.isArray(e) ? e = Cr(e) : e = String(e || ""), e;
216
+ return Array.isArray(e) ? e = Ct(e) : e = String(e || ""), e;
217
217
  }
218
218
  var ge = (
219
219
  /** @class */
220
220
  function() {
221
- function e(r) {
222
- r === void 0 && (r = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = r;
221
+ function e(t) {
222
+ t === void 0 && (t = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = t;
223
223
  }
224
- return e.prototype.serializeKey = function(r) {
225
- return br(r);
226
- }, e.prototype.get = function(r) {
227
- var t = this.serializeKey(r);
228
- return this.items.get(t);
229
- }, e.prototype.set = function(r, t, a) {
230
- var n = this.serializeKey(r), i = a || this.ttl, u = Date.now(), v = {
231
- data: t,
232
- createdAt: u,
233
- expiresAt: i ? u + i : 1 / 0
224
+ return e.prototype.serializeKey = function(t) {
225
+ return St(t);
226
+ }, e.prototype.get = function(t) {
227
+ var r = this.serializeKey(t);
228
+ return this.items.get(r);
229
+ }, e.prototype.set = function(t, r, a) {
230
+ var n = this.serializeKey(t), i = a || this.ttl, l = Date.now(), f = {
231
+ data: r,
232
+ createdAt: l,
233
+ expiresAt: i ? l + i : 1 / 0
234
234
  };
235
- this.dispatchExpire(i, v, n), this.items.set(n, v);
236
- }, e.prototype.dispatchExpire = function(r, t, a) {
235
+ this.dispatchExpire(i, f, n), this.items.set(n, f);
236
+ }, e.prototype.dispatchExpire = function(t, r, a) {
237
237
  var n = this;
238
- r && setTimeout(function() {
239
- var i = Date.now(), u = i >= t.expiresAt;
240
- u && n.delete(a);
241
- }, r);
242
- }, e.prototype.delete = function(r) {
243
- this.items.delete(r);
238
+ t && setTimeout(function() {
239
+ var i = Date.now(), l = i >= r.expiresAt;
240
+ l && n.delete(a);
241
+ }, t);
242
+ }, e.prototype.delete = function(t) {
243
+ this.items.delete(t);
244
244
  }, e;
245
245
  }()
246
246
  );
247
- function Sr() {
247
+ function bt() {
248
248
  return typeof navigator.onLine < "u" ? navigator.onLine : !0;
249
249
  }
250
- function _r() {
250
+ function _t() {
251
251
  return typeof document < "u" && typeof document.visibilityState < "u" ? document.visibilityState !== "hidden" : !0;
252
252
  }
253
- var wr = function(e) {
254
- return fetch(e).then(function(r) {
255
- return r.json();
253
+ var wt = function(e) {
254
+ return fetch(e).then(function(t) {
255
+ return t.json();
256
256
  });
257
257
  };
258
258
  const fe = {
259
- isOnline: Sr,
260
- isDocumentVisible: _r,
261
- fetcher: wr
259
+ isOnline: bt,
260
+ isDocumentVisible: _t,
261
+ fetcher: wt
262
262
  };
263
- var F = function() {
264
- return F = Object.assign || function(e) {
265
- for (var r, t = 1, a = arguments.length; t < a; t++) {
266
- r = arguments[t];
267
- for (var n in r)
268
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
263
+ var O = function() {
264
+ return O = Object.assign || function(e) {
265
+ for (var t, r = 1, a = arguments.length; r < a; r++) {
266
+ t = arguments[r];
267
+ for (var n in t)
268
+ Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
269
269
  }
270
270
  return e;
271
- }, F.apply(this, arguments);
272
- }, Z = function(e, r, t, a) {
271
+ }, O.apply(this, arguments);
272
+ }, P = function(e, t, r, a) {
273
273
  function n(i) {
274
- return i instanceof t ? i : new t(function(u) {
275
- u(i);
274
+ return i instanceof r ? i : new r(function(l) {
275
+ l(i);
276
276
  });
277
277
  }
278
- return new (t || (t = Promise))(function(i, u) {
279
- function v(s) {
278
+ return new (r || (r = Promise))(function(i, l) {
279
+ function f(s) {
280
280
  try {
281
281
  o(a.next(s));
282
- } catch (l) {
283
- u(l);
282
+ } catch (u) {
283
+ l(u);
284
284
  }
285
285
  }
286
- function d(s) {
286
+ function c(s) {
287
287
  try {
288
288
  o(a.throw(s));
289
- } catch (l) {
290
- u(l);
289
+ } catch (u) {
290
+ l(u);
291
291
  }
292
292
  }
293
293
  function o(s) {
294
- s.done ? i(s.value) : n(s.value).then(v, d);
294
+ s.done ? i(s.value) : n(s.value).then(f, c);
295
295
  }
296
- o((a = a.apply(e, r || [])).next());
296
+ o((a = a.apply(e, t || [])).next());
297
297
  });
298
- }, U = function(e, r) {
299
- var t = { label: 0, sent: function() {
298
+ }, G = function(e, t) {
299
+ var r = { label: 0, sent: function() {
300
300
  if (i[0] & 1)
301
301
  throw i[1];
302
302
  return i[1];
303
- }, trys: [], ops: [] }, a, n, i, u;
304
- return u = { next: v(0), throw: v(1), return: v(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
303
+ }, trys: [], ops: [] }, a, n, i, l;
304
+ return l = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
305
305
  return this;
306
- }), u;
307
- function v(o) {
306
+ }), l;
307
+ function f(o) {
308
308
  return function(s) {
309
- return d([o, s]);
309
+ return c([o, s]);
310
310
  };
311
311
  }
312
- function d(o) {
312
+ function c(o) {
313
313
  if (a)
314
314
  throw new TypeError("Generator is already executing.");
315
- for (; t; )
315
+ for (; r; )
316
316
  try {
317
317
  if (a = 1, n && (i = o[0] & 2 ? n.return : o[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, o[1])).done)
318
318
  return i;
@@ -322,34 +322,34 @@ var F = function() {
322
322
  i = o;
323
323
  break;
324
324
  case 4:
325
- return t.label++, { value: o[1], done: !1 };
325
+ return r.label++, { value: o[1], done: !1 };
326
326
  case 5:
327
- t.label++, n = o[1], o = [0];
327
+ r.label++, n = o[1], o = [0];
328
328
  continue;
329
329
  case 7:
330
- o = t.ops.pop(), t.trys.pop();
330
+ o = r.ops.pop(), r.trys.pop();
331
331
  continue;
332
332
  default:
333
- if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
334
- t = 0;
333
+ if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
334
+ r = 0;
335
335
  continue;
336
336
  }
337
337
  if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) {
338
- t.label = o[1];
338
+ r.label = o[1];
339
339
  break;
340
340
  }
341
- if (o[0] === 6 && t.label < i[1]) {
342
- t.label = i[1], i = o;
341
+ if (o[0] === 6 && r.label < i[1]) {
342
+ r.label = i[1], i = o;
343
343
  break;
344
344
  }
345
- if (i && t.label < i[2]) {
346
- t.label = i[2], t.ops.push(o);
345
+ if (i && r.label < i[2]) {
346
+ r.label = i[2], r.ops.push(o);
347
347
  break;
348
348
  }
349
- i[2] && t.ops.pop(), t.trys.pop();
349
+ i[2] && r.ops.pop(), r.trys.pop();
350
350
  continue;
351
351
  }
352
- o = r.call(e, t);
352
+ o = t.call(e, r);
353
353
  } catch (s) {
354
354
  o = [6, s], n = 0;
355
355
  } finally {
@@ -359,32 +359,32 @@ var F = function() {
359
359
  throw o[1];
360
360
  return { value: o[0] ? o[1] : void 0, done: !0 };
361
361
  }
362
- }, Rr = function(e, r) {
363
- var t = typeof Symbol == "function" && e[Symbol.iterator];
364
- if (!t)
362
+ }, Rt = function(e, t) {
363
+ var r = typeof Symbol == "function" && e[Symbol.iterator];
364
+ if (!r)
365
365
  return e;
366
- var a = t.call(e), n, i = [], u;
366
+ var a = r.call(e), n, i = [], l;
367
367
  try {
368
- for (; (r === void 0 || r-- > 0) && !(n = a.next()).done; )
368
+ for (; (t === void 0 || t-- > 0) && !(n = a.next()).done; )
369
369
  i.push(n.value);
370
- } catch (v) {
371
- u = { error: v };
370
+ } catch (f) {
371
+ l = { error: f };
372
372
  } finally {
373
373
  try {
374
- n && !n.done && (t = a.return) && t.call(a);
374
+ n && !n.done && (r = a.return) && r.call(a);
375
375
  } finally {
376
- if (u)
377
- throw u.error;
376
+ if (l)
377
+ throw l.error;
378
378
  }
379
379
  }
380
380
  return i;
381
- }, Tr = function(e, r, t) {
382
- if (t || arguments.length === 2)
383
- for (var a = 0, n = r.length, i; a < n; a++)
384
- (i || !(a in r)) && (i || (i = Array.prototype.slice.call(r, 0, a)), i[a] = r[a]);
385
- return e.concat(i || Array.prototype.slice.call(r));
386
- }, Ve = new ge(), ae = new ge(), pe = new ge(), De = {
387
- cache: Ve,
381
+ }, Nt = function(e, t, r) {
382
+ if (r || arguments.length === 2)
383
+ for (var a = 0, n = t.length, i; a < n; a++)
384
+ (i || !(a in t)) && (i || (i = Array.prototype.slice.call(t, 0, a)), i[a] = t[a]);
385
+ return e.concat(i || Array.prototype.slice.call(t));
386
+ }, De = new ge(), ae = new ge(), ve = new ge(), Ve = {
387
+ cache: De,
388
388
  refreshInterval: 0,
389
389
  ttl: 0,
390
390
  serverTTL: 1e3,
@@ -398,118 +398,118 @@ var F = function() {
398
398
  isOnline: fe.isOnline,
399
399
  isDocumentVisible: fe.isDocumentVisible
400
400
  };
401
- function Nr(e, r, t) {
401
+ function Tt(e, t, r) {
402
402
  var a = ae.get(e);
403
403
  if (a)
404
- a.data.push(r);
404
+ a.data.push(t);
405
405
  else {
406
406
  var n = 5e3;
407
- ae.set(e, [r], t > 0 ? t + n : t);
407
+ ae.set(e, [t], r > 0 ? r + n : r);
408
408
  }
409
409
  }
410
- function Er(e, r, t) {
411
- if (t.isDocumentVisible() && !(t.errorRetryCount !== void 0 && r > t.errorRetryCount)) {
412
- var a = Math.min(r || 0, t.errorRetryCount), n = a * t.errorRetryInterval;
410
+ function It(e, t, r) {
411
+ if (r.isDocumentVisible() && !(r.errorRetryCount !== void 0 && t > r.errorRetryCount)) {
412
+ var a = Math.min(t || 0, r.errorRetryCount), n = a * r.errorRetryInterval;
413
413
  setTimeout(function() {
414
414
  e(null, { errorRetryCount: a + 1, shouldRetryOnError: !0 });
415
415
  }, n);
416
416
  }
417
417
  }
418
- var Ne = function(e, r, t, a) {
419
- return t === void 0 && (t = Ve), a === void 0 && (a = De.ttl), Z(void 0, void 0, void 0, function() {
420
- var n, i, u, v, d, o, s;
421
- return U(this, function(l) {
422
- switch (l.label) {
418
+ var Te = function(e, t, r, a) {
419
+ return r === void 0 && (r = De), a === void 0 && (a = Ve.ttl), P(void 0, void 0, void 0, function() {
420
+ var n, i, l, f, c, o, s;
421
+ return G(this, function(u) {
422
+ switch (u.label) {
423
423
  case 0:
424
- if (!xr(r))
424
+ if (!xt(t))
425
425
  return [3, 5];
426
- l.label = 1;
426
+ u.label = 1;
427
427
  case 1:
428
- return l.trys.push([1, 3, , 4]), [4, r];
428
+ return u.trys.push([1, 3, , 4]), [4, t];
429
429
  case 2:
430
- return n = l.sent(), [3, 4];
430
+ return n = u.sent(), [3, 4];
431
431
  case 3:
432
- return v = l.sent(), i = v, [3, 4];
432
+ return f = u.sent(), i = f, [3, 4];
433
433
  case 4:
434
434
  return [3, 6];
435
435
  case 5:
436
- n = r, l.label = 6;
436
+ n = t, u.label = 6;
437
437
  case 6:
438
- if (u = !1, d = { data: n, error: i, isValidating: u }, typeof n < "u")
438
+ if (l = !1, c = { data: n, error: i, isValidating: l }, typeof n < "u")
439
439
  try {
440
- t.set(e, d, a);
441
- } catch (c) {
442
- console.error("swrv(mutate): failed to set cache", c);
440
+ r.set(e, c, a);
441
+ } catch (d) {
442
+ console.error("swrv(mutate): failed to set cache", d);
443
443
  }
444
- return o = ae.get(e), o && o.data.length && (s = o.data.filter(function(c) {
445
- return c.key === e;
446
- }), s.forEach(function(c, f) {
447
- typeof d.data < "u" && (c.data = d.data), c.error = d.error, c.isValidating = d.isValidating;
448
- var C = f === s.length - 1;
449
- C || delete s[f];
450
- }), s = s.filter(Boolean)), [2, d];
444
+ return o = ae.get(e), o && o.data.length && (s = o.data.filter(function(d) {
445
+ return d.key === e;
446
+ }), s.forEach(function(d, v) {
447
+ typeof c.data < "u" && (d.data = c.data), d.error = c.error, d.isValidating = c.isValidating;
448
+ var C = v === s.length - 1;
449
+ C || delete s[v];
450
+ }), s = s.filter(Boolean)), [2, c];
451
451
  }
452
452
  });
453
453
  });
454
454
  };
455
- function Ir() {
456
- for (var e = this, r = [], t = 0; t < arguments.length; t++)
457
- r[t] = arguments[t];
458
- var a, n, i = F({}, De), u = !1, v = !1, d = $e(), o = (d == null ? void 0 : d.proxy) || d;
455
+ function Et() {
456
+ for (var e = this, t = [], r = 0; r < arguments.length; r++)
457
+ t[r] = arguments[r];
458
+ var a, n, i = O({}, Ve), l = !1, f = !1, c = Be(), o = (c == null ? void 0 : c.proxy) || c;
459
459
  if (!o)
460
460
  return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
461
461
  var s = (o == null ? void 0 : o.$isServer) || !1;
462
- r.length >= 1 && (a = r[0]), r.length >= 2 && (n = r[1]), r.length > 2 && (i = F(F({}, i), r[2]));
463
- var l = s ? i.serverTTL : i.ttl, c = typeof a == "function" ? a : te(a);
462
+ t.length >= 1 && (a = t[0]), t.length >= 2 && (n = t[1]), t.length > 2 && (i = O(O({}, i), t[2]));
463
+ var u = s ? i.serverTTL : i.ttl, d = typeof a == "function" ? a : re(a);
464
464
  typeof n > "u" && (n = i.fetcher);
465
- var f = null;
466
- f || (f = Pe({
465
+ var v = null;
466
+ v || (v = Ue({
467
467
  data: void 0,
468
468
  error: void 0,
469
469
  isValidating: !0,
470
470
  key: null
471
471
  }));
472
- var C = function(S, h) {
473
- return Z(e, void 0, void 0, function() {
474
- var H, I, $, Y, oe, he, se, Ce = this;
475
- return U(this, function(ue) {
476
- switch (ue.label) {
472
+ var C = function(b, h) {
473
+ return P(e, void 0, void 0, function() {
474
+ var H, E, B, j, oe, he, se, Ce = this;
475
+ return G(this, function(le) {
476
+ switch (le.label) {
477
477
  case 0:
478
- return H = f.data === void 0, I = c.value, I ? ($ = i.cache.get(I), Y = $ && $.data, f.isValidating = !0, Y && (f.data = Y.data, f.error = Y.error), oe = S || n, !oe || !i.isDocumentVisible() && !H || (h == null ? void 0 : h.forceRevalidate) !== void 0 && !(h != null && h.forceRevalidate) ? (f.isValidating = !1, [
478
+ return H = v.data === void 0, E = d.value, E ? (B = i.cache.get(E), j = B && B.data, v.isValidating = !0, j && (v.data = j.data, v.error = j.error), oe = b || n, !oe || !i.isDocumentVisible() && !H || (h == null ? void 0 : h.forceRevalidate) !== void 0 && !(h != null && h.forceRevalidate) ? (v.isValidating = !1, [
479
479
  2
480
480
  /*return*/
481
- ]) : $ && (he = !!(Date.now() - $.createdAt >= i.dedupingInterval || h != null && h.forceRevalidate), !he) ? (f.isValidating = !1, [
481
+ ]) : B && (he = !!(Date.now() - B.createdAt >= i.dedupingInterval || h != null && h.forceRevalidate), !he) ? (v.isValidating = !1, [
482
482
  2
483
483
  /*return*/
484
484
  ]) : (se = function() {
485
- return Z(Ce, void 0, void 0, function() {
486
- var P, be, le, Se;
487
- return U(this, function(W) {
485
+ return P(Ce, void 0, void 0, function() {
486
+ var U, Se, ue, be;
487
+ return G(this, function(W) {
488
488
  switch (W.label) {
489
489
  case 0:
490
- return P = pe.get(I), P ? [3, 2] : (be = Array.isArray(I) ? I : [I], le = oe.apply(void 0, Tr([], Rr(be), !1)), pe.set(I, le, i.dedupingInterval), [4, Ne(I, le, i.cache, l)]);
490
+ return U = ve.get(E), U ? [3, 2] : (Se = Array.isArray(E) ? E : [E], ue = oe.apply(void 0, Nt([], Rt(Se), !1)), ve.set(E, ue, i.dedupingInterval), [4, Te(E, ue, i.cache, u)]);
491
491
  case 1:
492
492
  return W.sent(), [3, 4];
493
493
  case 2:
494
- return [4, Ne(I, P.data, i.cache, l)];
494
+ return [4, Te(E, U.data, i.cache, u)];
495
495
  case 3:
496
496
  W.sent(), W.label = 4;
497
497
  case 4:
498
- return f.isValidating = !1, pe.delete(I), f.error !== void 0 && (Se = !u && i.shouldRetryOnError && (h ? h.shouldRetryOnError : !0), Se && Er(C, h ? h.errorRetryCount : 1, i)), [
498
+ return v.isValidating = !1, ve.delete(E), v.error !== void 0 && (be = !l && i.shouldRetryOnError && (h ? h.shouldRetryOnError : !0), be && It(C, h ? h.errorRetryCount : 1, i)), [
499
499
  2
500
500
  /*return*/
501
501
  ];
502
502
  }
503
503
  });
504
504
  });
505
- }, Y && i.revalidateDebounce ? (setTimeout(function() {
506
- return Z(Ce, void 0, void 0, function() {
507
- return U(this, function(P) {
508
- switch (P.label) {
505
+ }, j && i.revalidateDebounce ? (setTimeout(function() {
506
+ return P(Ce, void 0, void 0, function() {
507
+ return G(this, function(U) {
508
+ switch (U.label) {
509
509
  case 0:
510
- return u ? [3, 2] : [4, se()];
510
+ return l ? [3, 2] : [4, se()];
511
511
  case 1:
512
- P.sent(), P.label = 2;
512
+ U.sent(), U.label = 2;
513
513
  case 2:
514
514
  return [
515
515
  2
@@ -525,7 +525,7 @@ function Ir() {
525
525
  case 1:
526
526
  return [4, se()];
527
527
  case 2:
528
- ue.sent(), ue.label = 3;
528
+ le.sent(), le.label = 3;
529
529
  case 3:
530
530
  return [
531
531
  2
@@ -535,25 +535,25 @@ function Ir() {
535
535
  });
536
536
  });
537
537
  }, m = function() {
538
- return Z(e, void 0, void 0, function() {
539
- return U(this, function(S) {
538
+ return P(e, void 0, void 0, function() {
539
+ return G(this, function(b) {
540
540
  return [2, C(null, { shouldRetryOnError: !1 })];
541
541
  });
542
542
  });
543
- }, b = null;
543
+ }, S = null;
544
544
  Ke(function() {
545
- var S = function() {
546
- return Z(e, void 0, void 0, function() {
547
- return U(this, function(h) {
545
+ var b = function() {
546
+ return P(e, void 0, void 0, function() {
547
+ return G(this, function(h) {
548
548
  switch (h.label) {
549
549
  case 0:
550
- return !f.error && i.isOnline() ? [4, C()] : [3, 2];
550
+ return !v.error && i.isOnline() ? [4, C()] : [3, 2];
551
551
  case 1:
552
552
  return h.sent(), [3, 3];
553
553
  case 2:
554
- b && clearTimeout(b), h.label = 3;
554
+ S && clearTimeout(S), h.label = 3;
555
555
  case 3:
556
- return i.refreshInterval && !u && (b = setTimeout(S, i.refreshInterval)), [
556
+ return i.refreshInterval && !l && (S = setTimeout(b, i.refreshInterval)), [
557
557
  2
558
558
  /*return*/
559
559
  ];
@@ -561,119 +561,119 @@ function Ir() {
561
561
  });
562
562
  });
563
563
  };
564
- i.refreshInterval && (b = setTimeout(S, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", m, !1), window.addEventListener("focus", m, !1));
565
- }), Ze(function() {
566
- u = !0, b && clearTimeout(b), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", m, !1), window.removeEventListener("focus", m, !1));
567
- var S = ae.get(c.value);
568
- S && (S.data = S.data.filter(function(h) {
569
- return h !== f;
564
+ i.refreshInterval && (S = setTimeout(b, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", m, !1), window.addEventListener("focus", m, !1));
565
+ }), Pe(function() {
566
+ l = !0, S && clearTimeout(S), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", m, !1), window.removeEventListener("focus", m, !1));
567
+ var b = ae.get(d.value);
568
+ b && (b.data = b.data.filter(function(h) {
569
+ return h !== v;
570
570
  }));
571
571
  });
572
572
  try {
573
- Ue(c, function(S) {
574
- Ge(c) || (c.value = S), f.key = S, f.isValidating = !!S, Nr(c.value, f, l), !s && !v && c.value && C(), v = !1;
573
+ Ge(d, function(b) {
574
+ Ze(d) || (d.value = b), v.key = b, v.isValidating = !!b, Tt(d.value, v, u), !s && !f && d.value && C(), f = !1;
575
575
  }, {
576
576
  immediate: !0
577
577
  });
578
578
  } catch {
579
579
  }
580
- var N = F(F({}, je(f)), { mutate: function(S, h) {
581
- return C(S, F(F({}, h), { forceRevalidate: !0 }));
580
+ var T = O(O({}, Xe(v)), { mutate: function(b, h) {
581
+ return C(b, O(O({}, h), { forceRevalidate: !0 }));
582
582
  } });
583
- return N;
583
+ return T;
584
584
  }
585
- function xr(e) {
585
+ function xt(e) {
586
586
  return e !== null && typeof e == "object" && typeof e.then == "function";
587
587
  }
588
- function kr(e, r, t) {
588
+ function kt(e, t, r) {
589
589
  const {
590
590
  data: a,
591
591
  error: n,
592
592
  isValidating: i,
593
- mutate: u
594
- } = Ir(e, r, {
593
+ mutate: l
594
+ } = Et(e, t, {
595
595
  revalidateDebounce: 500,
596
596
  revalidateOnFocus: !1,
597
597
  dedupingInterval: 100,
598
- ...t
598
+ ...r
599
599
  });
600
600
  return {
601
601
  data: g(() => a.value),
602
602
  response: a,
603
603
  error: n,
604
604
  isValidating: i,
605
- revalidate: u
605
+ revalidate: l
606
606
  };
607
607
  }
608
608
  const K = {
609
- useI18n: dr,
610
- useMetricCardBuilder: hr,
611
- useMetricFetcher: mr,
612
- useRequest: kr
613
- }, Me = Symbol("METRICS_PROVIDER_KEY"), qr = (e) => {
609
+ useI18n: dt,
610
+ useMetricCardBuilder: ht,
611
+ useMetricFetcher: mt,
612
+ useRequest: kt
613
+ }, Oe = Symbol("METRICS_PROVIDER_KEY"), Lt = (e) => {
614
614
  const {
615
- dimension: r,
616
- dimensionFilterValue: t,
615
+ dimension: t,
616
+ dimensionFilterValue: r,
617
617
  additionalFilter: a,
618
618
  queryReady: n,
619
619
  timeframe: i,
620
- tz: u,
621
- hasTrendAccess: v,
622
- refreshInterval: d,
620
+ tz: l,
621
+ hasTrendAccess: f,
622
+ refreshInterval: c,
623
623
  abortController: o,
624
624
  queryFn: s,
625
- averageLatencies: l
625
+ averageLatencies: u
626
626
  } = e;
627
- if (t && !r)
627
+ if (r && !t)
628
628
  throw new Error("Must provide a dimension if filtering by a value");
629
- const c = !!(r && t), f = !!(r && !t), C = g(() => {
629
+ const d = !!(t && r), v = !!(t && !r), C = g(() => {
630
630
  const h = [];
631
- return c && h.push({
632
- dimension: r,
631
+ return d && h.push({
632
+ dimension: t,
633
633
  type: "in",
634
- values: [t]
634
+ values: [r]
635
635
  }), a.value && h.push(...a.value), h;
636
636
  }), m = {
637
- metrics: te([
637
+ metrics: re([
638
638
  "request_count"
639
639
  ]),
640
640
  // Traffic and error rate cards should only try to query for the dimension if it's going to be used.
641
641
  // It isn't used for single entity queries.
642
642
  dimensions: [
643
- ...r && !c ? [r] : [],
643
+ ...t && !d ? [t] : [],
644
644
  "status_code_grouped"
645
645
  ],
646
646
  filter: C,
647
647
  queryReady: n,
648
648
  timeframe: i,
649
- tz: u,
649
+ tz: l,
650
650
  // Traffic and error rate cards can't query trend if multiple entities are expected.
651
- withTrend: g(() => v.value && !f),
652
- refreshInterval: d,
651
+ withTrend: g(() => f.value && !v),
652
+ refreshInterval: c,
653
653
  queryFn: s,
654
654
  abortController: o
655
- }, b = {
655
+ }, S = {
656
656
  metrics: g(() => [
657
- l.value ? "response_latency_average" : "response_latency_p99"
657
+ u.value ? "response_latency_average" : "response_latency_p99"
658
658
  ]),
659
659
  // To keep single-entity queries consistent, don't bother querying the dimension for latency
660
660
  // in the single-entity case, even though it's possible.
661
- ...r && !c ? { dimensions: [r] } : {},
661
+ ...t && !d ? { dimensions: [t] } : {},
662
662
  filter: C,
663
663
  queryReady: n,
664
664
  timeframe: i,
665
- tz: u,
665
+ tz: l,
666
666
  // Don't query latency trends in the multi-entity case: it's possible, but wasteful.
667
- withTrend: g(() => v.value && !f),
668
- refreshInterval: d,
667
+ withTrend: g(() => f.value && !v),
668
+ refreshInterval: c,
669
669
  queryFn: s,
670
670
  abortController: o
671
- }, N = K.useMetricFetcher(m), S = K.useMetricFetcher(b);
671
+ }, T = K.useMetricFetcher(m), b = K.useMetricFetcher(S);
672
672
  return {
673
- trafficData: N,
674
- latencyData: S
673
+ trafficData: T,
674
+ latencyData: b
675
675
  };
676
- }, yi = /* @__PURE__ */ k({
676
+ }, hi = /* @__PURE__ */ k({
677
677
  __name: "MetricsProvider",
678
678
  props: {
679
679
  maxTimeframe: { default: ne.THIRTY_DAY },
@@ -683,7 +683,7 @@ const K = {
683
683
  filterValue: { default: void 0 },
684
684
  additionalFilter: { default: void 0 },
685
685
  queryReady: { type: Boolean, default: !0 },
686
- refreshInterval: { default: fr },
686
+ refreshInterval: { default: ft },
687
687
  longCardTitles: { type: Boolean, default: !1 },
688
688
  containerTitle: { default: void 0 },
689
689
  description: { default: void 0 },
@@ -691,96 +691,96 @@ const K = {
691
691
  abortController: { default: void 0 }
692
692
  },
693
693
  setup(e) {
694
- const r = e;
695
- if (r.dimension && er.findIndex((f) => f === r.dimension) === -1)
696
- throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${r.dimension}`);
697
- const t = ke(pr);
694
+ const t = e;
695
+ if (t.dimension && et.findIndex((v) => v === t.dimension) === -1)
696
+ throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${t.dimension}`);
697
+ const r = ke(vt);
698
698
  let a, n;
699
- t ? (a = t.queryFn, n = t.evaluateFeatureFlagFn) : (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-metric-provider/README.md#requirements"), a = () => Promise.reject(new Error("Query bridge required")), n = (f, C) => C);
700
- const i = ar(), u = J(() => i.longRetention), v = g(() => !i.loading && r.queryReady), d = g(() => r.tz ? r.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), o = g(() => {
701
- if (r.overrideTimeframe)
702
- return r.overrideTimeframe;
703
- const f = u.value ? ie.get(r.maxTimeframe) : ie.get(ne.ONE_DAY);
704
- if (!f)
699
+ r ? (a = r.queryFn, n = r.evaluateFeatureFlagFn) : (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-metric-provider/README.md#requirements"), a = () => Promise.reject(new Error("Query bridge required")), n = (v, C) => C);
700
+ const i = at(), l = J(() => i.longRetention), f = g(() => !i.loading && t.queryReady), c = g(() => t.tz ? t.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), o = g(() => {
701
+ if (t.overrideTimeframe)
702
+ return t.overrideTimeframe;
703
+ const v = l.value ? ie.get(t.maxTimeframe) : ie.get(ne.ONE_DAY);
704
+ if (!v)
705
705
  throw new Error("Metrics provider failed to resolve fallback timeframe.");
706
- return f;
707
- }), s = g(() => r.percentileLatency ? !1 : n("MA-2527-analytics-sku-config-endpoint", !1)), {
708
- trafficData: l,
709
- latencyData: c
710
- } = qr({
711
- dimension: r.dimension,
712
- dimensionFilterValue: r.filterValue,
713
- additionalFilter: J(r, "additionalFilter"),
714
- queryReady: v,
706
+ return v;
707
+ }), s = g(() => t.percentileLatency ? !1 : n("MA-2527-analytics-sku-config-endpoint", !1)), {
708
+ trafficData: u,
709
+ latencyData: d
710
+ } = Lt({
711
+ dimension: t.dimension,
712
+ dimensionFilterValue: t.filterValue,
713
+ additionalFilter: J(t, "additionalFilter"),
714
+ queryReady: f,
715
715
  timeframe: o,
716
- tz: d,
717
- hasTrendAccess: u,
718
- refreshInterval: r.refreshInterval,
716
+ tz: c,
717
+ hasTrendAccess: l,
718
+ refreshInterval: t.refreshInterval,
719
719
  queryFn: a,
720
720
  averageLatencies: s,
721
- abortController: r.abortController
721
+ abortController: t.abortController
722
722
  });
723
- return Xe(Me, {
723
+ return je(Oe, {
724
724
  data: {
725
- traffic: l,
726
- latency: c
725
+ traffic: u,
726
+ latency: d
727
727
  },
728
- description: J(() => r.description),
729
- containerTitle: J(() => r.containerTitle),
730
- hasTrendAccess: u,
731
- longCardTitles: r.longCardTitles,
728
+ description: J(() => t.description),
729
+ containerTitle: J(() => t.containerTitle),
730
+ hasTrendAccess: l,
731
+ longCardTitles: t.longCardTitles,
732
732
  averageLatencies: s
733
- }), (f, C) => qe(f.$slots, "default", {
734
- hasTrendAccess: u.value,
733
+ }), (v, C) => Le(v.$slots, "default", {
734
+ hasTrendAccess: l.value,
735
735
  timeframe: o.value
736
736
  });
737
737
  }
738
738
  });
739
- function zr(e) {
739
+ function At(e) {
740
740
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
741
741
  }
742
- var Fe = { exports: {} };
742
+ var Me = { exports: {} };
743
743
  (function(e) {
744
744
  (function() {
745
- function r(o, s) {
745
+ function t(o, s) {
746
746
  if (s.separator === !1 || o < 1e3)
747
747
  return o.toString();
748
- var l = typeof s.separator == "string" ? s.separator : ",", c = [], f = Math.round(o).toString().split("");
749
- return f.reverse().forEach(function(C, m) {
750
- m && m % 3 === 0 && c.push(l), c.push(C);
751
- }), c.reverse().join("");
748
+ var u = typeof s.separator == "string" ? s.separator : ",", d = [], v = Math.round(o).toString().split("");
749
+ return v.reverse().forEach(function(C, m) {
750
+ m && m % 3 === 0 && d.push(u), d.push(C);
751
+ }), d.reverse().join("");
752
752
  }
753
- function t(o, s, l) {
754
- var c = o / s, f = l.round ? "round" : "floor";
755
- return l.decimal === !1 ? (o = Math[f](c), o.toString()) : (l.precision ? o = c : o = c < 10 ? Math[f](c * 10) / 10 : Math[f](c), o = o.toString(), typeof l.decimal == "string" && (o = o.replace(".", l.decimal)), o);
753
+ function r(o, s, u) {
754
+ var d = o / s, v = u.round ? "round" : "floor";
755
+ return u.decimal === !1 ? (o = Math[v](d), o.toString()) : (u.precision ? o = d : o = d < 10 ? Math[v](d * 10) / 10 : Math[v](d), o = o.toString(), typeof u.decimal == "string" && (o = o.replace(".", u.decimal)), o);
756
756
  }
757
- var a = 1e3, n = 1e4, i = 1e6, u = 1e9, v = 1e12;
758
- function d(o, s) {
759
- var l;
757
+ var a = 1e3, n = 1e4, i = 1e6, l = 1e9, f = 1e12;
758
+ function c(o, s) {
759
+ var u;
760
760
  s = s || {};
761
- var c = o < 0;
762
- c && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
763
- var f = s.min10k ? n : a;
764
- return o < f || s.precision && s.precision > Math.log10(o) ? l = r(t(o, 1, s), s) : o < i ? l = t(o, a, s) + "k" : o < u ? l = t(o, i, s) + "m" : o < v ? l = r(t(o, u, s), s) + "b" : l = r(t(o, v, s), s) + "t", c && (l = "-" + l), s.capital && (l = l.toUpperCase()), s.prefix && (l = s.prefix + l), s.suffix && (l = l + s.suffix), l;
761
+ var d = o < 0;
762
+ d && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
763
+ var v = s.min10k ? n : a;
764
+ return o < v || s.precision && s.precision > Math.log10(o) ? u = t(r(o, 1, s), s) : o < i ? u = r(o, a, s) + "k" : o < l ? u = r(o, i, s) + "m" : o < f ? u = t(r(o, l, s), s) + "b" : u = t(r(o, f, s), s) + "t", d && (u = "-" + u), s.capital && (u = u.toUpperCase()), s.prefix && (u = s.prefix + u), s.suffix && (u = u + s.suffix), u;
765
765
  }
766
- d.addCommas = r, e.exports = d;
766
+ c.addCommas = t, e.exports = c;
767
767
  })();
768
- })(Fe);
769
- var Lr = Fe.exports;
770
- const Ar = /* @__PURE__ */ zr(Lr);
771
- var q = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.LargeCompact = "lgc", e.ExtraLarge = "xl", e))(q || {});
772
- const w = "24px", M = (e, r) => {
773
- const t = e.__vccOpts || e;
774
- for (const [a, n] of r)
775
- t[a] = n;
776
- return t;
777
- }, Vr = (e) => (V("data-v-80a84c23"), e = e(), D(), e), Dr = ["aria-hidden"], Mr = {
768
+ })(Me);
769
+ var qt = Me.exports;
770
+ const zt = /* @__PURE__ */ At(qt);
771
+ var M = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(M || {}), F = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.ExtraLarge = "xl", e))(F || {});
772
+ const _ = "24px", V = (e, t) => {
773
+ const r = e.__vccOpts || e;
774
+ for (const [a, n] of t)
775
+ r[a] = n;
776
+ return r;
777
+ }, Dt = (e) => (z("data-v-80a84c23"), e = e(), D(), e), Vt = ["aria-hidden"], Ot = {
778
778
  key: 0,
779
779
  "data-testid": "kui-icon-svg-title"
780
- }, Fr = /* @__PURE__ */ Vr(() => /* @__PURE__ */ x("path", {
780
+ }, Mt = /* @__PURE__ */ Dt(() => /* @__PURE__ */ x("path", {
781
781
  d: "M6.5 20C4.98333 20 3.6875 19.475 2.6125 18.425C1.5375 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.6042 4.67917 16.9625 6.0375C18.3208 7.39583 19 9.05 19 11C20.15 11.1333 21.1042 11.6292 21.8625 12.4875C22.6208 13.3458 23 14.35 23 15.5C23 16.75 22.5625 17.8125 21.6875 18.6875C20.8125 19.5625 19.75 20 18.5 20H13C12.45 20 11.9792 19.8042 11.5875 19.4125C11.1958 19.0208 11 18.55 11 18V12.85L9.4 14.4L8 13L12 9L16 13L14.6 14.4L13 12.85V18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5125 8.4375 15.5375 7.4625C14.5625 6.4875 13.3833 6 12 6C10.6167 6 9.4375 6.4875 8.4625 7.4625C7.4875 8.4375 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18H9V20H6.5Z",
782
782
  fill: "currentColor"
783
- }, null, -1)), Or = /* @__PURE__ */ k({
783
+ }, null, -1)), Ft = /* @__PURE__ */ k({
784
784
  __name: "CloudUploadIcon",
785
785
  props: {
786
786
  /** The accessibility text provided to screen readers */
@@ -811,14 +811,14 @@ const w = "24px", M = (e, r) => {
811
811
  size: {
812
812
  type: [Number, String],
813
813
  required: !1,
814
- default: w,
814
+ default: _,
815
815
  // if setting to the imported const fails, just pass a number of 24 as the default.
816
816
  validator: (e) => {
817
817
  if (typeof e == "number" && e > 0)
818
818
  return !0;
819
819
  if (typeof e == "string") {
820
- const r = String(e).replace(/px/gi, ""), t = Number(r);
821
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
820
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
821
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
822
822
  return !0;
823
823
  }
824
824
  return !1;
@@ -832,30 +832,30 @@ const w = "24px", M = (e, r) => {
832
832
  }
833
833
  },
834
834
  setup(e) {
835
- const r = e, t = g(() => {
836
- if (typeof r.size == "number" && r.size > 0)
837
- return `${r.size}px`;
838
- if (typeof r.size == "string") {
839
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
835
+ const t = e, r = g(() => {
836
+ if (typeof t.size == "number" && t.size > 0)
837
+ return `${t.size}px`;
838
+ if (typeof t.size == "string") {
839
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
840
840
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
841
841
  return `${i}px`;
842
842
  }
843
- return w;
843
+ return _;
844
844
  }), a = g(() => ({
845
845
  boxSizing: "border-box",
846
- color: r.color,
847
- display: r.display,
848
- height: t.value,
846
+ color: t.color,
847
+ display: t.display,
848
+ height: r.value,
849
849
  lineHeight: "0",
850
- width: t.value
850
+ width: r.value
851
851
  }));
852
- return (n, i) => (p(), E(z(e.as), {
852
+ return (n, i) => (p(), I(L(e.as), {
853
853
  "aria-hidden": e.decorative ? "true" : void 0,
854
854
  class: "kui-icon cloud-upload-icon",
855
855
  "data-testid": "kui-icon-wrapper-cloud-upload-icon",
856
- style: A(a.value)
856
+ style: q(a.value)
857
857
  }, {
858
- default: L(() => [
858
+ default: A(() => [
859
859
  (p(), y("svg", {
860
860
  "aria-hidden": e.decorative ? "true" : void 0,
861
861
  "data-testid": "kui-icon-svg-cloud-upload-icon",
@@ -866,20 +866,20 @@ const w = "24px", M = (e, r) => {
866
866
  width: "100%",
867
867
  xmlns: "http://www.w3.org/2000/svg"
868
868
  }, [
869
- e.title ? (p(), y("title", Mr, R(e.title), 1)) : T("", !0),
870
- Fr
871
- ], 8, Dr))
869
+ e.title ? (p(), y("title", Ot, w(e.title), 1)) : N("", !0),
870
+ Mt
871
+ ], 8, Vt))
872
872
  ]),
873
873
  _: 1
874
874
  }, 8, ["aria-hidden", "style"]));
875
875
  }
876
- }), Hr = /* @__PURE__ */ M(Or, [["__scopeId", "data-v-80a84c23"]]), Br = (e) => (V("data-v-51fd13af"), e = e(), D(), e), $r = ["aria-hidden"], Pr = {
876
+ }), Ht = /* @__PURE__ */ V(Ft, [["__scopeId", "data-v-80a84c23"]]), $t = (e) => (z("data-v-51fd13af"), e = e(), D(), e), Bt = ["aria-hidden"], Ut = {
877
877
  key: 0,
878
878
  "data-testid": "kui-icon-svg-title"
879
- }, Kr = /* @__PURE__ */ Br(() => /* @__PURE__ */ x("path", {
879
+ }, Kt = /* @__PURE__ */ $t(() => /* @__PURE__ */ x("path", {
880
880
  d: "M4 17V14H20V17H4ZM4 10V7H20V10H4Z",
881
881
  fill: "currentColor"
882
- }, null, -1)), Zr = /* @__PURE__ */ k({
882
+ }, null, -1)), Pt = /* @__PURE__ */ k({
883
883
  __name: "EqualIcon",
884
884
  props: {
885
885
  /** The accessibility text provided to screen readers */
@@ -910,14 +910,14 @@ const w = "24px", M = (e, r) => {
910
910
  size: {
911
911
  type: [Number, String],
912
912
  required: !1,
913
- default: w,
913
+ default: _,
914
914
  // if setting to the imported const fails, just pass a number of 24 as the default.
915
915
  validator: (e) => {
916
916
  if (typeof e == "number" && e > 0)
917
917
  return !0;
918
918
  if (typeof e == "string") {
919
- const r = String(e).replace(/px/gi, ""), t = Number(r);
920
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
919
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
920
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
921
921
  return !0;
922
922
  }
923
923
  return !1;
@@ -931,30 +931,30 @@ const w = "24px", M = (e, r) => {
931
931
  }
932
932
  },
933
933
  setup(e) {
934
- const r = e, t = g(() => {
935
- if (typeof r.size == "number" && r.size > 0)
936
- return `${r.size}px`;
937
- if (typeof r.size == "string") {
938
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
934
+ const t = e, r = g(() => {
935
+ if (typeof t.size == "number" && t.size > 0)
936
+ return `${t.size}px`;
937
+ if (typeof t.size == "string") {
938
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
939
939
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
940
940
  return `${i}px`;
941
941
  }
942
- return w;
942
+ return _;
943
943
  }), a = g(() => ({
944
944
  boxSizing: "border-box",
945
- color: r.color,
946
- display: r.display,
947
- height: t.value,
945
+ color: t.color,
946
+ display: t.display,
947
+ height: r.value,
948
948
  lineHeight: "0",
949
- width: t.value
949
+ width: r.value
950
950
  }));
951
- return (n, i) => (p(), E(z(e.as), {
951
+ return (n, i) => (p(), I(L(e.as), {
952
952
  "aria-hidden": e.decorative ? "true" : void 0,
953
953
  class: "kui-icon equal-icon",
954
954
  "data-testid": "kui-icon-wrapper-equal-icon",
955
- style: A(a.value)
955
+ style: q(a.value)
956
956
  }, {
957
- default: L(() => [
957
+ default: A(() => [
958
958
  (p(), y("svg", {
959
959
  "aria-hidden": e.decorative ? "true" : void 0,
960
960
  "data-testid": "kui-icon-svg-equal-icon",
@@ -965,20 +965,20 @@ const w = "24px", M = (e, r) => {
965
965
  width: "100%",
966
966
  xmlns: "http://www.w3.org/2000/svg"
967
967
  }, [
968
- e.title ? (p(), y("title", Pr, R(e.title), 1)) : T("", !0),
969
- Kr
970
- ], 8, $r))
968
+ e.title ? (p(), y("title", Ut, w(e.title), 1)) : N("", !0),
969
+ Kt
970
+ ], 8, Bt))
971
971
  ]),
972
972
  _: 1
973
973
  }, 8, ["aria-hidden", "style"]));
974
974
  }
975
- }), Ur = /* @__PURE__ */ M(Zr, [["__scopeId", "data-v-51fd13af"]]), Gr = (e) => (V("data-v-c5283a2c"), e = e(), D(), e), jr = ["aria-hidden"], Xr = {
975
+ }), Gt = /* @__PURE__ */ V(Pt, [["__scopeId", "data-v-51fd13af"]]), Zt = (e) => (z("data-v-c5283a2c"), e = e(), D(), e), Xt = ["aria-hidden"], jt = {
976
976
  key: 0,
977
977
  "data-testid": "kui-icon-svg-title"
978
- }, Yr = /* @__PURE__ */ Gr(() => /* @__PURE__ */ x("path", {
978
+ }, Yt = /* @__PURE__ */ Zt(() => /* @__PURE__ */ x("path", {
979
979
  d: "M5 11V9H15V11H5Z",
980
980
  fill: "currentColor"
981
- }, null, -1)), Qr = /* @__PURE__ */ k({
981
+ }, null, -1)), Qt = /* @__PURE__ */ k({
982
982
  __name: "IndeterminateSmallIcon",
983
983
  props: {
984
984
  /** The accessibility text provided to screen readers */
@@ -1009,14 +1009,14 @@ const w = "24px", M = (e, r) => {
1009
1009
  size: {
1010
1010
  type: [Number, String],
1011
1011
  required: !1,
1012
- default: w,
1012
+ default: _,
1013
1013
  // if setting to the imported const fails, just pass a number of 24 as the default.
1014
1014
  validator: (e) => {
1015
1015
  if (typeof e == "number" && e > 0)
1016
1016
  return !0;
1017
1017
  if (typeof e == "string") {
1018
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1019
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1018
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1019
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1020
1020
  return !0;
1021
1021
  }
1022
1022
  return !1;
@@ -1030,30 +1030,30 @@ const w = "24px", M = (e, r) => {
1030
1030
  }
1031
1031
  },
1032
1032
  setup(e) {
1033
- const r = e, t = g(() => {
1034
- if (typeof r.size == "number" && r.size > 0)
1035
- return `${r.size}px`;
1036
- if (typeof r.size == "string") {
1037
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1033
+ const t = e, r = g(() => {
1034
+ if (typeof t.size == "number" && t.size > 0)
1035
+ return `${t.size}px`;
1036
+ if (typeof t.size == "string") {
1037
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1038
1038
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1039
1039
  return `${i}px`;
1040
1040
  }
1041
- return w;
1041
+ return _;
1042
1042
  }), a = g(() => ({
1043
1043
  boxSizing: "border-box",
1044
- color: r.color,
1045
- display: r.display,
1046
- height: t.value,
1044
+ color: t.color,
1045
+ display: t.display,
1046
+ height: r.value,
1047
1047
  lineHeight: "0",
1048
- width: t.value
1048
+ width: r.value
1049
1049
  }));
1050
- return (n, i) => (p(), E(z(e.as), {
1050
+ return (n, i) => (p(), I(L(e.as), {
1051
1051
  "aria-hidden": e.decorative ? "true" : void 0,
1052
1052
  class: "kui-icon indeterminate-small-icon",
1053
1053
  "data-testid": "kui-icon-wrapper-indeterminate-small-icon",
1054
- style: A(a.value)
1054
+ style: q(a.value)
1055
1055
  }, {
1056
- default: L(() => [
1056
+ default: A(() => [
1057
1057
  (p(), y("svg", {
1058
1058
  "aria-hidden": e.decorative ? "true" : void 0,
1059
1059
  "data-testid": "kui-icon-svg-indeterminate-small-icon",
@@ -1064,20 +1064,20 @@ const w = "24px", M = (e, r) => {
1064
1064
  width: "100%",
1065
1065
  xmlns: "http://www.w3.org/2000/svg"
1066
1066
  }, [
1067
- e.title ? (p(), y("title", Xr, R(e.title), 1)) : T("", !0),
1068
- Yr
1069
- ], 8, jr))
1067
+ e.title ? (p(), y("title", jt, w(e.title), 1)) : N("", !0),
1068
+ Yt
1069
+ ], 8, Xt))
1070
1070
  ]),
1071
1071
  _: 1
1072
1072
  }, 8, ["aria-hidden", "style"]));
1073
1073
  }
1074
- }), Oe = /* @__PURE__ */ M(Qr, [["__scopeId", "data-v-c5283a2c"]]), Wr = (e) => (V("data-v-7958c198"), e = e(), D(), e), Jr = ["aria-hidden"], et = {
1074
+ }), Fe = /* @__PURE__ */ V(Qt, [["__scopeId", "data-v-c5283a2c"]]), Wt = (e) => (z("data-v-7958c198"), e = e(), D(), e), Jt = ["aria-hidden"], er = {
1075
1075
  key: 0,
1076
1076
  "data-testid": "kui-icon-svg-title"
1077
- }, rt = /* @__PURE__ */ Wr(() => /* @__PURE__ */ x("path", {
1077
+ }, tr = /* @__PURE__ */ Wt(() => /* @__PURE__ */ x("path", {
1078
1078
  d: "M11 17H13V11H11V17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",
1079
1079
  fill: "currentColor"
1080
- }, null, -1)), tt = /* @__PURE__ */ k({
1080
+ }, null, -1)), rr = /* @__PURE__ */ k({
1081
1081
  __name: "InfoIcon",
1082
1082
  props: {
1083
1083
  /** The accessibility text provided to screen readers */
@@ -1108,14 +1108,14 @@ const w = "24px", M = (e, r) => {
1108
1108
  size: {
1109
1109
  type: [Number, String],
1110
1110
  required: !1,
1111
- default: w,
1111
+ default: _,
1112
1112
  // if setting to the imported const fails, just pass a number of 24 as the default.
1113
1113
  validator: (e) => {
1114
1114
  if (typeof e == "number" && e > 0)
1115
1115
  return !0;
1116
1116
  if (typeof e == "string") {
1117
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1118
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1117
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1118
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1119
1119
  return !0;
1120
1120
  }
1121
1121
  return !1;
@@ -1129,30 +1129,30 @@ const w = "24px", M = (e, r) => {
1129
1129
  }
1130
1130
  },
1131
1131
  setup(e) {
1132
- const r = e, t = g(() => {
1133
- if (typeof r.size == "number" && r.size > 0)
1134
- return `${r.size}px`;
1135
- if (typeof r.size == "string") {
1136
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1132
+ const t = e, r = g(() => {
1133
+ if (typeof t.size == "number" && t.size > 0)
1134
+ return `${t.size}px`;
1135
+ if (typeof t.size == "string") {
1136
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1137
1137
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1138
1138
  return `${i}px`;
1139
1139
  }
1140
- return w;
1140
+ return _;
1141
1141
  }), a = g(() => ({
1142
1142
  boxSizing: "border-box",
1143
- color: r.color,
1144
- display: r.display,
1145
- height: t.value,
1143
+ color: t.color,
1144
+ display: t.display,
1145
+ height: r.value,
1146
1146
  lineHeight: "0",
1147
- width: t.value
1147
+ width: r.value
1148
1148
  }));
1149
- return (n, i) => (p(), E(z(e.as), {
1149
+ return (n, i) => (p(), I(L(e.as), {
1150
1150
  "aria-hidden": e.decorative ? "true" : void 0,
1151
1151
  class: "kui-icon info-icon",
1152
1152
  "data-testid": "kui-icon-wrapper-info-icon",
1153
- style: A(a.value)
1153
+ style: q(a.value)
1154
1154
  }, {
1155
- default: L(() => [
1155
+ default: A(() => [
1156
1156
  (p(), y("svg", {
1157
1157
  "aria-hidden": e.decorative ? "true" : void 0,
1158
1158
  "data-testid": "kui-icon-svg-info-icon",
@@ -1163,20 +1163,20 @@ const w = "24px", M = (e, r) => {
1163
1163
  width: "100%",
1164
1164
  xmlns: "http://www.w3.org/2000/svg"
1165
1165
  }, [
1166
- e.title ? (p(), y("title", et, R(e.title), 1)) : T("", !0),
1167
- rt
1168
- ], 8, Jr))
1166
+ e.title ? (p(), y("title", er, w(e.title), 1)) : N("", !0),
1167
+ tr
1168
+ ], 8, Jt))
1169
1169
  ]),
1170
1170
  _: 1
1171
1171
  }, 8, ["aria-hidden", "style"]));
1172
1172
  }
1173
- }), it = /* @__PURE__ */ M(tt, [["__scopeId", "data-v-7958c198"]]), nt = (e) => (V("data-v-d0ffb1de"), e = e(), D(), e), at = ["aria-hidden"], ot = {
1173
+ }), ir = /* @__PURE__ */ V(rr, [["__scopeId", "data-v-7958c198"]]), nr = (e) => (z("data-v-d0ffb1de"), e = e(), D(), e), ar = ["aria-hidden"], or = {
1174
1174
  key: 0,
1175
1175
  "data-testid": "kui-icon-svg-title"
1176
- }, st = /* @__PURE__ */ nt(() => /* @__PURE__ */ x("path", {
1176
+ }, sr = /* @__PURE__ */ nr(() => /* @__PURE__ */ x("path", {
1177
1177
  d: "M15.25 5C14.9 5 14.6042 4.87917 14.3625 4.6375C14.1208 4.39583 14 4.1 14 3.75C14 3.4 14.1208 3.10417 14.3625 2.8625C14.6042 2.62083 14.9 2.5 15.25 2.5C15.6 2.5 15.8958 2.62083 16.1375 2.8625C16.3792 3.10417 16.5 3.4 16.5 3.75C16.5 4.1 16.3792 4.39583 16.1375 4.6375C15.8958 4.87917 15.6 5 15.25 5ZM15.25 21.5C14.9 21.5 14.6042 21.3792 14.3625 21.1375C14.1208 20.8958 14 20.6 14 20.25C14 19.9 14.1208 19.6042 14.3625 19.3625C14.6042 19.1208 14.9 19 15.25 19C15.6 19 15.8958 19.1208 16.1375 19.3625C16.3792 19.6042 16.5 19.9 16.5 20.25C16.5 20.6 16.3792 20.8958 16.1375 21.1375C15.8958 21.3792 15.6 21.5 15.25 21.5ZM19.25 8.5C18.9 8.5 18.6042 8.37917 18.3625 8.1375C18.1208 7.89583 18 7.6 18 7.25C18 6.9 18.1208 6.60417 18.3625 6.3625C18.6042 6.12083 18.9 6 19.25 6C19.6 6 19.8958 6.12083 20.1375 6.3625C20.3792 6.60417 20.5 6.9 20.5 7.25C20.5 7.6 20.3792 7.89583 20.1375 8.1375C19.8958 8.37917 19.6 8.5 19.25 8.5ZM19.25 18C18.9 18 18.6042 17.8792 18.3625 17.6375C18.1208 17.3958 18 17.1 18 16.75C18 16.4 18.1208 16.1042 18.3625 15.8625C18.6042 15.6208 18.9 15.5 19.25 15.5C19.6 15.5 19.8958 15.6208 20.1375 15.8625C20.3792 16.1042 20.5 16.4 20.5 16.75C20.5 17.1 20.3792 17.3958 20.1375 17.6375C19.8958 17.8792 19.6 18 19.25 18ZM20.75 13.25C20.4 13.25 20.1042 13.1292 19.8625 12.8875C19.6208 12.6458 19.5 12.35 19.5 12C19.5 11.65 19.6208 11.3542 19.8625 11.1125C20.1042 10.8708 20.4 10.75 20.75 10.75C21.1 10.75 21.3958 10.8708 21.6375 11.1125C21.8792 11.3542 22 11.65 22 12C22 12.35 21.8792 12.6458 21.6375 12.8875C21.3958 13.1292 21.1 13.25 20.75 13.25ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2V4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20V22ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.9167 10.0042 11.8292 10.0125 11.7375C10.0208 11.6458 10.0417 11.5583 10.075 11.475L8 9.4L9.4 8L11.475 10.075C11.5417 10.0583 11.7167 10.0333 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14Z",
1178
1178
  fill: "currentColor"
1179
- }, null, -1)), ut = /* @__PURE__ */ k({
1179
+ }, null, -1)), lr = /* @__PURE__ */ k({
1180
1180
  __name: "ResponseIcon",
1181
1181
  props: {
1182
1182
  /** The accessibility text provided to screen readers */
@@ -1207,14 +1207,14 @@ const w = "24px", M = (e, r) => {
1207
1207
  size: {
1208
1208
  type: [Number, String],
1209
1209
  required: !1,
1210
- default: w,
1210
+ default: _,
1211
1211
  // if setting to the imported const fails, just pass a number of 24 as the default.
1212
1212
  validator: (e) => {
1213
1213
  if (typeof e == "number" && e > 0)
1214
1214
  return !0;
1215
1215
  if (typeof e == "string") {
1216
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1217
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1216
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1217
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1218
1218
  return !0;
1219
1219
  }
1220
1220
  return !1;
@@ -1228,30 +1228,30 @@ const w = "24px", M = (e, r) => {
1228
1228
  }
1229
1229
  },
1230
1230
  setup(e) {
1231
- const r = e, t = g(() => {
1232
- if (typeof r.size == "number" && r.size > 0)
1233
- return `${r.size}px`;
1234
- if (typeof r.size == "string") {
1235
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1231
+ const t = e, r = g(() => {
1232
+ if (typeof t.size == "number" && t.size > 0)
1233
+ return `${t.size}px`;
1234
+ if (typeof t.size == "string") {
1235
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1236
1236
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1237
1237
  return `${i}px`;
1238
1238
  }
1239
- return w;
1239
+ return _;
1240
1240
  }), a = g(() => ({
1241
1241
  boxSizing: "border-box",
1242
- color: r.color,
1243
- display: r.display,
1244
- height: t.value,
1242
+ color: t.color,
1243
+ display: t.display,
1244
+ height: r.value,
1245
1245
  lineHeight: "0",
1246
- width: t.value
1246
+ width: r.value
1247
1247
  }));
1248
- return (n, i) => (p(), E(z(e.as), {
1248
+ return (n, i) => (p(), I(L(e.as), {
1249
1249
  "aria-hidden": e.decorative ? "true" : void 0,
1250
1250
  class: "kui-icon response-icon",
1251
1251
  "data-testid": "kui-icon-wrapper-response-icon",
1252
- style: A(a.value)
1252
+ style: q(a.value)
1253
1253
  }, {
1254
- default: L(() => [
1254
+ default: A(() => [
1255
1255
  (p(), y("svg", {
1256
1256
  "aria-hidden": e.decorative ? "true" : void 0,
1257
1257
  "data-testid": "kui-icon-svg-response-icon",
@@ -1262,20 +1262,20 @@ const w = "24px", M = (e, r) => {
1262
1262
  width: "100%",
1263
1263
  xmlns: "http://www.w3.org/2000/svg"
1264
1264
  }, [
1265
- e.title ? (p(), y("title", ot, R(e.title), 1)) : T("", !0),
1266
- st
1267
- ], 8, at))
1265
+ e.title ? (p(), y("title", or, w(e.title), 1)) : N("", !0),
1266
+ sr
1267
+ ], 8, ar))
1268
1268
  ]),
1269
1269
  _: 1
1270
1270
  }, 8, ["aria-hidden", "style"]));
1271
1271
  }
1272
- }), lt = /* @__PURE__ */ M(ut, [["__scopeId", "data-v-d0ffb1de"]]), dt = (e) => (V("data-v-7939cf04"), e = e(), D(), e), ct = ["aria-hidden"], ft = {
1272
+ }), ur = /* @__PURE__ */ V(lr, [["__scopeId", "data-v-d0ffb1de"]]), dr = (e) => (z("data-v-7939cf04"), e = e(), D(), e), cr = ["aria-hidden"], fr = {
1273
1273
  key: 0,
1274
1274
  "data-testid": "kui-icon-svg-title"
1275
- }, pt = /* @__PURE__ */ dt(() => /* @__PURE__ */ x("path", {
1275
+ }, vr = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("path", {
1276
1276
  d: "M16 18V16H18.6L13.4 10.85L9.4 14.85L2 7.4L3.4 6L9.4 12L13.4 8L20 14.6V12H22V18H16Z",
1277
1277
  fill: "currentColor"
1278
- }, null, -1)), vt = /* @__PURE__ */ k({
1278
+ }, null, -1)), pr = /* @__PURE__ */ k({
1279
1279
  __name: "TrendDownIcon",
1280
1280
  props: {
1281
1281
  /** The accessibility text provided to screen readers */
@@ -1306,14 +1306,14 @@ const w = "24px", M = (e, r) => {
1306
1306
  size: {
1307
1307
  type: [Number, String],
1308
1308
  required: !1,
1309
- default: w,
1309
+ default: _,
1310
1310
  // if setting to the imported const fails, just pass a number of 24 as the default.
1311
1311
  validator: (e) => {
1312
1312
  if (typeof e == "number" && e > 0)
1313
1313
  return !0;
1314
1314
  if (typeof e == "string") {
1315
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1316
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1315
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1316
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1317
1317
  return !0;
1318
1318
  }
1319
1319
  return !1;
@@ -1327,30 +1327,30 @@ const w = "24px", M = (e, r) => {
1327
1327
  }
1328
1328
  },
1329
1329
  setup(e) {
1330
- const r = e, t = g(() => {
1331
- if (typeof r.size == "number" && r.size > 0)
1332
- return `${r.size}px`;
1333
- if (typeof r.size == "string") {
1334
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1330
+ const t = e, r = g(() => {
1331
+ if (typeof t.size == "number" && t.size > 0)
1332
+ return `${t.size}px`;
1333
+ if (typeof t.size == "string") {
1334
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1335
1335
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1336
1336
  return `${i}px`;
1337
1337
  }
1338
- return w;
1338
+ return _;
1339
1339
  }), a = g(() => ({
1340
1340
  boxSizing: "border-box",
1341
- color: r.color,
1342
- display: r.display,
1343
- height: t.value,
1341
+ color: t.color,
1342
+ display: t.display,
1343
+ height: r.value,
1344
1344
  lineHeight: "0",
1345
- width: t.value
1345
+ width: r.value
1346
1346
  }));
1347
- return (n, i) => (p(), E(z(e.as), {
1347
+ return (n, i) => (p(), I(L(e.as), {
1348
1348
  "aria-hidden": e.decorative ? "true" : void 0,
1349
1349
  class: "kui-icon trend-down-icon",
1350
1350
  "data-testid": "kui-icon-wrapper-trend-down-icon",
1351
- style: A(a.value)
1351
+ style: q(a.value)
1352
1352
  }, {
1353
- default: L(() => [
1353
+ default: A(() => [
1354
1354
  (p(), y("svg", {
1355
1355
  "aria-hidden": e.decorative ? "true" : void 0,
1356
1356
  "data-testid": "kui-icon-svg-trend-down-icon",
@@ -1361,20 +1361,20 @@ const w = "24px", M = (e, r) => {
1361
1361
  width: "100%",
1362
1362
  xmlns: "http://www.w3.org/2000/svg"
1363
1363
  }, [
1364
- e.title ? (p(), y("title", ft, R(e.title), 1)) : T("", !0),
1365
- pt
1366
- ], 8, ct))
1364
+ e.title ? (p(), y("title", fr, w(e.title), 1)) : N("", !0),
1365
+ vr
1366
+ ], 8, cr))
1367
1367
  ]),
1368
1368
  _: 1
1369
1369
  }, 8, ["aria-hidden", "style"]));
1370
1370
  }
1371
- }), gt = /* @__PURE__ */ M(vt, [["__scopeId", "data-v-7939cf04"]]), yt = (e) => (V("data-v-c6ab90e9"), e = e(), D(), e), mt = ["aria-hidden"], ht = {
1371
+ }), gr = /* @__PURE__ */ V(pr, [["__scopeId", "data-v-7939cf04"]]), yr = (e) => (z("data-v-c6ab90e9"), e = e(), D(), e), mr = ["aria-hidden"], hr = {
1372
1372
  key: 0,
1373
1373
  "data-testid": "kui-icon-svg-title"
1374
- }, Ct = /* @__PURE__ */ yt(() => /* @__PURE__ */ x("path", {
1374
+ }, Cr = /* @__PURE__ */ yr(() => /* @__PURE__ */ x("path", {
1375
1375
  d: "M3.4 18L2 16.6L9.4 9.15L13.4 13.15L18.6 8H16V6H22V12H20V9.4L13.4 16L9.4 12L3.4 18Z",
1376
1376
  fill: "currentColor"
1377
- }, null, -1)), bt = /* @__PURE__ */ k({
1377
+ }, null, -1)), Sr = /* @__PURE__ */ k({
1378
1378
  __name: "TrendUpIcon",
1379
1379
  props: {
1380
1380
  /** The accessibility text provided to screen readers */
@@ -1405,14 +1405,14 @@ const w = "24px", M = (e, r) => {
1405
1405
  size: {
1406
1406
  type: [Number, String],
1407
1407
  required: !1,
1408
- default: w,
1408
+ default: _,
1409
1409
  // if setting to the imported const fails, just pass a number of 24 as the default.
1410
1410
  validator: (e) => {
1411
1411
  if (typeof e == "number" && e > 0)
1412
1412
  return !0;
1413
1413
  if (typeof e == "string") {
1414
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1415
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1414
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1415
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1416
1416
  return !0;
1417
1417
  }
1418
1418
  return !1;
@@ -1426,30 +1426,30 @@ const w = "24px", M = (e, r) => {
1426
1426
  }
1427
1427
  },
1428
1428
  setup(e) {
1429
- const r = e, t = g(() => {
1430
- if (typeof r.size == "number" && r.size > 0)
1431
- return `${r.size}px`;
1432
- if (typeof r.size == "string") {
1433
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1429
+ const t = e, r = g(() => {
1430
+ if (typeof t.size == "number" && t.size > 0)
1431
+ return `${t.size}px`;
1432
+ if (typeof t.size == "string") {
1433
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1434
1434
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1435
1435
  return `${i}px`;
1436
1436
  }
1437
- return w;
1437
+ return _;
1438
1438
  }), a = g(() => ({
1439
1439
  boxSizing: "border-box",
1440
- color: r.color,
1441
- display: r.display,
1442
- height: t.value,
1440
+ color: t.color,
1441
+ display: t.display,
1442
+ height: r.value,
1443
1443
  lineHeight: "0",
1444
- width: t.value
1444
+ width: r.value
1445
1445
  }));
1446
- return (n, i) => (p(), E(z(e.as), {
1446
+ return (n, i) => (p(), I(L(e.as), {
1447
1447
  "aria-hidden": e.decorative ? "true" : void 0,
1448
1448
  class: "kui-icon trend-up-icon",
1449
1449
  "data-testid": "kui-icon-wrapper-trend-up-icon",
1450
- style: A(a.value)
1450
+ style: q(a.value)
1451
1451
  }, {
1452
- default: L(() => [
1452
+ default: A(() => [
1453
1453
  (p(), y("svg", {
1454
1454
  "aria-hidden": e.decorative ? "true" : void 0,
1455
1455
  "data-testid": "kui-icon-svg-trend-up-icon",
@@ -1460,20 +1460,20 @@ const w = "24px", M = (e, r) => {
1460
1460
  width: "100%",
1461
1461
  xmlns: "http://www.w3.org/2000/svg"
1462
1462
  }, [
1463
- e.title ? (p(), y("title", ht, R(e.title), 1)) : T("", !0),
1464
- Ct
1465
- ], 8, mt))
1463
+ e.title ? (p(), y("title", hr, w(e.title), 1)) : N("", !0),
1464
+ Cr
1465
+ ], 8, mr))
1466
1466
  ]),
1467
1467
  _: 1
1468
1468
  }, 8, ["aria-hidden", "style"]));
1469
1469
  }
1470
- }), St = /* @__PURE__ */ M(bt, [["__scopeId", "data-v-c6ab90e9"]]), _t = (e) => (V("data-v-989e7f51"), e = e(), D(), e), wt = ["aria-hidden"], Rt = {
1470
+ }), br = /* @__PURE__ */ V(Sr, [["__scopeId", "data-v-c6ab90e9"]]), _r = (e) => (z("data-v-989e7f51"), e = e(), D(), e), wr = ["aria-hidden"], Rr = {
1471
1471
  key: 0,
1472
1472
  "data-testid": "kui-icon-svg-title"
1473
- }, Tt = /* @__PURE__ */ _t(() => /* @__PURE__ */ x("path", {
1473
+ }, Nr = /* @__PURE__ */ _r(() => /* @__PURE__ */ x("path", {
1474
1474
  d: "M9 20C8.68333 20 8.4 19.9083 8.15 19.725C7.9 19.5417 7.71667 19.3083 7.6 19.025L5.3 13H1V11H6.7L9 17.1L13.6 4.975C13.7167 4.69167 13.9 4.45833 14.15 4.275C14.4 4.09167 14.6833 4 15 4C15.3167 4 15.6 4.09167 15.85 4.275C16.1 4.45833 16.2833 4.69167 16.4 4.975L18.7 11H23V13H17.3L15 6.9L10.4 19.025C10.2833 19.3083 10.1 19.5417 9.85 19.725C9.6 19.9083 9.31667 20 9 20Z",
1475
1475
  fill: "currentColor"
1476
- }, null, -1)), Nt = /* @__PURE__ */ k({
1476
+ }, null, -1)), Tr = /* @__PURE__ */ k({
1477
1477
  __name: "VitalsIcon",
1478
1478
  props: {
1479
1479
  /** The accessibility text provided to screen readers */
@@ -1504,14 +1504,14 @@ const w = "24px", M = (e, r) => {
1504
1504
  size: {
1505
1505
  type: [Number, String],
1506
1506
  required: !1,
1507
- default: w,
1507
+ default: _,
1508
1508
  // if setting to the imported const fails, just pass a number of 24 as the default.
1509
1509
  validator: (e) => {
1510
1510
  if (typeof e == "number" && e > 0)
1511
1511
  return !0;
1512
1512
  if (typeof e == "string") {
1513
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1514
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1513
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1514
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1515
1515
  return !0;
1516
1516
  }
1517
1517
  return !1;
@@ -1525,30 +1525,30 @@ const w = "24px", M = (e, r) => {
1525
1525
  }
1526
1526
  },
1527
1527
  setup(e) {
1528
- const r = e, t = g(() => {
1529
- if (typeof r.size == "number" && r.size > 0)
1530
- return `${r.size}px`;
1531
- if (typeof r.size == "string") {
1532
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1528
+ const t = e, r = g(() => {
1529
+ if (typeof t.size == "number" && t.size > 0)
1530
+ return `${t.size}px`;
1531
+ if (typeof t.size == "string") {
1532
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1533
1533
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1534
1534
  return `${i}px`;
1535
1535
  }
1536
- return w;
1536
+ return _;
1537
1537
  }), a = g(() => ({
1538
1538
  boxSizing: "border-box",
1539
- color: r.color,
1540
- display: r.display,
1541
- height: t.value,
1539
+ color: t.color,
1540
+ display: t.display,
1541
+ height: r.value,
1542
1542
  lineHeight: "0",
1543
- width: t.value
1543
+ width: r.value
1544
1544
  }));
1545
- return (n, i) => (p(), E(z(e.as), {
1545
+ return (n, i) => (p(), I(L(e.as), {
1546
1546
  "aria-hidden": e.decorative ? "true" : void 0,
1547
1547
  class: "kui-icon vitals-icon",
1548
1548
  "data-testid": "kui-icon-wrapper-vitals-icon",
1549
- style: A(a.value)
1549
+ style: q(a.value)
1550
1550
  }, {
1551
- default: L(() => [
1551
+ default: A(() => [
1552
1552
  (p(), y("svg", {
1553
1553
  "aria-hidden": e.decorative ? "true" : void 0,
1554
1554
  "data-testid": "kui-icon-svg-vitals-icon",
@@ -1559,20 +1559,20 @@ const w = "24px", M = (e, r) => {
1559
1559
  width: "100%",
1560
1560
  xmlns: "http://www.w3.org/2000/svg"
1561
1561
  }, [
1562
- e.title ? (p(), y("title", Rt, R(e.title), 1)) : T("", !0),
1563
- Tt
1564
- ], 8, wt))
1562
+ e.title ? (p(), y("title", Rr, w(e.title), 1)) : N("", !0),
1563
+ Nr
1564
+ ], 8, wr))
1565
1565
  ]),
1566
1566
  _: 1
1567
1567
  }, 8, ["aria-hidden", "style"]));
1568
1568
  }
1569
- }), Et = /* @__PURE__ */ M(Nt, [["__scopeId", "data-v-989e7f51"]]), It = (e) => (V("data-v-5fc3c6c8"), e = e(), D(), e), xt = ["aria-hidden"], kt = {
1569
+ }), Ir = /* @__PURE__ */ V(Tr, [["__scopeId", "data-v-989e7f51"]]), Er = (e) => (z("data-v-5fc3c6c8"), e = e(), D(), e), xr = ["aria-hidden"], kr = {
1570
1570
  key: 0,
1571
1571
  "data-testid": "kui-icon-svg-title"
1572
- }, qt = /* @__PURE__ */ It(() => /* @__PURE__ */ x("path", {
1572
+ }, Lr = /* @__PURE__ */ Er(() => /* @__PURE__ */ x("path", {
1573
1573
  d: "M12.0001 22.025C11.7334 22.025 11.4793 21.975 11.2376 21.875C10.9959 21.775 10.7751 21.6333 10.5751 21.45L2.5501 13.425C2.36676 13.225 2.2251 13.0041 2.1251 12.7625C2.0251 12.5208 1.9751 12.2666 1.9751 12C1.9751 11.7333 2.0251 11.475 2.1251 11.225C2.2251 10.975 2.36676 10.7583 2.5501 10.575L10.5751 2.54998C10.7751 2.34998 10.9959 2.20414 11.2376 2.11248C11.4793 2.02081 11.7334 1.97498 12.0001 1.97498C12.2668 1.97498 12.5251 2.02081 12.7751 2.11248C13.0251 2.20414 13.2418 2.34998 13.4251 2.54998L21.4501 10.575C21.6501 10.7583 21.7959 10.975 21.8876 11.225C21.9793 11.475 22.0251 11.7333 22.0251 12C22.0251 12.2666 21.9793 12.5208 21.8876 12.7625C21.7959 13.0041 21.6501 13.225 21.4501 13.425L13.4251 21.45C13.2418 21.6333 13.0251 21.775 12.7751 21.875C12.5251 21.975 12.2668 22.025 12.0001 22.025ZM12.0001 20.025L20.0251 12L12.0001 3.97498L3.9751 12L12.0001 20.025ZM11.0001 13H13.0001V6.99998H11.0001V13ZM12.0001 16C12.2834 16 12.5209 15.9041 12.7126 15.7125C12.9043 15.5208 13.0001 15.2833 13.0001 15C13.0001 14.7166 12.9043 14.4791 12.7126 14.2875C12.5209 14.0958 12.2834 14 12.0001 14C11.7168 14 11.4793 14.0958 11.2876 14.2875C11.0959 14.4791 11.0001 14.7166 11.0001 15C11.0001 15.2833 11.0959 15.5208 11.2876 15.7125C11.4793 15.9041 11.7168 16 12.0001 16Z",
1574
1574
  fill: "currentColor"
1575
- }, null, -1)), zt = /* @__PURE__ */ k({
1575
+ }, null, -1)), Ar = /* @__PURE__ */ k({
1576
1576
  __name: "WarningOutlineIcon",
1577
1577
  props: {
1578
1578
  /** The accessibility text provided to screen readers */
@@ -1603,14 +1603,14 @@ const w = "24px", M = (e, r) => {
1603
1603
  size: {
1604
1604
  type: [Number, String],
1605
1605
  required: !1,
1606
- default: w,
1606
+ default: _,
1607
1607
  // if setting to the imported const fails, just pass a number of 24 as the default.
1608
1608
  validator: (e) => {
1609
1609
  if (typeof e == "number" && e > 0)
1610
1610
  return !0;
1611
1611
  if (typeof e == "string") {
1612
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1613
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1612
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1613
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1614
1614
  return !0;
1615
1615
  }
1616
1616
  return !1;
@@ -1624,30 +1624,30 @@ const w = "24px", M = (e, r) => {
1624
1624
  }
1625
1625
  },
1626
1626
  setup(e) {
1627
- const r = e, t = g(() => {
1628
- if (typeof r.size == "number" && r.size > 0)
1629
- return `${r.size}px`;
1630
- if (typeof r.size == "string") {
1631
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1627
+ const t = e, r = g(() => {
1628
+ if (typeof t.size == "number" && t.size > 0)
1629
+ return `${t.size}px`;
1630
+ if (typeof t.size == "string") {
1631
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1632
1632
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1633
1633
  return `${i}px`;
1634
1634
  }
1635
- return w;
1635
+ return _;
1636
1636
  }), a = g(() => ({
1637
1637
  boxSizing: "border-box",
1638
- color: r.color,
1639
- display: r.display,
1640
- height: t.value,
1638
+ color: t.color,
1639
+ display: t.display,
1640
+ height: r.value,
1641
1641
  lineHeight: "0",
1642
- width: t.value
1642
+ width: r.value
1643
1643
  }));
1644
- return (n, i) => (p(), E(z(e.as), {
1644
+ return (n, i) => (p(), I(L(e.as), {
1645
1645
  "aria-hidden": e.decorative ? "true" : void 0,
1646
1646
  class: "kui-icon warning-outline-icon",
1647
1647
  "data-testid": "kui-icon-wrapper-warning-outline-icon",
1648
- style: A(a.value)
1648
+ style: q(a.value)
1649
1649
  }, {
1650
- default: L(() => [
1650
+ default: A(() => [
1651
1651
  (p(), y("svg", {
1652
1652
  "aria-hidden": e.decorative ? "true" : void 0,
1653
1653
  "data-testid": "kui-icon-svg-warning-outline-icon",
@@ -1658,20 +1658,20 @@ const w = "24px", M = (e, r) => {
1658
1658
  width: "100%",
1659
1659
  xmlns: "http://www.w3.org/2000/svg"
1660
1660
  }, [
1661
- e.title ? (p(), y("title", kt, R(e.title), 1)) : T("", !0),
1662
- qt
1663
- ], 8, xt))
1661
+ e.title ? (p(), y("title", kr, w(e.title), 1)) : N("", !0),
1662
+ Lr
1663
+ ], 8, xr))
1664
1664
  ]),
1665
1665
  _: 1
1666
1666
  }, 8, ["aria-hidden", "style"]));
1667
1667
  }
1668
- }), Lt = /* @__PURE__ */ M(zt, [["__scopeId", "data-v-5fc3c6c8"]]), At = (e) => (V("data-v-9f0a015f"), e = e(), D(), e), Vt = ["aria-hidden"], Dt = {
1668
+ }), qr = /* @__PURE__ */ V(Ar, [["__scopeId", "data-v-5fc3c6c8"]]), zr = (e) => (z("data-v-9f0a015f"), e = e(), D(), e), Dr = ["aria-hidden"], Vr = {
1669
1669
  key: 0,
1670
1670
  "data-testid": "kui-icon-svg-title"
1671
- }, Mt = /* @__PURE__ */ At(() => /* @__PURE__ */ x("path", {
1671
+ }, Or = /* @__PURE__ */ zr(() => /* @__PURE__ */ x("path", {
1672
1672
  d: "M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",
1673
1673
  fill: "currentColor"
1674
- }, null, -1)), Ft = /* @__PURE__ */ k({
1674
+ }, null, -1)), Mr = /* @__PURE__ */ k({
1675
1675
  __name: "WarningIcon",
1676
1676
  props: {
1677
1677
  /** The accessibility text provided to screen readers */
@@ -1702,14 +1702,14 @@ const w = "24px", M = (e, r) => {
1702
1702
  size: {
1703
1703
  type: [Number, String],
1704
1704
  required: !1,
1705
- default: w,
1705
+ default: _,
1706
1706
  // if setting to the imported const fails, just pass a number of 24 as the default.
1707
1707
  validator: (e) => {
1708
1708
  if (typeof e == "number" && e > 0)
1709
1709
  return !0;
1710
1710
  if (typeof e == "string") {
1711
- const r = String(e).replace(/px/gi, ""), t = Number(r);
1712
- if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1711
+ const t = String(e).replace(/px/gi, ""), r = Number(t);
1712
+ if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1713
1713
  return !0;
1714
1714
  }
1715
1715
  return !1;
@@ -1723,30 +1723,30 @@ const w = "24px", M = (e, r) => {
1723
1723
  }
1724
1724
  },
1725
1725
  setup(e) {
1726
- const r = e, t = g(() => {
1727
- if (typeof r.size == "number" && r.size > 0)
1728
- return `${r.size}px`;
1729
- if (typeof r.size == "string") {
1730
- const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1726
+ const t = e, r = g(() => {
1727
+ if (typeof t.size == "number" && t.size > 0)
1728
+ return `${t.size}px`;
1729
+ if (typeof t.size == "string") {
1730
+ const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1731
1731
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1732
1732
  return `${i}px`;
1733
1733
  }
1734
- return w;
1734
+ return _;
1735
1735
  }), a = g(() => ({
1736
1736
  boxSizing: "border-box",
1737
- color: r.color,
1738
- display: r.display,
1739
- height: t.value,
1737
+ color: t.color,
1738
+ display: t.display,
1739
+ height: r.value,
1740
1740
  lineHeight: "0",
1741
- width: t.value
1741
+ width: r.value
1742
1742
  }));
1743
- return (n, i) => (p(), E(z(e.as), {
1743
+ return (n, i) => (p(), I(L(e.as), {
1744
1744
  "aria-hidden": e.decorative ? "true" : void 0,
1745
1745
  class: "kui-icon warning-icon",
1746
1746
  "data-testid": "kui-icon-wrapper-warning-icon",
1747
- style: A(a.value)
1747
+ style: q(a.value)
1748
1748
  }, {
1749
- default: L(() => [
1749
+ default: A(() => [
1750
1750
  (p(), y("svg", {
1751
1751
  "aria-hidden": e.decorative ? "true" : void 0,
1752
1752
  "data-testid": "kui-icon-svg-warning-icon",
@@ -1757,37 +1757,35 @@ const w = "24px", M = (e, r) => {
1757
1757
  width: "100%",
1758
1758
  xmlns: "http://www.w3.org/2000/svg"
1759
1759
  }, [
1760
- e.title ? (p(), y("title", Dt, R(e.title), 1)) : T("", !0),
1761
- Mt
1762
- ], 8, Vt))
1760
+ e.title ? (p(), y("title", Vr, w(e.title), 1)) : N("", !0),
1761
+ Or
1762
+ ], 8, Dr))
1763
1763
  ]),
1764
1764
  _: 1
1765
1765
  }, 8, ["aria-hidden", "style"]));
1766
1766
  }
1767
- }), He = /* @__PURE__ */ M(Ft, [["__scopeId", "data-v-9f0a015f"]]), ye = 2, Ee = ye + 2, Ot = (e, r, t = !1) => {
1768
- let a = !r || Number(e.toFixed(Ee)) === 0 ? 0 : Number(e.toFixed(Ee)) > 0 ? 1 : -1;
1769
- return t && (a *= -1), a;
1770
- }, Ht = (e, r, t) => r ? `${Math.abs(e * 100).toFixed(ye)}%` : t, Bt = (e, r) => r === 0 ? 0 : e / r - 1, $t = (e, r = !1) => (r && (e *= -1), e > 0 ? St : e < 0 ? gt : Oe), Pt = "#ad000e", ve = "#6c7489", Ie = "#52596e", Kt = "#007d60", ee = "16px", Zt = "20px";
1771
- var O = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(O || {});
1772
- const Ut = { class: "metricscard" }, Gt = {
1767
+ }), He = /* @__PURE__ */ V(Mr, [["__scopeId", "data-v-9f0a015f"]]), ye = 2, Ie = ye + 2, Fr = (e, t, r = !1) => {
1768
+ let a = !t || Number(e.toFixed(Ie)) === 0 ? 0 : Number(e.toFixed(Ie)) > 0 ? 1 : -1;
1769
+ return r && (a *= -1), a;
1770
+ }, Hr = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(ye)}%` : r, $r = (e, t) => t === 0 ? 0 : e / t - 1, Br = (e, t = !1) => (t && (e *= -1), e > 0 ? br : e < 0 ? gr : Fe), Ur = "#ad000e", pe = "#6c7489", Ee = "#52596e", Kr = "#007d60", ee = "16px", Pr = "20px", Gr = { class: "metricscard" }, Zr = {
1773
1771
  key: 0,
1774
1772
  class: "metricscard-description"
1775
- }, jt = {
1773
+ }, Xr = { class: "metricscard-valuetrend" }, jr = {
1776
1774
  key: 0,
1777
1775
  class: "metricscard-error"
1778
- }, Xt = {
1776
+ }, Yr = {
1779
1777
  key: 2,
1780
1778
  class: "metricscard-trend"
1781
- }, Yt = { "data-testid": "metric-trend-change" }, Qt = {
1779
+ }, Qr = { "data-testid": "metric-trend-change" }, Wr = {
1782
1780
  key: 0,
1783
1781
  class: "metricscard-trend-range"
1784
- }, Wt = /* @__PURE__ */ k({
1782
+ }, Jr = /* @__PURE__ */ k({
1785
1783
  __name: "MetricsCard",
1786
1784
  props: {
1787
1785
  cardType: {
1788
1786
  type: String,
1789
1787
  required: !0,
1790
- default: O.GENERIC_COUNT
1788
+ default: M.GENERIC_COUNT
1791
1789
  },
1792
1790
  title: {
1793
1791
  type: String,
@@ -1823,7 +1821,7 @@ const Ut = { class: "metricscard" }, Gt = {
1823
1821
  },
1824
1822
  trendIcon: {
1825
1823
  type: Object,
1826
- default: Oe
1824
+ default: Fe
1827
1825
  },
1828
1826
  trendRange: {
1829
1827
  type: String,
@@ -1840,7 +1838,7 @@ const Ut = { class: "metricscard" }, Gt = {
1840
1838
  cardSize: {
1841
1839
  type: String,
1842
1840
  required: !1,
1843
- default: () => q.Large
1841
+ default: () => F.Large
1844
1842
  },
1845
1843
  hasContainerTitle: {
1846
1844
  type: Boolean,
@@ -1853,120 +1851,118 @@ const Ut = { class: "metricscard" }, Gt = {
1853
1851
  }
1854
1852
  },
1855
1853
  setup(e) {
1856
- const r = /* @__PURE__ */ new Map([
1857
- [O.GENERIC_COUNT, Et],
1858
- [O.TRAFFIC, Hr],
1859
- [O.ERROR_RATE, Lt],
1860
- [O.LATENCY, lt]
1861
- ]), t = e, a = (d) => {
1862
- const o = {
1863
- red: `var(--kong-ui-metric-card-trend-negative, ${Pt})`,
1864
- green: `var(--kong-ui-metric-card-trend-positive, ${Kt})`,
1865
- grey: `var(--kong-ui-metric-card-trend-neutral, ${Ie})`
1854
+ const t = /* @__PURE__ */ new Map([
1855
+ [M.GENERIC_COUNT, Ir],
1856
+ [M.TRAFFIC, Ht],
1857
+ [M.ERROR_RATE, qr],
1858
+ [M.LATENCY, ur]
1859
+ ]), r = e, a = (f) => {
1860
+ const c = {
1861
+ red: `var(--kong-ui-metric-card-trend-negative, ${Ur})`,
1862
+ green: `var(--kong-ui-metric-card-trend-positive, ${Kr})`,
1863
+ grey: `var(--kong-ui-metric-card-trend-neutral, ${Ee})`
1866
1864
  };
1867
- return d > 0 ? o.green : d < 0 ? o.red : o.grey;
1868
- }, n = (d) => d > 0 ? "positive" : d < 0 ? "negative" : "neutral", i = [q.Medium, q.Large, q.LargeCompact].includes(t.cardSize), u = g(() => t.cardSize === q.LargeCompact), v = [q.Small, q.LargeCompact].includes(t.cardSize);
1869
- return (d, o) => {
1870
- const s = ze("KTooltip");
1871
- return p(), y("div", Ut, [
1865
+ return f > 0 ? c.green : f < 0 ? c.red : c.grey;
1866
+ }, n = (f) => f > 0 ? "positive" : f < 0 ? "negative" : "neutral", i = [F.Medium, F.Large].includes(r.cardSize), l = [F.Small].includes(r.cardSize);
1867
+ return (f, c) => {
1868
+ const o = Ae("KTooltip");
1869
+ return p(), y("div", Gr, [
1872
1870
  x("div", {
1873
- class: G(["metricscard-title", e.cardSize])
1871
+ class: Y(["metricscard-title", e.cardSize])
1874
1872
  }, [
1875
- _(v) ? T("", !0) : (p(), E(z(_(r).get(e.cardType)), {
1873
+ R(l) ? N("", !0) : (p(), I(L(R(t).get(e.cardType)), {
1876
1874
  key: 0,
1877
1875
  class: "metricscard-icon",
1878
- color: _(ve),
1879
- size: _(ee)
1876
+ color: R(pe),
1877
+ size: R(ee)
1880
1878
  }, null, 8, ["color", "size"])),
1881
- (p(), E(z(e.titleTag), null, {
1882
- default: L(() => [
1883
- Le(R(e.title), 1)
1879
+ (p(), I(L(e.titleTag), null, {
1880
+ default: A(() => [
1881
+ qe(w(e.title), 1)
1884
1882
  ]),
1885
1883
  _: 1
1886
1884
  })),
1887
- e.tooltip ? (p(), E(s, {
1885
+ e.tooltip ? (p(), I(o, {
1888
1886
  key: 1,
1889
1887
  class: "metricscard-tooltip",
1890
1888
  placement: "right",
1891
1889
  text: e.tooltip
1892
1890
  }, {
1893
- default: L(() => [
1894
- X(_(it), {
1895
- color: _(ve),
1896
- size: _(ee)
1891
+ default: A(() => [
1892
+ X(R(ir), {
1893
+ color: R(pe),
1894
+ size: R(ee)
1897
1895
  }, null, 8, ["color", "size"])
1898
1896
  ]),
1899
1897
  _: 1
1900
- }, 8, ["text"])) : T("", !0)
1898
+ }, 8, ["text"])) : N("", !0)
1901
1899
  ], 2),
1902
- e.description && _(i) && !u.value ? (p(), y("div", Gt, [
1903
- x("span", null, R(e.description), 1)
1904
- ])) : T("", !0),
1905
- x("div", {
1906
- class: G(["metricscard-valuetrend", { "is-compact": u.value }])
1907
- }, [
1908
- e.hasError ? (p(), y("div", jt, [
1909
- X(_(He), {
1910
- color: _(ve),
1911
- size: _(Zt)
1900
+ e.description && R(i) ? (p(), y("div", Zr, [
1901
+ x("span", null, w(e.description), 1)
1902
+ ])) : N("", !0),
1903
+ x("div", Xr, [
1904
+ e.hasError ? (p(), y("div", jr, [
1905
+ X(R(He), {
1906
+ color: R(pe),
1907
+ size: R(Pr)
1912
1908
  }, null, 8, ["color", "size"]),
1913
- x("div", null, " " + R(e.errorMessage), 1)
1909
+ x("div", null, " " + w(e.errorMessage), 1)
1914
1910
  ])) : (p(), y("div", {
1915
1911
  key: 1,
1916
- class: G(["metricscard-value", e.cardSize]),
1912
+ class: Y(["metricscard-value", e.cardSize]),
1917
1913
  "data-testid": "metric-value"
1918
- }, R(e.metricValue), 3)),
1919
- _(i) ? (p(), y("div", Xt, [
1914
+ }, w(e.metricValue), 3)),
1915
+ R(i) ? (p(), y("div", Yr, [
1920
1916
  x("div", {
1921
- class: G(["metricscard-trend-change", n(e.changePolarity)]),
1917
+ class: Y(["metricscard-trend-change", n(e.changePolarity)]),
1922
1918
  "data-testid": "metric-trend-parent"
1923
1919
  }, [
1924
- e.changePolarity !== 0 ? (p(), E(z(e.trendIcon), {
1920
+ e.changePolarity !== 0 ? (p(), I(L(e.trendIcon), {
1925
1921
  key: 0,
1926
1922
  color: a(e.changePolarity),
1927
- size: _(ee)
1928
- }, null, 8, ["color", "size"])) : (p(), E(_(Ur), {
1923
+ size: R(ee)
1924
+ }, null, 8, ["color", "size"])) : (p(), I(R(Gt), {
1929
1925
  key: 1,
1930
- color: _(Ie),
1931
- size: _(ee)
1926
+ color: R(Ee),
1927
+ size: R(ee)
1932
1928
  }, null, 8, ["color", "size"])),
1933
- x("div", Yt, R(e.metricChange), 1)
1929
+ x("div", Qr, w(e.metricChange), 1)
1934
1930
  ], 2),
1935
- e.trendRange && e.cardSize !== _(q).LargeCompact ? (p(), y("div", Qt, R(e.trendRange), 1)) : T("", !0)
1936
- ])) : T("", !0)
1937
- ], 2)
1931
+ e.trendRange ? (p(), y("div", Wr, w(e.trendRange), 1)) : N("", !0)
1932
+ ])) : N("", !0)
1933
+ ])
1938
1934
  ]);
1939
1935
  };
1940
1936
  }
1941
- }), me = (e, r) => {
1942
- const t = e.__vccOpts || e;
1943
- for (const [a, n] of r)
1944
- t[a] = n;
1945
- return t;
1946
- }, Jt = /* @__PURE__ */ me(Wt, [["__scopeId", "data-v-bb9e718a"]]), ei = {}, ri = { class: "loading-tabs" };
1947
- function ti(e, r) {
1948
- const t = ze("KSkeletonBox");
1937
+ }), me = (e, t) => {
1938
+ const r = e.__vccOpts || e;
1939
+ for (const [a, n] of t)
1940
+ r[a] = n;
1941
+ return r;
1942
+ }, ei = /* @__PURE__ */ me(Jr, [["__scopeId", "data-v-1b8a31a0"]]), ti = {}, ri = { class: "loading-tabs" };
1943
+ function ii(e, t) {
1944
+ const r = Ae("KSkeletonBox");
1949
1945
  return p(), y("div", ri, [
1950
- X(t, { width: "100" }),
1951
- X(t, { width: "75" })
1946
+ X(r, { width: "100" }),
1947
+ X(r, { width: "75" })
1952
1948
  ]);
1953
1949
  }
1954
- const ii = /* @__PURE__ */ me(ei, [["render", ti], ["__scopeId", "data-v-f7eb9c40"]]), ni = {
1950
+ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c40"]]), ai = {
1955
1951
  key: 0,
1956
1952
  class: "container-title"
1957
- }, ai = {
1953
+ }, oi = {
1958
1954
  key: 0,
1959
1955
  class: "container-description"
1960
- }, oi = {
1956
+ }, si = {
1961
1957
  key: 1,
1962
1958
  class: "error-display"
1963
- }, si = {
1959
+ }, li = {
1964
1960
  key: 0,
1965
1961
  class: "error-display-message"
1966
1962
  }, ui = {
1967
1963
  key: 2,
1968
1964
  class: "cards-wrapper"
1969
- }, li = /* @__PURE__ */ k({
1965
+ }, di = /* @__PURE__ */ k({
1970
1966
  __name: "MetricCardContainer",
1971
1967
  props: {
1972
1968
  fallbackDisplayText: {
@@ -1995,7 +1991,7 @@ const ii = /* @__PURE__ */ me(ei, [["render", ti], ["__scopeId", "data-v-f7eb9c4
1995
1991
  cardSize: {
1996
1992
  type: String,
1997
1993
  required: !1,
1998
- default: () => q.Large
1994
+ default: () => F.Large
1999
1995
  },
2000
1996
  containerTitle: {
2001
1997
  type: String,
@@ -2009,162 +2005,170 @@ const ii = /* @__PURE__ */ me(ei, [["render", ti], ["__scopeId", "data-v-f7eb9c4
2009
2005
  }
2010
2006
  },
2011
2007
  setup(e) {
2012
- const r = e, t = g(() => r.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
2013
- const i = Bt(n.currentValue, n.previousValue) || 0, u = Ot(i, r.hasTrendAccess, n.increaseIsBad);
2008
+ const t = e, r = g(() => t.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
2009
+ const i = $r(n.currentValue, n.previousValue) || 0, l = Fr(i, t.hasTrendAccess, n.increaseIsBad);
2014
2010
  return {
2015
- metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : Ar(n.currentValue, { capital: !0, round: !0 }) || "0",
2016
- metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Ht(i, r.hasTrendAccess, r.fallbackDisplayText),
2017
- changePolarity: u,
2018
- trendIcon: $t(u, n.increaseIsBad),
2019
- cardSize: r.cardSize,
2020
- hasContainerTitle: !!r.containerTitle
2011
+ metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : zt(n.currentValue, { capital: !0, round: !0 }) || "0",
2012
+ metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Hr(i, t.hasTrendAccess, t.fallbackDisplayText),
2013
+ changePolarity: l,
2014
+ trendIcon: Br(l, n.increaseIsBad),
2015
+ cardSize: t.cardSize,
2016
+ hasContainerTitle: !!t.containerTitle
2021
2017
  };
2022
2018
  };
2023
2019
  return (n, i) => (p(), y("div", {
2024
- class: G(["kong-ui-public-metric-card-container", e.cardSize])
2020
+ class: Y(["kong-ui-public-metric-card-container", e.cardSize])
2025
2021
  }, [
2026
- r.containerTitle ? (p(), y("div", ni, [
2027
- Le(R(r.containerTitle) + " ", 1),
2028
- r.containerDescription ? (p(), y("div", ai, R(r.containerDescription), 1)) : T("", !0)
2029
- ])) : T("", !0),
2030
- t.value ? (p(), y("div", oi, [
2031
- X(_(He), { class: "error-display-icon" }),
2032
- e.errorMessage ? (p(), y("div", si, R(e.errorMessage), 1)) : T("", !0)
2022
+ t.containerTitle ? (p(), y("div", ai, [
2023
+ qe(w(t.containerTitle) + " ", 1),
2024
+ t.containerDescription ? (p(), y("div", oi, w(t.containerDescription), 1)) : N("", !0)
2025
+ ])) : N("", !0),
2026
+ r.value ? (p(), y("div", si, [
2027
+ X(R(He), { class: "error-display-icon" }),
2028
+ e.errorMessage ? (p(), y("div", li, w(e.errorMessage), 1)) : N("", !0)
2033
2029
  ])) : (p(), y("div", ui, [
2034
- (p(!0), y(_e, null, Ye(e.cards, (u, v) => (p(), y(_e, null, [
2035
- e.loading ? (p(), E(ii, {
2036
- key: `skeleton-${v}`,
2037
- class: G(e.cardSize === _(q).Small ? "loading-tabs-small" : "loading-tabs-large")
2038
- }, null, 8, ["class"])) : (p(), E(Jt, Qe({
2039
- key: v,
2030
+ (p(!0), y(_e, null, Ye(e.cards, (l, f) => (p(), y(_e, null, [
2031
+ e.loading ? (p(), I(ni, {
2032
+ key: `skeleton-${f}`,
2033
+ class: Y(e.cardSize === R(F).Small ? "loading-tabs-small" : "loading-tabs-large")
2034
+ }, null, 8, ["class"])) : (p(), I(ei, Qe({
2035
+ key: f,
2040
2036
  ref_for: !0
2041
- }, a(u), {
2037
+ }, a(l), {
2042
2038
  "card-size": e.cardSize,
2043
- "card-type": u.cardType,
2044
- description: u.description,
2039
+ "card-type": l.cardType,
2040
+ description: l.description,
2045
2041
  "error-message": e.errorMessage,
2046
- "has-error": u.hasError,
2047
- title: u.title,
2048
- "title-tag": u.titleTag,
2049
- tooltip: u.tooltip,
2050
- "trend-range": u.trendRange
2042
+ "has-error": l.hasError,
2043
+ title: l.title,
2044
+ "title-tag": l.titleTag,
2045
+ tooltip: l.tooltip,
2046
+ "trend-range": l.trendRange
2051
2047
  }), null, 16, ["card-size", "card-type", "description", "error-message", "has-error", "title", "title-tag", "tooltip", "trend-range"]))
2052
2048
  ], 64))), 256))
2053
2049
  ]))
2054
2050
  ], 2));
2055
2051
  }
2056
- }), di = /* @__PURE__ */ me(li, [["__scopeId", "data-v-1bb4a6a4"]]), mi = /* @__PURE__ */ k({
2052
+ }), ci = /* @__PURE__ */ me(di, [["__scopeId", "data-v-d3a810e0"]]), Ci = /* @__PURE__ */ k({
2057
2053
  __name: "MetricsConsumer",
2058
2054
  props: {
2059
2055
  lookupKey: { default: void 0 },
2060
- cardSize: { default: q.Large },
2056
+ cardSize: { default: F.Large },
2061
2057
  cardToDisplay: { default: void 0 }
2062
2058
  },
2063
2059
  setup(e) {
2064
- const r = e, t = ke(Me);
2065
- if (!t)
2060
+ const t = e, r = ke(Oe);
2061
+ if (!r)
2066
2062
  throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
2067
- const { traffic: a, latency: n } = t.data, { i18n: i } = K.useI18n(), u = K.useMetricCardBuilder({
2068
- cardType: O.TRAFFIC,
2069
- title: g(() => t.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
2063
+ const { traffic: a, latency: n } = r.data, { i18n: i } = K.useI18n(), l = K.useMetricCardBuilder({
2064
+ cardType: M.TRAFFIC,
2065
+ title: g(() => r.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
2070
2066
  record: a.mapped,
2071
2067
  hasError: a.hasError,
2072
- lookupKey: r.lookupKey,
2068
+ lookupKey: t.lookupKey,
2073
2069
  sumGroupedValues: Q,
2074
2070
  trendRange: a.trendRange
2075
- }), v = (m) => `${m.toFixed(ye)}%`, d = g(() => {
2076
- const m = a.mapped.value, b = j(m, "current", r.lookupKey, we), N = j(m, "current", r.lookupKey, Q), S = b / N * 100 || 0, h = j(m, "previous", r.lookupKey, we), H = j(m, "previous", r.lookupKey, Q), I = h / H * 100 || 0;
2071
+ }), f = (m) => `${m.toFixed(ye)}%`, c = g(() => {
2072
+ const m = a.mapped.value, S = Z(m, "current", t.lookupKey, we), T = Z(m, "current", t.lookupKey, Q), b = S / T * 100 || 0, h = Z(m, "previous", t.lookupKey, we), H = Z(m, "previous", t.lookupKey, Q), E = h / H * 100 || 0;
2077
2073
  return {
2078
- cardType: O.ERROR_RATE,
2074
+ cardType: M.ERROR_RATE,
2079
2075
  hasError: a.hasError.value,
2080
- currentValue: S,
2081
- previousValue: I,
2082
- formatValueFn: v,
2083
- title: t.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
2076
+ currentValue: b,
2077
+ previousValue: E,
2078
+ formatValueFn: f,
2079
+ title: r.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
2084
2080
  increaseIsBad: !0,
2085
2081
  trendRange: a.trendRange.value
2086
2082
  };
2087
2083
  }), o = (m) => `${m}ms`, s = K.useMetricCardBuilder({
2088
- cardType: O.LATENCY,
2084
+ cardType: M.LATENCY,
2089
2085
  title: g(() => {
2090
- const { longCardTitles: m, averageLatencies: b } = t, N = b.value ? "averageLatency" : "p99Latency";
2091
- return m ? i.t(`metricCard.long.${N}`) : i.t(`metricCard.short.${N}`);
2086
+ const { longCardTitles: m, averageLatencies: S } = r, T = S.value ? "averageLatency" : "p99Latency";
2087
+ return m ? i.t(`metricCard.long.${T}`) : i.t(`metricCard.short.${T}`);
2092
2088
  }),
2093
2089
  hasError: n.hasError,
2094
2090
  record: n.mapped,
2095
- lookupKey: r.lookupKey,
2091
+ lookupKey: t.lookupKey,
2096
2092
  increaseIsBad: !0,
2097
2093
  formatValueFn: o,
2098
2094
  trendRange: n.trendRange
2099
- }), l = g(() => r.cardToDisplay === "TRAFFIC" ? [u.value] : r.cardToDisplay === "ERROR_RATE" ? [d.value] : r.cardToDisplay === "LATENCY" ? [s.value] : [u.value, d.value, s.value]), c = g(() => r.cardToDisplay === "TRAFFIC" || r.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : r.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), f = g(() => ({
2100
- cards: l.value,
2101
- containerTitle: t.containerTitle.value,
2102
- containerDescription: t.description.value,
2103
- loading: c.value,
2104
- hasTrendAccess: t.hasTrendAccess.value,
2095
+ }), u = g(() => t.cardToDisplay === "TRAFFIC" ? [l.value] : t.cardToDisplay === "ERROR_RATE" ? [c.value] : t.cardToDisplay === "LATENCY" ? [s.value] : [l.value, c.value, s.value]), d = g(() => t.cardToDisplay === "TRAFFIC" || t.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : t.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), v = g(() => ({
2096
+ cards: u.value,
2097
+ containerTitle: r.containerTitle.value,
2098
+ containerDescription: r.description.value,
2099
+ loading: d.value,
2100
+ hasTrendAccess: r.hasTrendAccess.value,
2105
2101
  fallbackDisplayText: i.t("general.notAvailable"),
2106
2102
  // If the parent container has a title, we enforce a Medium card size; otherwise, pass down provided cardSize
2107
- cardSize: t.containerTitle.value ? q.Medium : r.cardSize,
2103
+ cardSize: r.containerTitle.value ? F.Medium : t.cardSize,
2108
2104
  hideTitle: !0
2109
2105
  })), C = g(() => ({
2110
- loading: f.value.loading,
2111
- trafficCard: u.value,
2112
- errorRateCard: d.value,
2106
+ loading: v.value.loading,
2107
+ trafficCard: l.value,
2108
+ errorRateCard: c.value,
2113
2109
  latencyCard: s.value,
2114
- errorRateFormatted: v(d.value.currentValue),
2110
+ errorRateFormatted: f(c.value.currentValue),
2115
2111
  latencyFormatted: o(s.value.currentValue)
2116
2112
  }));
2117
- return (m, b) => qe(m.$slots, "default", { cardValues: C.value }, () => [
2118
- X(_(di), We(Je(f.value)), null, 16)
2113
+ return (m, S) => Le(m.$slots, "default", { cardValues: C.value }, () => [
2114
+ X(ci, We(Je(v.value)), null, 16)
2119
2115
  ]);
2120
2116
  }
2121
- }), re = (e) => new Date(e), hi = (e, r) => {
2122
- const t = e.body;
2117
+ }), te = (e) => new Date(e), Si = (e, t) => {
2118
+ const r = e.body;
2123
2119
  e.reply({
2124
2120
  statusCode: 200,
2125
- body: ci(t, r)
2121
+ body: fi(r, t)
2126
2122
  });
2127
- }, xe = (e) => e.reduce((r, t) => (r[t] = { name: t }, r), {}), ci = (e, r) => {
2123
+ }, xe = (e) => e.reduce((t, r) => (t[r] = { name: r }, t), {}), fi = (e, t) => {
2128
2124
  var C, m;
2129
- const t = ie.get(ne.ONE_DAY), a = e.granularity === "trend" ? new rr(t) : new tr(t), n = a.endMs(), i = a.startMs(), u = a.granularityMs(), v = e.granularity === "trend" ? 2 : 1;
2125
+ const r = ie.get(ne.ONE_DAY), a = e.granularity === "trend" ? new tt(r) : new rt(r), n = a.endMs(), i = a.startMs(), l = a.granularityMs(), f = e.granularity === "trend" ? 2 : 1;
2130
2126
  if ((e.dimensions ?? []).length > 2)
2131
2127
  throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
2132
- const d = (e.dimensions ?? []).find((b) => b !== "time"), o = (r == null ? void 0 : r.dimensionNames) ?? [], s = Math.max(o.length, 1), l = e.metrics || [], c = [];
2133
- for (let b = 0; b < v; b++)
2134
- for (let N = 0; N < s; N++) {
2135
- const S = d ? { [d]: o[N] } : {};
2128
+ const c = (e.dimensions ?? []).find((S) => S !== "time"), o = (t == null ? void 0 : t.dimensionNames) ?? [], s = Math.max(o.length, 1), u = e.metrics || [], d = [];
2129
+ for (let S = 0; S < f; S++)
2130
+ for (let T = 0; T < s; T++) {
2131
+ const b = c ? { [c]: o[T] } : {};
2136
2132
  (C = e.dimensions) != null && C.includes("status_code_grouped") ? Q.forEach((h) => {
2137
- const H = l.reduce((I, $) => (I[$] = (v - b) * 1e3 + 100 * N + 1, I), { ...S, status_code_grouped: h });
2138
- c.push({
2133
+ const H = u.reduce((E, B) => (E[B] = (f - S) * 1e3 + 100 * T + 1, E), { ...b, status_code_grouped: h });
2134
+ d.push({
2139
2135
  version: "v1",
2140
- timestamp: b === 0 ? re(i).toISOString() : re(i + u).toISOString(),
2136
+ timestamp: S === 0 ? te(i).toISOString() : te(i + l).toISOString(),
2141
2137
  event: H
2142
2138
  });
2143
- }) : c.push({
2139
+ }) : d.push({
2144
2140
  version: "v1",
2145
- timestamp: b === 0 ? re(i).toISOString() : re(i + u).toISOString(),
2146
- event: l.reduce((h, H) => (h[H] = (v - b) * 1e3 + 100 * N + 1, h), { ...S })
2141
+ timestamp: S === 0 ? te(i).toISOString() : te(i + l).toISOString(),
2142
+ event: u.reduce((h, H) => (h[H] = (f - S) * 1e3 + 100 * T + 1, h), { ...b })
2147
2143
  });
2148
2144
  }
2149
- const f = {
2145
+ const v = {
2150
2146
  start_ms: i,
2151
2147
  end_ms: n,
2152
- granularity_ms: u,
2153
- display: d ? {
2154
- [d]: xe(o),
2148
+ granularity_ms: l,
2149
+ display: c ? {
2150
+ [c]: xe(o),
2155
2151
  ...(m = e.dimensions) != null && m.includes("status_code_grouped") ? { status_code_grouped: xe(Q) } : {}
2156
2152
  } : {},
2157
2153
  metric_names: e.metrics,
2158
2154
  query_id: "test"
2159
2155
  };
2160
2156
  return {
2161
- data: c,
2162
- meta: f
2157
+ data: d,
2158
+ meta: v
2163
2159
  };
2164
2160
  };
2165
2161
  export {
2166
- mi as MetricsConsumer,
2167
- yi as MetricsProvider,
2168
- ci as mockExploreResponse,
2169
- hi as mockExploreResponseFromCypress
2162
+ Q as ALL_STATUS_CODE_GROUPS,
2163
+ ft as DEFAULT_REFRESH_INTERVAL,
2164
+ vt as INJECT_QUERY_PROVIDER,
2165
+ ct as MAX_ANALYTICS_REQUEST_RETRIES,
2166
+ F as MetricCardSize,
2167
+ M as MetricCardType,
2168
+ Ci as MetricsConsumer,
2169
+ hi as MetricsProvider,
2170
+ we as STATUS_CODES_FAILED,
2171
+ mi as STATUS_CODES_SUCCESS,
2172
+ fi as mockExploreResponse,
2173
+ Si as mockExploreResponseFromCypress
2170
2174
  };