@kong-ui-public/dashboard-renderer 7.0.16 → 7.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,34 @@
1
- var Xt = Object.defineProperty;
2
- var ot = (c) => {
1
+ var Qt = Object.defineProperty;
2
+ var nt = (c) => {
3
3
  throw TypeError(c);
4
4
  };
5
- var Qt = (c, e, t) => e in c ? Xt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
6
- var at = (c, e, t) => Qt(c, typeof e != "symbol" ? e + "" : e, t), Ge = (c, e, t) => e.has(c) || ot("Cannot " + t);
7
- var _ = (c, e, t) => (Ge(c, e, "read from private field"), t ? t.call(c) : e.get(c)), $ = (c, e, t) => e.has(c) ? ot("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(c) : e.set(c, t), I = (c, e, t, i) => (Ge(c, e, "write to private field"), i ? i.call(c, t) : e.set(c, t), t), B = (c, e, t) => (Ge(c, e, "access private method"), t);
5
+ var Zt = (c, e, t) => e in c ? Qt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
6
+ var ot = (c, e, t) => Zt(c, typeof e != "symbol" ? e + "" : e, t), Ge = (c, e, t) => e.has(c) || nt("Cannot " + t);
7
+ var _ = (c, e, t) => (Ge(c, e, "read from private field"), t ? t.call(c) : e.get(c)), $ = (c, e, t) => e.has(c) ? nt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(c) : e.set(c, t), L = (c, e, t, i) => (Ge(c, e, "write to private field"), i ? i.call(c, t) : e.set(c, t), t), B = (c, e, t) => (Ge(c, e, "access private method"), t);
8
8
  var we = (c, e, t, i) => ({
9
9
  set _(s) {
10
- I(c, e, s, t);
10
+ L(c, e, s, t);
11
11
  },
12
12
  get _() {
13
13
  return _(c, e, i);
14
14
  }
15
15
  });
16
- import { ref as G, watchEffect as Et, inject as _e, provide as Zt, defineComponent as j, onUnmounted as Ve, computed as N, watch as Ke, resolveComponent as he, createBlock as M, renderSlot as Pe, createCommentVNode as Y, unref as k, openBlock as C, withCtx as q, createVNode as se, createTextVNode as Ee, toDisplayString as te, useCssVars as Ye, createElementVNode as ae, normalizeClass as je, mergeProps as xt, createSlots as Xe, createElementBlock as W, normalizeProps as Jt, guardReactiveProps as ei, defineAsyncComponent as ti, onMounted as Qe, nextTick as Ct, resolveDynamicComponent as Rt, toHandlers as ii, Fragment as Tt, renderList as zt, normalizeStyle as lt, mergeModels as ht, useModel as si, getCurrentInstance as ri } from "vue";
17
- import { stripUnknownFilters as ni, Timeframe as oi, TimePeriods as Dt, TIMEFRAME_LOOKUP as ai, formatTime as dt, msToGranularity as Ue, getFieldDataSources as li } from "@kong-ui-public/analytics-utilities";
18
- import { SimpleChart as hi, AnalyticsChart as di, TopNTable as ui, CsvExportModal as ci } from "@kong-ui-public/analytics-chart";
19
- import fi from "swrv";
16
+ import { ref as G, watchEffect as Et, inject as _e, provide as Jt, defineComponent as X, onUnmounted as We, computed as S, watch as Ve, resolveComponent as de, createBlock as I, renderSlot as Pe, createCommentVNode as j, unref as D, openBlock as C, withCtx as q, createVNode as se, createTextVNode as Ee, toDisplayString as te, useCssVars as Ke, createElementVNode as le, normalizeClass as Ye, mergeProps as xt, createSlots as je, createElementBlock as W, normalizeProps as ei, guardReactiveProps as ti, defineAsyncComponent as ii, onMounted as Xe, nextTick as Ct, resolveDynamicComponent as Rt, toHandlers as si, Fragment as Tt, renderList as zt, normalizeStyle as at, mergeModels as lt, useModel as ri, getCurrentInstance as ni } from "vue";
17
+ import { stripUnknownFilters as oi, Timeframe as ai, TimePeriods as Dt, TIMEFRAME_LOOKUP as li, formatTime as ht, msToGranularity as dt, getFieldDataSources as hi } from "@kong-ui-public/analytics-utilities";
18
+ import { SimpleChart as di, AnalyticsChart as ui, TopNTable as ci, CsvExportModal as fi } from "@kong-ui-public/analytics-chart";
19
+ import gi from "swrv";
20
20
  import "axios";
21
- import { createI18n as gi, i18nTComponent as mi } from "@kong-ui-public/i18n";
21
+ import { createI18n as mi, i18nTComponent as pi } from "@kong-ui-public/i18n";
22
22
  import { useAnalyticsConfigStore as kt } from "@kong-ui-public/analytics-config-store";
23
- import { VisibilityOffIcon as pi, WarningIcon as yi, EditIcon as vi, MoreIcon as _i } from "@kong/icons";
24
- import { MetricsProvider as bi, MetricsConsumer as wi } from "@kong-ui-public/analytics-metric-provider";
23
+ import { VisibilityOffIcon as yi, WarningIcon as vi, EditIcon as _i, MoreIcon as bi } from "@kong/icons";
24
+ import { MetricsProvider as wi, MetricsConsumer as Ei } from "@kong-ui-public/analytics-metric-provider";
25
25
  var St = /* @__PURE__ */ ((c) => (c.VALIDATING = "VALIDATING", c.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", c.PENDING = "PENDING", c.SUCCESS = "SUCCESS", c.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", c.ERROR = "ERROR", c.STALE_IF_ERROR = "STALE_IF_ERROR", c))(St || {});
26
- const Ei = (c) => {
26
+ const xi = (c) => {
27
27
  var e, t, i, s, r;
28
28
  return c ? !!// TODO: revisit: currently only the first check ever matters?
29
29
  ((e = Object.keys(c)) != null && e.length || (t = c.data) != null && t.length || (s = (i = c.data) == null ? void 0 : i.data) != null && s.length || !((r = c.data) != null && r.data) && typeof c.data == "object" && Object.keys(c == null ? void 0 : c.data).length) : !1;
30
30
  };
31
- function xi(c = G({}), e, t, i = Ei) {
31
+ function Ci(c = G({}), e, t, i = xi) {
32
32
  const s = G(
33
33
  "PENDING"
34
34
  /* PENDING */
@@ -65,7 +65,7 @@ function xi(c = G({}), e, t, i = Ei) {
65
65
  swrvState: St
66
66
  };
67
67
  }
68
- const Ci = {
68
+ const Ri = {
69
69
  noQueryBridge: "No query bridge provided. Unable to render dashboard.",
70
70
  trendRange: {
71
71
  "24h": "Last 24-hour summary",
@@ -76,14 +76,14 @@ const Ci = {
76
76
  duplicateTile: "Duplicate",
77
77
  remove: "Remove",
78
78
  delete: "Delete"
79
- }, Ri = {
79
+ }, Ti = {
80
80
  forbidden: "To access this data, either filter for an entity you have access to or request analytics viewer access from your administrator.",
81
81
  timeRangeExceeded: "The time range for this report is outside of your organization's data retention period",
82
82
  timeout: "Query timed out. Consider querying a shorter time range."
83
- }, Ti = {
83
+ }, zi = {
84
84
  defaultFilename: "Chart export",
85
85
  exportAsCsv: "Export as CSV"
86
- }, zi = "Explore", Di = "View requests", ki = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Si = {
86
+ }, Di = "Explore", ki = "View requests", Si = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Ni = {
87
87
  daily: "1 day",
88
88
  fiveMinutely: "5 minutes",
89
89
  hourly: "1 hour",
@@ -96,31 +96,31 @@ const Ci = {
96
96
  twoHourly: "2 hours",
97
97
  weekly: "1 week",
98
98
  unknown: "Unknown"
99
- }, Ni = {
100
- renderer: Ci,
101
- queryDataProvider: Ri,
102
- csvExport: Ti,
103
- jumpToExplore: zi,
104
- jumpToRequests: Di,
105
- query_aged_out_warning: ki,
106
- granularities: Si
99
+ }, Oi = {
100
+ renderer: Ri,
101
+ queryDataProvider: Ti,
102
+ csvExport: zi,
103
+ jumpToExplore: Di,
104
+ jumpToRequests: ki,
105
+ query_aged_out_warning: Si,
106
+ granularities: Ni
107
107
  };
108
- function Oi() {
109
- const c = gi("en-us", Ni);
108
+ function Ai() {
109
+ const c = mi("en-us", Oi);
110
110
  return {
111
111
  i18n: c,
112
- i18nT: mi(c)
112
+ i18nT: pi(c)
113
113
  // Translation component <i18n-t>
114
114
  };
115
115
  }
116
- const $e = 170, Nt = 6, ue = "analytics-query-provider", ut = "{entity-id}", Ai = "{cp-id}", Hi = "{timeframe}", Li = 30 * 1e3;
117
- function Ii() {
116
+ const $e = 170, Nt = 6, ue = "analytics-query-provider", ut = "{entity-id}", Hi = "{cp-id}", Li = "{timeframe}", Ii = 30 * 1e3;
117
+ function Mi() {
118
118
  const c = _e(ue);
119
119
  return {
120
120
  evaluateFeatureFlag: (t, i) => c ? c.evaluateFeatureFlagFn(t, i) : i
121
121
  };
122
122
  }
123
- function Mi(c) {
123
+ function qi(c) {
124
124
  return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
125
125
  }
126
126
  var Ot = { exports: {} };
@@ -163,7 +163,7 @@ var Ot = { exports: {} };
163
163
  }, n.prototype.emit = function(l, d, a, f, m, g) {
164
164
  var v = t ? t + l : l;
165
165
  if (!this._events[v]) return !1;
166
- var p = this._events[v], R = arguments.length, A, T;
166
+ var p = this._events[v], R = arguments.length, O, T;
167
167
  if (p.fn) {
168
168
  switch (p.once && this.removeListener(l, p.fn, void 0, !0), R) {
169
169
  case 1:
@@ -179,12 +179,12 @@ var Ot = { exports: {} };
179
179
  case 6:
180
180
  return p.fn.call(p.context, d, a, f, m, g), !0;
181
181
  }
182
- for (T = 1, A = new Array(R - 1); T < R; T++)
183
- A[T - 1] = arguments[T];
184
- p.fn.apply(p.context, A);
182
+ for (T = 1, O = new Array(R - 1); T < R; T++)
183
+ O[T - 1] = arguments[T];
184
+ p.fn.apply(p.context, O);
185
185
  } else {
186
- var H = p.length, E;
187
- for (T = 0; T < H; T++)
186
+ var P = p.length, E;
187
+ for (T = 0; T < P; T++)
188
188
  switch (p[T].once && this.removeListener(l, p[T].fn, void 0, !0), R) {
189
189
  case 1:
190
190
  p[T].fn.call(p[T].context);
@@ -199,9 +199,9 @@ var Ot = { exports: {} };
199
199
  p[T].fn.call(p[T].context, d, a, f);
200
200
  break;
201
201
  default:
202
- if (!A) for (E = 1, A = new Array(R - 1); E < R; E++)
203
- A[E - 1] = arguments[E];
204
- p[T].fn.apply(p[T].context, A);
202
+ if (!O) for (E = 1, O = new Array(R - 1); E < R; E++)
203
+ O[E - 1] = arguments[E];
204
+ p[T].fn.apply(p[T].context, O);
205
205
  }
206
206
  }
207
207
  return !0;
@@ -228,23 +228,23 @@ var Ot = { exports: {} };
228
228
  return l ? (d = t ? t + l : l, this._events[d] && o(this, d)) : (this._events = new i(), this._eventsCount = 0), this;
229
229
  }, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, c.exports = n;
230
230
  })(Ot);
231
- var qi = Ot.exports;
232
- const Pi = /* @__PURE__ */ Mi(qi);
231
+ var Pi = Ot.exports;
232
+ const $i = /* @__PURE__ */ qi(Pi);
233
233
  class At extends Error {
234
234
  constructor(e) {
235
235
  super(e), this.name = "TimeoutError";
236
236
  }
237
237
  }
238
- class $i extends Error {
238
+ class Bi extends Error {
239
239
  constructor(e) {
240
240
  super(), this.name = "AbortError", this.message = e;
241
241
  }
242
242
  }
243
- const ct = (c) => globalThis.DOMException === void 0 ? new $i(c) : new DOMException(c), ft = (c) => {
243
+ const ct = (c) => globalThis.DOMException === void 0 ? new Bi(c) : new DOMException(c), ft = (c) => {
244
244
  const e = c.reason === void 0 ? ct("This operation was aborted.") : c.reason;
245
245
  return e instanceof Error ? e : ct(e);
246
246
  };
247
- function Bi(c, e) {
247
+ function Gi(c, e) {
248
248
  const {
249
249
  milliseconds: t,
250
250
  fallback: i,
@@ -290,7 +290,7 @@ function Bi(c, e) {
290
290
  r.clearTimeout.call(void 0, o), o = void 0;
291
291
  }, l;
292
292
  }
293
- function Gi(c, e, t) {
293
+ function Ui(c, e, t) {
294
294
  let i = 0, s = c.length;
295
295
  for (; s > 0; ) {
296
296
  const r = Math.trunc(s / 2);
@@ -299,10 +299,10 @@ function Gi(c, e, t) {
299
299
  }
300
300
  return i;
301
301
  }
302
- var Q;
303
- class Ui {
302
+ var Z;
303
+ class Fi {
304
304
  constructor() {
305
- $(this, Q, []);
305
+ $(this, Z, []);
306
306
  }
307
307
  enqueue(e, t) {
308
308
  t = {
@@ -314,34 +314,34 @@ class Ui {
314
314
  id: t.id,
315
315
  run: e
316
316
  };
317
- if (this.size === 0 || _(this, Q)[this.size - 1].priority >= t.priority) {
318
- _(this, Q).push(i);
317
+ if (this.size === 0 || _(this, Z)[this.size - 1].priority >= t.priority) {
318
+ _(this, Z).push(i);
319
319
  return;
320
320
  }
321
- const s = Gi(_(this, Q), i, (r, o) => o.priority - r.priority);
322
- _(this, Q).splice(s, 0, i);
321
+ const s = Ui(_(this, Z), i, (r, o) => o.priority - r.priority);
322
+ _(this, Z).splice(s, 0, i);
323
323
  }
324
324
  setPriority(e, t) {
325
- const i = _(this, Q).findIndex((r) => r.id === e);
325
+ const i = _(this, Z).findIndex((r) => r.id === e);
326
326
  if (i === -1)
327
327
  throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);
328
- const [s] = _(this, Q).splice(i, 1);
328
+ const [s] = _(this, Z).splice(i, 1);
329
329
  this.enqueue(s.run, { priority: t, id: e });
330
330
  }
331
331
  dequeue() {
332
- const e = _(this, Q).shift();
332
+ const e = _(this, Z).shift();
333
333
  return e == null ? void 0 : e.run;
334
334
  }
335
335
  filter(e) {
336
- return _(this, Q).filter((t) => t.priority === e.priority).map((t) => t.run);
336
+ return _(this, Z).filter((t) => t.priority === e.priority).map((t) => t.run);
337
337
  }
338
338
  get size() {
339
- return _(this, Q).length;
339
+ return _(this, Z).length;
340
340
  }
341
341
  }
342
- Q = new WeakMap();
343
- var fe, ge, le, Re, me, Te, Z, pe, F, ze, J, ye, oe, De, qe, z, Ht, Lt, It, Mt, qt, Se, Fe, We, Ne, Pt, Oe;
344
- class Fi extends Pi {
342
+ Z = new WeakMap();
343
+ var fe, ge, he, Re, me, Te, J, pe, F, ze, ee, ye, ae, De, qe, z, Ht, Lt, It, Mt, qt, Se, Ue, Fe, Ne, Pt, Oe;
344
+ class Wi extends $i {
345
345
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
346
346
  constructor(t) {
347
347
  var i, s;
@@ -349,18 +349,18 @@ class Fi extends Pi {
349
349
  $(this, z);
350
350
  $(this, fe);
351
351
  $(this, ge);
352
- $(this, le, 0);
352
+ $(this, he, 0);
353
353
  $(this, Re);
354
354
  $(this, me);
355
355
  $(this, Te, 0);
356
- $(this, Z);
356
+ $(this, J);
357
357
  $(this, pe);
358
358
  $(this, F);
359
359
  $(this, ze);
360
- $(this, J, 0);
360
+ $(this, ee, 0);
361
361
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
362
362
  $(this, ye);
363
- $(this, oe);
363
+ $(this, ae);
364
364
  $(this, De);
365
365
  // Use to assign a unique identifier to a promise function, if not explicitly specified
366
366
  $(this, qe, 1n);
@@ -369,20 +369,20 @@ class Fi extends Pi {
369
369
 
370
370
  Applies to each future operation.
371
371
  */
372
- at(this, "timeout");
372
+ ot(this, "timeout");
373
373
  if (t = {
374
374
  carryoverConcurrencyCount: !1,
375
375
  intervalCap: Number.POSITIVE_INFINITY,
376
376
  interval: 0,
377
377
  concurrency: Number.POSITIVE_INFINITY,
378
378
  autoStart: !0,
379
- queueClass: Ui,
379
+ queueClass: Fi,
380
380
  ...t
381
381
  }, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
382
382
  throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i = t.intervalCap) == null ? void 0 : i.toString()) ?? ""}\` (${typeof t.intervalCap})`);
383
383
  if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
384
384
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
385
- I(this, fe, t.carryoverConcurrencyCount), I(this, ge, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), I(this, Re, t.intervalCap), I(this, me, t.interval), I(this, F, new t.queueClass()), I(this, ze, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, I(this, De, t.throwOnTimeout === !0), I(this, oe, t.autoStart === !1);
385
+ L(this, fe, t.carryoverConcurrencyCount), L(this, ge, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), L(this, Re, t.intervalCap), L(this, me, t.interval), L(this, F, new t.queueClass()), L(this, ze, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, L(this, De, t.throwOnTimeout === !0), L(this, ae, t.autoStart === !1);
386
386
  }
387
387
  get concurrency() {
388
388
  return _(this, ye);
@@ -390,7 +390,7 @@ class Fi extends Pi {
390
390
  set concurrency(t) {
391
391
  if (!(typeof t == "number" && t >= 1))
392
392
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
393
- I(this, ye, t), B(this, z, Ne).call(this);
393
+ L(this, ye, t), B(this, z, Ne).call(this);
394
394
  }
395
395
  /**
396
396
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -439,11 +439,11 @@ class Fi extends Pi {
439
439
  }, new Promise((s, r) => {
440
440
  _(this, F).enqueue(async () => {
441
441
  var o;
442
- we(this, J)._++, we(this, le)._++;
442
+ we(this, ee)._++, we(this, he)._++;
443
443
  try {
444
444
  (o = i.signal) == null || o.throwIfAborted();
445
445
  let n = t({ signal: i.signal });
446
- i.timeout && (n = Bi(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, B(this, z, Pt).call(this, i.signal)]));
446
+ i.timeout && (n = Gi(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, B(this, z, Pt).call(this, i.signal)]));
447
447
  const h = await n;
448
448
  s(h), this.emit("completed", h);
449
449
  } catch (n) {
@@ -465,19 +465,19 @@ class Fi extends Pi {
465
465
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
466
466
  */
467
467
  start() {
468
- return _(this, oe) ? (I(this, oe, !1), B(this, z, Ne).call(this), this) : this;
468
+ return _(this, ae) ? (L(this, ae, !1), B(this, z, Ne).call(this), this) : this;
469
469
  }
470
470
  /**
471
471
  Put queue execution on hold.
472
472
  */
473
473
  pause() {
474
- I(this, oe, !0);
474
+ L(this, ae, !0);
475
475
  }
476
476
  /**
477
477
  Clear the queue.
478
478
  */
479
479
  clear() {
480
- I(this, F, new (_(this, ze))());
480
+ L(this, F, new (_(this, ze))());
481
481
  }
482
482
  /**
483
483
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -503,7 +503,7 @@ class Fi extends Pi {
503
503
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
504
504
  */
505
505
  async onIdle() {
506
- _(this, J) === 0 && _(this, F).size === 0 || await B(this, z, Oe).call(this, "idle");
506
+ _(this, ee) === 0 && _(this, F).size === 0 || await B(this, z, Oe).call(this, "idle");
507
507
  }
508
508
  /**
509
509
  Size of the queue, the number of queued items waiting to run.
@@ -523,52 +523,52 @@ class Fi extends Pi {
523
523
  Number of running items (no longer in the queue).
524
524
  */
525
525
  get pending() {
526
- return _(this, J);
526
+ return _(this, ee);
527
527
  }
528
528
  /**
529
529
  Whether the queue is currently paused.
530
530
  */
531
531
  get isPaused() {
532
- return _(this, oe);
532
+ return _(this, ae);
533
533
  }
534
534
  }
535
- fe = new WeakMap(), ge = new WeakMap(), le = new WeakMap(), Re = new WeakMap(), me = new WeakMap(), Te = new WeakMap(), Z = new WeakMap(), pe = new WeakMap(), F = new WeakMap(), ze = new WeakMap(), J = new WeakMap(), ye = new WeakMap(), oe = new WeakMap(), De = new WeakMap(), qe = new WeakMap(), z = new WeakSet(), Ht = function() {
536
- return _(this, ge) || _(this, le) < _(this, Re);
535
+ fe = new WeakMap(), ge = new WeakMap(), he = new WeakMap(), Re = new WeakMap(), me = new WeakMap(), Te = new WeakMap(), J = new WeakMap(), pe = new WeakMap(), F = new WeakMap(), ze = new WeakMap(), ee = new WeakMap(), ye = new WeakMap(), ae = new WeakMap(), De = new WeakMap(), qe = new WeakMap(), z = new WeakSet(), Ht = function() {
536
+ return _(this, ge) || _(this, he) < _(this, Re);
537
537
  }, Lt = function() {
538
- return _(this, J) < _(this, ye);
538
+ return _(this, ee) < _(this, ye);
539
539
  }, It = function() {
540
- we(this, J)._--, B(this, z, Se).call(this), this.emit("next");
540
+ we(this, ee)._--, B(this, z, Se).call(this), this.emit("next");
541
541
  }, Mt = function() {
542
- B(this, z, We).call(this), B(this, z, Fe).call(this), I(this, pe, void 0);
542
+ B(this, z, Fe).call(this), B(this, z, Ue).call(this), L(this, pe, void 0);
543
543
  }, qt = function() {
544
544
  const t = Date.now();
545
- if (_(this, Z) === void 0) {
545
+ if (_(this, J) === void 0) {
546
546
  const i = _(this, Te) - t;
547
547
  if (i < 0)
548
- I(this, le, _(this, fe) ? _(this, J) : 0);
548
+ L(this, he, _(this, fe) ? _(this, ee) : 0);
549
549
  else
550
- return _(this, pe) === void 0 && I(this, pe, setTimeout(() => {
550
+ return _(this, pe) === void 0 && L(this, pe, setTimeout(() => {
551
551
  B(this, z, Mt).call(this);
552
552
  }, i)), !0;
553
553
  }
554
554
  return !1;
555
555
  }, Se = function() {
556
556
  if (_(this, F).size === 0)
557
- return _(this, Z) && clearInterval(_(this, Z)), I(this, Z, void 0), this.emit("empty"), _(this, J) === 0 && this.emit("idle"), !1;
558
- if (!_(this, oe)) {
557
+ return _(this, J) && clearInterval(_(this, J)), L(this, J, void 0), this.emit("empty"), _(this, ee) === 0 && this.emit("idle"), !1;
558
+ if (!_(this, ae)) {
559
559
  const t = !_(this, z, qt);
560
560
  if (_(this, z, Ht) && _(this, z, Lt)) {
561
561
  const i = _(this, F).dequeue();
562
- return i ? (this.emit("active"), i(), t && B(this, z, Fe).call(this), !0) : !1;
562
+ return i ? (this.emit("active"), i(), t && B(this, z, Ue).call(this), !0) : !1;
563
563
  }
564
564
  }
565
565
  return !1;
566
+ }, Ue = function() {
567
+ _(this, ge) || _(this, J) !== void 0 || (L(this, J, setInterval(() => {
568
+ B(this, z, Fe).call(this);
569
+ }, _(this, me))), L(this, Te, Date.now() + _(this, me)));
566
570
  }, Fe = function() {
567
- _(this, ge) || _(this, Z) !== void 0 || (I(this, Z, setInterval(() => {
568
- B(this, z, We).call(this);
569
- }, _(this, me))), I(this, Te, Date.now() + _(this, me)));
570
- }, We = function() {
571
- _(this, le) === 0 && _(this, J) === 0 && _(this, Z) && (clearInterval(_(this, Z)), I(this, Z, void 0)), I(this, le, _(this, fe) ? _(this, J) : 0), B(this, z, Ne).call(this);
571
+ _(this, he) === 0 && _(this, ee) === 0 && _(this, J) && (clearInterval(_(this, J)), L(this, J, void 0)), L(this, he, _(this, fe) ? _(this, ee) : 0), B(this, z, Ne).call(this);
572
572
  }, /**
573
573
  Executes all queued functions until it reaches the limit.
574
574
  */
@@ -589,7 +589,7 @@ Ne = function() {
589
589
  this.on(t, r);
590
590
  });
591
591
  };
592
- const Wi = () => {
592
+ const Vi = () => {
593
593
  const c = kt(), e = _e(ue);
594
594
  if (!e)
595
595
  return;
@@ -597,7 +597,7 @@ const Wi = () => {
597
597
  console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");
598
598
  return;
599
599
  }
600
- const t = new Fi({
600
+ const t = new Wi({
601
601
  carryoverConcurrencyCount: !0,
602
602
  concurrency: c.maxParallelRequests,
603
603
  interval: c.requestInterval,
@@ -607,12 +607,12 @@ const Wi = () => {
607
607
  queryFnOverride: !0,
608
608
  queryFn: (s, r) => t.add(() => e.queryFn(s, r), { throwOnTimeout: !0 })
609
609
  };
610
- Zt(ue, i);
610
+ Jt(ue, i);
611
611
  }, ve = {
612
- useI18n: Oi,
613
- useEvaluateFeatureFlag: Ii,
614
- useRequestQueue: Wi
615
- }, Ze = /* @__PURE__ */ j({
612
+ useI18n: Ai,
613
+ useEvaluateFeatureFlag: Mi,
614
+ useRequestQueue: Vi
615
+ }, Qe = /* @__PURE__ */ X({
616
616
  __name: "QueryDataProvider",
617
617
  props: {
618
618
  context: {},
@@ -623,38 +623,38 @@ const Wi = () => {
623
623
  emits: ["chart-data", "queryComplete"],
624
624
  setup(c, { emit: e }) {
625
625
  const t = c, i = e, { i18n: s } = ve.useI18n(), r = _e(ue), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
626
- Ve(() => {
626
+ We(() => {
627
627
  n.abort();
628
628
  });
629
- const h = (R, A, T) => {
630
- const H = [];
631
- return A && H.push(...A), H.push(...ni(R, T)), H;
632
- }, { data: l, error: d, isValidating: a } = fi(o, async () => {
633
- var R, A, T, H;
629
+ const h = (R, O, T) => {
630
+ const P = [];
631
+ return O && P.push(...O), P.push(...oi(R, T)), P;
632
+ }, { data: l, error: d, isValidating: a } = gi(o, async () => {
633
+ var R, O, T, P;
634
634
  try {
635
635
  let {
636
636
  datasource: E,
637
637
  ...x
638
638
  } = t.query;
639
639
  E || (E = "basic");
640
- const O = h(E, t.query.filters, t.context.filters);
641
- let D = t.query.time_range;
642
- D ? D.tz || (D = {
643
- ...D,
640
+ const A = h(E, t.query.filters, t.context.filters);
641
+ let N = t.query.time_range;
642
+ N ? N.tz || (N = {
643
+ ...N,
644
644
  tz: t.context.tz
645
- }) : D = {
645
+ }) : N = {
646
646
  ...t.context.timeSpec,
647
647
  tz: t.context.tz
648
648
  };
649
- const P = {
649
+ const M = {
650
650
  datasource: E,
651
651
  query: {
652
652
  ...x,
653
- time_range: D,
654
- filters: O
653
+ time_range: N,
654
+ filters: A
655
655
  }
656
- }, ee = await (r == null ? void 0 : r.queryFn(P, n));
657
- return g.value = null, ee;
656
+ }, V = await (r == null ? void 0 : r.queryFn(M, n));
657
+ return g.value = null, V;
658
658
  } catch (E) {
659
659
  throw (E == null ? void 0 : E.status) === 403 ? g.value = {
660
660
  message: s.t("queryDataProvider.forbidden"),
@@ -662,11 +662,11 @@ const Wi = () => {
662
662
  } : (E == null ? void 0 : E.status) === 408 ? g.value = {
663
663
  message: s.t("queryDataProvider.timeout"),
664
664
  type: "timeout"
665
- } : ((A = (R = E == null ? void 0 : E.response) == null ? void 0 : R.data) == null ? void 0 : A.message) === "Range not allowed for this tier" ? g.value = {
665
+ } : ((O = (R = E == null ? void 0 : E.response) == null ? void 0 : R.data) == null ? void 0 : O.message) === "Range not allowed for this tier" ? g.value = {
666
666
  message: s.t("queryDataProvider.timeRangeExceeded"),
667
667
  type: "range_exceeded"
668
668
  } : g.value = {
669
- message: ((H = (T = E == null ? void 0 : E.response) == null ? void 0 : T.data) == null ? void 0 : H.message) || (E == null ? void 0 : E.message),
669
+ message: ((P = (T = E == null ? void 0 : E.response) == null ? void 0 : T.data) == null ? void 0 : P.message) || (E == null ? void 0 : E.message),
670
670
  type: "other"
671
671
  }, E;
672
672
  } finally {
@@ -676,17 +676,17 @@ const Wi = () => {
676
676
  refreshInterval: t.context.refreshInterval,
677
677
  revalidateOnFocus: !1,
678
678
  shouldRetryOnError: !1
679
- }), { state: f, swrvState: m } = xi(l, d, a), g = G(null), v = N(() => f.value === m.ERROR || !!g.value), p = N(() => !t.queryReady || f.value === m.PENDING);
680
- return Ke(l, (R) => {
679
+ }), { state: f, swrvState: m } = Ci(l, d, a), g = G(null), v = S(() => f.value === m.ERROR || !!g.value), p = S(() => !t.queryReady || f.value === m.PENDING);
680
+ return Ve(l, (R) => {
681
681
  R && i("chart-data", R);
682
- }), (R, A) => {
682
+ }), (R, O) => {
683
683
  var E;
684
- const T = he("KSkeleton"), H = he("KEmptyState");
685
- return p.value || !k(l) && !v.value ? (C(), M(T, {
684
+ const T = de("KSkeleton"), P = de("KEmptyState");
685
+ return p.value || !D(l) && !v.value ? (C(), I(T, {
686
686
  key: 0,
687
687
  class: "chart-skeleton",
688
688
  type: "table"
689
- })) : v.value && ((E = g.value) == null ? void 0 : E.type) === "forbidden" ? (C(), M(H, {
689
+ })) : v.value && ((E = g.value) == null ? void 0 : E.type) === "forbidden" ? (C(), I(P, {
690
690
  key: 1,
691
691
  "action-button-visible": !1,
692
692
  "data-testid": "chart-forbidden-state"
@@ -695,10 +695,10 @@ const Wi = () => {
695
695
  Ee(te(g.value.message), 1)
696
696
  ]),
697
697
  icon: q(() => [
698
- se(k(pi))
698
+ se(D(yi))
699
699
  ]),
700
700
  _: 1
701
- })) : v.value ? (C(), M(H, {
701
+ })) : v.value ? (C(), I(P, {
702
702
  key: 2,
703
703
  "action-button-visible": !1,
704
704
  "data-testid": "chart-empty-state",
@@ -711,13 +711,13 @@ const Wi = () => {
711
711
  ];
712
712
  }),
713
713
  _: 1
714
- })) : k(l) ? Pe(R.$slots, "default", {
714
+ })) : D(l) ? Pe(R.$slots, "default", {
715
715
  key: 3,
716
- data: k(l)
717
- }) : Y("", !0);
716
+ data: D(l)
717
+ }) : j("", !0);
718
718
  };
719
719
  }
720
- }), Vi = /* @__PURE__ */ j({
720
+ }), Ki = /* @__PURE__ */ X({
721
721
  __name: "SimpleChartRenderer",
722
722
  props: {
723
723
  query: {},
@@ -729,21 +729,21 @@ const Wi = () => {
729
729
  requestsLink: {}
730
730
  },
731
731
  setup(c) {
732
- Ye((i) => ({
732
+ Ke((i) => ({
733
733
  "088169ae": `${i.height}px`
734
734
  }));
735
- const e = c, t = N(() => e.chartOptions.type === "single_value");
736
- return (i, s) => (C(), M(Ze, {
735
+ const e = c, t = S(() => e.chartOptions.type === "single_value");
736
+ return (i, s) => (C(), I(Qe, {
737
737
  context: i.context,
738
738
  query: i.query,
739
739
  "query-ready": i.queryReady,
740
740
  "refresh-counter": i.refreshCounter
741
741
  }, {
742
742
  default: q(({ data: r }) => [
743
- ae("div", {
744
- class: je(["analytics-chart", { "single-value": t.value }])
743
+ le("div", {
744
+ class: Ye(["analytics-chart", { "single-value": t.value }])
745
745
  }, [
746
- se(k(hi), {
746
+ se(D(di), {
747
747
  "chart-data": r,
748
748
  "chart-options": i.chartOptions,
749
749
  "synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
@@ -758,7 +758,7 @@ const Wi = () => {
758
758
  for (const [i, s] of e)
759
759
  t[i] = s;
760
760
  return t;
761
- }, gt = /* @__PURE__ */ ce(Vi, [["__scopeId", "data-v-1e9ff912"]]), Ki = { class: "analytics-chart" }, Yi = /* @__PURE__ */ j({
761
+ }, gt = /* @__PURE__ */ ce(Ki, [["__scopeId", "data-v-1e9ff912"]]), Yi = { class: "analytics-chart" }, ji = /* @__PURE__ */ X({
762
762
  __name: "BaseAnalyticsChartRenderer",
763
763
  props: {
764
764
  query: {},
@@ -772,19 +772,19 @@ const Wi = () => {
772
772
  },
773
773
  emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
774
774
  setup(c, { emit: e }) {
775
- const t = c, i = e, { i18n: s } = ve.useI18n(), { evaluateFeatureFlag: r } = ve.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n = N(() => ({
775
+ const t = c, i = e, { i18n: s } = ve.useI18n(), { evaluateFeatureFlag: r } = ve.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n = S(() => ({
776
776
  type: t.chartOptions.type,
777
777
  stacked: t.chartOptions.stacked ?? !1,
778
778
  chartDatasetColors: t.chartOptions.chart_dataset_colors,
779
779
  threshold: t.chartOptions.threshold
780
- })), h = N(() => o ? t.context.zoomable : t.context.zoomable && !t.query.time_range), l = () => {
780
+ })), h = S(() => o ? t.context.zoomable : t.context.zoomable && !t.query.time_range), l = () => {
781
781
  i("edit-tile");
782
782
  }, d = (a) => {
783
783
  i("chart-data", a);
784
784
  };
785
785
  return (a, f) => {
786
- const m = he("KDropdownItem");
787
- return C(), M(Ze, {
786
+ const m = de("KDropdownItem");
787
+ return C(), I(Qe, {
788
788
  context: a.context,
789
789
  query: a.query,
790
790
  "query-ready": a.queryReady,
@@ -792,41 +792,39 @@ const Wi = () => {
792
792
  onChartData: d
793
793
  }, {
794
794
  default: q(({ data: g }) => [
795
- ae("div", Ki, [
796
- se(k(di), xt({
797
- "allow-csv-export": a.chartOptions.allow_csv_export,
795
+ le("div", Yi, [
796
+ se(D(ui), xt({
798
797
  "chart-data": g,
799
798
  "chart-options": n.value,
800
799
  "legend-position": "bottom",
801
800
  "requests-link": a.requestsLink,
802
- "show-menu": a.context.editable,
803
801
  "synthetics-data-key": a.chartOptions.synthetics_data_key,
804
802
  "timeseries-zoom": h.value,
805
803
  "tooltip-title": ""
806
804
  }, a.extraProps, {
807
805
  onSelectChartRange: f[0] || (f[0] = (v) => i("select-chart-range", v)),
808
806
  onZoomTimeRange: f[1] || (f[1] = (v) => i("zoom-time-range", v))
809
- }), Xe({ _: 2 }, [
807
+ }), je({ _: 2 }, [
810
808
  a.context.editable ? {
811
809
  name: "menu-items",
812
810
  fn: q(() => [
813
811
  se(m, { onClick: l }, {
814
812
  default: q(() => [
815
- Ee(te(k(s).t("renderer.edit")), 1)
813
+ Ee(te(D(s).t("renderer.edit")), 1)
816
814
  ]),
817
815
  _: 1
818
816
  })
819
817
  ]),
820
818
  key: "0"
821
819
  } : void 0
822
- ]), 1040, ["allow-csv-export", "chart-data", "chart-options", "requests-link", "show-menu", "synthetics-data-key", "timeseries-zoom"])
820
+ ]), 1040, ["chart-data", "chart-options", "requests-link", "synthetics-data-key", "timeseries-zoom"])
823
821
  ])
824
822
  ]),
825
823
  _: 1
826
824
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
827
825
  };
828
826
  }
829
- }), Je = /* @__PURE__ */ ce(Yi, [["__scopeId", "data-v-9d4f6602"]]), mt = /* @__PURE__ */ j({
827
+ }), Ze = /* @__PURE__ */ ce(ji, [["__scopeId", "data-v-959ffa20"]]), mt = /* @__PURE__ */ X({
830
828
  __name: "BarChartRenderer",
831
829
  props: {
832
830
  query: {},
@@ -838,7 +836,7 @@ const Wi = () => {
838
836
  requestsLink: {}
839
837
  },
840
838
  setup(c) {
841
- return (e, t) => (C(), M(Je, {
839
+ return (e, t) => (C(), I(Ze, {
842
840
  "chart-options": e.chartOptions,
843
841
  context: e.context,
844
842
  "extra-props": { showAnnotations: !1 },
@@ -848,7 +846,7 @@ const Wi = () => {
848
846
  "refresh-counter": e.refreshCounter
849
847
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
850
848
  }
851
- }), pt = /* @__PURE__ */ j({
849
+ }), pt = /* @__PURE__ */ X({
852
850
  __name: "TimeseriesChartRenderer",
853
851
  props: {
854
852
  query: {},
@@ -862,7 +860,7 @@ const Wi = () => {
862
860
  emits: ["zoom-time-range", "select-chart-range"],
863
861
  setup(c, { emit: e }) {
864
862
  const t = e;
865
- return (i, s) => (C(), M(Je, {
863
+ return (i, s) => (C(), I(Ze, {
866
864
  "chart-options": i.chartOptions,
867
865
  context: i.context,
868
866
  height: i.height,
@@ -874,7 +872,7 @@ const Wi = () => {
874
872
  onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
875
873
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
876
874
  }
877
- }), ji = { class: "metric-card-tile-wrapper" }, Xi = /* @__PURE__ */ j({
875
+ }), Xi = { class: "metric-card-tile-wrapper" }, Qi = /* @__PURE__ */ X({
878
876
  __name: "GoldenSignalsRenderer",
879
877
  props: {
880
878
  query: {},
@@ -886,10 +884,10 @@ const Wi = () => {
886
884
  requestsLink: {}
887
885
  },
888
886
  setup(c) {
889
- const e = c, t = N(() => {
887
+ const e = c, t = S(() => {
890
888
  const s = e.context.timeSpec;
891
889
  if (s.type === "absolute")
892
- return new oi({
890
+ return new ai({
893
891
  key: "custom",
894
892
  timeframeText: "custom",
895
893
  display: "custom",
@@ -905,7 +903,7 @@ const Wi = () => {
905
903
  if (!r)
906
904
  throw new Error("Unknown time range");
907
905
  return r;
908
- }), i = N(() => {
906
+ }), i = S(() => {
909
907
  var r, o;
910
908
  const s = (r = e.query) == null ? void 0 : r.datasource;
911
909
  if (s && s !== "api_usage" && s !== "basic")
@@ -923,27 +921,27 @@ const Wi = () => {
923
921
  refreshCounter: e.refreshCounter
924
922
  };
925
923
  });
926
- return (s, r) => (C(), W("div", ji, [
927
- se(k(bi), Jt(ei(i.value)), {
924
+ return (s, r) => (C(), W("div", Xi, [
925
+ se(D(wi), ei(ti(i.value)), {
928
926
  default: q(() => [
929
- se(k(wi))
927
+ se(D(Ei))
930
928
  ]),
931
929
  _: 1
932
930
  }, 16)
933
931
  ]));
934
932
  }
935
- }), Qi = /* @__PURE__ */ ce(Xi, [["__scopeId", "data-v-7e1b1cc1"]]), yt = "#6c7489", Zi = "12px", vt = "20px", $t = "20px", Ji = {
933
+ }), Zi = /* @__PURE__ */ ce(Qi, [["__scopeId", "data-v-7e1b1cc1"]]), yt = "#6c7489", Ji = "12px", vt = "20px", $t = "20px", es = {
936
934
  class: "fallback-entity-link",
937
935
  "data-testid": "entity-link-parent"
938
- }, _t = /* @__PURE__ */ j({
936
+ }, _t = /* @__PURE__ */ X({
939
937
  __name: "FallbackEntityLink",
940
938
  props: {
941
939
  entityLinkData: {}
942
940
  },
943
941
  setup(c) {
944
- return (e, t) => (C(), W("div", Ji, te(e.entityLinkData.label), 1));
942
+ return (e, t) => (C(), W("div", es, te(e.entityLinkData.label), 1));
945
943
  }
946
- }), es = /* @__PURE__ */ j({
944
+ }), ts = /* @__PURE__ */ X({
947
945
  __name: "TopNTableRenderer",
948
946
  props: {
949
947
  query: {},
@@ -955,7 +953,7 @@ const Wi = () => {
955
953
  requestsLink: {}
956
954
  },
957
955
  setup(c) {
958
- const e = c, t = _e(ue), i = ti(async () => {
956
+ const e = c, t = _e(ue), i = ii(async () => {
959
957
  if (t != null && t.fetchComponent)
960
958
  try {
961
959
  return await t.fetchComponent("EntityLink");
@@ -968,26 +966,26 @@ const Wi = () => {
968
966
  if ((o = e.chartOptions) != null && o.entity_link)
969
967
  if (r.id.includes(":")) {
970
968
  const [n, h] = r.id.split(":");
971
- return e.chartOptions.entity_link.replace(Ai, n).replace(ut, h);
969
+ return e.chartOptions.entity_link.replace(Hi, n).replace(ut, h);
972
970
  } else
973
971
  return e.chartOptions.entity_link.replace(ut, r.id);
974
972
  return "";
975
973
  };
976
- return (r, o) => (C(), M(Ze, {
974
+ return (r, o) => (C(), I(Qe, {
977
975
  context: r.context,
978
976
  query: r.query,
979
977
  "query-ready": r.queryReady,
980
978
  "refresh-counter": r.refreshCounter
981
979
  }, {
982
980
  default: q(({ data: n }) => [
983
- se(k(ui), {
981
+ se(D(ci), {
984
982
  data: n,
985
983
  "synthetics-data-key": r.chartOptions.synthetics_data_key
986
- }, Xe({ _: 2 }, [
984
+ }, je({ _: 2 }, [
987
985
  e.chartOptions.entity_link ? {
988
986
  name: "name",
989
987
  fn: q(({ record: h }) => [
990
- se(k(i), {
988
+ se(D(i), {
991
989
  "entity-link-data": {
992
990
  id: h.id,
993
991
  label: h.name,
@@ -1003,7 +1001,7 @@ const Wi = () => {
1003
1001
  _: 1
1004
1002
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
1005
1003
  }
1006
- }), ts = /* @__PURE__ */ j({
1004
+ }), is = /* @__PURE__ */ X({
1007
1005
  __name: "DonutChartRenderer",
1008
1006
  props: {
1009
1007
  query: {},
@@ -1015,7 +1013,7 @@ const Wi = () => {
1015
1013
  requestsLink: {}
1016
1014
  },
1017
1015
  setup(c) {
1018
- return (e, t) => (C(), M(Je, {
1016
+ return (e, t) => (C(), I(Ze, {
1019
1017
  "chart-options": e.chartOptions,
1020
1018
  context: e.context,
1021
1019
  height: e.height,
@@ -1024,10 +1022,10 @@ const Wi = () => {
1024
1022
  "refresh-counter": e.refreshCounter
1025
1023
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
1026
1024
  }
1027
- }), is = ["data-testid"], ss = {
1025
+ }), ss = ["data-testid"], rs = {
1028
1026
  key: 0,
1029
1027
  class: "tile-header"
1030
- }, rs = ["data-testid"], ns = { class: "badge-text" }, os = ["data-testid"], as = { class: "delete-option" }, ls = ["data-testid"], hs = ["data-testid"], ds = /* @__PURE__ */ j({
1028
+ }, ns = ["data-testid"], os = { class: "badge-text" }, as = ["data-testid"], ls = { class: "delete-option" }, hs = ["data-testid"], ds = ["data-testid"], us = /* @__PURE__ */ X({
1031
1029
  __name: "DashboardTile",
1032
1030
  props: {
1033
1031
  definition: {},
@@ -1039,58 +1037,58 @@ const Wi = () => {
1039
1037
  },
1040
1038
  emits: ["edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom"],
1041
1039
  setup(c, { emit: e }) {
1042
- Ye((y) => ({
1043
- "3ec3fc5c": `${y.height}px`
1040
+ Ke((y) => ({
1041
+ "832850d2": `${y.height}px`
1044
1042
  }));
1045
- const t = parseInt($t, 10), i = c, s = e, r = _e(ue), o = r == null ? void 0 : r.evaluateFeatureFlagFn("analytics-chart-zoom-actions", !1), { i18n: n } = ve.useI18n(), h = G(), l = G(!1), d = G(), a = G(!1), f = G(""), m = G(""), g = G(void 0);
1046
- Qe(async () => {
1047
- var y, S;
1048
- f.value = await ((y = r == null ? void 0 : r.exploreBaseUrl) == null ? void 0 : y.call(r)) ?? "", m.value = await ((S = r == null ? void 0 : r.requestsBaseUrl) == null ? void 0 : S.call(r)) ?? "";
1049
- }), Ke(() => i.definition, async () => {
1050
- await Ct(), d.value && (a.value = d.value.scrollWidth > d.value.clientWidth);
1043
+ const t = parseInt($t, 10), i = c, s = e, r = _e(ue), o = r == null ? void 0 : r.evaluateFeatureFlagFn("analytics-chart-zoom-actions", !1), { i18n: n } = ve.useI18n(), h = G(), l = G(!1), d = G(), a = G(!1), f = G(""), m = G(""), g = G(void 0), v = G(!0);
1044
+ Xe(async () => {
1045
+ var y, k;
1046
+ f.value = await ((y = r == null ? void 0 : r.exploreBaseUrl) == null ? void 0 : y.call(r)) ?? "", m.value = await ((k = r == null ? void 0 : r.requestsBaseUrl) == null ? void 0 : k.call(r)) ?? "";
1047
+ }), Ve(() => i.definition, async () => {
1048
+ await Ct(), d.value && (a.value = d.value.scrollWidth > d.value.clientWidth), v.value = !0;
1051
1049
  }, { immediate: !0, deep: !0 });
1052
- const v = N(() => {
1053
- if (!f.value || !i.definition.query || !H.value)
1050
+ const p = S(() => {
1051
+ if (!f.value || !i.definition.query || !E.value)
1054
1052
  return "";
1055
- const y = Gt.value, S = i.definition.query.dimensions ?? [], L = {
1053
+ const y = Ut.value, k = i.definition.query.dimensions ?? [], H = {
1056
1054
  filters: y,
1057
1055
  metrics: i.definition.query.metrics ?? [],
1058
- dimensions: S,
1056
+ dimensions: k,
1059
1057
  time_range: i.definition.query.time_range || i.context.timeSpec,
1060
- granularity: i.definition.query.granularity || ee.value
1061
- }, X = ["api_usage", "llm_usage"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "api_usage";
1062
- return `${f.value}?q=${JSON.stringify(L)}&d=${X}&c=${i.definition.chart.type}`;
1063
- }), p = N(() => {
1058
+ granularity: i.definition.query.granularity || oe.value
1059
+ }, Q = ["api_usage", "llm_usage"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "api_usage";
1060
+ return `${f.value}?q=${JSON.stringify(H)}&d=${Q}&c=${i.definition.chart.type}`;
1061
+ }), R = S(() => {
1064
1062
  var y;
1065
1063
  return m.value && i.definition.query && ((y = i.definition.query) == null ? void 0 : y.datasource) !== "llm_usage";
1066
- }), R = N(() => {
1067
- if (!p.value || !H.value)
1064
+ }), O = S(() => {
1065
+ if (!R.value || !E.value)
1068
1066
  return "";
1069
- const y = [...i.context.filters, ...i.definition.query.filters ?? []], S = st(
1067
+ const y = [...i.context.filters, ...i.definition.query.filters ?? []], k = it(
1070
1068
  i.definition.query.time_range || i.context.timeSpec,
1071
1069
  y
1072
1070
  );
1073
- return `${m.value}?q=${JSON.stringify(S)}`;
1074
- }), A = N(() => n.t("csvExport.defaultFilename")), T = N(() => H.value && (E.value || i.context.editable) || !!P.value), H = N(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), E = N(() => !!v.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), x = {
1071
+ return `${m.value}?q=${JSON.stringify(k)}`;
1072
+ }), T = S(() => n.t("csvExport.defaultFilename")), P = S(() => E.value && (x.value || i.context.editable) || !!V.value), E = S(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), x = S(() => !!p.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), A = {
1075
1073
  timeseries_line: pt,
1076
1074
  timeseries_bar: pt,
1077
1075
  horizontal_bar: mt,
1078
1076
  vertical_bar: mt,
1079
1077
  gauge: gt,
1080
- donut: ts,
1081
- golden_signals: Qi,
1082
- top_n: es,
1078
+ donut: is,
1079
+ golden_signals: Zi,
1080
+ top_n: ts,
1083
1081
  slottable: void 0,
1084
1082
  single_value: gt
1085
- }, O = N(() => {
1086
- var y, S;
1083
+ }, N = S(() => {
1084
+ var y, k;
1087
1085
  return {
1088
- ...(y = D.value) != null && y.rendererEvents.supportsRequests ? { "select-chart-range": jt } : {},
1089
- ...(S = D.value) != null && S.rendererEvents.supportsZoom ? { "zoom-time-range": Yt } : {}
1086
+ ...(y = M.value) != null && y.rendererEvents.supportsRequests ? { "select-chart-range": Xt } : {},
1087
+ ...(k = M.value) != null && k.rendererEvents.supportsZoom ? { "zoom-time-range": jt } : {}
1090
1088
  };
1091
- }), D = N(() => {
1092
- var X, V;
1093
- const y = x[i.definition.chart.type], S = !!((X = y == null ? void 0 : y.emits) != null && X.includes("select-chart-range")), L = !!((V = y == null ? void 0 : y.emits) != null && V.includes("zoom-time-range"));
1089
+ }), M = S(() => {
1090
+ var Q, K;
1091
+ const y = A[i.definition.chart.type], k = !!((Q = y == null ? void 0 : y.emits) != null && Q.includes("select-chart-range")), H = !!((K = y == null ? void 0 : y.emits) != null && K.includes("zoom-time-range"));
1094
1092
  return y && {
1095
1093
  component: y,
1096
1094
  rendererProps: {
@@ -1103,84 +1101,86 @@ const Wi = () => {
1103
1101
  requestsLink: g.value
1104
1102
  },
1105
1103
  rendererEvents: {
1106
- supportsRequests: S,
1107
- supportsZoom: L
1104
+ supportsRequests: k,
1105
+ supportsZoom: H
1108
1106
  }
1109
1107
  };
1110
- }), P = N(() => {
1111
- var S;
1112
- const y = (S = i.definition.query) == null ? void 0 : S.time_range;
1108
+ }), V = S(() => {
1109
+ var k;
1110
+ const y = (k = i.definition.query) == null ? void 0 : k.time_range;
1113
1111
  if ((y == null ? void 0 : y.type) === "relative") {
1114
- const L = Dt.get(ai[y.time_range]);
1115
- return L ? L.display : (console.warn("Did not recognize the given relative time range:", y.time_range), y.time_range);
1112
+ const H = Dt.get(li[y.time_range]);
1113
+ return H ? H.display : (console.warn("Did not recognize the given relative time range:", y.time_range), y.time_range);
1116
1114
  } else if ((y == null ? void 0 : y.type) === "absolute") {
1117
- const L = y.tz || "Etc/UTC";
1118
- return `${dt(y.start, { short: !0, tz: L })} - ${dt(y.end, { short: !0, tz: L })}`;
1115
+ const H = y.tz || "Etc/UTC";
1116
+ return `${ht(y.start, { short: !0, tz: H })} - ${ht(y.end, { short: !0, tz: H })}`;
1119
1117
  }
1120
1118
  return null;
1121
- }), ee = N(() => h.value ? Ue(h.value.meta.granularity_ms) : void 0), de = N(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), be = N(() => {
1122
- var L;
1123
- const y = i.definition.query.granularity, S = Ue(((L = h.value) == null ? void 0 : L.meta.granularity_ms) || 0);
1124
- return de.value && y !== S;
1125
- }), ke = N(() => {
1126
- var L, X, V;
1127
- const y = Ue(((L = h.value) == null ? void 0 : L.meta.granularity_ms) ?? 0) ?? "unknown", S = ((V = (X = i.definition) == null ? void 0 : X.query) == null ? void 0 : V.granularity) ?? "unknown";
1119
+ }), oe = S(() => h.value ? dt(h.value.meta.granularity_ms) : void 0), ke = S(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), be = S(() => {
1120
+ var k, H;
1121
+ if (!ke.value || !i.queryReady || v.value)
1122
+ return !1;
1123
+ const y = (H = (k = i.definition) == null ? void 0 : k.query) == null ? void 0 : H.granularity;
1124
+ return !y || !oe.value ? !1 : y !== oe.value;
1125
+ }), Gt = S(() => {
1126
+ var H, Q, K;
1127
+ const y = dt(((H = h.value) == null ? void 0 : H.meta.granularity_ms) ?? 0) ?? "unknown", k = ((K = (Q = i.definition) == null ? void 0 : Q.query) == null ? void 0 : K.granularity) ?? "unknown";
1128
1128
  return n.t("query_aged_out_warning", {
1129
1129
  currentGranularity: n.t(`granularities.${y}`),
1130
- savedGranularity: n.t(`granularities.${S}`)
1130
+ savedGranularity: n.t(`granularities.${k}`)
1131
1131
  });
1132
- }), Gt = N(() => {
1133
- var L, X;
1134
- const y = [...i.context.filters, ...i.definition.query.filters ?? []], S = ((X = (L = i.definition) == null ? void 0 : L.query) == null ? void 0 : X.datasource) ?? "api_usage";
1135
- return y.filter((V) => li(V.field).some((nt) => S === nt));
1136
- }), Ut = () => {
1132
+ }), Ut = S(() => {
1133
+ var H, Q;
1134
+ const y = [...i.context.filters, ...i.definition.query.filters ?? []], k = ((Q = (H = i.definition) == null ? void 0 : H.query) == null ? void 0 : Q.datasource) ?? "api_usage";
1135
+ return y.filter((K) => hi(K.field).some((rt) => k === rt));
1136
+ }), Ft = () => {
1137
1137
  s("edit-tile", i.definition);
1138
- }, Ft = () => {
1139
- s("duplicate-tile", i.definition);
1140
1138
  }, Wt = () => {
1139
+ s("duplicate-tile", i.definition);
1140
+ }, Vt = () => {
1141
1141
  s("remove-tile", i.definition);
1142
- }, Vt = (y) => {
1143
- h.value = y;
1144
- }, it = (y) => {
1142
+ }, Kt = (y) => {
1143
+ h.value = y, v.value = !1;
1144
+ }, tt = (y) => {
1145
1145
  l.value = y;
1146
- }, Kt = () => {
1147
- it(!0);
1148
- }, Yt = (y) => {
1149
- const S = {
1146
+ }, Yt = () => {
1147
+ tt(!0);
1148
+ }, jt = (y) => {
1149
+ const k = {
1150
1150
  tileId: i.tileId.toString(),
1151
1151
  timeRange: y
1152
1152
  };
1153
- s("tile-time-range-zoom", S);
1154
- }, st = (y, S) => ({
1155
- filter: S,
1153
+ s("tile-time-range-zoom", k);
1154
+ }, it = (y, k) => ({
1155
+ filter: k,
1156
1156
  timeframe: {
1157
1157
  timePeriodsKey: y.type === "relative" ? y.time_range : "custom",
1158
1158
  start: y.type === "absolute" ? y.start : void 0,
1159
1159
  end: y.type === "absolute" ? y.end : void 0
1160
1160
  }
1161
- }), jt = (y) => {
1162
- if (!p.value) {
1161
+ }), Xt = (y) => {
1162
+ if (!R.value) {
1163
1163
  g.value = void 0;
1164
1164
  return;
1165
1165
  }
1166
- const S = [...i.context.filters, ...i.definition.query.filters ?? []], L = st(y, S);
1167
- g.value = { href: `${m.value}?q=${JSON.stringify(L)}` };
1166
+ const k = [...i.context.filters, ...i.definition.query.filters ?? []], H = it(y, k);
1167
+ g.value = { href: `${m.value}?q=${JSON.stringify(H)}` };
1168
1168
  };
1169
- return (y, S) => {
1170
- const L = he("KTooltip"), X = he("KBadge"), V = he("KDropdownItem"), rt = he("KDropdown");
1169
+ return (y, k) => {
1170
+ const H = de("KTooltip"), Q = de("KBadge"), K = de("KDropdownItem"), st = de("KDropdown");
1171
1171
  return C(), W("div", {
1172
- class: je(["tile-boundary", { editable: y.context.editable }]),
1172
+ class: Ye(["tile-boundary", { editable: y.context.editable }]),
1173
1173
  "data-testid": `tile-${y.tileId}`
1174
1174
  }, [
1175
- y.definition.chart.type !== "slottable" ? (C(), W("div", ss, [
1176
- se(L, {
1175
+ y.definition.chart.type !== "slottable" ? (C(), W("div", rs, [
1176
+ se(H, {
1177
1177
  class: "title-tooltip",
1178
1178
  disabled: !a.value,
1179
1179
  "max-width": "500",
1180
1180
  text: y.definition.chart.chart_title
1181
1181
  }, {
1182
1182
  default: q(() => [
1183
- ae("div", {
1183
+ le("div", {
1184
1184
  ref_key: "titleRef",
1185
1185
  ref: d,
1186
1186
  class: "title"
@@ -1188,123 +1188,123 @@ const Wi = () => {
1188
1188
  ]),
1189
1189
  _: 1
1190
1190
  }, 8, ["disabled", "text"]),
1191
- T.value ? (C(), W("div", {
1191
+ P.value ? (C(), W("div", {
1192
1192
  key: 0,
1193
1193
  class: "tile-actions",
1194
1194
  "data-testid": `tile-actions-${y.tileId}`
1195
1195
  }, [
1196
- P.value ? (C(), M(X, {
1196
+ V.value ? (C(), I(Q, {
1197
1197
  key: 0,
1198
1198
  "data-testid": "time-range-badge",
1199
- tooltip: be.value ? ke.value : void 0,
1199
+ tooltip: be.value ? Gt.value : void 0,
1200
1200
  "tooltip-attributes": { maxWidth: "320px" }
1201
- }, Xe({
1201
+ }, je({
1202
1202
  default: q(() => [
1203
- ae("span", ns, te(P.value), 1)
1203
+ le("span", os, te(V.value), 1)
1204
1204
  ]),
1205
1205
  _: 2
1206
1206
  }, [
1207
1207
  be.value ? {
1208
1208
  name: "icon",
1209
1209
  fn: q(() => [
1210
- se(k(yi), { size: k(Zi) }, null, 8, ["size"])
1210
+ se(D(vi), { size: D(Ji) }, null, 8, ["size"])
1211
1211
  ]),
1212
1212
  key: "0"
1213
1213
  } : void 0
1214
- ]), 1032, ["tooltip"])) : Y("", !0),
1215
- H.value && y.context.editable ? (C(), M(k(vi), {
1214
+ ]), 1032, ["tooltip"])) : j("", !0),
1215
+ E.value && y.context.editable ? (C(), I(D(_i), {
1216
1216
  key: 1,
1217
1217
  class: "edit-icon",
1218
- color: k(yt),
1218
+ color: D(yt),
1219
1219
  "data-testid": `edit-tile-${y.tileId}`,
1220
- size: k(vt),
1221
- onClick: Ut
1222
- }, null, 8, ["color", "data-testid", "size"])) : Y("", !0),
1223
- H.value && E.value ? (C(), M(rt, {
1220
+ size: D(vt),
1221
+ onClick: Ft
1222
+ }, null, 8, ["color", "data-testid", "size"])) : j("", !0),
1223
+ E.value && x.value ? (C(), I(st, {
1224
1224
  key: 2,
1225
1225
  class: "dropdown",
1226
1226
  "data-testid": `chart-action-menu-${y.tileId}`,
1227
1227
  "kpop-attributes": { placement: "bottom-end" }
1228
1228
  }, {
1229
1229
  items: q(() => [
1230
- v.value ? (C(), M(V, {
1230
+ p.value ? (C(), I(K, {
1231
1231
  key: 0,
1232
1232
  "data-testid": `chart-jump-to-explore-${y.tileId}`,
1233
- item: { label: k(n).t("jumpToExplore"), to: v.value }
1234
- }, null, 8, ["data-testid", "item"])) : Y("", !0),
1235
- k(o) && R.value ? (C(), M(V, {
1233
+ item: { label: D(n).t("jumpToExplore"), to: p.value }
1234
+ }, null, 8, ["data-testid", "item"])) : j("", !0),
1235
+ D(o) && O.value ? (C(), I(K, {
1236
1236
  key: 1,
1237
1237
  "data-testid": `chart-jump-to-requests-${y.tileId}`,
1238
- item: { label: k(n).t("jumpToRequests"), to: R.value }
1239
- }, null, 8, ["data-testid", "item"])) : Y("", !0),
1240
- !("allowCsvExport" in y.definition.chart) || y.definition.chart.allowCsvExport ? (C(), M(V, {
1238
+ item: { label: D(n).t("jumpToRequests"), to: O.value }
1239
+ }, null, 8, ["data-testid", "item"])) : j("", !0),
1240
+ !("allow_csv_export" in y.definition.chart) || y.definition.chart.allow_csv_export ? (C(), I(K, {
1241
1241
  key: 2,
1242
1242
  class: "chart-export-button",
1243
1243
  "data-testid": `chart-csv-export-${y.tileId}`,
1244
- onClick: S[0] || (S[0] = (nt) => Kt())
1244
+ onClick: k[0] || (k[0] = (rt) => Yt())
1245
1245
  }, {
1246
1246
  default: q(() => [
1247
- ae("span", {
1247
+ le("span", {
1248
1248
  class: "chart-export-trigger",
1249
1249
  "data-testid": `csv-export-button-${y.tileId}`
1250
- }, te(k(n).t("csvExport.exportAsCsv")), 9, os)
1250
+ }, te(D(n).t("csvExport.exportAsCsv")), 9, as)
1251
1251
  ]),
1252
1252
  _: 1
1253
- }, 8, ["data-testid"])) : Y("", !0),
1254
- y.context.editable ? (C(), M(V, {
1253
+ }, 8, ["data-testid"])) : j("", !0),
1254
+ y.context.editable ? (C(), I(K, {
1255
1255
  key: 3,
1256
1256
  "data-testid": `duplicate-tile-${y.tileId}`,
1257
- onClick: Ft
1257
+ onClick: Wt
1258
1258
  }, {
1259
1259
  default: q(() => [
1260
- Ee(te(k(n).t("renderer.duplicateTile")), 1)
1260
+ Ee(te(D(n).t("renderer.duplicateTile")), 1)
1261
1261
  ]),
1262
1262
  _: 1
1263
- }, 8, ["data-testid"])) : Y("", !0),
1264
- y.context.editable ? (C(), M(V, {
1263
+ }, 8, ["data-testid"])) : j("", !0),
1264
+ y.context.editable ? (C(), I(K, {
1265
1265
  key: 4,
1266
1266
  "data-testid": `remove-tile-${y.tileId}`,
1267
- onClick: Wt
1267
+ onClick: Vt
1268
1268
  }, {
1269
1269
  default: q(() => [
1270
- ae("span", as, te(k(n).t("renderer.delete")), 1)
1270
+ le("span", ls, te(D(n).t("renderer.delete")), 1)
1271
1271
  ]),
1272
1272
  _: 1
1273
- }, 8, ["data-testid"])) : Y("", !0)
1273
+ }, 8, ["data-testid"])) : j("", !0)
1274
1274
  ]),
1275
1275
  default: q(() => [
1276
- se(k(_i), {
1276
+ se(D(bi), {
1277
1277
  class: "kebab-action-menu",
1278
- color: k(yt),
1278
+ color: D(yt),
1279
1279
  "data-testid": `kebab-action-menu-${y.tileId}`,
1280
- size: k(vt)
1280
+ size: D(vt)
1281
1281
  }, null, 8, ["color", "data-testid", "size"])
1282
1282
  ]),
1283
1283
  _: 1
1284
- }, 8, ["data-testid"])) : Y("", !0)
1285
- ], 8, rs)) : "description" in y.definition.chart ? (C(), W("div", {
1284
+ }, 8, ["data-testid"])) : j("", !0)
1285
+ ], 8, ns)) : "description" in y.definition.chart ? (C(), W("div", {
1286
1286
  key: 1,
1287
1287
  class: "header-description",
1288
1288
  "data-testid": `tile-description-${y.tileId}`
1289
- }, te(y.definition.chart.description), 9, ls)) : Y("", !0),
1290
- l.value ? (C(), M(k(ci), {
1289
+ }, te(y.definition.chart.description), 9, hs)) : j("", !0),
1290
+ l.value ? (C(), I(D(fi), {
1291
1291
  key: 2,
1292
1292
  "chart-data": h.value,
1293
1293
  "data-testid": `csv-export-modal-${y.tileId}`,
1294
- filename: A.value,
1295
- onToggleModal: it
1296
- }, null, 8, ["chart-data", "data-testid", "filename"])) : Y("", !0)
1297
- ])) : Y("", !0),
1298
- ae("div", {
1294
+ filename: T.value,
1295
+ onToggleModal: tt
1296
+ }, null, 8, ["chart-data", "data-testid", "filename"])) : j("", !0)
1297
+ ])) : j("", !0),
1298
+ le("div", {
1299
1299
  class: "tile-content",
1300
1300
  "data-testid": `tile-content-${y.tileId}`
1301
1301
  }, [
1302
- D.value ? (C(), M(Rt(D.value.component), xt({ key: 0 }, D.value.rendererProps, ii(O.value), { onChartData: Vt }), null, 16)) : Y("", !0)
1303
- ], 8, hs)
1304
- ], 10, is);
1302
+ M.value ? (C(), I(Rt(M.value.component), xt({ key: 0 }, M.value.rendererProps, si(N.value), { onChartData: Kt }), null, 16)) : j("", !0)
1303
+ ], 8, ds)
1304
+ ], 10, ss);
1305
1305
  };
1306
1306
  }
1307
- }), us = /* @__PURE__ */ ce(ds, [["__scopeId", "data-v-9ff83fdc"]]), cs = (c, e) => {
1307
+ }), cs = /* @__PURE__ */ ce(us, [["__scopeId", "data-v-fd9caf10"]]), fs = (c, e) => {
1308
1308
  let t = 0;
1309
1309
  const i = /* @__PURE__ */ new Map();
1310
1310
  e.forEach((r) => {
@@ -1315,7 +1315,7 @@ const Wi = () => {
1315
1315
  for (let r = 0; r < t; r++)
1316
1316
  i.get(r) ? s.push("auto") : s.push(`${c}px`);
1317
1317
  return s;
1318
- }, fs = /* @__PURE__ */ j({
1318
+ }, gs = /* @__PURE__ */ X({
1319
1319
  __name: "GridLayout",
1320
1320
  props: {
1321
1321
  tileHeight: {
@@ -1329,8 +1329,8 @@ const Wi = () => {
1329
1329
  }
1330
1330
  },
1331
1331
  setup(c) {
1332
- Ye((n) => ({
1333
- "2a38e79e": k(Nt),
1332
+ Ke((n) => ({
1333
+ "2a38e79e": D(Nt),
1334
1334
  "4cc71de6": r.value
1335
1335
  }));
1336
1336
  const e = c, t = G(null), i = G(0), s = new ResizeObserver((n) => {
@@ -1338,12 +1338,12 @@ const Wi = () => {
1338
1338
  !Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
1339
1339
  });
1340
1340
  });
1341
- Qe(() => {
1341
+ Xe(() => {
1342
1342
  t.value && s.observe(t.value);
1343
- }), Ve(() => {
1343
+ }), We(() => {
1344
1344
  t.value && s.unobserve(t.value);
1345
1345
  });
1346
- const r = N(() => cs(e.tileHeight, e.tiles).join(" ")), o = N(() => e.tiles.map((n, h) => ({
1346
+ const r = S(() => fs(e.tileHeight, e.tiles).join(" ")), o = S(() => e.tiles.map((n, h) => ({
1347
1347
  key: `tile-${h}`,
1348
1348
  tile: n,
1349
1349
  style: {
@@ -1360,20 +1360,20 @@ const Wi = () => {
1360
1360
  }, [
1361
1361
  (C(!0), W(Tt, null, zt(o.value, (l) => (C(), W("div", {
1362
1362
  key: l.key,
1363
- class: je(["grid-cell", {
1363
+ class: Ye(["grid-cell", {
1364
1364
  "empty-cell": !l.tile
1365
1365
  }]),
1366
- style: lt(l.style)
1366
+ style: at(l.style)
1367
1367
  }, [
1368
1368
  Pe(n.$slots, "tile", {
1369
- style: lt(l.style),
1369
+ style: at(l.style),
1370
1370
  tile: l.tile
1371
1371
  }, void 0, !0)
1372
1372
  ], 6))), 128))
1373
1373
  ], 512));
1374
1374
  }
1375
- }), gs = /* @__PURE__ */ ce(fs, [["__scopeId", "data-v-354b7177"]]);
1376
- function ms(c, e, t, i, s) {
1375
+ }), ms = /* @__PURE__ */ ce(gs, [["__scopeId", "data-v-354b7177"]]);
1376
+ function ps(c, e, t, i, s) {
1377
1377
  const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(c, o));
1378
1378
  return r.prototype = e.prototype, r;
1379
1379
  }
@@ -2180,7 +2180,7 @@ class re {
2180
2180
  }
2181
2181
  }
2182
2182
  re._idSeq = 0;
2183
- const K = {
2183
+ const Y = {
2184
2184
  alwaysShowResizeHandle: "mobile",
2185
2185
  animate: !0,
2186
2186
  auto: !0,
@@ -2282,7 +2282,7 @@ class Be {
2282
2282
  }
2283
2283
  }
2284
2284
  Be.prefix = "ui-resizable-";
2285
- class et {
2285
+ class Je {
2286
2286
  constructor() {
2287
2287
  this._eventRegister = {};
2288
2288
  }
@@ -2310,7 +2310,7 @@ class et {
2310
2310
  return this._eventRegister[e](t);
2311
2311
  }
2312
2312
  }
2313
- class xe extends et {
2313
+ class xe extends Je {
2314
2314
  // have to be public else complains for HTMLElementExtendOpt ?
2315
2315
  constructor(e, t = {}) {
2316
2316
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -2460,8 +2460,8 @@ class xe extends et {
2460
2460
  }
2461
2461
  }
2462
2462
  xe._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2463
- const ps = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2464
- class Ce extends et {
2463
+ const ys = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2464
+ class Ce extends Je {
2465
2465
  constructor(e, t = {}) {
2466
2466
  var r;
2467
2467
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -2498,7 +2498,7 @@ class Ce extends et {
2498
2498
  /** @internal call when mouse goes down before a dragstart happens */
2499
2499
  _mouseDown(e) {
2500
2500
  if (!w.mouseHandled)
2501
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ps) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete w.dragElement, delete w.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), ie && (e.currentTarget.addEventListener("touchmove", Le), e.currentTarget.addEventListener("touchend", Ie)), e.preventDefault(), document.activeElement && document.activeElement.blur(), w.mouseHandled = !0), !0;
2501
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ys) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete w.dragElement, delete w.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), ie && (e.currentTarget.addEventListener("touchmove", Le), e.currentTarget.addEventListener("touchend", Ie)), e.preventDefault(), document.activeElement && document.activeElement.blur(), w.mouseHandled = !0), !0;
2502
2502
  }
2503
2503
  /** @internal method to call actual drag event */
2504
2504
  _callDrag(e) {
@@ -2611,7 +2611,7 @@ class Ce extends et {
2611
2611
  }
2612
2612
  }
2613
2613
  Ce.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2614
- class ys extends et {
2614
+ class vs extends Je {
2615
2615
  constructor(e, t = {}) {
2616
2616
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2617
2617
  }
@@ -2677,9 +2677,9 @@ class ys extends et {
2677
2677
  };
2678
2678
  }
2679
2679
  }
2680
- class tt {
2680
+ class et {
2681
2681
  static init(e) {
2682
- return e.ddElement || (e.ddElement = new tt(e)), e.ddElement;
2682
+ return e.ddElement || (e.ddElement = new et(e)), e.ddElement;
2683
2683
  }
2684
2684
  constructor(e) {
2685
2685
  this.el = e;
@@ -2703,13 +2703,13 @@ class tt {
2703
2703
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2704
2704
  }
2705
2705
  setupDroppable(e) {
2706
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new ys(this.el, e), this;
2706
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new vs(this.el, e), this;
2707
2707
  }
2708
2708
  cleanDroppable() {
2709
2709
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2710
2710
  }
2711
2711
  }
2712
- class vs {
2712
+ class _s {
2713
2713
  resizable(e, t, i, s) {
2714
2714
  return this._getDDElements(e, t).forEach((r) => {
2715
2715
  if (t === "disable" || t === "enable")
@@ -2788,7 +2788,7 @@ class vs {
2788
2788
  /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
2789
2789
  _getDDElements(e, t) {
2790
2790
  const i = e.gridstack || t !== "destroy" && t !== "disable", s = u.getElements(e);
2791
- return s.length ? s.map((o) => o.ddElement || (i ? tt.init(o) : null)).filter((o) => o) : [];
2791
+ return s.length ? s.map((o) => o.ddElement || (i ? et.init(o) : null)).filter((o) => o) : [];
2792
2792
  }
2793
2793
  }
2794
2794
  /*!
@@ -2798,7 +2798,7 @@ class vs {
2798
2798
  * Copyright (c) 2021-2024 Alain Dumesny
2799
2799
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
2800
2800
  */
2801
- const U = new vs();
2801
+ const U = new _s();
2802
2802
  class b {
2803
2803
  /**
2804
2804
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
@@ -2863,7 +2863,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2863
2863
  /** @internal create placeholder DIV as needed */
2864
2864
  get placeholder() {
2865
2865
  if (!this._placeholder) {
2866
- this._placeholder = u.createDiv([this.opts.placeholderClass, K.itemClass, this.opts.itemClass]);
2866
+ this._placeholder = u.createDiv([this.opts.placeholderClass, Y.itemClass, this.opts.itemClass]);
2867
2867
  const e = u.createDiv(["placeholder-content"], this._placeholder);
2868
2868
  this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
2869
2869
  }
@@ -2890,23 +2890,23 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2890
2890
  const o = t.columnOpts;
2891
2891
  o && (!o.columnWidth && !((f = o.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : o.columnMax = o.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((g, v) => (v.w || 0) - (g.w || 0));
2892
2892
  const n = {
2893
- ...u.cloneDeep(K),
2894
- column: u.toNumber(e.getAttribute("gs-column")) || K.column,
2895
- minRow: i || u.toNumber(e.getAttribute("gs-min-row")) || K.minRow,
2896
- maxRow: i || u.toNumber(e.getAttribute("gs-max-row")) || K.maxRow,
2897
- staticGrid: u.toBool(e.getAttribute("gs-static")) || K.staticGrid,
2893
+ ...u.cloneDeep(Y),
2894
+ column: u.toNumber(e.getAttribute("gs-column")) || Y.column,
2895
+ minRow: i || u.toNumber(e.getAttribute("gs-min-row")) || Y.minRow,
2896
+ maxRow: i || u.toNumber(e.getAttribute("gs-max-row")) || Y.maxRow,
2897
+ staticGrid: u.toBool(e.getAttribute("gs-static")) || Y.staticGrid,
2898
2898
  sizeToContent: u.toBool(e.getAttribute("gs-size-to-content")) || void 0,
2899
2899
  draggable: {
2900
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || K.draggable.handle
2900
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || Y.draggable.handle
2901
2901
  },
2902
2902
  removableOptions: {
2903
- accept: t.itemClass || K.removableOptions.accept,
2904
- decline: K.removableOptions.decline
2903
+ accept: t.itemClass || Y.removableOptions.accept,
2904
+ decline: Y.removableOptions.decline
2905
2905
  }
2906
2906
  };
2907
2907
  e.getAttribute("gs-animate") && (n.animate = u.toBool(e.getAttribute("gs-animate"))), t = u.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
2908
- const h = this.el.closest("." + K.itemClass), l = h == null ? void 0 : h.gridstackNode;
2909
- l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== K.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = ie), this._styleSheetClass = "gs-id-" + re._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2908
+ const h = this.el.closest("." + Y.itemClass), l = h == null ? void 0 : h.gridstackNode;
2909
+ l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Y.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = ie), this._styleSheetClass = "gs-id-" + re._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2910
2910
  const d = t.engineClass || b.engineClass || re;
2911
2911
  if (this.engine = new d({
2912
2912
  column: this.getColumn(),
@@ -2999,8 +2999,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2999
2999
  t.column === "auto" && (h = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
3000
3000
  let l = r.el.querySelector(".grid-stack-item-content"), d, a;
3001
3001
  if (s && (this._removeDD(r.el), a = { ...r, x: 0, y: 0 }, u.removeInternalForSave(a), delete a.subGridOpts, r.content && (a.content = r.content, delete r.content), b.addRemoveCB ? d = b.addRemoveCB(this.el, a, !0, !1) : (d = u.createDiv(["grid-stack-item"]), d.appendChild(l), l = u.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3002
- const p = h ? t.column : r.w, R = r.h + i.h, A = r.el.style;
3003
- A.transition = "none", this.update(r.el, { w: p, h: R }), setTimeout(() => A.transition = null);
3002
+ const p = h ? t.column : r.w, R = r.h + i.h, O = r.el.style;
3003
+ O.transition = "none", this.update(r.el, { w: p, h: R }), setTimeout(() => O.transition = null);
3004
3004
  }
3005
3005
  const f = r.subGrid = b.addGrid(l, t);
3006
3006
  return i != null && i._moving && (f._isTemp = !0), h && (f._autoColumn = !0), s && f.makeWidget(d, a), i && (i._moving ? window.setTimeout(() => u.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
@@ -3041,7 +3041,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3041
3041
  const r = u.cloneDeep(this.opts);
3042
3042
  r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto");
3043
3043
  const o = r._alwaysShowResizeHandle;
3044
- return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, u.removeInternalAndSame(r, K), r.children = s, r;
3044
+ return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, u.removeInternalAndSame(r, Y), r.children = s, r;
3045
3045
  }
3046
3046
  return s;
3047
3047
  }
@@ -3592,7 +3592,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3592
3592
  }
3593
3593
  /** @internal */
3594
3594
  _prepareElement(e, t = !1, i) {
3595
- i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(K.itemClass, this.opts.itemClass);
3595
+ i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(Y.itemClass, this.opts.itemClass);
3596
3596
  const s = u.shouldSizeToContent(i);
3597
3597
  return s ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), s && this.resizeToContentCheck(!1, i), u.lazyLoad(i) || this.prepareDragDrop(i.el), this;
3598
3598
  }
@@ -3978,13 +3978,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3978
3978
  return;
3979
3979
  const p = i.position.top - s._prevYPix;
3980
3980
  s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && u.updateScrollPosition(e, i.position, p);
3981
- const R = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : l), A = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
3982
- n.x = Math.round(R / r), n.y = Math.round(A / o);
3981
+ const R = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : l), O = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
3982
+ n.x = Math.round(R / r), n.y = Math.round(O / o);
3983
3983
  const T = this._extraDragRow;
3984
3984
  if (this.engine.collide(s, n)) {
3985
- const H = this.getRow();
3986
- let E = Math.max(0, n.y + s.h - H);
3987
- this.opts.maxRow && H + E > this.opts.maxRow && (E = Math.max(0, this.opts.maxRow - H)), this._extraDragRow = E;
3985
+ const P = this.getRow();
3986
+ let E = Math.max(0, n.y + s.h - P);
3987
+ this.opts.maxRow && P + E > this.opts.maxRow && (E = Math.max(0, this.opts.maxRow - P)), this._extraDragRow = E;
3988
3988
  } else
3989
3989
  this._extraDragRow = 0;
3990
3990
  if (this._extraDragRow !== T && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
@@ -4023,7 +4023,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4023
4023
  }
4024
4024
  // legacy method removed
4025
4025
  commit() {
4026
- return ms(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4026
+ return ps(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4027
4027
  }
4028
4028
  }
4029
4029
  b.renderCB = (c, e) => {
@@ -4033,7 +4033,7 @@ b.resizeToContentParent = ".grid-stack-item-content";
4033
4033
  b.Utils = u;
4034
4034
  b.Engine = re;
4035
4035
  b.GDRev = "11.5.1";
4036
- const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { class: "grid-stack-item-content" }, ws = /* @__PURE__ */ j({
4036
+ const bs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ws = { class: "grid-stack-item-content" }, Es = /* @__PURE__ */ X({
4037
4037
  __name: "DraggableGridLayout",
4038
4038
  props: {
4039
4039
  tiles: {},
@@ -4064,7 +4064,7 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4064
4064
  o.value.delete(`${(p = v.el) == null ? void 0 : p.getAttribute("data-id")}`);
4065
4065
  }), s("update-tiles", Array.from(o.value.values()));
4066
4066
  };
4067
- Qe(() => {
4067
+ Xe(() => {
4068
4068
  r.value && (n = b.init({
4069
4069
  margin: 10,
4070
4070
  column: Nt,
@@ -4072,7 +4072,7 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4072
4072
  resizable: { handles: "se, sw" },
4073
4073
  handle: ".tile-header"
4074
4074
  }, r.value), n.on("change", d), n.on("added", d), n.on("removed", a));
4075
- }), Ve(() => {
4075
+ }), We(() => {
4076
4076
  n && n.destroy(!1);
4077
4077
  });
4078
4078
  const f = (m) => {
@@ -4081,7 +4081,7 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4081
4081
  g && n.removeWidget(g);
4082
4082
  }
4083
4083
  };
4084
- return Ke(() => i.tiles.length, async (m, g) => {
4084
+ return Ve(() => i.tiles.length, async (m, g) => {
4085
4085
  if (m > g && n) {
4086
4086
  const v = i.tiles.slice(g);
4087
4087
  for (const p of v)
@@ -4111,46 +4111,46 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4111
4111
  "gs-x": v.layout.position.col,
4112
4112
  "gs-y": v.layout.position.row
4113
4113
  }, [
4114
- ae("div", bs, [
4114
+ le("div", ws, [
4115
4115
  Pe(m.$slots, "tile", { tile: v }, void 0, !0)
4116
4116
  ])
4117
- ], 8, _s))), 128))
4117
+ ], 8, bs))), 128))
4118
4118
  ], 512));
4119
4119
  }
4120
- }), Es = /* @__PURE__ */ ce(ws, [["__scopeId", "data-v-a68d6821"]]), xs = { class: "kong-ui-public-dashboard-renderer" }, Cs = {
4120
+ }), xs = /* @__PURE__ */ ce(Es, [["__scopeId", "data-v-a68d6821"]]), Cs = { class: "kong-ui-public-dashboard-renderer" }, Rs = {
4121
4121
  key: 0,
4122
4122
  class: "tile-container slottable-tile"
4123
- }, Rs = /* @__PURE__ */ j({
4123
+ }, Ts = /* @__PURE__ */ X({
4124
4124
  __name: "DashboardRenderer",
4125
- props: /* @__PURE__ */ ht({
4125
+ props: /* @__PURE__ */ lt({
4126
4126
  context: {}
4127
4127
  }, {
4128
4128
  modelValue: { required: !0 },
4129
4129
  modelModifiers: {}
4130
4130
  }),
4131
- emits: /* @__PURE__ */ ht(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4131
+ emits: /* @__PURE__ */ lt(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4132
4132
  setup(c, { expose: e, emit: t }) {
4133
- const i = c, s = t, r = si(c, "modelValue"), { i18n: o } = ve.useI18n(), n = G(0), h = G(null), l = _e(ue);
4133
+ const i = c, s = t, r = ri(c, "modelValue"), { i18n: o } = ve.useI18n(), n = G(0), h = G(null), l = _e(ue);
4134
4134
  l || (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/dashboard-renderer/README.md#requirements")), ve.useRequestQueue();
4135
- const d = kt(), a = N(() => i.context.timeSpec ? i.context.timeSpec : {
4135
+ const d = kt(), a = S(() => i.context.timeSpec ? i.context.timeSpec : {
4136
4136
  type: "relative",
4137
4137
  time_range: d.defaultQueryTimeForOrg
4138
- }), f = N(() => !!i.context.timeSpec || !d.loading), m = (x, O) => {
4139
- const D = x.layout.position.row - O.layout.position.row;
4140
- return D !== 0 ? D : x.layout.position.col - O.layout.position.col;
4141
- }, g = N(() => r.value.tiles.map((x) => {
4142
- var D;
4143
- let O = x.definition;
4144
- if ("description" in O.chart) {
4145
- const P = (D = O.chart.description) == null ? void 0 : D.replace(Hi, () => {
4146
- const de = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
4147
- return o.te(de) ? o.t(de) : "";
4138
+ }), f = S(() => !!i.context.timeSpec || !d.loading), m = (x, A) => {
4139
+ const N = x.layout.position.row - A.layout.position.row;
4140
+ return N !== 0 ? N : x.layout.position.col - A.layout.position.col;
4141
+ }, g = S(() => r.value.tiles.map((x) => {
4142
+ var N;
4143
+ let A = x.definition;
4144
+ if ("description" in A.chart) {
4145
+ const M = (N = A.chart.description) == null ? void 0 : N.replace(Li, () => {
4146
+ const oe = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
4147
+ return o.te(oe) ? o.t(oe) : "";
4148
4148
  });
4149
- O = {
4150
- ...O,
4149
+ A = {
4150
+ ...A,
4151
4151
  chart: {
4152
- ...O.chart,
4153
- description: P
4152
+ ...A.chart,
4153
+ description: M
4154
4154
  }
4155
4155
  };
4156
4156
  }
@@ -4160,37 +4160,37 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4160
4160
  x
4161
4161
  ), {
4162
4162
  layout: x.layout,
4163
- meta: O,
4163
+ meta: A,
4164
4164
  type: x.type,
4165
4165
  // Add a unique key to each tile internally.
4166
4166
  id: x.id ?? crypto.randomUUID()
4167
4167
  };
4168
- })), v = N(() => {
4169
- var de, be, ke;
4170
- let { tz: x, refreshInterval: O, editable: D } = i.context;
4171
- const P = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
4172
- x || (x = new Intl.DateTimeFormat().resolvedOptions().timeZone), O === void 0 && (O = Li), D === void 0 && (D = !1);
4173
- const ee = !!((ke = (be = (de = ri()) == null ? void 0 : de.vnode) == null ? void 0 : be.props) != null && ke.onTileTimeRangeZoom);
4168
+ })), v = S(() => {
4169
+ var oe, ke, be;
4170
+ let { tz: x, refreshInterval: A, editable: N } = i.context;
4171
+ const M = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
4172
+ x || (x = new Intl.DateTimeFormat().resolvedOptions().timeZone), A === void 0 && (A = Ii), N === void 0 && (N = !1);
4173
+ const V = !!((be = (ke = (oe = ni()) == null ? void 0 : oe.vnode) == null ? void 0 : ke.props) != null && be.onTileTimeRangeZoom);
4174
4174
  return {
4175
- filters: P,
4175
+ filters: M,
4176
4176
  tz: x,
4177
4177
  timeSpec: a.value,
4178
- refreshInterval: O,
4179
- editable: D,
4180
- zoomable: ee
4178
+ refreshInterval: A,
4179
+ editable: N,
4180
+ zoomable: V
4181
4181
  };
4182
4182
  }), p = (x) => {
4183
4183
  s("edit-tile", x);
4184
- }, R = (x) => x.type === "slottable", A = (x) => {
4185
- const O = R(x.meta.chart) ? { ...x.meta.chart } : {
4184
+ }, R = (x) => x.type === "slottable", O = (x) => {
4185
+ const A = R(x.meta.chart) ? { ...x.meta.chart } : {
4186
4186
  ...x.meta.chart,
4187
4187
  chart_title: x.meta.chart.chart_title ? `Copy of ${x.meta.chart.chart_title}` : ""
4188
- }, D = {
4188
+ }, N = {
4189
4189
  id: crypto.randomUUID(),
4190
4190
  type: "chart",
4191
4191
  definition: {
4192
4192
  ...x.meta,
4193
- chart: O
4193
+ chart: A
4194
4194
  },
4195
4195
  layout: {
4196
4196
  position: {
@@ -4200,24 +4200,24 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4200
4200
  size: x.layout.size
4201
4201
  }
4202
4202
  };
4203
- r.value.tiles.push(D);
4203
+ r.value.tiles.push(N);
4204
4204
  }, T = (x) => {
4205
4205
  h.value && h.value.removeWidget(x.id);
4206
- }, H = () => {
4206
+ }, P = () => {
4207
4207
  n.value++;
4208
4208
  }, E = (x) => {
4209
- const O = x.map((D) => ({
4210
- id: D.id,
4211
- type: D.type,
4212
- layout: D.layout,
4213
- definition: D.meta
4209
+ const A = x.map((N) => ({
4210
+ id: N.id,
4211
+ type: N.type,
4212
+ layout: N.layout,
4213
+ definition: N.meta
4214
4214
  }));
4215
- r.value.tiles = O.sort(m);
4215
+ r.value.tiles = A.sort(m);
4216
4216
  };
4217
- return e({ refresh: H }), (x, O) => {
4218
- const D = he("KAlert");
4219
- return C(), W("div", xs, [
4220
- k(l) ? (C(), M(Rt(x.context.editable ? Es : gs), {
4217
+ return e({ refresh: P }), (x, A) => {
4218
+ const N = de("KAlert");
4219
+ return C(), W("div", Cs, [
4220
+ D(l) ? (C(), I(Rt(x.context.editable ? xs : ms), {
4221
4221
  key: 1,
4222
4222
  ref_key: "gridLayoutRef",
4223
4223
  ref: h,
@@ -4225,46 +4225,46 @@ const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { cl
4225
4225
  tiles: g.value,
4226
4226
  onUpdateTiles: E
4227
4227
  }, {
4228
- tile: q(({ tile: P }) => [
4229
- P.meta.chart.type === "slottable" ? (C(), W("div", Cs, [
4230
- Pe(x.$slots, P.meta.chart.id, {}, void 0, !0)
4231
- ])) : (C(), M(us, {
4228
+ tile: q(({ tile: M }) => [
4229
+ M.meta.chart.type === "slottable" ? (C(), W("div", Rs, [
4230
+ Pe(x.$slots, M.meta.chart.id, {}, void 0, !0)
4231
+ ])) : (C(), I(cs, {
4232
4232
  key: 1,
4233
4233
  class: "tile-container",
4234
4234
  context: v.value,
4235
- definition: P.meta,
4236
- height: P.layout.size.rows * (r.value.tile_height || k($e)) + parseInt(k($t), 10),
4235
+ definition: M.meta,
4236
+ height: M.layout.size.rows * (r.value.tile_height || D($e)) + parseInt(D($t), 10),
4237
4237
  "query-ready": f.value,
4238
4238
  "refresh-counter": n.value,
4239
- "tile-id": P.id,
4240
- onDuplicateTile: (ee) => A(P),
4241
- onEditTile: (ee) => p(P),
4242
- onRemoveTile: (ee) => T(P),
4243
- onTileTimeRangeZoom: O[0] || (O[0] = (ee) => s("tile-time-range-zoom", ee))
4239
+ "tile-id": M.id,
4240
+ onDuplicateTile: (V) => O(M),
4241
+ onEditTile: (V) => p(M),
4242
+ onRemoveTile: (V) => T(M),
4243
+ onTileTimeRangeZoom: A[0] || (A[0] = (V) => s("tile-time-range-zoom", V))
4244
4244
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
4245
4245
  ]),
4246
4246
  _: 3
4247
- }, 40, ["tile-height", "tiles"])) : (C(), M(D, {
4247
+ }, 40, ["tile-height", "tiles"])) : (C(), I(N, {
4248
4248
  key: 0,
4249
4249
  appearance: "danger"
4250
4250
  }, {
4251
4251
  default: q(() => [
4252
- Ee(te(k(o).t("renderer.noQueryBridge")), 1)
4252
+ Ee(te(D(o).t("renderer.noQueryBridge")), 1)
4253
4253
  ]),
4254
4254
  _: 1
4255
4255
  }))
4256
4256
  ]);
4257
4257
  };
4258
4258
  }
4259
- }), Is = /* @__PURE__ */ ce(Rs, [["__scopeId", "data-v-c16badc2"]]);
4259
+ }), Ms = /* @__PURE__ */ ce(Ts, [["__scopeId", "data-v-c16badc2"]]);
4260
4260
  export {
4261
- Ai as CP_ID_TOKEN,
4261
+ Hi as CP_ID_TOKEN,
4262
4262
  Nt as DASHBOARD_COLS,
4263
4263
  $e as DEFAULT_TILE_HEIGHT,
4264
- Li as DEFAULT_TILE_REFRESH_INTERVAL_MS,
4265
- Is as DashboardRenderer,
4264
+ Ii as DEFAULT_TILE_REFRESH_INTERVAL_MS,
4265
+ Ms as DashboardRenderer,
4266
4266
  ut as ENTITY_ID_TOKEN,
4267
- gs as GridLayout,
4267
+ ms as GridLayout,
4268
4268
  ue as INJECT_QUERY_PROVIDER,
4269
- Hi as TIMEFRAME_TOKEN
4269
+ Li as TIMEFRAME_TOKEN
4270
4270
  };