@kong-ui-public/analytics-utilities 11.0.1-pr.2392.1f54c9735.0 → 11.0.1-pr.2392.7400b95f8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/dashboardSchema.v2.d.ts +116 -24
- package/dist/types/dashboardSchema.v2.d.ts.map +1 -1
- package/dist/vitals-utilities.cjs +1 -1
- package/dist/vitals-utilities.cjs.map +1 -1
- package/dist/vitals-utilities.es.js +141 -126
- package/dist/vitals-utilities.es.js.map +1 -1
- package/dist/vitals-utilities.umd.js +1 -1
- package/dist/vitals-utilities.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var jn = Object.defineProperty;
|
|
|
2
2
|
var zn = (e, t, r) => t in e ? jn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var b = (e, t, r) => zn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
const Ds = 3e4;
|
|
5
|
-
var
|
|
5
|
+
var h = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(h || {});
|
|
6
6
|
const Ms = [
|
|
7
7
|
"horizontal_bar",
|
|
8
8
|
"vertical_bar",
|
|
@@ -867,28 +867,43 @@ const Ms = [
|
|
|
867
867
|
type: "string",
|
|
868
868
|
enum: na
|
|
869
869
|
},
|
|
870
|
-
|
|
870
|
+
with_legend: {
|
|
871
871
|
type: "boolean",
|
|
872
872
|
default: !1
|
|
873
873
|
},
|
|
874
874
|
bounds: {
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
875
|
+
oneOf: [
|
|
876
|
+
{
|
|
877
|
+
type: "array",
|
|
878
|
+
minItems: 2,
|
|
879
|
+
maxItems: 2,
|
|
880
|
+
items: {
|
|
881
|
+
type: "array",
|
|
882
|
+
minItems: 2,
|
|
883
|
+
maxItems: 2,
|
|
884
|
+
items: [
|
|
885
|
+
{ type: "number", minimum: -180, maximum: 180 },
|
|
886
|
+
{ type: "number", minimum: -90, maximum: 90 }
|
|
887
|
+
]
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
type: "array",
|
|
892
|
+
minItems: 4,
|
|
893
|
+
maxItems: 4,
|
|
894
|
+
items: [
|
|
895
|
+
{ type: "number", minimum: -180, maximum: 180 },
|
|
896
|
+
{ type: "number", minimum: -90, maximum: 90 },
|
|
897
|
+
{ type: "number", minimum: -180, maximum: 180 },
|
|
898
|
+
{ type: "number", minimum: -90, maximum: 90 }
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
]
|
|
887
902
|
}
|
|
888
903
|
},
|
|
889
904
|
required: ["type"],
|
|
890
905
|
additionalProperties: !1
|
|
891
|
-
},
|
|
906
|
+
}, ma = {
|
|
892
907
|
type: "object",
|
|
893
908
|
properties: {
|
|
894
909
|
tz: {
|
|
@@ -912,7 +927,7 @@ const Ms = [
|
|
|
912
927
|
"time_range"
|
|
913
928
|
],
|
|
914
929
|
additionalProperties: !1
|
|
915
|
-
},
|
|
930
|
+
}, ha = {
|
|
916
931
|
type: "object",
|
|
917
932
|
description: "A duration representing an exact start and end time.",
|
|
918
933
|
properties: {
|
|
@@ -948,8 +963,8 @@ const Ms = [
|
|
|
948
963
|
type: "object",
|
|
949
964
|
description: "The time range to query.",
|
|
950
965
|
anyOf: [
|
|
951
|
-
|
|
952
|
-
|
|
966
|
+
ma,
|
|
967
|
+
ha
|
|
953
968
|
],
|
|
954
969
|
default: {
|
|
955
970
|
type: "relative",
|
|
@@ -1206,8 +1221,8 @@ function oe() {
|
|
|
1206
1221
|
return va;
|
|
1207
1222
|
}
|
|
1208
1223
|
function A(e, t) {
|
|
1209
|
-
var d,
|
|
1210
|
-
const r = oe(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((
|
|
1224
|
+
var d, m, f, _;
|
|
1225
|
+
const r = oe(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((m = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : m.weekStartsOn) ?? r.weekStartsOn ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.weekStartsOn) ?? 0, i = M(e, t == null ? void 0 : t.in), o = i.getDay(), c = (o < n ? 7 : 0) + o - n;
|
|
1211
1226
|
return i.setDate(i.getDate() - c), i.setHours(0, 0, 0, 0), i;
|
|
1212
1227
|
}
|
|
1213
1228
|
function pe(e, t) {
|
|
@@ -1251,8 +1266,8 @@ function xa(e, t, r) {
|
|
|
1251
1266
|
r == null ? void 0 : r.in,
|
|
1252
1267
|
e,
|
|
1253
1268
|
t
|
|
1254
|
-
), o = _e(n), c = _e(i), d = +o - Yt(o),
|
|
1255
|
-
return Math.round((d -
|
|
1269
|
+
), o = _e(n), c = _e(i), d = +o - Yt(o), m = +c - Yt(c);
|
|
1270
|
+
return Math.round((d - m) / Da);
|
|
1256
1271
|
}
|
|
1257
1272
|
function Na(e, t) {
|
|
1258
1273
|
const r = or(e, t), n = C(e, 0);
|
|
@@ -1552,12 +1567,12 @@ function ae(e) {
|
|
|
1552
1567
|
const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = t.match(i);
|
|
1553
1568
|
if (!o)
|
|
1554
1569
|
return null;
|
|
1555
|
-
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth],
|
|
1570
|
+
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], m = Array.isArray(d) ? Za(d, (y) => y.test(c)) : (
|
|
1556
1571
|
// [TODO] -- I challenge you to fix the type
|
|
1557
1572
|
$a(d, (y) => y.test(c))
|
|
1558
1573
|
);
|
|
1559
1574
|
let f;
|
|
1560
|
-
f = e.valueCallback ? e.valueCallback(
|
|
1575
|
+
f = e.valueCallback ? e.valueCallback(m) : m, f = r.valueCallback ? (
|
|
1561
1576
|
// [TODO] -- I challenge you to fix the type
|
|
1562
1577
|
r.valueCallback(f)
|
|
1563
1578
|
) : f;
|
|
@@ -1707,7 +1722,7 @@ function fi(e, t) {
|
|
|
1707
1722
|
const r = M(e, t == null ? void 0 : t.in);
|
|
1708
1723
|
return xa(r, Ca(r)) + 1;
|
|
1709
1724
|
}
|
|
1710
|
-
function
|
|
1725
|
+
function mi(e, t) {
|
|
1711
1726
|
const r = M(e, t == null ? void 0 : t.in), n = +pe(r) - +Na(r);
|
|
1712
1727
|
return Math.round(n / sr) + 1;
|
|
1713
1728
|
}
|
|
@@ -1715,18 +1730,18 @@ function ur(e, t) {
|
|
|
1715
1730
|
var _, y, g, x;
|
|
1716
1731
|
const r = M(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = oe(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((x = (g = i.locale) == null ? void 0 : g.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, c = C((t == null ? void 0 : t.in) || e, 0);
|
|
1717
1732
|
c.setFullYear(n + 1, 0, o), c.setHours(0, 0, 0, 0);
|
|
1718
|
-
const d = A(c, t),
|
|
1719
|
-
|
|
1720
|
-
const f = A(
|
|
1733
|
+
const d = A(c, t), m = C((t == null ? void 0 : t.in) || e, 0);
|
|
1734
|
+
m.setFullYear(n, 0, o), m.setHours(0, 0, 0, 0);
|
|
1735
|
+
const f = A(m, t);
|
|
1721
1736
|
return +r >= +d ? n + 1 : +r >= +f ? n : n - 1;
|
|
1722
1737
|
}
|
|
1723
|
-
function
|
|
1724
|
-
var d,
|
|
1725
|
-
const r = oe(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
1738
|
+
function hi(e, t) {
|
|
1739
|
+
var d, m, f, _;
|
|
1740
|
+
const r = oe(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((m = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, i = ur(e, t), o = C((t == null ? void 0 : t.in) || e, 0);
|
|
1726
1741
|
return o.setFullYear(i, 0, n), o.setHours(0, 0, 0, 0), A(o, t);
|
|
1727
1742
|
}
|
|
1728
1743
|
function yi(e, t) {
|
|
1729
|
-
const r = M(e, t == null ? void 0 : t.in), n = +A(r, t) - +
|
|
1744
|
+
const r = M(e, t == null ? void 0 : t.in), n = +A(r, t) - +hi(r, t);
|
|
1730
1745
|
return Math.round(n / sr) + 1;
|
|
1731
1746
|
}
|
|
1732
1747
|
function p(e, t) {
|
|
@@ -1957,7 +1972,7 @@ const F = {
|
|
|
1957
1972
|
},
|
|
1958
1973
|
// ISO week of year
|
|
1959
1974
|
I: function(e, t, r) {
|
|
1960
|
-
const n =
|
|
1975
|
+
const n = mi(e);
|
|
1961
1976
|
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : p(n, t.length);
|
|
1962
1977
|
},
|
|
1963
1978
|
// Day of the month
|
|
@@ -2361,7 +2376,7 @@ function lr(e, t, r) {
|
|
|
2361
2376
|
const n = oe(), i = (r == null ? void 0 : r.locale) ?? n.locale ?? di, o = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((y = (_ = r == null ? void 0 : r.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((x = (g = n.locale) == null ? void 0 : g.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, c = (r == null ? void 0 : r.weekStartsOn) ?? ((P = (N = r == null ? void 0 : r.locale) == null ? void 0 : N.options) == null ? void 0 : P.weekStartsOn) ?? n.weekStartsOn ?? ((L = (R = n.locale) == null ? void 0 : R.options) == null ? void 0 : L.weekStartsOn) ?? 0, d = M(e, r == null ? void 0 : r.in);
|
|
2362
2377
|
if (!Ia(d))
|
|
2363
2378
|
throw new RangeError("Invalid time value");
|
|
2364
|
-
let
|
|
2379
|
+
let m = t.match(vi).map((O) => {
|
|
2365
2380
|
const T = O[0];
|
|
2366
2381
|
if (T === "p" || T === "P") {
|
|
2367
2382
|
const q = pi[T];
|
|
@@ -2382,13 +2397,13 @@ function lr(e, t, r) {
|
|
|
2382
2397
|
);
|
|
2383
2398
|
return { isToken: !1, value: O };
|
|
2384
2399
|
});
|
|
2385
|
-
i.localize.preprocessor && (
|
|
2400
|
+
i.localize.preprocessor && (m = i.localize.preprocessor(d, m));
|
|
2386
2401
|
const f = {
|
|
2387
2402
|
firstWeekContainsDate: o,
|
|
2388
2403
|
weekStartsOn: c,
|
|
2389
2404
|
locale: i
|
|
2390
2405
|
};
|
|
2391
|
-
return
|
|
2406
|
+
return m.map((O) => {
|
|
2392
2407
|
if (!O.isToken) return O.value;
|
|
2393
2408
|
const T = O.value;
|
|
2394
2409
|
(!(r != null && r.useAdditionalWeekYearTokens) && Di(T) || !(r != null && r.useAdditionalDayOfYearTokens) && Ti(T)) && Mi(T, t, String(e));
|
|
@@ -2712,15 +2727,15 @@ function be(e, t = {}) {
|
|
|
2712
2727
|
return /* @__PURE__ */ new Date(NaN);
|
|
2713
2728
|
if (c) {
|
|
2714
2729
|
const d = c.getTime();
|
|
2715
|
-
let
|
|
2716
|
-
if (n.time && (
|
|
2730
|
+
let m = 0, f;
|
|
2731
|
+
if (n.time && (m = ts(n.time), m === null || isNaN(m)))
|
|
2717
2732
|
return /* @__PURE__ */ new Date(NaN);
|
|
2718
2733
|
if (n.timeZone || t.timeZone) {
|
|
2719
|
-
if (f = ue(n.timeZone || t.timeZone, new Date(d +
|
|
2734
|
+
if (f = ue(n.timeZone || t.timeZone, new Date(d + m)), isNaN(f))
|
|
2720
2735
|
return /* @__PURE__ */ new Date(NaN);
|
|
2721
2736
|
} else
|
|
2722
|
-
f = Xt(new Date(d +
|
|
2723
|
-
return new Date(d +
|
|
2737
|
+
f = Xt(new Date(d + m)), f = Xt(new Date(d + m + f));
|
|
2738
|
+
return new Date(d + m + f);
|
|
2724
2739
|
} else
|
|
2725
2740
|
return /* @__PURE__ */ new Date(NaN);
|
|
2726
2741
|
}
|
|
@@ -2805,7 +2820,7 @@ function Zt(e, t, r) {
|
|
|
2805
2820
|
return n.setUTCDate(n.getUTCDate() + o), n;
|
|
2806
2821
|
}
|
|
2807
2822
|
const rs = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ns = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2808
|
-
function
|
|
2823
|
+
function mr(e) {
|
|
2809
2824
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
2810
2825
|
}
|
|
2811
2826
|
function Qt(e, t, r) {
|
|
@@ -2814,7 +2829,7 @@ function Qt(e, t, r) {
|
|
|
2814
2829
|
if (r != null) {
|
|
2815
2830
|
if (r < 1)
|
|
2816
2831
|
return !1;
|
|
2817
|
-
const n =
|
|
2832
|
+
const n = mr(e);
|
|
2818
2833
|
if (n && r > ns[t] || !n && r > rs[t])
|
|
2819
2834
|
return !1;
|
|
2820
2835
|
}
|
|
@@ -2823,7 +2838,7 @@ function Qt(e, t, r) {
|
|
|
2823
2838
|
function as(e, t) {
|
|
2824
2839
|
if (t < 1)
|
|
2825
2840
|
return !1;
|
|
2826
|
-
const r =
|
|
2841
|
+
const r = mr(e);
|
|
2827
2842
|
return !(r && t > 366 || !r && t > 365);
|
|
2828
2843
|
}
|
|
2829
2844
|
function Kt(e, t) {
|
|
@@ -2841,13 +2856,13 @@ function ss(e, t, r = {}) {
|
|
|
2841
2856
|
t = n.reduce(function(o, c) {
|
|
2842
2857
|
if (c[0] === "'")
|
|
2843
2858
|
return o;
|
|
2844
|
-
const d = o.indexOf(c),
|
|
2845
|
-
return
|
|
2859
|
+
const d = o.indexOf(c), m = o[d - 1] === "'", f = o.replace(c, "'" + $i[c[0]](i, c, r) + "'");
|
|
2860
|
+
return m ? f.substring(0, d - 1) + f.substring(d + 1) : f;
|
|
2846
2861
|
}, t);
|
|
2847
2862
|
}
|
|
2848
2863
|
return lr(e, t, r);
|
|
2849
2864
|
}
|
|
2850
|
-
function
|
|
2865
|
+
function hr(e, t, r) {
|
|
2851
2866
|
e = be(e, r);
|
|
2852
2867
|
const n = ue(t, e, !0), i = new Date(e.getTime() - n), o = /* @__PURE__ */ new Date(0);
|
|
2853
2868
|
return o.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), o.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), o;
|
|
@@ -2857,7 +2872,7 @@ function os(e, t, r, n) {
|
|
|
2857
2872
|
...n,
|
|
2858
2873
|
timeZone: t,
|
|
2859
2874
|
originalDate: e
|
|
2860
|
-
}, ss(
|
|
2875
|
+
}, ss(hr(e, t, { timeZone: n.timeZone }), r, n);
|
|
2861
2876
|
}
|
|
2862
2877
|
function us(e, t, r) {
|
|
2863
2878
|
if (typeof e == "string" && !e.match(fr))
|
|
@@ -2943,8 +2958,8 @@ class Ee {
|
|
|
2943
2958
|
if (t)
|
|
2944
2959
|
return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * n);
|
|
2945
2960
|
{
|
|
2946
|
-
const i = this.endDate(), o = this.timeframe.rawStart(this.tz), c = ls(o, r, this.tz),
|
|
2947
|
-
return new Date(c.getTime() -
|
|
2961
|
+
const i = this.endDate(), o = this.timeframe.rawStart(this.tz), c = ls(o, r, this.tz), m = (i.getTime() - c.getTime()) * (n - 1);
|
|
2962
|
+
return new Date(c.getTime() - m);
|
|
2948
2963
|
}
|
|
2949
2964
|
}
|
|
2950
2965
|
granularitySeconds() {
|
|
@@ -3012,8 +3027,8 @@ function fs(e) {
|
|
|
3012
3027
|
var De = { exports: {} };
|
|
3013
3028
|
De.exports;
|
|
3014
3029
|
(function(e, t) {
|
|
3015
|
-
var r = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", d = "[object Boolean]",
|
|
3016
|
-
w[o] = w[c] = w[Ke] = w[ce] = w[d] = w[
|
|
3030
|
+
var r = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", d = "[object Boolean]", m = "[object Date]", f = "[object Error]", _ = "[object Function]", y = "[object GeneratorFunction]", g = "[object Map]", x = "[object Number]", N = "[object Object]", P = "[object Promise]", R = "[object RegExp]", L = "[object Set]", O = "[object String]", T = "[object Symbol]", q = "[object WeakMap]", Ke = "[object ArrayBuffer]", ce = "[object DataView]", Je = "[object Float32Array]", et = "[object Float64Array]", tt = "[object Int8Array]", rt = "[object Int16Array]", nt = "[object Int32Array]", at = "[object Uint8Array]", it = "[object Uint8ClampedArray]", st = "[object Uint16Array]", ot = "[object Uint32Array]", wr = /[\\^$.*+?()[\]{}|]/g, br = /\w*$/, Tr = /^\[object .+?Constructor\]$/, Dr = /^(?:0|[1-9]\d*)$/, w = {};
|
|
3031
|
+
w[o] = w[c] = w[Ke] = w[ce] = w[d] = w[m] = w[Je] = w[et] = w[tt] = w[rt] = w[nt] = w[g] = w[x] = w[N] = w[R] = w[L] = w[O] = w[T] = w[at] = w[it] = w[st] = w[ot] = !0, w[f] = w[_] = w[q] = !1;
|
|
3017
3032
|
var Mr = typeof ge == "object" && ge && ge.Object === Object && ge, Or = typeof self == "object" && self && self.Object === Object && self, k = Mr || Or || Function("return this")(), ut = t && !t.nodeType && t, ct = ut && !0 && e && !e.nodeType && e, Sr = ct && ct.exports === ut;
|
|
3018
3033
|
function vr(a, s) {
|
|
3019
3034
|
return a.set(s[0], s[1]), a;
|
|
@@ -3064,13 +3079,13 @@ De.exports;
|
|
|
3064
3079
|
return a(s(u));
|
|
3065
3080
|
};
|
|
3066
3081
|
}
|
|
3067
|
-
function
|
|
3082
|
+
function mt(a) {
|
|
3068
3083
|
var s = -1, u = Array(a.size);
|
|
3069
3084
|
return a.forEach(function(l) {
|
|
3070
3085
|
u[++s] = l;
|
|
3071
3086
|
}), u;
|
|
3072
3087
|
}
|
|
3073
|
-
var Cr = Array.prototype, Rr = Function.prototype, le = Object.prototype, Ne = k["__core-js_shared__"],
|
|
3088
|
+
var Cr = Array.prototype, Rr = Function.prototype, le = Object.prototype, Ne = k["__core-js_shared__"], ht = function() {
|
|
3074
3089
|
var a = /[^.]+$/.exec(Ne && Ne.keys && Ne.keys.IE_PROTO || "");
|
|
3075
3090
|
return a ? "Symbol(src)_1." + a : "";
|
|
3076
3091
|
}(), yt = Rr.toString, H = le.hasOwnProperty, de = le.toString, kr = RegExp(
|
|
@@ -3150,16 +3165,16 @@ De.exports;
|
|
|
3150
3165
|
};
|
|
3151
3166
|
}
|
|
3152
3167
|
function nn(a) {
|
|
3153
|
-
return
|
|
3168
|
+
return me(this, a).delete(a);
|
|
3154
3169
|
}
|
|
3155
3170
|
function an(a) {
|
|
3156
|
-
return
|
|
3171
|
+
return me(this, a).get(a);
|
|
3157
3172
|
}
|
|
3158
3173
|
function sn(a) {
|
|
3159
|
-
return
|
|
3174
|
+
return me(this, a).has(a);
|
|
3160
3175
|
}
|
|
3161
3176
|
function on(a, s) {
|
|
3162
|
-
return
|
|
3177
|
+
return me(this, a).set(a, s), this;
|
|
3163
3178
|
}
|
|
3164
3179
|
B.prototype.clear = rn, B.prototype.delete = nn, B.prototype.get = an, B.prototype.has = sn, B.prototype.set = on;
|
|
3165
3180
|
function X(a) {
|
|
@@ -3188,7 +3203,7 @@ De.exports;
|
|
|
3188
3203
|
return u.set(a, s), this;
|
|
3189
3204
|
}
|
|
3190
3205
|
X.prototype.clear = un, X.prototype.delete = cn, X.prototype.get = ln, X.prototype.has = dn, X.prototype.set = fn;
|
|
3191
|
-
function
|
|
3206
|
+
function mn(a, s) {
|
|
3192
3207
|
var u = Ge(a) || An(a) ? Pr(a.length, String) : [], l = u.length, D = !!l;
|
|
3193
3208
|
for (var v in a)
|
|
3194
3209
|
H.call(a, v) && !(D && (v == "length" || Rn(v, l))) && u.push(v);
|
|
@@ -3204,14 +3219,14 @@ De.exports;
|
|
|
3204
3219
|
return u;
|
|
3205
3220
|
return -1;
|
|
3206
3221
|
}
|
|
3207
|
-
function
|
|
3222
|
+
function hn(a, s) {
|
|
3208
3223
|
return a && Mt(s, Ae(s), a);
|
|
3209
3224
|
}
|
|
3210
3225
|
function ke(a, s, u, l, D, v, G) {
|
|
3211
3226
|
var E;
|
|
3212
3227
|
if (l && (E = v ? l(a, D, v, G) : l(a)), E !== void 0)
|
|
3213
3228
|
return E;
|
|
3214
|
-
if (!
|
|
3229
|
+
if (!he(a))
|
|
3215
3230
|
return a;
|
|
3216
3231
|
var Nt = Ge(a);
|
|
3217
3232
|
if (Nt) {
|
|
@@ -3225,7 +3240,7 @@ De.exports;
|
|
|
3225
3240
|
if (dt(a))
|
|
3226
3241
|
return v ? a : {};
|
|
3227
3242
|
if (E = In(Pt ? {} : a), !s)
|
|
3228
|
-
return xn(a,
|
|
3243
|
+
return xn(a, hn(E, a));
|
|
3229
3244
|
} else {
|
|
3230
3245
|
if (!w[Z])
|
|
3231
3246
|
return v ? a : {};
|
|
@@ -3243,7 +3258,7 @@ De.exports;
|
|
|
3243
3258
|
}), E;
|
|
3244
3259
|
}
|
|
3245
3260
|
function yn(a) {
|
|
3246
|
-
return
|
|
3261
|
+
return he(a) ? Gr(a) : {};
|
|
3247
3262
|
}
|
|
3248
3263
|
function gn(a, s, u) {
|
|
3249
3264
|
var l = s(a);
|
|
@@ -3253,7 +3268,7 @@ De.exports;
|
|
|
3253
3268
|
return de.call(a);
|
|
3254
3269
|
}
|
|
3255
3270
|
function _n(a) {
|
|
3256
|
-
if (!
|
|
3271
|
+
if (!he(a) || Yn(a))
|
|
3257
3272
|
return !1;
|
|
3258
3273
|
var s = xt(a) || dt(a) ? kr : Tr;
|
|
3259
3274
|
return s.test(z(a));
|
|
@@ -3289,7 +3304,7 @@ De.exports;
|
|
|
3289
3304
|
return s.lastIndex = a.lastIndex, s;
|
|
3290
3305
|
}
|
|
3291
3306
|
function On(a, s, u) {
|
|
3292
|
-
var l = s ? u(
|
|
3307
|
+
var l = s ? u(mt(a), !0) : mt(a);
|
|
3293
3308
|
return lt(l, Er, new a.constructor());
|
|
3294
3309
|
}
|
|
3295
3310
|
function Sn(a) {
|
|
@@ -3319,7 +3334,7 @@ De.exports;
|
|
|
3319
3334
|
function Nn(a) {
|
|
3320
3335
|
return gn(a, Ae, Ot);
|
|
3321
3336
|
}
|
|
3322
|
-
function
|
|
3337
|
+
function me(a, s) {
|
|
3323
3338
|
var u = a.__data__;
|
|
3324
3339
|
return kn(s) ? u[typeof s == "string" ? "string" : "hash"] : u.map;
|
|
3325
3340
|
}
|
|
@@ -3358,7 +3373,7 @@ De.exports;
|
|
|
3358
3373
|
case Ke:
|
|
3359
3374
|
return Ye(a);
|
|
3360
3375
|
case d:
|
|
3361
|
-
case
|
|
3376
|
+
case m:
|
|
3362
3377
|
return new D(+a);
|
|
3363
3378
|
case ce:
|
|
3364
3379
|
return Tn(a, l);
|
|
@@ -3393,7 +3408,7 @@ De.exports;
|
|
|
3393
3408
|
return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? a !== "__proto__" : a === null;
|
|
3394
3409
|
}
|
|
3395
3410
|
function Yn(a) {
|
|
3396
|
-
return !!
|
|
3411
|
+
return !!ht && ht in a;
|
|
3397
3412
|
}
|
|
3398
3413
|
function St(a) {
|
|
3399
3414
|
var s = a && a.constructor, u = typeof s == "function" && s.prototype || le;
|
|
@@ -3430,13 +3445,13 @@ De.exports;
|
|
|
3430
3445
|
}
|
|
3431
3446
|
var Fn = Fr || Un;
|
|
3432
3447
|
function xt(a) {
|
|
3433
|
-
var s =
|
|
3448
|
+
var s = he(a) ? de.call(a) : "";
|
|
3434
3449
|
return s == _ || s == y;
|
|
3435
3450
|
}
|
|
3436
3451
|
function Wn(a) {
|
|
3437
3452
|
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= i;
|
|
3438
3453
|
}
|
|
3439
|
-
function
|
|
3454
|
+
function he(a) {
|
|
3440
3455
|
var s = typeof a;
|
|
3441
3456
|
return !!a && (s == "object" || s == "function");
|
|
3442
3457
|
}
|
|
@@ -3444,7 +3459,7 @@ De.exports;
|
|
|
3444
3459
|
return !!a && typeof a == "object";
|
|
3445
3460
|
}
|
|
3446
3461
|
function Ae(a) {
|
|
3447
|
-
return Et(a) ?
|
|
3462
|
+
return Et(a) ? mn(a) : wn(a);
|
|
3448
3463
|
}
|
|
3449
3464
|
function qn() {
|
|
3450
3465
|
return [];
|
|
@@ -3454,8 +3469,8 @@ De.exports;
|
|
|
3454
3469
|
}
|
|
3455
3470
|
e.exports = Gn;
|
|
3456
3471
|
})(De, De.exports);
|
|
3457
|
-
var
|
|
3458
|
-
const
|
|
3472
|
+
var ms = De.exports;
|
|
3473
|
+
const hs = /* @__PURE__ */ fs(ms), ee = (e, t) => new Date(e.getTime() - yr(t, e));
|
|
3459
3474
|
class I {
|
|
3460
3475
|
constructor(t) {
|
|
3461
3476
|
b(this, "timeframeText");
|
|
@@ -3525,7 +3540,7 @@ class I {
|
|
|
3525
3540
|
if (!t)
|
|
3526
3541
|
return /* @__PURE__ */ new Date();
|
|
3527
3542
|
const r = us(/* @__PURE__ */ new Date(), new Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
3528
|
-
return
|
|
3543
|
+
return hr(r, t);
|
|
3529
3544
|
}
|
|
3530
3545
|
}
|
|
3531
3546
|
class ys extends I {
|
|
@@ -3571,9 +3586,9 @@ class _s extends I {
|
|
|
3571
3586
|
}
|
|
3572
3587
|
const ws = /* @__PURE__ */ new Map([
|
|
3573
3588
|
[
|
|
3574
|
-
|
|
3589
|
+
h.FIFTEEN_MIN,
|
|
3575
3590
|
new I({
|
|
3576
|
-
key:
|
|
3591
|
+
key: h.FIFTEEN_MIN,
|
|
3577
3592
|
display: "Last 15 minutes",
|
|
3578
3593
|
timeframeText: "15 minutes",
|
|
3579
3594
|
timeframeLength: () => 60 * 15,
|
|
@@ -3586,9 +3601,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3586
3601
|
})
|
|
3587
3602
|
],
|
|
3588
3603
|
[
|
|
3589
|
-
|
|
3604
|
+
h.ONE_HOUR,
|
|
3590
3605
|
new I({
|
|
3591
|
-
key:
|
|
3606
|
+
key: h.ONE_HOUR,
|
|
3592
3607
|
display: "Last hour",
|
|
3593
3608
|
timeframeText: "One hour",
|
|
3594
3609
|
timeframeLength: () => 60 * 60 * 1,
|
|
@@ -3601,9 +3616,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3601
3616
|
})
|
|
3602
3617
|
],
|
|
3603
3618
|
[
|
|
3604
|
-
|
|
3619
|
+
h.SIX_HOUR,
|
|
3605
3620
|
new I({
|
|
3606
|
-
key:
|
|
3621
|
+
key: h.SIX_HOUR,
|
|
3607
3622
|
display: "Last 6 hours",
|
|
3608
3623
|
timeframeText: "6 hours",
|
|
3609
3624
|
timeframeLength: () => 60 * 60 * 6,
|
|
@@ -3616,9 +3631,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3616
3631
|
})
|
|
3617
3632
|
],
|
|
3618
3633
|
[
|
|
3619
|
-
|
|
3634
|
+
h.TWELVE_HOUR,
|
|
3620
3635
|
new I({
|
|
3621
|
-
key:
|
|
3636
|
+
key: h.TWELVE_HOUR,
|
|
3622
3637
|
display: "Last 12 hours",
|
|
3623
3638
|
timeframeText: "12 hours",
|
|
3624
3639
|
timeframeLength: () => 60 * 60 * 12,
|
|
@@ -3631,9 +3646,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3631
3646
|
})
|
|
3632
3647
|
],
|
|
3633
3648
|
[
|
|
3634
|
-
|
|
3649
|
+
h.ONE_DAY,
|
|
3635
3650
|
new I({
|
|
3636
|
-
key:
|
|
3651
|
+
key: h.ONE_DAY,
|
|
3637
3652
|
display: "Last 24 hours",
|
|
3638
3653
|
timeframeText: "24 hours",
|
|
3639
3654
|
timeframeLength: () => 60 * 60 * 24,
|
|
@@ -3646,9 +3661,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3646
3661
|
})
|
|
3647
3662
|
],
|
|
3648
3663
|
[
|
|
3649
|
-
|
|
3664
|
+
h.SEVEN_DAY,
|
|
3650
3665
|
new I({
|
|
3651
|
-
key:
|
|
3666
|
+
key: h.SEVEN_DAY,
|
|
3652
3667
|
display: "Last 7 days",
|
|
3653
3668
|
timeframeText: "7 days",
|
|
3654
3669
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -3661,9 +3676,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3661
3676
|
})
|
|
3662
3677
|
],
|
|
3663
3678
|
[
|
|
3664
|
-
|
|
3679
|
+
h.THIRTY_DAY,
|
|
3665
3680
|
new I({
|
|
3666
|
-
key:
|
|
3681
|
+
key: h.THIRTY_DAY,
|
|
3667
3682
|
display: "Last 30 days",
|
|
3668
3683
|
timeframeText: "30 days",
|
|
3669
3684
|
timeframeLength: () => 60 * 60 * 24 * 30,
|
|
@@ -3676,9 +3691,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3676
3691
|
})
|
|
3677
3692
|
],
|
|
3678
3693
|
[
|
|
3679
|
-
|
|
3694
|
+
h.CURRENT_WEEK,
|
|
3680
3695
|
new ys({
|
|
3681
|
-
key:
|
|
3696
|
+
key: h.CURRENT_WEEK,
|
|
3682
3697
|
display: "This week",
|
|
3683
3698
|
timeframeText: "Week",
|
|
3684
3699
|
timeframeLength: () => {
|
|
@@ -3694,9 +3709,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3694
3709
|
})
|
|
3695
3710
|
],
|
|
3696
3711
|
[
|
|
3697
|
-
|
|
3712
|
+
h.CURRENT_MONTH,
|
|
3698
3713
|
new gs({
|
|
3699
|
-
key:
|
|
3714
|
+
key: h.CURRENT_MONTH,
|
|
3700
3715
|
display: "This month",
|
|
3701
3716
|
timeframeText: "Month",
|
|
3702
3717
|
timeframeLength: () => {
|
|
@@ -3710,9 +3725,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3710
3725
|
})
|
|
3711
3726
|
],
|
|
3712
3727
|
[
|
|
3713
|
-
|
|
3728
|
+
h.PREVIOUS_WEEK,
|
|
3714
3729
|
new ps({
|
|
3715
|
-
key:
|
|
3730
|
+
key: h.PREVIOUS_WEEK,
|
|
3716
3731
|
display: "Previous week",
|
|
3717
3732
|
timeframeText: "Week",
|
|
3718
3733
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -3725,9 +3740,9 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3725
3740
|
})
|
|
3726
3741
|
],
|
|
3727
3742
|
[
|
|
3728
|
-
|
|
3743
|
+
h.PREVIOUS_MONTH,
|
|
3729
3744
|
new _s({
|
|
3730
|
-
key:
|
|
3745
|
+
key: h.PREVIOUS_MONTH,
|
|
3731
3746
|
display: "Previous month",
|
|
3732
3747
|
timeframeText: "Month",
|
|
3733
3748
|
timeframeLength: () => {
|
|
@@ -3744,7 +3759,7 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3744
3759
|
]);
|
|
3745
3760
|
function Ls(e) {
|
|
3746
3761
|
const t = new Date(e.start), r = new Date(e.end), n = (r.getTime() - t.getTime()) / 1e3;
|
|
3747
|
-
return e.timePeriodsKey &&
|
|
3762
|
+
return e.timePeriodsKey && hs(ws.get(e.timePeriodsKey)) || new I({
|
|
3748
3763
|
key: "custom",
|
|
3749
3764
|
timeframeText: "custom",
|
|
3750
3765
|
display: "custom",
|
|
@@ -3779,23 +3794,23 @@ function bs(e, t) {
|
|
|
3779
3794
|
return ki(e.getTimezoneOffset() - t.getTimezoneOffset());
|
|
3780
3795
|
}
|
|
3781
3796
|
const js = {
|
|
3782
|
-
"15M":
|
|
3783
|
-
"1H":
|
|
3784
|
-
"6H":
|
|
3785
|
-
"12H":
|
|
3786
|
-
"24H":
|
|
3787
|
-
"7D":
|
|
3788
|
-
"15m":
|
|
3789
|
-
"1h":
|
|
3790
|
-
"6h":
|
|
3791
|
-
"12h":
|
|
3792
|
-
"24h":
|
|
3793
|
-
"7d":
|
|
3794
|
-
"30d":
|
|
3795
|
-
current_week:
|
|
3796
|
-
current_month:
|
|
3797
|
-
previous_week:
|
|
3798
|
-
previous_month:
|
|
3797
|
+
"15M": h.FIFTEEN_MIN,
|
|
3798
|
+
"1H": h.ONE_HOUR,
|
|
3799
|
+
"6H": h.SIX_HOUR,
|
|
3800
|
+
"12H": h.TWELVE_HOUR,
|
|
3801
|
+
"24H": h.ONE_DAY,
|
|
3802
|
+
"7D": h.SEVEN_DAY,
|
|
3803
|
+
"15m": h.FIFTEEN_MIN,
|
|
3804
|
+
"1h": h.ONE_HOUR,
|
|
3805
|
+
"6h": h.SIX_HOUR,
|
|
3806
|
+
"12h": h.TWELVE_HOUR,
|
|
3807
|
+
"24h": h.ONE_DAY,
|
|
3808
|
+
"7d": h.SEVEN_DAY,
|
|
3809
|
+
"30d": h.THIRTY_DAY,
|
|
3810
|
+
current_week: h.CURRENT_WEEK,
|
|
3811
|
+
current_month: h.CURRENT_MONTH,
|
|
3812
|
+
previous_week: h.PREVIOUS_WEEK,
|
|
3813
|
+
previous_month: h.PREVIOUS_MONTH
|
|
3799
3814
|
};
|
|
3800
3815
|
class Qe {
|
|
3801
3816
|
constructor(t) {
|
|
@@ -3809,15 +3824,15 @@ class Qe {
|
|
|
3809
3824
|
}
|
|
3810
3825
|
const zs = (e, t, r) => {
|
|
3811
3826
|
const n = _r(10, 1e4), i = new Qe(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = [];
|
|
3812
|
-
let
|
|
3827
|
+
let m = 0;
|
|
3813
3828
|
for (let y = o; y <= c; y += 60 * 60 * 1e3)
|
|
3814
3829
|
if (t)
|
|
3815
3830
|
for (const g in t)
|
|
3816
3831
|
t[g].forEach((x) => {
|
|
3817
|
-
|
|
3832
|
+
m += i.next(50, 500);
|
|
3818
3833
|
const N = {
|
|
3819
3834
|
[g]: x,
|
|
3820
|
-
[e.name]:
|
|
3835
|
+
[e.name]: m
|
|
3821
3836
|
}, P = {
|
|
3822
3837
|
version: "1.0",
|
|
3823
3838
|
timestamp: new Date(y).toISOString(),
|
|
@@ -3826,12 +3841,12 @@ const zs = (e, t, r) => {
|
|
|
3826
3841
|
d.push(P);
|
|
3827
3842
|
});
|
|
3828
3843
|
else {
|
|
3829
|
-
|
|
3844
|
+
m += i.next(50, 500);
|
|
3830
3845
|
const g = {
|
|
3831
3846
|
version: "1.0",
|
|
3832
3847
|
timestamp: new Date(y).toISOString(),
|
|
3833
3848
|
event: {
|
|
3834
|
-
[e.name]:
|
|
3849
|
+
[e.name]: m
|
|
3835
3850
|
}
|
|
3836
3851
|
};
|
|
3837
3852
|
d.push(g);
|
|
@@ -3881,7 +3896,7 @@ const zs = (e, t, r) => {
|
|
|
3881
3896
|
};
|
|
3882
3897
|
c.push(y);
|
|
3883
3898
|
}
|
|
3884
|
-
const
|
|
3899
|
+
const m = {
|
|
3885
3900
|
start_ms: i,
|
|
3886
3901
|
end_ms: o,
|
|
3887
3902
|
start: new Date(i).toISOString(),
|
|
@@ -3896,16 +3911,16 @@ const zs = (e, t, r) => {
|
|
|
3896
3911
|
};
|
|
3897
3912
|
return {
|
|
3898
3913
|
data: c,
|
|
3899
|
-
meta:
|
|
3914
|
+
meta: m
|
|
3900
3915
|
};
|
|
3901
3916
|
}, Bs = (e, t, r) => {
|
|
3902
|
-
const n = Math.floor(Math.random() * 9991) + 10, i = new Qe(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = new Date((o + c) / 2).toISOString(),
|
|
3917
|
+
const n = Math.floor(Math.random() * 9991) + 10, i = new Qe(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = new Date((o + c) / 2).toISOString(), m = [];
|
|
3903
3918
|
if (t) {
|
|
3904
3919
|
const y = Object.keys(t), g = Object.values(t), x = (N, P) => {
|
|
3905
3920
|
if (P === y.length) {
|
|
3906
3921
|
e.forEach((R) => {
|
|
3907
3922
|
N[R.name] = i.next(1e3, 5e7);
|
|
3908
|
-
}),
|
|
3923
|
+
}), m.push({
|
|
3909
3924
|
version: "1.0",
|
|
3910
3925
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3911
3926
|
event: { ...N }
|
|
@@ -3921,7 +3936,7 @@ const zs = (e, t, r) => {
|
|
|
3921
3936
|
const y = {};
|
|
3922
3937
|
e.forEach((g) => {
|
|
3923
3938
|
y[g.name] = i.next(50, 500);
|
|
3924
|
-
}),
|
|
3939
|
+
}), m.push({
|
|
3925
3940
|
version: "1.0",
|
|
3926
3941
|
timestamp: d,
|
|
3927
3942
|
event: y
|
|
@@ -3951,7 +3966,7 @@ const zs = (e, t, r) => {
|
|
|
3951
3966
|
...r ?? {}
|
|
3952
3967
|
};
|
|
3953
3968
|
return {
|
|
3954
|
-
data:
|
|
3969
|
+
data: m,
|
|
3955
3970
|
meta: _
|
|
3956
3971
|
};
|
|
3957
3972
|
};
|
|
@@ -3966,7 +3981,7 @@ export {
|
|
|
3966
3981
|
js as TIMEFRAME_LOOKUP,
|
|
3967
3982
|
ws as TimePeriods,
|
|
3968
3983
|
I as Timeframe,
|
|
3969
|
-
|
|
3984
|
+
h as TimeframeKeys,
|
|
3970
3985
|
Fs as TimeseriesQueryTime,
|
|
3971
3986
|
ds as UnaryQueryTime,
|
|
3972
3987
|
Zn as aiExploreAggregations,
|