@kong-ui-public/analytics-geo-map 1.0.3-pr.2392.975995129.0 → 1.0.3-pr.2392.f9338c2c8.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,7 +1,7 @@
1
- import { defineComponent as w0, useId as _0, ref as n0, computed as T, onMounted as k0, watch as a0, createElementBlock as E, openBlock as A, createElementVNode as Y, createCommentVNode as o0, unref as M0, toDisplayString as s0, Fragment as L0, renderList as P0, normalizeStyle as V0 } from "vue";
1
+ import { defineComponent as w0, useId as _0, ref as r0, computed as D, onMounted as k0, watch as a0, createElementBlock as E, openBlock as A, createElementVNode as Y, createCommentVNode as o0, unref as M0, toDisplayString as s0, Fragment as L0, renderList as P0, normalizeStyle as V0 } from "vue";
2
2
  import { Map as B0, Popup as S0 } from "maplibre-gl";
3
- import { createI18n as z0, i18nTComponent as D0 } from "@kong-ui-public/i18n";
4
- const T0 = {
3
+ import { createI18n as z0, i18nTComponent as T0 } from "@kong-ui-public/i18n";
4
+ const D0 = {
5
5
  ms: "ms",
6
6
  bytes: "Byte{plural}",
7
7
  count: "request{plural}",
@@ -32,20 +32,20 @@ const T0 = {
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
- }, R0 = {
36
- metricUnits: T0,
35
+ }, N0 = {
36
+ metricUnits: D0,
37
37
  metrics: C0
38
38
  };
39
- function N0() {
40
- const e = z0("en-us", R0);
39
+ function R0() {
40
+ const e = z0("en-us", N0);
41
41
  return {
42
42
  i18n: e,
43
- i18nT: D0(e)
43
+ i18nT: T0(e)
44
44
  // Translation component <i18n-t>
45
45
  };
46
46
  }
47
47
  const O0 = {
48
- useI18n: N0
48
+ useI18n: R0
49
49
  };
50
50
  function h0(e) {
51
51
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -65,14 +65,14 @@ var p0 = { exports: {} };
65
65
  var m = s / l, y = u.round ? "round" : "floor";
66
66
  return u.decimal === !1 ? (s = Math[y](m), s.toString()) : (u.precision ? s = m : s = m < 10 ? Math[y](m * 10) / 10 : Math[y](m), s = s.toString(), typeof u.decimal == "string" && (s = s.replace(".", u.decimal)), s);
67
67
  }
68
- var n = 1e3, r = 1e4, a = 1e6, o = 1e9, d = 1e12;
68
+ var r = 1e3, n = 1e4, a = 1e6, o = 1e9, d = 1e12;
69
69
  function c(s, l) {
70
70
  var u;
71
71
  l = l || {};
72
72
  var m = s < 0;
73
73
  m && (s = Math.abs(s)), l.precision && (s = parseFloat(s.toPrecision(l.precision)));
74
- var y = l.min10k ? r : n;
75
- return s < y || l.precision && l.precision > Math.log10(s) ? u = t(i(s, 1, l), l) : s < a ? u = i(s, n, l) + "k" : s < o ? u = i(s, a, l) + "m" : s < d ? u = t(i(s, o, l), l) + "b" : u = t(i(s, d, l), l) + "t", m && (u = "-" + u), l.capital && (u = u.toUpperCase()), l.prefix && (u = l.prefix + u), l.suffix && (u = u + l.suffix), u;
74
+ var y = l.min10k ? n : r;
75
+ return s < y || l.precision && l.precision > Math.log10(s) ? u = t(i(s, 1, l), l) : s < a ? u = i(s, r, l) + "k" : s < o ? u = i(s, a, l) + "m" : s < d ? u = t(i(s, o, l), l) + "b" : u = t(i(s, d, l), l) + "t", m && (u = "-" + u), l.capital && (u = u.toUpperCase()), l.prefix && (u = l.prefix + u), l.suffix && (u = u + l.suffix), u;
76
76
  }
77
77
  c.addCommas = t, e.exports = c;
78
78
  })();
@@ -2556,8 +2556,8 @@ function Z0(e, t, i) {
2556
2556
  }
2557
2557
  function t0(e) {
2558
2558
  for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
2559
- var n = e.readVarint(), r = n >> 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()));
2559
+ var r = e.readVarint(), n = r >> 3;
2560
+ 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()));
2561
2561
  }
2562
2562
  return i;
2563
2563
  }
@@ -2569,15 +2569,15 @@ function X0(e) {
2569
2569
  for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / X);
2570
2570
  return i;
2571
2571
  }
2572
- function q(e, t, i, n) {
2573
- var r = 0, a = [], o, d, c = [];
2572
+ function q(e, t, i, r) {
2573
+ var n = 0, a = [], o, d, c = [];
2574
2574
  for (d = 0; d < W; d++) c[d] = 0;
2575
- for (; i ? r < i : e.pos < t; ) {
2575
+ for (; i ? n < i : e.pos < t; ) {
2576
2576
  for (o = [], d = 0; d < W; d++)
2577
2577
  c[d] += e.readSVarint(), o[d] = c[d] / X;
2578
- a.push(o), r++;
2578
+ a.push(o), n++;
2579
2579
  }
2580
- return n && a.push(a[0]), a;
2580
+ return r && a.push(a[0]), a;
2581
2581
  }
2582
2582
  function l0(e) {
2583
2583
  return q(e, e.readVarint() + e.pos);
@@ -2585,40 +2585,40 @@ function l0(e) {
2585
2585
  function u0(e, t) {
2586
2586
  var i = e.readVarint() + e.pos;
2587
2587
  if (!v) return [q(e, i, null, t)];
2588
- for (var n = [], r = 0; r < v.length; r++) n.push(q(e, i, v[r], t));
2589
- return v = null, n;
2588
+ for (var r = [], n = 0; n < v.length; n++) r.push(q(e, i, v[n], t));
2589
+ return v = null, r;
2590
2590
  }
2591
2591
  function Q0(e) {
2592
2592
  var t = e.readVarint() + e.pos;
2593
2593
  if (!v) return [[q(e, t, null, !0)]];
2594
- for (var i = [], n = 1, r = 0; r < v[0]; r++) {
2595
- for (var a = [], o = 0; o < v[n]; o++) a.push(q(e, t, v[n + 1 + o], !0));
2596
- n += v[n] + 1, i.push(a);
2594
+ for (var i = [], r = 1, n = 0; n < v[0]; n++) {
2595
+ for (var a = [], o = 0; o < v[r]; o++) a.push(q(e, t, v[r + 1 + o], !0));
2596
+ r += v[r] + 1, i.push(a);
2597
2597
  }
2598
2598
  return v = null, i;
2599
2599
  }
2600
2600
  var Y0 = $0, i0 = {};
2601
2601
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2602
- i0.read = function(e, t, i, n, r) {
2603
- var a, o, d = r * 8 - n - 1, c = (1 << d) - 1, s = c >> 1, l = -7, u = i ? r - 1 : 0, m = i ? -1 : 1, y = e[t + u];
2602
+ i0.read = function(e, t, i, r, n) {
2603
+ var a, o, d = n * 8 - r - 1, c = (1 << d) - 1, s = c >> 1, l = -7, u = i ? n - 1 : 0, m = i ? -1 : 1, y = e[t + u];
2604
2604
  for (u += m, a = y & (1 << -l) - 1, y >>= -l, l += d; l > 0; a = a * 256 + e[t + u], u += m, l -= 8)
2605
2605
  ;
2606
- for (o = a & (1 << -l) - 1, a >>= -l, l += n; l > 0; o = o * 256 + e[t + u], u += m, l -= 8)
2606
+ for (o = a & (1 << -l) - 1, a >>= -l, l += r; l > 0; o = o * 256 + e[t + u], u += m, l -= 8)
2607
2607
  ;
2608
2608
  if (a === 0)
2609
2609
  a = 1 - s;
2610
2610
  else {
2611
2611
  if (a === c)
2612
2612
  return o ? NaN : (y ? -1 : 1) * (1 / 0);
2613
- o = o + Math.pow(2, n), a = a - s;
2613
+ o = o + Math.pow(2, r), a = a - s;
2614
2614
  }
2615
- return (y ? -1 : 1) * o * Math.pow(2, a - n);
2615
+ return (y ? -1 : 1) * o * Math.pow(2, a - r);
2616
2616
  };
2617
- i0.write = function(e, t, i, n, r, a) {
2618
- var o, d, c, s = a * 8 - r - 1, l = (1 << s) - 1, u = l >> 1, m = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = n ? 0 : a - 1, L = n ? 1 : -1, F = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
2619
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, o = l) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -o)) < 1 && (o--, c *= 2), o + u >= 1 ? t += m / c : t += m * Math.pow(2, 1 - u), t * c >= 2 && (o++, c /= 2), o + u >= l ? (d = 0, o = l) : o + u >= 1 ? (d = (t * c - 1) * Math.pow(2, r), o = o + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, r), o = 0)); r >= 8; e[i + y] = d & 255, y += L, d /= 256, r -= 8)
2617
+ i0.write = function(e, t, i, r, n, a) {
2618
+ var o, d, c, s = a * 8 - n - 1, l = (1 << s) - 1, u = l >> 1, m = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = r ? 0 : a - 1, L = r ? 1 : -1, F = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
2619
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, o = l) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -o)) < 1 && (o--, c *= 2), o + u >= 1 ? t += m / c : t += m * Math.pow(2, 1 - u), t * c >= 2 && (o++, c /= 2), o + u >= l ? (d = 0, o = l) : o + u >= 1 ? (d = (t * c - 1) * Math.pow(2, n), o = o + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, n), o = 0)); n >= 8; e[i + y] = d & 255, y += L, d /= 256, n -= 8)
2620
2620
  ;
2621
- for (o = o << r | d, s += r; s > 0; e[i + y] = o & 255, y += L, o /= 256, s -= 8)
2621
+ for (o = o << n | d, s += n; s > 0; e[i + y] = o & 255, y += L, o /= 256, s -= 8)
2622
2622
  ;
2623
2623
  e[i + y - L] |= F * 128;
2624
2624
  };
@@ -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 n = this.readVarint(), r = n >> 3, a = this.pos;
2642
- this.type = n & 7, e(r, t, this), this.pos === a && this.skip(n);
2641
+ var r = this.readVarint(), n = r >> 3, a = this.pos;
2642
+ this.type = r & 7, e(n, t, this), this.pos === a && this.skip(r);
2643
2643
  }
2644
2644
  return t;
2645
2645
  },
@@ -2672,8 +2672,8 @@ f.prototype = {
2672
2672
  return this.pos += 8, e;
2673
2673
  },
2674
2674
  readVarint: function(e) {
2675
- var t = this.buf, i, n;
2676
- return n = t[this.pos++], i = n & 127, n < 128 || (n = t[this.pos++], i |= (n & 127) << 7, n < 128) || (n = t[this.pos++], i |= (n & 127) << 14, n < 128) || (n = t[this.pos++], i |= (n & 127) << 21, n < 128) ? i : (n = t[this.pos], i |= (n & 15) << 28, t1(i, e, this));
2675
+ var t = this.buf, i, r;
2676
+ return r = t[this.pos++], i = r & 127, r < 128 || (r = t[this.pos++], i |= (r & 127) << 7, r < 128) || (r = t[this.pos++], i |= (r & 127) << 14, r < 128) || (r = t[this.pos++], i |= (r & 127) << 21, r < 128) ? i : (r = t[this.pos], i |= (r & 15) << 28, t1(i, e, this));
2677
2677
  },
2678
2678
  readVarint64: function() {
2679
2679
  return this.readVarint(!0);
@@ -2818,8 +2818,8 @@ f.prototype = {
2818
2818
  this.pos++;
2819
2819
  var i = this.pos;
2820
2820
  e(t, this);
2821
- var n = this.pos - i;
2822
- n >= 128 && d0(i, n, this), this.pos = i - 1, this.writeVarint(n), this.pos += n;
2821
+ var r = this.pos - i;
2822
+ r >= 128 && d0(i, r, this), this.pos = i - 1, this.writeVarint(r), this.pos += r;
2823
2823
  },
2824
2824
  writeMessage: function(e, t, i) {
2825
2825
  this.writeTag(e, f.Bytes), this.writeRawMessage(t, i);
@@ -2886,33 +2886,33 @@ f.prototype = {
2886
2886
  }
2887
2887
  };
2888
2888
  function t1(e, t, i) {
2889
- var n = i.buf, r, a;
2890
- if (a = n[i.pos++], r = (a & 112) >> 4, a < 128 || (a = n[i.pos++], r |= (a & 127) << 3, a < 128) || (a = n[i.pos++], r |= (a & 127) << 10, a < 128) || (a = n[i.pos++], r |= (a & 127) << 17, a < 128) || (a = n[i.pos++], r |= (a & 127) << 24, a < 128) || (a = n[i.pos++], r |= (a & 1) << 31, a < 128)) return N(e, r, t);
2889
+ var r = i.buf, n, a;
2890
+ if (a = r[i.pos++], n = (a & 112) >> 4, a < 128 || (a = r[i.pos++], n |= (a & 127) << 3, a < 128) || (a = r[i.pos++], n |= (a & 127) << 10, a < 128) || (a = r[i.pos++], n |= (a & 127) << 17, a < 128) || (a = r[i.pos++], n |= (a & 127) << 24, a < 128) || (a = r[i.pos++], n |= (a & 1) << 31, a < 128)) return R(e, n, t);
2891
2891
  throw new Error("Expected varint not more than 10 bytes");
2892
2892
  }
2893
2893
  function M(e) {
2894
2894
  return e.type === f.Bytes ? e.readVarint() + e.pos : e.pos + 1;
2895
2895
  }
2896
- function N(e, t, i) {
2896
+ function R(e, t, i) {
2897
2897
  return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
2898
2898
  }
2899
2899
  function i1(e, t) {
2900
- var i, n;
2901
- if (e >= 0 ? (i = e % 4294967296 | 0, n = e / 4294967296 | 0) : (i = ~(-e % 4294967296), n = ~(-e / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, n = n + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
2900
+ var i, r;
2901
+ if (e >= 0 ? (i = e % 4294967296 | 0, r = e / 4294967296 | 0) : (i = ~(-e % 4294967296), r = ~(-e / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, r = r + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
2902
2902
  throw new Error("Given varint doesn't fit into 10 bytes");
2903
- t.realloc(10), r1(i, n, t), n1(n, t);
2903
+ t.realloc(10), n1(i, r, t), r1(r, t);
2904
2904
  }
2905
- function r1(e, t, i) {
2905
+ function n1(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 n1(e, t) {
2908
+ function r1(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
2912
  function d0(e, t, i) {
2913
- var n = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
2914
- i.realloc(n);
2915
- for (var r = i.pos - 1; r >= e; r--) i.buf[r + n] = i.buf[r];
2913
+ var r = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
2914
+ i.realloc(r);
2915
+ for (var n = i.pos - 1; n >= e; n--) i.buf[n + r] = i.buf[n];
2916
2916
  }
2917
2917
  function a1(e, t) {
2918
2918
  for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
@@ -2951,32 +2951,32 @@ function f0(e, t) {
2951
2951
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
2952
2952
  }
2953
2953
  function p1(e, t, i) {
2954
- for (var n = "", r = t; r < i; ) {
2955
- var a = e[r], o = null, d = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
2956
- if (r + d > i) break;
2954
+ for (var r = "", n = t; n < i; ) {
2955
+ var a = e[n], o = null, d = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
2956
+ if (n + d > i) break;
2957
2957
  var c, s, l;
2958
- d === 1 ? a < 128 && (o = a) : d === 2 ? (c = e[r + 1], (c & 192) === 128 && (o = (a & 31) << 6 | c & 63, o <= 127 && (o = null))) : d === 3 ? (c = e[r + 1], s = e[r + 2], (c & 192) === 128 && (s & 192) === 128 && (o = (a & 15) << 12 | (c & 63) << 6 | s & 63, (o <= 2047 || o >= 55296 && o <= 57343) && (o = null))) : d === 4 && (c = e[r + 1], s = e[r + 2], l = e[r + 3], (c & 192) === 128 && (s & 192) === 128 && (l & 192) === 128 && (o = (a & 15) << 18 | (c & 63) << 12 | (s & 63) << 6 | l & 63, (o <= 65535 || o >= 1114112) && (o = null))), o === null ? (o = 65533, d = 1) : o > 65535 && (o -= 65536, n += String.fromCharCode(o >>> 10 & 1023 | 55296), o = 56320 | o & 1023), n += String.fromCharCode(o), r += d;
2958
+ d === 1 ? a < 128 && (o = a) : d === 2 ? (c = e[n + 1], (c & 192) === 128 && (o = (a & 31) << 6 | c & 63, o <= 127 && (o = null))) : d === 3 ? (c = e[n + 1], s = e[n + 2], (c & 192) === 128 && (s & 192) === 128 && (o = (a & 15) << 12 | (c & 63) << 6 | s & 63, (o <= 2047 || o >= 55296 && o <= 57343) && (o = null))) : d === 4 && (c = e[n + 1], s = e[n + 2], l = e[n + 3], (c & 192) === 128 && (s & 192) === 128 && (l & 192) === 128 && (o = (a & 15) << 18 | (c & 63) << 12 | (s & 63) << 6 | l & 63, (o <= 65535 || o >= 1114112) && (o = null))), o === null ? (o = 65533, d = 1) : o > 65535 && (o -= 65536, r += String.fromCharCode(o >>> 10 & 1023 | 55296), o = 56320 | o & 1023), r += String.fromCharCode(o), n += d;
2959
2959
  }
2960
- return n;
2960
+ return r;
2961
2961
  }
2962
2962
  function m1(e, t, i) {
2963
2963
  return y0.decode(e.subarray(t, i));
2964
2964
  }
2965
2965
  function y1(e, t, i) {
2966
- for (var n = 0, r, a; n < t.length; n++) {
2967
- if (r = t.charCodeAt(n), r > 55295 && r < 57344)
2966
+ for (var r = 0, n, a; r < t.length; r++) {
2967
+ if (n = t.charCodeAt(r), n > 55295 && n < 57344)
2968
2968
  if (a)
2969
- if (r < 56320) {
2970
- e[i++] = 239, e[i++] = 191, e[i++] = 189, a = r;
2969
+ if (n < 56320) {
2970
+ e[i++] = 239, e[i++] = 191, e[i++] = 189, a = n;
2971
2971
  continue;
2972
2972
  } else
2973
- r = a - 55296 << 10 | r - 56320 | 65536, a = null;
2973
+ n = a - 55296 << 10 | n - 56320 | 65536, a = null;
2974
2974
  else {
2975
- r > 56319 || n + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : a = r;
2975
+ n > 56319 || r + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : a = n;
2976
2976
  continue;
2977
2977
  }
2978
2978
  else a && (e[i++] = 239, e[i++] = 191, e[i++] = 189, a = 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);
2979
+ n < 128 ? e[i++] = n : (n < 2048 ? e[i++] = n >> 6 | 192 : (n < 65536 ? e[i++] = n >> 12 | 224 : (e[i++] = n >> 18 | 240, e[i++] = n >> 12 & 63 | 128), e[i++] = n >> 6 & 63 | 128), e[i++] = n & 63 | 128);
2980
2980
  }
2981
2981
  return i;
2982
2982
  }
@@ -3000,7 +3000,7 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3000
3000
  } }
3001
3001
  },
3002
3002
  setup(e) {
3003
- const t = import("./countries-simple-geo-BFUDnSiE.js").then((h) => h.default), { i18n: i } = O0.useI18n(), n = _0(), r = n0(), a = n0(null), o = T(() => ({
3003
+ const t = import("./countries-simple-geo-BFUDnSiE.js").then((h) => h.default), { i18n: i } = O0.useI18n(), r = _0(), n = r0(), a = r0(null), o = D(() => ({
3004
3004
  "fill-color": [
3005
3005
  "match",
3006
3006
  [
@@ -3021,10 +3021,10 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3021
3021
  // default color if no match
3022
3022
  ],
3023
3023
  "fill-opacity": 0.7
3024
- })), d = T(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), c = T(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), s = T(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), l = (h) => {
3024
+ })), d = D(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), c = D(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), s = D(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), l = (h) => {
3025
3025
  const p = Math.log(h), x = (s.value - c.value) / 5;
3026
3026
  return p >= c.value + 4 * x ? "#296378" : p >= c.value + 3 * x ? "#0D8093" : p >= c.value + 2 * x ? "#009FA9" : p >= c.value + 1 * x ? "#00BDB7" : "#0CDCBD";
3027
- }, u = T(() => e.metric && i.t(`metrics.${e.metric}`) || ""), m = T(() => {
3027
+ }, u = D(() => e.metric && i.t(`metrics.${e.metric}`) || ""), m = D(() => {
3028
3028
  const p = (s.value - c.value) / 5, g = [
3029
3029
  c.value + 4 * p,
3030
3030
  c.value + 3 * p,
@@ -3046,46 +3046,46 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3046
3046
  }, L = (h) => {
3047
3047
  var g, x, k, S, _, C, U;
3048
3048
  if (h === "RU") {
3049
- (g = r.value) == null || g.fitBounds([
3049
+ (g = n.value) == null || g.fitBounds([
3050
3050
  [20, 40],
3051
3051
  [180, 80]
3052
3052
  ]);
3053
3053
  return;
3054
3054
  } else if (h === "US") {
3055
- (x = r.value) == null || x.fitBounds([
3055
+ (x = n.value) == null || x.fitBounds([
3056
3056
  [-130, 20],
3057
3057
  [-60, 50]
3058
3058
  ]);
3059
3059
  return;
3060
3060
  } else if (h === "FR") {
3061
- (k = r.value) == null || k.fitBounds([
3061
+ (k = n.value) == null || k.fitBounds([
3062
3062
  [-5, 42],
3063
3063
  [9, 51]
3064
3064
  ]);
3065
3065
  return;
3066
3066
  } else if (h === "NO") {
3067
- (S = r.value) == null || S.fitBounds([
3067
+ (S = n.value) == null || S.fitBounds([
3068
3068
  [4, 57],
3069
3069
  [32, 71]
3070
3070
  ]);
3071
3071
  return;
3072
3072
  }
3073
3073
  const p = (_ = a.value) == null ? void 0 : _.features.find((w) => {
3074
- var P, V, B, z, D;
3075
- return (P = w.properties) != null && P.ISO_A2 ? ((V = w.properties) == null ? void 0 : V.ISO_A2) === h : ((B = w.properties) == null ? void 0 : B.iso_a2) === "-99" ? ((z = w.properties) == null ? void 0 : z.iso_a2_eh) === h : ((D = w.properties) == null ? void 0 : D.iso_a2) === h;
3074
+ var P, V, B, z, T;
3075
+ return (P = w.properties) != null && P.ISO_A2 ? ((V = w.properties) == null ? void 0 : V.ISO_A2) === h : ((B = w.properties) == null ? void 0 : B.iso_a2) === "-99" ? ((z = w.properties) == null ? void 0 : z.iso_a2_eh) === h : ((T = w.properties) == null ? void 0 : T.iso_a2) === h;
3076
3076
  });
3077
3077
  if (p) {
3078
3078
  const w = (C = p.geometry) == null ? void 0 : C.coordinates;
3079
3079
  if (!w) return;
3080
- const P = y(w), V = P.map((R) => R[1]), B = P.map((R) => R[0]), z = Math.min(...V), D = Math.max(...V), G = Math.min(...B), H = Math.max(...B);
3081
- (U = r.value) == null || U.fitBounds([
3080
+ const P = y(w), V = P.map((N) => N[1]), B = P.map((N) => N[0]), z = Math.min(...V), T = Math.max(...V), G = Math.min(...B), H = Math.max(...B);
3081
+ (U = n.value) == null || U.fitBounds([
3082
3082
  [G, z],
3083
- [H, D]
3083
+ [H, T]
3084
3084
  ]);
3085
3085
  }
3086
- }, F = T(() => {
3086
+ }, F = D(() => {
3087
3087
  const h = {
3088
- container: n,
3088
+ container: r,
3089
3089
  style: { version: 8, sources: {}, layers: [] },
3090
3090
  attributionControl: !1,
3091
3091
  // fit bounds for whole world minus antarctica
@@ -3101,20 +3101,20 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3101
3101
  var h, p, g;
3102
3102
  try {
3103
3103
  const x = await t, k = await fetch(x), S = new Uint8Array(await k.arrayBuffer()), _ = Y0(new x1(S));
3104
- a.value = _, r.value = new B0(F.value), r.value.on("load", () => {
3104
+ a.value = _, n.value = new B0(F.value), n.value.on("load", () => {
3105
3105
  var U, w, P, V, B, z;
3106
- (U = r.value) == null || U.addSource("countries", {
3106
+ (U = n.value) == null || U.addSource("countries", {
3107
3107
  type: "geojson",
3108
3108
  data: _
3109
- }), (w = r.value) == null || w.addLayer({
3109
+ }), (w = n.value) == null || w.addLayer({
3110
3110
  id: "countries-layer",
3111
3111
  type: "fill",
3112
3112
  source: "countries",
3113
3113
  paint: o.value
3114
- }), (P = r.value) == null || P.addSource("lakes", {
3114
+ }), (P = n.value) == null || P.addSource("lakes", {
3115
3115
  type: "geojson",
3116
3116
  data: A0
3117
- }), (V = r.value) == null || V.addLayer({
3117
+ }), (V = n.value) == null || V.addLayer({
3118
3118
  id: "lakes-layer",
3119
3119
  type: "fill",
3120
3120
  source: "lakes",
@@ -3126,32 +3126,32 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3126
3126
  closeButton: !1,
3127
3127
  closeOnClick: !1
3128
3128
  });
3129
- (B = r.value) == null || B.on("mousemove", "countries-layer", (D) => {
3129
+ (B = n.value) == null || B.on("mousemove", "countries-layer", (T) => {
3130
3130
  var H;
3131
- const G = (H = D.features) == null ? void 0 : H[0];
3131
+ const G = (H = T.features) == null ? void 0 : H[0];
3132
3132
  if (G) {
3133
- const { iso_a2: R, iso_a2_eh: x0, ISO_A2: g0, admin: r0 } = G.properties, F0 = g0 ?? R === "-99" ? x0 : R, Q = e.countryMetrics[F0];
3133
+ const { iso_a2: N, iso_a2_eh: x0, ISO_A2: g0, admin: n0 } = G.properties, F0 = g0 ?? N === "-99" ? x0 : N, Q = e.countryMetrics[F0];
3134
3134
  if (Q !== void 0) {
3135
- const v0 = e.showTooltipValue ? `<strong>${r0}</strong>: ${$(Q, { capital: !0 })} ${i.t(`metricUnits.${e.metricUnit}`, { plural: Q > 1 ? "s" : "" })}` : `<strong>${r0}</strong>`;
3136
- C.setLngLat(D.lngLat).setHTML(v0).addTo(r.value);
3135
+ const v0 = e.showTooltipValue ? `<strong>${n0}</strong>: ${$(Q, { capital: !0 })} ${i.t(`metricUnits.${e.metricUnit}`, { plural: Q > 1 ? "s" : "" })}` : `<strong>${n0}</strong>`;
3136
+ C.setLngLat(T.lngLat).setHTML(v0).addTo(n.value);
3137
3137
  } else
3138
3138
  C.remove();
3139
3139
  }
3140
- }), (z = r.value) == null || z.on("mouseleave", "countries-layer", () => {
3140
+ }), (z = n.value) == null || z.on("mouseleave", "countries-layer", () => {
3141
3141
  C.remove();
3142
3142
  }), e.fitToCountry && L(e.fitToCountry);
3143
- }), (h = r.value) == null || h.dragRotate.disable(), (p = r.value) == null || p.keyboard.disable(), (g = r.value) == null || g.touchZoomRotate.disableRotation();
3143
+ }), (h = n.value) == null || h.dragRotate.disable(), (p = n.value) == null || p.keyboard.disable(), (g = n.value) == null || g.touchZoomRotate.disableRotation();
3144
3144
  } catch (x) {
3145
3145
  console.error(x);
3146
3146
  }
3147
3147
  }), a0(() => e.countryMetrics, () => {
3148
3148
  var h;
3149
- r.value && r.value.isStyleLoaded() && (r.value.getLayer("countries-layer") && r.value.removeLayer("countries-layer"), r.value.addLayer({
3149
+ n.value && n.value.isStyleLoaded() && (n.value.getLayer("countries-layer") && n.value.removeLayer("countries-layer"), n.value.addLayer({
3150
3150
  id: "countries-layer",
3151
3151
  type: "fill",
3152
3152
  source: "countries",
3153
3153
  paint: o.value
3154
- }), r.value.removeLayer("lakes-layer"), (h = r.value) == null || h.addLayer({
3154
+ }), n.value.removeLayer("lakes-layer"), (h = n.value) == null || h.addLayer({
3155
3155
  id: "lakes-layer",
3156
3156
  type: "fill",
3157
3157
  source: "lakes",
@@ -3161,13 +3161,13 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3161
3161
  }));
3162
3162
  }), a0(() => e.fitToCountry, (h) => {
3163
3163
  var p, g, x;
3164
- r.value && h ? L(h) : !F.value.center && !F.value.zoom ? (p = r.value) == null || p.fitBounds([
3164
+ n.value && h ? L(h) : !F.value.center && !F.value.zoom ? (p = n.value) == null || p.fitBounds([
3165
3165
  [-180, -90],
3166
3166
  [180, 90]
3167
- ]) : (F.value.zoom && ((g = r.value) == null || g.setZoom(F.value.zoom)), F.value.center && ((x = r.value) == null || x.flyTo({ center: F.value.center })));
3167
+ ]) : (F.value.zoom && ((g = n.value) == null || g.setZoom(F.value.zoom)), F.value.center && ((x = n.value) == null || x.flyTo({ center: F.value.center })));
3168
3168
  }), (h, p) => (A(), E("div", g1, [
3169
3169
  Y("div", {
3170
- id: M0(n),
3170
+ id: M0(r),
3171
3171
  class: "analytics-geo-map-container"
3172
3172
  }, null, 8, F1),
3173
3173
  d.value ? (A(), E("div", v1, [
@@ -3187,10 +3187,22 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3187
3187
  }
3188
3188
  }), M1 = (e, t) => {
3189
3189
  const i = e.__vccOpts || e;
3190
- for (const [n, r] of t)
3191
- i[n] = r;
3190
+ for (const [r, n] of t)
3191
+ i[r] = n;
3192
3192
  return i;
3193
- }, B1 = /* @__PURE__ */ M1(k1, [["__scopeId", "data-v-da65e340"]]);
3193
+ }, B1 = /* @__PURE__ */ M1(k1, [["__scopeId", "data-v-ddf87e81"]]), S1 = (e) => {
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
+ };
3194
3205
  export {
3195
- B1 as AnalyticsGeoMap
3206
+ B1 as AnalyticsGeoMap,
3207
+ S1 as exploreResultToCountryMetrics
3196
3208
  };