@kong-ui-public/analytics-geo-map 1.4.14 → 1.4.15-pr.2585.81807dcf3.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 { computed as k, defineComponent as f0, createElementBlock as T, openBlock as M, createCommentVNode as W, toDisplayString as R, Fragment as I0, renderList as R0, createElementVNode as B, normalizeStyle as O0, useCssVars as E0, toRef as v0, ref as j, useId as A0, onMounted as $0, watch as s0, createBlock as g0, renderSlot as l0, createVNode as G0, unref as I, createTextVNode as q0 } from "vue";
2
- import { Map as H0 } from "maplibre-gl";
3
- import { createI18n as K0, i18nTComponent as j0 } from "@kong-ui-public/i18n";
4
- import { AnalyticsIcon as W0 } from "@kong/icons";
5
- const Z0 = {
1
+ import { computed as C, defineComponent as Tt, createElementBlock as ae, openBlock as j, createCommentVNode as De, toDisplayString as ce, Fragment as jr, renderList as Kr, createElementVNode as J, normalizeStyle as $r, useCssVars as Wr, toRef as Xt, ref as Se, useId as Zr, onMounted as qr, watch as ut, createBlock as Qt, renderSlot as ct, createVNode as Jr, unref as ue, createTextVNode as Xr } from "vue";
2
+ import { Map as Qr } from "maplibre-gl";
3
+ import { createI18n as ea, i18nTComponent as ta } from "@kong-ui-public/i18n";
4
+ import { AnalyticsIcon as na } from "@kong/icons";
5
+ const ra = {
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
- }, J0 = {
11
+ }, aa = {
12
12
  request_count: "Request count",
13
13
  request_per_minute: "Requests per minute",
14
14
  response_latency_average: "Response latency (avg)",
@@ -33,119 +33,1659 @@ const Z0 = {
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
- }, X0 = {
36
+ }, ia = {
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
- }, Q0 = "No location", Y0 = "No location data found.", b0 = {
41
- metricUnits: Z0,
42
- metrics: J0,
43
- cooperative_gestures: X0,
44
- no_location_data: Q0,
45
- no_location_data_description: Y0
40
+ }, oa = "No location", sa = "No location data found.", la = {
41
+ metricUnits: ra,
42
+ metrics: aa,
43
+ cooperative_gestures: ia,
44
+ no_location_data: oa,
45
+ no_location_data_description: sa
46
46
  };
47
- function ee() {
48
- const e = K0("en-us", b0);
47
+ function ua() {
48
+ const e = ea("en-us", la);
49
49
  return {
50
50
  i18n: e,
51
- i18nT: j0(e)
51
+ i18nT: ta(e)
52
52
  // Translation component <i18n-t>
53
53
  };
54
54
  }
55
- function P0(e) {
55
+ function wn(e) {
56
56
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
57
57
  }
58
- var S0 = { exports: {} };
58
+ var xn = { exports: {} };
59
59
  (function(e) {
60
60
  (function() {
61
- function t(l, r) {
62
- if (r.separator === !1 || l < 1e3)
63
- return l.toString();
64
- var u = typeof r.separator == "string" ? r.separator : ",", h = [], m = Math.round(l).toString().split("");
65
- return m.reverse().forEach(function(_, v) {
66
- v && v % 3 === 0 && h.push(u), h.push(_);
67
- }), h.reverse().join("");
61
+ function t(m, u) {
62
+ if (u.separator === !1 || m < 1e3)
63
+ return m.toString();
64
+ var f = typeof u.separator == "string" ? u.separator : ",", _ = [], v = Math.round(m).toString().split("");
65
+ return v.reverse().forEach(function(F, N) {
66
+ N && N % 3 === 0 && _.push(f), _.push(F);
67
+ }), _.reverse().join("");
68
68
  }
69
- function i(l, r, u) {
70
- var h = l / r, m = u.round ? "round" : "floor";
71
- return u.decimal === !1 ? (l = Math[m](h), l.toString()) : (u.precision ? l = h : l = h < 10 ? Math[m](h * 10) / 10 : Math[m](h), l = l.toString(), typeof u.decimal == "string" && (l = l.replace(".", u.decimal)), l);
69
+ function n(m, u, f) {
70
+ var _ = m / u, v = f.round ? "round" : "floor";
71
+ return f.decimal === !1 ? (m = Math[v](_), m.toString()) : (f.precision ? m = _ : m = _ < 10 ? Math[v](_ * 10) / 10 : Math[v](_), m = m.toString(), typeof f.decimal == "string" && (m = m.replace(".", f.decimal)), m);
72
72
  }
73
- var a = 1e3, n = 1e4, o = 1e6, s = 1e9, c = 1e12;
74
- function f(l, r) {
75
- var u;
76
- r = r || {};
77
- var h = l < 0;
78
- h && (l = Math.abs(l)), r.precision && (l = parseFloat(l.toPrecision(r.precision)));
79
- var m = r.min10k ? n : a;
80
- return l < m || r.precision && r.precision > Math.log10(l) ? u = t(i(l, 1, r), r) : l < o ? u = i(l, a, r) + "k" : l < s ? u = i(l, o, r) + "m" : l < c ? u = t(i(l, s, r), r) + "b" : u = t(i(l, c, r), r) + "t", h && (u = "-" + u), r.capital && (u = u.toUpperCase()), r.prefix && (u = r.prefix + u), r.suffix && (u = u + r.suffix), u;
73
+ var a = 1e3, i = 1e4, s = 1e6, c = 1e9, d = 1e12;
74
+ function y(m, u) {
75
+ var f;
76
+ u = u || {};
77
+ var _ = m < 0;
78
+ _ && (m = Math.abs(m)), u.precision && (m = parseFloat(m.toPrecision(u.precision)));
79
+ var v = u.min10k ? i : a;
80
+ return m < v || u.precision && u.precision > Math.log10(m) ? f = t(n(m, 1, u), u) : m < s ? f = n(m, a, u) + "k" : m < c ? f = n(m, s, u) + "m" : m < d ? f = t(n(m, c, u), u) + "b" : f = t(n(m, d, u), u) + "t", _ && (f = "-" + f), u.capital && (f = f.toUpperCase()), u.prefix && (f = u.prefix + f), u.suffix && (f = f + u.suffix), f;
81
81
  }
82
- f.addCommas = t, e.exports = f;
82
+ y.addCommas = t, e.exports = y;
83
83
  })();
84
- })(S0);
85
- var te = S0.exports;
86
- const ie = /* @__PURE__ */ P0(te), Z = "#e0e4ea", ne = "#828a9e", ae = "32px", _0 = 5, u0 = [
84
+ })(xn);
85
+ var ca = xn.exports;
86
+ const da = /* @__PURE__ */ wn(ca);
87
+ var ma = Object.defineProperty, fa = (e, t, n) => t in e ? ma(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, G = (e, t, n) => fa(e, typeof t != "symbol" ? t + "" : t, n), p = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.NINETY_DAY = "90d", e.ONE_HUNDRED_EIGHTY_DAY = "180d", e.ONE_YEAR = "365d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.CURRENT_YEAR = "current_year", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e.PREVIOUS_YEAR = "previous_year", e))(p || {});
88
+ const ha = ["in", "not_in", "selector"], pa = ["empty", "not_empty"], ya = [
89
+ "15m",
90
+ "1h",
91
+ "6h",
92
+ "12h",
93
+ "24h",
94
+ "7d",
95
+ "current_week",
96
+ "previous_week",
97
+ "30d",
98
+ "current_month",
99
+ "previous_month"
100
+ ], Re = (e) => e.filter((t) => t !== "time"), Tn = [
101
+ "api",
102
+ "api_product",
103
+ "api_product_version",
104
+ "control_plane",
105
+ "control_plane_group",
106
+ "data_plane_node",
107
+ "gateway_service",
108
+ "portal",
109
+ "route",
110
+ "status_code",
111
+ "status_code_grouped",
112
+ "time"
113
+ ], Mn = Re(Tn), _a = [
114
+ ...Tn,
115
+ "application",
116
+ "consumer",
117
+ "country_code",
118
+ "upstream_status_code",
119
+ "upstream_status_code_grouped",
120
+ "response_source",
121
+ "data_plane_node_version",
122
+ "realm"
123
+ ], Fn = Re(_a), ga = [
124
+ "control_plane",
125
+ "control_plane_group",
126
+ "gateway_service",
127
+ "consumer",
128
+ "application",
129
+ "route",
130
+ "ai_provider",
131
+ "ai_response_model",
132
+ "ai_request_model",
133
+ "llm_cache_status",
134
+ "llm_embeddings_provider",
135
+ "llm_embeddings_model",
136
+ "time",
137
+ "realm",
138
+ "status_code",
139
+ "status_code_grouped",
140
+ "ai_plugin"
141
+ ], Sn = Re(ga), va = [
142
+ "api",
143
+ "api_product",
144
+ "api_product_version",
145
+ "application",
146
+ "auth_type",
147
+ "client_ip",
148
+ "consumer",
149
+ "consumer_group",
150
+ "control_plane",
151
+ "control_plane_group",
152
+ "country_code",
153
+ "data_plane_node",
154
+ "data_plane_node_version",
155
+ "gateway_service",
156
+ "header_host",
157
+ "header_user_agent",
158
+ "http_method",
159
+ "portal",
160
+ "realm",
161
+ "request_id",
162
+ "request_uri",
163
+ "response_header_content_type",
164
+ "response_source",
165
+ "route",
166
+ "service_port",
167
+ "service_protocol",
168
+ "sse",
169
+ "status_code_grouped",
170
+ "time",
171
+ "trace_id",
172
+ "upstream_uri",
173
+ "upstream_status_code_grouped",
174
+ "websocket"
175
+ ];
176
+ Re(va);
177
+ const wa = [
178
+ "ai_count",
179
+ "latencies_response_ms",
180
+ "latencies_upstream_ms",
181
+ "latencies_kong_gateway_ms",
182
+ "request_body_size",
183
+ "response_body_size",
184
+ "response_header_content_length",
185
+ "status_code",
186
+ "upstream_status_code"
187
+ ];
188
+ Re(wa);
189
+ new Set(Mn), new Set(Fn), new Set(Sn);
190
+ const Mt = [
191
+ { code: "AF", name: "Afghanistan" },
192
+ { code: "AX", name: "Aland Islands" },
193
+ { code: "AL", name: "Albania" },
194
+ { code: "DZ", name: "Algeria" },
195
+ { code: "AS", name: "American Samoa" },
196
+ { code: "AD", name: "Andorra" },
197
+ { code: "AO", name: "Angola" },
198
+ { code: "AI", name: "Anguilla" },
199
+ { code: "AQ", name: "Antarctica" },
200
+ { code: "AG", name: "Antigua and Barbuda" },
201
+ { code: "AR", name: "Argentina" },
202
+ { code: "AM", name: "Armenia" },
203
+ { code: "AW", name: "Aruba" },
204
+ { code: "AU", name: "Australia" },
205
+ { code: "AT", name: "Austria" },
206
+ { code: "AZ", name: "Azerbaijan" },
207
+ { code: "BS", name: "Bahamas" },
208
+ { code: "BH", name: "Bahrain" },
209
+ { code: "BD", name: "Bangladesh" },
210
+ { code: "BB", name: "Barbados" },
211
+ { code: "BY", name: "Belarus" },
212
+ { code: "BE", name: "Belgium" },
213
+ { code: "BZ", name: "Belize" },
214
+ { code: "BJ", name: "Benin" },
215
+ { code: "BM", name: "Bermuda" },
216
+ { code: "BT", name: "Bhutan" },
217
+ { code: "BO", name: "Bolivia" },
218
+ { code: "BA", name: "Bosnia and Herzegovina" },
219
+ { code: "BW", name: "Botswana" },
220
+ { code: "BV", name: "Bouvet Island" },
221
+ { code: "BR", name: "Brazil" },
222
+ { code: "IO", name: "British Indian Ocean Territory" },
223
+ { code: "BN", name: "Brunei Darussalam" },
224
+ { code: "BG", name: "Bulgaria" },
225
+ { code: "BF", name: "Burkina Faso" },
226
+ { code: "BI", name: "Burundi" },
227
+ { code: "KH", name: "Cambodia" },
228
+ { code: "CM", name: "Cameroon" },
229
+ { code: "CA", name: "Canada" },
230
+ { code: "CV", name: "Cape Verde" },
231
+ { code: "KY", name: "Cayman Islands" },
232
+ { code: "CF", name: "Central African Republic" },
233
+ { code: "TD", name: "Chad" },
234
+ { code: "CL", name: "Chile" },
235
+ { code: "CN", name: "China" },
236
+ { code: "CX", name: "Christmas Island" },
237
+ { code: "CC", name: "Cocos (Keeling) Islands" },
238
+ { code: "CO", name: "Colombia" },
239
+ { code: "KM", name: "Comoros" },
240
+ { code: "CG", name: "Congo" },
241
+ { code: "CD", name: "Democratic Republic of the Congo" },
242
+ { code: "CK", name: "Cook Islands" },
243
+ { code: "CR", name: "Costa Rica" },
244
+ { code: "CI", name: "Cote d'Ivoire" },
245
+ { code: "HR", name: "Croatia" },
246
+ { code: "CU", name: "Cuba" },
247
+ { code: "CY", name: "Cyprus" },
248
+ { code: "CZ", name: "Czech Republic" },
249
+ { code: "DK", name: "Denmark" },
250
+ { code: "DJ", name: "Djibouti" },
251
+ { code: "DM", name: "Dominica" },
252
+ { code: "DO", name: "Dominican Republic" },
253
+ { code: "EC", name: "Ecuador" },
254
+ { code: "EG", name: "Egypt" },
255
+ { code: "SV", name: "El Salvador" },
256
+ { code: "GQ", name: "Equatorial Guinea" },
257
+ { code: "ER", name: "Eritrea" },
258
+ { code: "EE", name: "Estonia" },
259
+ { code: "ET", name: "Ethiopia" },
260
+ { code: "FK", name: "Falkland Islands (Malvinas)" },
261
+ { code: "FO", name: "Faroe Islands" },
262
+ { code: "FJ", name: "Fiji" },
263
+ { code: "FI", name: "Finland" },
264
+ { code: "FR", name: "France" },
265
+ { code: "GF", name: "French Guiana" },
266
+ { code: "PF", name: "French Polynesia" },
267
+ { code: "TF", name: "French Southern Territories" },
268
+ { code: "GA", name: "Gabon" },
269
+ { code: "GM", name: "Gambia" },
270
+ { code: "GE", name: "Georgia" },
271
+ { code: "DE", name: "Germany" },
272
+ { code: "GH", name: "Ghana" },
273
+ { code: "GI", name: "Gibraltar" },
274
+ { code: "GR", name: "Greece" },
275
+ { code: "GL", name: "Greenland" },
276
+ { code: "GD", name: "Grenada" },
277
+ { code: "GP", name: "Guadeloupe" },
278
+ { code: "GU", name: "Guam" },
279
+ { code: "GT", name: "Guatemala" },
280
+ { code: "GG", name: "Guernsey" },
281
+ { code: "GN", name: "Guinea" },
282
+ { code: "GW", name: "Guinea-Bissau" },
283
+ { code: "GY", name: "Guyana" },
284
+ { code: "HT", name: "Haiti" },
285
+ { code: "HM", name: "Heard Island and McDonald Islands" },
286
+ { code: "VA", name: "The Vatican" },
287
+ { code: "HN", name: "Honduras" },
288
+ { code: "HK", name: "Hong Kong" },
289
+ { code: "HU", name: "Hungary" },
290
+ { code: "IS", name: "Iceland" },
291
+ { code: "IN", name: "India" },
292
+ { code: "ID", name: "Indonesia" },
293
+ { code: "IR", name: "Iran" },
294
+ { code: "IQ", name: "Iraq" },
295
+ { code: "IE", name: "Ireland" },
296
+ { code: "IM", name: "Isle of Man" },
297
+ { code: "IL", name: "Israel" },
298
+ { code: "IT", name: "Italy" },
299
+ { code: "JM", name: "Jamaica" },
300
+ { code: "JP", name: "Japan" },
301
+ { code: "JE", name: "Jersey" },
302
+ { code: "JO", name: "Jordan" },
303
+ { code: "KZ", name: "Kazakhstan" },
304
+ { code: "KE", name: "Kenya" },
305
+ { code: "KI", name: "Kiribati" },
306
+ { code: "KP", name: "North Korea" },
307
+ { code: "KR", name: "South Korea" },
308
+ { code: "KW", name: "Kuwait" },
309
+ { code: "KG", name: "Kyrgyzstan" },
310
+ { code: "LA", name: "Laos" },
311
+ { code: "LV", name: "Latvia" },
312
+ { code: "LB", name: "Lebanon" },
313
+ { code: "LS", name: "Lesotho" },
314
+ { code: "LR", name: "Liberia" },
315
+ { code: "LY", name: "Libya" },
316
+ { code: "LI", name: "Liechtenstein" },
317
+ { code: "LT", name: "Lithuania" },
318
+ { code: "LU", name: "Luxembourg" },
319
+ { code: "MO", name: "Macao" },
320
+ { code: "MK", name: "Macedonia" },
321
+ { code: "MG", name: "Madagascar" },
322
+ { code: "MW", name: "Malawi" },
323
+ { code: "MY", name: "Malaysia" },
324
+ { code: "MV", name: "Maldives" },
325
+ { code: "ML", name: "Mali" },
326
+ { code: "MT", name: "Malta" },
327
+ { code: "MH", name: "Marshall Islands" },
328
+ { code: "MQ", name: "Martinique" },
329
+ { code: "MR", name: "Mauritania" },
330
+ { code: "MU", name: "Mauritius" },
331
+ { code: "YT", name: "Mayotte" },
332
+ { code: "MX", name: "Mexico" },
333
+ { code: "FM", name: "Micronesia, " },
334
+ { code: "MD", name: "Moldova," },
335
+ { code: "MC", name: "Monaco" },
336
+ { code: "MN", name: "Mongolia" },
337
+ { code: "ME", name: "Montenegro" },
338
+ { code: "MS", name: "Montserrat" },
339
+ { code: "MA", name: "Morocco" },
340
+ { code: "MZ", name: "Mozambique" },
341
+ { code: "MM", name: "Myanmar" },
342
+ { code: "NA", name: "Namibia" },
343
+ { code: "NR", name: "Nauru" },
344
+ { code: "NP", name: "Nepal" },
345
+ { code: "NL", name: "Netherlands" },
346
+ { code: "NC", name: "New Caledonia" },
347
+ { code: "NZ", name: "New Zealand" },
348
+ { code: "NI", name: "Nicaragua" },
349
+ { code: "NE", name: "Niger" },
350
+ { code: "NG", name: "Nigeria" },
351
+ { code: "NU", name: "Niue" },
352
+ { code: "NF", name: "Norfolk Island" },
353
+ { code: "MP", name: "Northern Mariana Islands" },
354
+ { code: "NO", name: "Norway" },
355
+ { code: "OM", name: "Oman" },
356
+ { code: "PK", name: "Pakistan" },
357
+ { code: "PW", name: "Palau" },
358
+ { code: "PA", name: "Panama" },
359
+ { code: "PG", name: "Papua New Guinea" },
360
+ { code: "PY", name: "Paraguay" },
361
+ { code: "PE", name: "Peru" },
362
+ { code: "PH", name: "Philippines" },
363
+ { code: "PN", name: "Pitcairn" },
364
+ { code: "PL", name: "Poland" },
365
+ { code: "PT", name: "Portugal" },
366
+ { code: "PR", name: "Puerto Rico" },
367
+ { code: "QA", name: "Qatar" },
368
+ { code: "RE", name: "Reunion" },
369
+ { code: "RO", name: "Romania" },
370
+ { code: "RU", name: "Russia" },
371
+ { code: "RW", name: "Rwanda" },
372
+ { code: "BL", name: "Saint Barthelemy" },
373
+ { code: "SH", name: "Saint Helena" },
374
+ { code: "KN", name: "Saint Kitts and Nevis" },
375
+ { code: "LC", name: "Saint Lucia" },
376
+ { code: "MF", name: "Saint Martin" },
377
+ { code: "PM", name: "Saint Pierre and Miquelon" },
378
+ { code: "VC", name: "Saint Vincent and the Grenadines" },
379
+ { code: "WS", name: "Samoa" },
380
+ { code: "SM", name: "San Marino" },
381
+ { code: "ST", name: "Sao Tome and Principe" },
382
+ { code: "SA", name: "Saudi Arabia" },
383
+ { code: "SN", name: "Senegal" },
384
+ { code: "RS", name: "Serbia" },
385
+ { code: "SC", name: "Seychelles" },
386
+ { code: "SL", name: "Sierra Leone" },
387
+ { code: "SG", name: "Singapore" },
388
+ { code: "SX", name: "Sint Maarten" },
389
+ { code: "SK", name: "Slovakia" },
390
+ { code: "SI", name: "Slovenia" },
391
+ { code: "SB", name: "Solomon Islands" },
392
+ { code: "SO", name: "Somalia" },
393
+ { code: "ZA", name: "South Africa" },
394
+ { code: "GS", name: "South Georgia and the South Sandwich Islands" },
395
+ { code: "SS", name: "South Sudan" },
396
+ { code: "ES", name: "Spain" },
397
+ { code: "LK", name: "Sri Lanka" },
398
+ { code: "SD", name: "Sudan" },
399
+ { code: "SR", name: "Suriname" },
400
+ { code: "SJ", name: "Svalbard and Jan Mayen" },
401
+ { code: "SZ", name: "Swaziland" },
402
+ { code: "SE", name: "Sweden" },
403
+ { code: "CH", name: "Switzerland" },
404
+ { code: "SY", name: "Syria" },
405
+ { code: "TW", name: "Taiwan" },
406
+ { code: "TJ", name: "Tajikistan" },
407
+ { code: "TZ", name: "Tanzania" },
408
+ { code: "TH", name: "Thailand" },
409
+ { code: "TL", name: "Timor-Leste" },
410
+ { code: "TG", name: "Togo" },
411
+ { code: "TK", name: "Tokelau" },
412
+ { code: "TO", name: "Tonga" },
413
+ { code: "TT", name: "Trinidad and Tobago" },
414
+ { code: "TN", name: "Tunisia" },
415
+ { code: "TR", name: "Turkey" },
416
+ { code: "TM", name: "Turkmenistan" },
417
+ { code: "TC", name: "Turks and Caicos Islands" },
418
+ { code: "TV", name: "Tuvalu" },
419
+ { code: "UG", name: "Uganda" },
420
+ { code: "UA", name: "Ukraine" },
421
+ { code: "AE", name: "United Arab Emirates" },
422
+ { code: "GB", name: "United Kingdom" },
423
+ { code: "US", name: "United States" },
424
+ { code: "UM", name: "United States Minor Outlying Islands" },
425
+ { code: "UY", name: "Uruguay" },
426
+ { code: "UZ", name: "Uzbekistan" },
427
+ { code: "VU", name: "Vanuatu" },
428
+ { code: "VE", name: "Venezuela" },
429
+ { code: "VN", name: "Vietnam" },
430
+ { code: "VG", name: "British Virgin Islands" },
431
+ { code: "VI", name: "U.S. Virgin Islands" },
432
+ { code: "WF", name: "Wallis and Futuna" },
433
+ { code: "EH", name: "Western Sahara" },
434
+ { code: "YE", name: "Yemen" },
435
+ { code: "ZM", name: "Zambia" },
436
+ { code: "ZW", name: "Zimbabwe" }
437
+ ];
438
+ Mt.map((e) => e.code);
439
+ const xa = (e) => ({
440
+ type: "array",
441
+ description: "A list of filters to apply to the query",
442
+ items: {
443
+ oneOf: [
444
+ {
445
+ type: "object",
446
+ description: "In filter",
447
+ properties: {
448
+ field: {
449
+ type: "string",
450
+ enum: e
451
+ },
452
+ operator: {
453
+ type: "string",
454
+ enum: ha
455
+ },
456
+ value: {
457
+ type: "array",
458
+ items: {
459
+ type: ["string", "number", "null"]
460
+ }
461
+ }
462
+ },
463
+ required: [
464
+ "field",
465
+ "operator",
466
+ "value"
467
+ ],
468
+ additionalProperties: !1
469
+ },
470
+ {
471
+ type: "object",
472
+ description: "Empty filter",
473
+ properties: {
474
+ field: {
475
+ type: "string",
476
+ enum: e
477
+ },
478
+ operator: {
479
+ type: "string",
480
+ enum: pa
481
+ }
482
+ },
483
+ required: [
484
+ "field",
485
+ "operator"
486
+ ],
487
+ additionalProperties: !1
488
+ }
489
+ ]
490
+ }
491
+ });
492
+ xa([.../* @__PURE__ */ new Set([...Fn, ...Mn, ...Sn])]);
493
+ let Ta = {};
494
+ function Ma() {
495
+ return Ta;
496
+ }
497
+ const Fa = 60, Sa = 3600, en = Symbol.for("constructDateFrom");
498
+ function Ne(e, t) {
499
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && en in e ? e[en](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
500
+ }
501
+ function Te(e, t) {
502
+ return Ne(t || e, e);
503
+ }
504
+ function dt(e, t) {
505
+ const n = Te(e, void 0);
506
+ return n.setHours(0, 0, 0, 0), n;
507
+ }
508
+ function He(e, t) {
509
+ var n, a, i, s;
510
+ const c = Ma(), d = (t == null ? void 0 : t.weekStartsOn) ?? ((a = (n = t == null ? void 0 : t.locale) == null ? void 0 : n.options) == null ? void 0 : a.weekStartsOn) ?? c.weekStartsOn ?? ((s = (i = c.locale) == null ? void 0 : i.options) == null ? void 0 : s.weekStartsOn) ?? 0, y = Te(e, t == null ? void 0 : t.in), m = y.getDay(), u = (m < d ? 7 : 0) + m - d;
511
+ return y.setDate(y.getDate() - u), y.setHours(0, 0, 0, 0), y;
512
+ }
513
+ function mt(e, t, n) {
514
+ const a = Te(e, void 0);
515
+ return isNaN(t) ? Ne(e, NaN) : (a.setDate(a.getDate() + t), a);
516
+ }
517
+ function Da(e, t, n) {
518
+ const a = Te(e, void 0);
519
+ if (isNaN(t)) return Ne(e, NaN);
520
+ const i = a.getDate(), s = Ne(e, a.getTime());
521
+ s.setMonth(a.getMonth() + t + 1, 0);
522
+ const c = s.getDate();
523
+ return i >= c ? s : (a.setFullYear(
524
+ s.getFullYear(),
525
+ s.getMonth(),
526
+ i
527
+ ), a);
528
+ }
529
+ function we(e, t) {
530
+ const n = Te(e, void 0);
531
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
532
+ }
533
+ function ka(e, t) {
534
+ const n = Te(e, void 0), a = n.getFullYear(), i = n.getMonth(), s = Ne(n, 0);
535
+ return s.setFullYear(a, i + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
536
+ }
537
+ function tn(e) {
538
+ return Math.trunc(e * Sa);
539
+ }
540
+ function Na(e) {
541
+ const t = e / Fa;
542
+ return Math.trunc(t);
543
+ }
544
+ function Dn(e, t, n) {
545
+ return Da(e, -1);
546
+ }
547
+ function Ea(e, t) {
548
+ const n = Ga(t);
549
+ return "formatToParts" in n ? Oa(n, e) : Ia(n, e);
550
+ }
551
+ const Ra = {
552
+ year: 0,
553
+ month: 1,
554
+ day: 2,
555
+ hour: 3,
556
+ minute: 4,
557
+ second: 5
558
+ };
559
+ function Oa(e, t) {
560
+ try {
561
+ const n = e.formatToParts(t), a = [];
562
+ for (let i = 0; i < n.length; i++) {
563
+ const s = Ra[n[i].type];
564
+ s !== void 0 && (a[s] = parseInt(n[i].value, 10));
565
+ }
566
+ return a;
567
+ } catch (n) {
568
+ if (n instanceof RangeError)
569
+ return [NaN];
570
+ throw n;
571
+ }
572
+ }
573
+ function Ia(e, t) {
574
+ const n = e.format(t), a = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
575
+ return [
576
+ parseInt(a[3], 10),
577
+ parseInt(a[1], 10),
578
+ parseInt(a[2], 10),
579
+ parseInt(a[4], 10),
580
+ parseInt(a[5], 10),
581
+ parseInt(a[6], 10)
582
+ ];
583
+ }
584
+ const ft = {}, nn = new Intl.DateTimeFormat("en-US", {
585
+ hourCycle: "h23",
586
+ timeZone: "America/New_York",
587
+ year: "numeric",
588
+ month: "2-digit",
589
+ day: "2-digit",
590
+ hour: "2-digit",
591
+ minute: "2-digit",
592
+ second: "2-digit"
593
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), La = nn === "06/25/2014, 00:00:00" || nn === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
594
+ function Ga(e) {
595
+ return ft[e] || (ft[e] = La ? new Intl.DateTimeFormat("en-US", {
596
+ hourCycle: "h23",
597
+ timeZone: e,
598
+ year: "numeric",
599
+ month: "numeric",
600
+ day: "2-digit",
601
+ hour: "2-digit",
602
+ minute: "2-digit",
603
+ second: "2-digit"
604
+ }) : new Intl.DateTimeFormat("en-US", {
605
+ hour12: !1,
606
+ timeZone: e,
607
+ year: "numeric",
608
+ month: "numeric",
609
+ day: "2-digit",
610
+ hour: "2-digit",
611
+ minute: "2-digit",
612
+ second: "2-digit"
613
+ })), ft[e];
614
+ }
615
+ function Ft(e, t, n, a, i, s, c) {
616
+ const d = /* @__PURE__ */ new Date(0);
617
+ return d.setUTCFullYear(e, t, n), d.setUTCHours(a, i, s, c), d;
618
+ }
619
+ const rn = 36e5, Ca = 6e4, ht = {
620
+ timezoneZ: /^(Z)$/,
621
+ timezoneHH: /^([+-]\d{2})$/,
622
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
623
+ };
624
+ function Ke(e, t, n) {
625
+ if (!e)
626
+ return 0;
627
+ let a = ht.timezoneZ.exec(e);
628
+ if (a)
629
+ return 0;
630
+ let i, s;
631
+ if (a = ht.timezoneHH.exec(e), a)
632
+ return i = parseInt(a[1], 10), an(i) ? -(i * rn) : NaN;
633
+ if (a = ht.timezoneHHMM.exec(e), a) {
634
+ i = parseInt(a[2], 10);
635
+ const c = parseInt(a[3], 10);
636
+ return an(i, c) ? (s = Math.abs(i) * rn + c * Ca, a[1] === "+" ? -s : s) : NaN;
637
+ }
638
+ if (Ua(e)) {
639
+ t = new Date(t || Date.now());
640
+ const c = n ? t : Aa(t), d = vt(c, e);
641
+ return -(n ? d : Pa(t, d, e));
642
+ }
643
+ return NaN;
644
+ }
645
+ function Aa(e) {
646
+ return Ft(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
647
+ }
648
+ function vt(e, t) {
649
+ const n = Ea(e, t), a = Ft(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
650
+ let i = e.getTime();
651
+ const s = i % 1e3;
652
+ return i -= s >= 0 ? s : 1e3 + s, a - i;
653
+ }
654
+ function Pa(e, t, n) {
655
+ let a = e.getTime() - t;
656
+ const i = vt(new Date(a), n);
657
+ if (t === i)
658
+ return t;
659
+ a -= i - t;
660
+ const s = vt(new Date(a), n);
661
+ return i === s ? i : Math.max(i, s);
662
+ }
663
+ function an(e, t) {
664
+ return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
665
+ }
666
+ const on = {};
667
+ function Ua(e) {
668
+ if (on[e])
669
+ return !0;
670
+ try {
671
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), on[e] = !0, !0;
672
+ } catch {
673
+ return !1;
674
+ }
675
+ }
676
+ function sn(e) {
677
+ const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
678
+ return t.setUTCFullYear(e.getFullYear()), +e - +t;
679
+ }
680
+ const kn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, pt = 36e5, ln = 6e4, ba = 2, E = {
681
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
682
+ datePattern: /^([0-9W+-]+)(.*)/,
683
+ // year tokens
684
+ YY: /^(\d{2})$/,
685
+ YYY: [
686
+ /^([+-]\d{2})$/,
687
+ // 0 additional digits
688
+ /^([+-]\d{3})$/,
689
+ // 1 additional digit
690
+ /^([+-]\d{4})$/
691
+ // 2 additional digits
692
+ ],
693
+ YYYY: /^(\d{4})/,
694
+ YYYYY: [
695
+ /^([+-]\d{4})/,
696
+ // 0 additional digits
697
+ /^([+-]\d{5})/,
698
+ // 1 additional digit
699
+ /^([+-]\d{6})/
700
+ // 2 additional digits
701
+ ],
702
+ // date tokens
703
+ MM: /^-(\d{2})$/,
704
+ DDD: /^-?(\d{3})$/,
705
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
706
+ Www: /^-?W(\d{2})$/,
707
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
708
+ HH: /^(\d{2}([.,]\d*)?)$/,
709
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
710
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
711
+ // time zone tokens (to identify the presence of a tz)
712
+ timeZone: kn
713
+ };
714
+ function wt(e, t = {}) {
715
+ if (arguments.length < 1)
716
+ throw new TypeError("1 argument required, but only " + arguments.length + " present");
717
+ if (e === null)
718
+ return /* @__PURE__ */ new Date(NaN);
719
+ const n = t.additionalDigits == null ? ba : Number(t.additionalDigits);
720
+ if (n !== 2 && n !== 1 && n !== 0)
721
+ throw new RangeError("additionalDigits must be 0, 1 or 2");
722
+ if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
723
+ return new Date(e.getTime());
724
+ if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
725
+ return new Date(e);
726
+ if (Object.prototype.toString.call(e) !== "[object String]")
727
+ return /* @__PURE__ */ new Date(NaN);
728
+ const a = Ba(e), { year: i, restDateString: s } = Ha(a.date, n), c = Ya(s, i);
729
+ if (c === null || isNaN(c.getTime()))
730
+ return /* @__PURE__ */ new Date(NaN);
731
+ if (c) {
732
+ const d = c.getTime();
733
+ let y = 0, m;
734
+ if (a.time && (y = Va(a.time), y === null || isNaN(y)))
735
+ return /* @__PURE__ */ new Date(NaN);
736
+ if (a.timeZone || t.timeZone) {
737
+ if (m = Ke(a.timeZone || t.timeZone, new Date(d + y)), isNaN(m))
738
+ return /* @__PURE__ */ new Date(NaN);
739
+ } else
740
+ m = sn(new Date(d + y)), m = sn(new Date(d + y + m));
741
+ return new Date(d + y + m);
742
+ } else
743
+ return /* @__PURE__ */ new Date(NaN);
744
+ }
745
+ function Ba(e) {
746
+ const t = {};
747
+ let n = E.dateTimePattern.exec(e), a;
748
+ if (n ? (t.date = n[1], a = n[3]) : (n = E.datePattern.exec(e), n ? (t.date = n[1], a = n[2]) : (t.date = null, a = e)), a) {
749
+ const i = E.timeZone.exec(a);
750
+ i ? (t.time = a.replace(i[1], ""), t.timeZone = i[1].trim()) : t.time = a;
751
+ }
752
+ return t;
753
+ }
754
+ function Ha(e, t) {
755
+ if (e) {
756
+ const n = E.YYY[t], a = E.YYYYY[t];
757
+ let i = E.YYYY.exec(e) || a.exec(e);
758
+ if (i) {
759
+ const s = i[1];
760
+ return {
761
+ year: parseInt(s, 10),
762
+ restDateString: e.slice(s.length)
763
+ };
764
+ }
765
+ if (i = E.YY.exec(e) || n.exec(e), i) {
766
+ const s = i[1];
767
+ return {
768
+ year: parseInt(s, 10) * 100,
769
+ restDateString: e.slice(s.length)
770
+ };
771
+ }
772
+ }
773
+ return {
774
+ year: null
775
+ };
776
+ }
777
+ function Ya(e, t) {
778
+ if (t === null)
779
+ return null;
780
+ let n, a, i;
781
+ if (!e || !e.length)
782
+ return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
783
+ let s = E.MM.exec(e);
784
+ if (s)
785
+ return n = /* @__PURE__ */ new Date(0), a = parseInt(s[1], 10) - 1, cn(t, a) ? (n.setUTCFullYear(t, a), n) : /* @__PURE__ */ new Date(NaN);
786
+ if (s = E.DDD.exec(e), s) {
787
+ n = /* @__PURE__ */ new Date(0);
788
+ const c = parseInt(s[1], 10);
789
+ return Ka(t, c) ? (n.setUTCFullYear(t, 0, c), n) : /* @__PURE__ */ new Date(NaN);
790
+ }
791
+ if (s = E.MMDD.exec(e), s) {
792
+ n = /* @__PURE__ */ new Date(0), a = parseInt(s[1], 10) - 1;
793
+ const c = parseInt(s[2], 10);
794
+ return cn(t, a, c) ? (n.setUTCFullYear(t, a, c), n) : /* @__PURE__ */ new Date(NaN);
795
+ }
796
+ if (s = E.Www.exec(e), s)
797
+ return i = parseInt(s[1], 10) - 1, dn(i) ? un(t, i) : /* @__PURE__ */ new Date(NaN);
798
+ if (s = E.WwwD.exec(e), s) {
799
+ i = parseInt(s[1], 10) - 1;
800
+ const c = parseInt(s[2], 10) - 1;
801
+ return dn(i, c) ? un(t, i, c) : /* @__PURE__ */ new Date(NaN);
802
+ }
803
+ return null;
804
+ }
805
+ function Va(e) {
806
+ let t, n, a = E.HH.exec(e);
807
+ if (a)
808
+ return t = parseFloat(a[1].replace(",", ".")), yt(t) ? t % 24 * pt : NaN;
809
+ if (a = E.HHMM.exec(e), a)
810
+ return t = parseInt(a[1], 10), n = parseFloat(a[2].replace(",", ".")), yt(t, n) ? t % 24 * pt + n * ln : NaN;
811
+ if (a = E.HHMMSS.exec(e), a) {
812
+ t = parseInt(a[1], 10), n = parseInt(a[2], 10);
813
+ const i = parseFloat(a[3].replace(",", "."));
814
+ return yt(t, n, i) ? t % 24 * pt + n * ln + i * 1e3 : NaN;
815
+ }
816
+ return null;
817
+ }
818
+ function un(e, t, n) {
819
+ t = t || 0, n = n || 0;
820
+ const a = /* @__PURE__ */ new Date(0);
821
+ a.setUTCFullYear(e, 0, 4);
822
+ const i = a.getUTCDay() || 7, s = t * 7 + n + 1 - i;
823
+ return a.setUTCDate(a.getUTCDate() + s), a;
824
+ }
825
+ const za = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ja = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
826
+ function Nn(e) {
827
+ return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
828
+ }
829
+ function cn(e, t, n) {
830
+ if (t < 0 || t > 11)
831
+ return !1;
832
+ if (n != null) {
833
+ if (n < 1)
834
+ return !1;
835
+ const a = Nn(e);
836
+ if (a && n > ja[t] || !a && n > za[t])
837
+ return !1;
838
+ }
839
+ return !0;
840
+ }
841
+ function Ka(e, t) {
842
+ if (t < 1)
843
+ return !1;
844
+ const n = Nn(e);
845
+ return !(n && t > 366 || !n && t > 365);
846
+ }
847
+ function dn(e, t) {
848
+ return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
849
+ }
850
+ function yt(e, t, n) {
851
+ return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
852
+ }
853
+ function $a(e, t, n) {
854
+ e = wt(e, n);
855
+ const a = Ke(t, e, !0), i = new Date(e.getTime() - a), s = /* @__PURE__ */ new Date(0);
856
+ return s.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), s.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), s;
857
+ }
858
+ function Wa(e, t, n) {
859
+ if (typeof e == "string" && !e.match(kn))
860
+ return wt(e, { ...n, timeZone: t });
861
+ e = wt(e, n);
862
+ const a = Ft(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), i = Ke(t, new Date(a));
863
+ return new Date(a + i);
864
+ }
865
+ function Za(e, t) {
866
+ return -Ke(e, t);
867
+ }
868
+ var Ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ye = { exports: {} };
869
+ Ye.exports;
870
+ (function(e, t) {
871
+ var n = 200, a = "__lodash_hash_undefined__", i = 9007199254740991, s = "[object Arguments]", c = "[object Array]", d = "[object Boolean]", y = "[object Date]", m = "[object Error]", u = "[object Function]", f = "[object GeneratorFunction]", _ = "[object Map]", v = "[object Number]", F = "[object Object]", N = "[object Promise]", P = "[object RegExp]", Q = "[object Set]", U = "[object String]", ie = "[object Symbol]", b = "[object WeakMap]", We = "[object ArrayBuffer]", de = "[object DataView]", g = "[object Float32Array]", T = "[object Float64Array]", M = "[object Int8Array]", D = "[object Int16Array]", ee = "[object Int32Array]", K = "[object Uint8Array]", B = "[object Uint8ClampedArray]", te = "[object Uint16Array]", ne = "[object Uint32Array]", L = /[\\^$.*+?()[\]{}|]/g, H = /\w*$/, Y = /^\[object .+?Constructor\]$/, V = /^(?:0|[1-9]\d*)$/, w = {};
872
+ w[s] = w[c] = w[We] = w[de] = w[d] = w[y] = w[g] = w[T] = w[M] = w[D] = w[ee] = w[_] = w[v] = w[F] = w[P] = w[Q] = w[U] = w[ie] = w[K] = w[B] = w[te] = w[ne] = !0, w[m] = w[u] = w[b] = !1;
873
+ var z = typeof Ue == "object" && Ue && Ue.Object === Object && Ue, me = typeof self == "object" && self && self.Object === Object && self, R = z || me || Function("return this")(), $ = t && !t.nodeType && t, Oe = $ && !0 && e && !e.nodeType && e, Ze = Oe && Oe.exports === $;
874
+ function qe(r, o) {
875
+ return r.set(o[0], o[1]), r;
876
+ }
877
+ function Je(r, o) {
878
+ return r.add(o), r;
879
+ }
880
+ function fe(r, o) {
881
+ for (var l = -1, h = r ? r.length : 0; ++l < h && o(r[l], l, r) !== !1; )
882
+ ;
883
+ return r;
884
+ }
885
+ function On(r, o) {
886
+ for (var l = -1, h = o.length, S = r.length; ++l < h; )
887
+ r[S + l] = o[l];
888
+ return r;
889
+ }
890
+ function Et(r, o, l, h) {
891
+ for (var S = -1, O = r ? r.length : 0; ++S < O; )
892
+ l = o(l, r[S], S, r);
893
+ return l;
894
+ }
895
+ function In(r, o) {
896
+ for (var l = -1, h = Array(r); ++l < r; )
897
+ h[l] = o(l);
898
+ return h;
899
+ }
900
+ function Ln(r, o) {
901
+ return r == null ? void 0 : r[o];
902
+ }
903
+ function Rt(r) {
904
+ var o = !1;
905
+ if (r != null && typeof r.toString != "function")
906
+ try {
907
+ o = !!(r + "");
908
+ } catch {
909
+ }
910
+ return o;
911
+ }
912
+ function Ot(r) {
913
+ var o = -1, l = Array(r.size);
914
+ return r.forEach(function(h, S) {
915
+ l[++o] = [S, h];
916
+ }), l;
917
+ }
918
+ function Xe(r, o) {
919
+ return function(l) {
920
+ return r(o(l));
921
+ };
922
+ }
923
+ function It(r) {
924
+ var o = -1, l = Array(r.size);
925
+ return r.forEach(function(h) {
926
+ l[++o] = h;
927
+ }), l;
928
+ }
929
+ var Gn = Array.prototype, Cn = Function.prototype, Ie = Object.prototype, Qe = R["__core-js_shared__"], Lt = function() {
930
+ var r = /[^.]+$/.exec(Qe && Qe.keys && Qe.keys.IE_PROTO || "");
931
+ return r ? "Symbol(src)_1." + r : "";
932
+ }(), Gt = Cn.toString, re = Ie.hasOwnProperty, Le = Ie.toString, An = RegExp(
933
+ "^" + Gt.call(re).replace(L, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
934
+ ), Ct = Ze ? R.Buffer : void 0, At = R.Symbol, Pt = R.Uint8Array, Pn = Xe(Object.getPrototypeOf, Object), Un = Object.create, bn = Ie.propertyIsEnumerable, Bn = Gn.splice, Ut = Object.getOwnPropertySymbols, Hn = Ct ? Ct.isBuffer : void 0, Yn = Xe(Object.keys, Object), et = ye(R, "DataView"), Me = ye(R, "Map"), tt = ye(R, "Promise"), nt = ye(R, "Set"), rt = ye(R, "WeakMap"), Fe = ye(Object, "create"), Vn = le(et), zn = le(Me), jn = le(tt), Kn = le(nt), $n = le(rt), bt = At ? At.prototype : void 0, Bt = bt ? bt.valueOf : void 0;
935
+ function oe(r) {
936
+ var o = -1, l = r ? r.length : 0;
937
+ for (this.clear(); ++o < l; ) {
938
+ var h = r[o];
939
+ this.set(h[0], h[1]);
940
+ }
941
+ }
942
+ function Wn() {
943
+ this.__data__ = Fe ? Fe(null) : {};
944
+ }
945
+ function Zn(r) {
946
+ return this.has(r) && delete this.__data__[r];
947
+ }
948
+ function qn(r) {
949
+ var o = this.__data__;
950
+ if (Fe) {
951
+ var l = o[r];
952
+ return l === a ? void 0 : l;
953
+ }
954
+ return re.call(o, r) ? o[r] : void 0;
955
+ }
956
+ function Jn(r) {
957
+ var o = this.__data__;
958
+ return Fe ? o[r] !== void 0 : re.call(o, r);
959
+ }
960
+ function Xn(r, o) {
961
+ var l = this.__data__;
962
+ return l[r] = Fe && o === void 0 ? a : o, this;
963
+ }
964
+ oe.prototype.clear = Wn, oe.prototype.delete = Zn, oe.prototype.get = qn, oe.prototype.has = Jn, oe.prototype.set = Xn;
965
+ function W(r) {
966
+ var o = -1, l = r ? r.length : 0;
967
+ for (this.clear(); ++o < l; ) {
968
+ var h = r[o];
969
+ this.set(h[0], h[1]);
970
+ }
971
+ }
972
+ function Qn() {
973
+ this.__data__ = [];
974
+ }
975
+ function er(r) {
976
+ var o = this.__data__, l = Ge(o, r);
977
+ if (l < 0)
978
+ return !1;
979
+ var h = o.length - 1;
980
+ return l == h ? o.pop() : Bn.call(o, l, 1), !0;
981
+ }
982
+ function tr(r) {
983
+ var o = this.__data__, l = Ge(o, r);
984
+ return l < 0 ? void 0 : o[l][1];
985
+ }
986
+ function nr(r) {
987
+ return Ge(this.__data__, r) > -1;
988
+ }
989
+ function rr(r, o) {
990
+ var l = this.__data__, h = Ge(l, r);
991
+ return h < 0 ? l.push([r, o]) : l[h][1] = o, this;
992
+ }
993
+ W.prototype.clear = Qn, W.prototype.delete = er, W.prototype.get = tr, W.prototype.has = nr, W.prototype.set = rr;
994
+ function he(r) {
995
+ var o = -1, l = r ? r.length : 0;
996
+ for (this.clear(); ++o < l; ) {
997
+ var h = r[o];
998
+ this.set(h[0], h[1]);
999
+ }
1000
+ }
1001
+ function ar() {
1002
+ this.__data__ = {
1003
+ hash: new oe(),
1004
+ map: new (Me || W)(),
1005
+ string: new oe()
1006
+ };
1007
+ }
1008
+ function ir(r) {
1009
+ return Ce(this, r).delete(r);
1010
+ }
1011
+ function or(r) {
1012
+ return Ce(this, r).get(r);
1013
+ }
1014
+ function sr(r) {
1015
+ return Ce(this, r).has(r);
1016
+ }
1017
+ function lr(r, o) {
1018
+ return Ce(this, r).set(r, o), this;
1019
+ }
1020
+ he.prototype.clear = ar, he.prototype.delete = ir, he.prototype.get = or, he.prototype.has = sr, he.prototype.set = lr;
1021
+ function pe(r) {
1022
+ this.__data__ = new W(r);
1023
+ }
1024
+ function ur() {
1025
+ this.__data__ = new W();
1026
+ }
1027
+ function cr(r) {
1028
+ return this.__data__.delete(r);
1029
+ }
1030
+ function dr(r) {
1031
+ return this.__data__.get(r);
1032
+ }
1033
+ function mr(r) {
1034
+ return this.__data__.has(r);
1035
+ }
1036
+ function fr(r, o) {
1037
+ var l = this.__data__;
1038
+ if (l instanceof W) {
1039
+ var h = l.__data__;
1040
+ if (!Me || h.length < n - 1)
1041
+ return h.push([r, o]), this;
1042
+ l = this.__data__ = new he(h);
1043
+ }
1044
+ return l.set(r, o), this;
1045
+ }
1046
+ pe.prototype.clear = ur, pe.prototype.delete = cr, pe.prototype.get = dr, pe.prototype.has = mr, pe.prototype.set = fr;
1047
+ function hr(r, o) {
1048
+ var l = ot(r) || Ur(r) ? In(r.length, String) : [], h = l.length, S = !!h;
1049
+ for (var O in r)
1050
+ re.call(r, O) && !(S && (O == "length" || Gr(O, h))) && l.push(O);
1051
+ return l;
1052
+ }
1053
+ function Ht(r, o, l) {
1054
+ var h = r[o];
1055
+ (!(re.call(r, o) && jt(h, l)) || l === void 0 && !(o in r)) && (r[o] = l);
1056
+ }
1057
+ function Ge(r, o) {
1058
+ for (var l = r.length; l--; )
1059
+ if (jt(r[l][0], o))
1060
+ return l;
1061
+ return -1;
1062
+ }
1063
+ function pr(r, o) {
1064
+ return r && Yt(o, st(o), r);
1065
+ }
1066
+ function at(r, o, l, h, S, O, Z) {
1067
+ var I;
1068
+ if (h && (I = O ? h(r, S, O, Z) : h(r)), I !== void 0)
1069
+ return I;
1070
+ if (!Ae(r))
1071
+ return r;
1072
+ var Wt = ot(r);
1073
+ if (Wt) {
1074
+ if (I = Or(r), !o)
1075
+ return Nr(r, I);
1076
+ } else {
1077
+ var _e = se(r), Zt = _e == u || _e == f;
1078
+ if (Br(r))
1079
+ return xr(r, o);
1080
+ if (_e == F || _e == s || Zt && !O) {
1081
+ if (Rt(r))
1082
+ return O ? r : {};
1083
+ if (I = Ir(Zt ? {} : r), !o)
1084
+ return Er(r, pr(I, r));
1085
+ } else {
1086
+ if (!w[_e])
1087
+ return O ? r : {};
1088
+ I = Lr(r, _e, at, o);
1089
+ }
1090
+ }
1091
+ Z || (Z = new pe());
1092
+ var qt = Z.get(r);
1093
+ if (qt)
1094
+ return qt;
1095
+ if (Z.set(r, I), !Wt)
1096
+ var Jt = l ? Rr(r) : st(r);
1097
+ return fe(Jt || r, function(lt, Pe) {
1098
+ Jt && (Pe = lt, lt = r[Pe]), Ht(I, Pe, at(lt, o, l, h, Pe, r, Z));
1099
+ }), I;
1100
+ }
1101
+ function yr(r) {
1102
+ return Ae(r) ? Un(r) : {};
1103
+ }
1104
+ function _r(r, o, l) {
1105
+ var h = o(r);
1106
+ return ot(r) ? h : On(h, l(r));
1107
+ }
1108
+ function gr(r) {
1109
+ return Le.call(r);
1110
+ }
1111
+ function vr(r) {
1112
+ if (!Ae(r) || Ar(r))
1113
+ return !1;
1114
+ var o = $t(r) || Rt(r) ? An : Y;
1115
+ return o.test(le(r));
1116
+ }
1117
+ function wr(r) {
1118
+ if (!zt(r))
1119
+ return Yn(r);
1120
+ var o = [];
1121
+ for (var l in Object(r))
1122
+ re.call(r, l) && l != "constructor" && o.push(l);
1123
+ return o;
1124
+ }
1125
+ function xr(r, o) {
1126
+ if (o)
1127
+ return r.slice();
1128
+ var l = new r.constructor(r.length);
1129
+ return r.copy(l), l;
1130
+ }
1131
+ function it(r) {
1132
+ var o = new r.constructor(r.byteLength);
1133
+ return new Pt(o).set(new Pt(r)), o;
1134
+ }
1135
+ function Tr(r, o) {
1136
+ var l = o ? it(r.buffer) : r.buffer;
1137
+ return new r.constructor(l, r.byteOffset, r.byteLength);
1138
+ }
1139
+ function Mr(r, o, l) {
1140
+ var h = o ? l(Ot(r), !0) : Ot(r);
1141
+ return Et(h, qe, new r.constructor());
1142
+ }
1143
+ function Fr(r) {
1144
+ var o = new r.constructor(r.source, H.exec(r));
1145
+ return o.lastIndex = r.lastIndex, o;
1146
+ }
1147
+ function Sr(r, o, l) {
1148
+ var h = o ? l(It(r), !0) : It(r);
1149
+ return Et(h, Je, new r.constructor());
1150
+ }
1151
+ function Dr(r) {
1152
+ return Bt ? Object(Bt.call(r)) : {};
1153
+ }
1154
+ function kr(r, o) {
1155
+ var l = o ? it(r.buffer) : r.buffer;
1156
+ return new r.constructor(l, r.byteOffset, r.length);
1157
+ }
1158
+ function Nr(r, o) {
1159
+ var l = -1, h = r.length;
1160
+ for (o || (o = Array(h)); ++l < h; )
1161
+ o[l] = r[l];
1162
+ return o;
1163
+ }
1164
+ function Yt(r, o, l, h) {
1165
+ l || (l = {});
1166
+ for (var S = -1, O = o.length; ++S < O; ) {
1167
+ var Z = o[S], I = void 0;
1168
+ Ht(l, Z, I === void 0 ? r[Z] : I);
1169
+ }
1170
+ return l;
1171
+ }
1172
+ function Er(r, o) {
1173
+ return Yt(r, Vt(r), o);
1174
+ }
1175
+ function Rr(r) {
1176
+ return _r(r, st, Vt);
1177
+ }
1178
+ function Ce(r, o) {
1179
+ var l = r.__data__;
1180
+ return Cr(o) ? l[typeof o == "string" ? "string" : "hash"] : l.map;
1181
+ }
1182
+ function ye(r, o) {
1183
+ var l = Ln(r, o);
1184
+ return vr(l) ? l : void 0;
1185
+ }
1186
+ var Vt = Ut ? Xe(Ut, Object) : Vr, se = gr;
1187
+ (et && se(new et(new ArrayBuffer(1))) != de || Me && se(new Me()) != _ || tt && se(tt.resolve()) != N || nt && se(new nt()) != Q || rt && se(new rt()) != b) && (se = function(r) {
1188
+ var o = Le.call(r), l = o == F ? r.constructor : void 0, h = l ? le(l) : void 0;
1189
+ if (h)
1190
+ switch (h) {
1191
+ case Vn:
1192
+ return de;
1193
+ case zn:
1194
+ return _;
1195
+ case jn:
1196
+ return N;
1197
+ case Kn:
1198
+ return Q;
1199
+ case $n:
1200
+ return b;
1201
+ }
1202
+ return o;
1203
+ });
1204
+ function Or(r) {
1205
+ var o = r.length, l = r.constructor(o);
1206
+ return o && typeof r[0] == "string" && re.call(r, "index") && (l.index = r.index, l.input = r.input), l;
1207
+ }
1208
+ function Ir(r) {
1209
+ return typeof r.constructor == "function" && !zt(r) ? yr(Pn(r)) : {};
1210
+ }
1211
+ function Lr(r, o, l, h) {
1212
+ var S = r.constructor;
1213
+ switch (o) {
1214
+ case We:
1215
+ return it(r);
1216
+ case d:
1217
+ case y:
1218
+ return new S(+r);
1219
+ case de:
1220
+ return Tr(r, h);
1221
+ case g:
1222
+ case T:
1223
+ case M:
1224
+ case D:
1225
+ case ee:
1226
+ case K:
1227
+ case B:
1228
+ case te:
1229
+ case ne:
1230
+ return kr(r, h);
1231
+ case _:
1232
+ return Mr(r, h, l);
1233
+ case v:
1234
+ case U:
1235
+ return new S(r);
1236
+ case P:
1237
+ return Fr(r);
1238
+ case Q:
1239
+ return Sr(r, h, l);
1240
+ case ie:
1241
+ return Dr(r);
1242
+ }
1243
+ }
1244
+ function Gr(r, o) {
1245
+ return o = o ?? i, !!o && (typeof r == "number" || V.test(r)) && r > -1 && r % 1 == 0 && r < o;
1246
+ }
1247
+ function Cr(r) {
1248
+ var o = typeof r;
1249
+ return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? r !== "__proto__" : r === null;
1250
+ }
1251
+ function Ar(r) {
1252
+ return !!Lt && Lt in r;
1253
+ }
1254
+ function zt(r) {
1255
+ var o = r && r.constructor, l = typeof o == "function" && o.prototype || Ie;
1256
+ return r === l;
1257
+ }
1258
+ function le(r) {
1259
+ if (r != null) {
1260
+ try {
1261
+ return Gt.call(r);
1262
+ } catch {
1263
+ }
1264
+ try {
1265
+ return r + "";
1266
+ } catch {
1267
+ }
1268
+ }
1269
+ return "";
1270
+ }
1271
+ function Pr(r) {
1272
+ return at(r, !0, !0);
1273
+ }
1274
+ function jt(r, o) {
1275
+ return r === o || r !== r && o !== o;
1276
+ }
1277
+ function Ur(r) {
1278
+ return br(r) && re.call(r, "callee") && (!bn.call(r, "callee") || Le.call(r) == s);
1279
+ }
1280
+ var ot = Array.isArray;
1281
+ function Kt(r) {
1282
+ return r != null && Hr(r.length) && !$t(r);
1283
+ }
1284
+ function br(r) {
1285
+ return Yr(r) && Kt(r);
1286
+ }
1287
+ var Br = Hn || zr;
1288
+ function $t(r) {
1289
+ var o = Ae(r) ? Le.call(r) : "";
1290
+ return o == u || o == f;
1291
+ }
1292
+ function Hr(r) {
1293
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= i;
1294
+ }
1295
+ function Ae(r) {
1296
+ var o = typeof r;
1297
+ return !!r && (o == "object" || o == "function");
1298
+ }
1299
+ function Yr(r) {
1300
+ return !!r && typeof r == "object";
1301
+ }
1302
+ function st(r) {
1303
+ return Kt(r) ? hr(r) : wr(r);
1304
+ }
1305
+ function Vr() {
1306
+ return [];
1307
+ }
1308
+ function zr() {
1309
+ return !1;
1310
+ }
1311
+ e.exports = Pr;
1312
+ })(Ye, Ye.exports);
1313
+ Ye.exports;
1314
+ const X = (e, t) => new Date(e.getTime() - Za(t, e));
1315
+ class k {
1316
+ constructor(t) {
1317
+ G(this, "timeframeText"), G(this, "key"), G(this, "display"), G(this, "timeframeLength"), G(this, "allowedTiers"), G(this, "defaultResponseGranularity"), G(this, "dataGranularity"), G(this, "isRelative"), G(this, "fineGrainedDefaultGranularity"), G(this, "_startCustom"), G(this, "_endCustom"), G(this, "_allowedGranularitiesOverride"), this.display = t.display, this.timeframeText = t.timeframeText, this.key = t.key, this.timeframeLength = t.timeframeLength, this.allowedTiers = t.allowedTiers, this.defaultResponseGranularity = t.defaultResponseGranularity, this.dataGranularity = t.dataGranularity, this.isRelative = t.isRelative, this._startCustom = t.startCustom, this._endCustom = t.endCustom, this._allowedGranularitiesOverride = t.allowedGranularitiesOverride, this.fineGrainedDefaultGranularity = t.fineGrainedDefaultGranularity;
1318
+ }
1319
+ // rawEnd does not consider granularity and should not be used directly in queries.
1320
+ // Use `new QueryTime(timeframe, granularity?).queryEndSeconds()` instead.
1321
+ // eslint-disable-next-line -- `tz` is required because it's used in subclasses.
1322
+ rawEnd(t) {
1323
+ return this._endCustom || /* @__PURE__ */ new Date();
1324
+ }
1325
+ // rawStart does not consider granularity and should not be used directly in queries.
1326
+ // Use `new QueryTime(timeframe, granularity?).queryStartSeconds()` instead.
1327
+ // eslint-disable-next-line -- `tz` is required because it's used in subclasses.
1328
+ rawStart(t) {
1329
+ return this._startCustom || new Date(this.rawEnd().getTime() - this.timeframeLengthMs());
1330
+ }
1331
+ timeframeLengthMs() {
1332
+ return this.timeframeLength() * 1e3;
1333
+ }
1334
+ maximumTimeframeLength() {
1335
+ return this.timeframeLength();
1336
+ }
1337
+ allowedGranularities(t) {
1338
+ if (this._allowedGranularitiesOverride && t)
1339
+ return new Set(this._allowedGranularitiesOverride);
1340
+ const n = /* @__PURE__ */ new Set(), a = this.maximumTimeframeLength() / 3600;
1341
+ return a <= 6 && n.add("minutely"), a >= 2 && a <= 7 * 24 && n.add("hourly"), a >= 2 * 24 && n.add("daily"), a >= 2 * 24 * 14 && n.add("weekly"), n;
1342
+ }
1343
+ cacheKey() {
1344
+ return this.key !== "custom" ? this.key : `${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`;
1345
+ }
1346
+ v4Query(t) {
1347
+ if (this.key === "custom")
1348
+ return {
1349
+ type: "absolute",
1350
+ start: this.rawStart(),
1351
+ end: this.rawEnd(),
1352
+ tz: t
1353
+ };
1354
+ if (ya.includes(this.key))
1355
+ return {
1356
+ type: "relative",
1357
+ // Safe assertion; we just checked that key is a member of the union.
1358
+ time_range: this.key,
1359
+ tz: t
1360
+ };
1361
+ throw new Error("Unsupported relative time value for Explore");
1362
+ }
1363
+ tzAdjustedDate(t) {
1364
+ if (!t)
1365
+ return /* @__PURE__ */ new Date();
1366
+ const n = Wa(/* @__PURE__ */ new Date(), new Intl.DateTimeFormat().resolvedOptions().timeZone);
1367
+ return $a(n, t);
1368
+ }
1369
+ }
1370
+ class qa extends k {
1371
+ rawStart(t) {
1372
+ let n = He(this.tzAdjustedDate(t), { weekStartsOn: 1 });
1373
+ return t && (n = X(n, t)), n;
1374
+ }
1375
+ maximumTimeframeLength() {
1376
+ return 60 * 60 * 24 * 7;
1377
+ }
1378
+ }
1379
+ class Ja extends k {
1380
+ rawStart(t) {
1381
+ let n = we(this.tzAdjustedDate(t));
1382
+ return t && (n = X(n, t)), n;
1383
+ }
1384
+ maximumTimeframeLength() {
1385
+ return 60 * 60 * 24 * 31;
1386
+ }
1387
+ }
1388
+ class Xa extends k {
1389
+ rawStart(t) {
1390
+ let n = new Date(this.tzAdjustedDate(t).getFullYear(), 0, 1);
1391
+ return t && (n = X(n, t)), n;
1392
+ }
1393
+ maximumTimeframeLength() {
1394
+ return 60 * 60 * 24 * 366;
1395
+ }
1396
+ }
1397
+ class Qa extends k {
1398
+ rawEnd(t) {
1399
+ let n = He(this.tzAdjustedDate(t), { weekStartsOn: 1 });
1400
+ return t && (n = X(n, t)), n;
1401
+ }
1402
+ rawStart(t) {
1403
+ const n = this.tzAdjustedDate(t);
1404
+ let a = He(n.setDate(n.getDate() - 7), {
1405
+ weekStartsOn: 1
1406
+ });
1407
+ return t && (a = X(a, t)), a;
1408
+ }
1409
+ }
1410
+ class ei extends k {
1411
+ rawEnd(t) {
1412
+ let n = we(this.tzAdjustedDate(t));
1413
+ return t && (n = X(n, t)), n;
1414
+ }
1415
+ rawStart(t) {
1416
+ let n = we(Dn(this.tzAdjustedDate(t)));
1417
+ return t && (n = X(n, t)), n;
1418
+ }
1419
+ }
1420
+ class ti extends k {
1421
+ rawEnd(t) {
1422
+ let n = new Date(this.tzAdjustedDate(t).getFullYear(), 0, 1);
1423
+ return t && (n = X(n, t)), n;
1424
+ }
1425
+ rawStart(t) {
1426
+ let n = new Date(this.tzAdjustedDate(t).getFullYear() - 1, 0, 1);
1427
+ return t && (n = X(n, t)), n;
1428
+ }
1429
+ }
1430
+ p.FIFTEEN_MIN, new k({
1431
+ key: p.FIFTEEN_MIN,
1432
+ display: "Last 15 minutes",
1433
+ timeframeText: "15 minutes",
1434
+ timeframeLength: () => 60 * 15,
1435
+ defaultResponseGranularity: "minutely",
1436
+ dataGranularity: "minutely",
1437
+ isRelative: !0,
1438
+ fineGrainedDefaultGranularity: "thirtySecondly",
1439
+ allowedTiers: ["free", "trial", "plus", "enterprise"],
1440
+ allowedGranularitiesOverride: ["tenSecondly", "thirtySecondly", "minutely"]
1441
+ }), p.ONE_HOUR, new k({
1442
+ key: p.ONE_HOUR,
1443
+ display: "Last hour",
1444
+ timeframeText: "One hour",
1445
+ timeframeLength: () => 60 * 60 * 1,
1446
+ defaultResponseGranularity: "minutely",
1447
+ dataGranularity: "minutely",
1448
+ isRelative: !0,
1449
+ fineGrainedDefaultGranularity: "minutely",
1450
+ allowedTiers: ["free", "trial", "plus", "enterprise"],
1451
+ allowedGranularitiesOverride: ["tenSecondly", "thirtySecondly", "minutely", "fiveMinutely", "tenMinutely"]
1452
+ }), p.SIX_HOUR, new k({
1453
+ key: p.SIX_HOUR,
1454
+ display: "Last 6 hours",
1455
+ timeframeText: "6 hours",
1456
+ timeframeLength: () => 60 * 60 * 6,
1457
+ defaultResponseGranularity: "hourly",
1458
+ dataGranularity: "hourly",
1459
+ isRelative: !0,
1460
+ fineGrainedDefaultGranularity: "fiveMinutely",
1461
+ allowedTiers: ["free", "trial", "plus", "enterprise"],
1462
+ allowedGranularitiesOverride: ["thirtySecondly", "minutely", "fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
1463
+ }), p.TWELVE_HOUR, new k({
1464
+ key: p.TWELVE_HOUR,
1465
+ display: "Last 12 hours",
1466
+ timeframeText: "12 hours",
1467
+ timeframeLength: () => 60 * 60 * 12,
1468
+ defaultResponseGranularity: "hourly",
1469
+ dataGranularity: "hourly",
1470
+ isRelative: !0,
1471
+ fineGrainedDefaultGranularity: "tenMinutely",
1472
+ allowedTiers: ["free", "trial", "plus", "enterprise"],
1473
+ allowedGranularitiesOverride: ["minutely", "fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
1474
+ }), p.ONE_DAY, new k({
1475
+ key: p.ONE_DAY,
1476
+ display: "Last 24 hours",
1477
+ timeframeText: "24 hours",
1478
+ timeframeLength: () => 60 * 60 * 24,
1479
+ defaultResponseGranularity: "hourly",
1480
+ dataGranularity: "hourly",
1481
+ isRelative: !0,
1482
+ fineGrainedDefaultGranularity: "thirtyMinutely",
1483
+ allowedTiers: ["free", "trial", "plus", "enterprise"],
1484
+ allowedGranularitiesOverride: ["fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
1485
+ }), p.SEVEN_DAY, new k({
1486
+ key: p.SEVEN_DAY,
1487
+ display: "Last 7 days",
1488
+ timeframeText: "7 days",
1489
+ timeframeLength: () => 60 * 60 * 24 * 7,
1490
+ defaultResponseGranularity: "daily",
1491
+ dataGranularity: "daily",
1492
+ isRelative: !0,
1493
+ fineGrainedDefaultGranularity: "twoHourly",
1494
+ allowedTiers: ["trial", "plus", "enterprise"],
1495
+ allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
1496
+ }), p.THIRTY_DAY, new k({
1497
+ key: p.THIRTY_DAY,
1498
+ display: "Last 30 days",
1499
+ timeframeText: "30 days",
1500
+ timeframeLength: () => 60 * 60 * 24 * 30,
1501
+ defaultResponseGranularity: "daily",
1502
+ dataGranularity: "daily",
1503
+ isRelative: !0,
1504
+ fineGrainedDefaultGranularity: "twelveHourly",
1505
+ allowedTiers: ["trial", "plus", "enterprise"],
1506
+ allowedGranularitiesOverride: ["hourly", "twoHourly", "twelveHourly", "daily", "weekly"]
1507
+ }), p.NINETY_DAY, new k({
1508
+ key: p.NINETY_DAY,
1509
+ display: "Last 90 days",
1510
+ timeframeText: "90 days",
1511
+ timeframeLength: () => 60 * 60 * 24 * 90,
1512
+ defaultResponseGranularity: "daily",
1513
+ dataGranularity: "daily",
1514
+ isRelative: !0,
1515
+ fineGrainedDefaultGranularity: "daily",
1516
+ allowedTiers: ["trial", "plus", "enterprise"],
1517
+ allowedGranularitiesOverride: ["hourly", "twoHourly", "twelveHourly", "daily", "weekly"]
1518
+ }), p.ONE_HUNDRED_EIGHTY_DAY, new k({
1519
+ key: p.ONE_HUNDRED_EIGHTY_DAY,
1520
+ display: "Last 180 days",
1521
+ timeframeText: "180 days",
1522
+ timeframeLength: () => 60 * 60 * 24 * 180,
1523
+ defaultResponseGranularity: "daily",
1524
+ dataGranularity: "daily",
1525
+ isRelative: !0,
1526
+ fineGrainedDefaultGranularity: "daily",
1527
+ allowedTiers: ["trial", "plus", "enterprise"],
1528
+ allowedGranularitiesOverride: ["hourly", "twoHourly", "twelveHourly", "daily", "weekly"]
1529
+ }), p.ONE_YEAR, new k({
1530
+ key: p.ONE_YEAR,
1531
+ display: "Last 365 days",
1532
+ timeframeText: "365 days",
1533
+ timeframeLength: () => 60 * 60 * 24 * 365,
1534
+ defaultResponseGranularity: "daily",
1535
+ dataGranularity: "daily",
1536
+ isRelative: !0,
1537
+ fineGrainedDefaultGranularity: "daily",
1538
+ allowedTiers: ["trial", "plus", "enterprise"],
1539
+ allowedGranularitiesOverride: ["hourly", "twoHourly", "twelveHourly", "daily", "weekly"]
1540
+ }), p.CURRENT_WEEK, new qa({
1541
+ key: p.CURRENT_WEEK,
1542
+ display: "This week",
1543
+ timeframeText: "Week",
1544
+ timeframeLength: () => {
1545
+ const e = He(/* @__PURE__ */ new Date(), { weekStartsOn: 1 });
1546
+ return (dt(mt(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
1547
+ },
1548
+ defaultResponseGranularity: "daily",
1549
+ dataGranularity: "daily",
1550
+ isRelative: !1,
1551
+ fineGrainedDefaultGranularity: "twoHourly",
1552
+ allowedTiers: ["plus", "enterprise"],
1553
+ allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
1554
+ }), p.CURRENT_MONTH, new Ja({
1555
+ key: p.CURRENT_MONTH,
1556
+ display: "This month",
1557
+ timeframeText: "Month",
1558
+ timeframeLength: () => {
1559
+ const e = we(/* @__PURE__ */ new Date());
1560
+ return (dt(mt(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
1561
+ },
1562
+ defaultResponseGranularity: "daily",
1563
+ dataGranularity: "daily",
1564
+ isRelative: !1,
1565
+ allowedTiers: ["plus", "enterprise"]
1566
+ }), p.CURRENT_YEAR, new Xa({
1567
+ key: p.CURRENT_YEAR,
1568
+ display: "This year",
1569
+ timeframeText: "Year",
1570
+ timeframeLength: () => {
1571
+ const e = new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1);
1572
+ return (dt(mt(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
1573
+ },
1574
+ defaultResponseGranularity: "daily",
1575
+ dataGranularity: "daily",
1576
+ isRelative: !1,
1577
+ allowedTiers: ["plus", "enterprise"]
1578
+ }), p.PREVIOUS_WEEK, new Qa({
1579
+ key: p.PREVIOUS_WEEK,
1580
+ display: "Previous week",
1581
+ timeframeText: "Week",
1582
+ timeframeLength: () => 60 * 60 * 24 * 7,
1583
+ defaultResponseGranularity: "daily",
1584
+ dataGranularity: "daily",
1585
+ isRelative: !1,
1586
+ fineGrainedDefaultGranularity: "twoHourly",
1587
+ allowedTiers: ["plus", "enterprise"],
1588
+ allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
1589
+ }), p.PREVIOUS_MONTH, new ei({
1590
+ key: p.PREVIOUS_MONTH,
1591
+ display: "Previous month",
1592
+ timeframeText: "Month",
1593
+ timeframeLength: () => {
1594
+ let e = 0;
1595
+ const t = we(/* @__PURE__ */ new Date()), n = we(Dn(/* @__PURE__ */ new Date()));
1596
+ return t.getTimezoneOffset() !== n.getTimezoneOffset() && (e = mn(t, n)), 60 * 60 * 24 * ka((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 1)) + tn(e);
1597
+ },
1598
+ defaultResponseGranularity: "daily",
1599
+ dataGranularity: "daily",
1600
+ isRelative: !1,
1601
+ allowedTiers: ["plus", "enterprise"]
1602
+ }), p.PREVIOUS_YEAR, new ti({
1603
+ key: p.PREVIOUS_YEAR,
1604
+ display: "Previous year",
1605
+ timeframeText: "Year",
1606
+ timeframeLength: () => {
1607
+ const e = new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1), t = new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 0, 1);
1608
+ let n = 0;
1609
+ return e.getTimezoneOffset() !== t.getTimezoneOffset() && (n = mn(e, t)), 60 * 60 * 24 * (365 + (t.getFullYear() % 4 === 0 ? 1 : 0)) + tn(n);
1610
+ },
1611
+ defaultResponseGranularity: "daily",
1612
+ dataGranularity: "daily",
1613
+ isRelative: !1,
1614
+ allowedTiers: ["plus", "enterprise"]
1615
+ });
1616
+ function mn(e, t) {
1617
+ return Na(e.getTimezoneOffset() - t.getTimezoneOffset());
1618
+ }
1619
+ p.FIFTEEN_MIN, p.ONE_HOUR, p.SIX_HOUR, p.TWELVE_HOUR, p.ONE_DAY, p.SEVEN_DAY, p.FIFTEEN_MIN, p.ONE_HOUR, p.SIX_HOUR, p.TWELVE_HOUR, p.ONE_DAY, p.SEVEN_DAY, p.THIRTY_DAY, p.NINETY_DAY, p.ONE_HUNDRED_EIGHTY_DAY, p.ONE_YEAR, p.CURRENT_WEEK, p.CURRENT_MONTH, p.CURRENT_YEAR, p.PREVIOUS_WEEK, p.PREVIOUS_MONTH, p.PREVIOUS_YEAR;
1620
+ new Map(Mt.map((e) => [e.code, { code: e.code, name: e.name }]));
1621
+ const ke = "#e0e4ea", ni = "#828a9e", ri = "32px", fn = 5, _t = [
87
1622
  "#00819d",
88
1623
  "#00abd2",
89
1624
  "#00c8f4",
90
1625
  "#67e3ff",
91
1626
  "#b3f1ff"
92
- ], re = (e, t) => {
93
- const i = e.length;
94
- if (!i)
1627
+ ], ai = (e, t) => {
1628
+ const n = e.length;
1629
+ if (!n)
95
1630
  return NaN;
96
- const a = (i - 1) * t, n = Math.floor(a), o = Math.ceil(a);
97
- return n === o ? e[n] : e[n] + (a - n) * (e[o] - e[n]);
98
- }, c0 = (e, t) => {
1631
+ const a = (n - 1) * t, i = Math.floor(a), s = Math.ceil(a);
1632
+ return i === s ? e[i] : e[i] + (a - i) * (e[s] - e[i]);
1633
+ }, gt = (e, t) => {
99
1634
  if (e.length === 0)
100
1635
  return [];
101
- const i = e.filter((c) => c > 0).map(Math.log).sort((c, f) => c - f), a = Math.min(...i), o = (Math.max(...i) - a) / t;
102
- return Array.from({ length: t }, (c, f) => a + f * o).map((c) => Math.exp(c)).reverse();
1636
+ const n = e.filter((d) => d > 0).map(Math.log).sort((d, y) => d - y), a = Math.min(...n), s = (Math.max(...n) - a) / t;
1637
+ return Array.from({ length: t }, (d, y) => a + y * s).map((d) => Math.exp(d)).reverse();
103
1638
  };
104
- function oe({
1639
+ function ii({
105
1640
  countryMetrics: e,
106
1641
  metric: t
107
1642
  }) {
108
- const i = k(() => Object.values(e.value)), a = k(() => Object.keys(e.value).length), n = k(() => a.value < _0 - 1 ? a.value : _0), o = k(() => {
109
- var r;
110
- return !((r = t.value) != null && r.includes("latency"));
111
- }), s = k(() => {
112
- const r = [];
113
- if (i.value.length > 10) {
114
- const u = [...i.value].sort((C, X) => C - X), h = re(u, 0.25), m = i.value.filter((C) => C >= h), _ = i.value.filter((C) => C < h), v = c0(m, 3), o0 = c0(_, 2);
115
- return r.push(...v, ...o0), r;
1643
+ const n = C(() => {
1644
+ const f = { ...e.value };
1645
+ for (const _ of Object.keys(f))
1646
+ Mt.find((v) => v.code === _) || delete f[_];
1647
+ return f;
1648
+ }), a = C(() => Object.values(n.value)), i = C(() => Object.keys(n.value).length), s = C(() => i.value < fn - 1 ? i.value : fn), c = C(() => {
1649
+ var f;
1650
+ return !((f = t.value) != null && f.includes("latency"));
1651
+ }), d = C(() => {
1652
+ const f = [];
1653
+ if (a.value.length > 10) {
1654
+ const _ = [...a.value].sort((U, ie) => U - ie), v = ai(_, 0.75), F = a.value.filter((U) => U >= v), N = a.value.filter((U) => U < v), P = gt(F, 3), Q = gt(N, 2);
1655
+ return f.push(...P, ...Q), f;
116
1656
  }
117
- return c0(i.value, n.value);
118
- }), c = k(() => i.value.length === 1 ? [{
119
- color: f(i.value[0]),
120
- range: l(i.value[0])
121
- }] : s.value.map((r, u) => {
122
- const h = u === 0 ? Math.max(...s.value) : s.value[u - 1], m = r, _ = h;
123
- let v = "";
124
- return u === 0 ? v = `> ${l(m)}` : u === s.value.length - 1 ? v = `< ${l(_)}` : v = `${l(m)} - ${l(_)}`, {
125
- color: f(m),
126
- range: v
1657
+ return gt(a.value, s.value);
1658
+ }), y = C(() => a.value.length === 1 ? [{
1659
+ color: m(a.value[0]),
1660
+ range: u(a.value[0])
1661
+ }] : d.value.map((f, _) => {
1662
+ const v = _ === 0 ? Math.max(...d.value) : d.value[_ - 1], F = f, N = v;
1663
+ let P = "";
1664
+ return _ === 0 ? P = `> ${u(F)}` : _ === d.value.length - 1 ? P = `< ${u(N)}` : P = `${u(F)} - ${u(N)}`, {
1665
+ color: m(F),
1666
+ range: P
127
1667
  };
128
- })), f = (r) => {
129
- if (r === 0)
130
- return Z;
131
- const u = s.value.findIndex((h) => r >= h);
132
- return u === -1 ? u0[u0.length - 1] : u0[u] ?? Z;
133
- }, l = (r) => {
134
- var h;
135
- const u = Math.trunc(r);
136
- return o.value ? ie(u, { capital: !0 }) : new Intl.NumberFormat(((h = document == null ? void 0 : document.documentElement) == null ? void 0 : h.lang) || "en-US").format(u);
1668
+ })), m = (f) => {
1669
+ if (f === 0)
1670
+ return ke;
1671
+ const _ = d.value.findIndex((v) => f >= v);
1672
+ return _ === -1 ? _t[_t.length - 1] : _t[_] ?? ke;
1673
+ }, u = (f) => {
1674
+ var v;
1675
+ const _ = Math.trunc(f);
1676
+ return c.value ? da(_, { capital: !0 }) : new Intl.NumberFormat(((v = document == null ? void 0 : document.documentElement) == null ? void 0 : v.lang) || "en-US").format(_);
137
1677
  };
138
1678
  return {
139
- getColor: f,
140
- formatMetric: l,
141
- legendData: c,
142
- scale: s
1679
+ getColor: m,
1680
+ formatMetric: u,
1681
+ legendData: y,
1682
+ scale: d
143
1683
  };
144
1684
  }
145
- const F0 = {
146
- useI18n: ee,
147
- useMetricUtils: oe
148
- }, se = "FeatureCollection", le = [
1685
+ const hn = {
1686
+ useI18n: ua,
1687
+ useMetricUtils: ii
1688
+ }, oi = "FeatureCollection", si = [
149
1689
  {
150
1690
  type: "Feature",
151
1691
  properties: {
@@ -2577,11 +4117,11 @@ const F0 = {
2577
4117
  ]
2578
4118
  }
2579
4119
  }
2580
- ], ue = {
2581
- type: se,
2582
- features: le
4120
+ ], li = {
4121
+ type: oi,
4122
+ features: si
2583
4123
  };
2584
- var ce = fe, i0, G, F, n0, r0, de = [
4124
+ var ui = di, Ve, xe, A, ze, $e, ci = [
2585
4125
  "Point",
2586
4126
  "MultiPoint",
2587
4127
  "LineString",
@@ -2590,123 +4130,123 @@ var ce = fe, i0, G, F, n0, r0, de = [
2590
4130
  "MultiPolygon",
2591
4131
  "GeometryCollection"
2592
4132
  ];
2593
- function fe(e) {
2594
- n0 = 2, r0 = Math.pow(10, 6), F = null, i0 = [], G = [];
2595
- var t = e.readFields(he, {});
2596
- return i0 = null, t;
4133
+ function di(e) {
4134
+ ze = 2, $e = Math.pow(10, 6), A = null, Ve = [], xe = [];
4135
+ var t = e.readFields(mi, {});
4136
+ return Ve = null, t;
2597
4137
  }
2598
- function he(e, t, i) {
2599
- e === 1 ? i0.push(i.readString()) : e === 2 ? n0 = i.readVarint() : e === 3 ? r0 = Math.pow(10, i.readVarint()) : e === 4 ? pe(i, t) : e === 5 ? V0(i, t) : e === 6 && h0(i, t);
4138
+ function mi(e, t, n) {
4139
+ e === 1 ? Ve.push(n.readString()) : e === 2 ? ze = n.readVarint() : e === 3 ? $e = Math.pow(10, n.readVarint()) : e === 4 ? fi(n, t) : e === 5 ? En(n, t) : e === 6 && St(n, t);
2600
4140
  }
2601
- function pe(e, t) {
2602
- return t.type = "FeatureCollection", t.features = [], e.readMessage(me, t);
4141
+ function fi(e, t) {
4142
+ return t.type = "FeatureCollection", t.features = [], e.readMessage(hi, t);
2603
4143
  }
2604
- function V0(e, t) {
4144
+ function En(e, t) {
2605
4145
  t.type = "Feature";
2606
- var i = e.readMessage(ye, t);
2607
- return "geometry" in i || (i.geometry = null), i;
4146
+ var n = e.readMessage(pi, t);
4147
+ return "geometry" in n || (n.geometry = null), n;
2608
4148
  }
2609
- function h0(e, t) {
2610
- return t.type = "Point", e.readMessage(xe, t);
4149
+ function St(e, t) {
4150
+ return t.type = "Point", e.readMessage(yi, t);
2611
4151
  }
2612
- function me(e, t, i) {
2613
- e === 1 ? t.features.push(V0(i, {})) : e === 13 ? G.push(p0(i)) : e === 15 && a0(i, t);
4152
+ function hi(e, t, n) {
4153
+ e === 1 ? t.features.push(En(n, {})) : e === 13 ? xe.push(Dt(n)) : e === 15 && je(n, t);
2614
4154
  }
2615
- function ye(e, t, i) {
2616
- e === 1 ? t.geometry = h0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? G.push(p0(i)) : e === 14 ? t.properties = a0(i, {}) : e === 15 && a0(i, t);
4155
+ function pi(e, t, n) {
4156
+ e === 1 ? t.geometry = St(n, {}) : e === 11 ? t.id = n.readString() : e === 12 ? t.id = n.readSVarint() : e === 13 ? xe.push(Dt(n)) : e === 14 ? t.properties = je(n, {}) : e === 15 && je(n, t);
2617
4157
  }
2618
- function xe(e, t, i) {
2619
- e === 1 ? t.type = de[i.readVarint()] : e === 2 ? F = i.readPackedVarint() : e === 3 ? ve(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(h0(i, {}))) : e === 13 ? G.push(p0(i)) : e === 15 && a0(i, t);
4158
+ function yi(e, t, n) {
4159
+ e === 1 ? t.type = ci[n.readVarint()] : e === 2 ? A = n.readPackedVarint() : e === 3 ? _i(t, n, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(St(n, {}))) : e === 13 ? xe.push(Dt(n)) : e === 15 && je(n, t);
2620
4160
  }
2621
- function ve(e, t, i) {
2622
- i === "Point" ? e.coordinates = ge(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = w0(t) : i === "MultiLineString" ? e.coordinates = k0(t) : i === "Polygon" ? e.coordinates = k0(t, !0) : i === "MultiPolygon" && (e.coordinates = _e(t));
4161
+ function _i(e, t, n) {
4162
+ n === "Point" ? e.coordinates = gi(t) : n === "MultiPoint" || n === "LineString" ? e.coordinates = pn(t) : n === "MultiLineString" ? e.coordinates = yn(t) : n === "Polygon" ? e.coordinates = yn(t, !0) : n === "MultiPolygon" && (e.coordinates = vi(t));
2623
4163
  }
2624
- function p0(e) {
2625
- for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
2626
- var a = e.readVarint(), n = a >> 3;
2627
- 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()));
4164
+ function Dt(e) {
4165
+ for (var t = e.readVarint() + e.pos, n = null; e.pos < t; ) {
4166
+ var a = e.readVarint(), i = a >> 3;
4167
+ i === 1 ? n = e.readString() : i === 2 ? n = e.readDouble() : i === 3 ? n = e.readVarint() : i === 4 ? n = -e.readVarint() : i === 5 ? n = e.readBoolean() : i === 6 && (n = JSON.parse(e.readString()));
2628
4168
  }
2629
- return i;
4169
+ return n;
2630
4170
  }
2631
- function a0(e, t) {
2632
- for (var i = e.readVarint() + e.pos; e.pos < i; ) t[i0[e.readVarint()]] = G[e.readVarint()];
2633
- return G = [], t;
4171
+ function je(e, t) {
4172
+ for (var n = e.readVarint() + e.pos; e.pos < n; ) t[Ve[e.readVarint()]] = xe[e.readVarint()];
4173
+ return xe = [], t;
2634
4174
  }
2635
- function ge(e) {
2636
- for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / r0);
2637
- return i;
4175
+ function gi(e) {
4176
+ for (var t = e.readVarint() + e.pos, n = []; e.pos < t; ) n.push(e.readSVarint() / $e);
4177
+ return n;
2638
4178
  }
2639
- function J(e, t, i, a) {
2640
- var n = 0, o = [], s, c, f = [];
2641
- for (c = 0; c < n0; c++) f[c] = 0;
2642
- for (; i ? n < i : e.pos < t; ) {
2643
- for (s = [], c = 0; c < n0; c++)
2644
- f[c] += e.readSVarint(), s[c] = f[c] / r0;
2645
- o.push(s), n++;
4179
+ function Ee(e, t, n, a) {
4180
+ var i = 0, s = [], c, d, y = [];
4181
+ for (d = 0; d < ze; d++) y[d] = 0;
4182
+ for (; n ? i < n : e.pos < t; ) {
4183
+ for (c = [], d = 0; d < ze; d++)
4184
+ y[d] += e.readSVarint(), c[d] = y[d] / $e;
4185
+ s.push(c), i++;
2646
4186
  }
2647
- return a && o.push(o[0]), o;
4187
+ return a && s.push(s[0]), s;
2648
4188
  }
2649
- function w0(e) {
2650
- return J(e, e.readVarint() + e.pos);
4189
+ function pn(e) {
4190
+ return Ee(e, e.readVarint() + e.pos);
2651
4191
  }
2652
- function k0(e, t) {
2653
- var i = e.readVarint() + e.pos;
2654
- if (!F) return [J(e, i, null, t)];
2655
- for (var a = [], n = 0; n < F.length; n++) a.push(J(e, i, F[n], t));
2656
- return F = null, a;
4192
+ function yn(e, t) {
4193
+ var n = e.readVarint() + e.pos;
4194
+ if (!A) return [Ee(e, n, null, t)];
4195
+ for (var a = [], i = 0; i < A.length; i++) a.push(Ee(e, n, A[i], t));
4196
+ return A = null, a;
2657
4197
  }
2658
- function _e(e) {
4198
+ function vi(e) {
2659
4199
  var t = e.readVarint() + e.pos;
2660
- if (!F) return [[J(e, t, null, !0)]];
2661
- for (var i = [], a = 1, n = 0; n < F[0]; n++) {
2662
- for (var o = [], s = 0; s < F[a]; s++) o.push(J(e, t, F[a + 1 + s], !0));
2663
- a += F[a] + 1, i.push(o);
4200
+ if (!A) return [[Ee(e, t, null, !0)]];
4201
+ for (var n = [], a = 1, i = 0; i < A[0]; i++) {
4202
+ for (var s = [], c = 0; c < A[a]; c++) s.push(Ee(e, t, A[a + 1 + c], !0));
4203
+ a += A[a] + 1, n.push(s);
2664
4204
  }
2665
- return F = null, i;
4205
+ return A = null, n;
2666
4206
  }
2667
- var Fe = ce, m0 = {};
4207
+ var wi = ui, kt = {};
2668
4208
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2669
- m0.read = function(e, t, i, a, n) {
2670
- var o, s, c = n * 8 - a - 1, f = (1 << c) - 1, l = f >> 1, r = -7, u = i ? n - 1 : 0, h = i ? -1 : 1, m = e[t + u];
2671
- for (u += h, o = m & (1 << -r) - 1, m >>= -r, r += c; r > 0; o = o * 256 + e[t + u], u += h, r -= 8)
4209
+ kt.read = function(e, t, n, a, i) {
4210
+ var s, c, d = i * 8 - a - 1, y = (1 << d) - 1, m = y >> 1, u = -7, f = n ? i - 1 : 0, _ = n ? -1 : 1, v = e[t + f];
4211
+ for (f += _, s = v & (1 << -u) - 1, v >>= -u, u += d; u > 0; s = s * 256 + e[t + f], f += _, u -= 8)
2672
4212
  ;
2673
- for (s = o & (1 << -r) - 1, o >>= -r, r += a; r > 0; s = s * 256 + e[t + u], u += h, r -= 8)
4213
+ for (c = s & (1 << -u) - 1, s >>= -u, u += a; u > 0; c = c * 256 + e[t + f], f += _, u -= 8)
2674
4214
  ;
2675
- if (o === 0)
2676
- o = 1 - l;
4215
+ if (s === 0)
4216
+ s = 1 - m;
2677
4217
  else {
2678
- if (o === f)
2679
- return s ? NaN : (m ? -1 : 1) * (1 / 0);
2680
- s = s + Math.pow(2, a), o = o - l;
4218
+ if (s === y)
4219
+ return c ? NaN : (v ? -1 : 1) * (1 / 0);
4220
+ c = c + Math.pow(2, a), s = s - m;
2681
4221
  }
2682
- return (m ? -1 : 1) * s * Math.pow(2, o - a);
4222
+ return (v ? -1 : 1) * c * Math.pow(2, s - a);
2683
4223
  };
2684
- m0.write = function(e, t, i, a, n, o) {
2685
- var s, c, f, l = o * 8 - n - 1, r = (1 << l) - 1, u = r >> 1, h = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, m = a ? 0 : o - 1, _ = a ? 1 : -1, v = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
2686
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (c = isNaN(t) ? 1 : 0, s = r) : (s = Math.floor(Math.log(t) / Math.LN2), t * (f = Math.pow(2, -s)) < 1 && (s--, f *= 2), s + u >= 1 ? t += h / f : t += h * Math.pow(2, 1 - u), t * f >= 2 && (s++, f /= 2), s + u >= r ? (c = 0, s = r) : s + u >= 1 ? (c = (t * f - 1) * Math.pow(2, n), s = s + u) : (c = t * Math.pow(2, u - 1) * Math.pow(2, n), s = 0)); n >= 8; e[i + m] = c & 255, m += _, c /= 256, n -= 8)
4224
+ kt.write = function(e, t, n, a, i, s) {
4225
+ var c, d, y, m = s * 8 - i - 1, u = (1 << m) - 1, f = u >> 1, _ = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = a ? 0 : s - 1, F = a ? 1 : -1, N = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
4226
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, c = u) : (c = Math.floor(Math.log(t) / Math.LN2), t * (y = Math.pow(2, -c)) < 1 && (c--, y *= 2), c + f >= 1 ? t += _ / y : t += _ * Math.pow(2, 1 - f), t * y >= 2 && (c++, y /= 2), c + f >= u ? (d = 0, c = u) : c + f >= 1 ? (d = (t * y - 1) * Math.pow(2, i), c = c + f) : (d = t * Math.pow(2, f - 1) * Math.pow(2, i), c = 0)); i >= 8; e[n + v] = d & 255, v += F, d /= 256, i -= 8)
2687
4227
  ;
2688
- for (s = s << n | c, l += n; l > 0; e[i + m] = s & 255, m += _, s /= 256, l -= 8)
4228
+ for (c = c << i | d, m += i; m > 0; e[n + v] = c & 255, v += F, c /= 256, m -= 8)
2689
4229
  ;
2690
- e[i + m - _] |= v * 128;
4230
+ e[n + v - F] |= N * 128;
2691
4231
  };
2692
- var we = p, e0 = m0;
2693
- function p(e) {
4232
+ var xi = x, be = kt;
4233
+ function x(e) {
2694
4234
  this.buf = ArrayBuffer.isView && ArrayBuffer.isView(e) ? e : new Uint8Array(e || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
2695
4235
  }
2696
- p.Varint = 0;
2697
- p.Fixed64 = 1;
2698
- p.Bytes = 2;
2699
- p.Fixed32 = 5;
2700
- var d0 = 65536 * 65536, M0 = 1 / d0, ke = 12, z0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
2701
- p.prototype = {
4236
+ x.Varint = 0;
4237
+ x.Fixed64 = 1;
4238
+ x.Bytes = 2;
4239
+ x.Fixed32 = 5;
4240
+ var xt = 65536 * 65536, _n = 1 / xt, Ti = 12, Rn = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
4241
+ x.prototype = {
2702
4242
  destroy: function() {
2703
4243
  this.buf = null;
2704
4244
  },
2705
4245
  // === READING =================================================================
2706
- readFields: function(e, t, i) {
2707
- for (i = i || this.length; this.pos < i; ) {
2708
- var a = this.readVarint(), n = a >> 3, o = this.pos;
2709
- this.type = a & 7, e(n, t, this), this.pos === o && this.skip(a);
4246
+ readFields: function(e, t, n) {
4247
+ for (n = n || this.length; this.pos < n; ) {
4248
+ var a = this.readVarint(), i = a >> 3, s = this.pos;
4249
+ this.type = a & 7, e(i, t, this), this.pos === s && this.skip(a);
2710
4250
  }
2711
4251
  return t;
2712
4252
  },
@@ -2714,33 +4254,33 @@ p.prototype = {
2714
4254
  return this.readFields(e, t, this.readVarint() + this.pos);
2715
4255
  },
2716
4256
  readFixed32: function() {
2717
- var e = t0(this.buf, this.pos);
4257
+ var e = Be(this.buf, this.pos);
2718
4258
  return this.pos += 4, e;
2719
4259
  },
2720
4260
  readSFixed32: function() {
2721
- var e = B0(this.buf, this.pos);
4261
+ var e = vn(this.buf, this.pos);
2722
4262
  return this.pos += 4, e;
2723
4263
  },
2724
4264
  // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
2725
4265
  readFixed64: function() {
2726
- var e = t0(this.buf, this.pos) + t0(this.buf, this.pos + 4) * d0;
4266
+ var e = Be(this.buf, this.pos) + Be(this.buf, this.pos + 4) * xt;
2727
4267
  return this.pos += 8, e;
2728
4268
  },
2729
4269
  readSFixed64: function() {
2730
- var e = t0(this.buf, this.pos) + B0(this.buf, this.pos + 4) * d0;
4270
+ var e = Be(this.buf, this.pos) + vn(this.buf, this.pos + 4) * xt;
2731
4271
  return this.pos += 8, e;
2732
4272
  },
2733
4273
  readFloat: function() {
2734
- var e = e0.read(this.buf, this.pos, !0, 23, 4);
4274
+ var e = be.read(this.buf, this.pos, !0, 23, 4);
2735
4275
  return this.pos += 4, e;
2736
4276
  },
2737
4277
  readDouble: function() {
2738
- var e = e0.read(this.buf, this.pos, !0, 52, 8);
4278
+ var e = be.read(this.buf, this.pos, !0, 52, 8);
2739
4279
  return this.pos += 8, e;
2740
4280
  },
2741
4281
  readVarint: function(e) {
2742
- var t = this.buf, i, a;
2743
- 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));
4282
+ var t = this.buf, n, a;
4283
+ return a = t[this.pos++], n = a & 127, a < 128 || (a = t[this.pos++], n |= (a & 127) << 7, a < 128) || (a = t[this.pos++], n |= (a & 127) << 14, a < 128) || (a = t[this.pos++], n |= (a & 127) << 21, a < 128) ? n : (a = t[this.pos], n |= (a & 15) << 28, Mi(n, e, this));
2744
4284
  },
2745
4285
  readVarint64: function() {
2746
4286
  return this.readVarint(!0);
@@ -2754,7 +4294,7 @@ p.prototype = {
2754
4294
  },
2755
4295
  readString: function() {
2756
4296
  var e = this.readVarint() + this.pos, t = this.pos;
2757
- return this.pos = e, e - t >= ke && z0 ? Oe(this.buf, t, e) : Re(this.buf, t, e);
4297
+ return this.pos = e, e - t >= Ti && Rn ? Pi(this.buf, t, e) : Ai(this.buf, t, e);
2758
4298
  },
2759
4299
  readBytes: function() {
2760
4300
  var e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
@@ -2762,66 +4302,66 @@ p.prototype = {
2762
4302
  },
2763
4303
  // verbose for performance reasons; doesn't affect gzipped size
2764
4304
  readPackedVarint: function(e, t) {
2765
- if (this.type !== p.Bytes) return e.push(this.readVarint(t));
2766
- var i = L(this);
2767
- for (e = e || []; this.pos < i; ) e.push(this.readVarint(t));
4305
+ if (this.type !== x.Bytes) return e.push(this.readVarint(t));
4306
+ var n = q(this);
4307
+ for (e = e || []; this.pos < n; ) e.push(this.readVarint(t));
2768
4308
  return e;
2769
4309
  },
2770
4310
  readPackedSVarint: function(e) {
2771
- if (this.type !== p.Bytes) return e.push(this.readSVarint());
2772
- var t = L(this);
4311
+ if (this.type !== x.Bytes) return e.push(this.readSVarint());
4312
+ var t = q(this);
2773
4313
  for (e = e || []; this.pos < t; ) e.push(this.readSVarint());
2774
4314
  return e;
2775
4315
  },
2776
4316
  readPackedBoolean: function(e) {
2777
- if (this.type !== p.Bytes) return e.push(this.readBoolean());
2778
- var t = L(this);
4317
+ if (this.type !== x.Bytes) return e.push(this.readBoolean());
4318
+ var t = q(this);
2779
4319
  for (e = e || []; this.pos < t; ) e.push(this.readBoolean());
2780
4320
  return e;
2781
4321
  },
2782
4322
  readPackedFloat: function(e) {
2783
- if (this.type !== p.Bytes) return e.push(this.readFloat());
2784
- var t = L(this);
4323
+ if (this.type !== x.Bytes) return e.push(this.readFloat());
4324
+ var t = q(this);
2785
4325
  for (e = e || []; this.pos < t; ) e.push(this.readFloat());
2786
4326
  return e;
2787
4327
  },
2788
4328
  readPackedDouble: function(e) {
2789
- if (this.type !== p.Bytes) return e.push(this.readDouble());
2790
- var t = L(this);
4329
+ if (this.type !== x.Bytes) return e.push(this.readDouble());
4330
+ var t = q(this);
2791
4331
  for (e = e || []; this.pos < t; ) e.push(this.readDouble());
2792
4332
  return e;
2793
4333
  },
2794
4334
  readPackedFixed32: function(e) {
2795
- if (this.type !== p.Bytes) return e.push(this.readFixed32());
2796
- var t = L(this);
4335
+ if (this.type !== x.Bytes) return e.push(this.readFixed32());
4336
+ var t = q(this);
2797
4337
  for (e = e || []; this.pos < t; ) e.push(this.readFixed32());
2798
4338
  return e;
2799
4339
  },
2800
4340
  readPackedSFixed32: function(e) {
2801
- if (this.type !== p.Bytes) return e.push(this.readSFixed32());
2802
- var t = L(this);
4341
+ if (this.type !== x.Bytes) return e.push(this.readSFixed32());
4342
+ var t = q(this);
2803
4343
  for (e = e || []; this.pos < t; ) e.push(this.readSFixed32());
2804
4344
  return e;
2805
4345
  },
2806
4346
  readPackedFixed64: function(e) {
2807
- if (this.type !== p.Bytes) return e.push(this.readFixed64());
2808
- var t = L(this);
4347
+ if (this.type !== x.Bytes) return e.push(this.readFixed64());
4348
+ var t = q(this);
2809
4349
  for (e = e || []; this.pos < t; ) e.push(this.readFixed64());
2810
4350
  return e;
2811
4351
  },
2812
4352
  readPackedSFixed64: function(e) {
2813
- if (this.type !== p.Bytes) return e.push(this.readSFixed64());
2814
- var t = L(this);
4353
+ if (this.type !== x.Bytes) return e.push(this.readSFixed64());
4354
+ var t = q(this);
2815
4355
  for (e = e || []; this.pos < t; ) e.push(this.readSFixed64());
2816
4356
  return e;
2817
4357
  },
2818
4358
  skip: function(e) {
2819
4359
  var t = e & 7;
2820
- if (t === p.Varint) for (; this.buf[this.pos++] > 127; )
4360
+ if (t === x.Varint) for (; this.buf[this.pos++] > 127; )
2821
4361
  ;
2822
- else if (t === p.Bytes) this.pos = this.readVarint() + this.pos;
2823
- else if (t === p.Fixed32) this.pos += 4;
2824
- else if (t === p.Fixed64) this.pos += 8;
4362
+ else if (t === x.Bytes) this.pos = this.readVarint() + this.pos;
4363
+ else if (t === x.Fixed32) this.pos += 4;
4364
+ else if (t === x.Fixed64) this.pos += 8;
2825
4365
  else throw new Error("Unimplemented type: " + t);
2826
4366
  },
2827
4367
  // === WRITING =================================================================
@@ -2831,28 +4371,28 @@ p.prototype = {
2831
4371
  realloc: function(e) {
2832
4372
  for (var t = this.length || 16; t < this.pos + e; ) t *= 2;
2833
4373
  if (t !== this.length) {
2834
- var i = new Uint8Array(t);
2835
- i.set(this.buf), this.buf = i, this.length = t;
4374
+ var n = new Uint8Array(t);
4375
+ n.set(this.buf), this.buf = n, this.length = t;
2836
4376
  }
2837
4377
  },
2838
4378
  finish: function() {
2839
4379
  return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
2840
4380
  },
2841
4381
  writeFixed32: function(e) {
2842
- this.realloc(4), $(this.buf, e, this.pos), this.pos += 4;
4382
+ this.realloc(4), ve(this.buf, e, this.pos), this.pos += 4;
2843
4383
  },
2844
4384
  writeSFixed32: function(e) {
2845
- this.realloc(4), $(this.buf, e, this.pos), this.pos += 4;
4385
+ this.realloc(4), ve(this.buf, e, this.pos), this.pos += 4;
2846
4386
  },
2847
4387
  writeFixed64: function(e) {
2848
- this.realloc(8), $(this.buf, e & -1, this.pos), $(this.buf, Math.floor(e * M0), this.pos + 4), this.pos += 8;
4388
+ this.realloc(8), ve(this.buf, e & -1, this.pos), ve(this.buf, Math.floor(e * _n), this.pos + 4), this.pos += 8;
2849
4389
  },
2850
4390
  writeSFixed64: function(e) {
2851
- this.realloc(8), $(this.buf, e & -1, this.pos), $(this.buf, Math.floor(e * M0), this.pos + 4), this.pos += 8;
4391
+ this.realloc(8), ve(this.buf, e & -1, this.pos), ve(this.buf, Math.floor(e * _n), this.pos + 4), this.pos += 8;
2852
4392
  },
2853
4393
  writeVarint: function(e) {
2854
4394
  if (e = +e || 0, e > 268435455 || e < 0) {
2855
- Le(e, this);
4395
+ Fi(e, this);
2856
4396
  return;
2857
4397
  }
2858
4398
  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)));
@@ -2866,209 +4406,209 @@ p.prototype = {
2866
4406
  writeString: function(e) {
2867
4407
  e = String(e), this.realloc(e.length * 4), this.pos++;
2868
4408
  var t = this.pos;
2869
- this.pos = Ee(this.buf, e, this.pos);
2870
- var i = this.pos - t;
2871
- i >= 128 && L0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
4409
+ this.pos = Ui(this.buf, e, this.pos);
4410
+ var n = this.pos - t;
4411
+ n >= 128 && gn(t, n, this), this.pos = t - 1, this.writeVarint(n), this.pos += n;
2872
4412
  },
2873
4413
  writeFloat: function(e) {
2874
- this.realloc(4), e0.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
4414
+ this.realloc(4), be.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
2875
4415
  },
2876
4416
  writeDouble: function(e) {
2877
- this.realloc(8), e0.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
4417
+ this.realloc(8), be.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
2878
4418
  },
2879
4419
  writeBytes: function(e) {
2880
4420
  var t = e.length;
2881
4421
  this.writeVarint(t), this.realloc(t);
2882
- for (var i = 0; i < t; i++) this.buf[this.pos++] = e[i];
4422
+ for (var n = 0; n < t; n++) this.buf[this.pos++] = e[n];
2883
4423
  },
2884
4424
  writeRawMessage: function(e, t) {
2885
4425
  this.pos++;
2886
- var i = this.pos;
4426
+ var n = this.pos;
2887
4427
  e(t, this);
2888
- var a = this.pos - i;
2889
- a >= 128 && L0(i, a, this), this.pos = i - 1, this.writeVarint(a), this.pos += a;
4428
+ var a = this.pos - n;
4429
+ a >= 128 && gn(n, a, this), this.pos = n - 1, this.writeVarint(a), this.pos += a;
2890
4430
  },
2891
- writeMessage: function(e, t, i) {
2892
- this.writeTag(e, p.Bytes), this.writeRawMessage(t, i);
4431
+ writeMessage: function(e, t, n) {
4432
+ this.writeTag(e, x.Bytes), this.writeRawMessage(t, n);
2893
4433
  },
2894
4434
  writePackedVarint: function(e, t) {
2895
- t.length && this.writeMessage(e, Se, t);
4435
+ t.length && this.writeMessage(e, ki, t);
2896
4436
  },
2897
4437
  writePackedSVarint: function(e, t) {
2898
- t.length && this.writeMessage(e, Ve, t);
4438
+ t.length && this.writeMessage(e, Ni, t);
2899
4439
  },
2900
4440
  writePackedBoolean: function(e, t) {
2901
- t.length && this.writeMessage(e, Ce, t);
4441
+ t.length && this.writeMessage(e, Oi, t);
2902
4442
  },
2903
4443
  writePackedFloat: function(e, t) {
2904
- t.length && this.writeMessage(e, ze, t);
4444
+ t.length && this.writeMessage(e, Ei, t);
2905
4445
  },
2906
4446
  writePackedDouble: function(e, t) {
2907
- t.length && this.writeMessage(e, Te, t);
4447
+ t.length && this.writeMessage(e, Ri, t);
2908
4448
  },
2909
4449
  writePackedFixed32: function(e, t) {
2910
- t.length && this.writeMessage(e, De, t);
4450
+ t.length && this.writeMessage(e, Ii, t);
2911
4451
  },
2912
4452
  writePackedSFixed32: function(e, t) {
2913
- t.length && this.writeMessage(e, Ne, t);
4453
+ t.length && this.writeMessage(e, Li, t);
2914
4454
  },
2915
4455
  writePackedFixed64: function(e, t) {
2916
- t.length && this.writeMessage(e, Ue, t);
4456
+ t.length && this.writeMessage(e, Gi, t);
2917
4457
  },
2918
4458
  writePackedSFixed64: function(e, t) {
2919
- t.length && this.writeMessage(e, Ie, t);
4459
+ t.length && this.writeMessage(e, Ci, t);
2920
4460
  },
2921
4461
  writeBytesField: function(e, t) {
2922
- this.writeTag(e, p.Bytes), this.writeBytes(t);
4462
+ this.writeTag(e, x.Bytes), this.writeBytes(t);
2923
4463
  },
2924
4464
  writeFixed32Field: function(e, t) {
2925
- this.writeTag(e, p.Fixed32), this.writeFixed32(t);
4465
+ this.writeTag(e, x.Fixed32), this.writeFixed32(t);
2926
4466
  },
2927
4467
  writeSFixed32Field: function(e, t) {
2928
- this.writeTag(e, p.Fixed32), this.writeSFixed32(t);
4468
+ this.writeTag(e, x.Fixed32), this.writeSFixed32(t);
2929
4469
  },
2930
4470
  writeFixed64Field: function(e, t) {
2931
- this.writeTag(e, p.Fixed64), this.writeFixed64(t);
4471
+ this.writeTag(e, x.Fixed64), this.writeFixed64(t);
2932
4472
  },
2933
4473
  writeSFixed64Field: function(e, t) {
2934
- this.writeTag(e, p.Fixed64), this.writeSFixed64(t);
4474
+ this.writeTag(e, x.Fixed64), this.writeSFixed64(t);
2935
4475
  },
2936
4476
  writeVarintField: function(e, t) {
2937
- this.writeTag(e, p.Varint), this.writeVarint(t);
4477
+ this.writeTag(e, x.Varint), this.writeVarint(t);
2938
4478
  },
2939
4479
  writeSVarintField: function(e, t) {
2940
- this.writeTag(e, p.Varint), this.writeSVarint(t);
4480
+ this.writeTag(e, x.Varint), this.writeSVarint(t);
2941
4481
  },
2942
4482
  writeStringField: function(e, t) {
2943
- this.writeTag(e, p.Bytes), this.writeString(t);
4483
+ this.writeTag(e, x.Bytes), this.writeString(t);
2944
4484
  },
2945
4485
  writeFloatField: function(e, t) {
2946
- this.writeTag(e, p.Fixed32), this.writeFloat(t);
4486
+ this.writeTag(e, x.Fixed32), this.writeFloat(t);
2947
4487
  },
2948
4488
  writeDoubleField: function(e, t) {
2949
- this.writeTag(e, p.Fixed64), this.writeDouble(t);
4489
+ this.writeTag(e, x.Fixed64), this.writeDouble(t);
2950
4490
  },
2951
4491
  writeBooleanField: function(e, t) {
2952
4492
  this.writeVarintField(e, !!t);
2953
4493
  }
2954
4494
  };
2955
- function Me(e, t, i) {
2956
- var a = i.buf, n, o;
2957
- 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 A(e, n, t);
4495
+ function Mi(e, t, n) {
4496
+ var a = n.buf, i, s;
4497
+ if (s = a[n.pos++], i = (s & 112) >> 4, s < 128 || (s = a[n.pos++], i |= (s & 127) << 3, s < 128) || (s = a[n.pos++], i |= (s & 127) << 10, s < 128) || (s = a[n.pos++], i |= (s & 127) << 17, s < 128) || (s = a[n.pos++], i |= (s & 127) << 24, s < 128) || (s = a[n.pos++], i |= (s & 1) << 31, s < 128)) return ge(e, i, t);
2958
4498
  throw new Error("Expected varint not more than 10 bytes");
2959
4499
  }
2960
- function L(e) {
2961
- return e.type === p.Bytes ? e.readVarint() + e.pos : e.pos + 1;
4500
+ function q(e) {
4501
+ return e.type === x.Bytes ? e.readVarint() + e.pos : e.pos + 1;
2962
4502
  }
2963
- function A(e, t, i) {
2964
- return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
4503
+ function ge(e, t, n) {
4504
+ return n ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
2965
4505
  }
2966
- function Le(e, t) {
2967
- var i, a;
2968
- 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)
4506
+ function Fi(e, t) {
4507
+ var n, a;
4508
+ if (e >= 0 ? (n = e % 4294967296 | 0, a = e / 4294967296 | 0) : (n = ~(-e % 4294967296), a = ~(-e / 4294967296), n ^ 4294967295 ? n = n + 1 | 0 : (n = 0, a = a + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
2969
4509
  throw new Error("Given varint doesn't fit into 10 bytes");
2970
- t.realloc(10), Be(i, a, t), Pe(a, t);
4510
+ t.realloc(10), Si(n, a, t), Di(a, t);
2971
4511
  }
2972
- function Be(e, t, i) {
2973
- 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;
4512
+ function Si(e, t, n) {
4513
+ n.buf[n.pos++] = e & 127 | 128, e >>>= 7, n.buf[n.pos++] = e & 127 | 128, e >>>= 7, n.buf[n.pos++] = e & 127 | 128, e >>>= 7, n.buf[n.pos++] = e & 127 | 128, e >>>= 7, n.buf[n.pos] = e & 127;
2974
4514
  }
2975
- function Pe(e, t) {
2976
- var i = (e & 7) << 4;
2977
- 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)))));
4515
+ function Di(e, t) {
4516
+ var n = (e & 7) << 4;
4517
+ t.buf[t.pos++] |= n | ((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)))));
2978
4518
  }
2979
- function L0(e, t, i) {
4519
+ function gn(e, t, n) {
2980
4520
  var a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
2981
- i.realloc(a);
2982
- for (var n = i.pos - 1; n >= e; n--) i.buf[n + a] = i.buf[n];
4521
+ n.realloc(a);
4522
+ for (var i = n.pos - 1; i >= e; i--) n.buf[i + a] = n.buf[i];
2983
4523
  }
2984
- function Se(e, t) {
2985
- for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
4524
+ function ki(e, t) {
4525
+ for (var n = 0; n < e.length; n++) t.writeVarint(e[n]);
2986
4526
  }
2987
- function Ve(e, t) {
2988
- for (var i = 0; i < e.length; i++) t.writeSVarint(e[i]);
4527
+ function Ni(e, t) {
4528
+ for (var n = 0; n < e.length; n++) t.writeSVarint(e[n]);
2989
4529
  }
2990
- function ze(e, t) {
2991
- for (var i = 0; i < e.length; i++) t.writeFloat(e[i]);
4530
+ function Ei(e, t) {
4531
+ for (var n = 0; n < e.length; n++) t.writeFloat(e[n]);
2992
4532
  }
2993
- function Te(e, t) {
2994
- for (var i = 0; i < e.length; i++) t.writeDouble(e[i]);
4533
+ function Ri(e, t) {
4534
+ for (var n = 0; n < e.length; n++) t.writeDouble(e[n]);
2995
4535
  }
2996
- function Ce(e, t) {
2997
- for (var i = 0; i < e.length; i++) t.writeBoolean(e[i]);
4536
+ function Oi(e, t) {
4537
+ for (var n = 0; n < e.length; n++) t.writeBoolean(e[n]);
2998
4538
  }
2999
- function De(e, t) {
3000
- for (var i = 0; i < e.length; i++) t.writeFixed32(e[i]);
4539
+ function Ii(e, t) {
4540
+ for (var n = 0; n < e.length; n++) t.writeFixed32(e[n]);
3001
4541
  }
3002
- function Ne(e, t) {
3003
- for (var i = 0; i < e.length; i++) t.writeSFixed32(e[i]);
4542
+ function Li(e, t) {
4543
+ for (var n = 0; n < e.length; n++) t.writeSFixed32(e[n]);
3004
4544
  }
3005
- function Ue(e, t) {
3006
- for (var i = 0; i < e.length; i++) t.writeFixed64(e[i]);
4545
+ function Gi(e, t) {
4546
+ for (var n = 0; n < e.length; n++) t.writeFixed64(e[n]);
3007
4547
  }
3008
- function Ie(e, t) {
3009
- for (var i = 0; i < e.length; i++) t.writeSFixed64(e[i]);
4548
+ function Ci(e, t) {
4549
+ for (var n = 0; n < e.length; n++) t.writeSFixed64(e[n]);
3010
4550
  }
3011
- function t0(e, t) {
4551
+ function Be(e, t) {
3012
4552
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + e[t + 3] * 16777216;
3013
4553
  }
3014
- function $(e, t, i) {
3015
- e[i] = t, e[i + 1] = t >>> 8, e[i + 2] = t >>> 16, e[i + 3] = t >>> 24;
4554
+ function ve(e, t, n) {
4555
+ e[n] = t, e[n + 1] = t >>> 8, e[n + 2] = t >>> 16, e[n + 3] = t >>> 24;
3016
4556
  }
3017
- function B0(e, t) {
4557
+ function vn(e, t) {
3018
4558
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
3019
4559
  }
3020
- function Re(e, t, i) {
3021
- for (var a = "", n = t; n < i; ) {
3022
- var o = e[n], s = null, c = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
3023
- if (n + c > i) break;
3024
- var f, l, r;
3025
- c === 1 ? o < 128 && (s = o) : c === 2 ? (f = e[n + 1], (f & 192) === 128 && (s = (o & 31) << 6 | f & 63, s <= 127 && (s = null))) : c === 3 ? (f = e[n + 1], l = e[n + 2], (f & 192) === 128 && (l & 192) === 128 && (s = (o & 15) << 12 | (f & 63) << 6 | l & 63, (s <= 2047 || s >= 55296 && s <= 57343) && (s = null))) : c === 4 && (f = e[n + 1], l = e[n + 2], r = e[n + 3], (f & 192) === 128 && (l & 192) === 128 && (r & 192) === 128 && (s = (o & 15) << 18 | (f & 63) << 12 | (l & 63) << 6 | r & 63, (s <= 65535 || s >= 1114112) && (s = null))), s === null ? (s = 65533, c = 1) : s > 65535 && (s -= 65536, a += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), a += String.fromCharCode(s), n += c;
4560
+ function Ai(e, t, n) {
4561
+ for (var a = "", i = t; i < n; ) {
4562
+ var s = e[i], c = null, d = s > 239 ? 4 : s > 223 ? 3 : s > 191 ? 2 : 1;
4563
+ if (i + d > n) break;
4564
+ var y, m, u;
4565
+ d === 1 ? s < 128 && (c = s) : d === 2 ? (y = e[i + 1], (y & 192) === 128 && (c = (s & 31) << 6 | y & 63, c <= 127 && (c = null))) : d === 3 ? (y = e[i + 1], m = e[i + 2], (y & 192) === 128 && (m & 192) === 128 && (c = (s & 15) << 12 | (y & 63) << 6 | m & 63, (c <= 2047 || c >= 55296 && c <= 57343) && (c = null))) : d === 4 && (y = e[i + 1], m = e[i + 2], u = e[i + 3], (y & 192) === 128 && (m & 192) === 128 && (u & 192) === 128 && (c = (s & 15) << 18 | (y & 63) << 12 | (m & 63) << 6 | u & 63, (c <= 65535 || c >= 1114112) && (c = null))), c === null ? (c = 65533, d = 1) : c > 65535 && (c -= 65536, a += String.fromCharCode(c >>> 10 & 1023 | 55296), c = 56320 | c & 1023), a += String.fromCharCode(c), i += d;
3026
4566
  }
3027
4567
  return a;
3028
4568
  }
3029
- function Oe(e, t, i) {
3030
- return z0.decode(e.subarray(t, i));
4569
+ function Pi(e, t, n) {
4570
+ return Rn.decode(e.subarray(t, n));
3031
4571
  }
3032
- function Ee(e, t, i) {
3033
- for (var a = 0, n, o; a < t.length; a++) {
3034
- if (n = t.charCodeAt(a), n > 55295 && n < 57344)
3035
- if (o)
3036
- if (n < 56320) {
3037
- e[i++] = 239, e[i++] = 191, e[i++] = 189, o = n;
4572
+ function Ui(e, t, n) {
4573
+ for (var a = 0, i, s; a < t.length; a++) {
4574
+ if (i = t.charCodeAt(a), i > 55295 && i < 57344)
4575
+ if (s)
4576
+ if (i < 56320) {
4577
+ e[n++] = 239, e[n++] = 191, e[n++] = 189, s = i;
3038
4578
  continue;
3039
4579
  } else
3040
- n = o - 55296 << 10 | n - 56320 | 65536, o = null;
4580
+ i = s - 55296 << 10 | i - 56320 | 65536, s = null;
3041
4581
  else {
3042
- n > 56319 || a + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : o = n;
4582
+ i > 56319 || a + 1 === t.length ? (e[n++] = 239, e[n++] = 191, e[n++] = 189) : s = i;
3043
4583
  continue;
3044
4584
  }
3045
- else o && (e[i++] = 239, e[i++] = 191, e[i++] = 189, o = null);
3046
- 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);
4585
+ else s && (e[n++] = 239, e[n++] = 191, e[n++] = 189, s = null);
4586
+ i < 128 ? e[n++] = i : (i < 2048 ? e[n++] = i >> 6 | 192 : (i < 65536 ? e[n++] = i >> 12 | 224 : (e[n++] = i >> 18 | 240, e[n++] = i >> 12 & 63 | 128), e[n++] = i >> 6 & 63 | 128), e[n++] = i & 63 | 128);
3047
4587
  }
3048
- return i;
4588
+ return n;
3049
4589
  }
3050
- const Ae = /* @__PURE__ */ P0(we), u1 = (e) => {
3051
- var a, n;
4590
+ const bi = /* @__PURE__ */ wn(xi), s0 = (e) => {
4591
+ var a, i;
3052
4592
  if (!e || !e.data)
3053
4593
  return {};
3054
- const t = {}, i = e.data;
3055
- if (i)
3056
- for (const o of i) {
3057
- const s = (a = o == null ? void 0 : o.event) == null ? void 0 : a.country_code, c = (n = e.meta.metric_names) == null ? void 0 : n[0];
3058
- s && (t[s] = c ? o.event[c] : 0);
4594
+ const t = {}, n = e.data;
4595
+ if (n)
4596
+ for (const s of n) {
4597
+ const c = (a = s == null ? void 0 : s.event) == null ? void 0 : a.country_code, d = (i = e.meta.metric_names) == null ? void 0 : i[0];
4598
+ c && (t[c] = d ? s.event[d] : 0);
3059
4599
  }
3060
4600
  return t;
3061
4601
  };
3062
- function $e(e, t = 0) {
3063
- let i = null;
4602
+ function Bi(e, t = 0) {
4603
+ let n = null;
3064
4604
  return (...a) => {
3065
- i && clearTimeout(i), i = setTimeout(() => e(...a), t);
4605
+ n && clearTimeout(n), n = setTimeout(() => e(...a), t);
3066
4606
  };
3067
4607
  }
3068
- const Ge = { class: "legend" }, qe = {
4608
+ const Hi = { class: "legend" }, Yi = {
3069
4609
  key: 0,
3070
4610
  class: "legend-title"
3071
- }, He = { class: "legend-text" }, Ke = /* @__PURE__ */ f0({
4611
+ }, Vi = { class: "legend-text" }, zi = /* @__PURE__ */ Tt({
3072
4612
  __name: "MapLegend",
3073
4613
  props: {
3074
4614
  metric: {},
@@ -3076,26 +4616,26 @@ const Ge = { class: "legend" }, qe = {
3076
4616
  data: {}
3077
4617
  },
3078
4618
  setup(e) {
3079
- return (t, i) => (M(), T("div", Ge, [
3080
- t.metric ? (M(), T("div", qe, R(t.title), 1)) : W("", !0),
3081
- (M(!0), T(I0, null, R0(t.data, (a, n) => (M(), T("div", {
3082
- key: n,
4619
+ return (t, n) => (j(), ae("div", Hi, [
4620
+ t.metric ? (j(), ae("div", Yi, ce(t.title), 1)) : De("", !0),
4621
+ (j(!0), ae(jr, null, Kr(t.data, (a, i) => (j(), ae("div", {
4622
+ key: i,
3083
4623
  class: "legend-item"
3084
4624
  }, [
3085
- B("span", {
4625
+ J("span", {
3086
4626
  class: "legend-color",
3087
- style: O0({ backgroundColor: a.color })
4627
+ style: $r({ backgroundColor: a.color })
3088
4628
  }, null, 4),
3089
- B("span", He, R(a.range), 1)
4629
+ J("span", Vi, ce(a.range), 1)
3090
4630
  ]))), 128))
3091
4631
  ]));
3092
4632
  }
3093
- }), y0 = (e, t) => {
3094
- const i = e.__vccOpts || e;
3095
- for (const [a, n] of t)
3096
- i[a] = n;
3097
- return i;
3098
- }, je = /* @__PURE__ */ y0(Ke, [["__scopeId", "data-v-5f034736"]]), We = { class: "map-tooltip" }, Ze = { class: "map-tooltip-text" }, Je = { key: 0 }, Xe = /* @__PURE__ */ f0({
4633
+ }), Nt = (e, t) => {
4634
+ const n = e.__vccOpts || e;
4635
+ for (const [a, i] of t)
4636
+ n[a] = i;
4637
+ return n;
4638
+ }, ji = /* @__PURE__ */ Nt(zi, [["__scopeId", "data-v-5f034736"]]), Ki = { class: "map-tooltip" }, $i = { class: "map-tooltip-text" }, Wi = { key: 0 }, Zi = /* @__PURE__ */ Tt({
3099
4639
  __name: "MapTooltip",
3100
4640
  props: {
3101
4641
  data: {},
@@ -3104,22 +4644,22 @@ const Ge = { class: "legend" }, qe = {
3104
4644
  left: {}
3105
4645
  },
3106
4646
  setup(e) {
3107
- return E0((t) => ({
4647
+ return Wr((t) => ({
3108
4648
  "55ff282a": t.left,
3109
4649
  "23ce2e1e": t.top,
3110
4650
  "011f7503": t.data.color
3111
- })), (t, i) => (M(), T("div", We, [
3112
- i[0] || (i[0] = B("div", { class: "map-tooltip-color" }, null, -1)),
3113
- B("div", Ze, [
3114
- B("div", null, R(t.data.label), 1),
3115
- t.showValue ? (M(), T("span", Je, R(t.data.value) + " " + R(t.data.unit), 1)) : W("", !0)
4651
+ })), (t, n) => (j(), ae("div", Ki, [
4652
+ n[0] || (n[0] = J("div", { class: "map-tooltip-color" }, null, -1)),
4653
+ J("div", $i, [
4654
+ J("div", null, ce(t.data.label), 1),
4655
+ t.showValue ? (j(), ae("span", Wi, ce(t.data.value) + " " + ce(t.data.unit), 1)) : De("", !0)
3116
4656
  ])
3117
4657
  ]));
3118
4658
  }
3119
- }), Qe = /* @__PURE__ */ y0(Xe, [["__scopeId", "data-v-5e8af715"]]), Ye = { class: "kong-ui-public-analytics-geo-map" }, be = {
4659
+ }), qi = /* @__PURE__ */ Nt(Zi, [["__scopeId", "data-v-5e8af715"]]), Ji = { class: "kong-ui-public-analytics-geo-map" }, Xi = {
3120
4660
  key: 0,
3121
4661
  class: "no-location-overlay"
3122
- }, e1 = { class: "no-location-overlay-title" }, t1 = { class: "no-location-overlay-description" }, i1 = ["id"], n1 = /* @__PURE__ */ f0({
4662
+ }, Qi = { class: "no-location-overlay-title" }, e0 = { class: "no-location-overlay-description" }, t0 = ["id"], n0 = /* @__PURE__ */ Tt({
3123
4663
  __name: "AnalyticsGeoMap",
3124
4664
  props: {
3125
4665
  countryMetrics: {},
@@ -3134,10 +4674,10 @@ const Ge = { class: "legend" }, qe = {
3134
4674
  },
3135
4675
  emits: ["boundsChange"],
3136
4676
  setup(e, { emit: t }) {
3137
- const i = import("./countries-simple-geo-BFUDnSiE.js").then((d) => d.default), a = t, { i18n: n } = F0.useI18n(), { getColor: o, formatMetric: s, legendData: c } = F0.useMetricUtils({
3138
- countryMetrics: v0(() => e.countryMetrics),
3139
- metric: v0(() => e.metric)
3140
- }), f = j(), l = A0(), r = j(), u = j(null), h = j({ left: "0px", top: "0px" }), m = j(!1), _ = k(() => Object.keys(e.countryMetrics).length === 0 && !e.fitToCountry), v = k(() => ({
4677
+ const n = import("./countries-simple-geo-BFUDnSiE.js").then((g) => g.default), a = t, { i18n: i } = hn.useI18n(), { getColor: s, formatMetric: c, legendData: d } = hn.useMetricUtils({
4678
+ countryMetrics: Xt(() => e.countryMetrics),
4679
+ metric: Xt(() => e.metric)
4680
+ }), y = Se(), m = Zr(), u = Se(), f = Se(null), _ = Se({ left: "0px", top: "0px" }), v = Se(!1), F = C(() => Object.keys(e.countryMetrics).length === 0 && !e.fitToCountry), N = C(() => ({
3141
4681
  "fill-color": [
3142
4682
  "match",
3143
4683
  [
@@ -3150,60 +4690,60 @@ const Ge = { class: "legend" }, qe = {
3150
4690
  ],
3151
4691
  ["get", "ISO_A2"]
3152
4692
  ],
3153
- ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([d, y]) => [
3154
- d,
3155
- o(y)
3156
- ]) : [Z, Z],
3157
- Z
4693
+ ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([g, T]) => [
4694
+ g,
4695
+ s(T)
4696
+ ]) : [ke, ke],
4697
+ ke
3158
4698
  // default color if no match
3159
4699
  ],
3160
4700
  "fill-opacity": 0.7
3161
- })), o0 = k(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), C = k(() => e.metric && n.t(`metrics.${e.metric}`) || ""), X = (d) => {
3162
- const y = d.flat(1);
3163
- return Array.isArray(y[0]) && Array.isArray(y[0][0]) ? X(y) : y;
3164
- }, x0 = (d) => {
3165
- var x, g, q, O, N, H, K;
3166
- if (d === "RU") {
3167
- (x = r.value) == null || x.fitBounds([
4701
+ })), P = C(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), Q = C(() => e.metric && i.t(`metrics.${e.metric}`) || ""), U = (g) => {
4702
+ const T = g.flat(1);
4703
+ return Array.isArray(T[0]) && Array.isArray(T[0][0]) ? U(T) : T;
4704
+ }, ie = (g) => {
4705
+ var M, D, ee, K, B, te, ne;
4706
+ if (g === "RU") {
4707
+ (M = u.value) == null || M.fitBounds([
3168
4708
  [20, 40],
3169
4709
  [180, 80]
3170
4710
  ]);
3171
4711
  return;
3172
- } else if (d === "US") {
3173
- (g = r.value) == null || g.fitBounds([
4712
+ } else if (g === "US") {
4713
+ (D = u.value) == null || D.fitBounds([
3174
4714
  [-130, 20],
3175
4715
  [-60, 50]
3176
4716
  ]);
3177
4717
  return;
3178
- } else if (d === "FR") {
3179
- (q = r.value) == null || q.fitBounds([
4718
+ } else if (g === "FR") {
4719
+ (ee = u.value) == null || ee.fitBounds([
3180
4720
  [-5, 42],
3181
4721
  [9, 51]
3182
4722
  ]);
3183
4723
  return;
3184
- } else if (d === "NO") {
3185
- (O = r.value) == null || O.fitBounds([
4724
+ } else if (g === "NO") {
4725
+ (K = u.value) == null || K.fitBounds([
3186
4726
  [4, 57],
3187
4727
  [32, 71]
3188
4728
  ]);
3189
4729
  return;
3190
4730
  }
3191
- const y = (N = u.value) == null ? void 0 : N.features.find((w) => {
3192
- var P, S, V, U, z;
3193
- return (P = w.properties) != null && P.ISO_A2 ? ((S = w.properties) == null ? void 0 : S.ISO_A2) === d : ((V = w.properties) == null ? void 0 : V.iso_a2) === "-99" ? ((U = w.properties) == null ? void 0 : U.iso_a2_eh) === d : ((z = w.properties) == null ? void 0 : z.iso_a2) === d;
4731
+ const T = (B = f.value) == null ? void 0 : B.features.find((L) => {
4732
+ var H, Y, V, w, z;
4733
+ return (H = L.properties) != null && H.ISO_A2 ? ((Y = L.properties) == null ? void 0 : Y.ISO_A2) === g : ((V = L.properties) == null ? void 0 : V.iso_a2) === "-99" ? ((w = L.properties) == null ? void 0 : w.iso_a2_eh) === g : ((z = L.properties) == null ? void 0 : z.iso_a2) === g;
3194
4734
  });
3195
- if (y) {
3196
- const w = (H = y.geometry) == null ? void 0 : H.coordinates;
3197
- if (!w) return;
3198
- const P = X(w), S = P.map((E) => E[1]), V = P.map((E) => E[0]), U = Math.min(...S), z = Math.max(...S), Q = Math.min(...V), Y = Math.max(...V);
3199
- (K = r.value) == null || K.fitBounds([
3200
- [Q, U],
3201
- [Y, z]
4735
+ if (T) {
4736
+ const L = (te = T.geometry) == null ? void 0 : te.coordinates;
4737
+ if (!L) return;
4738
+ const H = U(L), Y = H.map(($) => $[1]), V = H.map(($) => $[0]), w = Math.min(...Y), z = Math.max(...Y), me = Math.min(...V), R = Math.max(...V);
4739
+ (ne = u.value) == null || ne.fitBounds([
4740
+ [me, w],
4741
+ [R, z]
3202
4742
  ]);
3203
4743
  }
3204
- }, D = k(() => {
3205
- const d = {
3206
- container: l,
4744
+ }, b = C(() => {
4745
+ const g = {
4746
+ container: m,
3207
4747
  style: { version: 8, sources: {}, layers: [] },
3208
4748
  attributionControl: !1,
3209
4749
  // fit bounds for whole world minus antarctica
@@ -3214,74 +4754,74 @@ const Ge = { class: "legend" }, qe = {
3214
4754
  ],
3215
4755
  cooperativeGestures: !0,
3216
4756
  locale: {
3217
- "CooperativeGesturesHandler.WindowsHelpText": n.t("cooperative_gestures.windows_zoom_help_text"),
3218
- "CooperativeGesturesHandler.MacHelpText": n.t("cooperative_gestures.mac_zoom_help_text"),
3219
- "CooperativeGesturesHandler.MobileHelpText": n.t("cooperative_gestures.mobile_zoom_help_text")
4757
+ "CooperativeGesturesHandler.WindowsHelpText": i.t("cooperative_gestures.windows_zoom_help_text"),
4758
+ "CooperativeGesturesHandler.MacHelpText": i.t("cooperative_gestures.mac_zoom_help_text"),
4759
+ "CooperativeGesturesHandler.MobileHelpText": i.t("cooperative_gestures.mobile_zoom_help_text")
3220
4760
  }
3221
4761
  };
3222
- return e.bounds && (d.bounds = e.bounds), d;
3223
- }), T0 = $e(() => {
3224
- if (!r.value) return;
3225
- const d = r.value.getBounds(), y = d.getSouthWest(), x = d.getNorthEast();
4762
+ return e.bounds && (g.bounds = e.bounds), g;
4763
+ }), de = Bi(() => {
4764
+ if (!u.value) return;
4765
+ const g = u.value.getBounds(), T = g.getSouthWest(), M = g.getNorthEast();
3226
4766
  a("boundsChange", [
3227
- [y.lng, y.lat],
3228
- [x.lng, x.lat]
4767
+ [T.lng, T.lat],
4768
+ [M.lng, M.lat]
3229
4769
  ]);
3230
4770
  }, 300);
3231
- return $0(async () => {
3232
- var d, y, x;
4771
+ return qr(async () => {
4772
+ var g, T, M;
3233
4773
  try {
3234
- const g = await i, q = await fetch(g), O = new Uint8Array(await q.arrayBuffer()), N = Fe(new Ae(O));
3235
- u.value = N, r.value = new H0(D.value), r.value.on("load", () => {
3236
- var H, K, w, P, S, V, U;
3237
- (H = r.value) == null || H.addSource("countries", {
4774
+ const D = await n, ee = await fetch(D), K = new Uint8Array(await ee.arrayBuffer()), B = wi(new bi(K));
4775
+ f.value = B, u.value = new Qr(b.value), u.value.on("load", () => {
4776
+ var te, ne, L, H, Y, V, w;
4777
+ (te = u.value) == null || te.addSource("countries", {
3238
4778
  type: "geojson",
3239
- data: N
3240
- }), (K = r.value) == null || K.addLayer({
4779
+ data: B
4780
+ }), (ne = u.value) == null || ne.addLayer({
3241
4781
  id: "countries-layer",
3242
4782
  type: "fill",
3243
4783
  source: "countries",
3244
- paint: v.value
3245
- }), (w = r.value) == null || w.addSource("lakes", {
4784
+ paint: N.value
4785
+ }), (L = u.value) == null || L.addSource("lakes", {
3246
4786
  type: "geojson",
3247
- data: ue
3248
- }), (P = r.value) == null || P.addLayer({
4787
+ data: li
4788
+ }), (H = u.value) == null || H.addLayer({
3249
4789
  id: "lakes-layer",
3250
4790
  type: "fill",
3251
4791
  source: "lakes",
3252
4792
  paint: {
3253
4793
  "fill-color": "#FFFFFF"
3254
4794
  }
3255
- }), (S = r.value) == null || S.on("mousemove", "countries-layer", (z) => {
3256
- var Y;
3257
- const Q = (Y = z.features) == null ? void 0 : Y[0];
3258
- if (Q) {
3259
- const { iso_a2: E, iso_a2_eh: C0, ISO_A2: D0, admin: N0 } = Q.properties, U0 = D0 ?? E === "-99" ? C0 : E, b = e.countryMetrics[U0];
3260
- b !== void 0 && (f.value = {
3261
- label: N0,
3262
- color: o(b),
3263
- value: s(b),
3264
- unit: n.t(`metricUnits.${e.metricUnit}`, { plural: b > 1 ? "s" : "" })
3265
- }, m.value = !0, h.value = {
4795
+ }), (Y = u.value) == null || Y.on("mousemove", "countries-layer", (z) => {
4796
+ var R;
4797
+ const me = (R = z.features) == null ? void 0 : R[0];
4798
+ if (me) {
4799
+ const { iso_a2: $, iso_a2_eh: Oe, ISO_A2: Ze, admin: qe } = me.properties, Je = Ze ?? $ === "-99" ? Oe : $, fe = e.countryMetrics[Je];
4800
+ fe !== void 0 && (y.value = {
4801
+ label: qe,
4802
+ color: s(fe),
4803
+ value: c(fe),
4804
+ unit: i.t(`metricUnits.${e.metricUnit}`, { plural: fe > 1 ? "s" : "" })
4805
+ }, v.value = !0, _.value = {
3266
4806
  left: `${z.point.x}px`,
3267
4807
  top: `${z.point.y}px`
3268
4808
  });
3269
4809
  }
3270
- }), (V = r.value) == null || V.on("mouseleave", "countries-layer", () => {
3271
- m.value = !1;
3272
- }), (U = r.value) == null || U.on("move", T0), e.fitToCountry && x0(e.fitToCountry);
3273
- }), (d = r.value) == null || d.dragRotate.disable(), (y = r.value) == null || y.keyboard.disable(), (x = r.value) == null || x.touchZoomRotate.disableRotation();
3274
- } catch (g) {
3275
- console.error(g);
4810
+ }), (V = u.value) == null || V.on("mouseleave", "countries-layer", () => {
4811
+ v.value = !1;
4812
+ }), (w = u.value) == null || w.on("move", de), e.fitToCountry && ie(e.fitToCountry);
4813
+ }), (g = u.value) == null || g.dragRotate.disable(), (T = u.value) == null || T.keyboard.disable(), (M = u.value) == null || M.touchZoomRotate.disableRotation();
4814
+ } catch (D) {
4815
+ console.error(D);
3276
4816
  }
3277
- }), s0(() => e.countryMetrics, () => {
3278
- var d;
3279
- r.value && r.value.isStyleLoaded() && (r.value.getLayer("countries-layer") && r.value.removeLayer("countries-layer"), r.value.addLayer({
4817
+ }), ut(() => e.countryMetrics, () => {
4818
+ var g;
4819
+ u.value && u.value.isStyleLoaded() && (u.value.getLayer("countries-layer") && u.value.removeLayer("countries-layer"), u.value.addLayer({
3280
4820
  id: "countries-layer",
3281
4821
  type: "fill",
3282
4822
  source: "countries",
3283
- paint: v.value
3284
- }), r.value.removeLayer("lakes-layer"), (d = r.value) == null || d.addLayer({
4823
+ paint: N.value
4824
+ }), u.value.removeLayer("lakes-layer"), (g = u.value) == null || g.addLayer({
3285
4825
  id: "lakes-layer",
3286
4826
  type: "fill",
3287
4827
  source: "lakes",
@@ -3289,58 +4829,58 @@ const Ge = { class: "legend" }, qe = {
3289
4829
  "fill-color": "#FFFFFF"
3290
4830
  }
3291
4831
  }));
3292
- }), s0(() => e.fitToCountry, (d) => {
3293
- var y, x, g;
3294
- r.value && d ? x0(d) : !D.value.center && !D.value.zoom ? (y = r.value) == null || y.fitBounds([
4832
+ }), ut(() => e.fitToCountry, (g) => {
4833
+ var T, M, D;
4834
+ u.value && g ? ie(g) : !b.value.center && !b.value.zoom ? (T = u.value) == null || T.fitBounds([
3295
4835
  [-180, -90],
3296
4836
  [180, 90]
3297
- ]) : (D.value.zoom && ((x = r.value) == null || x.setZoom(D.value.zoom)), D.value.center && ((g = r.value) == null || g.flyTo({ center: D.value.center })));
3298
- }), s0(() => e.bounds, (d, y) => {
3299
- if (!d) return;
3300
- const x = d == null ? void 0 : d.flat(), g = y == null ? void 0 : y.flat();
3301
- !(x && g && x.length === g.length && x.every((O, N) => Math.round(O * 100) / 100 === Math.round(g[N] * 100) / 100)) && r.value && r.value.fitBounds(d);
3302
- }), (d, y) => (M(), T("div", Ye, [
3303
- _.value ? (M(), T("div", be, [
3304
- l0(d.$slots, "no-location-icon", {}, () => [
3305
- G0(I(W0), {
3306
- color: I(ne),
3307
- size: I(ae)
4837
+ ]) : (b.value.zoom && ((M = u.value) == null || M.setZoom(b.value.zoom)), b.value.center && ((D = u.value) == null || D.flyTo({ center: b.value.center })));
4838
+ }), ut(() => e.bounds, (g, T) => {
4839
+ if (!g) return;
4840
+ const M = g == null ? void 0 : g.flat(), D = T == null ? void 0 : T.flat();
4841
+ !(M && D && M.length === D.length && M.every((K, B) => Math.round(K * 100) / 100 === Math.round(D[B] * 100) / 100)) && u.value && u.value.fitBounds(g);
4842
+ }), (g, T) => (j(), ae("div", Ji, [
4843
+ F.value ? (j(), ae("div", Xi, [
4844
+ ct(g.$slots, "no-location-icon", {}, () => [
4845
+ Jr(ue(na), {
4846
+ color: ue(ni),
4847
+ size: ue(ri)
3308
4848
  }, null, 8, ["color", "size"])
3309
4849
  ], !0),
3310
- B("div", e1, [
3311
- l0(d.$slots, "no-location-title", {}, () => [
3312
- q0(R(I(n).t("no_location_data")), 1)
4850
+ J("div", Qi, [
4851
+ ct(g.$slots, "no-location-title", {}, () => [
4852
+ Xr(ce(ue(i).t("no_location_data")), 1)
3313
4853
  ], !0)
3314
4854
  ]),
3315
- B("div", t1, [
3316
- l0(d.$slots, "no-location-description", {}, () => [
3317
- B("p", null, R(I(n).t("no_location_data_description")), 1)
4855
+ J("div", e0, [
4856
+ ct(g.$slots, "no-location-description", {}, () => [
4857
+ J("p", null, ce(ue(i).t("no_location_data_description")), 1)
3318
4858
  ], !0)
3319
4859
  ])
3320
- ])) : W("", !0),
3321
- B("div", {
3322
- id: I(l),
4860
+ ])) : De("", !0),
4861
+ J("div", {
4862
+ id: ue(m),
3323
4863
  class: "analytics-geo-map-container"
3324
- }, null, 8, i1),
3325
- o0.value ? (M(), g0(je, {
4864
+ }, null, 8, t0),
4865
+ P.value ? (j(), Qt(ji, {
3326
4866
  key: 1,
3327
4867
  class: "legend-container",
3328
- data: I(c),
3329
- metric: d.metric,
3330
- title: C.value
3331
- }, null, 8, ["data", "metric", "title"])) : W("", !0),
3332
- m.value && f.value ? (M(), g0(Qe, {
4868
+ data: ue(d),
4869
+ metric: g.metric,
4870
+ title: Q.value
4871
+ }, null, 8, ["data", "metric", "title"])) : De("", !0),
4872
+ v.value && y.value ? (j(), Qt(qi, {
3333
4873
  key: 2,
3334
- data: f.value,
3335
- left: h.value.left,
3336
- "show-value": d.showTooltipValue,
3337
- top: h.value.top
3338
- }, null, 8, ["data", "left", "show-value", "top"])) : W("", !0)
4874
+ data: y.value,
4875
+ left: _.value.left,
4876
+ "show-value": g.showTooltipValue,
4877
+ top: _.value.top
4878
+ }, null, 8, ["data", "left", "show-value", "top"])) : De("", !0)
3339
4879
  ]));
3340
4880
  }
3341
- }), c1 = /* @__PURE__ */ y0(n1, [["__scopeId", "data-v-f8b9de28"]]);
4881
+ }), l0 = /* @__PURE__ */ Nt(n0, [["__scopeId", "data-v-f8b9de28"]]);
3342
4882
  export {
3343
- c1 as AnalyticsGeoMap,
3344
- $e as debounce,
3345
- u1 as exploreResultToCountryMetrics
4883
+ l0 as AnalyticsGeoMap,
4884
+ Bi as debounce,
4885
+ s0 as exploreResultToCountryMetrics
3346
4886
  };