@kong-ui-public/analytics-geo-map 1.4.5-pr.2539.c966138ed.0 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,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,27 +33,27 @@ 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
58
|
function F0(e) {
|
|
59
59
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -85,8 +85,8 @@ var _0 = { exports: {} };
|
|
|
85
85
|
p.addCommas = t, e.exports = p;
|
|
86
86
|
})();
|
|
87
87
|
})(_0);
|
|
88
|
-
var
|
|
89
|
-
const
|
|
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 X0 = /* @__PURE__ */ F0(J0), Q0 = "FeatureCollection", Y0 = [
|
|
|
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,36 +2531,36 @@ var ee = ie, Q, G, v, Y, e0, te = [
|
|
|
2531
2531
|
"MultiPolygon",
|
|
2532
2532
|
"GeometryCollection"
|
|
2533
2533
|
];
|
|
2534
|
-
function
|
|
2534
|
+
function ne(e) {
|
|
2535
2535
|
Y = 2, e0 = Math.pow(10, 6), v = null, Q = [], G = [];
|
|
2536
|
-
var t = e.readFields(
|
|
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
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
2550
|
function s0(e, t) {
|
|
2551
|
-
return t.type = "Point", e.readMessage(
|
|
2552
|
-
}
|
|
2553
|
-
function ae(e, t, i) {
|
|
2554
|
-
e === 1 ? t.features.push(w0(i, {})) : e === 13 ? G.push(l0(i)) : e === 15 && b(i, t);
|
|
2551
|
+
return t.type = "Point", e.readMessage(le, t);
|
|
2555
2552
|
}
|
|
2556
2553
|
function oe(e, t, i) {
|
|
2557
|
-
e === 1 ? t.
|
|
2554
|
+
e === 1 ? t.features.push(w0(i, {})) : e === 13 ? G.push(l0(i)) : e === 15 && b(i, t);
|
|
2558
2555
|
}
|
|
2559
2556
|
function se(e, t, i) {
|
|
2560
|
-
e === 1 ? t.
|
|
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);
|
|
2561
2558
|
}
|
|
2562
2559
|
function le(e, t, i) {
|
|
2563
|
-
|
|
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);
|
|
2561
|
+
}
|
|
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
2564
|
}
|
|
2565
2565
|
function l0(e) {
|
|
2566
2566
|
for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
|
|
@@ -2573,7 +2573,7 @@ function b(e, t) {
|
|
|
2573
2573
|
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[Q[e.readVarint()]] = G[e.readVarint()];
|
|
2574
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
|
}
|
|
@@ -2596,7 +2596,7 @@ function y0(e, t) {
|
|
|
2596
2596
|
for (var a = [], n = 0; n < v.length; n++) a.push(K(e, i, v[n], t));
|
|
2597
2597
|
return v = null, a;
|
|
2598
2598
|
}
|
|
2599
|
-
function
|
|
2599
|
+
function de(e) {
|
|
2600
2600
|
var t = e.readVarint() + e.pos;
|
|
2601
2601
|
if (!v) return [[K(e, t, null, !0)]];
|
|
2602
2602
|
for (var i = [], a = 1, n = 0; n < v[0]; n++) {
|
|
@@ -2605,7 +2605,7 @@ function ce(e) {
|
|
|
2605
2605
|
}
|
|
2606
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];
|
|
@@ -2630,7 +2630,7 @@ u0.write = function(e, t, i, a, n, o) {
|
|
|
2630
2630
|
;
|
|
2631
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 o0 = 65536 * 65536, x0 = 1 / o0,
|
|
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;
|
|
@@ -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
|
},
|
|
@@ -2793,7 +2793,7 @@ h.prototype = {
|
|
|
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,7 +2807,7 @@ 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
2812
|
i >= 128 && g0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
|
|
2813
2813
|
},
|
|
@@ -2833,28 +2833,28 @@ h.prototype = {
|
|
|
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
2860
|
t.length && this.writeMessage(e, Be, t);
|
|
@@ -2893,27 +2893,27 @@ 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
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
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
|
}
|
|
@@ -2922,28 +2922,28 @@ function g0(e, t, i) {
|
|
|
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
2949
|
function Be(e, t) {
|
|
@@ -2958,7 +2958,7 @@ function $(e, t, i) {
|
|
|
2958
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
|
|
2970
|
+
function Ve(e, t, i) {
|
|
2971
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 Ve(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 ze = /* @__PURE__ */ F0(fe), Je = (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: {},
|
|
@@ -3026,12 +3026,11 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3026
3026
|
fitToCountry: { default: () => {
|
|
3027
3027
|
} },
|
|
3028
3028
|
bounds: { default: () => {
|
|
3029
|
-
} }
|
|
3030
|
-
truncatedMetric: { type: Boolean, default: !0 }
|
|
3029
|
+
} }
|
|
3031
3030
|
},
|
|
3032
3031
|
emits: ["boundsChange"],
|
|
3033
3032
|
setup(e, { emit: t }) {
|
|
3034
|
-
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(() => ({
|
|
3035
3034
|
"fill-color": [
|
|
3036
3035
|
"match",
|
|
3037
3036
|
[
|
|
@@ -3052,10 +3051,10 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3052
3051
|
// default color if no match
|
|
3053
3052
|
],
|
|
3054
3053
|
"fill-opacity": 0.7
|
|
3055
|
-
})), l =
|
|
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) => {
|
|
3056
3055
|
const f = Math.log(c), x = (y.value - u.value) / 5;
|
|
3057
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";
|
|
3058
|
-
}, T =
|
|
3057
|
+
}, T = L(() => e.metric && n.t(`metrics.${e.metric}`) || ""), I = L(() => {
|
|
3059
3058
|
const f = (y.value - u.value) / 5, m = [
|
|
3060
3059
|
u.value + 4 * f,
|
|
3061
3060
|
u.value + 3 * f,
|
|
@@ -3071,10 +3070,13 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3071
3070
|
range: k
|
|
3072
3071
|
};
|
|
3073
3072
|
});
|
|
3073
|
+
}), M0 = L(() => {
|
|
3074
|
+
var c;
|
|
3075
|
+
return !((c = e.metric) != null && c.includes("latency"));
|
|
3074
3076
|
}), q = (c) => {
|
|
3075
3077
|
var m;
|
|
3076
3078
|
const f = Math.trunc(c);
|
|
3077
|
-
return
|
|
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);
|
|
3078
3080
|
}, c0 = (c) => {
|
|
3079
3081
|
const f = c.flat(1);
|
|
3080
3082
|
return Array.isArray(f[0]) && Array.isArray(f[0][0]) ? c0(f) : f;
|
|
@@ -3106,19 +3108,19 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3106
3108
|
return;
|
|
3107
3109
|
}
|
|
3108
3110
|
const f = (F = d.value) == null ? void 0 : F.features.find((_) => {
|
|
3109
|
-
var
|
|
3110
|
-
return (
|
|
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;
|
|
3111
3113
|
});
|
|
3112
3114
|
if (f) {
|
|
3113
3115
|
const _ = (M = f.geometry) == null ? void 0 : M.coordinates;
|
|
3114
3116
|
if (!_) return;
|
|
3115
|
-
const
|
|
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);
|
|
3116
3118
|
(k = r.value) == null || k.fitBounds([
|
|
3117
3119
|
[j, D],
|
|
3118
3120
|
[W, N]
|
|
3119
3121
|
]);
|
|
3120
3122
|
}
|
|
3121
|
-
}, C =
|
|
3123
|
+
}, C = L(() => {
|
|
3122
3124
|
const c = {
|
|
3123
3125
|
container: o,
|
|
3124
3126
|
style: { version: 8, sources: {}, layers: [] },
|
|
@@ -3137,7 +3139,7 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3137
3139
|
}
|
|
3138
3140
|
};
|
|
3139
3141
|
return e.bounds && (c.bounds = e.bounds), c;
|
|
3140
|
-
}),
|
|
3142
|
+
}), L0 = Ce(() => {
|
|
3141
3143
|
if (!r.value) return;
|
|
3142
3144
|
const c = r.value.getBounds(), f = c.getSouthWest(), m = c.getNorthEast();
|
|
3143
3145
|
a("boundsChange", [
|
|
@@ -3145,12 +3147,12 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3145
3147
|
[m.lng, m.lat]
|
|
3146
3148
|
]);
|
|
3147
3149
|
}, 300);
|
|
3148
|
-
return
|
|
3150
|
+
return T0(async () => {
|
|
3149
3151
|
var c, f, m;
|
|
3150
3152
|
try {
|
|
3151
|
-
const x = await i, w = await fetch(x), B = new Uint8Array(await w.arrayBuffer()), F =
|
|
3152
|
-
d.value = F, r.value = new
|
|
3153
|
-
var k, _,
|
|
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;
|
|
3154
3156
|
(k = r.value) == null || k.addSource("countries", {
|
|
3155
3157
|
type: "geojson",
|
|
3156
3158
|
data: F
|
|
@@ -3159,10 +3161,10 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3159
3161
|
type: "fill",
|
|
3160
3162
|
source: "countries",
|
|
3161
3163
|
paint: s.value
|
|
3162
|
-
}), (
|
|
3164
|
+
}), (S = r.value) == null || S.addSource("lakes", {
|
|
3163
3165
|
type: "geojson",
|
|
3164
|
-
data:
|
|
3165
|
-
}), (
|
|
3166
|
+
data: ee
|
|
3167
|
+
}), (V = r.value) == null || V.addLayer({
|
|
3166
3168
|
id: "lakes-layer",
|
|
3167
3169
|
type: "fill",
|
|
3168
3170
|
source: "lakes",
|
|
@@ -3170,15 +3172,15 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3170
3172
|
"fill-color": "#FFFFFF"
|
|
3171
3173
|
}
|
|
3172
3174
|
});
|
|
3173
|
-
const M = new
|
|
3175
|
+
const M = new R0({
|
|
3174
3176
|
closeButton: !1,
|
|
3175
3177
|
closeOnClick: !1
|
|
3176
3178
|
});
|
|
3177
|
-
(
|
|
3179
|
+
(z = r.value) == null || z.on("mousemove", "countries-layer", (j) => {
|
|
3178
3180
|
var O;
|
|
3179
3181
|
const W = (O = j.features) == null ? void 0 : O[0];
|
|
3180
3182
|
if (W) {
|
|
3181
|
-
const { iso_a2: f0, iso_a2_eh:
|
|
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];
|
|
3182
3184
|
if (t0 !== void 0) {
|
|
3183
3185
|
let i0;
|
|
3184
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);
|
|
@@ -3187,7 +3189,7 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3187
3189
|
}
|
|
3188
3190
|
}), (D = r.value) == null || D.on("mouseleave", "countries-layer", () => {
|
|
3189
3191
|
M.remove();
|
|
3190
|
-
}), (N = r.value) == null || N.on("move",
|
|
3192
|
+
}), (N = r.value) == null || N.on("move", L0), e.fitToCountry && d0(e.fitToCountry);
|
|
3191
3193
|
}), (c = r.value) == null || c.dragRotate.disable(), (f = r.value) == null || f.keyboard.disable(), (m = r.value) == null || m.touchZoomRotate.disableRotation();
|
|
3192
3194
|
} catch (x) {
|
|
3193
3195
|
console.error(x);
|
|
@@ -3217,20 +3219,20 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3217
3219
|
if (!c) return;
|
|
3218
3220
|
const m = c == null ? void 0 : c.flat(), x = f == null ? void 0 : f.flat();
|
|
3219
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);
|
|
3220
|
-
}), (c, f) => (R(), U("div",
|
|
3221
|
-
p.value ? (R(), U("div",
|
|
3222
|
+
}), (c, f) => (R(), U("div", Ie, [
|
|
3223
|
+
p.value ? (R(), U("div", Oe, [
|
|
3222
3224
|
a0(c.$slots, "no-location-icon", {}, () => [
|
|
3223
|
-
|
|
3224
|
-
color: A(
|
|
3225
|
-
size: A(
|
|
3225
|
+
C0(A(H0), {
|
|
3226
|
+
color: A(De),
|
|
3227
|
+
size: A(Ne)
|
|
3226
3228
|
}, null, 8, ["color", "size"])
|
|
3227
3229
|
], !0),
|
|
3228
|
-
E("div",
|
|
3230
|
+
E("div", Ue, [
|
|
3229
3231
|
a0(c.$slots, "no-location-title", {}, () => [
|
|
3230
|
-
|
|
3232
|
+
D0(Z(A(n).t("no_location_data")), 1)
|
|
3231
3233
|
], !0)
|
|
3232
3234
|
]),
|
|
3233
|
-
E("div",
|
|
3235
|
+
E("div", Re, [
|
|
3234
3236
|
a0(c.$slots, "no-location-description", {}, () => [
|
|
3235
3237
|
E("p", null, Z(A(n).t("no_location_data_description")), 1)
|
|
3236
3238
|
], !0)
|
|
@@ -3239,30 +3241,30 @@ const Ce = "#828a9e", De = "32px", Ne = { class: "kong-ui-public-analytics-geo-m
|
|
|
3239
3241
|
E("div", {
|
|
3240
3242
|
id: A(o),
|
|
3241
3243
|
class: "analytics-geo-map-container"
|
|
3242
|
-
}, null, 8,
|
|
3243
|
-
l.value ? (R(), U("div",
|
|
3244
|
-
c.metric ? (R(), U("div",
|
|
3245
|
-
(R(!0), U(
|
|
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", {
|
|
3246
3248
|
key: x,
|
|
3247
3249
|
class: "legend-item"
|
|
3248
3250
|
}, [
|
|
3249
3251
|
E("span", {
|
|
3250
3252
|
class: "legend-color",
|
|
3251
|
-
style:
|
|
3253
|
+
style: O0({ backgroundColor: m.color })
|
|
3252
3254
|
}, null, 4),
|
|
3253
|
-
E("span",
|
|
3255
|
+
E("span", $e, Z(m.range), 1)
|
|
3254
3256
|
]))), 128))
|
|
3255
3257
|
])) : r0("", !0)
|
|
3256
3258
|
]));
|
|
3257
3259
|
}
|
|
3258
|
-
}),
|
|
3260
|
+
}), qe = (e, t) => {
|
|
3259
3261
|
const i = e.__vccOpts || e;
|
|
3260
3262
|
for (const [a, n] of t)
|
|
3261
3263
|
i[a] = n;
|
|
3262
3264
|
return i;
|
|
3263
|
-
},
|
|
3265
|
+
}, Qe = /* @__PURE__ */ qe(Ge, [["__scopeId", "data-v-0fc07407"]]);
|
|
3264
3266
|
export {
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3267
|
+
Qe as AnalyticsGeoMap,
|
|
3268
|
+
Ce as debounce,
|
|
3269
|
+
Xe as exploreResultToCountryMetrics
|
|
3268
3270
|
};
|