@kong-ui-public/analytics-geo-map 1.1.1 → 1.1.2-pr.2427.fe069a6cf.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/style.css +1 -1
- package/dist/types/components/AnalyticsGeoMap.vue.d.ts +5 -1
- package/dist/types/components/AnalyticsGeoMap.vue.d.ts.map +1 -1
- package/dist/types/utils/debounce.d.ts +2 -0
- package/dist/types/utils/debounce.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/vitals-geo-map.es.js +316 -300
- package/dist/vitals-geo-map.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as L0, useId as P0, ref as s0, computed as C, onMounted as B0, watch as l0, createElementBlock as A, openBlock as $, createElementVNode as b, createCommentVNode as u0, unref as V0, toDisplayString as c0, Fragment as S0, renderList as z0, normalizeStyle as T0 } from "vue";
|
|
2
|
+
import { Map as D0, Popup as C0 } from "maplibre-gl";
|
|
3
|
+
import { createI18n as N0, i18nTComponent as R0 } from "@kong-ui-public/i18n";
|
|
4
|
+
const O0 = {
|
|
5
5
|
ms: "ms",
|
|
6
6
|
bytes: "Byte{plural}",
|
|
7
7
|
count: "request{plural}",
|
|
8
8
|
"count/minute": "rpm",
|
|
9
9
|
requests: "request{plural}"
|
|
10
|
-
},
|
|
10
|
+
}, I0 = {
|
|
11
11
|
request_count: "Request count",
|
|
12
12
|
request_per_minute: "Requests per minute",
|
|
13
13
|
response_latency_average: "Response latency (avg)",
|
|
@@ -32,53 +32,53 @@ const D0 = {
|
|
|
32
32
|
request_size_p95: "Request size (p95)",
|
|
33
33
|
request_size_p50: "Request size (p50)",
|
|
34
34
|
request_size_sum: "Request size (sum)"
|
|
35
|
-
},
|
|
36
|
-
metricUnits:
|
|
37
|
-
metrics:
|
|
35
|
+
}, U0 = {
|
|
36
|
+
metricUnits: O0,
|
|
37
|
+
metrics: I0
|
|
38
38
|
};
|
|
39
|
-
function
|
|
40
|
-
const e =
|
|
39
|
+
function E0() {
|
|
40
|
+
const e = N0("en-us", U0);
|
|
41
41
|
return {
|
|
42
42
|
i18n: e,
|
|
43
|
-
i18nT:
|
|
43
|
+
i18nT: R0(e)
|
|
44
44
|
// Translation component <i18n-t>
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
useI18n:
|
|
47
|
+
const A0 = {
|
|
48
|
+
useI18n: E0
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function y0(e) {
|
|
51
51
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
52
52
|
}
|
|
53
|
-
var
|
|
53
|
+
var x0 = { exports: {} };
|
|
54
54
|
(function(e) {
|
|
55
55
|
(function() {
|
|
56
|
-
function t(
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
59
|
-
var u = typeof
|
|
60
|
-
return y.reverse().forEach(function(
|
|
61
|
-
|
|
56
|
+
function t(l, s) {
|
|
57
|
+
if (s.separator === !1 || l < 1e3)
|
|
58
|
+
return l.toString();
|
|
59
|
+
var u = typeof s.separator == "string" ? s.separator : ",", m = [], y = Math.round(l).toString().split("");
|
|
60
|
+
return y.reverse().forEach(function(B, V) {
|
|
61
|
+
V && V % 3 === 0 && m.push(u), m.push(B);
|
|
62
62
|
}), m.reverse().join("");
|
|
63
63
|
}
|
|
64
|
-
function i(
|
|
65
|
-
var m =
|
|
66
|
-
return u.decimal === !1 ? (
|
|
64
|
+
function i(l, s, u) {
|
|
65
|
+
var m = l / s, y = u.round ? "round" : "floor";
|
|
66
|
+
return u.decimal === !1 ? (l = Math[y](m), l.toString()) : (u.precision ? l = m : l = m < 10 ? Math[y](m * 10) / 10 : Math[y](m), l = l.toString(), typeof u.decimal == "string" && (l = l.replace(".", u.decimal)), l);
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
function
|
|
68
|
+
var a = 1e3, r = 1e4, o = 1e6, n = 1e9, c = 1e12;
|
|
69
|
+
function h(l, s) {
|
|
70
70
|
var u;
|
|
71
|
-
|
|
72
|
-
var m =
|
|
73
|
-
m && (
|
|
74
|
-
var y =
|
|
75
|
-
return
|
|
71
|
+
s = s || {};
|
|
72
|
+
var m = l < 0;
|
|
73
|
+
m && (l = Math.abs(l)), s.precision && (l = parseFloat(l.toPrecision(s.precision)));
|
|
74
|
+
var y = s.min10k ? r : a;
|
|
75
|
+
return l < y || s.precision && s.precision > Math.log10(l) ? u = t(i(l, 1, s), s) : l < o ? u = i(l, a, s) + "k" : l < n ? u = i(l, o, s) + "m" : l < c ? u = t(i(l, n, s), s) + "b" : u = t(i(l, c, s), s) + "t", m && (u = "-" + u), s.capital && (u = u.toUpperCase()), s.prefix && (u = s.prefix + u), s.suffix && (u = u + s.suffix), u;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
h.addCommas = t, e.exports = h;
|
|
78
78
|
})();
|
|
79
|
-
})(
|
|
80
|
-
var
|
|
81
|
-
const
|
|
79
|
+
})(x0);
|
|
80
|
+
var $0 = x0.exports;
|
|
81
|
+
const q = /* @__PURE__ */ y0($0), q0 = "FeatureCollection", G0 = [
|
|
82
82
|
{
|
|
83
83
|
type: "Feature",
|
|
84
84
|
properties: {
|
|
@@ -2510,11 +2510,11 @@ const $ = /* @__PURE__ */ h0(I0), U0 = "FeatureCollection", E0 = [
|
|
|
2510
2510
|
]
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
],
|
|
2514
|
-
type:
|
|
2515
|
-
features:
|
|
2513
|
+
], H0 = {
|
|
2514
|
+
type: q0,
|
|
2515
|
+
features: G0
|
|
2516
2516
|
};
|
|
2517
|
-
var
|
|
2517
|
+
var j0 = W0, J, U, F, Z, Q, K0 = [
|
|
2518
2518
|
"Point",
|
|
2519
2519
|
"MultiPoint",
|
|
2520
2520
|
"LineString",
|
|
@@ -2523,106 +2523,106 @@ var $0 = G0, J, I, v, W, X, q0 = [
|
|
|
2523
2523
|
"MultiPolygon",
|
|
2524
2524
|
"GeometryCollection"
|
|
2525
2525
|
];
|
|
2526
|
-
function
|
|
2527
|
-
|
|
2528
|
-
var t = e.readFields(
|
|
2526
|
+
function W0(e) {
|
|
2527
|
+
Z = 2, Q = Math.pow(10, 6), F = null, J = [], U = [];
|
|
2528
|
+
var t = e.readFields(J0, {});
|
|
2529
2529
|
return J = null, t;
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2532
|
-
e === 1 ? J.push(i.readString()) : e === 2 ?
|
|
2531
|
+
function J0(e, t, i) {
|
|
2532
|
+
e === 1 ? J.push(i.readString()) : e === 2 ? Z = i.readVarint() : e === 3 ? Q = Math.pow(10, i.readVarint()) : e === 4 ? Z0(i, t) : e === 5 ? g0(i, t) : e === 6 && t0(i, t);
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return t.type = "FeatureCollection", t.features = [], e.readMessage(
|
|
2534
|
+
function Z0(e, t) {
|
|
2535
|
+
return t.type = "FeatureCollection", t.features = [], e.readMessage(X0, t);
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function g0(e, t) {
|
|
2538
2538
|
t.type = "Feature";
|
|
2539
|
-
var i = e.readMessage(
|
|
2539
|
+
var i = e.readMessage(Q0, t);
|
|
2540
2540
|
return "geometry" in i || (i.geometry = null), i;
|
|
2541
2541
|
}
|
|
2542
|
-
function
|
|
2543
|
-
return t.type = "Point", e.readMessage(
|
|
2542
|
+
function t0(e, t) {
|
|
2543
|
+
return t.type = "Point", e.readMessage(Y0, t);
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2546
|
-
e === 1 ? t.features.push(
|
|
2545
|
+
function X0(e, t, i) {
|
|
2546
|
+
e === 1 ? t.features.push(g0(i, {})) : e === 13 ? U.push(i0(i)) : e === 15 && X(i, t);
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2549
|
-
e === 1 ? t.geometry =
|
|
2548
|
+
function Q0(e, t, i) {
|
|
2549
|
+
e === 1 ? t.geometry = t0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? U.push(i0(i)) : e === 14 ? t.properties = X(i, {}) : e === 15 && X(i, t);
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2552
|
-
e === 1 ? t.type =
|
|
2551
|
+
function Y0(e, t, i) {
|
|
2552
|
+
e === 1 ? t.type = K0[i.readVarint()] : e === 2 ? F = i.readPackedVarint() : e === 3 ? b0(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(t0(i, {}))) : e === 13 ? U.push(i0(i)) : e === 15 && X(i, t);
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2555
|
-
i === "Point" ? e.coordinates =
|
|
2554
|
+
function b0(e, t, i) {
|
|
2555
|
+
i === "Point" ? e.coordinates = e1(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = d0(t) : i === "MultiLineString" ? e.coordinates = f0(t) : i === "Polygon" ? e.coordinates = f0(t, !0) : i === "MultiPolygon" && (e.coordinates = t1(t));
|
|
2556
2556
|
}
|
|
2557
|
-
function
|
|
2557
|
+
function i0(e) {
|
|
2558
2558
|
for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2559
|
+
var a = e.readVarint(), r = a >> 3;
|
|
2560
|
+
r === 1 ? i = e.readString() : r === 2 ? i = e.readDouble() : r === 3 ? i = e.readVarint() : r === 4 ? i = -e.readVarint() : r === 5 ? i = e.readBoolean() : r === 6 && (i = JSON.parse(e.readString()));
|
|
2561
2561
|
}
|
|
2562
2562
|
return i;
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2565
|
-
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[J[e.readVarint()]] =
|
|
2566
|
-
return
|
|
2564
|
+
function X(e, t) {
|
|
2565
|
+
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[J[e.readVarint()]] = U[e.readVarint()];
|
|
2566
|
+
return U = [], t;
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2569
|
-
for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() /
|
|
2568
|
+
function e1(e) {
|
|
2569
|
+
for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / Q);
|
|
2570
2570
|
return i;
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2573
|
-
var
|
|
2574
|
-
for (
|
|
2575
|
-
for (; i ?
|
|
2576
|
-
for (
|
|
2577
|
-
c
|
|
2578
|
-
|
|
2572
|
+
function G(e, t, i, a) {
|
|
2573
|
+
var r = 0, o = [], n, c, h = [];
|
|
2574
|
+
for (c = 0; c < Z; c++) h[c] = 0;
|
|
2575
|
+
for (; i ? r < i : e.pos < t; ) {
|
|
2576
|
+
for (n = [], c = 0; c < Z; c++)
|
|
2577
|
+
h[c] += e.readSVarint(), n[c] = h[c] / Q;
|
|
2578
|
+
o.push(n), r++;
|
|
2579
2579
|
}
|
|
2580
|
-
return
|
|
2580
|
+
return a && o.push(o[0]), o;
|
|
2581
2581
|
}
|
|
2582
|
-
function
|
|
2583
|
-
return
|
|
2582
|
+
function d0(e) {
|
|
2583
|
+
return G(e, e.readVarint() + e.pos);
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function f0(e, t) {
|
|
2586
2586
|
var i = e.readVarint() + e.pos;
|
|
2587
|
-
if (!
|
|
2588
|
-
for (var
|
|
2589
|
-
return
|
|
2587
|
+
if (!F) return [G(e, i, null, t)];
|
|
2588
|
+
for (var a = [], r = 0; r < F.length; r++) a.push(G(e, i, F[r], t));
|
|
2589
|
+
return F = null, a;
|
|
2590
2590
|
}
|
|
2591
|
-
function
|
|
2591
|
+
function t1(e) {
|
|
2592
2592
|
var t = e.readVarint() + e.pos;
|
|
2593
|
-
if (!
|
|
2594
|
-
for (var i = [],
|
|
2595
|
-
for (var
|
|
2596
|
-
|
|
2593
|
+
if (!F) return [[G(e, t, null, !0)]];
|
|
2594
|
+
for (var i = [], a = 1, r = 0; r < F[0]; r++) {
|
|
2595
|
+
for (var o = [], n = 0; n < F[a]; n++) o.push(G(e, t, F[a + 1 + n], !0));
|
|
2596
|
+
a += F[a] + 1, i.push(o);
|
|
2597
2597
|
}
|
|
2598
|
-
return
|
|
2598
|
+
return F = null, i;
|
|
2599
2599
|
}
|
|
2600
|
-
var
|
|
2600
|
+
var i1 = j0, n0 = {};
|
|
2601
2601
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2602
|
-
|
|
2603
|
-
var
|
|
2604
|
-
for (u += m,
|
|
2602
|
+
n0.read = function(e, t, i, a, r) {
|
|
2603
|
+
var o, n, c = r * 8 - a - 1, h = (1 << c) - 1, l = h >> 1, s = -7, u = i ? r - 1 : 0, m = i ? -1 : 1, y = e[t + u];
|
|
2604
|
+
for (u += m, o = y & (1 << -s) - 1, y >>= -s, s += c; s > 0; o = o * 256 + e[t + u], u += m, s -= 8)
|
|
2605
2605
|
;
|
|
2606
|
-
for (
|
|
2606
|
+
for (n = o & (1 << -s) - 1, o >>= -s, s += a; s > 0; n = n * 256 + e[t + u], u += m, s -= 8)
|
|
2607
2607
|
;
|
|
2608
|
-
if (
|
|
2609
|
-
|
|
2608
|
+
if (o === 0)
|
|
2609
|
+
o = 1 - l;
|
|
2610
2610
|
else {
|
|
2611
|
-
if (
|
|
2612
|
-
return
|
|
2613
|
-
|
|
2611
|
+
if (o === h)
|
|
2612
|
+
return n ? NaN : (y ? -1 : 1) * (1 / 0);
|
|
2613
|
+
n = n + Math.pow(2, a), o = o - l;
|
|
2614
2614
|
}
|
|
2615
|
-
return (y ? -1 : 1) *
|
|
2615
|
+
return (y ? -1 : 1) * n * Math.pow(2, o - a);
|
|
2616
2616
|
};
|
|
2617
|
-
|
|
2618
|
-
var
|
|
2619
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (
|
|
2617
|
+
n0.write = function(e, t, i, a, r, o) {
|
|
2618
|
+
var n, c, h, l = o * 8 - r - 1, s = (1 << l) - 1, u = s >> 1, m = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = a ? 0 : o - 1, B = a ? 1 : -1, V = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
2619
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (c = isNaN(t) ? 1 : 0, n = s) : (n = Math.floor(Math.log(t) / Math.LN2), t * (h = Math.pow(2, -n)) < 1 && (n--, h *= 2), n + u >= 1 ? t += m / h : t += m * Math.pow(2, 1 - u), t * h >= 2 && (n++, h /= 2), n + u >= s ? (c = 0, n = s) : n + u >= 1 ? (c = (t * h - 1) * Math.pow(2, r), n = n + u) : (c = t * Math.pow(2, u - 1) * Math.pow(2, r), n = 0)); r >= 8; e[i + y] = c & 255, y += B, c /= 256, r -= 8)
|
|
2620
2620
|
;
|
|
2621
|
-
for (
|
|
2621
|
+
for (n = n << r | c, l += r; l > 0; e[i + y] = n & 255, y += B, n /= 256, l -= 8)
|
|
2622
2622
|
;
|
|
2623
|
-
e[i + y -
|
|
2623
|
+
e[i + y - B] |= V * 128;
|
|
2624
2624
|
};
|
|
2625
|
-
var
|
|
2625
|
+
var n1 = f, K = n0;
|
|
2626
2626
|
function f(e) {
|
|
2627
2627
|
this.buf = ArrayBuffer.isView && ArrayBuffer.isView(e) ? e : new Uint8Array(e || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
|
|
2628
2628
|
}
|
|
@@ -2630,7 +2630,7 @@ f.Varint = 0;
|
|
|
2630
2630
|
f.Fixed64 = 1;
|
|
2631
2631
|
f.Bytes = 2;
|
|
2632
2632
|
f.Fixed32 = 5;
|
|
2633
|
-
var
|
|
2633
|
+
var e0 = 65536 * 65536, h0 = 1 / e0, r1 = 12, F0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
|
|
2634
2634
|
f.prototype = {
|
|
2635
2635
|
destroy: function() {
|
|
2636
2636
|
this.buf = null;
|
|
@@ -2638,8 +2638,8 @@ f.prototype = {
|
|
|
2638
2638
|
// === READING =================================================================
|
|
2639
2639
|
readFields: function(e, t, i) {
|
|
2640
2640
|
for (i = i || this.length; this.pos < i; ) {
|
|
2641
|
-
var
|
|
2642
|
-
this.type =
|
|
2641
|
+
var a = this.readVarint(), r = a >> 3, o = this.pos;
|
|
2642
|
+
this.type = a & 7, e(r, t, this), this.pos === o && this.skip(a);
|
|
2643
2643
|
}
|
|
2644
2644
|
return t;
|
|
2645
2645
|
},
|
|
@@ -2647,33 +2647,33 @@ f.prototype = {
|
|
|
2647
2647
|
return this.readFields(e, t, this.readVarint() + this.pos);
|
|
2648
2648
|
},
|
|
2649
2649
|
readFixed32: function() {
|
|
2650
|
-
var e =
|
|
2650
|
+
var e = W(this.buf, this.pos);
|
|
2651
2651
|
return this.pos += 4, e;
|
|
2652
2652
|
},
|
|
2653
2653
|
readSFixed32: function() {
|
|
2654
|
-
var e =
|
|
2654
|
+
var e = m0(this.buf, this.pos);
|
|
2655
2655
|
return this.pos += 4, e;
|
|
2656
2656
|
},
|
|
2657
2657
|
// 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
|
|
2658
2658
|
readFixed64: function() {
|
|
2659
|
-
var e =
|
|
2659
|
+
var e = W(this.buf, this.pos) + W(this.buf, this.pos + 4) * e0;
|
|
2660
2660
|
return this.pos += 8, e;
|
|
2661
2661
|
},
|
|
2662
2662
|
readSFixed64: function() {
|
|
2663
|
-
var e =
|
|
2663
|
+
var e = W(this.buf, this.pos) + m0(this.buf, this.pos + 4) * e0;
|
|
2664
2664
|
return this.pos += 8, e;
|
|
2665
2665
|
},
|
|
2666
2666
|
readFloat: function() {
|
|
2667
|
-
var e =
|
|
2667
|
+
var e = K.read(this.buf, this.pos, !0, 23, 4);
|
|
2668
2668
|
return this.pos += 4, e;
|
|
2669
2669
|
},
|
|
2670
2670
|
readDouble: function() {
|
|
2671
|
-
var e =
|
|
2671
|
+
var e = K.read(this.buf, this.pos, !0, 52, 8);
|
|
2672
2672
|
return this.pos += 8, e;
|
|
2673
2673
|
},
|
|
2674
2674
|
readVarint: function(e) {
|
|
2675
|
-
var t = this.buf, i,
|
|
2676
|
-
return
|
|
2675
|
+
var t = this.buf, i, a;
|
|
2676
|
+
return a = t[this.pos++], i = a & 127, a < 128 || (a = t[this.pos++], i |= (a & 127) << 7, a < 128) || (a = t[this.pos++], i |= (a & 127) << 14, a < 128) || (a = t[this.pos++], i |= (a & 127) << 21, a < 128) ? i : (a = t[this.pos], i |= (a & 15) << 28, a1(i, e, this));
|
|
2677
2677
|
},
|
|
2678
2678
|
readVarint64: function() {
|
|
2679
2679
|
return this.readVarint(!0);
|
|
@@ -2687,7 +2687,7 @@ f.prototype = {
|
|
|
2687
2687
|
},
|
|
2688
2688
|
readString: function() {
|
|
2689
2689
|
var e = this.readVarint() + this.pos, t = this.pos;
|
|
2690
|
-
return this.pos = e, e - t >=
|
|
2690
|
+
return this.pos = e, e - t >= r1 && F0 ? F1(this.buf, t, e) : g1(this.buf, t, e);
|
|
2691
2691
|
},
|
|
2692
2692
|
readBytes: function() {
|
|
2693
2693
|
var e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
|
|
@@ -2696,55 +2696,55 @@ f.prototype = {
|
|
|
2696
2696
|
// verbose for performance reasons; doesn't affect gzipped size
|
|
2697
2697
|
readPackedVarint: function(e, t) {
|
|
2698
2698
|
if (this.type !== f.Bytes) return e.push(this.readVarint(t));
|
|
2699
|
-
var i =
|
|
2699
|
+
var i = k(this);
|
|
2700
2700
|
for (e = e || []; this.pos < i; ) e.push(this.readVarint(t));
|
|
2701
2701
|
return e;
|
|
2702
2702
|
},
|
|
2703
2703
|
readPackedSVarint: function(e) {
|
|
2704
2704
|
if (this.type !== f.Bytes) return e.push(this.readSVarint());
|
|
2705
|
-
var t =
|
|
2705
|
+
var t = k(this);
|
|
2706
2706
|
for (e = e || []; this.pos < t; ) e.push(this.readSVarint());
|
|
2707
2707
|
return e;
|
|
2708
2708
|
},
|
|
2709
2709
|
readPackedBoolean: function(e) {
|
|
2710
2710
|
if (this.type !== f.Bytes) return e.push(this.readBoolean());
|
|
2711
|
-
var t =
|
|
2711
|
+
var t = k(this);
|
|
2712
2712
|
for (e = e || []; this.pos < t; ) e.push(this.readBoolean());
|
|
2713
2713
|
return e;
|
|
2714
2714
|
},
|
|
2715
2715
|
readPackedFloat: function(e) {
|
|
2716
2716
|
if (this.type !== f.Bytes) return e.push(this.readFloat());
|
|
2717
|
-
var t =
|
|
2717
|
+
var t = k(this);
|
|
2718
2718
|
for (e = e || []; this.pos < t; ) e.push(this.readFloat());
|
|
2719
2719
|
return e;
|
|
2720
2720
|
},
|
|
2721
2721
|
readPackedDouble: function(e) {
|
|
2722
2722
|
if (this.type !== f.Bytes) return e.push(this.readDouble());
|
|
2723
|
-
var t =
|
|
2723
|
+
var t = k(this);
|
|
2724
2724
|
for (e = e || []; this.pos < t; ) e.push(this.readDouble());
|
|
2725
2725
|
return e;
|
|
2726
2726
|
},
|
|
2727
2727
|
readPackedFixed32: function(e) {
|
|
2728
2728
|
if (this.type !== f.Bytes) return e.push(this.readFixed32());
|
|
2729
|
-
var t =
|
|
2729
|
+
var t = k(this);
|
|
2730
2730
|
for (e = e || []; this.pos < t; ) e.push(this.readFixed32());
|
|
2731
2731
|
return e;
|
|
2732
2732
|
},
|
|
2733
2733
|
readPackedSFixed32: function(e) {
|
|
2734
2734
|
if (this.type !== f.Bytes) return e.push(this.readSFixed32());
|
|
2735
|
-
var t =
|
|
2735
|
+
var t = k(this);
|
|
2736
2736
|
for (e = e || []; this.pos < t; ) e.push(this.readSFixed32());
|
|
2737
2737
|
return e;
|
|
2738
2738
|
},
|
|
2739
2739
|
readPackedFixed64: function(e) {
|
|
2740
2740
|
if (this.type !== f.Bytes) return e.push(this.readFixed64());
|
|
2741
|
-
var t =
|
|
2741
|
+
var t = k(this);
|
|
2742
2742
|
for (e = e || []; this.pos < t; ) e.push(this.readFixed64());
|
|
2743
2743
|
return e;
|
|
2744
2744
|
},
|
|
2745
2745
|
readPackedSFixed64: function(e) {
|
|
2746
2746
|
if (this.type !== f.Bytes) return e.push(this.readSFixed64());
|
|
2747
|
-
var t =
|
|
2747
|
+
var t = k(this);
|
|
2748
2748
|
for (e = e || []; this.pos < t; ) e.push(this.readSFixed64());
|
|
2749
2749
|
return e;
|
|
2750
2750
|
},
|
|
@@ -2772,20 +2772,20 @@ f.prototype = {
|
|
|
2772
2772
|
return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
|
|
2773
2773
|
},
|
|
2774
2774
|
writeFixed32: function(e) {
|
|
2775
|
-
this.realloc(4),
|
|
2775
|
+
this.realloc(4), I(this.buf, e, this.pos), this.pos += 4;
|
|
2776
2776
|
},
|
|
2777
2777
|
writeSFixed32: function(e) {
|
|
2778
|
-
this.realloc(4),
|
|
2778
|
+
this.realloc(4), I(this.buf, e, this.pos), this.pos += 4;
|
|
2779
2779
|
},
|
|
2780
2780
|
writeFixed64: function(e) {
|
|
2781
|
-
this.realloc(8),
|
|
2781
|
+
this.realloc(8), I(this.buf, e & -1, this.pos), I(this.buf, Math.floor(e * h0), this.pos + 4), this.pos += 8;
|
|
2782
2782
|
},
|
|
2783
2783
|
writeSFixed64: function(e) {
|
|
2784
|
-
this.realloc(8),
|
|
2784
|
+
this.realloc(8), I(this.buf, e & -1, this.pos), I(this.buf, Math.floor(e * h0), this.pos + 4), this.pos += 8;
|
|
2785
2785
|
},
|
|
2786
2786
|
writeVarint: function(e) {
|
|
2787
2787
|
if (e = +e || 0, e > 268435455 || e < 0) {
|
|
2788
|
-
|
|
2788
|
+
o1(e, this);
|
|
2789
2789
|
return;
|
|
2790
2790
|
}
|
|
2791
2791
|
this.realloc(4), this.buf[this.pos++] = e & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = (e >>>= 7) & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = (e >>>= 7) & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = e >>> 7 & 127)));
|
|
@@ -2799,15 +2799,15 @@ f.prototype = {
|
|
|
2799
2799
|
writeString: function(e) {
|
|
2800
2800
|
e = String(e), this.realloc(e.length * 4), this.pos++;
|
|
2801
2801
|
var t = this.pos;
|
|
2802
|
-
this.pos =
|
|
2802
|
+
this.pos = v1(this.buf, e, this.pos);
|
|
2803
2803
|
var i = this.pos - t;
|
|
2804
|
-
i >= 128 &&
|
|
2804
|
+
i >= 128 && p0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
|
|
2805
2805
|
},
|
|
2806
2806
|
writeFloat: function(e) {
|
|
2807
|
-
this.realloc(4),
|
|
2807
|
+
this.realloc(4), K.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
|
|
2808
2808
|
},
|
|
2809
2809
|
writeDouble: function(e) {
|
|
2810
|
-
this.realloc(8),
|
|
2810
|
+
this.realloc(8), K.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
|
|
2811
2811
|
},
|
|
2812
2812
|
writeBytes: function(e) {
|
|
2813
2813
|
var t = e.length;
|
|
@@ -2818,38 +2818,38 @@ f.prototype = {
|
|
|
2818
2818
|
this.pos++;
|
|
2819
2819
|
var i = this.pos;
|
|
2820
2820
|
e(t, this);
|
|
2821
|
-
var
|
|
2822
|
-
|
|
2821
|
+
var a = this.pos - i;
|
|
2822
|
+
a >= 128 && p0(i, a, this), this.pos = i - 1, this.writeVarint(a), this.pos += a;
|
|
2823
2823
|
},
|
|
2824
2824
|
writeMessage: function(e, t, i) {
|
|
2825
2825
|
this.writeTag(e, f.Bytes), this.writeRawMessage(t, i);
|
|
2826
2826
|
},
|
|
2827
2827
|
writePackedVarint: function(e, t) {
|
|
2828
|
-
t.length && this.writeMessage(e,
|
|
2828
|
+
t.length && this.writeMessage(e, u1, t);
|
|
2829
2829
|
},
|
|
2830
2830
|
writePackedSVarint: function(e, t) {
|
|
2831
|
-
t.length && this.writeMessage(e,
|
|
2831
|
+
t.length && this.writeMessage(e, c1, t);
|
|
2832
2832
|
},
|
|
2833
2833
|
writePackedBoolean: function(e, t) {
|
|
2834
|
-
t.length && this.writeMessage(e,
|
|
2834
|
+
t.length && this.writeMessage(e, h1, t);
|
|
2835
2835
|
},
|
|
2836
2836
|
writePackedFloat: function(e, t) {
|
|
2837
|
-
t.length && this.writeMessage(e,
|
|
2837
|
+
t.length && this.writeMessage(e, d1, t);
|
|
2838
2838
|
},
|
|
2839
2839
|
writePackedDouble: function(e, t) {
|
|
2840
|
-
t.length && this.writeMessage(e,
|
|
2840
|
+
t.length && this.writeMessage(e, f1, t);
|
|
2841
2841
|
},
|
|
2842
2842
|
writePackedFixed32: function(e, t) {
|
|
2843
|
-
t.length && this.writeMessage(e,
|
|
2843
|
+
t.length && this.writeMessage(e, p1, t);
|
|
2844
2844
|
},
|
|
2845
2845
|
writePackedSFixed32: function(e, t) {
|
|
2846
|
-
t.length && this.writeMessage(e,
|
|
2846
|
+
t.length && this.writeMessage(e, m1, t);
|
|
2847
2847
|
},
|
|
2848
2848
|
writePackedFixed64: function(e, t) {
|
|
2849
|
-
t.length && this.writeMessage(e,
|
|
2849
|
+
t.length && this.writeMessage(e, y1, t);
|
|
2850
2850
|
},
|
|
2851
2851
|
writePackedSFixed64: function(e, t) {
|
|
2852
|
-
t.length && this.writeMessage(e,
|
|
2852
|
+
t.length && this.writeMessage(e, x1, t);
|
|
2853
2853
|
},
|
|
2854
2854
|
writeBytesField: function(e, t) {
|
|
2855
2855
|
this.writeTag(e, f.Bytes), this.writeBytes(t);
|
|
@@ -2885,108 +2885,126 @@ f.prototype = {
|
|
|
2885
2885
|
this.writeVarintField(e, !!t);
|
|
2886
2886
|
}
|
|
2887
2887
|
};
|
|
2888
|
-
function
|
|
2889
|
-
var
|
|
2890
|
-
if (
|
|
2888
|
+
function a1(e, t, i) {
|
|
2889
|
+
var a = i.buf, r, o;
|
|
2890
|
+
if (o = a[i.pos++], r = (o & 112) >> 4, o < 128 || (o = a[i.pos++], r |= (o & 127) << 3, o < 128) || (o = a[i.pos++], r |= (o & 127) << 10, o < 128) || (o = a[i.pos++], r |= (o & 127) << 17, o < 128) || (o = a[i.pos++], r |= (o & 127) << 24, o < 128) || (o = a[i.pos++], r |= (o & 1) << 31, o < 128)) return O(e, r, t);
|
|
2891
2891
|
throw new Error("Expected varint not more than 10 bytes");
|
|
2892
2892
|
}
|
|
2893
|
-
function
|
|
2893
|
+
function k(e) {
|
|
2894
2894
|
return e.type === f.Bytes ? e.readVarint() + e.pos : e.pos + 1;
|
|
2895
2895
|
}
|
|
2896
|
-
function
|
|
2896
|
+
function O(e, t, i) {
|
|
2897
2897
|
return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2900
|
-
var i,
|
|
2901
|
-
if (e >= 0 ? (i = e % 4294967296 | 0,
|
|
2899
|
+
function o1(e, t) {
|
|
2900
|
+
var i, a;
|
|
2901
|
+
if (e >= 0 ? (i = e % 4294967296 | 0, a = e / 4294967296 | 0) : (i = ~(-e % 4294967296), a = ~(-e / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, a = a + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
|
|
2902
2902
|
throw new Error("Given varint doesn't fit into 10 bytes");
|
|
2903
|
-
t.realloc(10),
|
|
2903
|
+
t.realloc(10), s1(i, a, t), l1(a, t);
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function s1(e, t, i) {
|
|
2906
2906
|
i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos] = e & 127;
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2908
|
+
function l1(e, t) {
|
|
2909
2909
|
var i = (e & 7) << 4;
|
|
2910
2910
|
t.buf[t.pos++] |= i | ((e >>>= 3) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127)))));
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2913
|
-
var
|
|
2914
|
-
i.realloc(
|
|
2915
|
-
for (var
|
|
2912
|
+
function p0(e, t, i) {
|
|
2913
|
+
var a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
|
|
2914
|
+
i.realloc(a);
|
|
2915
|
+
for (var r = i.pos - 1; r >= e; r--) i.buf[r + a] = i.buf[r];
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function u1(e, t) {
|
|
2918
2918
|
for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function c1(e, t) {
|
|
2921
2921
|
for (var i = 0; i < e.length; i++) t.writeSVarint(e[i]);
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function d1(e, t) {
|
|
2924
2924
|
for (var i = 0; i < e.length; i++) t.writeFloat(e[i]);
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function f1(e, t) {
|
|
2927
2927
|
for (var i = 0; i < e.length; i++) t.writeDouble(e[i]);
|
|
2928
2928
|
}
|
|
2929
|
-
function
|
|
2929
|
+
function h1(e, t) {
|
|
2930
2930
|
for (var i = 0; i < e.length; i++) t.writeBoolean(e[i]);
|
|
2931
2931
|
}
|
|
2932
|
-
function
|
|
2932
|
+
function p1(e, t) {
|
|
2933
2933
|
for (var i = 0; i < e.length; i++) t.writeFixed32(e[i]);
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2935
|
+
function m1(e, t) {
|
|
2936
2936
|
for (var i = 0; i < e.length; i++) t.writeSFixed32(e[i]);
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2938
|
+
function y1(e, t) {
|
|
2939
2939
|
for (var i = 0; i < e.length; i++) t.writeFixed64(e[i]);
|
|
2940
2940
|
}
|
|
2941
|
-
function
|
|
2941
|
+
function x1(e, t) {
|
|
2942
2942
|
for (var i = 0; i < e.length; i++) t.writeSFixed64(e[i]);
|
|
2943
2943
|
}
|
|
2944
|
-
function
|
|
2944
|
+
function W(e, t) {
|
|
2945
2945
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + e[t + 3] * 16777216;
|
|
2946
2946
|
}
|
|
2947
|
-
function
|
|
2947
|
+
function I(e, t, i) {
|
|
2948
2948
|
e[i] = t, e[i + 1] = t >>> 8, e[i + 2] = t >>> 16, e[i + 3] = t >>> 24;
|
|
2949
2949
|
}
|
|
2950
|
-
function
|
|
2950
|
+
function m0(e, t) {
|
|
2951
2951
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
|
|
2952
2952
|
}
|
|
2953
|
-
function
|
|
2954
|
-
for (var
|
|
2955
|
-
var
|
|
2956
|
-
if (
|
|
2957
|
-
var
|
|
2958
|
-
|
|
2953
|
+
function g1(e, t, i) {
|
|
2954
|
+
for (var a = "", r = t; r < i; ) {
|
|
2955
|
+
var o = e[r], n = null, c = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
2956
|
+
if (r + c > i) break;
|
|
2957
|
+
var h, l, s;
|
|
2958
|
+
c === 1 ? o < 128 && (n = o) : c === 2 ? (h = e[r + 1], (h & 192) === 128 && (n = (o & 31) << 6 | h & 63, n <= 127 && (n = null))) : c === 3 ? (h = e[r + 1], l = e[r + 2], (h & 192) === 128 && (l & 192) === 128 && (n = (o & 15) << 12 | (h & 63) << 6 | l & 63, (n <= 2047 || n >= 55296 && n <= 57343) && (n = null))) : c === 4 && (h = e[r + 1], l = e[r + 2], s = e[r + 3], (h & 192) === 128 && (l & 192) === 128 && (s & 192) === 128 && (n = (o & 15) << 18 | (h & 63) << 12 | (l & 63) << 6 | s & 63, (n <= 65535 || n >= 1114112) && (n = null))), n === null ? (n = 65533, c = 1) : n > 65535 && (n -= 65536, a += String.fromCharCode(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), a += String.fromCharCode(n), r += c;
|
|
2959
2959
|
}
|
|
2960
|
-
return
|
|
2960
|
+
return a;
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2963
|
-
return
|
|
2962
|
+
function F1(e, t, i) {
|
|
2963
|
+
return F0.decode(e.subarray(t, i));
|
|
2964
2964
|
}
|
|
2965
|
-
function
|
|
2966
|
-
for (var
|
|
2967
|
-
if (
|
|
2968
|
-
if (
|
|
2969
|
-
if (
|
|
2970
|
-
e[i++] = 239, e[i++] = 191, e[i++] = 189,
|
|
2965
|
+
function v1(e, t, i) {
|
|
2966
|
+
for (var a = 0, r, o; a < t.length; a++) {
|
|
2967
|
+
if (r = t.charCodeAt(a), r > 55295 && r < 57344)
|
|
2968
|
+
if (o)
|
|
2969
|
+
if (r < 56320) {
|
|
2970
|
+
e[i++] = 239, e[i++] = 191, e[i++] = 189, o = r;
|
|
2971
2971
|
continue;
|
|
2972
2972
|
} else
|
|
2973
|
-
|
|
2973
|
+
r = o - 55296 << 10 | r - 56320 | 65536, o = null;
|
|
2974
2974
|
else {
|
|
2975
|
-
|
|
2975
|
+
r > 56319 || a + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : o = r;
|
|
2976
2976
|
continue;
|
|
2977
2977
|
}
|
|
2978
|
-
else
|
|
2979
|
-
|
|
2978
|
+
else o && (e[i++] = 239, e[i++] = 191, e[i++] = 189, o = null);
|
|
2979
|
+
r < 128 ? e[i++] = r : (r < 2048 ? e[i++] = r >> 6 | 192 : (r < 65536 ? e[i++] = r >> 12 | 224 : (e[i++] = r >> 18 | 240, e[i++] = r >> 12 & 63 | 128), e[i++] = r >> 6 & 63 | 128), e[i++] = r & 63 | 128);
|
|
2980
2980
|
}
|
|
2981
2981
|
return i;
|
|
2982
2982
|
}
|
|
2983
|
-
const
|
|
2983
|
+
const w1 = /* @__PURE__ */ y0(n1), N1 = (e) => {
|
|
2984
|
+
var a, r;
|
|
2985
|
+
if (!e || !e.data)
|
|
2986
|
+
return {};
|
|
2987
|
+
const t = {}, i = e.data;
|
|
2988
|
+
if (i)
|
|
2989
|
+
for (const o of i) {
|
|
2990
|
+
const n = (a = o == null ? void 0 : o.event) == null ? void 0 : a.iso_code, c = (r = e.meta.metric_names) == null ? void 0 : r[0];
|
|
2991
|
+
n && (t[n] = c ? o.event[c] : 0);
|
|
2992
|
+
}
|
|
2993
|
+
return t;
|
|
2994
|
+
};
|
|
2995
|
+
function _1(e, t = 0) {
|
|
2996
|
+
let i = null;
|
|
2997
|
+
return (...a) => {
|
|
2998
|
+
i && clearTimeout(i), i = setTimeout(() => e(...a), t);
|
|
2999
|
+
};
|
|
3000
|
+
}
|
|
3001
|
+
const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
|
|
2984
3002
|
key: 0,
|
|
2985
3003
|
class: "legend"
|
|
2986
|
-
},
|
|
3004
|
+
}, P1 = {
|
|
2987
3005
|
key: 0,
|
|
2988
3006
|
class: "legend-title"
|
|
2989
|
-
},
|
|
3007
|
+
}, B1 = { class: "legend-text" }, V1 = /* @__PURE__ */ L0({
|
|
2990
3008
|
__name: "AnalyticsGeoMap",
|
|
2991
3009
|
props: {
|
|
2992
3010
|
countryMetrics: {},
|
|
@@ -2999,8 +3017,9 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
|
|
|
2999
3017
|
bounds: { default: () => {
|
|
3000
3018
|
} }
|
|
3001
3019
|
},
|
|
3002
|
-
|
|
3003
|
-
|
|
3020
|
+
emits: ["boundsChange"],
|
|
3021
|
+
setup(e, { emit: t }) {
|
|
3022
|
+
const i = import("./countries-simple-geo-BFUDnSiE.js").then((d) => d.default), a = t, { i18n: r } = A0.useI18n(), o = P0(), n = s0(), c = s0(null), h = C(() => ({
|
|
3004
3023
|
"fill-color": [
|
|
3005
3024
|
"match",
|
|
3006
3025
|
[
|
|
@@ -3013,79 +3032,79 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
|
|
|
3013
3032
|
],
|
|
3014
3033
|
["get", "ISO_A2"]
|
|
3015
3034
|
],
|
|
3016
|
-
...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([
|
|
3017
|
-
|
|
3018
|
-
|
|
3035
|
+
...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([d, p]) => [
|
|
3036
|
+
d,
|
|
3037
|
+
m(p)
|
|
3019
3038
|
]) : ["#ccc", "#ccc"],
|
|
3020
3039
|
"#ccc"
|
|
3021
3040
|
// default color if no match
|
|
3022
3041
|
],
|
|
3023
3042
|
"fill-opacity": 0.7
|
|
3024
|
-
})),
|
|
3025
|
-
const p = Math.log(
|
|
3026
|
-
return p >=
|
|
3027
|
-
},
|
|
3028
|
-
const p = (
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3043
|
+
})), l = C(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), s = C(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), u = C(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), m = (d) => {
|
|
3044
|
+
const p = Math.log(d), x = (u.value - s.value) / 5;
|
|
3045
|
+
return p >= s.value + 4 * x ? "#296378" : p >= s.value + 3 * x ? "#0D8093" : p >= s.value + 2 * x ? "#009FA9" : p >= s.value + 1 * x ? "#00BDB7" : "#0CDCBD";
|
|
3046
|
+
}, y = C(() => e.metric && r.t(`metrics.${e.metric}`) || ""), B = C(() => {
|
|
3047
|
+
const p = (u.value - s.value) / 5, g = [
|
|
3048
|
+
s.value + 4 * p,
|
|
3049
|
+
s.value + 3 * p,
|
|
3050
|
+
s.value + 2 * p,
|
|
3051
|
+
s.value + 1 * p,
|
|
3052
|
+
s.value
|
|
3034
3053
|
];
|
|
3035
|
-
return g.map((x,
|
|
3036
|
-
const
|
|
3037
|
-
let
|
|
3038
|
-
return
|
|
3039
|
-
color:
|
|
3040
|
-
range:
|
|
3054
|
+
return g.map((x, _) => {
|
|
3055
|
+
const z = _ === 0 ? u.value : g[_ - 1];
|
|
3056
|
+
let w = "";
|
|
3057
|
+
return _ === 0 ? w = `> ${q(Math.trunc(Math.exp(x)), { capital: !0 })}` : _ === g.length - 1 ? w = `< ${q(Math.trunc(Math.exp(z)), { capital: !0 })}` : w = `${q(Math.trunc(Math.exp(x)), { capital: !0 })} - ${q(Math.trunc(Math.exp(z)), { capital: !0 })}`, {
|
|
3058
|
+
color: m(Math.exp(x)),
|
|
3059
|
+
range: w
|
|
3041
3060
|
};
|
|
3042
3061
|
});
|
|
3043
|
-
}),
|
|
3044
|
-
const p =
|
|
3045
|
-
return Array.isArray(p[0]) && Array.isArray(p[0][0]) ?
|
|
3046
|
-
},
|
|
3047
|
-
var g, x,
|
|
3048
|
-
if (
|
|
3062
|
+
}), V = (d) => {
|
|
3063
|
+
const p = d.flat(1);
|
|
3064
|
+
return Array.isArray(p[0]) && Array.isArray(p[0][0]) ? V(p) : p;
|
|
3065
|
+
}, r0 = (d) => {
|
|
3066
|
+
var g, x, _, z, w, N, E;
|
|
3067
|
+
if (d === "RU") {
|
|
3049
3068
|
(g = n.value) == null || g.fitBounds([
|
|
3050
3069
|
[20, 40],
|
|
3051
3070
|
[180, 80]
|
|
3052
3071
|
]);
|
|
3053
3072
|
return;
|
|
3054
|
-
} else if (
|
|
3073
|
+
} else if (d === "US") {
|
|
3055
3074
|
(x = n.value) == null || x.fitBounds([
|
|
3056
3075
|
[-130, 20],
|
|
3057
3076
|
[-60, 50]
|
|
3058
3077
|
]);
|
|
3059
3078
|
return;
|
|
3060
|
-
} else if (
|
|
3061
|
-
(
|
|
3079
|
+
} else if (d === "FR") {
|
|
3080
|
+
(_ = n.value) == null || _.fitBounds([
|
|
3062
3081
|
[-5, 42],
|
|
3063
3082
|
[9, 51]
|
|
3064
3083
|
]);
|
|
3065
3084
|
return;
|
|
3066
|
-
} else if (
|
|
3067
|
-
(
|
|
3085
|
+
} else if (d === "NO") {
|
|
3086
|
+
(z = n.value) == null || z.fitBounds([
|
|
3068
3087
|
[4, 57],
|
|
3069
3088
|
[32, 71]
|
|
3070
3089
|
]);
|
|
3071
3090
|
return;
|
|
3072
3091
|
}
|
|
3073
|
-
const p = (
|
|
3074
|
-
var
|
|
3075
|
-
return (
|
|
3092
|
+
const p = (w = c.value) == null ? void 0 : w.features.find((v) => {
|
|
3093
|
+
var M, L, P, T, D;
|
|
3094
|
+
return (M = v.properties) != null && M.ISO_A2 ? ((L = v.properties) == null ? void 0 : L.ISO_A2) === d : ((P = v.properties) == null ? void 0 : P.iso_a2) === "-99" ? ((T = v.properties) == null ? void 0 : T.iso_a2_eh) === d : ((D = v.properties) == null ? void 0 : D.iso_a2) === d;
|
|
3076
3095
|
});
|
|
3077
3096
|
if (p) {
|
|
3078
|
-
const
|
|
3079
|
-
if (!
|
|
3080
|
-
const
|
|
3081
|
-
(
|
|
3082
|
-
[
|
|
3083
|
-
[
|
|
3097
|
+
const v = (N = p.geometry) == null ? void 0 : N.coordinates;
|
|
3098
|
+
if (!v) return;
|
|
3099
|
+
const M = V(v), L = M.map((R) => R[1]), P = M.map((R) => R[0]), T = Math.min(...L), D = Math.max(...L), H = Math.min(...P), j = Math.max(...P);
|
|
3100
|
+
(E = n.value) == null || E.fitBounds([
|
|
3101
|
+
[H, T],
|
|
3102
|
+
[j, D]
|
|
3084
3103
|
]);
|
|
3085
3104
|
}
|
|
3086
|
-
},
|
|
3087
|
-
const
|
|
3088
|
-
container:
|
|
3105
|
+
}, S = C(() => {
|
|
3106
|
+
const d = {
|
|
3107
|
+
container: o,
|
|
3089
3108
|
style: { version: 8, sources: {}, layers: [] },
|
|
3090
3109
|
attributionControl: !1,
|
|
3091
3110
|
// fit bounds for whole world minus antarctica
|
|
@@ -3095,26 +3114,33 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
|
|
|
3095
3114
|
[179, 90]
|
|
3096
3115
|
]
|
|
3097
3116
|
};
|
|
3098
|
-
return e.bounds && (
|
|
3099
|
-
})
|
|
3100
|
-
|
|
3101
|
-
|
|
3117
|
+
return e.bounds && (d.bounds = e.bounds), d;
|
|
3118
|
+
}), v0 = _1(() => {
|
|
3119
|
+
if (!n.value) return;
|
|
3120
|
+
const d = n.value.getBounds(), p = d.getSouthWest(), g = d.getNorthEast();
|
|
3121
|
+
a("boundsChange", [
|
|
3122
|
+
[Math.round(p.lng), Math.round(p.lat)],
|
|
3123
|
+
[Math.round(g.lng), Math.round(g.lat)]
|
|
3124
|
+
]);
|
|
3125
|
+
}, 300);
|
|
3126
|
+
return B0(async () => {
|
|
3127
|
+
var d, p, g;
|
|
3102
3128
|
try {
|
|
3103
|
-
const x = await
|
|
3104
|
-
|
|
3105
|
-
var
|
|
3106
|
-
(
|
|
3129
|
+
const x = await i, _ = await fetch(x), z = new Uint8Array(await _.arrayBuffer()), w = i1(new w1(z));
|
|
3130
|
+
c.value = w, n.value = new D0(S.value), n.value.on("load", () => {
|
|
3131
|
+
var E, v, M, L, P, T, D;
|
|
3132
|
+
(E = n.value) == null || E.addSource("countries", {
|
|
3107
3133
|
type: "geojson",
|
|
3108
|
-
data:
|
|
3109
|
-
}), (
|
|
3134
|
+
data: w
|
|
3135
|
+
}), (v = n.value) == null || v.addLayer({
|
|
3110
3136
|
id: "countries-layer",
|
|
3111
3137
|
type: "fill",
|
|
3112
3138
|
source: "countries",
|
|
3113
|
-
paint:
|
|
3114
|
-
}), (
|
|
3139
|
+
paint: h.value
|
|
3140
|
+
}), (M = n.value) == null || M.addSource("lakes", {
|
|
3115
3141
|
type: "geojson",
|
|
3116
|
-
data:
|
|
3117
|
-
}), (
|
|
3142
|
+
data: H0
|
|
3143
|
+
}), (L = n.value) == null || L.addLayer({
|
|
3118
3144
|
id: "lakes-layer",
|
|
3119
3145
|
type: "fill",
|
|
3120
3146
|
source: "lakes",
|
|
@@ -3122,36 +3148,36 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
|
|
|
3122
3148
|
"fill-color": "#FFFFFF"
|
|
3123
3149
|
}
|
|
3124
3150
|
});
|
|
3125
|
-
const
|
|
3151
|
+
const N = new C0({
|
|
3126
3152
|
closeButton: !1,
|
|
3127
3153
|
closeOnClick: !1
|
|
3128
3154
|
});
|
|
3129
|
-
(
|
|
3130
|
-
var
|
|
3131
|
-
const
|
|
3132
|
-
if (
|
|
3133
|
-
const { iso_a2:
|
|
3134
|
-
if (
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3155
|
+
(P = n.value) == null || P.on("mousemove", "countries-layer", (H) => {
|
|
3156
|
+
var R;
|
|
3157
|
+
const j = (R = H.features) == null ? void 0 : R[0];
|
|
3158
|
+
if (j) {
|
|
3159
|
+
const { iso_a2: a0, iso_a2_eh: w0, ISO_A2: _0, admin: o0 } = j.properties, k0 = _0 ?? a0 === "-99" ? w0 : a0, Y = e.countryMetrics[k0];
|
|
3160
|
+
if (Y !== void 0) {
|
|
3161
|
+
const M0 = e.showTooltipValue ? `<strong>${o0}</strong>: ${q(Y, { capital: !0 })} ${r.t(`metricUnits.${e.metricUnit}`, { plural: Y > 1 ? "s" : "" })}` : `<strong>${o0}</strong>`;
|
|
3162
|
+
N.setLngLat(H.lngLat).setHTML(M0).addTo(n.value);
|
|
3137
3163
|
} else
|
|
3138
|
-
|
|
3164
|
+
N.remove();
|
|
3139
3165
|
}
|
|
3140
|
-
}), (
|
|
3141
|
-
|
|
3142
|
-
}), e.fitToCountry &&
|
|
3143
|
-
}), (
|
|
3166
|
+
}), (T = n.value) == null || T.on("mouseleave", "countries-layer", () => {
|
|
3167
|
+
N.remove();
|
|
3168
|
+
}), (D = n.value) == null || D.on("move", v0), e.fitToCountry && r0(e.fitToCountry);
|
|
3169
|
+
}), (d = n.value) == null || d.dragRotate.disable(), (p = n.value) == null || p.keyboard.disable(), (g = n.value) == null || g.touchZoomRotate.disableRotation();
|
|
3144
3170
|
} catch (x) {
|
|
3145
3171
|
console.error(x);
|
|
3146
3172
|
}
|
|
3147
|
-
}),
|
|
3148
|
-
var
|
|
3173
|
+
}), l0(() => e.countryMetrics, () => {
|
|
3174
|
+
var d;
|
|
3149
3175
|
n.value && n.value.isStyleLoaded() && (n.value.getLayer("countries-layer") && n.value.removeLayer("countries-layer"), n.value.addLayer({
|
|
3150
3176
|
id: "countries-layer",
|
|
3151
3177
|
type: "fill",
|
|
3152
3178
|
source: "countries",
|
|
3153
|
-
paint:
|
|
3154
|
-
}), n.value.removeLayer("lakes-layer"), (
|
|
3179
|
+
paint: h.value
|
|
3180
|
+
}), n.value.removeLayer("lakes-layer"), (d = n.value) == null || d.addLayer({
|
|
3155
3181
|
id: "lakes-layer",
|
|
3156
3182
|
type: "fill",
|
|
3157
3183
|
source: "lakes",
|
|
@@ -3159,50 +3185,40 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
|
|
|
3159
3185
|
"fill-color": "#FFFFFF"
|
|
3160
3186
|
}
|
|
3161
3187
|
}));
|
|
3162
|
-
}),
|
|
3188
|
+
}), l0(() => e.fitToCountry, (d) => {
|
|
3163
3189
|
var p, g, x;
|
|
3164
|
-
n.value &&
|
|
3190
|
+
n.value && d ? r0(d) : !S.value.center && !S.value.zoom ? (p = n.value) == null || p.fitBounds([
|
|
3165
3191
|
[-180, -90],
|
|
3166
3192
|
[180, 90]
|
|
3167
|
-
]) : (
|
|
3168
|
-
}), (
|
|
3169
|
-
|
|
3170
|
-
id:
|
|
3193
|
+
]) : (S.value.zoom && ((g = n.value) == null || g.setZoom(S.value.zoom)), S.value.center && ((x = n.value) == null || x.flyTo({ center: S.value.center })));
|
|
3194
|
+
}), (d, p) => ($(), A("div", k1, [
|
|
3195
|
+
b("div", {
|
|
3196
|
+
id: V0(o),
|
|
3171
3197
|
class: "analytics-geo-map-container"
|
|
3172
|
-
}, null, 8,
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
(
|
|
3198
|
+
}, null, 8, M1),
|
|
3199
|
+
l.value ? ($(), A("div", L1, [
|
|
3200
|
+
d.metric ? ($(), A("div", P1, c0(y.value), 1)) : u0("", !0),
|
|
3201
|
+
($(!0), A(S0, null, z0(B.value, (g, x) => ($(), A("div", {
|
|
3176
3202
|
key: x,
|
|
3177
3203
|
class: "legend-item"
|
|
3178
3204
|
}, [
|
|
3179
|
-
|
|
3205
|
+
b("span", {
|
|
3180
3206
|
class: "legend-color",
|
|
3181
|
-
style:
|
|
3207
|
+
style: T0({ backgroundColor: g.color })
|
|
3182
3208
|
}, null, 4),
|
|
3183
|
-
|
|
3209
|
+
b("span", B1, c0(g.range), 1)
|
|
3184
3210
|
]))), 128))
|
|
3185
|
-
])) :
|
|
3211
|
+
])) : u0("", !0)
|
|
3186
3212
|
]));
|
|
3187
3213
|
}
|
|
3188
|
-
}),
|
|
3214
|
+
}), S1 = (e, t) => {
|
|
3189
3215
|
const i = e.__vccOpts || e;
|
|
3190
|
-
for (const [
|
|
3191
|
-
i[
|
|
3216
|
+
for (const [a, r] of t)
|
|
3217
|
+
i[a] = r;
|
|
3192
3218
|
return i;
|
|
3193
|
-
},
|
|
3194
|
-
var r, n;
|
|
3195
|
-
if (!e || !e.data)
|
|
3196
|
-
return {};
|
|
3197
|
-
const t = {}, i = e.data;
|
|
3198
|
-
if (i)
|
|
3199
|
-
for (const a of i) {
|
|
3200
|
-
const o = (r = a == null ? void 0 : a.event) == null ? void 0 : r.iso_code, d = (n = e.meta.metric_names) == null ? void 0 : n[0];
|
|
3201
|
-
o && (t[o] = d ? a.event[d] : 0);
|
|
3202
|
-
}
|
|
3203
|
-
return t;
|
|
3204
|
-
};
|
|
3219
|
+
}, R1 = /* @__PURE__ */ S1(V1, [["__scopeId", "data-v-8d87bca2"]]);
|
|
3205
3220
|
export {
|
|
3206
|
-
|
|
3207
|
-
|
|
3221
|
+
R1 as AnalyticsGeoMap,
|
|
3222
|
+
_1 as debounce,
|
|
3223
|
+
N1 as exploreResultToCountryMetrics
|
|
3208
3224
|
};
|