@kong-ui-public/analytics-geo-map 1.10.13 → 1.10.14-pr.4014.02f5b415a.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/vitals-geo-map.es.js +140 -134
- package/dist/vitals-geo-map.umd.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as N, defineComponent as Tt, openBlock as z, createElementBlock as Z, toDisplayString as fe, createCommentVNode as Se, Fragment as ir, renderList as or, createElementVNode as K, normalizeStyle as sr, useCssVars as lr, inject as ur, toRef as xe, ref as ae, useId as cr, onUnmounted as dr, onMounted as mr, watch as Oe, renderSlot as ut, createVNode as pr, unref as re, createTextVNode as fr, createBlock as rn } from "vue";
|
|
2
|
-
import { Map as
|
|
3
|
-
import { AnalyticsIcon as
|
|
2
|
+
import { Map as _r } from "maplibre-gl";
|
|
3
|
+
import { AnalyticsIcon as yr } from "@kong/icons";
|
|
4
4
|
import { createI18n as hr, i18nTComponent as gr } from "@kong-ui-public/i18n";
|
|
5
5
|
const on = "kapture:prepare", sn = "kapture:restore";
|
|
6
6
|
function wr(n) {
|
|
@@ -51,7 +51,7 @@ const xr = ["in", "not_in", "selector"], Tr = ["empty", "not_empty"], ie = (n) =
|
|
|
51
51
|
"request_count",
|
|
52
52
|
"request_per_minute",
|
|
53
53
|
"response_latency_average"
|
|
54
|
-
],
|
|
54
|
+
], In = [
|
|
55
55
|
...Pn,
|
|
56
56
|
"ai_gateway",
|
|
57
57
|
"ai_gateway_consumer",
|
|
@@ -74,7 +74,7 @@ const xr = ["in", "not_in", "selector"], Tr = ["empty", "not_empty"], ie = (n) =
|
|
|
74
74
|
"portal_api",
|
|
75
75
|
"principal",
|
|
76
76
|
"principal_group"
|
|
77
|
-
], St = ie(
|
|
77
|
+
], St = ie(In), Sr = [
|
|
78
78
|
...Fr,
|
|
79
79
|
"share_of_requests",
|
|
80
80
|
"cache_hit_rate",
|
|
@@ -116,12 +116,18 @@ const xr = ["in", "not_in", "selector"], Tr = ["empty", "not_empty"], ie = (n) =
|
|
|
116
116
|
"ai_provider",
|
|
117
117
|
"ai_request_model",
|
|
118
118
|
"ai_response_model",
|
|
119
|
+
"ape_decision",
|
|
120
|
+
"ape_determining_policies",
|
|
119
121
|
"application",
|
|
120
122
|
"cache_status",
|
|
123
|
+
"compression_compress_type",
|
|
124
|
+
"compression_provider",
|
|
121
125
|
"consumer",
|
|
122
126
|
"control_plane",
|
|
123
127
|
"control_plane_group",
|
|
124
128
|
"gateway_service",
|
|
129
|
+
"guardrail_block_direction",
|
|
130
|
+
"guardrail_block_source",
|
|
125
131
|
"llm_cache_status",
|
|
126
132
|
"llm_embeddings_model",
|
|
127
133
|
"llm_embeddings_provider",
|
|
@@ -224,7 +230,7 @@ const xr = ["in", "not_in", "selector"], Tr = ["empty", "not_empty"], ie = (n) =
|
|
|
224
230
|
"status_code",
|
|
225
231
|
"upstream_status_code"
|
|
226
232
|
], br = ie(Nr), Lr = [
|
|
227
|
-
...
|
|
233
|
+
...In.filter((n) => n !== "consumer_group"),
|
|
228
234
|
"a2a_context_id",
|
|
229
235
|
"a2a_error",
|
|
230
236
|
"a2a_method",
|
|
@@ -557,7 +563,7 @@ const Et = [
|
|
|
557
563
|
...Q()
|
|
558
564
|
});
|
|
559
565
|
Et.map((n) => n.code);
|
|
560
|
-
const
|
|
566
|
+
const Ir = [
|
|
561
567
|
"control_plane",
|
|
562
568
|
"gateway_service",
|
|
563
569
|
"realm",
|
|
@@ -587,13 +593,13 @@ Q([
|
|
|
587
593
|
...Ft,
|
|
588
594
|
...Mt,
|
|
589
595
|
...kt,
|
|
590
|
-
...
|
|
596
|
+
...Ir,
|
|
591
597
|
...Dt
|
|
592
598
|
])
|
|
593
599
|
]);
|
|
594
|
-
let
|
|
600
|
+
let Cr = {};
|
|
595
601
|
function Or() {
|
|
596
|
-
return
|
|
602
|
+
return Cr;
|
|
597
603
|
}
|
|
598
604
|
const Ur = 60, Gr = 3600, ln = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
599
605
|
function ke(n, e) {
|
|
@@ -614,7 +620,7 @@ function Ge(n, e, t) {
|
|
|
614
620
|
const i = oe(n, t?.in);
|
|
615
621
|
return isNaN(e) ? ke(n, NaN) : (i.setDate(i.getDate() + e), i);
|
|
616
622
|
}
|
|
617
|
-
function
|
|
623
|
+
function Cn(n, e, t) {
|
|
618
624
|
const i = oe(n, t?.in);
|
|
619
625
|
if (isNaN(e)) return ke(n, NaN);
|
|
620
626
|
if (!e)
|
|
@@ -629,7 +635,7 @@ function In(n, e, t) {
|
|
|
629
635
|
), i);
|
|
630
636
|
}
|
|
631
637
|
function Ar(n, e, t) {
|
|
632
|
-
return
|
|
638
|
+
return Cn(n, e * 3, t);
|
|
633
639
|
}
|
|
634
640
|
function me(n, e) {
|
|
635
641
|
const t = oe(n, e?.in), i = t.getMonth(), r = i - i % 3;
|
|
@@ -651,7 +657,7 @@ function zr(n) {
|
|
|
651
657
|
return Math.trunc(e);
|
|
652
658
|
}
|
|
653
659
|
function On(n, e, t) {
|
|
654
|
-
return
|
|
660
|
+
return Cn(n, -1, t);
|
|
655
661
|
}
|
|
656
662
|
function Un(n, e, t) {
|
|
657
663
|
return Ar(n, -1, t);
|
|
@@ -789,7 +795,7 @@ function fn(n) {
|
|
|
789
795
|
const e = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds()));
|
|
790
796
|
return e.setUTCFullYear(n.getFullYear()), +n - +e;
|
|
791
797
|
}
|
|
792
|
-
const Gn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, mt = 36e5,
|
|
798
|
+
const Gn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, mt = 36e5, _n = 6e4, Xr = 2, D = {
|
|
793
799
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
794
800
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
795
801
|
// year tokens
|
|
@@ -842,15 +848,15 @@ function vt(n, e = {}) {
|
|
|
842
848
|
return /* @__PURE__ */ new Date(NaN);
|
|
843
849
|
if (u) {
|
|
844
850
|
const d = u.getTime();
|
|
845
|
-
let p = 0,
|
|
851
|
+
let p = 0, y;
|
|
846
852
|
if (i.time && (p = ni(i.time), p === null || isNaN(p)))
|
|
847
853
|
return /* @__PURE__ */ new Date(NaN);
|
|
848
854
|
if (i.timeZone || e.timeZone) {
|
|
849
|
-
if (
|
|
855
|
+
if (y = We(i.timeZone || e.timeZone, new Date(d + p)), isNaN(y))
|
|
850
856
|
return /* @__PURE__ */ new Date(NaN);
|
|
851
857
|
} else
|
|
852
|
-
|
|
853
|
-
return new Date(d + p +
|
|
858
|
+
y = fn(new Date(d + p)), y = fn(new Date(d + p + y));
|
|
859
|
+
return new Date(d + p + y);
|
|
854
860
|
} else
|
|
855
861
|
return /* @__PURE__ */ new Date(NaN);
|
|
856
862
|
}
|
|
@@ -906,11 +912,11 @@ function ti(n, e) {
|
|
|
906
912
|
return hn(e, i, u) ? (t.setUTCFullYear(e, i, u), t) : /* @__PURE__ */ new Date(NaN);
|
|
907
913
|
}
|
|
908
914
|
if (o = D.Www.exec(n), o)
|
|
909
|
-
return r = parseInt(o[1], 10) - 1, gn(r) ?
|
|
915
|
+
return r = parseInt(o[1], 10) - 1, gn(r) ? yn(e, r) : /* @__PURE__ */ new Date(NaN);
|
|
910
916
|
if (o = D.WwwD.exec(n), o) {
|
|
911
917
|
r = parseInt(o[1], 10) - 1;
|
|
912
918
|
const u = parseInt(o[2], 10) - 1;
|
|
913
|
-
return gn(r, u) ?
|
|
919
|
+
return gn(r, u) ? yn(e, r, u) : /* @__PURE__ */ new Date(NaN);
|
|
914
920
|
}
|
|
915
921
|
return null;
|
|
916
922
|
}
|
|
@@ -919,15 +925,15 @@ function ni(n) {
|
|
|
919
925
|
if (i)
|
|
920
926
|
return e = parseFloat(i[1].replace(",", ".")), pt(e) ? e % 24 * mt : NaN;
|
|
921
927
|
if (i = D.HHMM.exec(n), i)
|
|
922
|
-
return e = parseInt(i[1], 10), t = parseFloat(i[2].replace(",", ".")), pt(e, t) ? e % 24 * mt + t *
|
|
928
|
+
return e = parseInt(i[1], 10), t = parseFloat(i[2].replace(",", ".")), pt(e, t) ? e % 24 * mt + t * _n : NaN;
|
|
923
929
|
if (i = D.HHMMSS.exec(n), i) {
|
|
924
930
|
e = parseInt(i[1], 10), t = parseInt(i[2], 10);
|
|
925
931
|
const r = parseFloat(i[3].replace(",", "."));
|
|
926
|
-
return pt(e, t, r) ? e % 24 * mt + t *
|
|
932
|
+
return pt(e, t, r) ? e % 24 * mt + t * _n + r * 1e3 : NaN;
|
|
927
933
|
}
|
|
928
934
|
return null;
|
|
929
935
|
}
|
|
930
|
-
function
|
|
936
|
+
function yn(n, e, t) {
|
|
931
937
|
e = e || 0, t = t || 0;
|
|
932
938
|
const i = /* @__PURE__ */ new Date(0);
|
|
933
939
|
i.setUTCFullYear(n, 0, 4);
|
|
@@ -982,9 +988,9 @@ He.exports;
|
|
|
982
988
|
var wn;
|
|
983
989
|
function ui() {
|
|
984
990
|
return wn || (wn = 1, (function(n, e) {
|
|
985
|
-
var t = 200, i = "__lodash_hash_undefined__", r = 9007199254740991, o = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", p = "[object Date]",
|
|
986
|
-
h[o] = h[u] = h[A] = h[H] = h[d] = h[p] = h[
|
|
987
|
-
var ge = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, J = typeof self == "object" && self && self.Object === Object && self, L = ge || J || Function("return this")(), Pt = e && !e.nodeType && e,
|
|
991
|
+
var t = 200, i = "__lodash_hash_undefined__", r = 9007199254740991, o = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", p = "[object Date]", y = "[object Error]", g = "[object Function]", w = "[object GeneratorFunction]", f = "[object Map]", O = "[object Number]", T = "[object Object]", F = "[object Promise]", S = "[object RegExp]", P = "[object Set]", U = "[object String]", b = "[object Symbol]", X = "[object WeakMap]", A = "[object ArrayBuffer]", H = "[object DataView]", ye = "[object Float32Array]", V = "[object Float64Array]", Qe = "[object Int8Array]", Ee = "[object Int16Array]", Re = "[object Int32Array]", _ = "[object Uint8Array]", v = "[object Uint8ClampedArray]", x = "[object Uint16Array]", I = "[object Uint32Array]", B = /[\\^$.*+?()[\]{}|]/g, Y = /\w*$/, q = /^\[object .+?Constructor\]$/, he = /^(?:0|[1-9]\d*)$/, h = {};
|
|
992
|
+
h[o] = h[u] = h[A] = h[H] = h[d] = h[p] = h[ye] = h[V] = h[Qe] = h[Ee] = h[Re] = h[f] = h[O] = h[T] = h[S] = h[P] = h[U] = h[b] = h[_] = h[v] = h[x] = h[I] = !0, h[y] = h[g] = h[X] = !1;
|
|
993
|
+
var ge = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, J = typeof self == "object" && self && self.Object === Object && self, L = ge || J || Function("return this")(), Pt = e && !e.nodeType && e, It = Pt && !0 && n && !n.nodeType && n, zn = It && It.exports === Pt;
|
|
988
994
|
function Hn(a, s) {
|
|
989
995
|
return a.set(s[0], s[1]), a;
|
|
990
996
|
}
|
|
@@ -1001,7 +1007,7 @@ function ui() {
|
|
|
1001
1007
|
a[k + l] = s[l];
|
|
1002
1008
|
return a;
|
|
1003
1009
|
}
|
|
1004
|
-
function
|
|
1010
|
+
function Ct(a, s, l, m) {
|
|
1005
1011
|
for (var k = -1, E = a ? a.length : 0; ++k < E; )
|
|
1006
1012
|
l = s(l, a[k], k, a);
|
|
1007
1013
|
return l;
|
|
@@ -1093,18 +1099,18 @@ function ui() {
|
|
|
1093
1099
|
var m = s.length - 1;
|
|
1094
1100
|
return l == m ? s.pop() : ea.call(s, l, 1), !0;
|
|
1095
1101
|
}
|
|
1096
|
-
function
|
|
1102
|
+
function _a(a) {
|
|
1097
1103
|
var s = this.__data__, l = Le(s, a);
|
|
1098
1104
|
return l < 0 ? void 0 : s[l][1];
|
|
1099
1105
|
}
|
|
1100
|
-
function
|
|
1106
|
+
function ya(a) {
|
|
1101
1107
|
return Le(this.__data__, a) > -1;
|
|
1102
1108
|
}
|
|
1103
1109
|
function ha(a, s) {
|
|
1104
1110
|
var l = this.__data__, m = Le(l, a);
|
|
1105
1111
|
return m < 0 ? l.push([a, s]) : l[m][1] = s, this;
|
|
1106
1112
|
}
|
|
1107
|
-
j.prototype.clear = pa, j.prototype.delete = fa, j.prototype.get =
|
|
1113
|
+
j.prototype.clear = pa, j.prototype.delete = fa, j.prototype.get = _a, j.prototype.has = ya, j.prototype.set = ha;
|
|
1108
1114
|
function se(a) {
|
|
1109
1115
|
var s = -1, l = a ? a.length : 0;
|
|
1110
1116
|
for (this.clear(); ++s < l; ) {
|
|
@@ -1181,7 +1187,7 @@ function ui() {
|
|
|
1181
1187
|
var R;
|
|
1182
1188
|
if (m && (R = E ? m(a, k, E, $) : m(a)), R !== void 0)
|
|
1183
1189
|
return R;
|
|
1184
|
-
if (!
|
|
1190
|
+
if (!Ie(a))
|
|
1185
1191
|
return a;
|
|
1186
1192
|
var en = ot(a);
|
|
1187
1193
|
if (en) {
|
|
@@ -1190,7 +1196,7 @@ function ui() {
|
|
|
1190
1196
|
} else {
|
|
1191
1197
|
var ce = te(a), tn = ce == g || ce == w;
|
|
1192
1198
|
if (er(a))
|
|
1193
|
-
return
|
|
1199
|
+
return Ca(a, s);
|
|
1194
1200
|
if (ce == T || ce == o || tn && !E) {
|
|
1195
1201
|
if (Ot(a))
|
|
1196
1202
|
return E ? a : {};
|
|
@@ -1208,12 +1214,12 @@ function ui() {
|
|
|
1208
1214
|
return nn;
|
|
1209
1215
|
if ($.set(a, R), !en)
|
|
1210
1216
|
var an = l ? Ya(a) : st(a);
|
|
1211
|
-
return Yn(an || a, function(lt,
|
|
1212
|
-
an && (
|
|
1217
|
+
return Yn(an || a, function(lt, Ce) {
|
|
1218
|
+
an && (Ce = lt, lt = a[Ce]), Kt(R, Ce, rt(lt, s, l, m, Ce, a, $));
|
|
1213
1219
|
}), R;
|
|
1214
1220
|
}
|
|
1215
1221
|
function Na(a) {
|
|
1216
|
-
return
|
|
1222
|
+
return Ie(a) ? Xn(a) : {};
|
|
1217
1223
|
}
|
|
1218
1224
|
function ba(a, s, l) {
|
|
1219
1225
|
var m = s(a);
|
|
@@ -1223,12 +1229,12 @@ function ui() {
|
|
|
1223
1229
|
return be.call(a);
|
|
1224
1230
|
}
|
|
1225
1231
|
function Pa(a) {
|
|
1226
|
-
if (!
|
|
1232
|
+
if (!Ie(a) || Za(a))
|
|
1227
1233
|
return !1;
|
|
1228
1234
|
var s = Jt(a) || Ot(a) ? Zn : q;
|
|
1229
1235
|
return s.test(ne(a));
|
|
1230
1236
|
}
|
|
1231
|
-
function
|
|
1237
|
+
function Ia(a) {
|
|
1232
1238
|
if (!Zt(a))
|
|
1233
1239
|
return na(a);
|
|
1234
1240
|
var s = [];
|
|
@@ -1236,7 +1242,7 @@ function ui() {
|
|
|
1236
1242
|
W.call(a, l) && l != "constructor" && s.push(l);
|
|
1237
1243
|
return s;
|
|
1238
1244
|
}
|
|
1239
|
-
function
|
|
1245
|
+
function Ca(a, s) {
|
|
1240
1246
|
if (s)
|
|
1241
1247
|
return a.slice();
|
|
1242
1248
|
var l = new a.constructor(a.length);
|
|
@@ -1252,7 +1258,7 @@ function ui() {
|
|
|
1252
1258
|
}
|
|
1253
1259
|
function Ua(a, s, l) {
|
|
1254
1260
|
var m = s ? l(Ut(a), !0) : Ut(a);
|
|
1255
|
-
return
|
|
1261
|
+
return Ct(m, Hn, new a.constructor());
|
|
1256
1262
|
}
|
|
1257
1263
|
function Ga(a) {
|
|
1258
1264
|
var s = new a.constructor(a.source, Y.exec(a));
|
|
@@ -1260,7 +1266,7 @@ function ui() {
|
|
|
1260
1266
|
}
|
|
1261
1267
|
function Aa(a, s, l) {
|
|
1262
1268
|
var m = s ? l(Gt(a), !0) : Gt(a);
|
|
1263
|
-
return
|
|
1269
|
+
return Ct(m, Bn, new a.constructor());
|
|
1264
1270
|
}
|
|
1265
1271
|
function Va(a) {
|
|
1266
1272
|
return $t ? Object($t.call(a)) : {};
|
|
@@ -1332,15 +1338,15 @@ function ui() {
|
|
|
1332
1338
|
return new k(+a);
|
|
1333
1339
|
case H:
|
|
1334
1340
|
return Oa(a, m);
|
|
1335
|
-
case
|
|
1341
|
+
case ye:
|
|
1336
1342
|
case V:
|
|
1337
1343
|
case Qe:
|
|
1338
1344
|
case Ee:
|
|
1339
1345
|
case Re:
|
|
1340
|
-
case
|
|
1346
|
+
case _:
|
|
1341
1347
|
case v:
|
|
1342
1348
|
case x:
|
|
1343
|
-
case
|
|
1349
|
+
case I:
|
|
1344
1350
|
return za(a, m);
|
|
1345
1351
|
case f:
|
|
1346
1352
|
return Ua(a, m, l);
|
|
@@ -1400,13 +1406,13 @@ function ui() {
|
|
|
1400
1406
|
}
|
|
1401
1407
|
var er = ta || rr;
|
|
1402
1408
|
function Jt(a) {
|
|
1403
|
-
var s =
|
|
1409
|
+
var s = Ie(a) ? be.call(a) : "";
|
|
1404
1410
|
return s == g || s == w;
|
|
1405
1411
|
}
|
|
1406
1412
|
function tr(a) {
|
|
1407
1413
|
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= r;
|
|
1408
1414
|
}
|
|
1409
|
-
function
|
|
1415
|
+
function Ie(a) {
|
|
1410
1416
|
var s = typeof a;
|
|
1411
1417
|
return !!a && (s == "object" || s == "function");
|
|
1412
1418
|
}
|
|
@@ -1414,7 +1420,7 @@ function ui() {
|
|
|
1414
1420
|
return !!a && typeof a == "object";
|
|
1415
1421
|
}
|
|
1416
1422
|
function st(a) {
|
|
1417
|
-
return Xt(a) ? Ea(a) :
|
|
1423
|
+
return Xt(a) ? Ea(a) : Ia(a);
|
|
1418
1424
|
}
|
|
1419
1425
|
function ar() {
|
|
1420
1426
|
return [];
|
|
@@ -1426,7 +1432,7 @@ function ui() {
|
|
|
1426
1432
|
})(He, He.exports)), He.exports;
|
|
1427
1433
|
}
|
|
1428
1434
|
ui();
|
|
1429
|
-
const
|
|
1435
|
+
const C = (n, e) => new Date(n.getTime() - li(e, n));
|
|
1430
1436
|
class M {
|
|
1431
1437
|
timeframeText;
|
|
1432
1438
|
key;
|
|
@@ -1503,7 +1509,7 @@ class M {
|
|
|
1503
1509
|
class ci extends M {
|
|
1504
1510
|
rawStart(e) {
|
|
1505
1511
|
let t = je(this.tzAdjustedDate(e), { weekStartsOn: 1 });
|
|
1506
|
-
return e && (t =
|
|
1512
|
+
return e && (t = C(t, e)), t;
|
|
1507
1513
|
}
|
|
1508
1514
|
maximumTimeframeLength() {
|
|
1509
1515
|
return 3600 * 24 * 7;
|
|
@@ -1512,7 +1518,7 @@ class ci extends M {
|
|
|
1512
1518
|
class di extends M {
|
|
1513
1519
|
rawStart(e) {
|
|
1514
1520
|
let t = pe(this.tzAdjustedDate(e));
|
|
1515
|
-
return e && (t =
|
|
1521
|
+
return e && (t = C(t, e)), t;
|
|
1516
1522
|
}
|
|
1517
1523
|
maximumTimeframeLength() {
|
|
1518
1524
|
return 3600 * 24 * 31;
|
|
@@ -1521,7 +1527,7 @@ class di extends M {
|
|
|
1521
1527
|
class mi extends M {
|
|
1522
1528
|
rawStart(e) {
|
|
1523
1529
|
let t = me(this.tzAdjustedDate(e));
|
|
1524
|
-
return e && (t =
|
|
1530
|
+
return e && (t = C(t, e)), t;
|
|
1525
1531
|
}
|
|
1526
1532
|
maximumTimeframeLength() {
|
|
1527
1533
|
return 3600 * 24 * 92;
|
|
@@ -1530,7 +1536,7 @@ class mi extends M {
|
|
|
1530
1536
|
class pi extends M {
|
|
1531
1537
|
rawStart(e) {
|
|
1532
1538
|
let t = new Date(this.tzAdjustedDate(e).getFullYear(), 0, 1);
|
|
1533
|
-
return e && (t =
|
|
1539
|
+
return e && (t = C(t, e)), t;
|
|
1534
1540
|
}
|
|
1535
1541
|
maximumTimeframeLength() {
|
|
1536
1542
|
return 3600 * 24 * 366;
|
|
@@ -1539,44 +1545,44 @@ class pi extends M {
|
|
|
1539
1545
|
class fi extends M {
|
|
1540
1546
|
rawEnd(e) {
|
|
1541
1547
|
let t = je(this.tzAdjustedDate(e), { weekStartsOn: 1 });
|
|
1542
|
-
return e && (t =
|
|
1548
|
+
return e && (t = C(t, e)), t;
|
|
1543
1549
|
}
|
|
1544
1550
|
rawStart(e) {
|
|
1545
1551
|
const t = this.tzAdjustedDate(e);
|
|
1546
1552
|
let i = je(t.setDate(t.getDate() - 7), {
|
|
1547
1553
|
weekStartsOn: 1
|
|
1548
1554
|
});
|
|
1549
|
-
return e && (i =
|
|
1555
|
+
return e && (i = C(i, e)), i;
|
|
1550
1556
|
}
|
|
1551
1557
|
}
|
|
1552
|
-
class
|
|
1558
|
+
class _i extends M {
|
|
1553
1559
|
rawEnd(e) {
|
|
1554
1560
|
let t = me(this.tzAdjustedDate(e));
|
|
1555
|
-
return e && (t =
|
|
1561
|
+
return e && (t = C(t, e)), t;
|
|
1556
1562
|
}
|
|
1557
1563
|
rawStart(e) {
|
|
1558
1564
|
let t = me(Un(this.tzAdjustedDate(e)));
|
|
1559
|
-
return e && (t =
|
|
1565
|
+
return e && (t = C(t, e)), t;
|
|
1560
1566
|
}
|
|
1561
1567
|
}
|
|
1562
|
-
class
|
|
1568
|
+
class yi extends M {
|
|
1563
1569
|
rawEnd(e) {
|
|
1564
1570
|
let t = pe(this.tzAdjustedDate(e));
|
|
1565
|
-
return e && (t =
|
|
1571
|
+
return e && (t = C(t, e)), t;
|
|
1566
1572
|
}
|
|
1567
1573
|
rawStart(e) {
|
|
1568
1574
|
let t = pe(On(this.tzAdjustedDate(e)));
|
|
1569
|
-
return e && (t =
|
|
1575
|
+
return e && (t = C(t, e)), t;
|
|
1570
1576
|
}
|
|
1571
1577
|
}
|
|
1572
1578
|
class hi extends M {
|
|
1573
1579
|
rawEnd(e) {
|
|
1574
1580
|
let t = new Date(this.tzAdjustedDate(e).getFullYear(), 0, 1);
|
|
1575
|
-
return e && (t =
|
|
1581
|
+
return e && (t = C(t, e)), t;
|
|
1576
1582
|
}
|
|
1577
1583
|
rawStart(e) {
|
|
1578
1584
|
let t = new Date(this.tzAdjustedDate(e).getFullYear() - 1, 0, 1);
|
|
1579
|
-
return e && (t =
|
|
1585
|
+
return e && (t = C(t, e)), t;
|
|
1580
1586
|
}
|
|
1581
1587
|
}
|
|
1582
1588
|
c.FIFTEEN_MIN, new M({
|
|
@@ -1750,7 +1756,7 @@ c.FIFTEEN_MIN, new M({
|
|
|
1750
1756
|
fineGrainedDefaultGranularity: "twoHourly",
|
|
1751
1757
|
allowedTiers: ["plus", "enterprise"],
|
|
1752
1758
|
allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
|
|
1753
|
-
}), c.PREVIOUS_MONTH, new
|
|
1759
|
+
}), c.PREVIOUS_MONTH, new yi({
|
|
1754
1760
|
key: c.PREVIOUS_MONTH,
|
|
1755
1761
|
display: "Previous month",
|
|
1756
1762
|
timeframeText: "Month",
|
|
@@ -1763,7 +1769,7 @@ c.FIFTEEN_MIN, new M({
|
|
|
1763
1769
|
dataGranularity: "daily",
|
|
1764
1770
|
isRelative: !1,
|
|
1765
1771
|
allowedTiers: ["plus", "enterprise"]
|
|
1766
|
-
}), c.PREVIOUS_QUARTER, new
|
|
1772
|
+
}), c.PREVIOUS_QUARTER, new _i({
|
|
1767
1773
|
key: c.PREVIOUS_QUARTER,
|
|
1768
1774
|
display: "Previous quarter",
|
|
1769
1775
|
timeframeText: "Quarter",
|
|
@@ -1825,7 +1831,7 @@ function Ti({
|
|
|
1825
1831
|
const e = (r, o) => {
|
|
1826
1832
|
if (isNaN(r))
|
|
1827
1833
|
return "0 B";
|
|
1828
|
-
const u = o ? Math.pow(2, 50) : 1e15, d = o ? Math.pow(2, 40) : 1e12, p = o ? Math.pow(2, 30) : 1e9,
|
|
1834
|
+
const u = o ? Math.pow(2, 50) : 1e15, d = o ? Math.pow(2, 40) : 1e12, p = o ? Math.pow(2, 30) : 1e9, y = o ? Math.pow(2, 20) : 1e6, g = o ? Math.pow(2, 10) : 1e3;
|
|
1829
1835
|
let w;
|
|
1830
1836
|
return r >= u ? w = n.formatNumber(
|
|
1831
1837
|
Number.parseFloat((r / u).toPrecision(3)),
|
|
@@ -1836,8 +1842,8 @@ function Ti({
|
|
|
1836
1842
|
) : r >= p ? w = n.formatNumber(
|
|
1837
1843
|
Number.parseFloat((r / p).toPrecision(3)),
|
|
1838
1844
|
{ style: "unit", unit: "gigabyte", unitDisplay: "narrow" }
|
|
1839
|
-
) : r >=
|
|
1840
|
-
Number.parseFloat((r /
|
|
1845
|
+
) : r >= y ? w = n.formatNumber(
|
|
1846
|
+
Number.parseFloat((r / y).toPrecision(3)),
|
|
1841
1847
|
{ style: "unit", unit: "megabyte", unitDisplay: "narrow" }
|
|
1842
1848
|
) : r >= g ? w = n.formatNumber(
|
|
1843
1849
|
Number.parseFloat((r / g).toPrecision(3)),
|
|
@@ -1856,9 +1862,9 @@ function Ti({
|
|
|
1856
1862
|
isBytes1024: u = !1,
|
|
1857
1863
|
currency: d = "USD",
|
|
1858
1864
|
approximate: p = !1,
|
|
1859
|
-
translateUnit:
|
|
1865
|
+
translateUnit: y = (g) => g
|
|
1860
1866
|
} = {}) => {
|
|
1861
|
-
const g =
|
|
1867
|
+
const g = y(o, r);
|
|
1862
1868
|
switch (o) {
|
|
1863
1869
|
case "bytes":
|
|
1864
1870
|
return e(r, u);
|
|
@@ -1870,7 +1876,7 @@ function Ti({
|
|
|
1870
1876
|
}, formatBytes: e, formatCost: t, formatRange: (r, o, u, {
|
|
1871
1877
|
isBytes1024: d = !1,
|
|
1872
1878
|
currency: p = "USD",
|
|
1873
|
-
approximate:
|
|
1879
|
+
approximate: y = !1,
|
|
1874
1880
|
translateUnit: g = (w) => w
|
|
1875
1881
|
} = {}) => {
|
|
1876
1882
|
const w = g(u, o);
|
|
@@ -1882,14 +1888,14 @@ function Ti({
|
|
|
1882
1888
|
default:
|
|
1883
1889
|
if (isNaN(r) || isNaN(o))
|
|
1884
1890
|
return `${r} - ${o}`;
|
|
1885
|
-
if (
|
|
1891
|
+
if (y)
|
|
1886
1892
|
return i(`${Ye(r, { capital: !0 })} - ${Ye(o, { capital: !0 })}`, u, w);
|
|
1887
1893
|
}
|
|
1888
1894
|
const f = r >= 0.01 ? `${ft.format(Number.parseFloat(r.toFixed(2)))}` : `${Number.parseFloat(r.toPrecision(4))}`, O = o >= 0.01 ? `${ft.format(Number.parseFloat(o.toFixed(2)))}` : `${Number.parseFloat(o.toPrecision(4))}`;
|
|
1889
1895
|
return i(`${f} - ${O}`, u, w);
|
|
1890
1896
|
} };
|
|
1891
1897
|
}
|
|
1892
|
-
let $e,
|
|
1898
|
+
let $e, _e, G, Ke, Ze;
|
|
1893
1899
|
const Fi = [
|
|
1894
1900
|
"Point",
|
|
1895
1901
|
"MultiPoint",
|
|
@@ -1900,7 +1906,7 @@ const Fi = [
|
|
|
1900
1906
|
"GeometryCollection"
|
|
1901
1907
|
];
|
|
1902
1908
|
function Si(n) {
|
|
1903
|
-
Ke = 2, Ze = 10 ** 6, G = null, $e = [],
|
|
1909
|
+
Ke = 2, Ze = 10 ** 6, G = null, $e = [], _e = [];
|
|
1904
1910
|
const e = n.readFields(Mi, {});
|
|
1905
1911
|
return $e = null, e;
|
|
1906
1912
|
}
|
|
@@ -1919,13 +1925,13 @@ function Nt(n, e) {
|
|
|
1919
1925
|
return e.type = "Point", n.readMessage(Ri, e);
|
|
1920
1926
|
}
|
|
1921
1927
|
function Di(n, e, t) {
|
|
1922
|
-
n === 1 ? e.features.push(Vn(t, {})) : n === 13 ?
|
|
1928
|
+
n === 1 ? e.features.push(Vn(t, {})) : n === 13 ? _e.push(bt(t)) : n === 15 && qe(t, e);
|
|
1923
1929
|
}
|
|
1924
1930
|
function Ei(n, e, t) {
|
|
1925
|
-
n === 1 ? e.geometry = Nt(t, {}) : n === 11 ? e.id = t.readString() : n === 12 ? e.id = t.readSVarint() : n === 13 ?
|
|
1931
|
+
n === 1 ? e.geometry = Nt(t, {}) : n === 11 ? e.id = t.readString() : n === 12 ? e.id = t.readSVarint() : n === 13 ? _e.push(bt(t)) : n === 14 ? e.properties = qe(t, {}) : n === 15 && qe(t, e);
|
|
1926
1932
|
}
|
|
1927
1933
|
function Ri(n, e, t) {
|
|
1928
|
-
n === 1 ? e.type = Fi[t.readVarint()] : n === 2 ? G = t.readPackedVarint() : n === 3 ? Ni(e, t, e.type) : n === 4 ? (e.geometries = e.geometries || [], e.geometries.push(Nt(t, {}))) : n === 13 ?
|
|
1934
|
+
n === 1 ? e.type = Fi[t.readVarint()] : n === 2 ? G = t.readPackedVarint() : n === 3 ? Ni(e, t, e.type) : n === 4 ? (e.geometries = e.geometries || [], e.geometries.push(Nt(t, {}))) : n === 13 ? _e.push(bt(t)) : n === 15 && qe(t, e);
|
|
1929
1935
|
}
|
|
1930
1936
|
function Ni(n, e, t) {
|
|
1931
1937
|
t === "Point" ? n.coordinates = Li(e) : t === "MultiPoint" || t === "LineString" ? n.coordinates = Mn(e) : t === "MultiLineString" ? n.coordinates = kn(e) : t === "Polygon" ? n.coordinates = kn(e, !0) : t === "MultiPolygon" && (n.coordinates = Pi(e));
|
|
@@ -1943,10 +1949,10 @@ const bi = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
|
1943
1949
|
function qe(n, e) {
|
|
1944
1950
|
const t = n.readVarint() + n.pos;
|
|
1945
1951
|
for (; n.pos < t; ) {
|
|
1946
|
-
const i = $e[n.readVarint()], r =
|
|
1952
|
+
const i = $e[n.readVarint()], r = _e[n.readVarint()];
|
|
1947
1953
|
bi.has(i) || (e[i] = r);
|
|
1948
1954
|
}
|
|
1949
|
-
return
|
|
1955
|
+
return _e = [], e;
|
|
1950
1956
|
}
|
|
1951
1957
|
function Li(n) {
|
|
1952
1958
|
const e = n.readVarint() + n.pos, t = [];
|
|
@@ -1986,8 +1992,8 @@ function Pi(n) {
|
|
|
1986
1992
|
}
|
|
1987
1993
|
return G = null, t;
|
|
1988
1994
|
}
|
|
1989
|
-
const xt = 65536 * 65536, Dn = 1 / xt,
|
|
1990
|
-
class
|
|
1995
|
+
const xt = 65536 * 65536, Dn = 1 / xt, Ii = 12, En = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8"), _t = 0, Ve = 1, Fe = 2, ze = 5;
|
|
1996
|
+
class Ci {
|
|
1991
1997
|
/**
|
|
1992
1998
|
* @param {Uint8Array | ArrayBuffer} [buf]
|
|
1993
1999
|
*/
|
|
@@ -2061,7 +2067,7 @@ class Ii {
|
|
|
2061
2067
|
}
|
|
2062
2068
|
readString() {
|
|
2063
2069
|
const e = this.readVarint() + this.pos, t = this.pos;
|
|
2064
|
-
return this.pos = e, e - t >=
|
|
2070
|
+
return this.pos = e, e - t >= Ii && En ? En.decode(this.buf.subarray(t, e)) : Wi(this.buf, t, e);
|
|
2065
2071
|
}
|
|
2066
2072
|
readBytes() {
|
|
2067
2073
|
const e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
|
|
@@ -2131,7 +2137,7 @@ class Ii {
|
|
|
2131
2137
|
/** @param {number} val */
|
|
2132
2138
|
skip(e) {
|
|
2133
2139
|
const t = e & 7;
|
|
2134
|
-
if (t ===
|
|
2140
|
+
if (t === _t) for (; this.buf[this.pos++] > 127; )
|
|
2135
2141
|
;
|
|
2136
2142
|
else if (t === Fe) this.pos = this.readVarint() + this.pos;
|
|
2137
2143
|
else if (t === ze) this.pos += 4;
|
|
@@ -2336,14 +2342,14 @@ class Ii {
|
|
|
2336
2342
|
* @param {number} val
|
|
2337
2343
|
*/
|
|
2338
2344
|
writeVarintField(e, t) {
|
|
2339
|
-
this.writeTag(e,
|
|
2345
|
+
this.writeTag(e, _t), this.writeVarint(t);
|
|
2340
2346
|
}
|
|
2341
2347
|
/**
|
|
2342
2348
|
* @param {number} tag
|
|
2343
2349
|
* @param {number} val
|
|
2344
2350
|
*/
|
|
2345
2351
|
writeSVarintField(e, t) {
|
|
2346
|
-
this.writeTag(e,
|
|
2352
|
+
this.writeTag(e, _t), this.writeSVarint(t);
|
|
2347
2353
|
}
|
|
2348
2354
|
/**
|
|
2349
2355
|
* @param {number} tag
|
|
@@ -2434,8 +2440,8 @@ function Wi(n, e, t) {
|
|
|
2434
2440
|
const o = n[r];
|
|
2435
2441
|
let u = null, d = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
2436
2442
|
if (r + d > t) break;
|
|
2437
|
-
let p,
|
|
2438
|
-
d === 1 ? o < 128 && (u = o) : d === 2 ? (p = n[r + 1], (p & 192) === 128 && (u = (o & 31) << 6 | p & 63, u <= 127 && (u = null))) : d === 3 ? (p = n[r + 1],
|
|
2443
|
+
let p, y, g;
|
|
2444
|
+
d === 1 ? o < 128 && (u = o) : d === 2 ? (p = n[r + 1], (p & 192) === 128 && (u = (o & 31) << 6 | p & 63, u <= 127 && (u = null))) : d === 3 ? (p = n[r + 1], y = n[r + 2], (p & 192) === 128 && (y & 192) === 128 && (u = (o & 15) << 12 | (p & 63) << 6 | y & 63, (u <= 2047 || u >= 55296 && u <= 57343) && (u = null))) : d === 4 && (p = n[r + 1], y = n[r + 2], g = n[r + 3], (p & 192) === 128 && (y & 192) === 128 && (g & 192) === 128 && (u = (o & 15) << 18 | (p & 63) << 12 | (y & 63) << 6 | g & 63, (u <= 65535 || u >= 1114112) && (u = null))), u === null ? (u = 65533, d = 1) : u > 65535 && (u -= 65536, i += String.fromCharCode(u >>> 10 & 1023 | 55296), u = 56320 | u & 1023), i += String.fromCharCode(u), r += d;
|
|
2439
2445
|
}
|
|
2440
2446
|
return i;
|
|
2441
2447
|
}
|
|
@@ -2472,7 +2478,7 @@ function io() {
|
|
|
2472
2478
|
// Translation component <i18n-t>
|
|
2473
2479
|
};
|
|
2474
2480
|
}
|
|
2475
|
-
const Ln = 5,
|
|
2481
|
+
const Ln = 5, yt = [
|
|
2476
2482
|
"#00819d",
|
|
2477
2483
|
"#00abd2",
|
|
2478
2484
|
"#00c8f4",
|
|
@@ -2501,13 +2507,13 @@ function so({
|
|
|
2501
2507
|
for (const F of Object.keys(T))
|
|
2502
2508
|
Et.find((S) => S.code === F) || delete T[F];
|
|
2503
2509
|
return T;
|
|
2504
|
-
}), d = N(() => Object.values(u.value)), p = N(() => Object.keys(u.value).length),
|
|
2510
|
+
}), d = N(() => Object.values(u.value)), p = N(() => Object.keys(u.value).length), y = N(() => p.value < Ln - 1 ? p.value : Ln), g = N(() => !e.value?.includes("latency")), w = N(() => {
|
|
2505
2511
|
const T = [];
|
|
2506
2512
|
if (d.value.length > 10) {
|
|
2507
2513
|
const F = [...d.value].sort((A, H) => A - H), S = oo(F, 0.75), P = d.value.filter((A) => A >= S), U = d.value.filter((A) => A < S), b = ht(P, 3), X = ht(U, 2);
|
|
2508
2514
|
return T.push(...b, ...X), T;
|
|
2509
2515
|
}
|
|
2510
|
-
return ht(d.value,
|
|
2516
|
+
return ht(d.value, y.value);
|
|
2511
2517
|
}), f = N(() => d.value.length === 1 ? [{
|
|
2512
2518
|
color: O(d.value[0]),
|
|
2513
2519
|
range: r(d.value[0], {
|
|
@@ -2534,7 +2540,7 @@ function so({
|
|
|
2534
2540
|
if (T === 0)
|
|
2535
2541
|
return i.value;
|
|
2536
2542
|
const F = w.value.findIndex((S) => T >= S);
|
|
2537
|
-
return F === -1 ?
|
|
2543
|
+
return F === -1 ? yt[yt.length - 1] : yt[F] ?? i.value;
|
|
2538
2544
|
};
|
|
2539
2545
|
return {
|
|
2540
2546
|
getColor: O,
|
|
@@ -2552,13 +2558,13 @@ function lo({
|
|
|
2552
2558
|
approximate: p = !1
|
|
2553
2559
|
} = {}) => t(u, n.value, {
|
|
2554
2560
|
approximate: p,
|
|
2555
|
-
translateUnit: (
|
|
2561
|
+
translateUnit: (y) => d ? e.t(`metricUnits.${y}`, { plural: u > 1 ? "s" : "" }) : ""
|
|
2556
2562
|
}),
|
|
2557
2563
|
formatMetricRange: (u, d, {
|
|
2558
2564
|
showUnit: p = !0,
|
|
2559
|
-
approximate:
|
|
2565
|
+
approximate: y = !1
|
|
2560
2566
|
} = {}) => i(u, d, n.value, {
|
|
2561
|
-
approximate:
|
|
2567
|
+
approximate: y,
|
|
2562
2568
|
translateUnit: (g) => p ? e.t(`metricUnits.${g}`, { plural: d > 1 ? "s" : "" }) : ""
|
|
2563
2569
|
})
|
|
2564
2570
|
};
|
|
@@ -2567,7 +2573,7 @@ const Me = {
|
|
|
2567
2573
|
useI18n: io,
|
|
2568
2574
|
useLegendScale: so,
|
|
2569
2575
|
useMetricFormat: lo
|
|
2570
|
-
},
|
|
2576
|
+
}, Io = (n) => {
|
|
2571
2577
|
if (!n || !n.data)
|
|
2572
2578
|
return {};
|
|
2573
2579
|
const e = {}, t = n.data;
|
|
@@ -2626,7 +2632,7 @@ const gt = (n) => {
|
|
|
2626
2632
|
for (const [i, r] of e)
|
|
2627
2633
|
t[i] = r;
|
|
2628
2634
|
return t;
|
|
2629
|
-
},
|
|
2635
|
+
}, _o = /* @__PURE__ */ Lt(fo, [["__scopeId", "data-v-2858aa0d"]]), yo = { class: "map-tooltip" }, ho = { class: "map-tooltip-text" }, go = { key: 0 }, wo = /* @__PURE__ */ Tt({
|
|
2630
2636
|
__name: "MapTooltip",
|
|
2631
2637
|
props: {
|
|
2632
2638
|
data: {},
|
|
@@ -2639,7 +2645,7 @@ const gt = (n) => {
|
|
|
2639
2645
|
v75a0a274: e.left,
|
|
2640
2646
|
v144f4294: e.top,
|
|
2641
2647
|
v6e49e79e: e.data.color
|
|
2642
|
-
})), (e, t) => (z(), Z("div",
|
|
2648
|
+
})), (e, t) => (z(), Z("div", yo, [
|
|
2643
2649
|
t[0] || (t[0] = K("div", { class: "map-tooltip-color" }, null, -1)),
|
|
2644
2650
|
K("div", ho, [
|
|
2645
2651
|
K("div", null, fe(n.data.label), 1),
|
|
@@ -2668,12 +2674,12 @@ const gt = (n) => {
|
|
|
2668
2674
|
},
|
|
2669
2675
|
emits: ["boundsChange"],
|
|
2670
2676
|
setup(n, { emit: e }) {
|
|
2671
|
-
const t = import("./countries-simple-geo-BFUDnSiE.js").then((
|
|
2677
|
+
const t = import("./countries-simple-geo-BFUDnSiE.js").then((_) => _.default), i = e, { i18n: r } = Me.useI18n(), o = ur("app:konnectColorMode", N(() => "light")), { getColor: u, legendData: d } = Me.useLegendScale({
|
|
2672
2678
|
countryMetrics: xe(() => n.countryMetrics),
|
|
2673
2679
|
metric: xe(() => n.metric),
|
|
2674
2680
|
unit: xe(() => n.metricUnit),
|
|
2675
2681
|
emptyCountryFill: xe(() => S.value.emptyCountryFill)
|
|
2676
|
-
}), { formatMetric: p } = Me.useMetricFormat({ unit: xe(() => n.metricUnit) }),
|
|
2682
|
+
}), { formatMetric: p } = Me.useMetricFormat({ unit: xe(() => n.metricUnit) }), y = ae(), g = cr(), w = ae(), f = ae(), O = ae(null), T = ae({ left: "0px", top: "0px" }), F = ae(!1), S = ae(gt()), P = N(() => Object.keys(n.countryMetrics).length === 0 && !n.fitToCountry), U = N(() => ({
|
|
2677
2683
|
"fill-color": [
|
|
2678
2684
|
"match",
|
|
2679
2685
|
[
|
|
@@ -2686,8 +2692,8 @@ const gt = (n) => {
|
|
|
2686
2692
|
],
|
|
2687
2693
|
["get", "ISO_A2"]
|
|
2688
2694
|
],
|
|
2689
|
-
...Object.keys(n.countryMetrics).length ? Object.entries(n.countryMetrics).flatMap(([
|
|
2690
|
-
|
|
2695
|
+
...Object.keys(n.countryMetrics).length ? Object.entries(n.countryMetrics).flatMap(([_, v]) => [
|
|
2696
|
+
_,
|
|
2691
2697
|
u(v)
|
|
2692
2698
|
]) : [S.value.emptyCountryFill, S.value.emptyCountryFill],
|
|
2693
2699
|
S.value.emptyCountryFill
|
|
@@ -2696,47 +2702,47 @@ const gt = (n) => {
|
|
|
2696
2702
|
"fill-opacity": 0.7
|
|
2697
2703
|
})), b = N(() => ({
|
|
2698
2704
|
"fill-color": S.value.waterFill
|
|
2699
|
-
})), X = N(() => n.withLegend && Object.keys(n.countryMetrics).length > 0), A = N(() => n.metric && r.t(`metrics.${n.metric}`) || ""), H = (
|
|
2700
|
-
const v =
|
|
2705
|
+
})), X = N(() => n.withLegend && Object.keys(n.countryMetrics).length > 0), A = N(() => n.metric && r.t(`metrics.${n.metric}`) || ""), H = (_) => {
|
|
2706
|
+
const v = _.flat(1);
|
|
2701
2707
|
return Array.isArray(v[0]) && Array.isArray(v[0][0]) ? H(v) : v;
|
|
2702
|
-
},
|
|
2703
|
-
if (
|
|
2708
|
+
}, ye = (_) => {
|
|
2709
|
+
if (_ === "RU") {
|
|
2704
2710
|
f.value?.fitBounds([
|
|
2705
2711
|
[20, 40],
|
|
2706
2712
|
[180, 80]
|
|
2707
2713
|
]);
|
|
2708
2714
|
return;
|
|
2709
|
-
} else if (
|
|
2715
|
+
} else if (_ === "US") {
|
|
2710
2716
|
f.value?.fitBounds([
|
|
2711
2717
|
[-130, 20],
|
|
2712
2718
|
[-60, 50]
|
|
2713
2719
|
]);
|
|
2714
2720
|
return;
|
|
2715
|
-
} else if (
|
|
2721
|
+
} else if (_ === "FR") {
|
|
2716
2722
|
f.value?.fitBounds([
|
|
2717
2723
|
[-5, 42],
|
|
2718
2724
|
[9, 51]
|
|
2719
2725
|
]);
|
|
2720
2726
|
return;
|
|
2721
|
-
} else if (
|
|
2727
|
+
} else if (_ === "NO") {
|
|
2722
2728
|
f.value?.fitBounds([
|
|
2723
2729
|
[4, 57],
|
|
2724
2730
|
[32, 71]
|
|
2725
2731
|
]);
|
|
2726
2732
|
return;
|
|
2727
2733
|
}
|
|
2728
|
-
const v = O.value?.features.find((x) => x.properties?.ISO_A2 ? x.properties?.ISO_A2 ===
|
|
2734
|
+
const v = O.value?.features.find((x) => x.properties?.ISO_A2 ? x.properties?.ISO_A2 === _ : x.properties?.iso_a2 === "-99" ? x.properties?.iso_a2_eh === _ : x.properties?.iso_a2 === _);
|
|
2729
2735
|
if (v) {
|
|
2730
2736
|
const x = v.geometry?.coordinates;
|
|
2731
2737
|
if (!x) return;
|
|
2732
|
-
const
|
|
2738
|
+
const I = H(x), B = I.map((J) => J[1]), Y = I.map((J) => J[0]), q = Math.min(...B), he = Math.max(...B), h = Math.min(...Y), ge = Math.max(...Y);
|
|
2733
2739
|
f.value?.fitBounds([
|
|
2734
2740
|
[h, q],
|
|
2735
2741
|
[ge, he]
|
|
2736
2742
|
]);
|
|
2737
2743
|
}
|
|
2738
2744
|
}, V = N(() => {
|
|
2739
|
-
const
|
|
2745
|
+
const _ = {
|
|
2740
2746
|
container: g,
|
|
2741
2747
|
style: { version: 8, sources: {}, layers: [] },
|
|
2742
2748
|
attributionControl: !1,
|
|
@@ -2753,10 +2759,10 @@ const gt = (n) => {
|
|
|
2753
2759
|
"CooperativeGesturesHandler.MobileHelpText": r.t("cooperative_gestures.mobile_zoom_help_text")
|
|
2754
2760
|
}
|
|
2755
2761
|
};
|
|
2756
|
-
return n.bounds && (
|
|
2762
|
+
return n.bounds && (_.bounds = n.bounds), _;
|
|
2757
2763
|
}), Ee = uo(() => {
|
|
2758
2764
|
if (!f.value) return;
|
|
2759
|
-
const
|
|
2765
|
+
const _ = f.value.getBounds(), v = _.getSouthWest(), x = _.getNorthEast();
|
|
2760
2766
|
i("boundsChange", [
|
|
2761
2767
|
[v.lng, v.lat],
|
|
2762
2768
|
[x.lng, x.lat]
|
|
@@ -2770,11 +2776,11 @@ const gt = (n) => {
|
|
|
2770
2776
|
}), mr(async () => {
|
|
2771
2777
|
S.value = gt(w.value);
|
|
2772
2778
|
try {
|
|
2773
|
-
const
|
|
2774
|
-
O.value =
|
|
2779
|
+
const _ = await t, v = await fetch(_), x = new Uint8Array(await v.arrayBuffer()), I = Si(new Ci(x));
|
|
2780
|
+
O.value = I, f.value = new _r(V.value), f.value.on("load", () => {
|
|
2775
2781
|
f.value?.addSource("countries", {
|
|
2776
2782
|
type: "geojson",
|
|
2777
|
-
data:
|
|
2783
|
+
data: I
|
|
2778
2784
|
}), f.value?.addLayer({
|
|
2779
2785
|
id: "countries-layer",
|
|
2780
2786
|
type: "fill",
|
|
@@ -2792,7 +2798,7 @@ const gt = (n) => {
|
|
|
2792
2798
|
const Y = B.features?.[0];
|
|
2793
2799
|
if (Y) {
|
|
2794
2800
|
const { iso_a2: q, iso_a2_eh: he, ISO_A2: h, admin: ge } = Y.properties, J = h ?? q === "-99" ? he : q, L = n.countryMetrics[J];
|
|
2795
|
-
L !== void 0 && (
|
|
2801
|
+
L !== void 0 && (y.value = {
|
|
2796
2802
|
label: ge,
|
|
2797
2803
|
color: u(L),
|
|
2798
2804
|
value: p(L)
|
|
@@ -2803,39 +2809,39 @@ const gt = (n) => {
|
|
|
2803
2809
|
}
|
|
2804
2810
|
}), f.value?.on("mouseleave", "countries-layer", () => {
|
|
2805
2811
|
F.value = !1;
|
|
2806
|
-
}), f.value?.on("move", Ee), n.fitToCountry &&
|
|
2812
|
+
}), f.value?.on("move", Ee), n.fitToCountry && ye(n.fitToCountry);
|
|
2807
2813
|
}), f.value?.dragRotate.disable(), f.value?.keyboard.disable(), f.value?.touchZoomRotate.disableRotation();
|
|
2808
|
-
} catch (
|
|
2809
|
-
console.error(
|
|
2814
|
+
} catch (_) {
|
|
2815
|
+
console.error(_);
|
|
2810
2816
|
}
|
|
2811
2817
|
}), Oe(o, () => {
|
|
2812
2818
|
S.value = gt(w.value);
|
|
2813
2819
|
}), Oe([U, b], () => {
|
|
2814
2820
|
f.value?.isStyleLoaded() && (f.value.getLayer("countries-layer") && f.value.setPaintProperty("countries-layer", "fill-color", U.value["fill-color"]), f.value.getLayer("lakes-layer") && f.value.setPaintProperty("lakes-layer", "fill-color", b.value["fill-color"]));
|
|
2815
|
-
}), Oe(() => n.fitToCountry, (
|
|
2816
|
-
f.value &&
|
|
2821
|
+
}), Oe(() => n.fitToCountry, (_) => {
|
|
2822
|
+
f.value && _ ? ye(_) : !V.value.center && !V.value.zoom ? f.value?.fitBounds([
|
|
2817
2823
|
[-180, -90],
|
|
2818
2824
|
[180, 90]
|
|
2819
2825
|
]) : (V.value.zoom && f.value?.setZoom(V.value.zoom), V.value.center && f.value?.flyTo({ center: V.value.center }));
|
|
2820
|
-
}), Oe(() => n.bounds, (
|
|
2821
|
-
if (!
|
|
2822
|
-
const x =
|
|
2823
|
-
!(x &&
|
|
2824
|
-
}), (
|
|
2826
|
+
}), Oe(() => n.bounds, (_, v) => {
|
|
2827
|
+
if (!_) return;
|
|
2828
|
+
const x = _?.flat(), I = v?.flat();
|
|
2829
|
+
!(x && I && x.length === I.length && x.every((Y, q) => Math.round(Y * 100) / 100 === Math.round(I[q] * 100) / 100)) && f.value && f.value.fitBounds(_);
|
|
2830
|
+
}), (_, v) => (z(), Z("div", So, [
|
|
2825
2831
|
P.value ? (z(), Z("div", Mo, [
|
|
2826
|
-
ut(
|
|
2827
|
-
pr(re(
|
|
2832
|
+
ut(_.$slots, "no-location-icon", {}, () => [
|
|
2833
|
+
pr(re(yr), {
|
|
2828
2834
|
color: `var(--kui-icon-color-neutral, ${re(Qi)})`,
|
|
2829
2835
|
size: `var(--kui-icon-size-60, ${re(Xi)})`
|
|
2830
2836
|
}, null, 8, ["color", "size"])
|
|
2831
2837
|
], !0),
|
|
2832
2838
|
K("div", ko, [
|
|
2833
|
-
ut(
|
|
2839
|
+
ut(_.$slots, "no-location-title", {}, () => [
|
|
2834
2840
|
fr(fe(re(r).t("no_location_data")), 1)
|
|
2835
2841
|
], !0)
|
|
2836
2842
|
]),
|
|
2837
2843
|
K("div", Do, [
|
|
2838
|
-
ut(
|
|
2844
|
+
ut(_.$slots, "no-location-description", {}, () => [
|
|
2839
2845
|
K("p", null, fe(re(r).t("no_location_data_description")), 1)
|
|
2840
2846
|
], !0)
|
|
2841
2847
|
])
|
|
@@ -2846,25 +2852,25 @@ const gt = (n) => {
|
|
|
2846
2852
|
ref: w,
|
|
2847
2853
|
class: "analytics-geo-map-container"
|
|
2848
2854
|
}, null, 8, Eo),
|
|
2849
|
-
X.value ? (z(), rn(
|
|
2855
|
+
X.value ? (z(), rn(_o, {
|
|
2850
2856
|
key: 1,
|
|
2851
2857
|
class: "legend-container",
|
|
2852
2858
|
data: re(d),
|
|
2853
2859
|
metric: n.metric,
|
|
2854
2860
|
title: A.value
|
|
2855
2861
|
}, null, 8, ["data", "metric", "title"])) : Se("", !0),
|
|
2856
|
-
F.value &&
|
|
2862
|
+
F.value && y.value ? (z(), rn(vo, {
|
|
2857
2863
|
key: 2,
|
|
2858
|
-
data:
|
|
2864
|
+
data: y.value,
|
|
2859
2865
|
left: T.value.left,
|
|
2860
2866
|
"show-value": n.showTooltipValue,
|
|
2861
2867
|
top: T.value.top
|
|
2862
2868
|
}, null, 8, ["data", "left", "show-value", "top"])) : Se("", !0)
|
|
2863
2869
|
]));
|
|
2864
2870
|
}
|
|
2865
|
-
}),
|
|
2871
|
+
}), Co = /* @__PURE__ */ Lt(Ro, [["__scopeId", "data-v-7dea982a"]]);
|
|
2866
2872
|
export {
|
|
2867
|
-
|
|
2873
|
+
Co as AnalyticsGeoMap,
|
|
2868
2874
|
uo as debounce,
|
|
2869
|
-
|
|
2875
|
+
Io as exploreResultToCountryMetrics
|
|
2870
2876
|
};
|