@kong-ui-public/dashboard-renderer 8.26.4 → 8.26.5
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,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as _e, computed as x, openBlock as O, createElementBlock as ne, renderSlot as Ze, createTextVNode as Ve, toDisplayString as se, createVNode as me, withCtx as
|
|
2
|
-
import { isPlatformDatasource as Vt, msToGranularity as
|
|
3
|
-
import { InfoIcon as qs, VisibilityOffIcon as rs, WarningOutlineIcon as os, WarningIcon as di, ProgressIcon as
|
|
4
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as _e, computed as x, openBlock as O, createElementBlock as ne, renderSlot as Ze, createTextVNode as Ve, toDisplayString as se, createVNode as me, withCtx as U, inject as Pe, provide as Ts, toRaw as Ss, isRef as Ds, isReactive as Os, toRef as at, hasInjectionContext as oi, ref as Z, onMounted as Dt, watch as Ge, onUnmounted as st, getCurrentInstance as zs, readonly as $t, resolveComponent as ve, withKeys as Ms, unref as S, createElementVNode as he, createCommentVNode as fe, createBlock as W, watchEffect as Zi, createSlots as ht, normalizeStyle as wt, normalizeClass as it, mergeProps as Ji, normalizeProps as Ns, guardReactiveProps as As, defineAsyncComponent as es, Fragment as Kt, useCssVars as Xt, useModel as ts, nextTick as Qt, resolveDynamicComponent as is, toHandlers as Is, mergeModels as bt, renderList as ss, useTemplateRef as ai } from "vue";
|
|
2
|
+
import { isPlatformDatasource as Vt, msToGranularity as Ut, TimePeriods as Zt, TIMEFRAME_LOOKUP as Jt, requestFilterTypeEmptyV2 as Ls, restoreAfterCapture as li, prepareForCapture as Ps, formatTimestamp as ui, EXPORT_RECORD_LIMIT as ns, formatTime as ci } from "@kong-ui-public/analytics-utilities";
|
|
3
|
+
import { InfoIcon as qs, VisibilityOffIcon as rs, WarningOutlineIcon as os, WarningIcon as di, ProgressIcon as Hs, RefreshIcon as Fs, EditIcon as $s, MoreIcon as Us } from "@kong/icons";
|
|
4
|
+
import { createI18n as Bs, i18nTComponent as Ws } from "@kong-ui-public/i18n";
|
|
5
5
|
import { useAnalyticsConfigStore as ei, useDatasourceConfigStore as ft } from "@kong-ui-public/analytics-config-store";
|
|
6
|
-
import { handleQueryError as as, SimpleChart as
|
|
6
|
+
import { handleQueryError as as, SimpleChart as Gs, AnalyticsChart as Bt, TopNTable as Ys } from "@kong-ui-public/analytics-chart";
|
|
7
7
|
import ls from "swrv";
|
|
8
8
|
import "axios";
|
|
9
|
-
import { MetricsProvider as
|
|
10
|
-
import { TableDataGrid as
|
|
11
|
-
import { KSegmentedControl as
|
|
12
|
-
const
|
|
9
|
+
import { MetricsProvider as js, MetricsConsumer as Ks } from "@kong-ui-public/analytics-metric-provider";
|
|
10
|
+
import { TableDataGrid as Xs } from "@kong-ui-public/table-data-grid";
|
|
11
|
+
import { KSegmentedControl as Qs } from "@kong/kongponents";
|
|
12
|
+
const Vs = {
|
|
13
13
|
lessThanXSeconds: {
|
|
14
14
|
one: "less than a second",
|
|
15
15
|
other: "less than {{count}} seconds"
|
|
@@ -71,53 +71,53 @@ const Qs = {
|
|
|
71
71
|
one: "almost 1 year",
|
|
72
72
|
other: "almost {{count}} years"
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, Zs = (s, e, t) => {
|
|
75
75
|
let i;
|
|
76
|
-
const n =
|
|
76
|
+
const n = Vs[s];
|
|
77
77
|
return typeof n == "string" ? i = n : e === 1 ? i = n.one : i = n.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + i : i + " ago" : i;
|
|
78
78
|
};
|
|
79
|
-
function
|
|
79
|
+
function At(s) {
|
|
80
80
|
return (e = {}) => {
|
|
81
81
|
const t = e.width ? String(e.width) : s.defaultWidth;
|
|
82
82
|
return s.formats[t] || s.formats[s.defaultWidth];
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const Js = {
|
|
86
86
|
full: "EEEE, MMMM do, y",
|
|
87
87
|
long: "MMMM do, y",
|
|
88
88
|
medium: "MMM d, y",
|
|
89
89
|
short: "MM/dd/yyyy"
|
|
90
|
-
},
|
|
90
|
+
}, en = {
|
|
91
91
|
full: "h:mm:ss a zzzz",
|
|
92
92
|
long: "h:mm:ss a z",
|
|
93
93
|
medium: "h:mm:ss a",
|
|
94
94
|
short: "h:mm a"
|
|
95
|
-
},
|
|
95
|
+
}, tn = {
|
|
96
96
|
full: "{{date}} 'at' {{time}}",
|
|
97
97
|
long: "{{date}} 'at' {{time}}",
|
|
98
98
|
medium: "{{date}}, {{time}}",
|
|
99
99
|
short: "{{date}}, {{time}}"
|
|
100
|
-
},
|
|
101
|
-
date:
|
|
102
|
-
formats: Zs,
|
|
103
|
-
defaultWidth: "full"
|
|
104
|
-
}),
|
|
105
|
-
time: Lt({
|
|
100
|
+
}, sn = {
|
|
101
|
+
date: At({
|
|
106
102
|
formats: Js,
|
|
107
103
|
defaultWidth: "full"
|
|
108
104
|
}),
|
|
109
|
-
|
|
105
|
+
time: At({
|
|
110
106
|
formats: en,
|
|
111
107
|
defaultWidth: "full"
|
|
108
|
+
}),
|
|
109
|
+
dateTime: At({
|
|
110
|
+
formats: tn,
|
|
111
|
+
defaultWidth: "full"
|
|
112
112
|
})
|
|
113
|
-
},
|
|
113
|
+
}, nn = {
|
|
114
114
|
lastWeek: "'last' eeee 'at' p",
|
|
115
115
|
yesterday: "'yesterday at' p",
|
|
116
116
|
today: "'today at' p",
|
|
117
117
|
tomorrow: "'tomorrow at' p",
|
|
118
118
|
nextWeek: "eeee 'at' p",
|
|
119
119
|
other: "P"
|
|
120
|
-
},
|
|
120
|
+
}, rn = (s, e, t, i) => nn[s];
|
|
121
121
|
function rt(s) {
|
|
122
122
|
return (e, t) => {
|
|
123
123
|
const i = t?.context ? String(t.context) : "standalone";
|
|
@@ -133,15 +133,15 @@ function rt(s) {
|
|
|
133
133
|
return n[r];
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const on = {
|
|
137
137
|
narrow: ["B", "A"],
|
|
138
138
|
abbreviated: ["BC", "AD"],
|
|
139
139
|
wide: ["Before Christ", "Anno Domini"]
|
|
140
|
-
},
|
|
140
|
+
}, an = {
|
|
141
141
|
narrow: ["1", "2", "3", "4"],
|
|
142
142
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
143
143
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
144
|
-
},
|
|
144
|
+
}, ln = {
|
|
145
145
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
146
146
|
abbreviated: [
|
|
147
147
|
"Jan",
|
|
@@ -171,7 +171,7 @@ const rn = {
|
|
|
171
171
|
"November",
|
|
172
172
|
"December"
|
|
173
173
|
]
|
|
174
|
-
},
|
|
174
|
+
}, un = {
|
|
175
175
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
176
176
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
177
177
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -184,7 +184,7 @@ const rn = {
|
|
|
184
184
|
"Friday",
|
|
185
185
|
"Saturday"
|
|
186
186
|
]
|
|
187
|
-
},
|
|
187
|
+
}, cn = {
|
|
188
188
|
narrow: {
|
|
189
189
|
am: "a",
|
|
190
190
|
pm: "p",
|
|
@@ -215,7 +215,7 @@ const rn = {
|
|
|
215
215
|
evening: "evening",
|
|
216
216
|
night: "night"
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, dn = {
|
|
219
219
|
narrow: {
|
|
220
220
|
am: "a",
|
|
221
221
|
pm: "p",
|
|
@@ -246,7 +246,7 @@ const rn = {
|
|
|
246
246
|
evening: "in the evening",
|
|
247
247
|
night: "at night"
|
|
248
248
|
}
|
|
249
|
-
},
|
|
249
|
+
}, hn = (s, e) => {
|
|
250
250
|
const t = Number(s), i = t % 100;
|
|
251
251
|
if (i > 20 || i < 10)
|
|
252
252
|
switch (i % 10) {
|
|
@@ -258,29 +258,29 @@ const rn = {
|
|
|
258
258
|
return t + "rd";
|
|
259
259
|
}
|
|
260
260
|
return t + "th";
|
|
261
|
-
},
|
|
262
|
-
ordinalNumber:
|
|
261
|
+
}, fn = {
|
|
262
|
+
ordinalNumber: hn,
|
|
263
263
|
era: rt({
|
|
264
|
-
values:
|
|
264
|
+
values: on,
|
|
265
265
|
defaultWidth: "wide"
|
|
266
266
|
}),
|
|
267
267
|
quarter: rt({
|
|
268
|
-
values:
|
|
268
|
+
values: an,
|
|
269
269
|
defaultWidth: "wide",
|
|
270
270
|
argumentCallback: (s) => s - 1
|
|
271
271
|
}),
|
|
272
272
|
month: rt({
|
|
273
|
-
values:
|
|
273
|
+
values: ln,
|
|
274
274
|
defaultWidth: "wide"
|
|
275
275
|
}),
|
|
276
276
|
day: rt({
|
|
277
|
-
values:
|
|
277
|
+
values: un,
|
|
278
278
|
defaultWidth: "wide"
|
|
279
279
|
}),
|
|
280
280
|
dayPeriod: rt({
|
|
281
|
-
values:
|
|
281
|
+
values: cn,
|
|
282
282
|
defaultWidth: "wide",
|
|
283
|
-
formattingValues:
|
|
283
|
+
formattingValues: dn,
|
|
284
284
|
defaultFormattingWidth: "wide"
|
|
285
285
|
})
|
|
286
286
|
};
|
|
@@ -289,9 +289,9 @@ function ot(s) {
|
|
|
289
289
|
const i = t.width, n = i && s.matchPatterns[i] || s.matchPatterns[s.defaultMatchWidth], r = e.match(n);
|
|
290
290
|
if (!r)
|
|
291
291
|
return null;
|
|
292
|
-
const o = r[0], a = i && s.parsePatterns[i] || s.parsePatterns[s.defaultParseWidth], c = Array.isArray(a) ?
|
|
292
|
+
const o = r[0], a = i && s.parsePatterns[i] || s.parsePatterns[s.defaultParseWidth], c = Array.isArray(a) ? pn(a, (d) => d.test(o)) : (
|
|
293
293
|
// [TODO] -- I challenge you to fix the type
|
|
294
|
-
|
|
294
|
+
mn(a, (d) => d.test(o))
|
|
295
295
|
);
|
|
296
296
|
let l;
|
|
297
297
|
l = s.valueCallback ? s.valueCallback(c) : c, l = t.valueCallback ? (
|
|
@@ -302,17 +302,17 @@ function ot(s) {
|
|
|
302
302
|
return { value: l, rest: u };
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function mn(s, e) {
|
|
306
306
|
for (const t in s)
|
|
307
307
|
if (Object.prototype.hasOwnProperty.call(s, t) && e(s[t]))
|
|
308
308
|
return t;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function pn(s, e) {
|
|
311
311
|
for (let t = 0; t < s.length; t++)
|
|
312
312
|
if (e(s[t]))
|
|
313
313
|
return t;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function gn(s) {
|
|
316
316
|
return (e, t = {}) => {
|
|
317
317
|
const i = e.match(s.matchPattern);
|
|
318
318
|
if (!i) return null;
|
|
@@ -324,23 +324,23 @@ function pn(s) {
|
|
|
324
324
|
return { value: o, rest: a };
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const yn = /^(\d+)(th|st|nd|rd)?/i, vn = /\d+/i, _n = {
|
|
328
328
|
narrow: /^(b|a)/i,
|
|
329
329
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
330
330
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
331
|
-
},
|
|
331
|
+
}, wn = {
|
|
332
332
|
any: [/^b/i, /^(a|c)/i]
|
|
333
333
|
}, bn = {
|
|
334
334
|
narrow: /^[1234]/i,
|
|
335
335
|
abbreviated: /^q[1234]/i,
|
|
336
336
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
337
|
-
}, wn = {
|
|
338
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
339
337
|
}, xn = {
|
|
338
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
339
|
+
}, En = {
|
|
340
340
|
narrow: /^[jfmasond]/i,
|
|
341
341
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
342
342
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
343
|
-
},
|
|
343
|
+
}, Cn = {
|
|
344
344
|
narrow: [
|
|
345
345
|
/^j/i,
|
|
346
346
|
/^f/i,
|
|
@@ -369,18 +369,18 @@ const gn = /^(\d+)(th|st|nd|rd)?/i, yn = /\d+/i, vn = {
|
|
|
369
369
|
/^n/i,
|
|
370
370
|
/^d/i
|
|
371
371
|
]
|
|
372
|
-
},
|
|
372
|
+
}, kn = {
|
|
373
373
|
narrow: /^[smtwf]/i,
|
|
374
374
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
375
375
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
376
376
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
377
|
-
},
|
|
377
|
+
}, Rn = {
|
|
378
378
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
379
379
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
380
|
-
},
|
|
380
|
+
}, Tn = {
|
|
381
381
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
382
382
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
383
|
-
},
|
|
383
|
+
}, Sn = {
|
|
384
384
|
any: {
|
|
385
385
|
am: /^a/i,
|
|
386
386
|
pm: /^p/i,
|
|
@@ -391,60 +391,60 @@ const gn = /^(\d+)(th|st|nd|rd)?/i, yn = /\d+/i, vn = {
|
|
|
391
391
|
evening: /evening/i,
|
|
392
392
|
night: /night/i
|
|
393
393
|
}
|
|
394
|
-
},
|
|
395
|
-
ordinalNumber:
|
|
396
|
-
matchPattern:
|
|
397
|
-
parsePattern:
|
|
394
|
+
}, Dn = {
|
|
395
|
+
ordinalNumber: gn({
|
|
396
|
+
matchPattern: yn,
|
|
397
|
+
parsePattern: vn,
|
|
398
398
|
valueCallback: (s) => parseInt(s, 10)
|
|
399
399
|
}),
|
|
400
400
|
era: ot({
|
|
401
|
-
matchPatterns:
|
|
401
|
+
matchPatterns: _n,
|
|
402
402
|
defaultMatchWidth: "wide",
|
|
403
|
-
parsePatterns:
|
|
403
|
+
parsePatterns: wn,
|
|
404
404
|
defaultParseWidth: "any"
|
|
405
405
|
}),
|
|
406
406
|
quarter: ot({
|
|
407
407
|
matchPatterns: bn,
|
|
408
408
|
defaultMatchWidth: "wide",
|
|
409
|
-
parsePatterns:
|
|
409
|
+
parsePatterns: xn,
|
|
410
410
|
defaultParseWidth: "any",
|
|
411
411
|
valueCallback: (s) => s + 1
|
|
412
412
|
}),
|
|
413
413
|
month: ot({
|
|
414
|
-
matchPatterns:
|
|
414
|
+
matchPatterns: En,
|
|
415
415
|
defaultMatchWidth: "wide",
|
|
416
|
-
parsePatterns:
|
|
416
|
+
parsePatterns: Cn,
|
|
417
417
|
defaultParseWidth: "any"
|
|
418
418
|
}),
|
|
419
419
|
day: ot({
|
|
420
|
-
matchPatterns:
|
|
420
|
+
matchPatterns: kn,
|
|
421
421
|
defaultMatchWidth: "wide",
|
|
422
|
-
parsePatterns:
|
|
422
|
+
parsePatterns: Rn,
|
|
423
423
|
defaultParseWidth: "any"
|
|
424
424
|
}),
|
|
425
425
|
dayPeriod: ot({
|
|
426
|
-
matchPatterns:
|
|
426
|
+
matchPatterns: Tn,
|
|
427
427
|
defaultMatchWidth: "any",
|
|
428
|
-
parsePatterns:
|
|
428
|
+
parsePatterns: Sn,
|
|
429
429
|
defaultParseWidth: "any"
|
|
430
430
|
})
|
|
431
|
-
},
|
|
431
|
+
}, On = {
|
|
432
432
|
code: "en-US",
|
|
433
|
-
formatDistance:
|
|
434
|
-
formatLong:
|
|
435
|
-
formatRelative:
|
|
436
|
-
localize:
|
|
437
|
-
match:
|
|
433
|
+
formatDistance: Zs,
|
|
434
|
+
formatLong: sn,
|
|
435
|
+
formatRelative: rn,
|
|
436
|
+
localize: fn,
|
|
437
|
+
match: Dn,
|
|
438
438
|
options: {
|
|
439
439
|
weekStartsOn: 0,
|
|
440
440
|
firstWeekContainsDate: 1
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
let
|
|
443
|
+
let zn = {};
|
|
444
444
|
function mt() {
|
|
445
|
-
return
|
|
445
|
+
return zn;
|
|
446
446
|
}
|
|
447
|
-
const us = 6048e5,
|
|
447
|
+
const us = 6048e5, Mn = 864e5, hi = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
448
448
|
function Ye(s, e) {
|
|
449
449
|
return typeof s == "function" ? s(e) : s && typeof s == "object" && hi in s ? s[hi](e) : s instanceof Date ? new s.constructor(e) : new Date(e);
|
|
450
450
|
}
|
|
@@ -465,7 +465,7 @@ function fi(s) {
|
|
|
465
465
|
);
|
|
466
466
|
return t.setUTCFullYear(e.getFullYear()), +s - +t;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Nn(s, ...e) {
|
|
469
469
|
const t = Ye.bind(
|
|
470
470
|
null,
|
|
471
471
|
e.find((i) => typeof i == "object")
|
|
@@ -476,21 +476,21 @@ function mi(s, e) {
|
|
|
476
476
|
const t = Ne(s, e?.in);
|
|
477
477
|
return t.setHours(0, 0, 0, 0), t;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
const [i, n] =
|
|
479
|
+
function An(s, e, t) {
|
|
480
|
+
const [i, n] = Nn(
|
|
481
481
|
t?.in,
|
|
482
482
|
s,
|
|
483
483
|
e
|
|
484
484
|
), r = mi(i), o = mi(n), a = +r - fi(r), c = +o - fi(o);
|
|
485
|
-
return Math.round((a - c) /
|
|
485
|
+
return Math.round((a - c) / Mn);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function In(s, e) {
|
|
488
488
|
const t = Ne(s, e?.in);
|
|
489
489
|
return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Ln(s, e) {
|
|
492
492
|
const t = Ne(s, e?.in);
|
|
493
|
-
return
|
|
493
|
+
return An(t, In(t)) + 1;
|
|
494
494
|
}
|
|
495
495
|
function lt(s, e) {
|
|
496
496
|
const t = mt(), i = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, n = Ne(s, e?.in), r = n.getDay(), o = (r < i ? 7 : 0) + r - i;
|
|
@@ -507,12 +507,12 @@ function cs(s, e) {
|
|
|
507
507
|
const a = xt(o);
|
|
508
508
|
return t.getTime() >= r.getTime() ? i + 1 : t.getTime() >= a.getTime() ? i : i - 1;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Pn(s, e) {
|
|
511
511
|
const t = cs(s, e), i = Ye(s, 0);
|
|
512
512
|
return i.setFullYear(t, 0, 4), i.setHours(0, 0, 0, 0), xt(i);
|
|
513
513
|
}
|
|
514
514
|
function qn(s, e) {
|
|
515
|
-
const t = Ne(s, e?.in), i = +xt(t) - +
|
|
515
|
+
const t = Ne(s, e?.in), i = +xt(t) - +Pn(t);
|
|
516
516
|
return Math.round(i / us) + 1;
|
|
517
517
|
}
|
|
518
518
|
function ds(s, e) {
|
|
@@ -523,12 +523,12 @@ function ds(s, e) {
|
|
|
523
523
|
const l = lt(c, e);
|
|
524
524
|
return +t >= +a ? i + 1 : +t >= +l ? i : i - 1;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Hn(s, e) {
|
|
527
527
|
const t = mt(), i = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? t.firstWeekContainsDate ?? t.locale?.options?.firstWeekContainsDate ?? 1, n = ds(s, e), r = Ye(e?.in || s, 0);
|
|
528
528
|
return r.setFullYear(n, 0, i), r.setHours(0, 0, 0, 0), lt(r, e);
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const t = Ne(s, e?.in), i = +lt(t, e) - +
|
|
530
|
+
function Fn(s, e) {
|
|
531
|
+
const t = Ne(s, e?.in), i = +lt(t, e) - +Hn(t, e);
|
|
532
532
|
return Math.round(i / us) + 1;
|
|
533
533
|
}
|
|
534
534
|
function te(s, e) {
|
|
@@ -768,7 +768,7 @@ const We = {
|
|
|
768
768
|
},
|
|
769
769
|
// Local week of year
|
|
770
770
|
w: function(s, e, t, i) {
|
|
771
|
-
const n =
|
|
771
|
+
const n = Fn(s, i);
|
|
772
772
|
return e === "wo" ? t.ordinalNumber(n, { unit: "week" }) : te(n, e.length);
|
|
773
773
|
},
|
|
774
774
|
// ISO week of year
|
|
@@ -782,7 +782,7 @@ const We = {
|
|
|
782
782
|
},
|
|
783
783
|
// Day of year
|
|
784
784
|
D: function(s, e, t) {
|
|
785
|
-
const i =
|
|
785
|
+
const i = Ln(s);
|
|
786
786
|
return e === "Do" ? t.ordinalNumber(i, { unit: "dayOfYear" }) : te(i, e.length);
|
|
787
787
|
},
|
|
788
788
|
// Day of week
|
|
@@ -1148,7 +1148,7 @@ const vi = (s, e) => {
|
|
|
1148
1148
|
default:
|
|
1149
1149
|
return e.time({ width: "full" });
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, $n = (s, e) => {
|
|
1152
1152
|
const t = s.match(/(P+)(p+)?/) || [], i = t[1], n = t[2];
|
|
1153
1153
|
if (!n)
|
|
1154
1154
|
return vi(s, e);
|
|
@@ -1170,49 +1170,49 @@ const vi = (s, e) => {
|
|
|
1170
1170
|
return r.replace("{{date}}", vi(i, e)).replace("{{time}}", hs(n, e));
|
|
1171
1171
|
}, Un = {
|
|
1172
1172
|
p: hs,
|
|
1173
|
-
P:
|
|
1174
|
-
},
|
|
1175
|
-
function Gn(s) {
|
|
1176
|
-
return $n.test(s);
|
|
1177
|
-
}
|
|
1173
|
+
P: $n
|
|
1174
|
+
}, Bn = /^D+$/, Wn = /^Y+$/, Gn = ["D", "DD", "YY", "YYYY"];
|
|
1178
1175
|
function Yn(s) {
|
|
1179
1176
|
return Bn.test(s);
|
|
1180
1177
|
}
|
|
1178
|
+
function jn(s) {
|
|
1179
|
+
return Wn.test(s);
|
|
1180
|
+
}
|
|
1181
1181
|
function Kn(s, e, t) {
|
|
1182
|
-
const i =
|
|
1183
|
-
if (console.warn(i),
|
|
1182
|
+
const i = Xn(s, e, t);
|
|
1183
|
+
if (console.warn(i), Gn.includes(s)) throw new RangeError(i);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function Xn(s, e, t) {
|
|
1186
1186
|
const i = s[0] === "Y" ? "years" : "days of the month";
|
|
1187
1187
|
return `Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${e}\`) for formatting ${i} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function Qn(s) {
|
|
1190
1190
|
return s instanceof Date || typeof s == "object" && Object.prototype.toString.call(s) === "[object Date]";
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return !(!
|
|
1192
|
+
function Vn(s) {
|
|
1193
|
+
return !(!Qn(s) && typeof s != "number" || isNaN(+Ne(s)));
|
|
1194
1194
|
}
|
|
1195
|
-
const
|
|
1196
|
-
function
|
|
1197
|
-
const i = mt(), n = t?.locale ?? i.locale ??
|
|
1198
|
-
if (!
|
|
1195
|
+
const Zn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Jn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, er = /^'([^]*?)'?$/, tr = /''/g, ir = /[a-zA-Z]/;
|
|
1196
|
+
function sr(s, e, t) {
|
|
1197
|
+
const i = mt(), n = t?.locale ?? i.locale ?? On, r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, a = Ne(s, t?.in);
|
|
1198
|
+
if (!Vn(a))
|
|
1199
1199
|
throw new RangeError("Invalid time value");
|
|
1200
|
-
let c = e.match(
|
|
1200
|
+
let c = e.match(Jn).map((u) => {
|
|
1201
1201
|
const d = u[0];
|
|
1202
1202
|
if (d === "p" || d === "P") {
|
|
1203
1203
|
const h = Un[d];
|
|
1204
1204
|
return h(u, n.formatLong);
|
|
1205
1205
|
}
|
|
1206
1206
|
return u;
|
|
1207
|
-
}).join("").match(
|
|
1207
|
+
}).join("").match(Zn).map((u) => {
|
|
1208
1208
|
if (u === "''")
|
|
1209
1209
|
return { isToken: !1, value: "'" };
|
|
1210
1210
|
const d = u[0];
|
|
1211
1211
|
if (d === "'")
|
|
1212
|
-
return { isToken: !1, value:
|
|
1212
|
+
return { isToken: !1, value: nr(u) };
|
|
1213
1213
|
if (pi[d])
|
|
1214
1214
|
return { isToken: !0, value: u };
|
|
1215
|
-
if (d.match(
|
|
1215
|
+
if (d.match(ir))
|
|
1216
1216
|
throw new RangeError(
|
|
1217
1217
|
"Format string contains an unescaped latin alphabet character `" + d + "`"
|
|
1218
1218
|
);
|
|
@@ -1227,43 +1227,43 @@ function ir(s, e, t) {
|
|
|
1227
1227
|
return c.map((u) => {
|
|
1228
1228
|
if (!u.isToken) return u.value;
|
|
1229
1229
|
const d = u.value;
|
|
1230
|
-
(!t?.useAdditionalWeekYearTokens &&
|
|
1230
|
+
(!t?.useAdditionalWeekYearTokens && jn(d) || !t?.useAdditionalDayOfYearTokens && Yn(d)) && Kn(d, e, String(s));
|
|
1231
1231
|
const h = pi[d[0]];
|
|
1232
1232
|
return h(a, d, n.localize, l);
|
|
1233
1233
|
}).join("");
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const e = s.match(
|
|
1237
|
-
return e ? e[1].replace(
|
|
1235
|
+
function nr(s) {
|
|
1236
|
+
const e = s.match(er);
|
|
1237
|
+
return e ? e[1].replace(tr, "'") : s;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function rr() {
|
|
1240
1240
|
return Object.assign({}, mt());
|
|
1241
1241
|
}
|
|
1242
1242
|
function _i(s, e, t) {
|
|
1243
|
-
const i =
|
|
1244
|
-
return "formatToParts" in n ?
|
|
1243
|
+
const i = rr(), n = lr(s, t.timeZone, t.locale ?? i.locale);
|
|
1244
|
+
return "formatToParts" in n ? or(n, e) : ar(n, e);
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function or(s, e) {
|
|
1247
1247
|
const t = s.formatToParts(e);
|
|
1248
1248
|
for (let i = t.length - 1; i >= 0; --i)
|
|
1249
1249
|
if (t[i].type === "timeZoneName")
|
|
1250
1250
|
return t[i].value;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function ar(s, e) {
|
|
1253
1253
|
const t = s.format(e).replace(/\u200E/g, ""), i = / [\w-+ ]+$/.exec(t);
|
|
1254
1254
|
return i ? i[0].substr(1) : "";
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function lr(s, e, t) {
|
|
1257
1257
|
return new Intl.DateTimeFormat(t ? [t.code, "en-US"] : void 0, {
|
|
1258
1258
|
timeZone: e,
|
|
1259
1259
|
timeZoneName: s
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1263
|
-
const t =
|
|
1264
|
-
return "formatToParts" in t ?
|
|
1262
|
+
function ur(s, e) {
|
|
1263
|
+
const t = mr(e);
|
|
1264
|
+
return "formatToParts" in t ? dr(t, s) : hr(t, s);
|
|
1265
1265
|
}
|
|
1266
|
-
const
|
|
1266
|
+
const cr = {
|
|
1267
1267
|
year: 0,
|
|
1268
1268
|
month: 1,
|
|
1269
1269
|
day: 2,
|
|
@@ -1271,11 +1271,11 @@ const ur = {
|
|
|
1271
1271
|
minute: 4,
|
|
1272
1272
|
second: 5
|
|
1273
1273
|
};
|
|
1274
|
-
function
|
|
1274
|
+
function dr(s, e) {
|
|
1275
1275
|
try {
|
|
1276
1276
|
const t = s.formatToParts(e), i = [];
|
|
1277
1277
|
for (let n = 0; n < t.length; n++) {
|
|
1278
|
-
const r =
|
|
1278
|
+
const r = cr[t[n].type];
|
|
1279
1279
|
r !== void 0 && (i[r] = parseInt(t[n].value, 10));
|
|
1280
1280
|
}
|
|
1281
1281
|
return i;
|
|
@@ -1285,7 +1285,7 @@ function cr(s, e) {
|
|
|
1285
1285
|
throw t;
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function hr(s, e) {
|
|
1289
1289
|
const t = s.format(e), i = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);
|
|
1290
1290
|
return [
|
|
1291
1291
|
parseInt(i[3], 10),
|
|
@@ -1296,7 +1296,7 @@ function dr(s, e) {
|
|
|
1296
1296
|
parseInt(i[6], 10)
|
|
1297
1297
|
];
|
|
1298
1298
|
}
|
|
1299
|
-
const
|
|
1299
|
+
const It = {}, wi = new Intl.DateTimeFormat("en-US", {
|
|
1300
1300
|
hourCycle: "h23",
|
|
1301
1301
|
timeZone: "America/New_York",
|
|
1302
1302
|
year: "numeric",
|
|
@@ -1305,9 +1305,9 @@ const At = {}, bi = new Intl.DateTimeFormat("en-US", {
|
|
|
1305
1305
|
hour: "2-digit",
|
|
1306
1306
|
minute: "2-digit",
|
|
1307
1307
|
second: "2-digit"
|
|
1308
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1308
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), fr = wi === "06/25/2014, 00:00:00" || wi === "06/25/2014 00:00:00";
|
|
1309
|
+
function mr(s) {
|
|
1310
|
+
return It[s] || (It[s] = fr ? new Intl.DateTimeFormat("en-US", {
|
|
1311
1311
|
hourCycle: "h23",
|
|
1312
1312
|
timeZone: s,
|
|
1313
1313
|
year: "numeric",
|
|
@@ -1325,13 +1325,13 @@ function fr(s) {
|
|
|
1325
1325
|
hour: "2-digit",
|
|
1326
1326
|
minute: "2-digit",
|
|
1327
1327
|
second: "2-digit"
|
|
1328
|
-
})),
|
|
1328
|
+
})), It[s];
|
|
1329
1329
|
}
|
|
1330
1330
|
function fs(s, e, t, i, n, r, o) {
|
|
1331
1331
|
const a = /* @__PURE__ */ new Date(0);
|
|
1332
1332
|
return a.setUTCFullYear(s, e, t), a.setUTCHours(i, n, r, o), a;
|
|
1333
1333
|
}
|
|
1334
|
-
const
|
|
1334
|
+
const bi = 36e5, pr = 6e4, Lt = {
|
|
1335
1335
|
timezoneZ: /^(Z)$/,
|
|
1336
1336
|
timezoneHH: /^([+-]\d{2})$/,
|
|
1337
1337
|
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
@@ -1339,34 +1339,34 @@ const wi = 36e5, mr = 6e4, It = {
|
|
|
1339
1339
|
function ms(s, e, t) {
|
|
1340
1340
|
if (!s)
|
|
1341
1341
|
return 0;
|
|
1342
|
-
let i =
|
|
1342
|
+
let i = Lt.timezoneZ.exec(s);
|
|
1343
1343
|
if (i)
|
|
1344
1344
|
return 0;
|
|
1345
1345
|
let n, r;
|
|
1346
|
-
if (i =
|
|
1347
|
-
return n = parseInt(i[1], 10), xi(n) ? -(n *
|
|
1348
|
-
if (i =
|
|
1346
|
+
if (i = Lt.timezoneHH.exec(s), i)
|
|
1347
|
+
return n = parseInt(i[1], 10), xi(n) ? -(n * bi) : NaN;
|
|
1348
|
+
if (i = Lt.timezoneHHMM.exec(s), i) {
|
|
1349
1349
|
n = parseInt(i[2], 10);
|
|
1350
1350
|
const o = parseInt(i[3], 10);
|
|
1351
|
-
return xi(n, o) ? (r = Math.abs(n) *
|
|
1351
|
+
return xi(n, o) ? (r = Math.abs(n) * bi + o * pr, i[1] === "+" ? -r : r) : NaN;
|
|
1352
1352
|
}
|
|
1353
|
-
if (
|
|
1353
|
+
if (vr(s)) {
|
|
1354
1354
|
e = new Date(e || Date.now());
|
|
1355
|
-
const o = t ? e :
|
|
1356
|
-
return -(t ? a :
|
|
1355
|
+
const o = t ? e : gr(e), a = Wt(o, s);
|
|
1356
|
+
return -(t ? a : yr(e, a, s));
|
|
1357
1357
|
}
|
|
1358
1358
|
return NaN;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function gr(s) {
|
|
1361
1361
|
return fs(s.getFullYear(), s.getMonth(), s.getDate(), s.getHours(), s.getMinutes(), s.getSeconds(), s.getMilliseconds());
|
|
1362
1362
|
}
|
|
1363
1363
|
function Wt(s, e) {
|
|
1364
|
-
const t =
|
|
1364
|
+
const t = ur(s, e), i = fs(t[0], t[1] - 1, t[2], t[3] % 24, t[4], t[5], 0).getTime();
|
|
1365
1365
|
let n = s.getTime();
|
|
1366
1366
|
const r = n % 1e3;
|
|
1367
1367
|
return n -= r >= 0 ? r : 1e3 + r, i - n;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function yr(s, e, t) {
|
|
1370
1370
|
let n = s.getTime() - e;
|
|
1371
1371
|
const r = Wt(new Date(n), t);
|
|
1372
1372
|
if (e === r)
|
|
@@ -1379,7 +1379,7 @@ function xi(s, e) {
|
|
|
1379
1379
|
return -23 <= s && s <= 23 && (e == null || 0 <= e && e <= 59);
|
|
1380
1380
|
}
|
|
1381
1381
|
const Ei = {};
|
|
1382
|
-
function
|
|
1382
|
+
function vr(s) {
|
|
1383
1383
|
if (Ei[s])
|
|
1384
1384
|
return !0;
|
|
1385
1385
|
try {
|
|
@@ -1388,10 +1388,10 @@ function yr(s) {
|
|
|
1388
1388
|
return !1;
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1391
|
+
const _r = 60 * 1e3, wr = {
|
|
1392
1392
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1393
1393
|
X: function(s, e, t) {
|
|
1394
|
-
const i =
|
|
1394
|
+
const i = Pt(t.timeZone, s);
|
|
1395
1395
|
if (i === 0)
|
|
1396
1396
|
return "Z";
|
|
1397
1397
|
switch (e) {
|
|
@@ -1411,7 +1411,7 @@ const vr = 60 * 1e3, _r = {
|
|
|
1411
1411
|
},
|
|
1412
1412
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1413
1413
|
x: function(s, e, t) {
|
|
1414
|
-
const i =
|
|
1414
|
+
const i = Pt(t.timeZone, s);
|
|
1415
1415
|
switch (e) {
|
|
1416
1416
|
// Hours and optional minutes
|
|
1417
1417
|
case "x":
|
|
@@ -1429,7 +1429,7 @@ const vr = 60 * 1e3, _r = {
|
|
|
1429
1429
|
},
|
|
1430
1430
|
// Timezone (GMT)
|
|
1431
1431
|
O: function(s, e, t) {
|
|
1432
|
-
const i =
|
|
1432
|
+
const i = Pt(t.timeZone, s);
|
|
1433
1433
|
switch (e) {
|
|
1434
1434
|
// Short
|
|
1435
1435
|
case "O":
|
|
@@ -1453,8 +1453,8 @@ const vr = 60 * 1e3, _r = {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
|
-
function
|
|
1457
|
-
const t = s ? ms(s, e, !0) /
|
|
1456
|
+
function Pt(s, e) {
|
|
1457
|
+
const t = s ? ms(s, e, !0) / _r : e?.getTimezoneOffset() ?? 0;
|
|
1458
1458
|
if (Number.isNaN(t))
|
|
1459
1459
|
throw new RangeError("Invalid time zone specified: " + s);
|
|
1460
1460
|
return t;
|
|
@@ -1481,7 +1481,7 @@ function ki(s) {
|
|
|
1481
1481
|
const e = new Date(Date.UTC(s.getFullYear(), s.getMonth(), s.getDate(), s.getHours(), s.getMinutes(), s.getSeconds(), s.getMilliseconds()));
|
|
1482
1482
|
return e.setUTCFullYear(s.getFullYear()), +s - +e;
|
|
1483
1483
|
}
|
|
1484
|
-
const
|
|
1484
|
+
const xr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, qt = 36e5, Ri = 6e4, Er = 2, ke = {
|
|
1485
1485
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
1486
1486
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
1487
1487
|
// year tokens
|
|
@@ -1513,14 +1513,14 @@ const wr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
|
|
|
1513
1513
|
HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1514
1514
|
HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1515
1515
|
// time zone tokens (to identify the presence of a tz)
|
|
1516
|
-
timeZone:
|
|
1516
|
+
timeZone: xr
|
|
1517
1517
|
};
|
|
1518
|
-
function
|
|
1518
|
+
function Cr(s, e = {}) {
|
|
1519
1519
|
if (arguments.length < 1)
|
|
1520
1520
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
1521
1521
|
if (s === null)
|
|
1522
1522
|
return /* @__PURE__ */ new Date(NaN);
|
|
1523
|
-
const t = e.additionalDigits == null ?
|
|
1523
|
+
const t = e.additionalDigits == null ? Er : Number(e.additionalDigits);
|
|
1524
1524
|
if (t !== 2 && t !== 1 && t !== 0)
|
|
1525
1525
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
1526
1526
|
if (s instanceof Date || typeof s == "object" && Object.prototype.toString.call(s) === "[object Date]")
|
|
@@ -1529,13 +1529,13 @@ function Er(s, e = {}) {
|
|
|
1529
1529
|
return new Date(s);
|
|
1530
1530
|
if (Object.prototype.toString.call(s) !== "[object String]")
|
|
1531
1531
|
return /* @__PURE__ */ new Date(NaN);
|
|
1532
|
-
const i =
|
|
1532
|
+
const i = kr(s), { year: n, restDateString: r } = Rr(i.date, t), o = Tr(r, n);
|
|
1533
1533
|
if (o === null || isNaN(o.getTime()))
|
|
1534
1534
|
return /* @__PURE__ */ new Date(NaN);
|
|
1535
1535
|
if (o) {
|
|
1536
1536
|
const a = o.getTime();
|
|
1537
1537
|
let c = 0, l;
|
|
1538
|
-
if (i.time && (c =
|
|
1538
|
+
if (i.time && (c = Sr(i.time), c === null || isNaN(c)))
|
|
1539
1539
|
return /* @__PURE__ */ new Date(NaN);
|
|
1540
1540
|
if (i.timeZone || e.timeZone) {
|
|
1541
1541
|
if (l = ms(i.timeZone || e.timeZone, new Date(a + c)), isNaN(l))
|
|
@@ -1546,7 +1546,7 @@ function Er(s, e = {}) {
|
|
|
1546
1546
|
} else
|
|
1547
1547
|
return /* @__PURE__ */ new Date(NaN);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function kr(s) {
|
|
1550
1550
|
const e = {};
|
|
1551
1551
|
let t = ke.dateTimePattern.exec(s), i;
|
|
1552
1552
|
if (t ? (e.date = t[1], i = t[3]) : (t = ke.datePattern.exec(s), t ? (e.date = t[1], i = t[2]) : (e.date = null, i = s)), i) {
|
|
@@ -1555,7 +1555,7 @@ function Cr(s) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
return e;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function Rr(s, e) {
|
|
1559
1559
|
if (s) {
|
|
1560
1560
|
const t = ke.YYY[e], i = ke.YYYYY[e];
|
|
1561
1561
|
let n = ke.YYYY.exec(s) || i.exec(s);
|
|
@@ -1578,7 +1578,7 @@ function kr(s, e) {
|
|
|
1578
1578
|
year: null
|
|
1579
1579
|
};
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Tr(s, e) {
|
|
1582
1582
|
if (e === null)
|
|
1583
1583
|
return null;
|
|
1584
1584
|
let t, i, n;
|
|
@@ -1590,7 +1590,7 @@ function Rr(s, e) {
|
|
|
1590
1590
|
if (r = ke.DDD.exec(s), r) {
|
|
1591
1591
|
t = /* @__PURE__ */ new Date(0);
|
|
1592
1592
|
const o = parseInt(r[1], 10);
|
|
1593
|
-
return
|
|
1593
|
+
return zr(e, o) ? (t.setUTCFullYear(e, 0, o), t) : /* @__PURE__ */ new Date(NaN);
|
|
1594
1594
|
}
|
|
1595
1595
|
if (r = ke.MMDD.exec(s), r) {
|
|
1596
1596
|
t = /* @__PURE__ */ new Date(0), i = parseInt(r[1], 10) - 1;
|
|
@@ -1606,16 +1606,16 @@ function Rr(s, e) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return null;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function Sr(s) {
|
|
1610
1610
|
let e, t, i = ke.HH.exec(s);
|
|
1611
1611
|
if (i)
|
|
1612
|
-
return e = parseFloat(i[1].replace(",", ".")), Ht(e) ? e % 24 *
|
|
1612
|
+
return e = parseFloat(i[1].replace(",", ".")), Ht(e) ? e % 24 * qt : NaN;
|
|
1613
1613
|
if (i = ke.HHMM.exec(s), i)
|
|
1614
|
-
return e = parseInt(i[1], 10), t = parseFloat(i[2].replace(",", ".")), Ht(e, t) ? e % 24 *
|
|
1614
|
+
return e = parseInt(i[1], 10), t = parseFloat(i[2].replace(",", ".")), Ht(e, t) ? e % 24 * qt + t * Ri : NaN;
|
|
1615
1615
|
if (i = ke.HHMMSS.exec(s), i) {
|
|
1616
1616
|
e = parseInt(i[1], 10), t = parseInt(i[2], 10);
|
|
1617
1617
|
const n = parseFloat(i[3].replace(",", "."));
|
|
1618
|
-
return Ht(e, t, n) ? e % 24 *
|
|
1618
|
+
return Ht(e, t, n) ? e % 24 * qt + t * Ri + n * 1e3 : NaN;
|
|
1619
1619
|
}
|
|
1620
1620
|
return null;
|
|
1621
1621
|
}
|
|
@@ -1626,7 +1626,7 @@ function Ti(s, e, t) {
|
|
|
1626
1626
|
const n = i.getUTCDay() || 7, r = e * 7 + t + 1 - n;
|
|
1627
1627
|
return i.setUTCDate(i.getUTCDate() + r), i;
|
|
1628
1628
|
}
|
|
1629
|
-
const
|
|
1629
|
+
const Dr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Or = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1630
1630
|
function ps(s) {
|
|
1631
1631
|
return s % 400 === 0 || s % 4 === 0 && s % 100 !== 0;
|
|
1632
1632
|
}
|
|
@@ -1637,12 +1637,12 @@ function Si(s, e, t) {
|
|
|
1637
1637
|
if (t < 1)
|
|
1638
1638
|
return !1;
|
|
1639
1639
|
const i = ps(s);
|
|
1640
|
-
if (i && t >
|
|
1640
|
+
if (i && t > Or[e] || !i && t > Dr[e])
|
|
1641
1641
|
return !1;
|
|
1642
1642
|
}
|
|
1643
1643
|
return !0;
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function zr(s, e) {
|
|
1646
1646
|
if (e < 1)
|
|
1647
1647
|
return !1;
|
|
1648
1648
|
const t = ps(s);
|
|
@@ -1654,32 +1654,32 @@ function Di(s, e) {
|
|
|
1654
1654
|
function Ht(s, e, t) {
|
|
1655
1655
|
return !(s < 0 || s >= 25 || e != null && (e < 0 || e >= 60) || t != null && (t < 0 || t >= 60));
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1657
|
+
const Mr = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1658
1658
|
function Oi(s, e, t = {}) {
|
|
1659
1659
|
e = String(e);
|
|
1660
|
-
const i = e.match(
|
|
1660
|
+
const i = e.match(Mr);
|
|
1661
1661
|
if (i) {
|
|
1662
|
-
const n =
|
|
1662
|
+
const n = Cr(t.originalDate || s, t);
|
|
1663
1663
|
e = i.reduce(function(r, o) {
|
|
1664
1664
|
if (o[0] === "'")
|
|
1665
1665
|
return r;
|
|
1666
|
-
const a = r.indexOf(o), c = r[a - 1] === "'", l = r.replace(o, "'" +
|
|
1666
|
+
const a = r.indexOf(o), c = r[a - 1] === "'", l = r.replace(o, "'" + wr[o[0]](n, o, t) + "'");
|
|
1667
1667
|
return c ? l.substring(0, a - 1) + l.substring(a + 1) : l;
|
|
1668
1668
|
}, e);
|
|
1669
1669
|
}
|
|
1670
|
-
return
|
|
1670
|
+
return sr(s, e, t);
|
|
1671
1671
|
}
|
|
1672
|
-
const Gt = "#6c7489", zi = "12px",
|
|
1672
|
+
const Gt = "#6c7489", zi = "12px", Nr = "16px", Mi = "20px", Ni = "32px", gs = "20px";
|
|
1673
1673
|
var yt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1674
|
-
function
|
|
1674
|
+
function Ar(s) {
|
|
1675
1675
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
1676
1676
|
}
|
|
1677
|
-
var vt = { exports: {} },
|
|
1678
|
-
function
|
|
1679
|
-
return
|
|
1677
|
+
var vt = { exports: {} }, Ir = vt.exports, Ai;
|
|
1678
|
+
function Lr() {
|
|
1679
|
+
return Ai || (Ai = 1, (function(s, e) {
|
|
1680
1680
|
(function(t, i) {
|
|
1681
1681
|
i();
|
|
1682
|
-
})(
|
|
1682
|
+
})(Ir, function() {
|
|
1683
1683
|
function t(l, u) {
|
|
1684
1684
|
return typeof u > "u" ? u = { autoBom: !1 } : typeof u != "object" && (console.warn("Deprecated: Expected third argument to be a object"), u = { autoBom: !u }), u.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type) ? new Blob(["\uFEFF", l], { type: l.type }) : l;
|
|
1685
1685
|
}
|
|
@@ -1745,10 +1745,10 @@ function Ar() {
|
|
|
1745
1745
|
});
|
|
1746
1746
|
})(vt)), vt.exports;
|
|
1747
1747
|
}
|
|
1748
|
-
var
|
|
1749
|
-
var qr = _t.exports,
|
|
1750
|
-
function
|
|
1751
|
-
return
|
|
1748
|
+
var Pr = Lr(), _t = { exports: {} };
|
|
1749
|
+
var qr = _t.exports, Ii;
|
|
1750
|
+
function Hr() {
|
|
1751
|
+
return Ii || (Ii = 1, (function(s, e) {
|
|
1752
1752
|
((t, i) => {
|
|
1753
1753
|
s.exports = i();
|
|
1754
1754
|
})(qr, function t() {
|
|
@@ -1766,19 +1766,19 @@ function Pr() {
|
|
|
1766
1766
|
let N = this._config.newline;
|
|
1767
1767
|
N || (T = this._config.quoteChar || '"', N = this._handle.guessLineEndings(f, T)), f = [...f.split(N).slice(C)].join(N);
|
|
1768
1768
|
}
|
|
1769
|
-
this.isFirstChunk &&
|
|
1769
|
+
this.isFirstChunk && $(this._config.beforeFirstChunk) && (T = this._config.beforeFirstChunk(f)) !== void 0 && (f = T), this.isFirstChunk = !1, this._halted = !1;
|
|
1770
1770
|
var C = this._partialLine + f, T = (this._partialLine = "", this._handle.parse(C, this._baseIndex, !this._finished));
|
|
1771
1771
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
1772
1772
|
if (f = T.meta.cursor, C = (this._finished || (this._partialLine = C.substring(f - this._baseIndex), this._baseIndex = f), T && T.data && (this._rowCount += T.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), r) i.postMessage({ results: T, workerId: c.WORKER_ID, finished: C });
|
|
1773
|
-
else if (
|
|
1773
|
+
else if ($(this._config.chunk) && !g) {
|
|
1774
1774
|
if (this._config.chunk(T, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
1775
1775
|
this._completeResults = T = void 0;
|
|
1776
1776
|
}
|
|
1777
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(T.data), this._completeResults.errors = this._completeResults.errors.concat(T.errors), this._completeResults.meta = T.meta), this._completed || !C ||
|
|
1777
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(T.data), this._completeResults.errors = this._completeResults.errors.concat(T.errors), this._completeResults.meta = T.meta), this._completed || !C || !$(this._config.complete) || T && T.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), C || T && T.meta.paused || this._nextChunk(), T;
|
|
1778
1778
|
}
|
|
1779
1779
|
this._halted = !0;
|
|
1780
1780
|
}, this._sendError = function(f) {
|
|
1781
|
-
|
|
1781
|
+
$(this._config.error) ? this._config.error(f) : r && this._config.error && i.postMessage({ workerId: c.WORKER_ID, error: f, finished: !1 });
|
|
1782
1782
|
};
|
|
1783
1783
|
}
|
|
1784
1784
|
function d(m) {
|
|
@@ -1866,68 +1866,68 @@ function Pr() {
|
|
|
1866
1866
|
}, this);
|
|
1867
1867
|
}
|
|
1868
1868
|
function k(m) {
|
|
1869
|
-
var f, g, C, T, N = Math.pow(2, 53), oe = -N,
|
|
1870
|
-
function Q(
|
|
1871
|
-
return m.skipEmptyLines === "greedy" ?
|
|
1869
|
+
var f, g, C, T, N = Math.pow(2, 53), oe = -N, we = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, be = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, ee = this, ue = 0, q = 0, re = !1, I = !1, b = [], w = { data: [], errors: [], meta: {} };
|
|
1870
|
+
function Q(j) {
|
|
1871
|
+
return m.skipEmptyLines === "greedy" ? j.join("").trim() === "" : j.length === 1 && j[0].length === 0;
|
|
1872
1872
|
}
|
|
1873
1873
|
function H() {
|
|
1874
|
-
if (
|
|
1875
|
-
return !Q(
|
|
1874
|
+
if (w && C && (Ee("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + c.DefaultDelimiter + "'"), C = !1), m.skipEmptyLines && (w.data = w.data.filter(function(P) {
|
|
1875
|
+
return !Q(P);
|
|
1876
1876
|
})), B()) {
|
|
1877
|
-
let
|
|
1878
|
-
|
|
1877
|
+
let P = function(ce) {
|
|
1878
|
+
b.push(ce);
|
|
1879
1879
|
};
|
|
1880
|
-
if (
|
|
1881
|
-
for (var
|
|
1882
|
-
|
|
1883
|
-
} else
|
|
1880
|
+
if (w) if (Array.isArray(w.data[0])) {
|
|
1881
|
+
for (var j = 0; B() && j < w.data.length; j++) w.data[j].forEach(P);
|
|
1882
|
+
w.data.splice(0, 1);
|
|
1883
|
+
} else w.data.forEach(P);
|
|
1884
1884
|
}
|
|
1885
|
-
function Y(
|
|
1886
|
-
for (var de = m.header ? {} : [], J = 0; J <
|
|
1887
|
-
var ie = J,
|
|
1888
|
-
if (
|
|
1885
|
+
function Y(P, ce) {
|
|
1886
|
+
for (var de = m.header ? {} : [], J = 0; J < P.length; J++) {
|
|
1887
|
+
var ie = J, K = P[J], K = ((Te, F) => ((le) => (m.dynamicTypingFunction && m.dynamicTyping[le] === void 0 && (m.dynamicTyping[le] = m.dynamicTypingFunction(le)), (m.dynamicTyping[le] || m.dynamicTyping) === !0))(Te) ? F === "true" || F === "TRUE" || F !== "false" && F !== "FALSE" && (((le) => {
|
|
1888
|
+
if (we.test(le) && (le = parseFloat(le), oe < le && le < N))
|
|
1889
1889
|
return 1;
|
|
1890
|
-
})(F) ? parseFloat(F) :
|
|
1891
|
-
ie === "__parsed_extra" ? (de[ie] = de[ie] || [], de[ie].push(
|
|
1890
|
+
})(F) ? parseFloat(F) : be.test(F) ? new Date(F) : F === "" ? null : F) : F)(ie = m.header ? J >= b.length ? "__parsed_extra" : b[J] : ie, K = m.transform ? m.transform(K, ie) : K);
|
|
1891
|
+
ie === "__parsed_extra" ? (de[ie] = de[ie] || [], de[ie].push(K)) : de[ie] = K;
|
|
1892
1892
|
}
|
|
1893
|
-
return m.header && (J >
|
|
1893
|
+
return m.header && (J > b.length ? Ee("FieldMismatch", "TooManyFields", "Too many fields: expected " + b.length + " fields but parsed " + J, q + ce) : J < b.length && Ee("FieldMismatch", "TooFewFields", "Too few fields: expected " + b.length + " fields but parsed " + J, q + ce)), de;
|
|
1894
1894
|
}
|
|
1895
1895
|
var ae;
|
|
1896
|
-
|
|
1896
|
+
w && (m.header || m.dynamicTyping || m.transform) && (ae = 1, !w.data.length || Array.isArray(w.data[0]) ? (w.data = w.data.map(Y), ae = w.data.length) : w.data = Y(w.data, 0), m.header && w.meta && (w.meta.fields = b), q += ae);
|
|
1897
1897
|
}
|
|
1898
1898
|
function B() {
|
|
1899
|
-
return m.header &&
|
|
1899
|
+
return m.header && b.length === 0;
|
|
1900
1900
|
}
|
|
1901
|
-
function Ee(
|
|
1902
|
-
|
|
1901
|
+
function Ee(j, Y, ae, P) {
|
|
1902
|
+
j = { type: j, code: Y, message: ae }, P !== void 0 && (j.row = P), w.errors.push(j);
|
|
1903
1903
|
}
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
}), this.parse = function(
|
|
1907
|
-
var
|
|
1908
|
-
var Te, F, le,
|
|
1909
|
-
|
|
1910
|
-
for (var
|
|
1911
|
-
for (var De,
|
|
1912
|
-
0 < xe.data.length && (Oe /= xe.data.length - pe), 1.99 < Oe && (F === void 0 || ye < F || ye === F &&
|
|
1904
|
+
$(m.step) && (T = m.step, m.step = function(j) {
|
|
1905
|
+
w = j, B() ? H() : (H(), w.data.length !== 0 && (ue += j.data.length, m.preview && ue > m.preview ? g.abort() : (w.data = w.data[0], T(w, ee))));
|
|
1906
|
+
}), this.parse = function(j, Y, ae) {
|
|
1907
|
+
var P = m.quoteChar || '"', P = (m.newline || (m.newline = this.guessLineEndings(j, P)), C = !1, m.delimiter ? $(m.delimiter) && (m.delimiter = m.delimiter(j), w.meta.delimiter = m.delimiter) : ((P = ((ce, de, J, ie, K) => {
|
|
1908
|
+
var Te, F, le, qe;
|
|
1909
|
+
K = K || [",", " ", "|", ";", c.RECORD_SEP, c.UNIT_SEP];
|
|
1910
|
+
for (var $e = 0; $e < K.length; $e++) {
|
|
1911
|
+
for (var De, je = K[$e], ye = 0, Oe = 0, pe = 0, xe = (le = void 0, new M({ comments: ie, delimiter: je, newline: de, preview: 10 }).parse(ce)), ze = 0; ze < xe.data.length; ze++) J && Q(xe.data[ze]) ? pe++ : (De = xe.data[ze].length, Oe += De, le === void 0 ? le = De : 0 < De && (ye += Math.abs(De - le), le = De));
|
|
1912
|
+
0 < xe.data.length && (Oe /= xe.data.length - pe), 1.99 < Oe && (F === void 0 || ye < F || ye === F && qe < Oe) && (F = ye, Te = je, qe = Oe);
|
|
1913
1913
|
}
|
|
1914
1914
|
return { successful: !!(m.delimiter = Te), bestDelimiter: Te };
|
|
1915
|
-
})(
|
|
1916
|
-
return
|
|
1915
|
+
})(j, m.newline, m.skipEmptyLines, m.comments, m.delimitersToGuess)).successful ? m.delimiter = P.bestDelimiter : (C = !0, m.delimiter = c.DefaultDelimiter), w.meta.delimiter = m.delimiter), D(m));
|
|
1916
|
+
return P.header = B(), m.preview && m.header && P.preview++, f = j, g = new M(P), w = g.parse(f, Y, ae), H(), re ? { meta: { paused: !0 } } : w || { meta: { paused: !1 } };
|
|
1917
1917
|
}, this.paused = function() {
|
|
1918
1918
|
return re;
|
|
1919
1919
|
}, this.pause = function() {
|
|
1920
|
-
re = !0, g.abort(), f =
|
|
1920
|
+
re = !0, g.abort(), f = $(m.chunk) ? "" : f.substring(g.getCharIndex());
|
|
1921
1921
|
}, this.resume = function() {
|
|
1922
1922
|
ee.streamer._halted ? (re = !1, ee.streamer.parseChunk(f, !0)) : setTimeout(ee.resume, 3);
|
|
1923
1923
|
}, this.aborted = function() {
|
|
1924
|
-
return
|
|
1924
|
+
return I;
|
|
1925
1925
|
}, this.abort = function() {
|
|
1926
|
-
|
|
1927
|
-
}, this.guessLineEndings = function(ce,
|
|
1926
|
+
I = !0, g.abort(), w.meta.aborted = !0, $(m.complete) && m.complete(w), f = "";
|
|
1927
|
+
}, this.guessLineEndings = function(ce, P) {
|
|
1928
1928
|
ce = ce.substring(0, 1048576);
|
|
1929
|
-
var
|
|
1930
|
-
`), ce = 1 <
|
|
1929
|
+
var P = new RegExp(v(P) + "([^]*?)" + v(P), "gm"), ae = (ce = ce.replace(P, "")).split("\r"), P = ce.split(`
|
|
1930
|
+
`), ce = 1 < P.length && P[0].length < ae[0].length;
|
|
1931
1931
|
if (ae.length === 1 || ce) return `
|
|
1932
1932
|
`;
|
|
1933
1933
|
for (var de = 0, J = 0; J < ae.length; J++) ae[J][0] === `
|
|
@@ -1940,88 +1940,88 @@ function Pr() {
|
|
|
1940
1940
|
return m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1941
1941
|
}
|
|
1942
1942
|
function M(m) {
|
|
1943
|
-
var f = (m = m || {}).delimiter, g = m.newline, C = m.comments, T = m.step, N = m.preview, oe = m.fastMode,
|
|
1943
|
+
var f = (m = m || {}).delimiter, g = m.newline, C = m.comments, T = m.step, N = m.preview, oe = m.fastMode, we = null, be = !1, ee = m.quoteChar == null ? '"' : m.quoteChar, ue = ee;
|
|
1944
1944
|
if (m.escapeChar !== void 0 && (ue = m.escapeChar), (typeof f != "string" || -1 < c.BAD_DELIMITERS.indexOf(f)) && (f = ","), C === f) throw new Error("Comment character same as delimiter");
|
|
1945
1945
|
C === !0 ? C = "#" : (typeof C != "string" || -1 < c.BAD_DELIMITERS.indexOf(C)) && (C = !1), g !== `
|
|
1946
1946
|
` && g !== "\r" && g !== `\r
|
|
1947
1947
|
` && (g = `
|
|
1948
1948
|
`);
|
|
1949
|
-
var
|
|
1950
|
-
this.parse = function(
|
|
1951
|
-
if (typeof
|
|
1952
|
-
var Q =
|
|
1953
|
-
if (!
|
|
1954
|
-
if (oe || oe !== !1 &&
|
|
1955
|
-
for (var de =
|
|
1956
|
-
if (
|
|
1957
|
-
else if (
|
|
1958
|
-
if (!C ||
|
|
1959
|
-
if (
|
|
1960
|
-
if (Y = [],
|
|
1961
|
-
} else
|
|
1949
|
+
var q = 0, re = !1;
|
|
1950
|
+
this.parse = function(I, b, w) {
|
|
1951
|
+
if (typeof I != "string") throw new Error("Input must be a string");
|
|
1952
|
+
var Q = I.length, H = f.length, B = g.length, Ee = C.length, j = $(T), Y = [], ae = [], P = [], ce = q = 0;
|
|
1953
|
+
if (!I) return ye();
|
|
1954
|
+
if (oe || oe !== !1 && I.indexOf(ee) === -1) {
|
|
1955
|
+
for (var de = I.split(g), J = 0; J < de.length; J++) {
|
|
1956
|
+
if (P = de[J], q += P.length, J !== de.length - 1) q += g.length;
|
|
1957
|
+
else if (w) return ye();
|
|
1958
|
+
if (!C || P.substring(0, Ee) !== C) {
|
|
1959
|
+
if (j) {
|
|
1960
|
+
if (Y = [], qe(P.split(f)), Oe(), re) return ye();
|
|
1961
|
+
} else qe(P.split(f));
|
|
1962
1962
|
if (N && N <= J) return Y = Y.slice(0, N), ye(!0);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
return ye();
|
|
1966
1966
|
}
|
|
1967
|
-
for (var ie =
|
|
1968
|
-
if ((F =
|
|
1969
|
-
if (F === Q - 1) return De(
|
|
1970
|
-
if (ee === ue &&
|
|
1971
|
-
else if (ee === ue || F === 0 ||
|
|
1972
|
-
ie !== -1 && ie < F + 1 && (ie =
|
|
1973
|
-
var le =
|
|
1974
|
-
if (
|
|
1975
|
-
|
|
1967
|
+
for (var ie = I.indexOf(f, q), K = I.indexOf(g, q), Te = new RegExp(v(ue) + v(ee), "g"), F = I.indexOf(ee, q); ; ) if (I[q] === ee) for (F = q, q++; ; ) {
|
|
1968
|
+
if ((F = I.indexOf(ee, F + 1)) === -1) return w || ae.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: Y.length, index: q }), De();
|
|
1969
|
+
if (F === Q - 1) return De(I.substring(q, F).replace(Te, ee));
|
|
1970
|
+
if (ee === ue && I[F + 1] === ue) F++;
|
|
1971
|
+
else if (ee === ue || F === 0 || I[F - 1] !== ue) {
|
|
1972
|
+
ie !== -1 && ie < F + 1 && (ie = I.indexOf(f, F + 1));
|
|
1973
|
+
var le = $e((K = K !== -1 && K < F + 1 ? I.indexOf(g, F + 1) : K) === -1 ? ie : Math.min(ie, K));
|
|
1974
|
+
if (I.substr(F + 1 + le, H) === f) {
|
|
1975
|
+
P.push(I.substring(q, F).replace(Te, ee)), I[q = F + 1 + le + H] !== ee && (F = I.indexOf(ee, q)), ie = I.indexOf(f, q), K = I.indexOf(g, q);
|
|
1976
1976
|
break;
|
|
1977
1977
|
}
|
|
1978
|
-
if (le =
|
|
1979
|
-
if (
|
|
1978
|
+
if (le = $e(K), I.substring(F + 1 + le, F + 1 + le + B) === g) {
|
|
1979
|
+
if (P.push(I.substring(q, F).replace(Te, ee)), je(F + 1 + le + B), ie = I.indexOf(f, q), F = I.indexOf(ee, q), j && (Oe(), re)) return ye();
|
|
1980
1980
|
if (N && Y.length >= N) return ye(!0);
|
|
1981
1981
|
break;
|
|
1982
1982
|
}
|
|
1983
|
-
ae.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: Y.length, index:
|
|
1983
|
+
ae.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: Y.length, index: q }), F++;
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
else if (C &&
|
|
1987
|
-
if (
|
|
1988
|
-
|
|
1989
|
-
} else if (ie !== -1 && (ie <
|
|
1986
|
+
else if (C && P.length === 0 && I.substring(q, q + Ee) === C) {
|
|
1987
|
+
if (K === -1) return ye();
|
|
1988
|
+
q = K + B, K = I.indexOf(g, q), ie = I.indexOf(f, q);
|
|
1989
|
+
} else if (ie !== -1 && (ie < K || K === -1)) P.push(I.substring(q, ie)), q = ie + H, ie = I.indexOf(f, q);
|
|
1990
1990
|
else {
|
|
1991
|
-
if (
|
|
1992
|
-
if (
|
|
1991
|
+
if (K === -1) break;
|
|
1992
|
+
if (P.push(I.substring(q, K)), je(K + B), j && (Oe(), re)) return ye();
|
|
1993
1993
|
if (N && Y.length >= N) return ye(!0);
|
|
1994
1994
|
}
|
|
1995
1995
|
return De();
|
|
1996
|
-
function
|
|
1997
|
-
Y.push(pe), ce =
|
|
1996
|
+
function qe(pe) {
|
|
1997
|
+
Y.push(pe), ce = q;
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function $e(pe) {
|
|
2000
2000
|
var xe = 0;
|
|
2001
|
-
return xe = pe !== -1 && (pe =
|
|
2001
|
+
return xe = pe !== -1 && (pe = I.substring(F + 1, pe)) && pe.trim() === "" ? pe.length : xe;
|
|
2002
2002
|
}
|
|
2003
2003
|
function De(pe) {
|
|
2004
|
-
return
|
|
2004
|
+
return w || (pe === void 0 && (pe = I.substring(q)), P.push(pe), q = Q, qe(P), j && Oe()), ye();
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2007
|
-
|
|
2006
|
+
function je(pe) {
|
|
2007
|
+
q = pe, qe(P), P = [], K = I.indexOf(g, q);
|
|
2008
2008
|
}
|
|
2009
2009
|
function ye(pe) {
|
|
2010
|
-
if (m.header && !
|
|
2010
|
+
if (m.header && !b && Y.length && !be) {
|
|
2011
2011
|
var xe = Y[0], ze = /* @__PURE__ */ Object.create(null), nt = new Set(xe);
|
|
2012
2012
|
let gt = !1;
|
|
2013
|
-
for (let
|
|
2014
|
-
let z = l(xe[
|
|
2015
|
-
if (ze[z =
|
|
2013
|
+
for (let Ue = 0; Ue < xe.length; Ue++) {
|
|
2014
|
+
let z = l(xe[Ue]);
|
|
2015
|
+
if (ze[z = $(m.transformHeader) ? m.transformHeader(z, Ue) : z]) {
|
|
2016
2016
|
let V, ge = ze[z];
|
|
2017
2017
|
for (; V = z + "_" + ge, ge++, nt.has(V); ) ;
|
|
2018
|
-
nt.add(V), xe[
|
|
2019
|
-
} else ze[z] = 1, xe[
|
|
2018
|
+
nt.add(V), xe[Ue] = V, ze[z]++, gt = !0, (we = we === null ? {} : we)[V] = z;
|
|
2019
|
+
} else ze[z] = 1, xe[Ue] = z;
|
|
2020
2020
|
nt.add(z);
|
|
2021
2021
|
}
|
|
2022
|
-
gt && console.warn("Duplicate headers found and renamed."),
|
|
2022
|
+
gt && console.warn("Duplicate headers found and renamed."), be = !0;
|
|
2023
2023
|
}
|
|
2024
|
-
return { data: Y, errors: ae, meta: { delimiter: f, linebreak: g, aborted: re, truncated: !!pe, cursor: ce + (
|
|
2024
|
+
return { data: Y, errors: ae, meta: { delimiter: f, linebreak: g, aborted: re, truncated: !!pe, cursor: ce + (b || 0), renamedHeaders: we } };
|
|
2025
2025
|
}
|
|
2026
2026
|
function Oe() {
|
|
2027
2027
|
T(ye()), Y = [], ae = [];
|
|
@@ -2029,7 +2029,7 @@ function Pr() {
|
|
|
2029
2029
|
}, this.abort = function() {
|
|
2030
2030
|
re = !0;
|
|
2031
2031
|
}, this.getCharIndex = function() {
|
|
2032
|
-
return
|
|
2032
|
+
return q;
|
|
2033
2033
|
};
|
|
2034
2034
|
}
|
|
2035
2035
|
function R(m) {
|
|
@@ -2039,16 +2039,16 @@ function Pr() {
|
|
|
2039
2039
|
var T = { abort: function() {
|
|
2040
2040
|
C = !0, E(f.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
2041
2041
|
}, pause: G, resume: G };
|
|
2042
|
-
if (
|
|
2042
|
+
if ($(g.userStep)) {
|
|
2043
2043
|
for (var N = 0; N < f.results.data.length && (g.userStep({ data: f.results.data[N], errors: f.results.errors, meta: f.results.meta }, T), !C); N++) ;
|
|
2044
2044
|
delete f.results;
|
|
2045
|
-
} else
|
|
2045
|
+
} else $(g.userChunk) && (g.userChunk(f.results, T, f.file), delete f.results);
|
|
2046
2046
|
}
|
|
2047
2047
|
f.finished && !C && E(f.workerId, f.results);
|
|
2048
2048
|
}
|
|
2049
2049
|
function E(m, f) {
|
|
2050
2050
|
var g = o[m];
|
|
2051
|
-
|
|
2051
|
+
$(g.userComplete) && g.userComplete(f), g.terminate(), delete o[m];
|
|
2052
2052
|
}
|
|
2053
2053
|
function G() {
|
|
2054
2054
|
throw new Error("Not implemented.");
|
|
@@ -2064,72 +2064,72 @@ function Pr() {
|
|
|
2064
2064
|
m.apply(f, arguments);
|
|
2065
2065
|
};
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function $(m) {
|
|
2068
2068
|
return typeof m == "function";
|
|
2069
2069
|
}
|
|
2070
2070
|
return c.parse = function(m, f) {
|
|
2071
2071
|
var g = (f = f || {}).dynamicTyping || !1;
|
|
2072
|
-
if (
|
|
2072
|
+
if ($(g) && (f.dynamicTypingFunction = g, g = {}), f.dynamicTyping = g, f.transform = !!$(f.transform) && f.transform, f.downloadTimeout !== void 0) {
|
|
2073
2073
|
var g = parseInt(f.downloadTimeout);
|
|
2074
2074
|
if (isNaN(g)) throw new Error("Config downloadTimeout value (" + f.downloadTimeout + ") not parsable by parseInt(val).");
|
|
2075
2075
|
f.downloadTimeout = g;
|
|
2076
2076
|
}
|
|
2077
|
-
if (!f.worker || !c.WORKERS_SUPPORTED) return g = null, c.NODE_STREAM_INPUT, typeof m == "string" ? (m = l(m), g = new (f.download ? d : y)(f)) : m.readable === !0 &&
|
|
2077
|
+
if (!f.worker || !c.WORKERS_SUPPORTED) return g = null, c.NODE_STREAM_INPUT, typeof m == "string" ? (m = l(m), g = new (f.download ? d : y)(f)) : m.readable === !0 && $(m.read) && $(m.on) ? g = new _(f) : (i.File && m instanceof File || m instanceof Object) && (g = new h(f)), g.stream(m);
|
|
2078
2078
|
(g = (() => {
|
|
2079
2079
|
var C;
|
|
2080
2080
|
return !!c.WORKERS_SUPPORTED && (C = (() => {
|
|
2081
2081
|
var T = i.URL || i.webkitURL || null, N = t.toString();
|
|
2082
2082
|
return c.BLOB_URL || (c.BLOB_URL = T.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", N, ")();"], { type: "text/javascript" })));
|
|
2083
2083
|
})(), (C = new i.Worker(C)).onmessage = R, C.id = a++, o[C.id] = C);
|
|
2084
|
-
})()).userStep = f.step, g.userChunk = f.chunk, g.userComplete = f.complete, g.userError = f.error, f.step =
|
|
2084
|
+
})()).userStep = f.step, g.userChunk = f.chunk, g.userComplete = f.complete, g.userError = f.error, f.step = $(f.step), f.chunk = $(f.chunk), f.complete = $(f.complete), f.error = $(f.error), delete f.worker, g.postMessage({ input: m, config: f, workerId: g.id });
|
|
2085
2085
|
}, c.unparse = function(m, f) {
|
|
2086
2086
|
var g = !1, C = !0, T = ",", N = `\r
|
|
2087
|
-
`, oe = '"',
|
|
2087
|
+
`, oe = '"', we = oe + oe, be = !1, ee = null, ue = !1, q = ((() => {
|
|
2088
2088
|
if (typeof f == "object") {
|
|
2089
|
-
if (typeof f.delimiter != "string" || c.BAD_DELIMITERS.filter(function(
|
|
2090
|
-
return f.delimiter.indexOf(
|
|
2091
|
-
}).length || (T = f.delimiter), typeof f.quotes != "boolean" && typeof f.quotes != "function" && !Array.isArray(f.quotes) || (g = f.quotes), typeof f.skipEmptyLines != "boolean" && typeof f.skipEmptyLines != "string" || (
|
|
2089
|
+
if (typeof f.delimiter != "string" || c.BAD_DELIMITERS.filter(function(b) {
|
|
2090
|
+
return f.delimiter.indexOf(b) !== -1;
|
|
2091
|
+
}).length || (T = f.delimiter), typeof f.quotes != "boolean" && typeof f.quotes != "function" && !Array.isArray(f.quotes) || (g = f.quotes), typeof f.skipEmptyLines != "boolean" && typeof f.skipEmptyLines != "string" || (be = f.skipEmptyLines), typeof f.newline == "string" && (N = f.newline), typeof f.quoteChar == "string" && (oe = f.quoteChar, we = oe + oe), typeof f.header == "boolean" && (C = f.header), Array.isArray(f.columns)) {
|
|
2092
2092
|
if (f.columns.length === 0) throw new Error("Option columns is empty");
|
|
2093
2093
|
ee = f.columns;
|
|
2094
2094
|
}
|
|
2095
|
-
f.escapeChar !== void 0 && (
|
|
2095
|
+
f.escapeChar !== void 0 && (we = f.escapeChar + oe), f.escapeFormulae instanceof RegExp ? ue = f.escapeFormulae : typeof f.escapeFormulae == "boolean" && f.escapeFormulae && (ue = /^[=+\-@\t\r].*$/);
|
|
2096
2096
|
}
|
|
2097
2097
|
})(), new RegExp(v(oe), "g"));
|
|
2098
2098
|
if (typeof m == "string" && (m = JSON.parse(m)), Array.isArray(m)) {
|
|
2099
|
-
if (!m.length || Array.isArray(m[0])) return re(null, m,
|
|
2100
|
-
if (typeof m[0] == "object") return re(ee || Object.keys(m[0]), m,
|
|
2101
|
-
} else if (typeof m == "object") return typeof m.data == "string" && (m.data = JSON.parse(m.data)), Array.isArray(m.data) && (m.fields || (m.fields = m.meta && m.meta.fields || ee), m.fields || (m.fields = Array.isArray(m.data[0]) ? m.fields : typeof m.data[0] == "object" ? Object.keys(m.data[0]) : []), Array.isArray(m.data[0]) || typeof m.data[0] == "object" || (m.data = [m.data])), re(m.fields || [], m.data || [],
|
|
2099
|
+
if (!m.length || Array.isArray(m[0])) return re(null, m, be);
|
|
2100
|
+
if (typeof m[0] == "object") return re(ee || Object.keys(m[0]), m, be);
|
|
2101
|
+
} else if (typeof m == "object") return typeof m.data == "string" && (m.data = JSON.parse(m.data)), Array.isArray(m.data) && (m.fields || (m.fields = m.meta && m.meta.fields || ee), m.fields || (m.fields = Array.isArray(m.data[0]) ? m.fields : typeof m.data[0] == "object" ? Object.keys(m.data[0]) : []), Array.isArray(m.data[0]) || typeof m.data[0] == "object" || (m.data = [m.data])), re(m.fields || [], m.data || [], be);
|
|
2102
2102
|
throw new Error("Unable to serialize unrecognized input");
|
|
2103
|
-
function re(
|
|
2104
|
-
var H = "", B = (typeof
|
|
2103
|
+
function re(b, w, Q) {
|
|
2104
|
+
var H = "", B = (typeof b == "string" && (b = JSON.parse(b)), typeof w == "string" && (w = JSON.parse(w)), Array.isArray(b) && 0 < b.length), Ee = !Array.isArray(w[0]);
|
|
2105
2105
|
if (B && C) {
|
|
2106
|
-
for (var
|
|
2107
|
-
0 <
|
|
2106
|
+
for (var j = 0; j < b.length; j++) 0 < j && (H += T), H += I(b[j], j);
|
|
2107
|
+
0 < w.length && (H += N);
|
|
2108
2108
|
}
|
|
2109
|
-
for (var Y = 0; Y <
|
|
2110
|
-
var ae = (B ?
|
|
2111
|
-
if (Q && !B && (
|
|
2109
|
+
for (var Y = 0; Y < w.length; Y++) {
|
|
2110
|
+
var ae = (B ? b : w[Y]).length, P = !1, ce = B ? Object.keys(w[Y]).length === 0 : w[Y].length === 0;
|
|
2111
|
+
if (Q && !B && (P = Q === "greedy" ? w[Y].join("").trim() === "" : w[Y].length === 1 && w[Y][0].length === 0), Q === "greedy" && B) {
|
|
2112
2112
|
for (var de = [], J = 0; J < ae; J++) {
|
|
2113
|
-
var ie = Ee ?
|
|
2114
|
-
de.push(
|
|
2113
|
+
var ie = Ee ? b[J] : J;
|
|
2114
|
+
de.push(w[Y][ie]);
|
|
2115
2115
|
}
|
|
2116
|
-
|
|
2116
|
+
P = de.join("").trim() === "";
|
|
2117
2117
|
}
|
|
2118
|
-
if (!
|
|
2119
|
-
for (var
|
|
2120
|
-
0 <
|
|
2121
|
-
var Te = B && Ee ?
|
|
2122
|
-
H +=
|
|
2118
|
+
if (!P) {
|
|
2119
|
+
for (var K = 0; K < ae; K++) {
|
|
2120
|
+
0 < K && !ce && (H += T);
|
|
2121
|
+
var Te = B && Ee ? b[K] : K;
|
|
2122
|
+
H += I(w[Y][Te], K);
|
|
2123
2123
|
}
|
|
2124
|
-
Y <
|
|
2124
|
+
Y < w.length - 1 && (!Q || 0 < ae && !ce) && (H += N);
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
return H;
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2129
|
+
function I(b, w) {
|
|
2130
2130
|
var Q, H, B;
|
|
2131
|
-
return
|
|
2132
|
-
for (var Y = 0; Y <
|
|
2131
|
+
return b == null ? "" : b.constructor === Date ? isNaN(b.getTime()) ? "" : b.toISOString() : (B = !1, ue && typeof b == "string" && ue.test(b) && (b = "'" + b, B = !0), H = (Q = b.toString()).replace(q, we), (B = B || g === !0 || typeof g == "function" && g(b, w) || Array.isArray(g) && g[w] || ((Ee, j) => {
|
|
2132
|
+
for (var Y = 0; Y < j.length; Y++) if (-1 < Ee.indexOf(j[Y])) return !0;
|
|
2133
2133
|
return !1;
|
|
2134
2134
|
})(H, c.BAD_DELIMITERS) || -1 < H.indexOf(T) || -1 < Q.indexOf(oe) || H.charAt(0) === " " || H.charAt(H.length - 1) === " ") ? oe + H + oe : H);
|
|
2135
2135
|
}
|
|
@@ -2140,8 +2140,8 @@ function Pr() {
|
|
|
2140
2140
|
});
|
|
2141
2141
|
})(_t)), _t.exports;
|
|
2142
2142
|
}
|
|
2143
|
-
var
|
|
2144
|
-
const
|
|
2143
|
+
var Fr = Hr(), tt = /* @__PURE__ */ ((s) => (s.String = "string", s.Number = "number", s.Boolean = "boolean", s.Object = "object", s.Undefined = "undefined", s))(tt || {});
|
|
2144
|
+
const $r = ["id"], Ur = /* @__PURE__ */ _e({
|
|
2145
2145
|
__name: "VueJsonCsv",
|
|
2146
2146
|
props: {
|
|
2147
2147
|
data: {
|
|
@@ -2211,7 +2211,7 @@ const Fr = ["id"], Ur = /* @__PURE__ */ _e({
|
|
|
2211
2211
|
return;
|
|
2212
2212
|
}
|
|
2213
2213
|
t("export-started", r.value);
|
|
2214
|
-
let u =
|
|
2214
|
+
let u = Fr.unparse(r.value, Object.assign({
|
|
2215
2215
|
delimiter: i.delimiter,
|
|
2216
2216
|
encoding: i.encoding
|
|
2217
2217
|
}));
|
|
@@ -2220,7 +2220,7 @@ const Fr = ["id"], Ur = /* @__PURE__ */ _e({
|
|
|
2220
2220
|
const d = new Blob([u], {
|
|
2221
2221
|
type: "text/csv;charset=" + i.encoding
|
|
2222
2222
|
});
|
|
2223
|
-
|
|
2223
|
+
Pr.saveAs(d, i.filename);
|
|
2224
2224
|
}
|
|
2225
2225
|
};
|
|
2226
2226
|
return (u, d) => (O(), ne("div", {
|
|
@@ -2231,9 +2231,9 @@ const Fr = ["id"], Ur = /* @__PURE__ */ _e({
|
|
|
2231
2231
|
Ze(u.$slots, "default", {}, () => [
|
|
2232
2232
|
Ve("Download " + se(s.filename), 1)
|
|
2233
2233
|
])
|
|
2234
|
-
], 8,
|
|
2234
|
+
], 8, $r));
|
|
2235
2235
|
}
|
|
2236
|
-
}),
|
|
2236
|
+
}), Br = /* @__PURE__ */ _e({
|
|
2237
2237
|
__name: "DownloadCsv",
|
|
2238
2238
|
props: {
|
|
2239
2239
|
rows: {},
|
|
@@ -2249,43 +2249,43 @@ const Fr = ["id"], Ur = /* @__PURE__ */ _e({
|
|
|
2249
2249
|
filename: s.filename,
|
|
2250
2250
|
labels: s.headers
|
|
2251
2251
|
}, {
|
|
2252
|
-
default:
|
|
2252
|
+
default: U(() => [
|
|
2253
2253
|
Ze(i.$slots, "default")
|
|
2254
2254
|
]),
|
|
2255
2255
|
_: 3
|
|
2256
2256
|
}, 8, ["data", "fields", "filename", "labels"])
|
|
2257
2257
|
]));
|
|
2258
2258
|
}
|
|
2259
|
-
}),
|
|
2260
|
-
renderer:
|
|
2261
|
-
pdfExport:
|
|
2262
|
-
csvExport:
|
|
2263
|
-
chartLabels:
|
|
2259
|
+
}), Wr = { not_configured: { title: "Chart is not fully configured", description: "Begin by choosing at least one metric" }, noQueryBridge: "No query bridge provided. Unable to render dashboard.", noScatterDataFn: "No scatter data provider supplied.", unexpectedError: "An unexpected error has occurred.", trendRange: { "24h": "Last 24-hour summary", "7d": "Last 7-day summary", "30d": "Last 30-day summary" }, edit: "Edit", duplicateTile: "Duplicate", exit_fullscreen: "Exit fullscreen", fullscreen: "Fullscreen", remove: "Remove", delete: "Delete", as_of_today: "As of today" }, Gr = { branding: "Kong Konnect", generated: "Generated {timestamp}", dashboardNote: "For a live, interactive experience, open this dashboard in Konnect", pageOf: "{page} / {total}" }, Yr = { defaultFilename: "Chart export", exportAsCsv: "Export as CSV", dataError: "Error loading data", noDataRange: "No data in selected range", noDataRetry: "Please adjust the time period and try again", timeRangeSelected: "selected", exportPreview: "Export preview", exportTimeRange: "Time range", exportDescription: "Exports a CSV of the data represented in the chart.", maximumRecordAmount: "The number of groups is limited to {value}", previewRows: "Previewing {rowsMax} of {rowsTotal} row{plural}", downloadButton: "Export", cancelButton: "Cancel", UtcOffset: "UTC offset", Timestamp: "Timestamp" }, jr = { control_plane: "Control plane", data_plane_node_version: "Data plane node version", env: "Environment", gateway_service: "Gateway service", hostname: "Hostname", plugin: "Plugin", plugin_name: "Plugin name", plugin_scope: "Plugin scope", region: "Region", request_count: "Request count", route: "Route", status_code: "Status code", team: "Team", name: "Name", ai_count: "LLM request count", ai_plugin: "AI plugin", ai_provider: "Provider", ai_request_model: "Request model", ai_response_model: "Response model", error_rate: "Error rate", request_per_minute: "Requests per minute", requests_per_minute: "Requests per minute", response_latency_average: "Response latency (avg)", response_latency_p99: "Response latency (p99)", response_latency_p95: "Response latency (p95)", response_latency_p50: "Response latency (p50)", kong_latency_average: "Kong latency (avg)", kong_latency_p99: "Kong latency (p99)", kong_latency_p95: "Kong latency (p95)", kong_latency_p50: "Kong latency (p50)", kong_internal_latency_average: "Kong internal latency (avg)", kong_internal_latency_p99: "Kong internal latency (p99)", kong_internal_latency_p95: "Kong internal latency (p95)", kong_internal_latency_p50: "Kong internal latency (p50)", llm_cache_status: "Cache status", llm_embeddings_model: "Embeddings model", llm_embeddings_provider: "Embeddings provider", upstream_latency_average: "Upstream latency (avg)", upstream_latency_p99: "Upstream latency (p99)", upstream_latency_p95: "Upstream latency (p95)", upstream_latency_p50: "Upstream latency (p50)", response_size_p99: "Response size (p99)", response_size_p95: "Response size (p95)", response_size_p50: "Response size (p50)", response_size_average: "Response size (avg)", response_size_sum: "Response size (sum)", response_source: "Response source", request_size_p99: "Request size (p99)", request_size_p95: "Request size (p95)", request_size_p50: "Request size (p50)", request_size_average: "Request size (avg)", request_size_sum: "Request size (sum)", total_tokens_per_minute: "Total tokens per minute", control_plane_group: "Control plane group", consumer: "Consumer", country_code: "Country", country: "Country", data_plane_node: "Data plane node", api_package: "API package", api_product: "API product", api_product_version: "API product version", portal: "Portal", realm: "Realm", runtime_group: "Runtime group", application: "Application", status_code_grouped: "Status code (grouped)", upstream_status_code: "Upstream status code", upstream_status_code_grouped: "Upstream status code group", time: "Time", Service: "Service", ServiceVersion: "Service version", Route: "Route", Application: "Application", RuntimeGroup: "Runtime group", GatewayService: "Gateway service", StatusCode: "Status code", CodeClass: "Status code (grouped)", Time: "Time", API_PRODUCT: "Api product", API_PRODUCT_VERSION: "API product version", RUNTIME_GROUP: "Runtime group", GATEWAY_SERVICE: "Gateway service", ROUTE: "Route", APPLICATION: "Application", STATUS_CODE: "Status code", STATUS_CODE_GROUPED: "Status code (grouped)", TIME: "Time", ORGANIZATION: "Organization", TotalRequests: "Request count", RequestsPerMinute: "Requests per minute", LatencyP99: "Response latency (p99)", LatencyP95: "Response latency (p95)", LatencyP50: "Response latency (p50)", LatencyAverage: "Response latency (avg)", UpstreamLatencyP99: "Upstream latency (p99)", UpstreamLatencyP95: "Upstream latency (p95)", UpstreamLatencyP50: "Upstream latency (p50)", UpstreamLatencyAverage: "Upstream latency (avg)", KongLatencyP99: "Kong latency (p99)", KongLatencyP95: "Kong latency (p95)", KongLatencyP50: "Kong latency (p50)", KongLatencyAverage: "Kong latency (avg)", ResponseSizeP99: "Response size (p99)", ResponseSizeP95: "Response size (p95)", ResponseSizeP50: "Response size (p50)", RequestSizeP99: "Request size (p99)", RequestSizeP95: "Request size (p95)", RequestSizeP50: "Request size (p50)", SuccessfulRequests: "Successful requests", SUCCESS: "Successful requests", FailedRequests: "Failed requests", FAILURE: "Failed requests", "5XX": "5xx", "4XX": "4xx", "3XX": "3xx", "2XX": "2xx", "1XX": "1xx", REQUEST_COUNT: "Request count", REQUEST_PER_MINUTE: "Requests per minute", RESPONSE_LATENCY_P99: "Response latency", RESPONSE_LATENCY_P95: "Response latency", RESPONSE_LATENCY_P50: "Response latency", RESPONSE_SIZE_P99: "Response size (p99)", RESPONSE_SIZE_P95: "Response size (p95)", RESPONSE_SIZE_P50: "Response size (p50)", REQUEST_SIZE_P99: "Request size (p99)", REQUEST_SIZE_P95: "Request size (p95)", REQUEST_SIZE_P50: "Request size (p50)", CONTROL_PLANE: "Control plane", ____OTHER____: "Others", ai_request_count: "Request count", total_tokens: "Total token count", prompt_tokens: "Prompt token count", completion_tokens: "Completion token count", cost: "Costs", cost_per_request_average: "Cost per request (avg)", llm_cache_embeddings_latency_average: "Embeddings latency (avg)", llm_cache_fetch_latency_average: "Fetch latency (avg)", llm_latency_average: "Llm latency (avg)", time_to_first_token_average: "Time to first token (avg)", time_to_first_token_p99: "Time to first token (p99)", time_to_first_token_p95: "Time to first token (p95)", time_to_first_token_p50: "Time to first token (p50)", time_per_token_average: "Time per token (avg)", time_per_token_p99: "Time per token (p99)", time_per_token_p95: "Time per token (p95)", time_per_token_p50: "Time per token (p50)", "threshold-warning": "Warning threshold: {value}", "threshold-error": "Error threshold: {value}", "thatreshold-neutral": "Alert threshold: {value}", api: "API", vulnerability_count: "Vulnerability count", a2a_latency_average: "A2A latency (avg)", a2a_response_size_sum: "A2A response size (sum)", a2a_context_id: "A2A context ID", a2a_error: "A2A error", a2a_method: "A2A method", a2a_task_id: "A2A task ID", active_agents: "Active agents", mcp_error: "MCP error", mcp_method: "MCP method", mcp_latency_average: "MCP latency (avg)", mcp_latency_p99: "MCP latency (p99)", mcp_latency_p95: "MCP latency (p95)", mcp_latency_p50: "MCP latency (p50)", mcp_response_size_sum: "MCP response size (sum)", mcp_session_id: "MCP session ID", mcp_tool_name: "MCP tool name", mcp_response_body_size_sum: "MCP response size (sum)", control_plane_count: "Control plane count", service_count: "Gateway service count", "record_bytes:sum": "Record size (sum)", "record_count:sum": "Record count (sum)", "request_count:sum": "Request count (sum)", route_count: "Route count", consumer_count: "Consumer count", plugin_count: "Plugin count", node_count: "Data plane node count", virtual_cluster_id: "Virtual cluster", backend_cluster_id: "Backend cluster", listener_id: "Listener", principal_name: "Principal name", principal_type: "Principal type", request_type: "Request type", topic_name: "Topic name", partition_index: "Partition index", api_key: "API key", data_plane_group: "Data plane group", managed_cache: "Managed cache", network: "Network", provider: "Provider", provider_region: "Provider region", cache_eviction_rate: "Cache eviction rate", cache_expiration_rate: "Cache expiration rate", cache_items_average: "Cache items (avg)", cache_memory_utilization_max: "Cache memory utilization (max)", cache_status: "Cache status", cache_hit_rate: "Cache hit rate" }, Kr = "Explore", Xr = "View requests", Qr = "Limited timeframe", Vr = "The selected timeframe exceeds what this datasource supports, so this tile is limited to the maximum supported timeframe.", Zr = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Jr = { daily: "1 day", fiveMinutely: "5 minutes", hourly: "1 hour", minutely: "1 minute", tenMinutely: "10 minutes", tenSecondly: "10 seconds", thirtyMinutely: "30 minutes", thirtySecondly: "30 seconds", twelveHourly: "12 hours", twoHourly: "2 hours", weekly: "1 week", unknown: "Unknown" }, ys = {
|
|
2260
|
+
renderer: Wr,
|
|
2261
|
+
pdfExport: Gr,
|
|
2262
|
+
csvExport: Yr,
|
|
2263
|
+
chartLabels: jr,
|
|
2264
2264
|
jumpToExplore: Kr,
|
|
2265
|
-
jumpToRequests:
|
|
2266
|
-
unsupported_time_range_badge:
|
|
2267
|
-
unsupported_time_range_warning:
|
|
2268
|
-
query_aged_out_warning:
|
|
2269
|
-
granularities:
|
|
2265
|
+
jumpToRequests: Xr,
|
|
2266
|
+
unsupported_time_range_badge: Qr,
|
|
2267
|
+
unsupported_time_range_warning: Vr,
|
|
2268
|
+
query_aged_out_warning: Zr,
|
|
2269
|
+
granularities: Jr
|
|
2270
2270
|
};
|
|
2271
2271
|
function vs() {
|
|
2272
|
-
const s =
|
|
2272
|
+
const s = Bs("en-us", ys);
|
|
2273
2273
|
return {
|
|
2274
2274
|
i18n: s,
|
|
2275
|
-
i18nT:
|
|
2275
|
+
i18nT: Ws(s)
|
|
2276
2276
|
// Translation component <i18n-t>
|
|
2277
2277
|
};
|
|
2278
2278
|
}
|
|
2279
|
-
const pt = 170, ti = 6, He = "analytics-query-provider",
|
|
2280
|
-
function
|
|
2281
|
-
const s =
|
|
2279
|
+
const pt = 170, ti = 6, He = "analytics-query-provider", Li = "{entity-id}", eo = "{cp-id}", to = "{timeframe}", io = 30 * 1e3, so = 3e5, no = 36e5;
|
|
2280
|
+
function ro() {
|
|
2281
|
+
const s = Pe(He);
|
|
2282
2282
|
return {
|
|
2283
2283
|
evaluateFeatureFlag: (t, i) => s ? s.evaluateFeatureFlagFn(t, i) : i
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
|
-
var Ft = { exports: {} },
|
|
2287
|
-
function
|
|
2288
|
-
return
|
|
2286
|
+
var Ft = { exports: {} }, Pi;
|
|
2287
|
+
function oo() {
|
|
2288
|
+
return Pi || (Pi = 1, (function(s) {
|
|
2289
2289
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
2290
2290
|
function i() {
|
|
2291
2291
|
}
|
|
@@ -2390,16 +2390,16 @@ function ro() {
|
|
|
2390
2390
|
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = t, a.EventEmitter = a, s.exports = a;
|
|
2391
2391
|
})(Ft)), Ft.exports;
|
|
2392
2392
|
}
|
|
2393
|
-
var
|
|
2394
|
-
const
|
|
2393
|
+
var ao = oo();
|
|
2394
|
+
const lo = /* @__PURE__ */ Ar(ao);
|
|
2395
2395
|
class ii extends Error {
|
|
2396
2396
|
name = "TimeoutError";
|
|
2397
2397
|
constructor(e, t) {
|
|
2398
2398
|
super(e, t), Error.captureStackTrace?.(this, ii);
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
|
-
const
|
|
2402
|
-
function
|
|
2401
|
+
const qi = (s) => s.reason ?? new DOMException("This operation was aborted.", "AbortError");
|
|
2402
|
+
function uo(s, e) {
|
|
2403
2403
|
const {
|
|
2404
2404
|
milliseconds: t,
|
|
2405
2405
|
fallback: i,
|
|
@@ -2412,11 +2412,11 @@ function lo(s, e) {
|
|
|
2412
2412
|
if (typeof t != "number" || Math.sign(t) !== 1)
|
|
2413
2413
|
throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);
|
|
2414
2414
|
if (o?.aborted) {
|
|
2415
|
-
h(
|
|
2415
|
+
h(qi(o));
|
|
2416
2416
|
return;
|
|
2417
2417
|
}
|
|
2418
2418
|
if (o && (c = () => {
|
|
2419
|
-
h(
|
|
2419
|
+
h(qi(o));
|
|
2420
2420
|
}, o.addEventListener("abort", c, { once: !0 })), s.then(d, h), t === Number.POSITIVE_INFINITY)
|
|
2421
2421
|
return;
|
|
2422
2422
|
const y = new ii();
|
|
@@ -2438,7 +2438,7 @@ function lo(s, e) {
|
|
|
2438
2438
|
r.clearTimeout.call(void 0, a), a = void 0;
|
|
2439
2439
|
}, u;
|
|
2440
2440
|
}
|
|
2441
|
-
function
|
|
2441
|
+
function co(s, e, t) {
|
|
2442
2442
|
let i = 0, n = s.length;
|
|
2443
2443
|
for (; n > 0; ) {
|
|
2444
2444
|
const r = Math.trunc(n / 2);
|
|
@@ -2447,7 +2447,7 @@ function uo(s, e, t) {
|
|
|
2447
2447
|
}
|
|
2448
2448
|
return i;
|
|
2449
2449
|
}
|
|
2450
|
-
const
|
|
2450
|
+
const ho = 100;
|
|
2451
2451
|
class Hi {
|
|
2452
2452
|
#t = [];
|
|
2453
2453
|
// The queue is stored as a sorted array, but dequeued items are left before `#head` until compaction. Only items from `#head` onward are live, which keeps repeated dequeues amortized O(1).
|
|
@@ -2467,7 +2467,7 @@ class Hi {
|
|
|
2467
2467
|
return;
|
|
2468
2468
|
}
|
|
2469
2469
|
this.#r();
|
|
2470
|
-
const a =
|
|
2470
|
+
const a = co(this.#t, o, (c, l) => l.priority - c.priority);
|
|
2471
2471
|
this.#t.splice(a, 0, o);
|
|
2472
2472
|
}
|
|
2473
2473
|
setPriority(e, t) {
|
|
@@ -2485,7 +2485,7 @@ class Hi {
|
|
|
2485
2485
|
if (this.#e === this.#t.length)
|
|
2486
2486
|
return;
|
|
2487
2487
|
const e = this.#t[this.#e];
|
|
2488
|
-
return this.#e++, this.#e === this.#t.length ? (this.#t.length = 0, this.#e = 0) : this.#e >
|
|
2488
|
+
return this.#e++, this.#e === this.#t.length ? (this.#t.length = 0, this.#e = 0) : this.#e > ho && this.#e > this.#t.length / 2 && this.#r(), e?.run;
|
|
2489
2489
|
}
|
|
2490
2490
|
filter(e) {
|
|
2491
2491
|
const t = [];
|
|
@@ -2502,7 +2502,7 @@ class Hi {
|
|
|
2502
2502
|
this.#e !== 0 && (this.#t.splice(0, this.#e), this.#e = 0);
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
|
-
class
|
|
2505
|
+
class fo extends lo {
|
|
2506
2506
|
#t;
|
|
2507
2507
|
#e;
|
|
2508
2508
|
#r = 0;
|
|
@@ -2513,7 +2513,7 @@ class ho extends ao {
|
|
|
2513
2513
|
/*
|
|
2514
2514
|
Timestamp when the current interval window ends. Kept accurate at every window transition: `#initializeIntervalIfNeeded` sets it when a window starts and `#onInterval` advances it as the recurring timer rolls into each new window. This is the source of truth for whether a task added after the queue goes idle belongs to a fresh window, so it must not go stale.
|
|
2515
2515
|
*/
|
|
2516
|
-
#
|
|
2516
|
+
#w = 0;
|
|
2517
2517
|
// Recurring timer that drives windows while the queue is actively processing. Absent (`undefined`) once the queue goes idle.
|
|
2518
2518
|
#l;
|
|
2519
2519
|
// One-shot timer used while idle to resume at the next window boundary, since `#intervalId` is cleared when idle.
|
|
@@ -2532,7 +2532,7 @@ class ho extends ao {
|
|
|
2532
2532
|
#M = 1n;
|
|
2533
2533
|
// Track currently running tasks for debugging
|
|
2534
2534
|
#y = /* @__PURE__ */ new Map();
|
|
2535
|
-
#
|
|
2535
|
+
#b = /* @__PURE__ */ new Set();
|
|
2536
2536
|
/**
|
|
2537
2537
|
Get or set the default timeout for all tasks. Can be changed at runtime.
|
|
2538
2538
|
|
|
@@ -2585,22 +2585,22 @@ class ho extends ao {
|
|
|
2585
2585
|
#N(e) {
|
|
2586
2586
|
this.#a ? this.#o.push(e) : this.#r++;
|
|
2587
2587
|
}
|
|
2588
|
-
#
|
|
2588
|
+
#A() {
|
|
2589
2589
|
this.#a ? this.#o.length > this.#n && this.#o.pop() : this.#r > 0 && this.#r--;
|
|
2590
2590
|
}
|
|
2591
2591
|
#E() {
|
|
2592
2592
|
return this.#o.length - this.#n;
|
|
2593
2593
|
}
|
|
2594
|
-
get #
|
|
2594
|
+
get #I() {
|
|
2595
2595
|
return this.#e ? !0 : this.#a ? this.#E() < this.#f : this.#r < this.#f;
|
|
2596
2596
|
}
|
|
2597
|
-
get #
|
|
2597
|
+
get #L() {
|
|
2598
2598
|
return this.#s < this.#g;
|
|
2599
2599
|
}
|
|
2600
|
-
#
|
|
2600
|
+
#P() {
|
|
2601
2601
|
this.#s--, this.#s === 0 && this.emit("pendingZero"), this.#v(), this.emit("next");
|
|
2602
2602
|
}
|
|
2603
|
-
#
|
|
2603
|
+
#q() {
|
|
2604
2604
|
this.#c = void 0, this.#O(), this.#D();
|
|
2605
2605
|
}
|
|
2606
2606
|
#H(e) {
|
|
@@ -2612,7 +2612,7 @@ class ho extends ao {
|
|
|
2612
2612
|
return !1;
|
|
2613
2613
|
}
|
|
2614
2614
|
if (this.#l === void 0) {
|
|
2615
|
-
const t = this.#
|
|
2615
|
+
const t = this.#w - e;
|
|
2616
2616
|
if (t < 0)
|
|
2617
2617
|
this.#r = this.#t ? this.#s : 0;
|
|
2618
2618
|
else
|
|
@@ -2622,7 +2622,7 @@ class ho extends ao {
|
|
|
2622
2622
|
}
|
|
2623
2623
|
#T(e) {
|
|
2624
2624
|
this.#c === void 0 && (this.#c = setTimeout(() => {
|
|
2625
|
-
this.#
|
|
2625
|
+
this.#q();
|
|
2626
2626
|
}, e));
|
|
2627
2627
|
}
|
|
2628
2628
|
#C() {
|
|
@@ -2645,7 +2645,7 @@ class ho extends ao {
|
|
|
2645
2645
|
let e = !1;
|
|
2646
2646
|
if (!this.#d) {
|
|
2647
2647
|
const t = Date.now(), i = !this.#H(t);
|
|
2648
|
-
if (this.#
|
|
2648
|
+
if (this.#I && this.#L) {
|
|
2649
2649
|
const n = this.#i.dequeue();
|
|
2650
2650
|
this.#e || (this.#N(t), this.#m()), i && this.#D(), this.emit("active"), n(), e = !0;
|
|
2651
2651
|
}
|
|
@@ -2655,10 +2655,10 @@ class ho extends ao {
|
|
|
2655
2655
|
#D() {
|
|
2656
2656
|
this.#e || this.#l !== void 0 || this.#a || (this.#l = setInterval(() => {
|
|
2657
2657
|
this.#O();
|
|
2658
|
-
}, this.#u), this.#
|
|
2658
|
+
}, this.#u), this.#w = Date.now() + this.#u);
|
|
2659
2659
|
}
|
|
2660
2660
|
#O() {
|
|
2661
|
-
this.#a || (this.#l !== void 0 && (this.#r === 0 && this.#s === 0 ? this.#C() : this.#
|
|
2661
|
+
this.#a || (this.#l !== void 0 && (this.#r === 0 && this.#s === 0 ? this.#C() : this.#w = Date.now() + this.#u), this.#r = this.#t ? this.#s : 0), this.#k(), this.#m();
|
|
2662
2662
|
}
|
|
2663
2663
|
/**
|
|
2664
2664
|
Executes all queued functions until it reaches the limit.
|
|
@@ -2741,10 +2741,10 @@ class ho extends ao {
|
|
|
2741
2741
|
try {
|
|
2742
2742
|
t.signal?.throwIfAborted();
|
|
2743
2743
|
} catch (h) {
|
|
2744
|
-
throw this
|
|
2744
|
+
throw this.#$(), this.#y.delete(r), h;
|
|
2745
2745
|
}
|
|
2746
2746
|
let u = e({ signal: t.signal });
|
|
2747
|
-
if (t.timeout !== void 0 && (u =
|
|
2747
|
+
if (t.timeout !== void 0 && (u = uo(Promise.resolve(u), {
|
|
2748
2748
|
milliseconds: t.timeout,
|
|
2749
2749
|
message: `Task timed out after ${t.timeout}ms (queue has ${this.#s} running, ${this.#i.size} waiting)`
|
|
2750
2750
|
})), t.signal) {
|
|
@@ -2761,7 +2761,7 @@ class ho extends ao {
|
|
|
2761
2761
|
n(u), this.emit("error", u);
|
|
2762
2762
|
} finally {
|
|
2763
2763
|
l && t.signal?.removeEventListener("abort", l), this.#y.delete(r), queueMicrotask(() => {
|
|
2764
|
-
this.#
|
|
2764
|
+
this.#P();
|
|
2765
2765
|
});
|
|
2766
2766
|
}
|
|
2767
2767
|
};
|
|
@@ -2778,12 +2778,12 @@ class ho extends ao {
|
|
|
2778
2778
|
o(), c(), n(l.reason), this.#v(), this.emit("next");
|
|
2779
2779
|
};
|
|
2780
2780
|
if (o = () => {
|
|
2781
|
-
l.removeEventListener("abort", u), this.#
|
|
2781
|
+
l.removeEventListener("abort", u), this.#b.delete(o);
|
|
2782
2782
|
}, l.aborted) {
|
|
2783
2783
|
u();
|
|
2784
2784
|
return;
|
|
2785
2785
|
}
|
|
2786
|
-
l.addEventListener("abort", u, { once: !0 }), this.#
|
|
2786
|
+
l.addEventListener("abort", u, { once: !0 }), this.#b.add(o);
|
|
2787
2787
|
}
|
|
2788
2788
|
this.emit("add"), this.#v();
|
|
2789
2789
|
});
|
|
@@ -2807,7 +2807,7 @@ class ho extends ao {
|
|
|
2807
2807
|
Clear the queue.
|
|
2808
2808
|
*/
|
|
2809
2809
|
clear() {
|
|
2810
|
-
for (const e of this.#
|
|
2810
|
+
for (const e of this.#b)
|
|
2811
2811
|
e();
|
|
2812
2812
|
this.#i = new this.#R(), this.#C(), this.#z(), this.emit("empty"), this.#s === 0 && (this.#S(), this.emit("idle")), this.emit("next");
|
|
2813
2813
|
}
|
|
@@ -2947,8 +2947,8 @@ class ho extends ao {
|
|
|
2947
2947
|
this.#_ = !1, this.#z();
|
|
2948
2948
|
}));
|
|
2949
2949
|
}
|
|
2950
|
-
|
|
2951
|
-
this.#e || (this.#
|
|
2950
|
+
#$() {
|
|
2951
|
+
this.#e || (this.#A(), this.#m());
|
|
2952
2952
|
}
|
|
2953
2953
|
#z() {
|
|
2954
2954
|
const e = this.#p;
|
|
@@ -3038,15 +3038,15 @@ class ho extends ao {
|
|
|
3038
3038
|
}));
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
|
-
const
|
|
3042
|
-
const s = ei(), e =
|
|
3041
|
+
const mo = () => {
|
|
3042
|
+
const s = ei(), e = Pe(He);
|
|
3043
3043
|
if (!e)
|
|
3044
3044
|
return;
|
|
3045
3045
|
if (e.queryFnOverride) {
|
|
3046
3046
|
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.");
|
|
3047
3047
|
return;
|
|
3048
3048
|
}
|
|
3049
|
-
const t = new
|
|
3049
|
+
const t = new fo({
|
|
3050
3050
|
carryoverConcurrencyCount: !0,
|
|
3051
3051
|
concurrency: s.maxParallelRequests,
|
|
3052
3052
|
interval: s.requestInterval,
|
|
@@ -3056,40 +3056,164 @@ const fo = () => {
|
|
|
3056
3056
|
queryFnOverride: !0,
|
|
3057
3057
|
queryFn: (n, r) => t.add(() => e.queryFn(n, r))
|
|
3058
3058
|
};
|
|
3059
|
-
|
|
3059
|
+
Ts(He, i);
|
|
3060
|
+
};
|
|
3061
|
+
function po(s) {
|
|
3062
|
+
const e = `[${s.name}] ${s.message}`, t = [];
|
|
3063
|
+
return s.fix && t.push(`fix: ${s.fix}`), s.sources?.length && t.push(`sources: ${s.sources.join(", ")}`), s.docs && t.push(`see: ${s.docs}`), t.length === 0 ? e : [e, ...t.map((i, n) => `${n < t.length - 1 ? "├▶" : "╰▶"} ${i}`)].join(`
|
|
3064
|
+
`);
|
|
3065
|
+
}
|
|
3066
|
+
function Fi(s, ...e) {
|
|
3067
|
+
return typeof s == "function" ? s(...e) : s;
|
|
3068
|
+
}
|
|
3069
|
+
// @__NO_SIDE_EFFECTS__
|
|
3070
|
+
function go({ method: s = "warn", formatter: e = po } = {}) {
|
|
3071
|
+
return (t, { method: i = s } = {}) => {
|
|
3072
|
+
console[i](e(t));
|
|
3073
|
+
};
|
|
3074
|
+
}
|
|
3075
|
+
const yo = Error.captureStackTrace;
|
|
3076
|
+
var vo = class _s extends Error {
|
|
3077
|
+
name;
|
|
3078
|
+
/**
|
|
3079
|
+
* The diagnostic code, e.g. `MATH_E001`.
|
|
3080
|
+
* Also appears as the `name` property.
|
|
3081
|
+
*/
|
|
3082
|
+
code;
|
|
3083
|
+
/**
|
|
3084
|
+
* URL to extended documentation for this diagnostic code.
|
|
3085
|
+
* Auto-generated from {@link DefineDiagnosticsOptions.docsBase}.
|
|
3086
|
+
*/
|
|
3087
|
+
docs;
|
|
3088
|
+
/**
|
|
3089
|
+
* Optional actionable instructions on how to resolve the problem.
|
|
3090
|
+
*/
|
|
3091
|
+
fix;
|
|
3092
|
+
/**
|
|
3093
|
+
* Locations in user code that contributed to this diagnostic, in
|
|
3094
|
+
* `file:line:column` format. Relevant when the stack trace doesn't reflect
|
|
3095
|
+
* the user's source (e.g. compilers, bundlers), otherwise redundant with the
|
|
3096
|
+
* stack and should be omitted.
|
|
3097
|
+
*/
|
|
3098
|
+
sources;
|
|
3099
|
+
/**
|
|
3100
|
+
* Alias for {@link Error.message}: the reason this diagnostic was raised.
|
|
3101
|
+
*/
|
|
3102
|
+
get why() {
|
|
3103
|
+
return this.message;
|
|
3104
|
+
}
|
|
3105
|
+
/**
|
|
3106
|
+
* @param init structured initializer; `why` is required
|
|
3107
|
+
* @param captureFrom V8 stack-cutoff frame. Defaults to {@link Diagnostic}
|
|
3108
|
+
* so the top of the trace is the `new Diagnostic(...)` call site.
|
|
3109
|
+
* `defineDiagnostics` passes its action method to strip its own frames too.
|
|
3110
|
+
* Ignored on engines without `Error.captureStackTrace`.
|
|
3111
|
+
*/
|
|
3112
|
+
constructor(e, t = _s) {
|
|
3113
|
+
super(e.why, { cause: e.cause }), this.code = this.name = e.code, this.fix = e.fix, this.docs = e.docs, this.sources = e.sources, yo?.(this, t);
|
|
3114
|
+
}
|
|
3115
|
+
/**
|
|
3116
|
+
* Converts the diagnostic into a serializable structured object.
|
|
3117
|
+
*/
|
|
3118
|
+
toJSON() {
|
|
3119
|
+
return {
|
|
3120
|
+
name: this.name,
|
|
3121
|
+
why: this.why,
|
|
3122
|
+
fix: this.fix,
|
|
3123
|
+
docs: this.docs,
|
|
3124
|
+
sources: this.sources,
|
|
3125
|
+
cause: this.cause,
|
|
3126
|
+
stack: this.stack
|
|
3127
|
+
};
|
|
3128
|
+
}
|
|
3060
3129
|
};
|
|
3061
|
-
|
|
3062
|
-
|
|
3130
|
+
function _o(s, e) {
|
|
3131
|
+
return typeof s == "string" ? `${s}/${e.toLowerCase()}` : s?.(e);
|
|
3132
|
+
}
|
|
3133
|
+
// @__NO_SIDE_EFFECTS__
|
|
3134
|
+
function wo(s) {
|
|
3135
|
+
const e = s.reporters ?? [], t = {}, { docsBase: i } = s;
|
|
3136
|
+
for (const n of Object.keys(s.codes)) {
|
|
3137
|
+
const r = s.codes[n], o = r.docs === !1 ? void 0 : r.docs || _o(i, n), a = (c = {}, l = {}) => {
|
|
3138
|
+
const u = new vo({
|
|
3139
|
+
code: n,
|
|
3140
|
+
why: Fi(r.why, c),
|
|
3141
|
+
fix: Fi(r.fix, c),
|
|
3142
|
+
docs: o,
|
|
3143
|
+
cause: c.cause,
|
|
3144
|
+
sources: c.sources
|
|
3145
|
+
}, a);
|
|
3146
|
+
for (const d of e) d(u, l);
|
|
3147
|
+
return u;
|
|
3148
|
+
};
|
|
3149
|
+
t[n] = a;
|
|
3150
|
+
}
|
|
3151
|
+
return t;
|
|
3152
|
+
}
|
|
3153
|
+
const bo = typeof window < "u", xo = /* @__PURE__ */ wo({
|
|
3154
|
+
reporters: [/* @__PURE__ */ go()],
|
|
3155
|
+
codes: {
|
|
3156
|
+
PINIA_R1001: {
|
|
3157
|
+
why: 'Directly pass all stores to "mapStores()" without putting them in an array. This will fail in production.',
|
|
3158
|
+
fix: "Replace mapStores([useAuthStore, useCartStore]) with mapStores(useAuthStore, useCartStore).",
|
|
3159
|
+
docs: "https://pinia.vuejs.org/cookbook/options-api.html#Giving-access-to-the-whole-store"
|
|
3160
|
+
},
|
|
3161
|
+
PINIA_R1002: {
|
|
3162
|
+
why: (s) => `A getter cannot have the same name as another state property. Found "${s.name}" in store "${s.id}".`,
|
|
3163
|
+
fix: "Rename either the getter or the state property.",
|
|
3164
|
+
docs: "https://pinia.vuejs.org/core-concepts/getters.html#Accessing-other-getters"
|
|
3165
|
+
},
|
|
3166
|
+
PINIA_R1003: {
|
|
3167
|
+
why: (s) => `The "state" must be a plain object. Found in store "${s.id}".`,
|
|
3168
|
+
fix: "Return a plain object, e.g. avoid state: () => new MyClass().",
|
|
3169
|
+
docs: "https://pinia.vuejs.org/core-concepts/state.html#State"
|
|
3170
|
+
},
|
|
3171
|
+
PINIA_R1004: {
|
|
3172
|
+
why: "Pinia instance not found in context. This falls back to the global activePinia, which exposes you to cross-request pollution on the server.",
|
|
3173
|
+
fix: '"useStore()" is a composable and follows the same rules: call it at the top of setup() (or another composable), or pass the pinia instance explicitly when used outside of a component.',
|
|
3174
|
+
docs: "https://pinia.vuejs.org/ssr/#Using-the-store-outside-of-setup-"
|
|
3175
|
+
},
|
|
3176
|
+
PINIA_R1005: {
|
|
3177
|
+
why: (s) => `The store id changed from "${s.from}" to "${s.to}", forcing a reload.`,
|
|
3178
|
+
docs: "https://pinia.vuejs.org/cookbook/hot-module-replacement.html#HMR-Hot-Module-Replacement-"
|
|
3179
|
+
},
|
|
3180
|
+
PINIA_R1006: {
|
|
3181
|
+
why: (s) => `Property "${s.key}" of store "${s.id}" is not reactive (not a ref, reactive object, or shallowRef), so storeToRefs() ignores it.`,
|
|
3182
|
+
fix: "If it should be reactive state, wrap it with ref(), reactive(), or shallowRef(). If it is an intentional non-reactive property, wrap it with markRaw() so storeToRefs() skips it explicitly.",
|
|
3183
|
+
docs: "https://pinia.vuejs.org/core-concepts/plugins.html#Adding-new-external-properties"
|
|
3184
|
+
},
|
|
3185
|
+
PINIA_R1007: {
|
|
3186
|
+
why: (s) => `The same callback was passed to "$subscribe()" of store "${s.id}" more than once. Subscriptions are deduplicated, so the duplicate is ignored.`,
|
|
3187
|
+
fix: "Subscribe each callback only once. If you need to resubscribe, call the returned function to remove the previous subscription first, or create a new function.",
|
|
3188
|
+
docs: "https://pinia.vuejs.org/core-concepts/state.html#Subscribing-to-the-state"
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
3192
|
+
let $i;
|
|
3063
3193
|
process.env.NODE_ENV;
|
|
3064
3194
|
const Ui = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia") : (
|
|
3065
3195
|
/* istanbul ignore next */
|
|
3066
3196
|
/* @__PURE__ */ Symbol()
|
|
3067
3197
|
);
|
|
3068
|
-
var $i;
|
|
3069
|
-
(function(s) {
|
|
3070
|
-
s.direct = "direct", s.patchObject = "patch object", s.patchFunction = "patch function";
|
|
3071
|
-
})($i || ($i = {}));
|
|
3072
3198
|
process.env.NODE_ENV;
|
|
3073
3199
|
function ut(s) {
|
|
3074
|
-
const e =
|
|
3200
|
+
const e = Ss(s), t = {};
|
|
3075
3201
|
for (const i in e) {
|
|
3076
3202
|
const n = e[i];
|
|
3077
|
-
n
|
|
3078
|
-
x({
|
|
3203
|
+
n?.effect ? t[i] = x({
|
|
3079
3204
|
get: () => s[i],
|
|
3080
3205
|
set(r) {
|
|
3081
3206
|
s[i] = r;
|
|
3082
3207
|
}
|
|
3083
|
-
}) : (
|
|
3084
|
-
at(s, i));
|
|
3208
|
+
}) : (Ds(n) || Os(n)) && (t[i] = at(s, i));
|
|
3085
3209
|
}
|
|
3086
3210
|
return t;
|
|
3087
3211
|
}
|
|
3088
|
-
const
|
|
3212
|
+
const Le = (s) => s?.chart.type === "table", Yt = (s) => s?.query?.datasource === "requests", jt = (s) => !!s && !Le(s) && !Yt(s), Eo = (s, e) => {
|
|
3089
3213
|
const t = s.header_description ?? ("description" in s.chart ? s.chart.description : void 0);
|
|
3090
3214
|
if (t)
|
|
3091
|
-
return t.replaceAll(
|
|
3092
|
-
},
|
|
3215
|
+
return t.replaceAll(to, e) || void 0;
|
|
3216
|
+
}, Co = [
|
|
3093
3217
|
"basic",
|
|
3094
3218
|
"api_usage",
|
|
3095
3219
|
"llm_usage",
|
|
@@ -3098,21 +3222,21 @@ const Ie = (s) => s?.chart.type === "table", Yt = (s) => s?.query?.datasource ==
|
|
|
3098
3222
|
"platform_usage",
|
|
3099
3223
|
"managed_cache_usage",
|
|
3100
3224
|
void 0
|
|
3101
|
-
],
|
|
3102
|
-
function
|
|
3225
|
+
], ko = (s) => Co.includes(s);
|
|
3226
|
+
function Ro({
|
|
3103
3227
|
queryBridge: s,
|
|
3104
3228
|
context: e,
|
|
3105
3229
|
definition: t,
|
|
3106
3230
|
chartData: i
|
|
3107
3231
|
}) {
|
|
3108
|
-
const n = Z(""), r = Z(""), o = Z(void 0), a = Z(void 0), c = ei(), l = ft(), { stripUnknownFilters: u, loading: d } = ut(l), h = x(() =>
|
|
3232
|
+
const n = Z(""), r = Z(""), o = Z(void 0), a = Z(void 0), c = ei(), l = ft(), { stripUnknownFilters: u, loading: d } = ut(l), h = x(() => Le(t.value));
|
|
3109
3233
|
Dt(async () => {
|
|
3110
3234
|
n.value = await s?.exploreBaseUrl?.() ?? "", r.value = await s?.requestsBaseUrl?.() ?? "";
|
|
3111
3235
|
});
|
|
3112
3236
|
const y = x(() => c.analytics && c.percentiles), _ = x(() => {
|
|
3113
3237
|
const g = t.value.chart.type;
|
|
3114
3238
|
return ["golden_signals", "gauge"].includes(g) ? !1 : g === "top_n" ? !!e.value.editable || !!e.value.showTileActions : !0;
|
|
3115
|
-
}), k = x(() => r.value && t.value.query && !h.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "managed_cache_usage" && !Vt(t.value.query.datasource) && y.value && !d.value), v = x(() => n.value && t.value.query &&
|
|
3239
|
+
}), k = x(() => r.value && t.value.query && !h.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "managed_cache_usage" && !Vt(t.value.query.datasource) && y.value && !d.value), v = x(() => n.value && t.value.query && ko(t.value.query.datasource) && y.value && !d.value), M = x(() => i.value ? Ut(i.value.meta.granularity_ms) : void 0), R = x(() => {
|
|
3116
3240
|
const g = t.value, C = [...e.value.filters, ...g.query.filters ?? []], T = "metrics" in g.query ? g.query.metrics : void 0, N = g.query?.datasource ?? "api_usage";
|
|
3117
3241
|
return u.value({
|
|
3118
3242
|
datasource: N,
|
|
@@ -3123,7 +3247,7 @@ function vo({
|
|
|
3123
3247
|
if (!v.value || !_.value)
|
|
3124
3248
|
return "";
|
|
3125
3249
|
const g = t.value;
|
|
3126
|
-
if (
|
|
3250
|
+
if (Le(g))
|
|
3127
3251
|
return f({
|
|
3128
3252
|
...g.query,
|
|
3129
3253
|
filters: R.value
|
|
@@ -3134,7 +3258,7 @@ function vo({
|
|
|
3134
3258
|
if (!k.value || !_.value)
|
|
3135
3259
|
return "";
|
|
3136
3260
|
const g = R.value, C = t.value;
|
|
3137
|
-
if (
|
|
3261
|
+
if (Le(C))
|
|
3138
3262
|
return "";
|
|
3139
3263
|
const T = X(
|
|
3140
3264
|
C.query.time_range || e.value.timeSpec,
|
|
@@ -3151,7 +3275,7 @@ function vo({
|
|
|
3151
3275
|
end: g.type === "absolute" ? N : void 0
|
|
3152
3276
|
}
|
|
3153
3277
|
};
|
|
3154
|
-
},
|
|
3278
|
+
}, $ = (g, C) => ({
|
|
3155
3279
|
filter: C,
|
|
3156
3280
|
timeframe: {
|
|
3157
3281
|
timePeriodsKey: g.type === "relative" ? g.time_range : "custom",
|
|
@@ -3160,7 +3284,7 @@ function vo({
|
|
|
3160
3284
|
}
|
|
3161
3285
|
}), m = (g, C) => {
|
|
3162
3286
|
const T = t.value;
|
|
3163
|
-
if (!
|
|
3287
|
+
if (!jt(T))
|
|
3164
3288
|
throw new Error("Cannot build a chart explore query for table or api-requests definitions");
|
|
3165
3289
|
const N = [...T.query.dimensions ?? []], oe = [...T.query.metrics ?? []];
|
|
3166
3290
|
return {
|
|
@@ -3187,21 +3311,21 @@ function vo({
|
|
|
3187
3311
|
requestsLinkZoomActions: o,
|
|
3188
3312
|
exploreLinkZoomActions: a,
|
|
3189
3313
|
buildExploreQuery: m,
|
|
3190
|
-
buildRequestsQueryZoomActions:
|
|
3314
|
+
buildRequestsQueryZoomActions: $,
|
|
3191
3315
|
buildExploreLink: f,
|
|
3192
3316
|
buildRequestLink: D
|
|
3193
3317
|
};
|
|
3194
3318
|
}
|
|
3195
|
-
const
|
|
3319
|
+
const To = (s) => s.type === "relative" ? Zt.get(Jt[s.time_range])?.timeframeLengthMs() : new Date(s.end).getTime() - new Date(s.start).getTime(), So = (s) => s.reduce((e, t) => {
|
|
3196
3320
|
const i = Zt.get(Jt[t])?.maximumTimeframeLength();
|
|
3197
3321
|
return i === void 0 || e && i <= e.durationSeconds ? e : { durationSeconds: i, key: t };
|
|
3198
|
-
}, void 0),
|
|
3322
|
+
}, void 0), ws = (s, e) => {
|
|
3199
3323
|
if (!s || !e?.length)
|
|
3200
3324
|
return;
|
|
3201
|
-
const t =
|
|
3325
|
+
const t = To(s), i = So(e);
|
|
3202
3326
|
return t !== void 0 && i && t > i.durationSeconds * 1e3 ? i : void 0;
|
|
3203
|
-
},
|
|
3204
|
-
const t =
|
|
3327
|
+
}, Do = (s, e) => {
|
|
3328
|
+
const t = ws(s, e);
|
|
3205
3329
|
return !t || !s ? s : s.type === "relative" ? {
|
|
3206
3330
|
...s,
|
|
3207
3331
|
time_range: t.key
|
|
@@ -3210,8 +3334,8 @@ const _o = (s) => s.type === "relative" ? Zt.get(Jt[s.time_range])?.timeframeLen
|
|
|
3210
3334
|
start: new Date(new Date(s.end).getTime() - t.durationSeconds * 1e3)
|
|
3211
3335
|
};
|
|
3212
3336
|
};
|
|
3213
|
-
function
|
|
3214
|
-
const s =
|
|
3337
|
+
function Oo() {
|
|
3338
|
+
const s = Pe(He), e = ft(), { datasourceConfigMap: t, stripUnknownFilters: i } = ut(e);
|
|
3215
3339
|
let n = null;
|
|
3216
3340
|
return st(() => {
|
|
3217
3341
|
n?.abort();
|
|
@@ -3232,7 +3356,7 @@ function xo() {
|
|
|
3232
3356
|
...a.filters
|
|
3233
3357
|
],
|
|
3234
3358
|
queryFields: o.metrics
|
|
3235
|
-
}).filter(({ operator: R }) => !_ || !
|
|
3359
|
+
}).filter(({ operator: R }) => !_ || !Ls.some((E) => E === R));
|
|
3236
3360
|
let v = o.time_range;
|
|
3237
3361
|
!v && a.timeSpec ? v = {
|
|
3238
3362
|
...a.timeSpec,
|
|
@@ -3240,7 +3364,7 @@ function xo() {
|
|
|
3240
3364
|
} : v && !v.tz && (v = {
|
|
3241
3365
|
...v,
|
|
3242
3366
|
tz: a.tz
|
|
3243
|
-
}), v =
|
|
3367
|
+
}), v = Do(v, t.value[y]?.timeRangeOptions);
|
|
3244
3368
|
const M = {
|
|
3245
3369
|
datasource: y,
|
|
3246
3370
|
query: {
|
|
@@ -3253,7 +3377,7 @@ function xo() {
|
|
|
3253
3377
|
return s.queryFn(M, l);
|
|
3254
3378
|
} };
|
|
3255
3379
|
}
|
|
3256
|
-
function
|
|
3380
|
+
function zo({
|
|
3257
3381
|
context: s,
|
|
3258
3382
|
globalFilters: e = Z([]),
|
|
3259
3383
|
isFullscreen: t = Z(!1),
|
|
@@ -3271,18 +3395,18 @@ function Eo({
|
|
|
3271
3395
|
}), d = x(() => {
|
|
3272
3396
|
const { showTileActions: R } = s.value;
|
|
3273
3397
|
return i.value ? !1 : R === void 0 ? !0 : R;
|
|
3274
|
-
}), h = x(() => !i.value && !!
|
|
3398
|
+
}), h = x(() => !i.value && !!zs()?.vnode?.props?.onTileTimeRangeZoom), y = x(() => [...s.value.filters ?? [], ...e.value]), _ = x(() => {
|
|
3275
3399
|
let { refreshInterval: R } = s.value;
|
|
3276
|
-
if (R === void 0 && (R =
|
|
3400
|
+
if (R === void 0 && (R = io), t.value) {
|
|
3277
3401
|
let E = !1;
|
|
3278
3402
|
if (c.value.type === "relative")
|
|
3279
3403
|
E = ["15m", "1h", "6h", "12h", "24h"].includes(c.value.time_range);
|
|
3280
3404
|
else {
|
|
3281
|
-
const X = c.value.start.getTime(),
|
|
3282
|
-
E = Math.abs(
|
|
3405
|
+
const X = c.value.start.getTime(), $ = c.value.end.getTime();
|
|
3406
|
+
E = Math.abs($ - X) <= 864e5;
|
|
3283
3407
|
}
|
|
3284
3408
|
const G = (/* @__PURE__ */ new Date()).getTime();
|
|
3285
|
-
c.value.type === "absolute" && c.value.end.getTime() < G || c.value.type === "relative" && ["previous_week", "previous_month"].includes(c.value.time_range) ? R = 0 : E ? R =
|
|
3409
|
+
c.value.type === "absolute" && c.value.end.getTime() < G || c.value.type === "relative" && ["previous_week", "previous_month"].includes(c.value.time_range) ? R = 0 : E ? R = so : R = no;
|
|
3286
3410
|
}
|
|
3287
3411
|
return R;
|
|
3288
3412
|
}), k = x(() => !i.value), v = x(() => ({
|
|
@@ -3316,16 +3440,16 @@ function Eo({
|
|
|
3316
3440
|
zoomable: h
|
|
3317
3441
|
};
|
|
3318
3442
|
}
|
|
3319
|
-
const
|
|
3320
|
-
function
|
|
3443
|
+
const Mo = 6, bs = 6, xs = 4;
|
|
3444
|
+
function No(s, e) {
|
|
3321
3445
|
const { pageWidth: t, pageHeight: i, margin: n } = e, r = n + 1, o = n + e.headerHeight - 3, a = i - n - bs + 3, c = a + 4;
|
|
3322
|
-
e.title && (s.setFont("helvetica", "bold"), s.setFontSize(11), s.setTextColor(60), s.text(e.title, n, r)), s.setFont("helvetica", "normal"), s.setFontSize(8), s.setTextColor(120), s.text(e.generatedAt, t - n, r, { align: "right" }), e.subtitle && s.text(e.subtitle, n, r +
|
|
3446
|
+
e.title && (s.setFont("helvetica", "bold"), s.setFontSize(11), s.setTextColor(60), s.text(e.title, n, r)), s.setFont("helvetica", "normal"), s.setFontSize(8), s.setTextColor(120), s.text(e.generatedAt, t - n, r, { align: "right" }), e.subtitle && s.text(e.subtitle, n, r + xs), s.setDrawColor(220), s.line(n, o, t - n, o), s.line(n, a, t - n, a), s.setFont("helvetica", "bold"), s.setTextColor(60), s.text(e.branding, n, c);
|
|
3323
3447
|
const l = s.getTextWidth(e.branding);
|
|
3324
3448
|
s.setFont("helvetica", "normal");
|
|
3325
3449
|
const u = ` ${e.dashboardNote}`;
|
|
3326
3450
|
e.dashboardUrl ? (s.setTextColor(0, 68, 204), s.textWithLink(u, n + l, c, { url: e.dashboardUrl })) : (s.setTextColor(120), s.text(u, n + l, c)), s.setTextColor(120), s.text(e.pageLabel, t - n, c, { align: "right" });
|
|
3327
3451
|
}
|
|
3328
|
-
function
|
|
3452
|
+
function Ao(s) {
|
|
3329
3453
|
const e = s.querySelector(".kong-ui-public-grid-layout, .grid-stack");
|
|
3330
3454
|
if (!e)
|
|
3331
3455
|
return [];
|
|
@@ -3338,7 +3462,7 @@ function Ro(s) {
|
|
|
3338
3462
|
n.set(a, l !== void 0 ? Math.max(l, c) : c);
|
|
3339
3463
|
}), [...n.entries()].map(([r, o]) => ({ top: r, bottom: o })).sort((r, o) => r.top - o.top);
|
|
3340
3464
|
}
|
|
3341
|
-
function
|
|
3465
|
+
function Io(s, e, t, i) {
|
|
3342
3466
|
if (!s.length) {
|
|
3343
3467
|
const o = [];
|
|
3344
3468
|
let a = 0;
|
|
@@ -3356,7 +3480,7 @@ function To(s, e, t, i) {
|
|
|
3356
3480
|
}
|
|
3357
3481
|
return r < e && n.push({ startY: r, height: e - r }), n;
|
|
3358
3482
|
}
|
|
3359
|
-
function
|
|
3483
|
+
function Lo(s) {
|
|
3360
3484
|
const { i18n: e } = vs(), t = Z({ status: "idle" });
|
|
3361
3485
|
async function i(n = {}) {
|
|
3362
3486
|
const {
|
|
@@ -3386,7 +3510,7 @@ function So(s) {
|
|
|
3386
3510
|
t.value = { status: "capturing" };
|
|
3387
3511
|
const G = {
|
|
3388
3512
|
name: "kong-webgl-snapshot",
|
|
3389
|
-
beforeClone: () =>
|
|
3513
|
+
beforeClone: () => Ps(),
|
|
3390
3514
|
afterClone: () => li()
|
|
3391
3515
|
}, D = await R.toCanvas(M, {
|
|
3392
3516
|
scale: h,
|
|
@@ -3394,9 +3518,9 @@ function So(s) {
|
|
|
3394
3518
|
excludeMode: "remove",
|
|
3395
3519
|
embedFonts: !0,
|
|
3396
3520
|
plugins: [G]
|
|
3397
|
-
}), X =
|
|
3521
|
+
}), X = Ao(M), $ = M.getBoundingClientRect().width, m = $ ? D.width / $ : h;
|
|
3398
3522
|
t.value = { status: "generating" };
|
|
3399
|
-
const f = /* @__PURE__ */ new Date(), g = new E({ orientation: l, unit: "mm", format: u }), C = g.internal.pageSize.getWidth(), T = g.internal.pageSize.getHeight(), N =
|
|
3523
|
+
const f = /* @__PURE__ */ new Date(), g = new E({ orientation: l, unit: "mm", format: u }), C = g.internal.pageSize.getWidth(), T = g.internal.pageSize.getHeight(), N = Mo + (a ? xs : 0), oe = C - d * 2, we = T - d * 2 - N - bs, be = D.width / oe, ee = we * be, ue = Io(X, D.height, ee, m), q = {
|
|
3400
3524
|
title: o,
|
|
3401
3525
|
subtitle: a,
|
|
3402
3526
|
dashboardUrl: c,
|
|
@@ -3412,26 +3536,26 @@ function So(s) {
|
|
|
3412
3536
|
};
|
|
3413
3537
|
for (let re = 0; re < ue.length; re++) {
|
|
3414
3538
|
re > 0 && g.addPage();
|
|
3415
|
-
const { startY:
|
|
3416
|
-
|
|
3539
|
+
const { startY: I, height: b } = ue[re], w = document.createElement("canvas");
|
|
3540
|
+
w.width = D.width, w.height = b, w.getContext("2d").drawImage(
|
|
3417
3541
|
D,
|
|
3418
3542
|
0,
|
|
3419
|
-
|
|
3543
|
+
I,
|
|
3420
3544
|
D.width,
|
|
3421
|
-
|
|
3545
|
+
b,
|
|
3422
3546
|
0,
|
|
3423
3547
|
0,
|
|
3424
3548
|
D.width,
|
|
3425
|
-
|
|
3549
|
+
b
|
|
3426
3550
|
), g.addImage(
|
|
3427
|
-
|
|
3551
|
+
w.toDataURL("image/png"),
|
|
3428
3552
|
"PNG",
|
|
3429
3553
|
d,
|
|
3430
3554
|
d + N,
|
|
3431
3555
|
oe,
|
|
3432
|
-
|
|
3433
|
-
),
|
|
3434
|
-
...
|
|
3556
|
+
b / be
|
|
3557
|
+
), No(g, {
|
|
3558
|
+
...q,
|
|
3435
3559
|
pageLabel: e.t("pdfExport.pageOf", { page: String(re + 1), total: String(ue.length) })
|
|
3436
3560
|
});
|
|
3437
3561
|
}
|
|
@@ -3448,25 +3572,25 @@ function So(s) {
|
|
|
3448
3572
|
}
|
|
3449
3573
|
return {
|
|
3450
3574
|
exportPdf: i,
|
|
3451
|
-
exportState:
|
|
3575
|
+
exportState: $t(t)
|
|
3452
3576
|
};
|
|
3453
3577
|
}
|
|
3454
3578
|
const Re = {
|
|
3455
|
-
useContextLinks:
|
|
3456
|
-
useDashboardContext:
|
|
3457
|
-
useEvaluateFeatureFlag:
|
|
3458
|
-
useExportPdf:
|
|
3579
|
+
useContextLinks: Ro,
|
|
3580
|
+
useDashboardContext: zo,
|
|
3581
|
+
useEvaluateFeatureFlag: ro,
|
|
3582
|
+
useExportPdf: Lo,
|
|
3459
3583
|
useI18n: vs,
|
|
3460
|
-
useIssueQuery:
|
|
3461
|
-
useRequestQueue:
|
|
3462
|
-
},
|
|
3584
|
+
useIssueQuery: Oo,
|
|
3585
|
+
useRequestQueue: mo
|
|
3586
|
+
}, Po = { class: "kong-ui-public-csv-export-modal" }, qo = {
|
|
3463
3587
|
key: 0,
|
|
3464
3588
|
class: "selected-range"
|
|
3465
|
-
},
|
|
3589
|
+
}, Ho = {
|
|
3466
3590
|
key: 4,
|
|
3467
3591
|
class: "text-muted",
|
|
3468
3592
|
tag: "span"
|
|
3469
|
-
}, Bi = 3,
|
|
3593
|
+
}, Bi = 3, Fo = /* @__PURE__ */ _e({
|
|
3470
3594
|
__name: "CsvExportModal",
|
|
3471
3595
|
props: {
|
|
3472
3596
|
exportState: {},
|
|
@@ -3538,7 +3662,7 @@ const Re = {
|
|
|
3538
3662
|
o.value++;
|
|
3539
3663
|
}), (_, k) => {
|
|
3540
3664
|
const v = ve("KSkeleton"), M = ve("KEmptyState"), R = ve("KTableData"), E = ve("KTooltip"), G = ve("KButton"), D = ve("KModal");
|
|
3541
|
-
return O(), ne("div",
|
|
3665
|
+
return O(), ne("div", Po, [
|
|
3542
3666
|
me(D, {
|
|
3543
3667
|
class: "vitals-report",
|
|
3544
3668
|
"data-testid": "csv-export-modal",
|
|
@@ -3546,11 +3670,11 @@ const Re = {
|
|
|
3546
3670
|
title: S(t).t("csvExport.exportPreview"),
|
|
3547
3671
|
visible: "",
|
|
3548
3672
|
onCancel: d,
|
|
3549
|
-
onKeyup:
|
|
3673
|
+
onKeyup: Ms(d, ["esc"])
|
|
3550
3674
|
}, {
|
|
3551
|
-
default:
|
|
3675
|
+
default: U(() => [
|
|
3552
3676
|
he("div", null, [
|
|
3553
|
-
s.exportState.status === "success" && c.value ? (O(), ne("div",
|
|
3677
|
+
s.exportState.status === "success" && c.value ? (O(), ne("div", qo, [
|
|
3554
3678
|
he("p", null, se(s.modalDescription ? s.modalDescription : S(t).t("csvExport.exportDescription")), 1),
|
|
3555
3679
|
he("p", null, se(S(t).t("csvExport.exportTimeRange")) + ": " + se(l.value), 1)
|
|
3556
3680
|
])) : fe("", !0),
|
|
@@ -3568,12 +3692,12 @@ const Re = {
|
|
|
3568
3692
|
"row-hover": !1,
|
|
3569
3693
|
sortable: !1
|
|
3570
3694
|
}, {
|
|
3571
|
-
"empty-state":
|
|
3695
|
+
"empty-state": U(() => [
|
|
3572
3696
|
me(M, { "action-button-visible": !1 }, {
|
|
3573
|
-
title:
|
|
3697
|
+
title: U(() => [
|
|
3574
3698
|
he("h5", null, se(S(t).t("csvExport.noDataRange")), 1)
|
|
3575
3699
|
]),
|
|
3576
|
-
default:
|
|
3700
|
+
default: U(() => [
|
|
3577
3701
|
he("p", null, se(S(t).t("csvExport.noDataRetry")), 1)
|
|
3578
3702
|
]),
|
|
3579
3703
|
_: 1
|
|
@@ -3584,22 +3708,22 @@ const Re = {
|
|
|
3584
3708
|
key: 3,
|
|
3585
3709
|
"action-button-visible": !1
|
|
3586
3710
|
}, {
|
|
3587
|
-
title:
|
|
3711
|
+
title: U(() => [
|
|
3588
3712
|
he("h5", null, se(S(t).t("csvExport.dataError")), 1)
|
|
3589
3713
|
]),
|
|
3590
3714
|
_: 1
|
|
3591
3715
|
})) : fe("", !0),
|
|
3592
|
-
s.exportState.status === "success" && c.value ? (O(), ne("div",
|
|
3716
|
+
s.exportState.status === "success" && c.value ? (O(), ne("div", Ho, [
|
|
3593
3717
|
Ve(se(u.value) + " ", 1),
|
|
3594
3718
|
me(E, {
|
|
3595
3719
|
class: "preview-tooltip",
|
|
3596
3720
|
placement: "right",
|
|
3597
3721
|
text: S(t).t("csvExport.maximumRecordAmount", { value: S(ns) })
|
|
3598
3722
|
}, {
|
|
3599
|
-
default:
|
|
3723
|
+
default: U(() => [
|
|
3600
3724
|
me(S(qs), {
|
|
3601
3725
|
color: `var(--kui-color-text-neutral, ${S(Gt)})`,
|
|
3602
|
-
size: `var(--kui-icon-size-30, ${S(
|
|
3726
|
+
size: `var(--kui-icon-size-30, ${S(Nr)})`
|
|
3603
3727
|
}, null, 8, ["color", "size"])
|
|
3604
3728
|
]),
|
|
3605
3729
|
_: 1
|
|
@@ -3607,30 +3731,30 @@ const Re = {
|
|
|
3607
3731
|
])) : fe("", !0)
|
|
3608
3732
|
])
|
|
3609
3733
|
]),
|
|
3610
|
-
"footer-actions":
|
|
3734
|
+
"footer-actions": U(() => [
|
|
3611
3735
|
me(G, {
|
|
3612
3736
|
appearance: "tertiary",
|
|
3613
3737
|
class: "cancel-btn",
|
|
3614
3738
|
onClick: d
|
|
3615
3739
|
}, {
|
|
3616
|
-
default:
|
|
3740
|
+
default: U(() => [
|
|
3617
3741
|
Ve(se(S(t).t("csvExport.cancelButton")), 1)
|
|
3618
3742
|
]),
|
|
3619
3743
|
_: 1
|
|
3620
3744
|
}),
|
|
3621
|
-
me(
|
|
3745
|
+
me(Br, {
|
|
3622
3746
|
class: "vitals-report-export-button",
|
|
3623
3747
|
filename: r,
|
|
3624
3748
|
headers: h.value.csvHeaders,
|
|
3625
3749
|
rows: h.value.rows
|
|
3626
3750
|
}, {
|
|
3627
|
-
default:
|
|
3751
|
+
default: U(() => [
|
|
3628
3752
|
me(G, {
|
|
3629
3753
|
appearance: "primary",
|
|
3630
3754
|
"data-testid": "csv-download-button",
|
|
3631
3755
|
disabled: s.exportState.status !== "success" || !c.value
|
|
3632
3756
|
}, {
|
|
3633
|
-
default:
|
|
3757
|
+
default: U(() => [
|
|
3634
3758
|
Ve(se(S(t).t("csvExport.downloadButton")), 1)
|
|
3635
3759
|
]),
|
|
3636
3760
|
_: 1
|
|
@@ -3645,10 +3769,10 @@ const Re = {
|
|
|
3645
3769
|
};
|
|
3646
3770
|
}
|
|
3647
3771
|
});
|
|
3648
|
-
var
|
|
3649
|
-
const
|
|
3772
|
+
var Es = /* @__PURE__ */ ((s) => (s.VALIDATING = "VALIDATING", s.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", s.PENDING = "PENDING", s.SUCCESS = "SUCCESS", s.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", s.ERROR = "ERROR", s.STALE_IF_ERROR = "STALE_IF_ERROR", s))(Es || {});
|
|
3773
|
+
const $o = (s) => s ? !!// TODO: revisit: currently only the first check ever matters?
|
|
3650
3774
|
(Object.keys(s)?.length || s.data?.length || s.data?.data?.length || !s.data?.data && typeof s.data == "object" && Object.keys(s?.data).length) : !1;
|
|
3651
|
-
function
|
|
3775
|
+
function Cs(s = Z({}), e, t, i = $o) {
|
|
3652
3776
|
const n = Z(
|
|
3653
3777
|
"PENDING"
|
|
3654
3778
|
/* PENDING */
|
|
@@ -3682,7 +3806,7 @@ function Es(s = Z({}), e, t, i = No) {
|
|
|
3682
3806
|
s.value === void 0 && e && (n.value = "ERROR");
|
|
3683
3807
|
}), {
|
|
3684
3808
|
state: n,
|
|
3685
|
-
swrvState:
|
|
3809
|
+
swrvState: Es
|
|
3686
3810
|
};
|
|
3687
3811
|
}
|
|
3688
3812
|
const Ot = /* @__PURE__ */ _e({
|
|
@@ -3696,7 +3820,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3696
3820
|
},
|
|
3697
3821
|
emits: ["chart-data", "query-complete"],
|
|
3698
3822
|
setup(s, { emit: e }) {
|
|
3699
|
-
const t = s, i = e, { i18n: n } = Re.useI18n(), { issueQuery: r } = Re.useIssueQuery(), o =
|
|
3823
|
+
const t = s, i = e, { i18n: n } = Re.useI18n(), { issueQuery: r } = Re.useIssueQuery(), o = Pe(He), a = () => t.queryReady && o ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: c, error: l, isValidating: u } = ls(a, async () => {
|
|
3700
3824
|
const R = a();
|
|
3701
3825
|
try {
|
|
3702
3826
|
const E = await r(t.query, t.context, t.limitOverride);
|
|
@@ -3712,7 +3836,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3712
3836
|
refreshInterval: t.context.refreshInterval,
|
|
3713
3837
|
revalidateOnFocus: !1,
|
|
3714
3838
|
shouldRetryOnError: !1
|
|
3715
|
-
}), { state: d, swrvState: h } =
|
|
3839
|
+
}), { state: d, swrvState: h } = Cs(c, l, u), y = Z(null), _ = x(() => d.value === h.ERROR || !!y.value), k = x(() => !t.queryReady || d.value === h.PENDING), v = Z(), M = x(() => c.value ?? (t.queryReady && d.value === h.PENDING ? v.value : void 0));
|
|
3716
3840
|
return Ge([() => c.value, () => d.value], ([R, E]) => {
|
|
3717
3841
|
R && (E === "SUCCESS_HAS_DATA" || E === "SUCCESS") && R !== v.value && (v.value = R, i("chart-data", R));
|
|
3718
3842
|
}), (R, E) => {
|
|
@@ -3726,17 +3850,17 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3726
3850
|
"action-button-visible": !1,
|
|
3727
3851
|
"data-testid": "chart-empty-state"
|
|
3728
3852
|
}, ht({
|
|
3729
|
-
icon:
|
|
3853
|
+
icon: U(() => [
|
|
3730
3854
|
y.value?.type === "forbidden" ? (O(), W(S(rs), { key: 0 })) : (O(), W(S(os), { key: 1 }))
|
|
3731
3855
|
]),
|
|
3732
|
-
title:
|
|
3856
|
+
title: U(() => [
|
|
3733
3857
|
he("p", null, se(y.value?.message || S(n).t("renderer.unexpectedError")), 1)
|
|
3734
3858
|
]),
|
|
3735
3859
|
_: 2
|
|
3736
3860
|
}, [
|
|
3737
3861
|
y.value?.details ? {
|
|
3738
3862
|
name: "default",
|
|
3739
|
-
fn:
|
|
3863
|
+
fn: U(() => [
|
|
3740
3864
|
he("p", null, se(y.value.details), 1)
|
|
3741
3865
|
]),
|
|
3742
3866
|
key: "0"
|
|
@@ -3744,7 +3868,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3744
3868
|
]), 1024)) : M.value ? Ze(R.$slots, "default", { data: M.value }, void 0, void 0, 2) : fe("", !0);
|
|
3745
3869
|
};
|
|
3746
3870
|
}
|
|
3747
|
-
}),
|
|
3871
|
+
}), Uo = /* @__PURE__ */ _e({
|
|
3748
3872
|
__name: "SimpleChartRenderer",
|
|
3749
3873
|
props: {
|
|
3750
3874
|
query: {},
|
|
@@ -3770,12 +3894,12 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3770
3894
|
"query-ready": s.queryReady,
|
|
3771
3895
|
"refresh-counter": s.refreshCounter
|
|
3772
3896
|
}, {
|
|
3773
|
-
default:
|
|
3897
|
+
default: U(({ data: o }) => [
|
|
3774
3898
|
he("div", {
|
|
3775
3899
|
class: it(["analytics-chart", { "single-value": t.value }]),
|
|
3776
|
-
style:
|
|
3900
|
+
style: wt(t.value ? void 0 : { height: `${s.height}px` })
|
|
3777
3901
|
}, [
|
|
3778
|
-
me(S(
|
|
3902
|
+
me(S(Gs), {
|
|
3779
3903
|
"chart-data": o,
|
|
3780
3904
|
"chart-options": i.value,
|
|
3781
3905
|
"synthetics-data-key": t.value ? void 0 : s.chartOptions.synthetics_data_key
|
|
@@ -3790,7 +3914,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3790
3914
|
for (const [i, n] of e)
|
|
3791
3915
|
t[i] = n;
|
|
3792
3916
|
return t;
|
|
3793
|
-
}, Wi = /* @__PURE__ */ Fe(
|
|
3917
|
+
}, Wi = /* @__PURE__ */ Fe(Uo, [["__scopeId", "data-v-22077b88"]]), Bo = { class: "analytics-chart" }, Wo = /* @__PURE__ */ _e({
|
|
3794
3918
|
__name: "BaseAnalyticsChartRenderer",
|
|
3795
3919
|
props: {
|
|
3796
3920
|
query: {},
|
|
@@ -3827,8 +3951,8 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3827
3951
|
"refresh-counter": s.refreshCounter,
|
|
3828
3952
|
onChartData: c
|
|
3829
3953
|
}, {
|
|
3830
|
-
default:
|
|
3831
|
-
he("div",
|
|
3954
|
+
default: U(({ data: h }) => [
|
|
3955
|
+
he("div", Bo, [
|
|
3832
3956
|
me(S(Bt), Ji({
|
|
3833
3957
|
"active-metric": s.activeMetric,
|
|
3834
3958
|
"chart-data": h,
|
|
@@ -3845,9 +3969,9 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3845
3969
|
}), ht({ _: 2 }, [
|
|
3846
3970
|
s.context.editable ? {
|
|
3847
3971
|
name: "menu-items",
|
|
3848
|
-
fn:
|
|
3972
|
+
fn: U(() => [
|
|
3849
3973
|
me(d, { onClick: a }, {
|
|
3850
|
-
default:
|
|
3974
|
+
default: U(() => [
|
|
3851
3975
|
Ve(se(S(n).t("renderer.edit")), 1)
|
|
3852
3976
|
]),
|
|
3853
3977
|
_: 1
|
|
@@ -3862,7 +3986,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3862
3986
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
3863
3987
|
};
|
|
3864
3988
|
}
|
|
3865
|
-
}), si = /* @__PURE__ */ Fe(
|
|
3989
|
+
}), si = /* @__PURE__ */ Fe(Wo, [["__scopeId", "data-v-678fdc93"]]), Gi = /* @__PURE__ */ _e({
|
|
3866
3990
|
__name: "BarChartRenderer",
|
|
3867
3991
|
props: {
|
|
3868
3992
|
query: {},
|
|
@@ -3887,10 +4011,10 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3887
4011
|
"refresh-counter": s.refreshCounter
|
|
3888
4012
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
3889
4013
|
}
|
|
3890
|
-
}),
|
|
4014
|
+
}), Go = { class: "analytics-chart" }, Yo = {
|
|
3891
4015
|
key: 3,
|
|
3892
4016
|
class: "analytics-chart"
|
|
3893
|
-
},
|
|
4017
|
+
}, jo = /* @__PURE__ */ _e({
|
|
3894
4018
|
__name: "ScatterChartRenderer",
|
|
3895
4019
|
props: {
|
|
3896
4020
|
query: {},
|
|
@@ -3917,12 +4041,12 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3917
4041
|
const X = new AbortController();
|
|
3918
4042
|
a = X;
|
|
3919
4043
|
try {
|
|
3920
|
-
const
|
|
3921
|
-
return c() !== D ? void 0 : (l.value = null,
|
|
3922
|
-
} catch (
|
|
4044
|
+
const $ = await o.value(t.query, t.context, X);
|
|
4045
|
+
return c() !== D ? void 0 : (l.value = null, $);
|
|
4046
|
+
} catch ($) {
|
|
3923
4047
|
if (c() !== D)
|
|
3924
4048
|
return;
|
|
3925
|
-
throw l.value = as(
|
|
4049
|
+
throw l.value = as($), $;
|
|
3926
4050
|
} finally {
|
|
3927
4051
|
c() === D && i("query-complete");
|
|
3928
4052
|
}
|
|
@@ -3930,7 +4054,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3930
4054
|
refreshInterval: t.context.refreshInterval,
|
|
3931
4055
|
revalidateOnFocus: !1,
|
|
3932
4056
|
shouldRetryOnError: !1
|
|
3933
|
-
}), { state: y, swrvState: _ } =
|
|
4057
|
+
}), { state: y, swrvState: _ } = Cs(u, d, h), k = Z(), v = x(() => u.value ?? k.value);
|
|
3934
4058
|
Ge(u, (D) => {
|
|
3935
4059
|
D && (k.value = D);
|
|
3936
4060
|
});
|
|
@@ -3952,8 +4076,8 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3952
4076
|
}
|
|
3953
4077
|
}));
|
|
3954
4078
|
return (D, X) => {
|
|
3955
|
-
const
|
|
3956
|
-
return r.value ? E.value ? (O(), W(
|
|
4079
|
+
const $ = ve("KSkeleton"), m = ve("KEmptyState");
|
|
4080
|
+
return r.value ? E.value ? (O(), W($, {
|
|
3957
4081
|
key: 1,
|
|
3958
4082
|
class: "chart-skeleton",
|
|
3959
4083
|
type: "table"
|
|
@@ -3962,22 +4086,22 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3962
4086
|
"action-button-visible": !1,
|
|
3963
4087
|
"data-testid": "scatter-chart-empty-state"
|
|
3964
4088
|
}, ht({
|
|
3965
|
-
icon:
|
|
4089
|
+
icon: U(() => [
|
|
3966
4090
|
l.value?.type === "forbidden" ? (O(), W(S(rs), { key: 0 })) : (O(), W(S(os), { key: 1 }))
|
|
3967
4091
|
]),
|
|
3968
|
-
title:
|
|
4092
|
+
title: U(() => [
|
|
3969
4093
|
he("p", null, se(R.value), 1)
|
|
3970
4094
|
]),
|
|
3971
4095
|
_: 2
|
|
3972
4096
|
}, [
|
|
3973
4097
|
l.value?.details ? {
|
|
3974
4098
|
name: "default",
|
|
3975
|
-
fn:
|
|
4099
|
+
fn: U(() => [
|
|
3976
4100
|
he("p", null, se(l.value.details), 1)
|
|
3977
4101
|
]),
|
|
3978
4102
|
key: "0"
|
|
3979
4103
|
} : void 0
|
|
3980
|
-
]), 1024)) : v.value ? (O(), ne("div",
|
|
4104
|
+
]), 1024)) : v.value ? (O(), ne("div", Yo, [
|
|
3981
4105
|
me(S(Bt), {
|
|
3982
4106
|
"chart-data": v.value,
|
|
3983
4107
|
"chart-options": G.value,
|
|
@@ -3994,8 +4118,8 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
3994
4118
|
onChartData: X[0] || (X[0] = (f) => i("chart-data", f)),
|
|
3995
4119
|
onQueryComplete: X[1] || (X[1] = (f) => i("query-complete"))
|
|
3996
4120
|
}, {
|
|
3997
|
-
default:
|
|
3998
|
-
he("div",
|
|
4121
|
+
default: U(({ data: f }) => [
|
|
4122
|
+
he("div", Go, [
|
|
3999
4123
|
me(S(Bt), {
|
|
4000
4124
|
"chart-data": f,
|
|
4001
4125
|
"chart-options": G.value,
|
|
@@ -4009,7 +4133,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4009
4133
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
4010
4134
|
};
|
|
4011
4135
|
}
|
|
4012
|
-
}),
|
|
4136
|
+
}), Ko = /* @__PURE__ */ Fe(jo, [["__scopeId", "data-v-0b17680c"]]), Yi = /* @__PURE__ */ _e({
|
|
4013
4137
|
__name: "TimeseriesChartRenderer",
|
|
4014
4138
|
props: {
|
|
4015
4139
|
query: {},
|
|
@@ -4040,7 +4164,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4040
4164
|
onZoomTimeRange: n[1] || (n[1] = (r) => t("zoom-time-range", r))
|
|
4041
4165
|
}, null, 8, ["active-metric", "chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
|
|
4042
4166
|
}
|
|
4043
|
-
}),
|
|
4167
|
+
}), Xo = /* @__PURE__ */ _e({
|
|
4044
4168
|
__name: "GoldenSignalsRenderer",
|
|
4045
4169
|
props: {
|
|
4046
4170
|
query: {},
|
|
@@ -4074,26 +4198,26 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4074
4198
|
return (n, r) => (O(), ne("div", {
|
|
4075
4199
|
class: it(["metric-card-tile-wrapper", { titled: i.value }])
|
|
4076
4200
|
}, [
|
|
4077
|
-
me(S(
|
|
4078
|
-
default:
|
|
4201
|
+
me(S(js), Ns(As(t.value)), {
|
|
4202
|
+
default: U(() => [
|
|
4079
4203
|
me(S(Ks))
|
|
4080
4204
|
]),
|
|
4081
4205
|
_: 1
|
|
4082
4206
|
}, 16)
|
|
4083
4207
|
], 2));
|
|
4084
4208
|
}
|
|
4085
|
-
}),
|
|
4209
|
+
}), Qo = /* @__PURE__ */ Fe(Xo, [["__scopeId", "data-v-3eda5028"]]), Vo = {
|
|
4086
4210
|
class: "fallback-entity-link",
|
|
4087
4211
|
"data-testid": "entity-link-parent"
|
|
4088
|
-
},
|
|
4212
|
+
}, ji = /* @__PURE__ */ _e({
|
|
4089
4213
|
__name: "FallbackEntityLink",
|
|
4090
4214
|
props: {
|
|
4091
4215
|
entityLinkData: {}
|
|
4092
4216
|
},
|
|
4093
4217
|
setup(s) {
|
|
4094
|
-
return (e, t) => (O(), ne("div",
|
|
4218
|
+
return (e, t) => (O(), ne("div", Vo, se(s.entityLinkData.label), 1));
|
|
4095
4219
|
}
|
|
4096
|
-
}),
|
|
4220
|
+
}), Zo = { key: 0 }, Jo = { key: 1 }, ea = /* @__PURE__ */ _e({
|
|
4097
4221
|
__name: "TopNTableRenderer",
|
|
4098
4222
|
props: {
|
|
4099
4223
|
query: {},
|
|
@@ -4108,14 +4232,14 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4108
4232
|
exploreLink: {}
|
|
4109
4233
|
},
|
|
4110
4234
|
setup(s) {
|
|
4111
|
-
const e = s, t =
|
|
4235
|
+
const e = s, t = Pe(He), i = es(async () => {
|
|
4112
4236
|
if (t?.fetchComponent)
|
|
4113
4237
|
try {
|
|
4114
4238
|
return await t.fetchComponent("EntityLink");
|
|
4115
4239
|
} catch {
|
|
4116
|
-
return
|
|
4240
|
+
return ji;
|
|
4117
4241
|
}
|
|
4118
|
-
return
|
|
4242
|
+
return ji;
|
|
4119
4243
|
}), n = x(() => !!e.chartOptions.entity_link || !!Object.keys(e.chartOptions.entity_links || {}).length), r = (l) => {
|
|
4120
4244
|
const u = e.chartOptions.entity_links;
|
|
4121
4245
|
return u && (u[l] || Object.entries(u).find(([d]) => d.toLowerCase() === l.toLowerCase())?.[1]) || "";
|
|
@@ -4127,9 +4251,9 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4127
4251
|
if (u)
|
|
4128
4252
|
if (l.id.includes(":")) {
|
|
4129
4253
|
const [d, h] = l.id.split(":");
|
|
4130
|
-
return u.replace(
|
|
4254
|
+
return u.replace(eo, d).replace(Li, h);
|
|
4131
4255
|
} else
|
|
4132
|
-
return u.replace(
|
|
4256
|
+
return u.replace(Li, l.id);
|
|
4133
4257
|
return "";
|
|
4134
4258
|
};
|
|
4135
4259
|
return (l, u) => (O(), W(Ot, {
|
|
@@ -4138,14 +4262,14 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4138
4262
|
"query-ready": s.queryReady,
|
|
4139
4263
|
"refresh-counter": s.refreshCounter
|
|
4140
4264
|
}, {
|
|
4141
|
-
default:
|
|
4142
|
-
me(S(
|
|
4265
|
+
default: U(({ data: d }) => [
|
|
4266
|
+
me(S(Ys), {
|
|
4143
4267
|
data: d,
|
|
4144
4268
|
"synthetics-data-key": s.chartOptions.synthetics_data_key
|
|
4145
4269
|
}, ht({ _: 2 }, [
|
|
4146
4270
|
n.value ? {
|
|
4147
4271
|
name: "name",
|
|
4148
|
-
fn:
|
|
4272
|
+
fn: U(({ record: h }) => [
|
|
4149
4273
|
!h.isEmpty && a(h) ? (O(), W(S(i), {
|
|
4150
4274
|
key: 0,
|
|
4151
4275
|
"entity-link-data": {
|
|
@@ -4154,8 +4278,8 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4154
4278
|
deleted: h.deleted
|
|
4155
4279
|
},
|
|
4156
4280
|
"external-link": c(h)
|
|
4157
|
-
}, null, 8, ["entity-link-data", "external-link"])) : (O(), ne(
|
|
4158
|
-
h.name === "empty" ? (O(), ne("i",
|
|
4281
|
+
}, null, 8, ["entity-link-data", "external-link"])) : (O(), ne(Kt, { key: 1 }, [
|
|
4282
|
+
h.name === "empty" ? (O(), ne("i", Zo, se(h.name), 1)) : (O(), ne("span", Jo, se(h.name), 1))
|
|
4159
4283
|
], 64))
|
|
4160
4284
|
]),
|
|
4161
4285
|
key: "0"
|
|
@@ -4165,7 +4289,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4165
4289
|
_: 1
|
|
4166
4290
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
4167
4291
|
}
|
|
4168
|
-
}),
|
|
4292
|
+
}), ta = (s) => s.records.map((e) => {
|
|
4169
4293
|
const t = { ...e };
|
|
4170
4294
|
return Object.entries(e).forEach(([i, n]) => {
|
|
4171
4295
|
if (n === null)
|
|
@@ -4173,7 +4297,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4173
4297
|
const r = s.meta.display?.[i]?.[String(n)]?.name;
|
|
4174
4298
|
r && (t[i] = r);
|
|
4175
4299
|
}), t;
|
|
4176
|
-
}),
|
|
4300
|
+
}), Ki = ({
|
|
4177
4301
|
canTranslate: s,
|
|
4178
4302
|
columns: e,
|
|
4179
4303
|
translate: t
|
|
@@ -4183,10 +4307,10 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4183
4307
|
key: i,
|
|
4184
4308
|
label: s(n) ? t(n) : i
|
|
4185
4309
|
};
|
|
4186
|
-
}),
|
|
4310
|
+
}), ia = {
|
|
4187
4311
|
/** @deprecated Use `platform_usage`. */
|
|
4188
|
-
platform:
|
|
4189
|
-
platform_usage:
|
|
4312
|
+
platform: Ki,
|
|
4313
|
+
platform_usage: Ki
|
|
4190
4314
|
}, Xi = async ({
|
|
4191
4315
|
abortController: s,
|
|
4192
4316
|
context: e,
|
|
@@ -4217,15 +4341,15 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4217
4341
|
}
|
|
4218
4342
|
}, s);
|
|
4219
4343
|
return u.meta.columns?.length && r?.(u.meta.columns), {
|
|
4220
|
-
data:
|
|
4344
|
+
data: ta(u),
|
|
4221
4345
|
cursor: u.meta.cursor,
|
|
4222
4346
|
hasMore: !!u.meta.cursor
|
|
4223
4347
|
};
|
|
4224
|
-
},
|
|
4348
|
+
}, sa = {
|
|
4225
4349
|
/** @deprecated Use `platform_usage`. */
|
|
4226
4350
|
platform: Xi,
|
|
4227
4351
|
platform_usage: Xi
|
|
4228
|
-
},
|
|
4352
|
+
}, na = /* @__PURE__ */ _e({
|
|
4229
4353
|
__name: "TableDataGridRenderer",
|
|
4230
4354
|
props: {
|
|
4231
4355
|
query: {},
|
|
@@ -4236,7 +4360,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4236
4360
|
},
|
|
4237
4361
|
emits: ["loading-change"],
|
|
4238
4362
|
setup(s, { emit: e }) {
|
|
4239
|
-
const t = s, i = e, n =
|
|
4363
|
+
const t = s, i = e, n = Pe(He), r = ft(), { i18n: o } = Re.useI18n(), a = new AbortController(), c = Z([]), l = Z(!1), u = x(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), d = x(() => ({
|
|
4240
4364
|
datasource: t.query.datasource,
|
|
4241
4365
|
query: {
|
|
4242
4366
|
columns: t.query.columns,
|
|
@@ -4263,7 +4387,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4263
4387
|
st(() => {
|
|
4264
4388
|
a.abort();
|
|
4265
4389
|
});
|
|
4266
|
-
const y = x(() =>
|
|
4390
|
+
const y = x(() => ia[t.query.datasource]({
|
|
4267
4391
|
// query.columns are optional in the API. If not provided, backend will return default columns.
|
|
4268
4392
|
// If query columns are not provided, fallback to using columns from the response metadata for header configuration.
|
|
4269
4393
|
columns: t.query.columns?.length ? t.query.columns : c.value,
|
|
@@ -4272,7 +4396,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4272
4396
|
})), _ = x(() => async ({ cursor: v, pageSize: M }) => {
|
|
4273
4397
|
try {
|
|
4274
4398
|
await r.isReady();
|
|
4275
|
-
const R =
|
|
4399
|
+
const R = sa[d.value.datasource];
|
|
4276
4400
|
if (!R)
|
|
4277
4401
|
throw new Error(`No table data grid fetcher found for datasource: ${d.value.datasource}`);
|
|
4278
4402
|
const E = await R({
|
|
@@ -4298,9 +4422,9 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4298
4422
|
const R = ve("KSkeleton");
|
|
4299
4423
|
return O(), ne("div", {
|
|
4300
4424
|
class: "table-data-grid-renderer",
|
|
4301
|
-
style:
|
|
4425
|
+
style: wt(u.value)
|
|
4302
4426
|
}, [
|
|
4303
|
-
s.queryReady ? (O(), W(S(
|
|
4427
|
+
s.queryReady ? (O(), W(S(Xs), {
|
|
4304
4428
|
key: 1,
|
|
4305
4429
|
error: l.value,
|
|
4306
4430
|
fetcher: _.value,
|
|
@@ -4316,7 +4440,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4316
4440
|
], 4);
|
|
4317
4441
|
};
|
|
4318
4442
|
}
|
|
4319
|
-
}),
|
|
4443
|
+
}), ra = /* @__PURE__ */ Fe(na, [["__scopeId", "data-v-c49ff2eb"]]), oa = /* @__PURE__ */ _e({
|
|
4320
4444
|
__name: "DonutChartRenderer",
|
|
4321
4445
|
props: {
|
|
4322
4446
|
query: {},
|
|
@@ -4340,15 +4464,15 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4340
4464
|
"refresh-counter": s.refreshCounter
|
|
4341
4465
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
4342
4466
|
}
|
|
4343
|
-
}),
|
|
4467
|
+
}), aa = ["data-testid"], la = {
|
|
4344
4468
|
key: 0,
|
|
4345
4469
|
class: "tile-header"
|
|
4346
|
-
},
|
|
4470
|
+
}, ua = { class: "badge-container" }, ca = { class: "badge-text" }, da = { class: "badge-text" }, ha = {
|
|
4347
4471
|
key: 0,
|
|
4348
4472
|
class: "metric-selector-wrapper"
|
|
4349
|
-
},
|
|
4473
|
+
}, fa = { key: 1 }, ma = ["data-testid"], pa = ["data-testid"], ga = ["data-testid"], ya = { class: "delete-option" }, va = ["data-testid"], _a = /* @__PURE__ */ _e({
|
|
4350
4474
|
__name: "DashboardTile",
|
|
4351
|
-
props: /* @__PURE__ */
|
|
4475
|
+
props: /* @__PURE__ */ bt({
|
|
4352
4476
|
context: {},
|
|
4353
4477
|
definition: {},
|
|
4354
4478
|
height: { default: () => pt },
|
|
@@ -4363,14 +4487,14 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4363
4487
|
refreshCounter: { default: 0 },
|
|
4364
4488
|
refreshCounterModifiers: {}
|
|
4365
4489
|
}),
|
|
4366
|
-
emits: /* @__PURE__ */
|
|
4490
|
+
emits: /* @__PURE__ */ bt(["chart-data", "tile-loaded", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
|
|
4367
4491
|
setup(s, { expose: e, emit: t }) {
|
|
4368
4492
|
Xt((z) => ({
|
|
4369
4493
|
v370de7a8: `${z.height}px`
|
|
4370
4494
|
}));
|
|
4371
4495
|
const i = parseInt(gs, 10), n = ts(s, "refreshCounter"), r = () => {
|
|
4372
4496
|
R.value = !0, n.value++;
|
|
4373
|
-
}, o = t, a = es(() => import("./GeoMapRenderer-
|
|
4497
|
+
}, o = t, a = es(() => import("./GeoMapRenderer-BU-WGmkn.js")), c = Pe(He), l = ft(), { datasourceConfigMap: u, stripUnknownFilters: d } = ut(l), { i18n: h } = Re.useI18n(), y = Z(), _ = Z({ status: "loading" }), k = Z(!1), v = Z(), M = Z(!1), R = Z(!0), E = x(() => s.definition.chart), G = x(() => "chart_title" in E.value ? E.value.chart_title : void 0), D = x(() => s.definition.header_description), X = x(() => E.value.type === "slottable"), $ = x(() => Le(s.definition) || Yt(s.definition) ? !1 : !("allow_csv_export" in E.value) || E.value.allow_csv_export !== !1), {
|
|
4374
4498
|
exploreLinkKebabMenu: m,
|
|
4375
4499
|
requestsLinkKebabMenu: f,
|
|
4376
4500
|
canShowKebabMenu: g,
|
|
@@ -4378,16 +4502,16 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4378
4502
|
canGenerateExploreLink: T,
|
|
4379
4503
|
requestsLinkZoomActions: N,
|
|
4380
4504
|
exploreLinkZoomActions: oe,
|
|
4381
|
-
buildExploreQuery:
|
|
4382
|
-
buildExploreLink:
|
|
4505
|
+
buildExploreQuery: we,
|
|
4506
|
+
buildExploreLink: be,
|
|
4383
4507
|
buildRequestLink: ee,
|
|
4384
4508
|
buildRequestsQueryZoomActions: ue
|
|
4385
4509
|
} = Re.useContextLinks({
|
|
4386
4510
|
queryBridge: c,
|
|
4387
|
-
chartData:
|
|
4511
|
+
chartData: $t(y),
|
|
4388
4512
|
definition: at(() => s.definition),
|
|
4389
|
-
context:
|
|
4390
|
-
}), { issueQuery:
|
|
4513
|
+
context: $t(at(() => s.context))
|
|
4514
|
+
}), { issueQuery: q } = Re.useIssueQuery();
|
|
4391
4515
|
Ge(() => s.definition, async (z, V) => {
|
|
4392
4516
|
await Qt(), v.value && (M.value = v.value.scrollWidth > v.value.clientWidth);
|
|
4393
4517
|
try {
|
|
@@ -4395,27 +4519,27 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4395
4519
|
} catch {
|
|
4396
4520
|
}
|
|
4397
4521
|
}, { immediate: !0, deep: !0 });
|
|
4398
|
-
const re = x(() => h.t("csvExport.defaultFilename")),
|
|
4522
|
+
const re = x(() => h.t("csvExport.defaultFilename")), I = x(() => !!m.value || $.value || !!s.context.editable), b = x(() => !s.hideActions && g.value && I.value), w = x(() => b.value && I.value && !s.isFullscreen), Q = {
|
|
4399
4523
|
timeseries_line: Yi,
|
|
4400
4524
|
timeseries_bar: Yi,
|
|
4401
|
-
scatter:
|
|
4525
|
+
scatter: Ko,
|
|
4402
4526
|
horizontal_bar: Gi,
|
|
4403
4527
|
vertical_bar: Gi,
|
|
4404
4528
|
gauge: Wi,
|
|
4405
|
-
donut:
|
|
4406
|
-
golden_signals:
|
|
4407
|
-
top_n:
|
|
4408
|
-
table:
|
|
4529
|
+
donut: oa,
|
|
4530
|
+
golden_signals: Qo,
|
|
4531
|
+
top_n: ea,
|
|
4532
|
+
table: ra,
|
|
4409
4533
|
slottable: void 0,
|
|
4410
4534
|
single_value: Wi,
|
|
4411
4535
|
choropleth_map: a
|
|
4412
4536
|
}, H = x(() => ({
|
|
4413
|
-
...B.value?.rendererEvents.supportsRequests ? { "select-chart-range":
|
|
4537
|
+
...B.value?.rendererEvents.supportsRequests ? { "select-chart-range": Ue } : {},
|
|
4414
4538
|
...B.value?.rendererEvents.supportsZoom ? { "zoom-time-range": nt } : {},
|
|
4415
4539
|
...B.value?.rendererEvents.supportsBounds ? { "bounds-change": gt } : {},
|
|
4416
4540
|
...B.value?.rendererEvents.supportsLoadingChange ? { "loading-change": Oe } : {}
|
|
4417
4541
|
})), B = x(() => {
|
|
4418
|
-
const z = Q[s.definition.chart.type], V =
|
|
4542
|
+
const z = Q[s.definition.chart.type], V = Le(s.definition), ge = !!z?.emits?.includes("select-chart-range"), Ke = !!z?.emits?.includes("zoom-time-range"), Be = s.definition.chart.type === "choropleth_map", Xe = !!z?.emits?.includes("loading-change"), Mt = {
|
|
4419
4543
|
query: s.definition.query,
|
|
4420
4544
|
context: s.context,
|
|
4421
4545
|
queryReady: s.queryReady,
|
|
@@ -4436,13 +4560,13 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4436
4560
|
},
|
|
4437
4561
|
rendererEvents: {
|
|
4438
4562
|
supportsRequests: ge,
|
|
4439
|
-
supportsZoom:
|
|
4563
|
+
supportsZoom: Ke,
|
|
4440
4564
|
supportsBounds: Be,
|
|
4441
4565
|
supportsLoadingChange: Xe
|
|
4442
4566
|
}
|
|
4443
4567
|
};
|
|
4444
4568
|
}), Ee = x(() => {
|
|
4445
|
-
if (
|
|
4569
|
+
if (Le(s.definition))
|
|
4446
4570
|
return null;
|
|
4447
4571
|
const z = s.definition.query, V = z?.time_range;
|
|
4448
4572
|
if (Vt(z?.datasource) && !z.dimensions?.includes("time"))
|
|
@@ -4455,31 +4579,31 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4455
4579
|
return `${ci(V.start, { short: !0, tz: ge })} - ${ci(V.end, { short: !0, tz: ge })}`;
|
|
4456
4580
|
}
|
|
4457
4581
|
return null;
|
|
4458
|
-
}),
|
|
4582
|
+
}), j = x(() => {
|
|
4459
4583
|
const z = s.definition.query, V = z?.datasource, ge = V ? u.value[V]?.timeRangeOptions : void 0, Be = (z && "time_range" in z ? z.time_range : void 0) ?? s.context.timeSpec;
|
|
4460
|
-
return
|
|
4584
|
+
return ws(Be, ge);
|
|
4461
4585
|
}), Y = x(() => X.value ? !1 : [
|
|
4462
4586
|
!!G.value,
|
|
4463
|
-
|
|
4587
|
+
w.value,
|
|
4464
4588
|
!!Ee.value,
|
|
4465
|
-
|
|
4589
|
+
j.value,
|
|
4466
4590
|
!!D.value,
|
|
4467
4591
|
s.showRefresh,
|
|
4468
4592
|
J.value
|
|
4469
|
-
].some(Boolean)), ae = x(() => y.value ?
|
|
4593
|
+
].some(Boolean)), ae = x(() => y.value ? Ut(y.value.meta.granularity_ms) : void 0), P = x(() => ["timeseries_line", "timeseries_bar"].includes(E.value.type)), ce = x(() => y.value?.meta.metric_names ?? []), de = Z();
|
|
4470
4594
|
Ge(ce, (z) => {
|
|
4471
4595
|
(!de.value || !z.includes(de.value)) && (de.value = z[0]);
|
|
4472
4596
|
}, { immediate: !0 });
|
|
4473
|
-
const J = x(() =>
|
|
4597
|
+
const J = x(() => P.value && (y.value?.data.length ?? 0) > 0 && ce.value.length > 1 && Object.keys(y.value?.meta.display ?? {}).length > 0), ie = (z) => Object.hasOwn(ys.chartLabels, z), K = x(() => ce.value.map((z) => ({
|
|
4474
4598
|
value: z,
|
|
4475
4599
|
label: ie(z) ? h.t(`chartLabels.${z}`) : z
|
|
4476
4600
|
}))), Te = x(() => {
|
|
4477
|
-
if (!
|
|
4601
|
+
if (!jt(s.definition) || !P.value || !s.queryReady || R.value)
|
|
4478
4602
|
return !1;
|
|
4479
4603
|
const z = s.definition.query.granularity;
|
|
4480
4604
|
return !z || !ae.value ? !1 : z !== ae.value;
|
|
4481
4605
|
}), F = x(() => {
|
|
4482
|
-
const z =
|
|
4606
|
+
const z = Ut(y.value?.meta.granularity_ms ?? 0) ?? "unknown", V = jt(s.definition) ? s.definition.query.granularity ?? "unknown" : "unknown";
|
|
4483
4607
|
return h.t("query_aged_out_warning", {
|
|
4484
4608
|
currentGranularity: h.t(`granularities.${z}`),
|
|
4485
4609
|
savedGranularity: h.t(`granularities.${V}`)
|
|
@@ -4491,13 +4615,13 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4491
4615
|
filters: z,
|
|
4492
4616
|
queryFields: V
|
|
4493
4617
|
});
|
|
4494
|
-
}),
|
|
4618
|
+
}), qe = () => {
|
|
4495
4619
|
o("edit-tile", s.definition);
|
|
4496
|
-
},
|
|
4620
|
+
}, $e = () => {
|
|
4497
4621
|
o("duplicate-tile", s.definition);
|
|
4498
4622
|
}, De = () => {
|
|
4499
4623
|
o("remove-tile", s.definition);
|
|
4500
|
-
},
|
|
4624
|
+
}, je = (z) => {
|
|
4501
4625
|
y.value = z, R.value = !1, o("chart-data", z), o("tile-loaded");
|
|
4502
4626
|
}, ye = () => {
|
|
4503
4627
|
R.value = !1, o("tile-loaded");
|
|
@@ -4509,9 +4633,9 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4509
4633
|
if (Yt(s.definition))
|
|
4510
4634
|
throw new Error("Cannot export data for a tile backed by the api-requests endpoint");
|
|
4511
4635
|
const z = s.definition.query.datasource?.startsWith("goap");
|
|
4512
|
-
return c?.staticConfig?.increaseCsvExportLimit !== !1 && !z ?
|
|
4513
|
-
const
|
|
4514
|
-
Be && (ge(Be),
|
|
4636
|
+
return c?.staticConfig?.increaseCsvExportLimit !== !1 && !z ? q(s.definition.query, s.context, ns) : y.value ? Promise.resolve(y.value) : new Promise((ge) => {
|
|
4637
|
+
const Ke = Ge(y, (Be) => {
|
|
4638
|
+
Be && (ge(Be), Ke());
|
|
4515
4639
|
});
|
|
4516
4640
|
});
|
|
4517
4641
|
}, ze = async () => {
|
|
@@ -4534,12 +4658,12 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4534
4658
|
bounds: z
|
|
4535
4659
|
};
|
|
4536
4660
|
o("tile-bounds-change", V);
|
|
4537
|
-
},
|
|
4538
|
-
const V = le.value, ge =
|
|
4539
|
-
oe.value = T.value ? { href:
|
|
4661
|
+
}, Ue = (z) => {
|
|
4662
|
+
const V = le.value, ge = we(z, V);
|
|
4663
|
+
oe.value = T.value ? { href: be(ge) } : void 0, N.value = C.value ? { href: ee(ue(z, V)) } : void 0;
|
|
4540
4664
|
};
|
|
4541
4665
|
return e({ getExportData: xe }), (z, V) => {
|
|
4542
|
-
const ge = ve("KTooltip"),
|
|
4666
|
+
const ge = ve("KTooltip"), Ke = ve("KBadge"), Be = ve("KButton"), Xe = ve("KDropdownItem"), Mt = ve("KDropdown");
|
|
4543
4667
|
return O(), ne("div", {
|
|
4544
4668
|
class: it(["tile-boundary", {
|
|
4545
4669
|
editable: s.context.editable,
|
|
@@ -4547,14 +4671,14 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4547
4671
|
}]),
|
|
4548
4672
|
"data-testid": `tile-${s.tileId}`
|
|
4549
4673
|
}, [
|
|
4550
|
-
Y.value && !X.value ? (O(), ne("div",
|
|
4674
|
+
Y.value && !X.value ? (O(), ne("div", la, [
|
|
4551
4675
|
me(ge, {
|
|
4552
4676
|
class: "title-tooltip",
|
|
4553
4677
|
disabled: !M.value,
|
|
4554
4678
|
"max-width": "500",
|
|
4555
4679
|
text: G.value
|
|
4556
4680
|
}, {
|
|
4557
|
-
default:
|
|
4681
|
+
default: U(() => [
|
|
4558
4682
|
he("div", {
|
|
4559
4683
|
ref_key: "titleRef",
|
|
4560
4684
|
ref: v,
|
|
@@ -4563,38 +4687,38 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4563
4687
|
]),
|
|
4564
4688
|
_: 1
|
|
4565
4689
|
}, 8, ["disabled", "text"]),
|
|
4566
|
-
he("div",
|
|
4567
|
-
|
|
4690
|
+
he("div", ua, [
|
|
4691
|
+
j.value ? (O(), W(Ke, {
|
|
4568
4692
|
key: 0,
|
|
4569
4693
|
appearance: "warning",
|
|
4570
4694
|
"data-testid": "unsupported-time-range-badge",
|
|
4571
4695
|
tooltip: S(h).t("unsupported_time_range_warning"),
|
|
4572
4696
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
4573
4697
|
}, {
|
|
4574
|
-
icon:
|
|
4698
|
+
icon: U(() => [
|
|
4575
4699
|
me(S(di), {
|
|
4576
4700
|
size: `var(--kui-icon-size-20, ${S(zi)})`
|
|
4577
4701
|
}, null, 8, ["size"])
|
|
4578
4702
|
]),
|
|
4579
|
-
default:
|
|
4580
|
-
he("span",
|
|
4703
|
+
default: U(() => [
|
|
4704
|
+
he("span", ca, se(S(h).t("unsupported_time_range_badge")), 1)
|
|
4581
4705
|
]),
|
|
4582
4706
|
_: 1
|
|
4583
4707
|
}, 8, ["tooltip"])) : fe("", !0),
|
|
4584
|
-
Ee.value ? (O(), W(
|
|
4708
|
+
Ee.value ? (O(), W(Ke, {
|
|
4585
4709
|
key: 1,
|
|
4586
4710
|
"data-testid": "time-range-badge",
|
|
4587
4711
|
tooltip: Te.value ? F.value : void 0,
|
|
4588
4712
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
4589
4713
|
}, ht({
|
|
4590
|
-
default:
|
|
4591
|
-
he("span",
|
|
4714
|
+
default: U(() => [
|
|
4715
|
+
he("span", da, se(Ee.value), 1)
|
|
4592
4716
|
]),
|
|
4593
4717
|
_: 2
|
|
4594
4718
|
}, [
|
|
4595
4719
|
Te.value ? {
|
|
4596
4720
|
name: "icon",
|
|
4597
|
-
fn:
|
|
4721
|
+
fn: U(() => [
|
|
4598
4722
|
me(S(di), {
|
|
4599
4723
|
size: `var(--kui-icon-size-20, ${S(zi)})`
|
|
4600
4724
|
}, null, 8, ["size"])
|
|
@@ -4603,16 +4727,16 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4603
4727
|
} : void 0
|
|
4604
4728
|
]), 1032, ["tooltip"])) : fe("", !0)
|
|
4605
4729
|
]),
|
|
4606
|
-
J.value ? (O(), ne("div",
|
|
4607
|
-
me(S(
|
|
4730
|
+
J.value ? (O(), ne("div", ha, [
|
|
4731
|
+
me(S(Qs), {
|
|
4608
4732
|
modelValue: de.value,
|
|
4609
4733
|
"onUpdate:modelValue": V[0] || (V[0] = (Nt) => de.value = Nt),
|
|
4610
4734
|
class: "metric-selector",
|
|
4611
4735
|
"data-testid": "metric-selector",
|
|
4612
|
-
options:
|
|
4736
|
+
options: K.value
|
|
4613
4737
|
}, null, 8, ["modelValue", "options"])
|
|
4614
4738
|
])) : fe("", !0),
|
|
4615
|
-
s.showRefresh ? (O(), ne("div",
|
|
4739
|
+
s.showRefresh ? (O(), ne("div", fa, [
|
|
4616
4740
|
me(Be, {
|
|
4617
4741
|
appearance: "secondary",
|
|
4618
4742
|
class: "refresh-button",
|
|
@@ -4622,13 +4746,13 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4622
4746
|
size: "small",
|
|
4623
4747
|
onClick: r
|
|
4624
4748
|
}, {
|
|
4625
|
-
default:
|
|
4626
|
-
R.value ? (O(), W(S(
|
|
4749
|
+
default: U(() => [
|
|
4750
|
+
R.value ? (O(), W(S(Hs), {
|
|
4627
4751
|
key: 0,
|
|
4628
4752
|
role: "button",
|
|
4629
4753
|
size: `var(--kui-icon-size-60, ${S(Ni)})`,
|
|
4630
4754
|
tabindex: "0"
|
|
4631
|
-
}, null, 8, ["size"])) : (O(), W(S(
|
|
4755
|
+
}, null, 8, ["size"])) : (O(), W(S(Fs), {
|
|
4632
4756
|
key: 1,
|
|
4633
4757
|
role: "button",
|
|
4634
4758
|
size: `var(--kui-icon-size-60, ${S(Ni)})`,
|
|
@@ -4642,57 +4766,57 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4642
4766
|
key: 2,
|
|
4643
4767
|
class: "header-description",
|
|
4644
4768
|
"data-testid": `tile-description-${s.tileId}`
|
|
4645
|
-
}, se(D.value), 9,
|
|
4646
|
-
|
|
4769
|
+
}, se(D.value), 9, ma)) : fe("", !0),
|
|
4770
|
+
b.value ? (O(), ne("div", {
|
|
4647
4771
|
key: 3,
|
|
4648
4772
|
class: "tile-actions",
|
|
4649
4773
|
"data-testid": `tile-actions-${s.tileId}`
|
|
4650
4774
|
}, [
|
|
4651
|
-
|
|
4775
|
+
b.value && s.context.editable && !s.isFullscreen ? (O(), W(S($s), {
|
|
4652
4776
|
key: 0,
|
|
4653
4777
|
class: "edit-icon",
|
|
4654
4778
|
color: `var(--kui-color-text-neutral, ${S(Gt)})`,
|
|
4655
4779
|
"data-testid": `edit-tile-${s.tileId}`,
|
|
4656
4780
|
size: `var(--kui-icon-size-40, ${S(Mi)})`,
|
|
4657
|
-
onClick:
|
|
4781
|
+
onClick: qe
|
|
4658
4782
|
}, null, 8, ["color", "data-testid", "size"])) : fe("", !0),
|
|
4659
|
-
|
|
4783
|
+
b.value && I.value && !s.isFullscreen ? (O(), W(Mt, {
|
|
4660
4784
|
key: 1,
|
|
4661
4785
|
class: "dropdown",
|
|
4662
4786
|
"data-testid": `chart-action-menu-${s.tileId}`,
|
|
4663
4787
|
"kpop-attributes": { placement: "bottom-end" }
|
|
4664
4788
|
}, {
|
|
4665
|
-
items:
|
|
4789
|
+
items: U(() => [
|
|
4666
4790
|
S(m) ? (O(), W(Xe, {
|
|
4667
4791
|
key: 0,
|
|
4668
4792
|
"data-testid": `chart-jump-to-explore-${s.tileId}`,
|
|
4669
4793
|
item: { label: S(h).t("jumpToExplore"), to: S(m) }
|
|
4670
4794
|
}, null, 8, ["data-testid", "item"])) : fe("", !0),
|
|
4671
|
-
!S(
|
|
4795
|
+
!S(Le)(s.definition) && S(f) ? (O(), W(Xe, {
|
|
4672
4796
|
key: 1,
|
|
4673
4797
|
"data-testid": `chart-jump-to-requests-${s.tileId}`,
|
|
4674
4798
|
item: { label: S(h).t("jumpToRequests"), to: S(f) }
|
|
4675
4799
|
}, null, 8, ["data-testid", "item"])) : fe("", !0),
|
|
4676
|
-
|
|
4800
|
+
$.value ? (O(), W(Xe, {
|
|
4677
4801
|
key: 2,
|
|
4678
4802
|
class: "chart-export-button",
|
|
4679
4803
|
"data-testid": `chart-csv-export-${s.tileId}`,
|
|
4680
4804
|
onClick: ze
|
|
4681
4805
|
}, {
|
|
4682
|
-
default:
|
|
4806
|
+
default: U(() => [
|
|
4683
4807
|
he("span", {
|
|
4684
4808
|
class: "chart-export-trigger",
|
|
4685
4809
|
"data-testid": `csv-export-button-${s.tileId}`
|
|
4686
|
-
}, se(S(h).t("csvExport.exportAsCsv")), 9,
|
|
4810
|
+
}, se(S(h).t("csvExport.exportAsCsv")), 9, ga)
|
|
4687
4811
|
]),
|
|
4688
4812
|
_: 1
|
|
4689
4813
|
}, 8, ["data-testid"])) : fe("", !0),
|
|
4690
4814
|
s.context.editable ? (O(), W(Xe, {
|
|
4691
4815
|
key: 3,
|
|
4692
4816
|
"data-testid": `duplicate-tile-${s.tileId}`,
|
|
4693
|
-
onClick:
|
|
4817
|
+
onClick: $e
|
|
4694
4818
|
}, {
|
|
4695
|
-
default:
|
|
4819
|
+
default: U(() => [
|
|
4696
4820
|
Ve(se(S(h).t("renderer.duplicateTile")), 1)
|
|
4697
4821
|
]),
|
|
4698
4822
|
_: 1
|
|
@@ -4702,13 +4826,13 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4702
4826
|
"data-testid": `remove-tile-${s.tileId}`,
|
|
4703
4827
|
onClick: De
|
|
4704
4828
|
}, {
|
|
4705
|
-
default:
|
|
4706
|
-
he("span",
|
|
4829
|
+
default: U(() => [
|
|
4830
|
+
he("span", ya, se(S(h).t("renderer.delete")), 1)
|
|
4707
4831
|
]),
|
|
4708
4832
|
_: 1
|
|
4709
4833
|
}, 8, ["data-testid"])) : fe("", !0)
|
|
4710
4834
|
]),
|
|
4711
|
-
default:
|
|
4835
|
+
default: U(() => [
|
|
4712
4836
|
me(S(Us), {
|
|
4713
4837
|
class: "kebab-action-menu",
|
|
4714
4838
|
color: `var(--kui-color-text-neutral, ${S(Gt)})`,
|
|
@@ -4718,8 +4842,8 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4718
4842
|
]),
|
|
4719
4843
|
_: 1
|
|
4720
4844
|
}, 8, ["data-testid"])) : fe("", !0)
|
|
4721
|
-
], 8,
|
|
4722
|
-
k.value ? (O(), W(
|
|
4845
|
+
], 8, pa)) : fe("", !0),
|
|
4846
|
+
k.value ? (O(), W(Fo, {
|
|
4723
4847
|
key: 4,
|
|
4724
4848
|
"data-testid": `csv-export-modal-${s.tileId}`,
|
|
4725
4849
|
"export-state": _.value,
|
|
@@ -4731,15 +4855,15 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4731
4855
|
class: it(["tile-content", `type-${s.tileType}-${E.value.type}`]),
|
|
4732
4856
|
"data-testid": `tile-content-${s.tileId}`
|
|
4733
4857
|
}, [
|
|
4734
|
-
B.value ? (O(), W(is(B.value.component), Ji({ key: 0 }, B.value.rendererProps,
|
|
4735
|
-
onChartData:
|
|
4858
|
+
B.value ? (O(), W(is(B.value.component), Ji({ key: 0 }, B.value.rendererProps, Is(H.value), {
|
|
4859
|
+
onChartData: je,
|
|
4736
4860
|
onQueryComplete: ye
|
|
4737
4861
|
}), null, 16)) : fe("", !0)
|
|
4738
|
-
], 10,
|
|
4739
|
-
], 10,
|
|
4862
|
+
], 10, va)
|
|
4863
|
+
], 10, aa);
|
|
4740
4864
|
};
|
|
4741
4865
|
}
|
|
4742
|
-
}),
|
|
4866
|
+
}), ks = /* @__PURE__ */ Fe(_a, [["__scopeId", "data-v-0eef0e9e"]]), wa = (s, e) => {
|
|
4743
4867
|
let t = 0;
|
|
4744
4868
|
const i = /* @__PURE__ */ new Map();
|
|
4745
4869
|
e.forEach((r) => {
|
|
@@ -4750,7 +4874,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4750
4874
|
for (let r = 0; r < t; r++)
|
|
4751
4875
|
i.get(r) ? n.push("auto") : n.push(`${s}px`);
|
|
4752
4876
|
return n;
|
|
4753
|
-
},
|
|
4877
|
+
}, ba = /* @__PURE__ */ _e({
|
|
4754
4878
|
__name: "GridLayout",
|
|
4755
4879
|
props: {
|
|
4756
4880
|
tileHeight: {
|
|
@@ -4783,7 +4907,7 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4783
4907
|
}), st(() => {
|
|
4784
4908
|
t.value && n.unobserve(t.value);
|
|
4785
4909
|
});
|
|
4786
|
-
const r = x(() =>
|
|
4910
|
+
const r = x(() => wa(e.tileHeight, e.tiles).join(" ")), o = x(() => e.tiles.map((a, c) => ({
|
|
4787
4911
|
key: `tile-${c}`,
|
|
4788
4912
|
tile: a,
|
|
4789
4913
|
style: {
|
|
@@ -4798,22 +4922,22 @@ const Ot = /* @__PURE__ */ _e({
|
|
|
4798
4922
|
ref: t,
|
|
4799
4923
|
class: "kong-ui-public-grid-layout"
|
|
4800
4924
|
}, [
|
|
4801
|
-
(O(!0), ne(
|
|
4925
|
+
(O(!0), ne(Kt, null, ss(o.value, (l) => (O(), ne("div", {
|
|
4802
4926
|
key: l.key,
|
|
4803
4927
|
class: it(["grid-cell", {
|
|
4804
4928
|
"empty-cell": !l.tile
|
|
4805
4929
|
}]),
|
|
4806
|
-
style:
|
|
4930
|
+
style: wt(l.style)
|
|
4807
4931
|
}, [
|
|
4808
4932
|
Ze(a.$slots, "tile", {
|
|
4809
|
-
style:
|
|
4933
|
+
style: wt(l.style),
|
|
4810
4934
|
tile: l.tile
|
|
4811
4935
|
}, void 0, !0)
|
|
4812
4936
|
], 6))), 128))
|
|
4813
4937
|
], 512));
|
|
4814
4938
|
}
|
|
4815
|
-
}),
|
|
4816
|
-
function
|
|
4939
|
+
}), xa = /* @__PURE__ */ Fe(ba, [["__scopeId", "data-v-0271a8b9"]]);
|
|
4940
|
+
function Ea(s, e, t, i, n) {
|
|
4817
4941
|
const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + n + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(s, o));
|
|
4818
4942
|
return r.prototype = e.prototype, r;
|
|
4819
4943
|
}
|
|
@@ -5151,7 +5275,7 @@ class p {
|
|
|
5151
5275
|
return !(!e || e.w === e.h || e.locked || e.noResize || e.grid?.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
|
|
5152
5276
|
}
|
|
5153
5277
|
}
|
|
5154
|
-
class
|
|
5278
|
+
class Ae {
|
|
5155
5279
|
constructor(e = {}) {
|
|
5156
5280
|
this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
|
|
5157
5281
|
}
|
|
@@ -5329,7 +5453,7 @@ class Le {
|
|
|
5329
5453
|
* @param resizing if out of bound, resize down or move into the grid to fit ?
|
|
5330
5454
|
*/
|
|
5331
5455
|
prepareNode(e, t) {
|
|
5332
|
-
e._id = e._id ??
|
|
5456
|
+
e._id = e._id ?? Ae._idSeq++;
|
|
5333
5457
|
const i = e.id;
|
|
5334
5458
|
if (i) {
|
|
5335
5459
|
let r = 1;
|
|
@@ -5424,7 +5548,7 @@ class Le {
|
|
|
5424
5548
|
if (t.pack = !0, !this.maxRow)
|
|
5425
5549
|
return this.moveNode(e, t);
|
|
5426
5550
|
let i;
|
|
5427
|
-
const n = new
|
|
5551
|
+
const n = new Ae({
|
|
5428
5552
|
column: this.column,
|
|
5429
5553
|
float: this.float,
|
|
5430
5554
|
nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
|
|
@@ -5446,7 +5570,7 @@ class Le {
|
|
|
5446
5570
|
willItFit(e) {
|
|
5447
5571
|
if (delete e._willFitPos, !this.maxRow)
|
|
5448
5572
|
return !0;
|
|
5449
|
-
const t = new
|
|
5573
|
+
const t = new Ae({
|
|
5450
5574
|
column: this.column,
|
|
5451
5575
|
float: this.float,
|
|
5452
5576
|
nodes: this.nodes.map((n) => ({ ...n }))
|
|
@@ -5579,7 +5703,7 @@ class Le {
|
|
|
5579
5703
|
return e.forEach((r, o) => {
|
|
5580
5704
|
if (r._id === void 0) {
|
|
5581
5705
|
const a = r.id ? this.nodes.find((c) => c.id === r.id) : void 0;
|
|
5582
|
-
r._id = a?._id ??
|
|
5706
|
+
r._id = a?._id ?? Ae._idSeq++;
|
|
5583
5707
|
}
|
|
5584
5708
|
n[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
|
|
5585
5709
|
}), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = n, this;
|
|
@@ -5590,7 +5714,7 @@ class Le {
|
|
|
5590
5714
|
* @param column corresponding column index to save it under
|
|
5591
5715
|
*/
|
|
5592
5716
|
cacheOneLayout(e, t) {
|
|
5593
|
-
e._id = e._id ??
|
|
5717
|
+
e._id = e._id ?? Ae._idSeq++;
|
|
5594
5718
|
const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
|
|
5595
5719
|
(e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
|
|
5596
5720
|
const n = this.findCacheLayout(e, t);
|
|
@@ -5613,7 +5737,7 @@ class Le {
|
|
|
5613
5737
|
return this;
|
|
5614
5738
|
}
|
|
5615
5739
|
}
|
|
5616
|
-
|
|
5740
|
+
Ae._idSeq = 0;
|
|
5617
5741
|
const Se = {
|
|
5618
5742
|
alwaysShowResizeHandle: "mobile",
|
|
5619
5743
|
animate: !0,
|
|
@@ -5644,39 +5768,39 @@ const Se = {
|
|
|
5644
5768
|
// styleInHead: false,
|
|
5645
5769
|
//removable
|
|
5646
5770
|
};
|
|
5647
|
-
class
|
|
5771
|
+
class L {
|
|
5648
5772
|
}
|
|
5649
5773
|
const Me = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
5650
|
-
class
|
|
5774
|
+
class Ie {
|
|
5651
5775
|
}
|
|
5652
5776
|
function Ct(s, e) {
|
|
5653
5777
|
s.touches.length > 1 || (s.cancelable && s.preventDefault(), p.simulateMouseEvent(s.changedTouches[0], e));
|
|
5654
5778
|
}
|
|
5655
|
-
function
|
|
5779
|
+
function Rs(s, e) {
|
|
5656
5780
|
s.cancelable && s.preventDefault(), p.simulateMouseEvent(s, e);
|
|
5657
5781
|
}
|
|
5658
5782
|
function kt(s) {
|
|
5659
|
-
|
|
5783
|
+
Ie.touchHandled || (Ie.touchHandled = !0, Ct(s, "mousedown"));
|
|
5660
5784
|
}
|
|
5661
5785
|
function Rt(s) {
|
|
5662
|
-
|
|
5786
|
+
Ie.touchHandled && Ct(s, "mousemove");
|
|
5663
5787
|
}
|
|
5664
5788
|
function Tt(s) {
|
|
5665
|
-
if (!
|
|
5789
|
+
if (!Ie.touchHandled)
|
|
5666
5790
|
return;
|
|
5667
|
-
|
|
5668
|
-
const e = !!
|
|
5669
|
-
Ct(s, "mouseup"), e || Ct(s, "click"),
|
|
5791
|
+
Ie.pointerLeaveTimeout && (window.clearTimeout(Ie.pointerLeaveTimeout), delete Ie.pointerLeaveTimeout);
|
|
5792
|
+
const e = !!L.dragElement;
|
|
5793
|
+
Ct(s, "mouseup"), e || Ct(s, "click"), Ie.touchHandled = !1;
|
|
5670
5794
|
}
|
|
5671
5795
|
function St(s) {
|
|
5672
5796
|
s.pointerType !== "mouse" && s.target.releasePointerCapture(s.pointerId);
|
|
5673
5797
|
}
|
|
5674
5798
|
function Qi(s) {
|
|
5675
|
-
|
|
5799
|
+
L.dragElement && s.pointerType !== "mouse" && Rs(s, "mouseenter");
|
|
5676
5800
|
}
|
|
5677
5801
|
function Vi(s) {
|
|
5678
|
-
|
|
5679
|
-
delete
|
|
5802
|
+
L.dragElement && s.pointerType !== "mouse" && (Ie.pointerLeaveTimeout = window.setTimeout(() => {
|
|
5803
|
+
delete Ie.pointerLeaveTimeout, Rs(s, "mouseleave");
|
|
5680
5804
|
}, 10));
|
|
5681
5805
|
}
|
|
5682
5806
|
class zt {
|
|
@@ -5799,17 +5923,17 @@ class ct extends ni {
|
|
|
5799
5923
|
}
|
|
5800
5924
|
/** @internal turns auto hide on/off */
|
|
5801
5925
|
_setupAutoHide(e) {
|
|
5802
|
-
return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut),
|
|
5926
|
+
return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), L.overResizeElement === this && delete L.overResizeElement), this;
|
|
5803
5927
|
}
|
|
5804
5928
|
/** @internal */
|
|
5805
5929
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5806
5930
|
_mouseOver(e) {
|
|
5807
|
-
|
|
5931
|
+
L.overResizeElement || L.dragElement || (L.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
|
|
5808
5932
|
}
|
|
5809
5933
|
/** @internal */
|
|
5810
5934
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5811
5935
|
_mouseOut(e) {
|
|
5812
|
-
|
|
5936
|
+
L.overResizeElement === this && (delete L.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
|
|
5813
5937
|
}
|
|
5814
5938
|
/** @internal */
|
|
5815
5939
|
_setupHandlers() {
|
|
@@ -5893,7 +6017,7 @@ class ct extends ni {
|
|
|
5893
6017
|
}
|
|
5894
6018
|
}
|
|
5895
6019
|
ct._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
5896
|
-
const
|
|
6020
|
+
const Ca = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
5897
6021
|
class dt extends ni {
|
|
5898
6022
|
constructor(e, t = {}) {
|
|
5899
6023
|
super(), this.el = e, this.option = t, this.dragTransform = {
|
|
@@ -5929,8 +6053,8 @@ class dt extends ni {
|
|
|
5929
6053
|
}
|
|
5930
6054
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
5931
6055
|
_mouseDown(e) {
|
|
5932
|
-
if (!
|
|
5933
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
6056
|
+
if (!L.mouseHandled)
|
|
6057
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ca) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete L.dragElement, delete L.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Me && (e.currentTarget.addEventListener("touchmove", Rt), e.currentTarget.addEventListener("touchend", Tt)), e.preventDefault(), document.activeElement && document.activeElement.blur(), L.mouseHandled = !0), !0;
|
|
5934
6058
|
}
|
|
5935
6059
|
/** @internal method to call actual drag event */
|
|
5936
6060
|
_callDrag(e) {
|
|
@@ -5943,15 +6067,15 @@ class dt extends ni {
|
|
|
5943
6067
|
_mouseMove(e) {
|
|
5944
6068
|
const t = this.mouseDownEvent;
|
|
5945
6069
|
if (this.lastDrag = e, this.dragging)
|
|
5946
|
-
if (this._dragFollow(e),
|
|
5947
|
-
const i = Number.isInteger(
|
|
6070
|
+
if (this._dragFollow(e), L.pauseDrag) {
|
|
6071
|
+
const i = Number.isInteger(L.pauseDrag) ? L.pauseDrag : 100;
|
|
5948
6072
|
this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), i);
|
|
5949
6073
|
} else
|
|
5950
6074
|
this._callDrag(e);
|
|
5951
6075
|
else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
|
|
5952
|
-
this.dragging = !0,
|
|
6076
|
+
this.dragging = !0, L.dragElement = this;
|
|
5953
6077
|
const i = this.el.gridstackNode?.grid;
|
|
5954
|
-
i ?
|
|
6078
|
+
i ? L.dropElement = i.el.ddElement.ddDroppable : delete L.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = p.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
|
|
5955
6079
|
const n = p.initEvent(e, { target: this.el, type: "dragstart" });
|
|
5956
6080
|
this.option.start && this.option.start(n, this.ui()), this.triggerEvent("dragstart", n), document.addEventListener("keydown", this._keyEvent);
|
|
5957
6081
|
}
|
|
@@ -5960,15 +6084,15 @@ class dt extends ni {
|
|
|
5960
6084
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
5961
6085
|
_mouseUp(e) {
|
|
5962
6086
|
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Me && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Rt, !0), e.currentTarget.removeEventListener("touchend", Tt, !0)), this.dragging) {
|
|
5963
|
-
delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent),
|
|
6087
|
+
delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), L.dropElement?.el === this.el.parentElement && delete L.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
5964
6088
|
const t = p.initEvent(e, { target: this.el, type: "dragstop" });
|
|
5965
|
-
this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t),
|
|
6089
|
+
this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), L.dropElement && L.dropElement.drop(e);
|
|
5966
6090
|
}
|
|
5967
|
-
delete this.helper, delete this.mouseDownEvent, delete
|
|
6091
|
+
delete this.helper, delete this.mouseDownEvent, delete L.dragElement, delete L.dropElement, delete L.mouseHandled, e.preventDefault();
|
|
5968
6092
|
}
|
|
5969
6093
|
/** @internal call when keys are being pressed - use Esc to cancel, R to rotate */
|
|
5970
6094
|
_keyEvent(e) {
|
|
5971
|
-
const t = this.el.gridstackNode, i = t?.grid ||
|
|
6095
|
+
const t = this.el.gridstackNode, i = t?.grid || L.dropElement?.el?.gridstack;
|
|
5972
6096
|
if (e.key === "Escape")
|
|
5973
6097
|
t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), i?.cancelDrag(), this._mouseUp(this.mouseDownEvent);
|
|
5974
6098
|
else if (t && i && (e.key === "r" || e.key === "R")) {
|
|
@@ -6037,7 +6161,7 @@ class dt extends ni {
|
|
|
6037
6161
|
}
|
|
6038
6162
|
}
|
|
6039
6163
|
dt.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
6040
|
-
class
|
|
6164
|
+
class ka extends ni {
|
|
6041
6165
|
constructor(e, t = {}) {
|
|
6042
6166
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
6043
6167
|
}
|
|
@@ -6061,19 +6185,19 @@ class ya extends ni {
|
|
|
6061
6185
|
}
|
|
6062
6186
|
/** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
|
|
6063
6187
|
_mouseEnter(e) {
|
|
6064
|
-
if (!
|
|
6188
|
+
if (!L.dragElement || !this._canDrop(L.dragElement.el))
|
|
6065
6189
|
return;
|
|
6066
|
-
e.preventDefault(), e.stopPropagation(),
|
|
6190
|
+
e.preventDefault(), e.stopPropagation(), L.dropElement && L.dropElement !== this && L.dropElement._mouseLeave(e, !0), L.dropElement = this;
|
|
6067
6191
|
const t = p.initEvent(e, { target: this.el, type: "dropover" });
|
|
6068
|
-
this.option.over && this.option.over(t, this._ui(
|
|
6192
|
+
this.option.over && this.option.over(t, this._ui(L.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
|
|
6069
6193
|
}
|
|
6070
6194
|
/** @internal called when the item is leaving our area, stop tracking if we had moving item */
|
|
6071
6195
|
_mouseLeave(e, t = !1) {
|
|
6072
|
-
if (!
|
|
6196
|
+
if (!L.dragElement || L.dropElement !== this)
|
|
6073
6197
|
return;
|
|
6074
6198
|
e.preventDefault(), e.stopPropagation();
|
|
6075
6199
|
const i = p.initEvent(e, { target: this.el, type: "dropout" });
|
|
6076
|
-
if (this.option.out && this.option.out(i, this._ui(
|
|
6200
|
+
if (this.option.out && this.option.out(i, this._ui(L.dragElement)), this.triggerEvent("dropout", i), L.dropElement === this && (delete L.dropElement, !t)) {
|
|
6077
6201
|
let n, r = this.el.parentElement;
|
|
6078
6202
|
for (; !n && r; )
|
|
6079
6203
|
n = r.ddElement?.ddDroppable, r = r.parentElement;
|
|
@@ -6084,7 +6208,7 @@ class ya extends ni {
|
|
|
6084
6208
|
drop(e) {
|
|
6085
6209
|
e.preventDefault();
|
|
6086
6210
|
const t = p.initEvent(e, { target: this.el, type: "drop" });
|
|
6087
|
-
this.option.drop && this.option.drop(t, this._ui(
|
|
6211
|
+
this.option.drop && this.option.drop(t, this._ui(L.dragElement)), this.triggerEvent("drop", t);
|
|
6088
6212
|
}
|
|
6089
6213
|
/** @internal true if element matches the string/method accept option */
|
|
6090
6214
|
_canDrop(e) {
|
|
@@ -6128,13 +6252,13 @@ class ri {
|
|
|
6128
6252
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
6129
6253
|
}
|
|
6130
6254
|
setupDroppable(e) {
|
|
6131
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
6255
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new ka(this.el, e), this;
|
|
6132
6256
|
}
|
|
6133
6257
|
cleanDroppable() {
|
|
6134
6258
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
6135
6259
|
}
|
|
6136
6260
|
}
|
|
6137
|
-
class
|
|
6261
|
+
class Ra {
|
|
6138
6262
|
resizable(e, t, i, n) {
|
|
6139
6263
|
return this._getDDElements(e, t).forEach((r) => {
|
|
6140
6264
|
if (t === "disable" || t === "enable")
|
|
@@ -6201,7 +6325,7 @@ class va {
|
|
|
6201
6325
|
}
|
|
6202
6326
|
on(e, t, i) {
|
|
6203
6327
|
return this._getDDElements(e).forEach((n) => n.on(t, (r) => {
|
|
6204
|
-
i(r,
|
|
6328
|
+
i(r, L.dragElement ? L.dragElement.el : r.target, L.dragElement ? L.dragElement.helper : null);
|
|
6205
6329
|
})), this;
|
|
6206
6330
|
}
|
|
6207
6331
|
off(e, t) {
|
|
@@ -6213,8 +6337,8 @@ class va {
|
|
|
6213
6337
|
return n.length ? n.map((o) => o.ddElement || (i ? ri.init(o) : null)).filter((o) => o) : [];
|
|
6214
6338
|
}
|
|
6215
6339
|
}
|
|
6216
|
-
const Ce = new
|
|
6217
|
-
class
|
|
6340
|
+
const Ce = new Ra();
|
|
6341
|
+
class A {
|
|
6218
6342
|
/**
|
|
6219
6343
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
6220
6344
|
* simply return the existing instance (ignore any passed options). There is also an initAll() version that support
|
|
@@ -6231,8 +6355,8 @@ class L {
|
|
|
6231
6355
|
static init(e = {}, t = ".grid-stack") {
|
|
6232
6356
|
if (typeof document > "u")
|
|
6233
6357
|
return null;
|
|
6234
|
-
const i =
|
|
6235
|
-
return i ? (i.gridstack || (i.gridstack = new
|
|
6358
|
+
const i = A.getGridElement(t);
|
|
6359
|
+
return i ? (i.gridstack || (i.gridstack = new A(i, p.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
|
|
6236
6360
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
|
|
6237
6361
|
}
|
|
6238
6362
|
/**
|
|
@@ -6246,8 +6370,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6246
6370
|
*/
|
|
6247
6371
|
static initAll(e = {}, t = ".grid-stack") {
|
|
6248
6372
|
const i = [];
|
|
6249
|
-
return typeof document > "u" || (
|
|
6250
|
-
n.gridstack || (n.gridstack = new
|
|
6373
|
+
return typeof document > "u" || (A.getGridElements(t).forEach((n) => {
|
|
6374
|
+
n.gridstack || (n.gridstack = new A(n, p.cloneDeep(e))), i.push(n.gridstack);
|
|
6251
6375
|
}), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
|
|
6252
6376
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)), i;
|
|
6253
6377
|
}
|
|
@@ -6266,14 +6390,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6266
6390
|
const o = i.gridstack;
|
|
6267
6391
|
return t && (o.opts = { ...o.opts, ...t }), t.children !== void 0 && o.load(t.children), o;
|
|
6268
6392
|
}
|
|
6269
|
-
return (!e.classList.contains("grid-stack") ||
|
|
6393
|
+
return (!e.classList.contains("grid-stack") || A.addRemoveCB) && (A.addRemoveCB ? i = A.addRemoveCB(e, t, !0, !0) : i = p.createDiv(["grid-stack", t.class], e)), A.init(t, i);
|
|
6270
6394
|
}
|
|
6271
6395
|
/** call this method to register your engine instead of the default one.
|
|
6272
6396
|
* See instead `GridStackOptions.engineClass` if you only need to
|
|
6273
6397
|
* replace just one instance.
|
|
6274
6398
|
*/
|
|
6275
6399
|
static registerEngine(e) {
|
|
6276
|
-
|
|
6400
|
+
A.engineClass = e;
|
|
6277
6401
|
}
|
|
6278
6402
|
/** @internal create placeholder DIV as needed */
|
|
6279
6403
|
get placeholder() {
|
|
@@ -6320,8 +6444,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6320
6444
|
};
|
|
6321
6445
|
e.getAttribute("gs-animate") && (a.animate = p.toBool(e.getAttribute("gs-animate"))), t = p.defaults(t, a), 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");
|
|
6322
6446
|
const l = this.el.closest("." + Se.itemClass)?.gridstackNode;
|
|
6323
|
-
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 !== Se.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = Me), this._styleSheetClass = "gs-id-" +
|
|
6324
|
-
const u = t.engineClass ||
|
|
6447
|
+
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 !== Se.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = Me), this._styleSheetClass = "gs-id-" + Ae._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
|
|
6448
|
+
const u = t.engineClass || A.engineClass || Ae;
|
|
6325
6449
|
if (this.engine = new u({
|
|
6326
6450
|
column: this.getColumn(),
|
|
6327
6451
|
float: t.float,
|
|
@@ -6339,7 +6463,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6339
6463
|
const d = t.children;
|
|
6340
6464
|
delete t.children, d.length && this.load(d);
|
|
6341
6465
|
}
|
|
6342
|
-
this.setAnimation(), t.subGridDynamic && !
|
|
6466
|
+
this.setAnimation(), t.subGridDynamic && !L.pauseDrag && (L.pauseDrag = !0), t.draggable?.pause !== void 0 && (L.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
|
|
6343
6467
|
}
|
|
6344
6468
|
/**
|
|
6345
6469
|
* add a new widget and returns it.
|
|
@@ -6362,7 +6486,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6362
6486
|
if (e.ELEMENT_NODE)
|
|
6363
6487
|
return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(e);
|
|
6364
6488
|
let t, i = e;
|
|
6365
|
-
if (i.grid = this, i?.el ? t = i.el :
|
|
6489
|
+
if (i.grid = this, i?.el ? t = i.el : A.addRemoveCB ? t = A.addRemoveCB(this.el, e, !0, !1) : t = this.createWidgetDivs(i), !t)
|
|
6366
6490
|
return;
|
|
6367
6491
|
if (i = t.gridstackNode, i && t.parentElement === this.el && this.engine.nodes.find((r) => r._id === i._id))
|
|
6368
6492
|
return t;
|
|
@@ -6373,8 +6497,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6373
6497
|
createWidgetDivs(e) {
|
|
6374
6498
|
const t = p.createDiv(["grid-stack-item", this.opts.itemClass]), i = p.createDiv(["grid-stack-item-content"], t);
|
|
6375
6499
|
return p.lazyLoad(e) ? e.visibleObservable || (e.visibleObservable = new IntersectionObserver(([n]) => {
|
|
6376
|
-
n.isIntersecting && (e.visibleObservable?.disconnect(), delete e.visibleObservable,
|
|
6377
|
-
}), window.setTimeout(() => e.visibleObservable?.observe(t))) :
|
|
6500
|
+
n.isIntersecting && (e.visibleObservable?.disconnect(), delete e.visibleObservable, A.renderCB(i, e), e.grid?.prepareDragDrop(e.el));
|
|
6501
|
+
}), window.setTimeout(() => e.visibleObservable?.observe(t))) : A.renderCB(i, e), t;
|
|
6378
6502
|
}
|
|
6379
6503
|
/**
|
|
6380
6504
|
* Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
|
|
@@ -6407,11 +6531,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6407
6531
|
let c;
|
|
6408
6532
|
t.column === "auto" && (c = !0, t.column = Math.max(r.w || 1, i?.w || 1), delete t.columnOpts);
|
|
6409
6533
|
let l = r.el.querySelector(".grid-stack-item-content"), u, d;
|
|
6410
|
-
if (n && (this._removeDD(r.el), d = { ...r, x: 0, y: 0 }, p.removeInternalForSave(d), delete d.subGridOpts, r.content && (d.content = r.content, delete r.content),
|
|
6534
|
+
if (n && (this._removeDD(r.el), d = { ...r, x: 0, y: 0 }, p.removeInternalForSave(d), delete d.subGridOpts, r.content && (d.content = r.content, delete r.content), A.addRemoveCB ? u = A.addRemoveCB(this.el, d, !0, !1) : (u = p.createDiv(["grid-stack-item"]), u.appendChild(l), l = p.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
6411
6535
|
const y = c ? t.column : r.w, _ = r.h + i.h, k = r.el.style;
|
|
6412
6536
|
k.transition = "none", this.update(r.el, { w: y, h: _ }), setTimeout(() => k.transition = null);
|
|
6413
6537
|
}
|
|
6414
|
-
const h = r.subGrid =
|
|
6538
|
+
const h = r.subGrid = A.addGrid(l, t);
|
|
6415
6539
|
return i?._moving && (h._isTemp = !0), c && (h._autoColumn = !0), n && h.makeWidget(u, d), i && (i._moving ? window.setTimeout(() => p.simulateMouseEvent(i._event, "mouseenter", h.el), 0) : h.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), h;
|
|
6416
6540
|
}
|
|
6417
6541
|
/**
|
|
@@ -6433,7 +6557,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6433
6557
|
* @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
|
|
6434
6558
|
* @returns list of widgets or full grid option, including .children list of widgets
|
|
6435
6559
|
*/
|
|
6436
|
-
save(e = !0, t = !1, i =
|
|
6560
|
+
save(e = !0, t = !1, i = A.saveCB) {
|
|
6437
6561
|
const n = this.engine.save(e, i);
|
|
6438
6562
|
if (n.forEach((r) => {
|
|
6439
6563
|
if (e && r.el && !r.subGrid && !i) {
|
|
@@ -6462,7 +6586,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6462
6586
|
* @example
|
|
6463
6587
|
* see http://gridstackjs.com/demo/serialization.html
|
|
6464
6588
|
*/
|
|
6465
|
-
load(e, t =
|
|
6589
|
+
load(e, t = A.addRemoveCB || !0) {
|
|
6466
6590
|
e = p.cloneDeep(e);
|
|
6467
6591
|
const i = this.getColumn();
|
|
6468
6592
|
e.forEach((l) => {
|
|
@@ -6472,15 +6596,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6472
6596
|
e.forEach((l) => {
|
|
6473
6597
|
n = Math.max(n, (l.x || 0) + l.w);
|
|
6474
6598
|
}), n > this.engine.defaultColumn && (this.engine.defaultColumn = n), n > i && this.engine.cacheLayout(e, n, !0);
|
|
6475
|
-
const r =
|
|
6476
|
-
typeof t == "function" && (
|
|
6599
|
+
const r = A.addRemoveCB;
|
|
6600
|
+
typeof t == "function" && (A.addRemoveCB = t);
|
|
6477
6601
|
const o = [];
|
|
6478
6602
|
this.batchUpdate();
|
|
6479
6603
|
const a = !this.engine.nodes.length;
|
|
6480
6604
|
a && this.setAnimation(!1), !a && t && [...this.engine.nodes].forEach((u) => {
|
|
6481
6605
|
if (!u.id)
|
|
6482
6606
|
return;
|
|
6483
|
-
p.find(e, u.id) || (
|
|
6607
|
+
p.find(e, u.id) || (A.addRemoveCB && A.addRemoveCB(this.el, u, !1, !1), o.push(u), this.removeWidget(u.el, !0, !1));
|
|
6484
6608
|
}), this.engine._loading = !0;
|
|
6485
6609
|
const c = [];
|
|
6486
6610
|
return this.engine.nodes = this.engine.nodes.filter((l) => p.find(e, l.id) ? (c.push(l), !1) : !0), e.forEach((l) => {
|
|
@@ -6491,7 +6615,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6491
6615
|
d && d.gridstack && d.gridstack.load(l.subGridOpts.children);
|
|
6492
6616
|
}
|
|
6493
6617
|
} else t && this.addWidget(l);
|
|
6494
|
-
}), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ?
|
|
6618
|
+
}), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? A.addRemoveCB = r : delete A.addRemoveCB, a && this.opts?.animate && this.setAnimation(this.opts.animate, !0), this;
|
|
6495
6619
|
}
|
|
6496
6620
|
/**
|
|
6497
6621
|
* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
|
|
@@ -6677,7 +6801,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6677
6801
|
* grid.makeWidget('2', {w:2, content: 'hello'});
|
|
6678
6802
|
*/
|
|
6679
6803
|
makeWidget(e, t) {
|
|
6680
|
-
const i =
|
|
6804
|
+
const i = A.getElement(e);
|
|
6681
6805
|
if (!i)
|
|
6682
6806
|
return;
|
|
6683
6807
|
i.parentElement || this.el.appendChild(i), this._prepareElement(i, !0, t);
|
|
@@ -6709,11 +6833,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6709
6833
|
* @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
|
|
6710
6834
|
*/
|
|
6711
6835
|
removeWidget(e, t = !0, i = !0) {
|
|
6712
|
-
return e ? (
|
|
6836
|
+
return e ? (A.getElements(e).forEach((n) => {
|
|
6713
6837
|
if (n.parentElement && n.parentElement !== this.el)
|
|
6714
6838
|
return;
|
|
6715
6839
|
let r = n.gridstackNode;
|
|
6716
|
-
r || (r = this.engine.nodes.find((o) => n === o.el)), r && (t &&
|
|
6840
|
+
r || (r = this.engine.nodes.find((o) => n === o.el)), r && (t && A.addRemoveCB && A.addRemoveCB(this.el, r, !1, !1), delete n.gridstackNode, this._removeDD(n), this.engine.removeNode(r, t, i), t && n.parentElement && n.remove());
|
|
6717
6841
|
}), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
|
|
6718
6842
|
}
|
|
6719
6843
|
/**
|
|
@@ -6723,7 +6847,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6723
6847
|
*/
|
|
6724
6848
|
removeAll(e = !0, t = !0) {
|
|
6725
6849
|
return this.engine.nodes.forEach((i) => {
|
|
6726
|
-
e &&
|
|
6850
|
+
e && A.addRemoveCB && A.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
|
|
6727
6851
|
}), this.engine.removeAll(e, t), t && this._triggerRemoveEvent(), this;
|
|
6728
6852
|
}
|
|
6729
6853
|
/**
|
|
@@ -6767,7 +6891,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6767
6891
|
* @param opt new widget options (x,y,w,h, etc..). Only those set will be updated.
|
|
6768
6892
|
*/
|
|
6769
6893
|
update(e, t) {
|
|
6770
|
-
return
|
|
6894
|
+
return A.getElements(e).forEach((i) => {
|
|
6771
6895
|
const n = i?.gridstackNode;
|
|
6772
6896
|
if (!n)
|
|
6773
6897
|
return;
|
|
@@ -6779,7 +6903,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6779
6903
|
a[u] = r[u] !== void 0 ? r[u] : n[u], delete r[u];
|
|
6780
6904
|
})), !a && (r.minW || r.minH || r.maxW || r.maxH) && (a = {}), r.content !== void 0) {
|
|
6781
6905
|
const u = i.querySelector(".grid-stack-item-content");
|
|
6782
|
-
u && u.textContent !== r.content && (n.content = r.content,
|
|
6906
|
+
u && u.textContent !== r.content && (n.content = r.content, A.renderCB(u, r), n.subGrid?.el && (u.appendChild(n.subGrid.el), n.subGrid.opts.styleInHead || n.subGrid._updateStyles(!0))), delete r.content;
|
|
6783
6907
|
}
|
|
6784
6908
|
let c = !1, l = !1;
|
|
6785
6909
|
for (const u in r)
|
|
@@ -6814,7 +6938,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6814
6938
|
if (!n)
|
|
6815
6939
|
return;
|
|
6816
6940
|
let r = t.h ? t.h * n : e.clientHeight, o;
|
|
6817
|
-
if (t.resizeToContentParent && (o = e.querySelector(t.resizeToContentParent)), o || (o = e.querySelector(
|
|
6941
|
+
if (t.resizeToContentParent && (o = e.querySelector(t.resizeToContentParent)), o || (o = e.querySelector(A.resizeToContentParent)), !o)
|
|
6818
6942
|
return;
|
|
6819
6943
|
const a = e.clientHeight - o.clientHeight, c = t.h ? t.h * n - a : o.clientHeight;
|
|
6820
6944
|
let l;
|
|
@@ -6828,7 +6952,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6828
6952
|
{
|
|
6829
6953
|
const h = o.firstElementChild;
|
|
6830
6954
|
if (!h) {
|
|
6831
|
-
console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${
|
|
6955
|
+
console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${A.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
|
|
6832
6956
|
return;
|
|
6833
6957
|
}
|
|
6834
6958
|
l = h.getBoundingClientRect().height || c;
|
|
@@ -6843,14 +6967,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
6843
6967
|
}
|
|
6844
6968
|
/** call the user resize (so they can do extra work) else our build in version */
|
|
6845
6969
|
resizeToContentCBCheck(e) {
|
|
6846
|
-
|
|
6970
|
+
A.resizeToContentCB ? A.resizeToContentCB(e) : this.resizeToContent(e);
|
|
6847
6971
|
}
|
|
6848
6972
|
/** rotate (by swapping w & h) the passed in node - called when user press 'r' during dragging
|
|
6849
6973
|
* @param els widget or selector of objects to modify
|
|
6850
6974
|
* @param relative optional pixel coord relative to upper/left corner to rotate around (will keep that cell under cursor)
|
|
6851
6975
|
*/
|
|
6852
6976
|
rotate(e, t) {
|
|
6853
|
-
return
|
|
6977
|
+
return A.getElements(e).forEach((i) => {
|
|
6854
6978
|
const n = i.gridstackNode;
|
|
6855
6979
|
if (!p.canBeRotated(n))
|
|
6856
6980
|
return;
|
|
@@ -7077,7 +7201,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7077
7201
|
}
|
|
7078
7202
|
/** @internal */
|
|
7079
7203
|
static getGridElement(e) {
|
|
7080
|
-
return
|
|
7204
|
+
return A.getElement(e);
|
|
7081
7205
|
}
|
|
7082
7206
|
/** @internal */
|
|
7083
7207
|
static getGridElements(e) {
|
|
@@ -7107,7 +7231,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7107
7231
|
* @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
|
|
7108
7232
|
*/
|
|
7109
7233
|
static setupDragIn(e, t, i, n = document) {
|
|
7110
|
-
t?.pause !== void 0 && (
|
|
7234
|
+
t?.pause !== void 0 && (L.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? p.getElements(e, n) : e).forEach((o, a) => {
|
|
7111
7235
|
Ce.isDraggable(o) || Ce.dragIn(o, t), i?.[a] && (o.gridstackNode = i[a]);
|
|
7112
7236
|
});
|
|
7113
7237
|
}
|
|
@@ -7118,7 +7242,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7118
7242
|
* @param val if true widget will be draggable, assuming the parent grid isn't noMove or static.
|
|
7119
7243
|
*/
|
|
7120
7244
|
movable(e, t) {
|
|
7121
|
-
return this.opts.staticGrid ? this : (
|
|
7245
|
+
return this.opts.staticGrid ? this : (A.getElements(e).forEach((i) => {
|
|
7122
7246
|
const n = i.gridstackNode;
|
|
7123
7247
|
n && (t ? delete n.noMove : n.noMove = !0, this.prepareDragDrop(n.el));
|
|
7124
7248
|
}), this);
|
|
@@ -7129,7 +7253,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7129
7253
|
* @param val if true widget will be resizable, assuming the parent grid isn't noResize or static.
|
|
7130
7254
|
*/
|
|
7131
7255
|
resizable(e, t) {
|
|
7132
|
-
return this.opts.staticGrid ? this : (
|
|
7256
|
+
return this.opts.staticGrid ? this : (A.getElements(e).forEach((i) => {
|
|
7133
7257
|
const n = i.gridstackNode;
|
|
7134
7258
|
n && (t ? delete n.noResize : n.noResize = !0, this.prepareDragDrop(n.el));
|
|
7135
7259
|
}), this);
|
|
@@ -7182,7 +7306,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7182
7306
|
/** @internal call when drag (and drop) needs to be cancelled (Esc key) */
|
|
7183
7307
|
cancelDrag() {
|
|
7184
7308
|
const e = this._placeholder?.gridstackNode;
|
|
7185
|
-
e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove &&
|
|
7309
|
+
e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove && A._itemRemoving(e.el, !1), this.engine.restoreInitial());
|
|
7186
7310
|
}
|
|
7187
7311
|
/** @internal removes any drag&drop present (called during destroy) */
|
|
7188
7312
|
_removeDD(e) {
|
|
@@ -7263,7 +7387,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7263
7387
|
a.grid || (a.el || (a = { ...a }), a._isExternal = !0, o.gridstackNode = a);
|
|
7264
7388
|
const c = a.w || Math.round(o.offsetWidth / t) || 1, l = a.h || Math.round(o.offsetHeight / e) || 1;
|
|
7265
7389
|
return a.grid && a.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = a), r.gridstackNode = a = { ...a, w: c, h: l, grid: this }, delete a.x, delete a.y, this.engine.cleanupNode(a).nodeBoundFix(a), a._initDD = a._isExternal = // DOM needs to be re-parented on a drop
|
|
7266
|
-
a._temporaryRemoved = !0) : (a.w = c, a.h = l, a._temporaryRemoved = !0),
|
|
7390
|
+
a._temporaryRemoved = !0) : (a.w = c, a.h = l, a._temporaryRemoved = !0), A._itemRemoving(a.el, !1), Ce.on(r, "drag", i), i(n, r, o), !1;
|
|
7267
7391
|
}).on(this.el, "dropout", (n, r, o) => {
|
|
7268
7392
|
const a = o?.gridstackNode || r.gridstackNode;
|
|
7269
7393
|
return a && (!a.grid || a.grid === this) && (this._leave(r, o), this._isTemp && this.removeAsSubGrid(a)), !1;
|
|
@@ -7283,7 +7407,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7283
7407
|
if (!a || (c && (this.engine.cleanupNode(a), a.grid = this), delete a.grid?._isTemp, Ce.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !c))
|
|
7284
7408
|
return !1;
|
|
7285
7409
|
const h = a.subGrid?.el?.gridstack;
|
|
7286
|
-
return p.copyPos(a, this._readAttr(this.placeholder)), p.removePositioningStyles(r), l && (a.content || a.subGridOpts ||
|
|
7410
|
+
return p.copyPos(a, this._readAttr(this.placeholder)), p.removePositioningStyles(r), l && (a.content || a.subGridOpts || A.addRemoveCB) ? (delete a.el, r = this.addWidget(a)) : (this._prepareElement(r, !0, a), this.el.appendChild(r), this.resizeToContentCheck(!1, a), h && (h.parentGridNode = a, h.opts.styleInHead || h._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(a), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...n, type: "dropped" }, d && d.grid ? d : void 0, a), u && this.setAnimation(this.opts.animate, !0), !1;
|
|
7287
7411
|
}), this;
|
|
7288
7412
|
}
|
|
7289
7413
|
/** @internal mark item for removal */
|
|
@@ -7298,7 +7422,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7298
7422
|
if (typeof this.opts.removable != "string")
|
|
7299
7423
|
return this;
|
|
7300
7424
|
const e = document.querySelector(this.opts.removable);
|
|
7301
|
-
return e ? (!this.opts.staticGrid && !Ce.isDroppable(e) && Ce.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) =>
|
|
7425
|
+
return e ? (!this.opts.staticGrid && !Ce.isDroppable(e) && Ce.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => A._itemRemoving(i, !0)).on(e, "dropout", (t, i) => A._itemRemoving(i, !1)), this) : this;
|
|
7302
7426
|
}
|
|
7303
7427
|
/**
|
|
7304
7428
|
* prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
|
|
@@ -7412,21 +7536,21 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7412
7536
|
return;
|
|
7413
7537
|
i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e;
|
|
7414
7538
|
const n = i._sidebarOrig;
|
|
7415
|
-
i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = n, this.opts.removable === !0 &&
|
|
7539
|
+
i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = n, this.opts.removable === !0 && A._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
|
|
7416
7540
|
}
|
|
7417
7541
|
// legacy method removed
|
|
7418
7542
|
commit() {
|
|
7419
|
-
return
|
|
7543
|
+
return Ea(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
7420
7544
|
}
|
|
7421
7545
|
}
|
|
7422
|
-
|
|
7546
|
+
A.renderCB = (s, e) => {
|
|
7423
7547
|
s && e?.content && (s.textContent = e.content);
|
|
7424
7548
|
};
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
const
|
|
7549
|
+
A.resizeToContentParent = ".grid-stack-item-content";
|
|
7550
|
+
A.Utils = p;
|
|
7551
|
+
A.Engine = Ae;
|
|
7552
|
+
A.GDRev = "11.5.1";
|
|
7553
|
+
const Ta = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Sa = { class: "grid-stack-item-content" }, Da = /* @__PURE__ */ _e({
|
|
7430
7554
|
__name: "DraggableGridLayout",
|
|
7431
7555
|
props: {
|
|
7432
7556
|
tiles: {},
|
|
@@ -7457,7 +7581,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7457
7581
|
}), n("update-tiles", Array.from(o.value.values()));
|
|
7458
7582
|
};
|
|
7459
7583
|
Dt(() => {
|
|
7460
|
-
r.value && (a =
|
|
7584
|
+
r.value && (a = A.init({
|
|
7461
7585
|
margin: 10,
|
|
7462
7586
|
column: i.columns,
|
|
7463
7587
|
cellHeight: i.tileHeight,
|
|
@@ -7492,7 +7616,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7492
7616
|
ref: r,
|
|
7493
7617
|
class: "grid-stack"
|
|
7494
7618
|
}, [
|
|
7495
|
-
(O(!0), ne(
|
|
7619
|
+
(O(!0), ne(Kt, null, ss(i.tiles, (k) => (O(), ne("div", {
|
|
7496
7620
|
key: k.id,
|
|
7497
7621
|
class: "grid-stack-item",
|
|
7498
7622
|
"data-id": `${k.id}`,
|
|
@@ -7503,13 +7627,13 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7503
7627
|
"gs-x": k.layout.position.col,
|
|
7504
7628
|
"gs-y": k.layout.position.row
|
|
7505
7629
|
}, [
|
|
7506
|
-
he("div",
|
|
7630
|
+
he("div", Sa, [
|
|
7507
7631
|
Ze(y.$slots, "tile", { tile: k }, void 0, !0)
|
|
7508
7632
|
])
|
|
7509
|
-
], 8,
|
|
7633
|
+
], 8, Ta))), 128))
|
|
7510
7634
|
], 512));
|
|
7511
7635
|
}
|
|
7512
|
-
}),
|
|
7636
|
+
}), Oa = /* @__PURE__ */ Fe(Da, [["__scopeId", "data-v-1fdec94c"]]), za = (s) => {
|
|
7513
7637
|
const e = {
|
|
7514
7638
|
position: {
|
|
7515
7639
|
col: 0,
|
|
@@ -7533,81 +7657,81 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7533
7657
|
definition: i,
|
|
7534
7658
|
layout: e
|
|
7535
7659
|
};
|
|
7536
|
-
},
|
|
7660
|
+
}, Ma = {
|
|
7537
7661
|
key: 0,
|
|
7538
7662
|
class: "fullscreen-header"
|
|
7539
|
-
},
|
|
7663
|
+
}, Na = {
|
|
7540
7664
|
key: 0,
|
|
7541
7665
|
class: "tile-container slottable-tile"
|
|
7542
|
-
},
|
|
7666
|
+
}, Aa = /* @__PURE__ */ _e({
|
|
7543
7667
|
__name: "DashboardRenderer",
|
|
7544
|
-
props: /* @__PURE__ */
|
|
7668
|
+
props: /* @__PURE__ */ bt({
|
|
7545
7669
|
context: {},
|
|
7546
7670
|
preview: { type: Boolean, default: !1 }
|
|
7547
7671
|
}, {
|
|
7548
7672
|
modelValue: { required: !0 },
|
|
7549
7673
|
modelModifiers: {}
|
|
7550
7674
|
}),
|
|
7551
|
-
emits: /* @__PURE__ */
|
|
7675
|
+
emits: /* @__PURE__ */ bt(["edit-tile", "tile-time-range-zoom", "tiles-loaded"], ["update:modelValue"]),
|
|
7552
7676
|
setup(s, { expose: e, emit: t }) {
|
|
7553
|
-
Xt((
|
|
7677
|
+
Xt((b) => ({
|
|
7554
7678
|
v916e2ce4: u.value
|
|
7555
7679
|
}));
|
|
7556
|
-
const i = t, n = ts(s, "modelValue"), { i18n: r } = Re.useI18n(), o = Z(0), a = Z(null), c = Z(), l = Z(), u = Z("scale(1)"), d = /* @__PURE__ */ new Set(), h =
|
|
7680
|
+
const i = t, n = ts(s, "modelValue"), { i18n: r } = Re.useI18n(), o = Z(0), a = Z(null), c = Z(), l = Z(), u = Z("scale(1)"), d = /* @__PURE__ */ new Set(), h = Pe(He);
|
|
7557
7681
|
h || (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")), Re.useRequestQueue();
|
|
7558
|
-
const { exportPdf: y, exportState: _ } = Re.useExportPdf(l), k = (
|
|
7559
|
-
d.add(
|
|
7560
|
-
const
|
|
7561
|
-
d.size >=
|
|
7682
|
+
const { exportPdf: y, exportState: _ } = Re.useExportPdf(l), k = (b) => {
|
|
7683
|
+
d.add(b.id);
|
|
7684
|
+
const w = R.value.filter((Q) => !G(Q)).length;
|
|
7685
|
+
d.size >= w && i("tiles-loaded", !0);
|
|
7562
7686
|
}, v = x(() => {
|
|
7563
|
-
const
|
|
7564
|
-
return r.te(
|
|
7565
|
-
}), M = (
|
|
7566
|
-
const Q =
|
|
7567
|
-
return Q !== 0 ? Q :
|
|
7568
|
-
}, R = x(() => n.value.tiles.map((
|
|
7569
|
-
if (
|
|
7687
|
+
const w = `renderer.trendRange.${I.value.type === "absolute" ? "custom" : I.value.time_range}`;
|
|
7688
|
+
return r.te(w) ? r.t(w) : "";
|
|
7689
|
+
}), M = (b, w) => {
|
|
7690
|
+
const Q = b.layout.position.row - w.layout.position.row;
|
|
7691
|
+
return Q !== 0 ? Q : b.layout.position.col - w.layout.position.col;
|
|
7692
|
+
}, R = x(() => n.value.tiles.map((b) => {
|
|
7693
|
+
if (be.value && !b.id && console.warn(
|
|
7570
7694
|
"No id provided for tile. One will be generated automatically,",
|
|
7571
7695
|
"however tracking changes to this tile may not work as expected.",
|
|
7572
|
-
|
|
7573
|
-
),
|
|
7696
|
+
b
|
|
7697
|
+
), b.type === "slottable")
|
|
7574
7698
|
return {
|
|
7575
|
-
layout:
|
|
7576
|
-
type:
|
|
7577
|
-
id:
|
|
7699
|
+
layout: b.layout,
|
|
7700
|
+
type: b.type,
|
|
7701
|
+
id: b.id ?? crypto.randomUUID()
|
|
7578
7702
|
};
|
|
7579
|
-
let
|
|
7580
|
-
const Q =
|
|
7581
|
-
return H !==
|
|
7582
|
-
...
|
|
7703
|
+
let w = b.definition;
|
|
7704
|
+
const Q = b.type ?? "chart", H = Eo(w, v.value);
|
|
7705
|
+
return H !== w.header_description && (w = {
|
|
7706
|
+
...w,
|
|
7583
7707
|
header_description: H
|
|
7584
7708
|
}), {
|
|
7585
|
-
layout:
|
|
7586
|
-
meta:
|
|
7709
|
+
layout: b.layout,
|
|
7710
|
+
meta: w,
|
|
7587
7711
|
type: Q,
|
|
7588
7712
|
// Add a unique key to each tile internally.
|
|
7589
|
-
id:
|
|
7713
|
+
id: b.id ?? crypto.randomUUID()
|
|
7590
7714
|
};
|
|
7591
|
-
})), E = (
|
|
7592
|
-
i("edit-tile",
|
|
7593
|
-
}, G = (
|
|
7594
|
-
if (
|
|
7595
|
-
return
|
|
7596
|
-
const
|
|
7597
|
-
return
|
|
7598
|
-
},
|
|
7715
|
+
})), E = (b) => {
|
|
7716
|
+
i("edit-tile", b);
|
|
7717
|
+
}, G = (b) => b.type === "slottable" ? !0 : b.meta?.chart.type === "slottable", D = (b) => b.type === "slottable", X = (b) => {
|
|
7718
|
+
if (b.type === "slottable")
|
|
7719
|
+
return b.id;
|
|
7720
|
+
const w = b.meta?.chart;
|
|
7721
|
+
return w && D(w) ? w.id : void 0;
|
|
7722
|
+
}, $ = (b) => {
|
|
7599
7723
|
try {
|
|
7600
|
-
const
|
|
7601
|
-
n.value.tiles.push(JSON.parse(JSON.stringify(
|
|
7602
|
-
} catch (
|
|
7603
|
-
console.warn(
|
|
7724
|
+
const w = za(b);
|
|
7725
|
+
n.value.tiles.push(JSON.parse(JSON.stringify(w)));
|
|
7726
|
+
} catch (w) {
|
|
7727
|
+
console.warn(w);
|
|
7604
7728
|
}
|
|
7605
|
-
}, m = (
|
|
7606
|
-
a.value && a.value.removeWidget(
|
|
7729
|
+
}, m = (b) => {
|
|
7730
|
+
a.value && a.value.removeWidget(b.id), d.delete(b.id);
|
|
7607
7731
|
}, f = () => {
|
|
7608
7732
|
d.clear(), o.value++;
|
|
7609
|
-
}, g = (
|
|
7610
|
-
const
|
|
7733
|
+
}, g = (b) => {
|
|
7734
|
+
const w = b.map((Q) => Q.type === "slottable" ? {
|
|
7611
7735
|
id: Q.id,
|
|
7612
7736
|
type: Q.type,
|
|
7613
7737
|
layout: Q.layout
|
|
@@ -7617,25 +7741,25 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7617
7741
|
layout: Q.layout,
|
|
7618
7742
|
definition: Q.meta
|
|
7619
7743
|
});
|
|
7620
|
-
n.value.tiles =
|
|
7744
|
+
n.value.tiles = w.sort(M);
|
|
7621
7745
|
}, C = async () => {
|
|
7622
7746
|
if (u.value = "scale(1)", await Qt(), l.value) {
|
|
7623
|
-
const { availWidth:
|
|
7747
|
+
const { availWidth: b, availHeight: w } = window.screen, { width: Q, height: H } = l.value.getBoundingClientRect(), B = Math.min(w / H, b / Q);
|
|
7624
7748
|
u.value = `scale(${B})`;
|
|
7625
7749
|
}
|
|
7626
7750
|
}, T = () => {
|
|
7627
7751
|
c.value && (document.fullscreenElement ? document.exitFullscreen() : c.value.requestFullscreen());
|
|
7628
7752
|
}, N = Z(!1), oe = () => {
|
|
7629
7753
|
N.value = document.fullscreenElement !== null, N.value && C();
|
|
7630
|
-
},
|
|
7631
|
-
editable:
|
|
7754
|
+
}, we = x(() => n.value.preset_filters ?? []), {
|
|
7755
|
+
editable: be,
|
|
7632
7756
|
enrichedContext: ee,
|
|
7633
7757
|
queryReady: ue,
|
|
7634
|
-
showTileActions:
|
|
7758
|
+
showTileActions: q,
|
|
7635
7759
|
showTileZoomActions: re,
|
|
7636
|
-
timeSpec:
|
|
7760
|
+
timeSpec: I
|
|
7637
7761
|
} = Re.useDashboardContext({
|
|
7638
|
-
globalFilters:
|
|
7762
|
+
globalFilters: we,
|
|
7639
7763
|
context: x(() => s.context),
|
|
7640
7764
|
isFullscreen: N,
|
|
7641
7765
|
preview: x(() => s.preview)
|
|
@@ -7645,7 +7769,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7645
7769
|
toggleFullscreen: T,
|
|
7646
7770
|
exportPdf: y,
|
|
7647
7771
|
pdfExportState: _
|
|
7648
|
-
}), (
|
|
7772
|
+
}), (b, w) => {
|
|
7649
7773
|
const Q = ve("KAlert");
|
|
7650
7774
|
return O(), ne("div", {
|
|
7651
7775
|
ref_key: "dashboardContainer",
|
|
@@ -7658,10 +7782,10 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7658
7782
|
ref: l,
|
|
7659
7783
|
class: "layout"
|
|
7660
7784
|
}, [
|
|
7661
|
-
S(h) && N.value ? (O(), ne("div",
|
|
7662
|
-
Ze(
|
|
7785
|
+
S(h) && N.value ? (O(), ne("div", Ma, [
|
|
7786
|
+
Ze(b.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
7663
7787
|
])) : fe("", !0),
|
|
7664
|
-
S(h) ? (O(), W(is(S(
|
|
7788
|
+
S(h) ? (O(), W(is(S(be) && !N.value ? Oa : xa), {
|
|
7665
7789
|
key: 2,
|
|
7666
7790
|
ref_key: "gridLayoutRef",
|
|
7667
7791
|
ref: a,
|
|
@@ -7670,28 +7794,28 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7670
7794
|
tiles: R.value,
|
|
7671
7795
|
onUpdateTiles: g
|
|
7672
7796
|
}, {
|
|
7673
|
-
tile:
|
|
7674
|
-
G(H) ? (O(), ne("div",
|
|
7675
|
-
Ze(
|
|
7676
|
-
])) : (O(), W(
|
|
7797
|
+
tile: U(({ tile: H }) => [
|
|
7798
|
+
G(H) ? (O(), ne("div", Na, [
|
|
7799
|
+
Ze(b.$slots, X(H), {}, void 0, !0)
|
|
7800
|
+
])) : (O(), W(ks, {
|
|
7677
7801
|
key: N.value ? `${H.id}-tile` : `${H.id}-tile-fullscreen`,
|
|
7678
7802
|
"refresh-counter": o.value,
|
|
7679
|
-
"onUpdate:refreshCounter":
|
|
7803
|
+
"onUpdate:refreshCounter": w[0] || (w[0] = (B) => o.value = B),
|
|
7680
7804
|
class: "tile-container",
|
|
7681
7805
|
context: S(ee),
|
|
7682
7806
|
definition: H.meta,
|
|
7683
7807
|
height: H.layout.size.rows * (n.value.tile_height || S(pt)) + parseInt(S(gs), 10),
|
|
7684
|
-
"hide-actions": !S(
|
|
7808
|
+
"hide-actions": !S(q),
|
|
7685
7809
|
"hide-zoom-actions": !S(re),
|
|
7686
7810
|
"is-fullscreen": N.value,
|
|
7687
7811
|
"query-ready": S(ue),
|
|
7688
7812
|
"tile-id": H.id,
|
|
7689
7813
|
"tile-type": H.type,
|
|
7690
|
-
onDuplicateTile: (B) =>
|
|
7814
|
+
onDuplicateTile: (B) => $(H),
|
|
7691
7815
|
onEditTile: (B) => E(H),
|
|
7692
7816
|
onRemoveTile: (B) => m(H),
|
|
7693
7817
|
onTileLoaded: (B) => k(H),
|
|
7694
|
-
onTileTimeRangeZoom:
|
|
7818
|
+
onTileTimeRangeZoom: w[1] || (w[1] = (B) => i("tile-time-range-zoom", B))
|
|
7695
7819
|
}, null, 8, ["refresh-counter", "context", "definition", "height", "hide-actions", "hide-zoom-actions", "is-fullscreen", "query-ready", "tile-id", "tile-type", "onDuplicateTile", "onEditTile", "onRemoveTile", "onTileLoaded"]))
|
|
7696
7820
|
]),
|
|
7697
7821
|
_: 3
|
|
@@ -7699,7 +7823,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7699
7823
|
key: 1,
|
|
7700
7824
|
appearance: "danger"
|
|
7701
7825
|
}, {
|
|
7702
|
-
default:
|
|
7826
|
+
default: U(() => [
|
|
7703
7827
|
Ve(se(S(r).t("renderer.noQueryBridge")), 1)
|
|
7704
7828
|
]),
|
|
7705
7829
|
_: 1
|
|
@@ -7708,7 +7832,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7708
7832
|
], 34);
|
|
7709
7833
|
};
|
|
7710
7834
|
}
|
|
7711
|
-
}),
|
|
7835
|
+
}), Xa = /* @__PURE__ */ Fe(Aa, [["__scopeId", "data-v-7c9b10b4"]]), Qa = /* @__PURE__ */ _e({
|
|
7712
7836
|
__name: "DashboardTilePreview",
|
|
7713
7837
|
props: {
|
|
7714
7838
|
context: {},
|
|
@@ -7728,7 +7852,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7728
7852
|
globalFilters: at(() => s.globalFilters),
|
|
7729
7853
|
context: at(() => s.context),
|
|
7730
7854
|
preview: x(() => s.preview)
|
|
7731
|
-
}), y = x(() =>
|
|
7855
|
+
}), y = x(() => Le(s.definition)), _ = x(() => y.value ? "columns" in s.definition.query && !s.definition.query.columns?.length : !("metrics" in s.definition.query) || !s.definition.query.metrics || s.definition.query.metrics.length === 0), k = Z(pt);
|
|
7732
7856
|
let v;
|
|
7733
7857
|
Dt(() => {
|
|
7734
7858
|
const E = i.value?.parentElement;
|
|
@@ -7755,14 +7879,14 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7755
7879
|
"action-button-visible": !1,
|
|
7756
7880
|
"data-testid": "chart-not-configured-empty-state"
|
|
7757
7881
|
}, {
|
|
7758
|
-
title:
|
|
7882
|
+
title: U(() => [
|
|
7759
7883
|
he("p", null, se(S(u).t("renderer.not_configured.title")), 1)
|
|
7760
7884
|
]),
|
|
7761
|
-
default:
|
|
7885
|
+
default: U(() => [
|
|
7762
7886
|
he("p", null, se(S(u).t("renderer.not_configured.description")), 1)
|
|
7763
7887
|
]),
|
|
7764
7888
|
_: 1
|
|
7765
|
-
})) : (O(), W(
|
|
7889
|
+
})) : (O(), W(ks, {
|
|
7766
7890
|
key: 1,
|
|
7767
7891
|
ref: "dashboard-tile",
|
|
7768
7892
|
"refresh-counter": M.value,
|
|
@@ -7784,7 +7908,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7784
7908
|
], 512);
|
|
7785
7909
|
};
|
|
7786
7910
|
}
|
|
7787
|
-
}),
|
|
7911
|
+
}), Ia = (s) => {
|
|
7788
7912
|
if (s.type !== "chart")
|
|
7789
7913
|
return s;
|
|
7790
7914
|
const e = s.definition?.query;
|
|
@@ -7795,8 +7919,8 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7795
7919
|
return;
|
|
7796
7920
|
}
|
|
7797
7921
|
return s;
|
|
7798
|
-
},
|
|
7799
|
-
if (s.type !== "chart" ||
|
|
7922
|
+
}, La = (s) => {
|
|
7923
|
+
if (s.type !== "chart" || Le(s.definition))
|
|
7800
7924
|
return s;
|
|
7801
7925
|
const e = s.definition?.query;
|
|
7802
7926
|
if (!e)
|
|
@@ -7812,7 +7936,7 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7812
7936
|
query: t
|
|
7813
7937
|
}
|
|
7814
7938
|
};
|
|
7815
|
-
},
|
|
7939
|
+
}, Pa = (s, e = ti) => {
|
|
7816
7940
|
if (!s.length)
|
|
7817
7941
|
return [];
|
|
7818
7942
|
let t = 0, i = 0, n = 0;
|
|
@@ -7834,36 +7958,36 @@ const _a = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ba = { cl
|
|
|
7834
7958
|
r.push(l), i += a, n = Math.max(n, c);
|
|
7835
7959
|
}
|
|
7836
7960
|
return r;
|
|
7837
|
-
},
|
|
7961
|
+
}, Va = (s, e) => {
|
|
7838
7962
|
if (e) {
|
|
7839
|
-
const n = s.tiles.map(
|
|
7963
|
+
const n = s.tiles.map(La);
|
|
7840
7964
|
return {
|
|
7841
7965
|
...s,
|
|
7842
7966
|
tiles: n
|
|
7843
7967
|
};
|
|
7844
7968
|
}
|
|
7845
|
-
const t = s.tiles.map(
|
|
7969
|
+
const t = s.tiles.map(Ia).filter((n) => n !== void 0), i = Pa(t, s.columns);
|
|
7846
7970
|
return {
|
|
7847
7971
|
...s,
|
|
7848
7972
|
tiles: i
|
|
7849
7973
|
};
|
|
7850
7974
|
};
|
|
7851
7975
|
export {
|
|
7852
|
-
|
|
7976
|
+
eo as C,
|
|
7853
7977
|
ti as D,
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7978
|
+
Li as E,
|
|
7979
|
+
no as F,
|
|
7980
|
+
xa as G,
|
|
7857
7981
|
He as I,
|
|
7858
|
-
|
|
7982
|
+
to as T,
|
|
7859
7983
|
Ot as _,
|
|
7860
|
-
|
|
7984
|
+
Fo as a,
|
|
7861
7985
|
pt as b,
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7986
|
+
io as c,
|
|
7987
|
+
Xa as d,
|
|
7988
|
+
Qa as e,
|
|
7989
|
+
so as f,
|
|
7990
|
+
Va as g,
|
|
7991
|
+
ws as i,
|
|
7992
|
+
Do as l
|
|
7869
7993
|
};
|