@kong-ui-public/analytics-geo-map 1.4.4 → 1.4.5-pr.2539.1b1d2ca2f.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.
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { AnalyticsIcon as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as V0, useId as z0, ref as p0, computed as L, onMounted as T0, watch as n0, createElementBlock as U, openBlock as R, createCommentVNode as r0, createElementVNode as E, renderSlot as a0, createVNode as C0, unref as A, createTextVNode as D0, toDisplayString as Z, Fragment as N0, renderList as I0, normalizeStyle as O0 } from "vue";
|
|
2
|
+
import { Map as U0, Popup as R0 } from "maplibre-gl";
|
|
3
|
+
import { createI18n as E0, i18nTComponent as A0 } from "@kong-ui-public/i18n";
|
|
4
|
+
import { AnalyticsIcon as H0 } from "@kong/icons";
|
|
5
|
+
const $0 = {
|
|
6
6
|
ms: "ms",
|
|
7
7
|
bytes: "Byte{plural}",
|
|
8
8
|
count: "request{plural}",
|
|
9
9
|
"count/minute": "rpm",
|
|
10
10
|
requests: "request{plural}"
|
|
11
|
-
},
|
|
11
|
+
}, G0 = {
|
|
12
12
|
request_count: "Request count",
|
|
13
13
|
request_per_minute: "Requests per minute",
|
|
14
14
|
response_latency_average: "Response latency (avg)",
|
|
@@ -33,40 +33,40 @@ const H0 = {
|
|
|
33
33
|
request_size_p95: "Request size (p95)",
|
|
34
34
|
request_size_p50: "Request size (p50)",
|
|
35
35
|
request_size_sum: "Request size (sum)"
|
|
36
|
-
},
|
|
36
|
+
}, q0 = {
|
|
37
37
|
windows_zoom_help_text: "Use Ctrl + Scroll to zoom the map",
|
|
38
38
|
mac_zoom_help_text: "Use ⌘ + Scroll to zoom the map",
|
|
39
39
|
mobile_zoom_help_text: "Use two fingers to zoom the map"
|
|
40
|
-
},
|
|
41
|
-
metricUnits:
|
|
42
|
-
metrics:
|
|
43
|
-
cooperative_gestures:
|
|
44
|
-
no_location_data:
|
|
45
|
-
no_location_data_description:
|
|
40
|
+
}, K0 = "No location", j0 = "No location data found.", W0 = {
|
|
41
|
+
metricUnits: $0,
|
|
42
|
+
metrics: G0,
|
|
43
|
+
cooperative_gestures: q0,
|
|
44
|
+
no_location_data: K0,
|
|
45
|
+
no_location_data_description: j0
|
|
46
46
|
};
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
47
|
+
function Z0() {
|
|
48
|
+
const e = E0("en-us", W0);
|
|
49
49
|
return {
|
|
50
50
|
i18n: e,
|
|
51
|
-
i18nT:
|
|
51
|
+
i18nT: A0(e)
|
|
52
52
|
// Translation component <i18n-t>
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
useI18n:
|
|
55
|
+
const J0 = {
|
|
56
|
+
useI18n: Z0
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function F0(e) {
|
|
59
59
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
60
60
|
}
|
|
61
|
-
var
|
|
61
|
+
var _0 = { exports: {} };
|
|
62
62
|
(function(e) {
|
|
63
63
|
(function() {
|
|
64
64
|
function t(s, l) {
|
|
65
65
|
if (l.separator === !1 || s < 1e3)
|
|
66
66
|
return s.toString();
|
|
67
67
|
var u = typeof l.separator == "string" ? l.separator : ",", y = [], g = Math.round(s).toString().split("");
|
|
68
|
-
return g.reverse().forEach(function(
|
|
69
|
-
|
|
68
|
+
return g.reverse().forEach(function(T, I) {
|
|
69
|
+
I && I % 3 === 0 && y.push(u), y.push(T);
|
|
70
70
|
}), y.reverse().join("");
|
|
71
71
|
}
|
|
72
72
|
function i(s, l, u) {
|
|
@@ -84,9 +84,9 @@ var F0 = { exports: {} };
|
|
|
84
84
|
}
|
|
85
85
|
p.addCommas = t, e.exports = p;
|
|
86
86
|
})();
|
|
87
|
-
})(
|
|
88
|
-
var
|
|
89
|
-
const
|
|
87
|
+
})(_0);
|
|
88
|
+
var X0 = _0.exports;
|
|
89
|
+
const Q0 = /* @__PURE__ */ F0(X0), Y0 = "FeatureCollection", b0 = [
|
|
90
90
|
{
|
|
91
91
|
type: "Feature",
|
|
92
92
|
properties: {
|
|
@@ -2518,11 +2518,11 @@ const q = /* @__PURE__ */ v0(J0), X0 = "FeatureCollection", Q0 = [
|
|
|
2518
2518
|
]
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
|
-
],
|
|
2522
|
-
type:
|
|
2523
|
-
features:
|
|
2521
|
+
], ee = {
|
|
2522
|
+
type: Y0,
|
|
2523
|
+
features: b0
|
|
2524
2524
|
};
|
|
2525
|
-
var
|
|
2525
|
+
var te = ne, Q, G, v, Y, e0, ie = [
|
|
2526
2526
|
"Point",
|
|
2527
2527
|
"MultiPoint",
|
|
2528
2528
|
"LineString",
|
|
@@ -2531,38 +2531,38 @@ var b0 = te, Q, $, F, Y, e0, ee = [
|
|
|
2531
2531
|
"MultiPolygon",
|
|
2532
2532
|
"GeometryCollection"
|
|
2533
2533
|
];
|
|
2534
|
-
function
|
|
2535
|
-
Y = 2, e0 = Math.pow(10, 6),
|
|
2536
|
-
var t = e.readFields(
|
|
2534
|
+
function ne(e) {
|
|
2535
|
+
Y = 2, e0 = Math.pow(10, 6), v = null, Q = [], G = [];
|
|
2536
|
+
var t = e.readFields(re, {});
|
|
2537
2537
|
return Q = null, t;
|
|
2538
2538
|
}
|
|
2539
|
-
function
|
|
2540
|
-
e === 1 ? Q.push(i.readString()) : e === 2 ? Y = i.readVarint() : e === 3 ? e0 = Math.pow(10, i.readVarint()) : e === 4 ?
|
|
2539
|
+
function re(e, t, i) {
|
|
2540
|
+
e === 1 ? Q.push(i.readString()) : e === 2 ? Y = i.readVarint() : e === 3 ? e0 = Math.pow(10, i.readVarint()) : e === 4 ? ae(i, t) : e === 5 ? w0(i, t) : e === 6 && s0(i, t);
|
|
2541
2541
|
}
|
|
2542
|
-
function
|
|
2543
|
-
return t.type = "FeatureCollection", t.features = [], e.readMessage(
|
|
2542
|
+
function ae(e, t) {
|
|
2543
|
+
return t.type = "FeatureCollection", t.features = [], e.readMessage(oe, t);
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function w0(e, t) {
|
|
2546
2546
|
t.type = "Feature";
|
|
2547
|
-
var i = e.readMessage(
|
|
2547
|
+
var i = e.readMessage(se, t);
|
|
2548
2548
|
return "geometry" in i || (i.geometry = null), i;
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2551
|
-
return t.type = "Point", e.readMessage(
|
|
2552
|
-
}
|
|
2553
|
-
function re(e, t, i) {
|
|
2554
|
-
e === 1 ? t.features.push(_0(i, {})) : e === 13 ? $.push(s0(i)) : e === 15 && b(i, t);
|
|
2555
|
-
}
|
|
2556
|
-
function ae(e, t, i) {
|
|
2557
|
-
e === 1 ? t.geometry = o0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? $.push(s0(i)) : e === 14 ? t.properties = b(i, {}) : e === 15 && b(i, t);
|
|
2550
|
+
function s0(e, t) {
|
|
2551
|
+
return t.type = "Point", e.readMessage(le, t);
|
|
2558
2552
|
}
|
|
2559
2553
|
function oe(e, t, i) {
|
|
2560
|
-
e === 1 ? t.
|
|
2554
|
+
e === 1 ? t.features.push(w0(i, {})) : e === 13 ? G.push(l0(i)) : e === 15 && b(i, t);
|
|
2561
2555
|
}
|
|
2562
2556
|
function se(e, t, i) {
|
|
2563
|
-
|
|
2557
|
+
e === 1 ? t.geometry = s0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? G.push(l0(i)) : e === 14 ? t.properties = b(i, {}) : e === 15 && b(i, t);
|
|
2558
|
+
}
|
|
2559
|
+
function le(e, t, i) {
|
|
2560
|
+
e === 1 ? t.type = ie[i.readVarint()] : e === 2 ? v = i.readPackedVarint() : e === 3 ? ue(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(s0(i, {}))) : e === 13 ? G.push(l0(i)) : e === 15 && b(i, t);
|
|
2564
2561
|
}
|
|
2565
|
-
function
|
|
2562
|
+
function ue(e, t, i) {
|
|
2563
|
+
i === "Point" ? e.coordinates = ce(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = m0(t) : i === "MultiLineString" ? e.coordinates = y0(t) : i === "Polygon" ? e.coordinates = y0(t, !0) : i === "MultiPolygon" && (e.coordinates = de(t));
|
|
2564
|
+
}
|
|
2565
|
+
function l0(e) {
|
|
2566
2566
|
for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
|
|
2567
2567
|
var a = e.readVarint(), n = a >> 3;
|
|
2568
2568
|
n === 1 ? i = e.readString() : n === 2 ? i = e.readDouble() : n === 3 ? i = e.readVarint() : n === 4 ? i = -e.readVarint() : n === 5 ? i = e.readBoolean() : n === 6 && (i = JSON.parse(e.readString()));
|
|
@@ -2570,10 +2570,10 @@ function s0(e) {
|
|
|
2570
2570
|
return i;
|
|
2571
2571
|
}
|
|
2572
2572
|
function b(e, t) {
|
|
2573
|
-
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[Q[e.readVarint()]] =
|
|
2574
|
-
return
|
|
2573
|
+
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[Q[e.readVarint()]] = G[e.readVarint()];
|
|
2574
|
+
return G = [], t;
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function ce(e) {
|
|
2577
2577
|
for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / e0);
|
|
2578
2578
|
return i;
|
|
2579
2579
|
}
|
|
@@ -2587,27 +2587,27 @@ function K(e, t, i, a) {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
return a && o.push(o[0]), o;
|
|
2589
2589
|
}
|
|
2590
|
-
function
|
|
2590
|
+
function m0(e) {
|
|
2591
2591
|
return K(e, e.readVarint() + e.pos);
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2593
|
+
function y0(e, t) {
|
|
2594
2594
|
var i = e.readVarint() + e.pos;
|
|
2595
|
-
if (!
|
|
2596
|
-
for (var a = [], n = 0; n <
|
|
2597
|
-
return
|
|
2595
|
+
if (!v) return [K(e, i, null, t)];
|
|
2596
|
+
for (var a = [], n = 0; n < v.length; n++) a.push(K(e, i, v[n], t));
|
|
2597
|
+
return v = null, a;
|
|
2598
2598
|
}
|
|
2599
|
-
function
|
|
2599
|
+
function de(e) {
|
|
2600
2600
|
var t = e.readVarint() + e.pos;
|
|
2601
|
-
if (!
|
|
2602
|
-
for (var i = [], a = 1, n = 0; n <
|
|
2603
|
-
for (var o = [], r = 0; r <
|
|
2604
|
-
a +=
|
|
2601
|
+
if (!v) return [[K(e, t, null, !0)]];
|
|
2602
|
+
for (var i = [], a = 1, n = 0; n < v[0]; n++) {
|
|
2603
|
+
for (var o = [], r = 0; r < v[a]; r++) o.push(K(e, t, v[a + 1 + r], !0));
|
|
2604
|
+
a += v[a] + 1, i.push(o);
|
|
2605
2605
|
}
|
|
2606
|
-
return
|
|
2606
|
+
return v = null, i;
|
|
2607
2607
|
}
|
|
2608
|
-
var
|
|
2608
|
+
var fe = te, u0 = {};
|
|
2609
2609
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2610
|
-
|
|
2610
|
+
u0.read = function(e, t, i, a, n) {
|
|
2611
2611
|
var o, r, d = n * 8 - a - 1, p = (1 << d) - 1, s = p >> 1, l = -7, u = i ? n - 1 : 0, y = i ? -1 : 1, g = e[t + u];
|
|
2612
2612
|
for (u += y, o = g & (1 << -l) - 1, g >>= -l, l += d; l > 0; o = o * 256 + e[t + u], u += y, l -= 8)
|
|
2613
2613
|
;
|
|
@@ -2622,15 +2622,15 @@ l0.read = function(e, t, i, a, n) {
|
|
|
2622
2622
|
}
|
|
2623
2623
|
return (g ? -1 : 1) * r * Math.pow(2, o - a);
|
|
2624
2624
|
};
|
|
2625
|
-
|
|
2626
|
-
var r, d, p, s = o * 8 - n - 1, l = (1 << s) - 1, u = l >> 1, y = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = a ? 0 : o - 1,
|
|
2627
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, r = l) : (r = Math.floor(Math.log(t) / Math.LN2), t * (p = Math.pow(2, -r)) < 1 && (r--, p *= 2), r + u >= 1 ? t += y / p : t += y * Math.pow(2, 1 - u), t * p >= 2 && (r++, p /= 2), r + u >= l ? (d = 0, r = l) : r + u >= 1 ? (d = (t * p - 1) * Math.pow(2, n), r = r + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, n), r = 0)); n >= 8; e[i + g] = d & 255, g +=
|
|
2625
|
+
u0.write = function(e, t, i, a, n, o) {
|
|
2626
|
+
var r, d, p, s = o * 8 - n - 1, l = (1 << s) - 1, u = l >> 1, y = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = a ? 0 : o - 1, T = a ? 1 : -1, I = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
2627
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, r = l) : (r = Math.floor(Math.log(t) / Math.LN2), t * (p = Math.pow(2, -r)) < 1 && (r--, p *= 2), r + u >= 1 ? t += y / p : t += y * Math.pow(2, 1 - u), t * p >= 2 && (r++, p /= 2), r + u >= l ? (d = 0, r = l) : r + u >= 1 ? (d = (t * p - 1) * Math.pow(2, n), r = r + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, n), r = 0)); n >= 8; e[i + g] = d & 255, g += T, d /= 256, n -= 8)
|
|
2628
2628
|
;
|
|
2629
|
-
for (r = r << n | d, s += n; s > 0; e[i + g] = r & 255, g +=
|
|
2629
|
+
for (r = r << n | d, s += n; s > 0; e[i + g] = r & 255, g += T, r /= 256, s -= 8)
|
|
2630
2630
|
;
|
|
2631
|
-
e[i + g -
|
|
2631
|
+
e[i + g - T] |= I * 128;
|
|
2632
2632
|
};
|
|
2633
|
-
var
|
|
2633
|
+
var he = h, J = u0;
|
|
2634
2634
|
function h(e) {
|
|
2635
2635
|
this.buf = ArrayBuffer.isView && ArrayBuffer.isView(e) ? e : new Uint8Array(e || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
|
|
2636
2636
|
}
|
|
@@ -2638,7 +2638,7 @@ h.Varint = 0;
|
|
|
2638
2638
|
h.Fixed64 = 1;
|
|
2639
2639
|
h.Bytes = 2;
|
|
2640
2640
|
h.Fixed32 = 5;
|
|
2641
|
-
var
|
|
2641
|
+
var o0 = 65536 * 65536, x0 = 1 / o0, pe = 12, k0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
|
|
2642
2642
|
h.prototype = {
|
|
2643
2643
|
destroy: function() {
|
|
2644
2644
|
this.buf = null;
|
|
@@ -2659,16 +2659,16 @@ h.prototype = {
|
|
|
2659
2659
|
return this.pos += 4, e;
|
|
2660
2660
|
},
|
|
2661
2661
|
readSFixed32: function() {
|
|
2662
|
-
var e =
|
|
2662
|
+
var e = v0(this.buf, this.pos);
|
|
2663
2663
|
return this.pos += 4, e;
|
|
2664
2664
|
},
|
|
2665
2665
|
// 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
|
|
2666
2666
|
readFixed64: function() {
|
|
2667
|
-
var e = X(this.buf, this.pos) + X(this.buf, this.pos + 4) *
|
|
2667
|
+
var e = X(this.buf, this.pos) + X(this.buf, this.pos + 4) * o0;
|
|
2668
2668
|
return this.pos += 8, e;
|
|
2669
2669
|
},
|
|
2670
2670
|
readSFixed64: function() {
|
|
2671
|
-
var e = X(this.buf, this.pos) +
|
|
2671
|
+
var e = X(this.buf, this.pos) + v0(this.buf, this.pos + 4) * o0;
|
|
2672
2672
|
return this.pos += 8, e;
|
|
2673
2673
|
},
|
|
2674
2674
|
readFloat: function() {
|
|
@@ -2681,7 +2681,7 @@ h.prototype = {
|
|
|
2681
2681
|
},
|
|
2682
2682
|
readVarint: function(e) {
|
|
2683
2683
|
var t = this.buf, i, a;
|
|
2684
|
-
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,
|
|
2684
|
+
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, me(i, e, this));
|
|
2685
2685
|
},
|
|
2686
2686
|
readVarint64: function() {
|
|
2687
2687
|
return this.readVarint(!0);
|
|
@@ -2695,7 +2695,7 @@ h.prototype = {
|
|
|
2695
2695
|
},
|
|
2696
2696
|
readString: function() {
|
|
2697
2697
|
var e = this.readVarint() + this.pos, t = this.pos;
|
|
2698
|
-
return this.pos = e, e - t >=
|
|
2698
|
+
return this.pos = e, e - t >= pe && k0 ? Ve(this.buf, t, e) : Se(this.buf, t, e);
|
|
2699
2699
|
},
|
|
2700
2700
|
readBytes: function() {
|
|
2701
2701
|
var e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
|
|
@@ -2704,55 +2704,55 @@ h.prototype = {
|
|
|
2704
2704
|
// verbose for performance reasons; doesn't affect gzipped size
|
|
2705
2705
|
readPackedVarint: function(e, t) {
|
|
2706
2706
|
if (this.type !== h.Bytes) return e.push(this.readVarint(t));
|
|
2707
|
-
var i =
|
|
2707
|
+
var i = P(this);
|
|
2708
2708
|
for (e = e || []; this.pos < i; ) e.push(this.readVarint(t));
|
|
2709
2709
|
return e;
|
|
2710
2710
|
},
|
|
2711
2711
|
readPackedSVarint: function(e) {
|
|
2712
2712
|
if (this.type !== h.Bytes) return e.push(this.readSVarint());
|
|
2713
|
-
var t =
|
|
2713
|
+
var t = P(this);
|
|
2714
2714
|
for (e = e || []; this.pos < t; ) e.push(this.readSVarint());
|
|
2715
2715
|
return e;
|
|
2716
2716
|
},
|
|
2717
2717
|
readPackedBoolean: function(e) {
|
|
2718
2718
|
if (this.type !== h.Bytes) return e.push(this.readBoolean());
|
|
2719
|
-
var t =
|
|
2719
|
+
var t = P(this);
|
|
2720
2720
|
for (e = e || []; this.pos < t; ) e.push(this.readBoolean());
|
|
2721
2721
|
return e;
|
|
2722
2722
|
},
|
|
2723
2723
|
readPackedFloat: function(e) {
|
|
2724
2724
|
if (this.type !== h.Bytes) return e.push(this.readFloat());
|
|
2725
|
-
var t =
|
|
2725
|
+
var t = P(this);
|
|
2726
2726
|
for (e = e || []; this.pos < t; ) e.push(this.readFloat());
|
|
2727
2727
|
return e;
|
|
2728
2728
|
},
|
|
2729
2729
|
readPackedDouble: function(e) {
|
|
2730
2730
|
if (this.type !== h.Bytes) return e.push(this.readDouble());
|
|
2731
|
-
var t =
|
|
2731
|
+
var t = P(this);
|
|
2732
2732
|
for (e = e || []; this.pos < t; ) e.push(this.readDouble());
|
|
2733
2733
|
return e;
|
|
2734
2734
|
},
|
|
2735
2735
|
readPackedFixed32: function(e) {
|
|
2736
2736
|
if (this.type !== h.Bytes) return e.push(this.readFixed32());
|
|
2737
|
-
var t =
|
|
2737
|
+
var t = P(this);
|
|
2738
2738
|
for (e = e || []; this.pos < t; ) e.push(this.readFixed32());
|
|
2739
2739
|
return e;
|
|
2740
2740
|
},
|
|
2741
2741
|
readPackedSFixed32: function(e) {
|
|
2742
2742
|
if (this.type !== h.Bytes) return e.push(this.readSFixed32());
|
|
2743
|
-
var t =
|
|
2743
|
+
var t = P(this);
|
|
2744
2744
|
for (e = e || []; this.pos < t; ) e.push(this.readSFixed32());
|
|
2745
2745
|
return e;
|
|
2746
2746
|
},
|
|
2747
2747
|
readPackedFixed64: function(e) {
|
|
2748
2748
|
if (this.type !== h.Bytes) return e.push(this.readFixed64());
|
|
2749
|
-
var t =
|
|
2749
|
+
var t = P(this);
|
|
2750
2750
|
for (e = e || []; this.pos < t; ) e.push(this.readFixed64());
|
|
2751
2751
|
return e;
|
|
2752
2752
|
},
|
|
2753
2753
|
readPackedSFixed64: function(e) {
|
|
2754
2754
|
if (this.type !== h.Bytes) return e.push(this.readSFixed64());
|
|
2755
|
-
var t =
|
|
2755
|
+
var t = P(this);
|
|
2756
2756
|
for (e = e || []; this.pos < t; ) e.push(this.readSFixed64());
|
|
2757
2757
|
return e;
|
|
2758
2758
|
},
|
|
@@ -2780,20 +2780,20 @@ h.prototype = {
|
|
|
2780
2780
|
return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
|
|
2781
2781
|
},
|
|
2782
2782
|
writeFixed32: function(e) {
|
|
2783
|
-
this.realloc(4),
|
|
2783
|
+
this.realloc(4), $(this.buf, e, this.pos), this.pos += 4;
|
|
2784
2784
|
},
|
|
2785
2785
|
writeSFixed32: function(e) {
|
|
2786
|
-
this.realloc(4),
|
|
2786
|
+
this.realloc(4), $(this.buf, e, this.pos), this.pos += 4;
|
|
2787
2787
|
},
|
|
2788
2788
|
writeFixed64: function(e) {
|
|
2789
|
-
this.realloc(8),
|
|
2789
|
+
this.realloc(8), $(this.buf, e & -1, this.pos), $(this.buf, Math.floor(e * x0), this.pos + 4), this.pos += 8;
|
|
2790
2790
|
},
|
|
2791
2791
|
writeSFixed64: function(e) {
|
|
2792
|
-
this.realloc(8),
|
|
2792
|
+
this.realloc(8), $(this.buf, e & -1, this.pos), $(this.buf, Math.floor(e * x0), this.pos + 4), this.pos += 8;
|
|
2793
2793
|
},
|
|
2794
2794
|
writeVarint: function(e) {
|
|
2795
2795
|
if (e = +e || 0, e > 268435455 || e < 0) {
|
|
2796
|
-
|
|
2796
|
+
ye(e, this);
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
2799
|
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)));
|
|
@@ -2807,9 +2807,9 @@ h.prototype = {
|
|
|
2807
2807
|
writeString: function(e) {
|
|
2808
2808
|
e = String(e), this.realloc(e.length * 4), this.pos++;
|
|
2809
2809
|
var t = this.pos;
|
|
2810
|
-
this.pos =
|
|
2810
|
+
this.pos = ze(this.buf, e, this.pos);
|
|
2811
2811
|
var i = this.pos - t;
|
|
2812
|
-
i >= 128 &&
|
|
2812
|
+
i >= 128 && g0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
|
|
2813
2813
|
},
|
|
2814
2814
|
writeFloat: function(e) {
|
|
2815
2815
|
this.realloc(4), J.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
|
|
@@ -2827,37 +2827,37 @@ h.prototype = {
|
|
|
2827
2827
|
var i = this.pos;
|
|
2828
2828
|
e(t, this);
|
|
2829
2829
|
var a = this.pos - i;
|
|
2830
|
-
a >= 128 &&
|
|
2830
|
+
a >= 128 && g0(i, a, this), this.pos = i - 1, this.writeVarint(a), this.pos += a;
|
|
2831
2831
|
},
|
|
2832
2832
|
writeMessage: function(e, t, i) {
|
|
2833
2833
|
this.writeTag(e, h.Bytes), this.writeRawMessage(t, i);
|
|
2834
2834
|
},
|
|
2835
2835
|
writePackedVarint: function(e, t) {
|
|
2836
|
-
t.length && this.writeMessage(e,
|
|
2836
|
+
t.length && this.writeMessage(e, ve, t);
|
|
2837
2837
|
},
|
|
2838
2838
|
writePackedSVarint: function(e, t) {
|
|
2839
|
-
t.length && this.writeMessage(e,
|
|
2839
|
+
t.length && this.writeMessage(e, Fe, t);
|
|
2840
2840
|
},
|
|
2841
2841
|
writePackedBoolean: function(e, t) {
|
|
2842
|
-
t.length && this.writeMessage(e,
|
|
2842
|
+
t.length && this.writeMessage(e, ke, t);
|
|
2843
2843
|
},
|
|
2844
2844
|
writePackedFloat: function(e, t) {
|
|
2845
|
-
t.length && this.writeMessage(e,
|
|
2845
|
+
t.length && this.writeMessage(e, _e, t);
|
|
2846
2846
|
},
|
|
2847
2847
|
writePackedDouble: function(e, t) {
|
|
2848
|
-
t.length && this.writeMessage(e,
|
|
2848
|
+
t.length && this.writeMessage(e, we, t);
|
|
2849
2849
|
},
|
|
2850
2850
|
writePackedFixed32: function(e, t) {
|
|
2851
|
-
t.length && this.writeMessage(e,
|
|
2851
|
+
t.length && this.writeMessage(e, Me, t);
|
|
2852
2852
|
},
|
|
2853
2853
|
writePackedSFixed32: function(e, t) {
|
|
2854
|
-
t.length && this.writeMessage(e,
|
|
2854
|
+
t.length && this.writeMessage(e, Le, t);
|
|
2855
2855
|
},
|
|
2856
2856
|
writePackedFixed64: function(e, t) {
|
|
2857
|
-
t.length && this.writeMessage(e,
|
|
2857
|
+
t.length && this.writeMessage(e, Pe, t);
|
|
2858
2858
|
},
|
|
2859
2859
|
writePackedSFixed64: function(e, t) {
|
|
2860
|
-
t.length && this.writeMessage(e,
|
|
2860
|
+
t.length && this.writeMessage(e, Be, t);
|
|
2861
2861
|
},
|
|
2862
2862
|
writeBytesField: function(e, t) {
|
|
2863
2863
|
this.writeTag(e, h.Bytes), this.writeBytes(t);
|
|
@@ -2893,72 +2893,72 @@ h.prototype = {
|
|
|
2893
2893
|
this.writeVarintField(e, !!t);
|
|
2894
2894
|
}
|
|
2895
2895
|
};
|
|
2896
|
-
function
|
|
2896
|
+
function me(e, t, i) {
|
|
2897
2897
|
var a = i.buf, n, o;
|
|
2898
|
-
if (o = a[i.pos++], n = (o & 112) >> 4, o < 128 || (o = a[i.pos++], n |= (o & 127) << 3, o < 128) || (o = a[i.pos++], n |= (o & 127) << 10, o < 128) || (o = a[i.pos++], n |= (o & 127) << 17, o < 128) || (o = a[i.pos++], n |= (o & 127) << 24, o < 128) || (o = a[i.pos++], n |= (o & 1) << 31, o < 128)) return
|
|
2898
|
+
if (o = a[i.pos++], n = (o & 112) >> 4, o < 128 || (o = a[i.pos++], n |= (o & 127) << 3, o < 128) || (o = a[i.pos++], n |= (o & 127) << 10, o < 128) || (o = a[i.pos++], n |= (o & 127) << 17, o < 128) || (o = a[i.pos++], n |= (o & 127) << 24, o < 128) || (o = a[i.pos++], n |= (o & 1) << 31, o < 128)) return H(e, n, t);
|
|
2899
2899
|
throw new Error("Expected varint not more than 10 bytes");
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2901
|
+
function P(e) {
|
|
2902
2902
|
return e.type === h.Bytes ? e.readVarint() + e.pos : e.pos + 1;
|
|
2903
2903
|
}
|
|
2904
|
-
function
|
|
2904
|
+
function H(e, t, i) {
|
|
2905
2905
|
return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
|
|
2906
2906
|
}
|
|
2907
|
-
function
|
|
2907
|
+
function ye(e, t) {
|
|
2908
2908
|
var i, a;
|
|
2909
2909
|
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)
|
|
2910
2910
|
throw new Error("Given varint doesn't fit into 10 bytes");
|
|
2911
|
-
t.realloc(10),
|
|
2911
|
+
t.realloc(10), xe(i, a, t), ge(a, t);
|
|
2912
2912
|
}
|
|
2913
|
-
function
|
|
2913
|
+
function xe(e, t, i) {
|
|
2914
2914
|
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;
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2916
|
+
function ge(e, t) {
|
|
2917
2917
|
var i = (e & 7) << 4;
|
|
2918
2918
|
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)))));
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function g0(e, t, i) {
|
|
2921
2921
|
var a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
|
|
2922
2922
|
i.realloc(a);
|
|
2923
2923
|
for (var n = i.pos - 1; n >= e; n--) i.buf[n + a] = i.buf[n];
|
|
2924
2924
|
}
|
|
2925
|
-
function
|
|
2925
|
+
function ve(e, t) {
|
|
2926
2926
|
for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2928
|
+
function Fe(e, t) {
|
|
2929
2929
|
for (var i = 0; i < e.length; i++) t.writeSVarint(e[i]);
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function _e(e, t) {
|
|
2932
2932
|
for (var i = 0; i < e.length; i++) t.writeFloat(e[i]);
|
|
2933
2933
|
}
|
|
2934
|
-
function
|
|
2934
|
+
function we(e, t) {
|
|
2935
2935
|
for (var i = 0; i < e.length; i++) t.writeDouble(e[i]);
|
|
2936
2936
|
}
|
|
2937
|
-
function
|
|
2937
|
+
function ke(e, t) {
|
|
2938
2938
|
for (var i = 0; i < e.length; i++) t.writeBoolean(e[i]);
|
|
2939
2939
|
}
|
|
2940
|
-
function
|
|
2940
|
+
function Me(e, t) {
|
|
2941
2941
|
for (var i = 0; i < e.length; i++) t.writeFixed32(e[i]);
|
|
2942
2942
|
}
|
|
2943
|
-
function
|
|
2943
|
+
function Le(e, t) {
|
|
2944
2944
|
for (var i = 0; i < e.length; i++) t.writeSFixed32(e[i]);
|
|
2945
2945
|
}
|
|
2946
|
-
function
|
|
2946
|
+
function Pe(e, t) {
|
|
2947
2947
|
for (var i = 0; i < e.length; i++) t.writeFixed64(e[i]);
|
|
2948
2948
|
}
|
|
2949
|
-
function
|
|
2949
|
+
function Be(e, t) {
|
|
2950
2950
|
for (var i = 0; i < e.length; i++) t.writeSFixed64(e[i]);
|
|
2951
2951
|
}
|
|
2952
2952
|
function X(e, t) {
|
|
2953
2953
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + e[t + 3] * 16777216;
|
|
2954
2954
|
}
|
|
2955
|
-
function
|
|
2955
|
+
function $(e, t, i) {
|
|
2956
2956
|
e[i] = t, e[i + 1] = t >>> 8, e[i + 2] = t >>> 16, e[i + 3] = t >>> 24;
|
|
2957
2957
|
}
|
|
2958
|
-
function
|
|
2958
|
+
function v0(e, t) {
|
|
2959
2959
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
|
|
2960
2960
|
}
|
|
2961
|
-
function
|
|
2961
|
+
function Se(e, t, i) {
|
|
2962
2962
|
for (var a = "", n = t; n < i; ) {
|
|
2963
2963
|
var o = e[n], r = null, d = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
2964
2964
|
if (n + d > i) break;
|
|
@@ -2967,10 +2967,10 @@ function Pe(e, t, i) {
|
|
|
2967
2967
|
}
|
|
2968
2968
|
return a;
|
|
2969
2969
|
}
|
|
2970
|
-
function
|
|
2971
|
-
return
|
|
2970
|
+
function Ve(e, t, i) {
|
|
2971
|
+
return k0.decode(e.subarray(t, i));
|
|
2972
2972
|
}
|
|
2973
|
-
function
|
|
2973
|
+
function ze(e, t, i) {
|
|
2974
2974
|
for (var a = 0, n, o; a < t.length; a++) {
|
|
2975
2975
|
if (n = t.charCodeAt(a), n > 55295 && n < 57344)
|
|
2976
2976
|
if (o)
|
|
@@ -2988,7 +2988,7 @@ function Se(e, t, i) {
|
|
|
2988
2988
|
}
|
|
2989
2989
|
return i;
|
|
2990
2990
|
}
|
|
2991
|
-
const
|
|
2991
|
+
const Te = /* @__PURE__ */ F0(he), Xe = (e) => {
|
|
2992
2992
|
var a, n;
|
|
2993
2993
|
if (!e || !e.data)
|
|
2994
2994
|
return {};
|
|
@@ -3000,22 +3000,22 @@ const Ve = /* @__PURE__ */ v0(de), Ze = (e) => {
|
|
|
3000
3000
|
}
|
|
3001
3001
|
return t;
|
|
3002
3002
|
};
|
|
3003
|
-
function
|
|
3003
|
+
function Ce(e, t = 0) {
|
|
3004
3004
|
let i = null;
|
|
3005
3005
|
return (...a) => {
|
|
3006
3006
|
i && clearTimeout(i), i = setTimeout(() => e(...a), t);
|
|
3007
3007
|
};
|
|
3008
3008
|
}
|
|
3009
|
-
const
|
|
3009
|
+
const De = "#828a9e", Ne = "32px", Ie = { class: "kong-ui-public-analytics-geo-map" }, Oe = {
|
|
3010
3010
|
key: 0,
|
|
3011
3011
|
class: "no-location-overlay"
|
|
3012
|
-
},
|
|
3012
|
+
}, Ue = { class: "no-location-overlay-title" }, Re = { class: "no-location-overlay-description" }, Ee = ["id"], Ae = {
|
|
3013
3013
|
key: 1,
|
|
3014
3014
|
class: "legend"
|
|
3015
|
-
},
|
|
3015
|
+
}, He = {
|
|
3016
3016
|
key: 0,
|
|
3017
3017
|
class: "legend-title"
|
|
3018
|
-
},
|
|
3018
|
+
}, $e = { class: "legend-text" }, Ge = /* @__PURE__ */ V0({
|
|
3019
3019
|
__name: "AnalyticsGeoMap",
|
|
3020
3020
|
props: {
|
|
3021
3021
|
countryMetrics: {},
|
|
@@ -3030,7 +3030,7 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3030
3030
|
},
|
|
3031
3031
|
emits: ["boundsChange"],
|
|
3032
3032
|
setup(e, { emit: t }) {
|
|
3033
|
-
const i = import("./countries-simple-geo-BFUDnSiE.js").then((c) => c.default), a = t, { i18n: n } =
|
|
3033
|
+
const i = import("./countries-simple-geo-BFUDnSiE.js").then((c) => c.default), a = t, { i18n: n } = J0.useI18n(), o = z0(), r = p0(), d = p0(null), p = L(() => Object.keys(e.countryMetrics).length === 0 && !e.fitToCountry), s = L(() => ({
|
|
3034
3034
|
"fill-color": [
|
|
3035
3035
|
"match",
|
|
3036
3036
|
[
|
|
@@ -3051,38 +3051,45 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3051
3051
|
// default color if no match
|
|
3052
3052
|
],
|
|
3053
3053
|
"fill-opacity": 0.7
|
|
3054
|
-
})), l =
|
|
3055
|
-
const f = Math.log(c),
|
|
3056
|
-
return f >= u.value + 4 *
|
|
3057
|
-
},
|
|
3058
|
-
const f = (y.value - u.value) / 5,
|
|
3054
|
+
})), l = L(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), u = L(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), y = L(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), g = (c) => {
|
|
3055
|
+
const f = Math.log(c), x = (y.value - u.value) / 5;
|
|
3056
|
+
return f >= u.value + 4 * x ? "#00819d" : f >= u.value + 3 * x ? "#00abd2" : f >= u.value + 2 * x ? "#00c8f4" : f >= u.value + 1 * x ? "#67e3ff" : "#b3f1ff";
|
|
3057
|
+
}, T = L(() => e.metric && n.t(`metrics.${e.metric}`) || ""), I = L(() => {
|
|
3058
|
+
const f = (y.value - u.value) / 5, m = [
|
|
3059
3059
|
u.value + 4 * f,
|
|
3060
3060
|
u.value + 3 * f,
|
|
3061
3061
|
u.value + 2 * f,
|
|
3062
3062
|
u.value + 1 * f,
|
|
3063
3063
|
u.value
|
|
3064
3064
|
];
|
|
3065
|
-
return
|
|
3066
|
-
const
|
|
3067
|
-
let
|
|
3068
|
-
return w === 0 ?
|
|
3069
|
-
color: g(
|
|
3070
|
-
range:
|
|
3065
|
+
return m.map((x, w) => {
|
|
3066
|
+
const B = w === 0 ? y.value : m[w - 1], F = Math.exp(x), M = Math.exp(B);
|
|
3067
|
+
let k = "";
|
|
3068
|
+
return w === 0 ? k = `> ${q(F)}` : w === m.length - 1 ? k = `< ${q(M)}` : k = `${q(F)} - ${q(M)}`, {
|
|
3069
|
+
color: g(F),
|
|
3070
|
+
range: k
|
|
3071
3071
|
};
|
|
3072
3072
|
});
|
|
3073
|
-
}),
|
|
3074
|
-
|
|
3075
|
-
return
|
|
3073
|
+
}), M0 = L(() => {
|
|
3074
|
+
var c;
|
|
3075
|
+
return !((c = e.metric) != null && c.includes("latency"));
|
|
3076
|
+
}), q = (c) => {
|
|
3077
|
+
var m;
|
|
3078
|
+
const f = Math.trunc(c);
|
|
3079
|
+
return M0.value ? Q0(f, { capital: !0 }) : new Intl.NumberFormat(((m = document == null ? void 0 : document.documentElement) == null ? void 0 : m.lang) || "en-US").format(f);
|
|
3076
3080
|
}, c0 = (c) => {
|
|
3077
|
-
|
|
3081
|
+
const f = c.flat(1);
|
|
3082
|
+
return Array.isArray(f[0]) && Array.isArray(f[0][0]) ? c0(f) : f;
|
|
3083
|
+
}, d0 = (c) => {
|
|
3084
|
+
var m, x, w, B, F, M, k;
|
|
3078
3085
|
if (c === "RU") {
|
|
3079
|
-
(
|
|
3086
|
+
(m = r.value) == null || m.fitBounds([
|
|
3080
3087
|
[20, 40],
|
|
3081
3088
|
[180, 80]
|
|
3082
3089
|
]);
|
|
3083
3090
|
return;
|
|
3084
3091
|
} else if (c === "US") {
|
|
3085
|
-
(
|
|
3092
|
+
(x = r.value) == null || x.fitBounds([
|
|
3086
3093
|
[-130, 20],
|
|
3087
3094
|
[-60, 50]
|
|
3088
3095
|
]);
|
|
@@ -3094,26 +3101,26 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3094
3101
|
]);
|
|
3095
3102
|
return;
|
|
3096
3103
|
} else if (c === "NO") {
|
|
3097
|
-
(
|
|
3104
|
+
(B = r.value) == null || B.fitBounds([
|
|
3098
3105
|
[4, 57],
|
|
3099
3106
|
[32, 71]
|
|
3100
3107
|
]);
|
|
3101
3108
|
return;
|
|
3102
3109
|
}
|
|
3103
|
-
const f = (
|
|
3104
|
-
var
|
|
3105
|
-
return (
|
|
3110
|
+
const f = (F = d.value) == null ? void 0 : F.features.find((_) => {
|
|
3111
|
+
var S, V, z, D, N;
|
|
3112
|
+
return (S = _.properties) != null && S.ISO_A2 ? ((V = _.properties) == null ? void 0 : V.ISO_A2) === c : ((z = _.properties) == null ? void 0 : z.iso_a2) === "-99" ? ((D = _.properties) == null ? void 0 : D.iso_a2_eh) === c : ((N = _.properties) == null ? void 0 : N.iso_a2) === c;
|
|
3106
3113
|
});
|
|
3107
3114
|
if (f) {
|
|
3108
|
-
const _ = (
|
|
3115
|
+
const _ = (M = f.geometry) == null ? void 0 : M.coordinates;
|
|
3109
3116
|
if (!_) return;
|
|
3110
|
-
const
|
|
3111
|
-
(
|
|
3112
|
-
[j,
|
|
3113
|
-
[W,
|
|
3117
|
+
const S = c0(_), V = S.map((O) => O[1]), z = S.map((O) => O[0]), D = Math.min(...V), N = Math.max(...V), j = Math.min(...z), W = Math.max(...z);
|
|
3118
|
+
(k = r.value) == null || k.fitBounds([
|
|
3119
|
+
[j, D],
|
|
3120
|
+
[W, N]
|
|
3114
3121
|
]);
|
|
3115
3122
|
}
|
|
3116
|
-
},
|
|
3123
|
+
}, C = L(() => {
|
|
3117
3124
|
const c = {
|
|
3118
3125
|
container: o,
|
|
3119
3126
|
style: { version: 8, sources: {}, layers: [] },
|
|
@@ -3132,32 +3139,32 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3132
3139
|
}
|
|
3133
3140
|
};
|
|
3134
3141
|
return e.bounds && (c.bounds = e.bounds), c;
|
|
3135
|
-
}),
|
|
3142
|
+
}), L0 = Ce(() => {
|
|
3136
3143
|
if (!r.value) return;
|
|
3137
|
-
const c = r.value.getBounds(), f = c.getSouthWest(),
|
|
3144
|
+
const c = r.value.getBounds(), f = c.getSouthWest(), m = c.getNorthEast();
|
|
3138
3145
|
a("boundsChange", [
|
|
3139
3146
|
[f.lng, f.lat],
|
|
3140
|
-
[
|
|
3147
|
+
[m.lng, m.lat]
|
|
3141
3148
|
]);
|
|
3142
3149
|
}, 300);
|
|
3143
|
-
return
|
|
3144
|
-
var c, f,
|
|
3150
|
+
return T0(async () => {
|
|
3151
|
+
var c, f, m;
|
|
3145
3152
|
try {
|
|
3146
|
-
const
|
|
3147
|
-
d.value =
|
|
3148
|
-
var
|
|
3149
|
-
(
|
|
3153
|
+
const x = await i, w = await fetch(x), B = new Uint8Array(await w.arrayBuffer()), F = fe(new Te(B));
|
|
3154
|
+
d.value = F, r.value = new U0(C.value), r.value.on("load", () => {
|
|
3155
|
+
var k, _, S, V, z, D, N;
|
|
3156
|
+
(k = r.value) == null || k.addSource("countries", {
|
|
3150
3157
|
type: "geojson",
|
|
3151
|
-
data:
|
|
3158
|
+
data: F
|
|
3152
3159
|
}), (_ = r.value) == null || _.addLayer({
|
|
3153
3160
|
id: "countries-layer",
|
|
3154
3161
|
type: "fill",
|
|
3155
3162
|
source: "countries",
|
|
3156
3163
|
paint: s.value
|
|
3157
|
-
}), (
|
|
3164
|
+
}), (S = r.value) == null || S.addSource("lakes", {
|
|
3158
3165
|
type: "geojson",
|
|
3159
|
-
data:
|
|
3160
|
-
}), (
|
|
3166
|
+
data: ee
|
|
3167
|
+
}), (V = r.value) == null || V.addLayer({
|
|
3161
3168
|
id: "lakes-layer",
|
|
3162
3169
|
type: "fill",
|
|
3163
3170
|
source: "lakes",
|
|
@@ -3165,29 +3172,29 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3165
3172
|
"fill-color": "#FFFFFF"
|
|
3166
3173
|
}
|
|
3167
3174
|
});
|
|
3168
|
-
const
|
|
3175
|
+
const M = new R0({
|
|
3169
3176
|
closeButton: !1,
|
|
3170
3177
|
closeOnClick: !1
|
|
3171
3178
|
});
|
|
3172
|
-
(
|
|
3179
|
+
(z = r.value) == null || z.on("mousemove", "countries-layer", (j) => {
|
|
3173
3180
|
var O;
|
|
3174
3181
|
const W = (O = j.features) == null ? void 0 : O[0];
|
|
3175
3182
|
if (W) {
|
|
3176
|
-
const { iso_a2:
|
|
3183
|
+
const { iso_a2: f0, iso_a2_eh: P0, ISO_A2: B0, admin: h0 } = W.properties, S0 = B0 ?? f0 === "-99" ? P0 : f0, t0 = e.countryMetrics[S0];
|
|
3177
3184
|
if (t0 !== void 0) {
|
|
3178
|
-
|
|
3179
|
-
|
|
3185
|
+
let i0;
|
|
3186
|
+
e.showTooltipValue ? i0 = `<strong data-testid="geo-map-tooltip">${h0}</strong>: ${q(t0)} ${n.t(`metricUnits.${e.metricUnit}`, { plural: t0 > 1 ? "s" : "" })}` : i0 = `<strong data-testid="geo-map-tooltip">${h0}</strong>`, M.setLngLat(j.lngLat).setHTML(i0).addTo(r.value);
|
|
3180
3187
|
} else
|
|
3181
|
-
|
|
3188
|
+
M.remove();
|
|
3182
3189
|
}
|
|
3183
|
-
}), (
|
|
3184
|
-
|
|
3185
|
-
}), (
|
|
3186
|
-
}), (c = r.value) == null || c.dragRotate.disable(), (f = r.value) == null || f.keyboard.disable(), (
|
|
3187
|
-
} catch (
|
|
3188
|
-
console.error(
|
|
3190
|
+
}), (D = r.value) == null || D.on("mouseleave", "countries-layer", () => {
|
|
3191
|
+
M.remove();
|
|
3192
|
+
}), (N = r.value) == null || N.on("move", L0), e.fitToCountry && d0(e.fitToCountry);
|
|
3193
|
+
}), (c = r.value) == null || c.dragRotate.disable(), (f = r.value) == null || f.keyboard.disable(), (m = r.value) == null || m.touchZoomRotate.disableRotation();
|
|
3194
|
+
} catch (x) {
|
|
3195
|
+
console.error(x);
|
|
3189
3196
|
}
|
|
3190
|
-
}),
|
|
3197
|
+
}), n0(() => e.countryMetrics, () => {
|
|
3191
3198
|
var c;
|
|
3192
3199
|
r.value && r.value.isStyleLoaded() && (r.value.getLayer("countries-layer") && r.value.removeLayer("countries-layer"), r.value.addLayer({
|
|
3193
3200
|
id: "countries-layer",
|
|
@@ -3202,62 +3209,62 @@ const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-m
|
|
|
3202
3209
|
"fill-color": "#FFFFFF"
|
|
3203
3210
|
}
|
|
3204
3211
|
}));
|
|
3205
|
-
}),
|
|
3206
|
-
var f,
|
|
3207
|
-
r.value && c ?
|
|
3212
|
+
}), n0(() => e.fitToCountry, (c) => {
|
|
3213
|
+
var f, m, x;
|
|
3214
|
+
r.value && c ? d0(c) : !C.value.center && !C.value.zoom ? (f = r.value) == null || f.fitBounds([
|
|
3208
3215
|
[-180, -90],
|
|
3209
3216
|
[180, 90]
|
|
3210
|
-
]) : (
|
|
3211
|
-
}),
|
|
3217
|
+
]) : (C.value.zoom && ((m = r.value) == null || m.setZoom(C.value.zoom)), C.value.center && ((x = r.value) == null || x.flyTo({ center: C.value.center })));
|
|
3218
|
+
}), n0(() => e.bounds, (c, f) => {
|
|
3212
3219
|
if (!c) return;
|
|
3213
|
-
const
|
|
3214
|
-
!(
|
|
3215
|
-
}), (c, f) => (
|
|
3216
|
-
p.value ? (
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
color:
|
|
3220
|
-
size:
|
|
3220
|
+
const m = c == null ? void 0 : c.flat(), x = f == null ? void 0 : f.flat();
|
|
3221
|
+
!(m && x && m.length === x.length && m.every((B, F) => Math.round(B * 100) / 100 === Math.round(x[F] * 100) / 100)) && r.value && r.value.fitBounds(c);
|
|
3222
|
+
}), (c, f) => (R(), U("div", Ie, [
|
|
3223
|
+
p.value ? (R(), U("div", Oe, [
|
|
3224
|
+
a0(c.$slots, "no-location-icon", {}, () => [
|
|
3225
|
+
C0(A(H0), {
|
|
3226
|
+
color: A(De),
|
|
3227
|
+
size: A(Ne)
|
|
3221
3228
|
}, null, 8, ["color", "size"])
|
|
3222
3229
|
], !0),
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3230
|
+
E("div", Ue, [
|
|
3231
|
+
a0(c.$slots, "no-location-title", {}, () => [
|
|
3232
|
+
D0(Z(A(n).t("no_location_data")), 1)
|
|
3226
3233
|
], !0)
|
|
3227
3234
|
]),
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3235
|
+
E("div", Re, [
|
|
3236
|
+
a0(c.$slots, "no-location-description", {}, () => [
|
|
3237
|
+
E("p", null, Z(A(n).t("no_location_data_description")), 1)
|
|
3231
3238
|
], !0)
|
|
3232
3239
|
])
|
|
3233
|
-
])) :
|
|
3234
|
-
|
|
3235
|
-
id:
|
|
3240
|
+
])) : r0("", !0),
|
|
3241
|
+
E("div", {
|
|
3242
|
+
id: A(o),
|
|
3236
3243
|
class: "analytics-geo-map-container"
|
|
3237
|
-
}, null, 8,
|
|
3238
|
-
l.value ? (
|
|
3239
|
-
c.metric ? (
|
|
3240
|
-
(
|
|
3241
|
-
key:
|
|
3244
|
+
}, null, 8, Ee),
|
|
3245
|
+
l.value ? (R(), U("div", Ae, [
|
|
3246
|
+
c.metric ? (R(), U("div", He, Z(T.value), 1)) : r0("", !0),
|
|
3247
|
+
(R(!0), U(N0, null, I0(I.value, (m, x) => (R(), U("div", {
|
|
3248
|
+
key: x,
|
|
3242
3249
|
class: "legend-item"
|
|
3243
3250
|
}, [
|
|
3244
|
-
|
|
3251
|
+
E("span", {
|
|
3245
3252
|
class: "legend-color",
|
|
3246
|
-
style: O0({ backgroundColor:
|
|
3253
|
+
style: O0({ backgroundColor: m.color })
|
|
3247
3254
|
}, null, 4),
|
|
3248
|
-
|
|
3255
|
+
E("span", $e, Z(m.range), 1)
|
|
3249
3256
|
]))), 128))
|
|
3250
|
-
])) :
|
|
3257
|
+
])) : r0("", !0)
|
|
3251
3258
|
]));
|
|
3252
3259
|
}
|
|
3253
|
-
}),
|
|
3260
|
+
}), qe = (e, t) => {
|
|
3254
3261
|
const i = e.__vccOpts || e;
|
|
3255
3262
|
for (const [a, n] of t)
|
|
3256
3263
|
i[a] = n;
|
|
3257
3264
|
return i;
|
|
3258
|
-
},
|
|
3265
|
+
}, Qe = /* @__PURE__ */ qe(Ge, [["__scopeId", "data-v-0fc07407"]]);
|
|
3259
3266
|
export {
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3267
|
+
Qe as AnalyticsGeoMap,
|
|
3268
|
+
Ce as debounce,
|
|
3269
|
+
Xe as exploreResultToCountryMetrics
|
|
3263
3270
|
};
|