cool-globe 0.1.2 → 0.1.4

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,1224 +1,99 @@
1
- import { jsx as Ze } from "react/jsx-runtime";
2
- import { useRef as W, useState as U, useMemo as me, useEffect as V } from "react";
3
- import At from "react-globe.gl";
4
- function _t(t) {
5
- return t;
6
- }
7
- function St(t) {
8
- if (t == null) return _t;
9
- var e, n, r = t.scale[0], i = t.scale[1], o = t.translate[0], s = t.translate[1];
10
- return function(a, c) {
11
- c || (e = n = 0);
12
- var u = 2, f = a.length, l = new Array(f);
13
- for (l[0] = (e += a[0]) * r + o, l[1] = (n += a[1]) * i + s; u < f; ) l[u] = a[u], ++u;
14
- return l;
1
+ import { jsx as Oe } from "react/jsx-runtime";
2
+ import { useRef as V, useState as G, useEffect as z, useMemo as se, useCallback as ve } from "react";
3
+ import xn from "react-globe.gl";
4
+ import { Color as Ne } from "three";
5
+ function bn(e) {
6
+ return e;
7
+ }
8
+ function yn(e) {
9
+ if (e == null) return bn;
10
+ var n, t, r = e.scale[0], i = e.scale[1], o = e.translate[0], s = e.translate[1];
11
+ return function(a, l) {
12
+ l || (n = t = 0);
13
+ var f = 2, d = a.length, c = new Array(d);
14
+ for (c[0] = (n += a[0]) * r + o, c[1] = (t += a[1]) * i + s; f < d; ) c[f] = a[f], ++f;
15
+ return c;
15
16
  };
16
17
  }
17
- function Rt(t, e) {
18
- for (var n, r = t.length, i = r - e; i < --r; ) n = t[i], t[i++] = t[r], t[r] = n;
19
- }
20
- function Lt(t, e) {
21
- return typeof e == "string" && (e = t.objects[e]), e.type === "GeometryCollection" ? { type: "FeatureCollection", features: e.geometries.map(function(n) {
22
- return Ye(t, n);
23
- }) } : Ye(t, e);
24
- }
25
- function Ye(t, e) {
26
- var n = e.id, r = e.bbox, i = e.properties == null ? {} : e.properties, o = Bt(t, e);
27
- return n == null && r == null ? { type: "Feature", properties: i, geometry: o } : r == null ? { type: "Feature", id: n, properties: i, geometry: o } : { type: "Feature", id: n, bbox: r, properties: i, geometry: o };
28
- }
29
- function Bt(t, e) {
30
- var n = St(t.transform), r = t.arcs;
31
- function i(f, l) {
32
- l.length && l.pop();
33
- for (var g = r[f < 0 ? ~f : f], w = 0, y = g.length; w < y; ++w)
34
- l.push(n(g[w], w));
35
- f < 0 && Rt(l, y);
18
+ function wn(e, n) {
19
+ for (var t, r = e.length, i = r - n; i < --r; ) t = e[i], e[i++] = e[r], e[r] = t;
20
+ }
21
+ function vn(e, n) {
22
+ return typeof n == "string" && (n = e.objects[n]), n.type === "GeometryCollection" ? { type: "FeatureCollection", features: n.geometries.map(function(t) {
23
+ return ze(e, t);
24
+ }) } : ze(e, n);
25
+ }
26
+ function ze(e, n) {
27
+ var t = n.id, r = n.bbox, i = n.properties == null ? {} : n.properties, o = Nn(e, n);
28
+ return t == null && r == null ? { type: "Feature", properties: i, geometry: o } : r == null ? { type: "Feature", id: t, properties: i, geometry: o } : { type: "Feature", id: t, bbox: r, properties: i, geometry: o };
29
+ }
30
+ function Nn(e, n) {
31
+ var t = yn(e.transform), r = e.arcs;
32
+ function i(d, c) {
33
+ c.length && c.pop();
34
+ for (var h = r[d < 0 ? ~d : d], N = 0, k = h.length; N < k; ++N)
35
+ c.push(t(h[N], N));
36
+ d < 0 && wn(c, k);
36
37
  }
37
- function o(f) {
38
- return n(f);
38
+ function o(d) {
39
+ return t(d);
39
40
  }
40
- function s(f) {
41
- for (var l = [], g = 0, w = f.length; g < w; ++g) i(f[g], l);
42
- return l.length < 2 && l.push(l[0]), l;
41
+ function s(d) {
42
+ for (var c = [], h = 0, N = d.length; h < N; ++h) i(d[h], c);
43
+ return c.length < 2 && c.push(c[0]), c;
43
44
  }
44
- function a(f) {
45
- for (var l = s(f); l.length < 4; ) l.push(l[0]);
46
- return l;
45
+ function a(d) {
46
+ for (var c = s(d); c.length < 4; ) c.push(c[0]);
47
+ return c;
47
48
  }
48
- function c(f) {
49
- return f.map(a);
49
+ function l(d) {
50
+ return d.map(a);
50
51
  }
51
- function u(f) {
52
- var l = f.type, g;
53
- switch (l) {
52
+ function f(d) {
53
+ var c = d.type, h;
54
+ switch (c) {
54
55
  case "GeometryCollection":
55
- return { type: l, geometries: f.geometries.map(u) };
56
+ return { type: c, geometries: d.geometries.map(f) };
56
57
  case "Point":
57
- g = o(f.coordinates);
58
+ h = o(d.coordinates);
58
59
  break;
59
60
  case "MultiPoint":
60
- g = f.coordinates.map(o);
61
+ h = d.coordinates.map(o);
61
62
  break;
62
63
  case "LineString":
63
- g = s(f.arcs);
64
+ h = s(d.arcs);
64
65
  break;
65
66
  case "MultiLineString":
66
- g = f.arcs.map(s);
67
+ h = d.arcs.map(s);
67
68
  break;
68
69
  case "Polygon":
69
- g = c(f.arcs);
70
+ h = l(d.arcs);
70
71
  break;
71
72
  case "MultiPolygon":
72
- g = f.arcs.map(c);
73
+ h = d.arcs.map(l);
73
74
  break;
74
75
  default:
75
76
  return null;
76
77
  }
77
- return { type: l, coordinates: g };
78
- }
79
- return u(e);
80
- }
81
- const xt = "180", $t = "", B = "srgb", Xe = "srgb-linear", We = "linear", _e = "srgb";
82
- function ie(t, e, n) {
83
- return Math.max(e, Math.min(n, t));
84
- }
85
- function Dt(t, e) {
86
- return (t % e + e) % e;
87
- }
88
- function Se(t, e, n) {
89
- return (1 - n) * t + n * e;
90
- }
91
- class ce {
92
- /**
93
- * Constructs a new 3x3 matrix. The arguments are supposed to be
94
- * in row-major order. If no arguments are provided, the constructor
95
- * initializes the matrix as an identity matrix.
96
- *
97
- * @param {number} [n11] - 1-1 matrix element.
98
- * @param {number} [n12] - 1-2 matrix element.
99
- * @param {number} [n13] - 1-3 matrix element.
100
- * @param {number} [n21] - 2-1 matrix element.
101
- * @param {number} [n22] - 2-2 matrix element.
102
- * @param {number} [n23] - 2-3 matrix element.
103
- * @param {number} [n31] - 3-1 matrix element.
104
- * @param {number} [n32] - 3-2 matrix element.
105
- * @param {number} [n33] - 3-3 matrix element.
106
- */
107
- constructor(e, n, r, i, o, s, a, c, u) {
108
- ce.prototype.isMatrix3 = !0, this.elements = [
109
- 1,
110
- 0,
111
- 0,
112
- 0,
113
- 1,
114
- 0,
115
- 0,
116
- 0,
117
- 1
118
- ], e !== void 0 && this.set(e, n, r, i, o, s, a, c, u);
119
- }
120
- /**
121
- * Sets the elements of the matrix.The arguments are supposed to be
122
- * in row-major order.
123
- *
124
- * @param {number} [n11] - 1-1 matrix element.
125
- * @param {number} [n12] - 1-2 matrix element.
126
- * @param {number} [n13] - 1-3 matrix element.
127
- * @param {number} [n21] - 2-1 matrix element.
128
- * @param {number} [n22] - 2-2 matrix element.
129
- * @param {number} [n23] - 2-3 matrix element.
130
- * @param {number} [n31] - 3-1 matrix element.
131
- * @param {number} [n32] - 3-2 matrix element.
132
- * @param {number} [n33] - 3-3 matrix element.
133
- * @return {Matrix3} A reference to this matrix.
134
- */
135
- set(e, n, r, i, o, s, a, c, u) {
136
- const f = this.elements;
137
- return f[0] = e, f[1] = i, f[2] = a, f[3] = n, f[4] = o, f[5] = c, f[6] = r, f[7] = s, f[8] = u, this;
138
- }
139
- /**
140
- * Sets this matrix to the 3x3 identity matrix.
141
- *
142
- * @return {Matrix3} A reference to this matrix.
143
- */
144
- identity() {
145
- return this.set(
146
- 1,
147
- 0,
148
- 0,
149
- 0,
150
- 1,
151
- 0,
152
- 0,
153
- 0,
154
- 1
155
- ), this;
156
- }
157
- /**
158
- * Copies the values of the given matrix to this instance.
159
- *
160
- * @param {Matrix3} m - The matrix to copy.
161
- * @return {Matrix3} A reference to this matrix.
162
- */
163
- copy(e) {
164
- const n = this.elements, r = e.elements;
165
- return n[0] = r[0], n[1] = r[1], n[2] = r[2], n[3] = r[3], n[4] = r[4], n[5] = r[5], n[6] = r[6], n[7] = r[7], n[8] = r[8], this;
166
- }
167
- /**
168
- * Extracts the basis of this matrix into the three axis vectors provided.
169
- *
170
- * @param {Vector3} xAxis - The basis's x axis.
171
- * @param {Vector3} yAxis - The basis's y axis.
172
- * @param {Vector3} zAxis - The basis's z axis.
173
- * @return {Matrix3} A reference to this matrix.
174
- */
175
- extractBasis(e, n, r) {
176
- return e.setFromMatrix3Column(this, 0), n.setFromMatrix3Column(this, 1), r.setFromMatrix3Column(this, 2), this;
177
- }
178
- /**
179
- * Set this matrix to the upper 3x3 matrix of the given 4x4 matrix.
180
- *
181
- * @param {Matrix4} m - The 4x4 matrix.
182
- * @return {Matrix3} A reference to this matrix.
183
- */
184
- setFromMatrix4(e) {
185
- const n = e.elements;
186
- return this.set(
187
- n[0],
188
- n[4],
189
- n[8],
190
- n[1],
191
- n[5],
192
- n[9],
193
- n[2],
194
- n[6],
195
- n[10]
196
- ), this;
197
- }
198
- /**
199
- * Post-multiplies this matrix by the given 3x3 matrix.
200
- *
201
- * @param {Matrix3} m - The matrix to multiply with.
202
- * @return {Matrix3} A reference to this matrix.
203
- */
204
- multiply(e) {
205
- return this.multiplyMatrices(this, e);
206
- }
207
- /**
208
- * Pre-multiplies this matrix by the given 3x3 matrix.
209
- *
210
- * @param {Matrix3} m - The matrix to multiply with.
211
- * @return {Matrix3} A reference to this matrix.
212
- */
213
- premultiply(e) {
214
- return this.multiplyMatrices(e, this);
215
- }
216
- /**
217
- * Multiples the given 3x3 matrices and stores the result
218
- * in this matrix.
219
- *
220
- * @param {Matrix3} a - The first matrix.
221
- * @param {Matrix3} b - The second matrix.
222
- * @return {Matrix3} A reference to this matrix.
223
- */
224
- multiplyMatrices(e, n) {
225
- const r = e.elements, i = n.elements, o = this.elements, s = r[0], a = r[3], c = r[6], u = r[1], f = r[4], l = r[7], g = r[2], w = r[5], y = r[8], F = i[0], S = i[3], _ = i[6], O = i[1], D = i[4], v = i[7], j = i[2], M = i[5], T = i[8];
226
- return o[0] = s * F + a * O + c * j, o[3] = s * S + a * D + c * M, o[6] = s * _ + a * v + c * T, o[1] = u * F + f * O + l * j, o[4] = u * S + f * D + l * M, o[7] = u * _ + f * v + l * T, o[2] = g * F + w * O + y * j, o[5] = g * S + w * D + y * M, o[8] = g * _ + w * v + y * T, this;
227
- }
228
- /**
229
- * Multiplies every component of the matrix by the given scalar.
230
- *
231
- * @param {number} s - The scalar.
232
- * @return {Matrix3} A reference to this matrix.
233
- */
234
- multiplyScalar(e) {
235
- const n = this.elements;
236
- return n[0] *= e, n[3] *= e, n[6] *= e, n[1] *= e, n[4] *= e, n[7] *= e, n[2] *= e, n[5] *= e, n[8] *= e, this;
237
- }
238
- /**
239
- * Computes and returns the determinant of this matrix.
240
- *
241
- * @return {number} The determinant.
242
- */
243
- determinant() {
244
- const e = this.elements, n = e[0], r = e[1], i = e[2], o = e[3], s = e[4], a = e[5], c = e[6], u = e[7], f = e[8];
245
- return n * s * f - n * a * u - r * o * f + r * a * c + i * o * u - i * s * c;
246
- }
247
- /**
248
- * Inverts this matrix, using the [analytic method]{@link https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution}.
249
- * You can not invert with a determinant of zero. If you attempt this, the method produces
250
- * a zero matrix instead.
251
- *
252
- * @return {Matrix3} A reference to this matrix.
253
- */
254
- invert() {
255
- const e = this.elements, n = e[0], r = e[1], i = e[2], o = e[3], s = e[4], a = e[5], c = e[6], u = e[7], f = e[8], l = f * s - a * u, g = a * c - f * o, w = u * o - s * c, y = n * l + r * g + i * w;
256
- if (y === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
257
- const F = 1 / y;
258
- return e[0] = l * F, e[1] = (i * u - f * r) * F, e[2] = (a * r - i * s) * F, e[3] = g * F, e[4] = (f * n - i * c) * F, e[5] = (i * o - a * n) * F, e[6] = w * F, e[7] = (r * c - u * n) * F, e[8] = (s * n - r * o) * F, this;
78
+ return { type: c, coordinates: h };
259
79
  }
260
- /**
261
- * Transposes this matrix in place.
262
- *
263
- * @return {Matrix3} A reference to this matrix.
264
- */
265
- transpose() {
266
- let e;
267
- const n = this.elements;
268
- return e = n[1], n[1] = n[3], n[3] = e, e = n[2], n[2] = n[6], n[6] = e, e = n[5], n[5] = n[7], n[7] = e, this;
269
- }
270
- /**
271
- * Computes the normal matrix which is the inverse transpose of the upper
272
- * left 3x3 portion of the given 4x4 matrix.
273
- *
274
- * @param {Matrix4} matrix4 - The 4x4 matrix.
275
- * @return {Matrix3} A reference to this matrix.
276
- */
277
- getNormalMatrix(e) {
278
- return this.setFromMatrix4(e).invert().transpose();
279
- }
280
- /**
281
- * Transposes this matrix into the supplied array, and returns itself unchanged.
282
- *
283
- * @param {Array<number>} r - An array to store the transposed matrix elements.
284
- * @return {Matrix3} A reference to this matrix.
285
- */
286
- transposeIntoArray(e) {
287
- const n = this.elements;
288
- return e[0] = n[0], e[1] = n[3], e[2] = n[6], e[3] = n[1], e[4] = n[4], e[5] = n[7], e[6] = n[2], e[7] = n[5], e[8] = n[8], this;
289
- }
290
- /**
291
- * Sets the UV transform matrix from offset, repeat, rotation, and center.
292
- *
293
- * @param {number} tx - Offset x.
294
- * @param {number} ty - Offset y.
295
- * @param {number} sx - Repeat x.
296
- * @param {number} sy - Repeat y.
297
- * @param {number} rotation - Rotation, in radians. Positive values rotate counterclockwise.
298
- * @param {number} cx - Center x of rotation.
299
- * @param {number} cy - Center y of rotation
300
- * @return {Matrix3} A reference to this matrix.
301
- */
302
- setUvTransform(e, n, r, i, o, s, a) {
303
- const c = Math.cos(o), u = Math.sin(o);
304
- return this.set(
305
- r * c,
306
- r * u,
307
- -r * (c * s + u * a) + s + e,
308
- -i * u,
309
- i * c,
310
- -i * (-u * s + c * a) + a + n,
311
- 0,
312
- 0,
313
- 1
314
- ), this;
315
- }
316
- /**
317
- * Scales this matrix with the given scalar values.
318
- *
319
- * @param {number} sx - The amount to scale in the X axis.
320
- * @param {number} sy - The amount to scale in the Y axis.
321
- * @return {Matrix3} A reference to this matrix.
322
- */
323
- scale(e, n) {
324
- return this.premultiply(Re.makeScale(e, n)), this;
325
- }
326
- /**
327
- * Rotates this matrix by the given angle.
328
- *
329
- * @param {number} theta - The rotation in radians.
330
- * @return {Matrix3} A reference to this matrix.
331
- */
332
- rotate(e) {
333
- return this.premultiply(Re.makeRotation(-e)), this;
334
- }
335
- /**
336
- * Translates this matrix by the given scalar values.
337
- *
338
- * @param {number} tx - The amount to translate in the X axis.
339
- * @param {number} ty - The amount to translate in the Y axis.
340
- * @return {Matrix3} A reference to this matrix.
341
- */
342
- translate(e, n) {
343
- return this.premultiply(Re.makeTranslation(e, n)), this;
344
- }
345
- // for 2D Transforms
346
- /**
347
- * Sets this matrix as a 2D translation transform.
348
- *
349
- * @param {number|Vector2} x - The amount to translate in the X axis or alternatively a translation vector.
350
- * @param {number} y - The amount to translate in the Y axis.
351
- * @return {Matrix3} A reference to this matrix.
352
- */
353
- makeTranslation(e, n) {
354
- return e.isVector2 ? this.set(
355
- 1,
356
- 0,
357
- e.x,
358
- 0,
359
- 1,
360
- e.y,
361
- 0,
362
- 0,
363
- 1
364
- ) : this.set(
365
- 1,
366
- 0,
367
- e,
368
- 0,
369
- 1,
370
- n,
371
- 0,
372
- 0,
373
- 1
374
- ), this;
375
- }
376
- /**
377
- * Sets this matrix as a 2D rotational transformation.
378
- *
379
- * @param {number} theta - The rotation in radians.
380
- * @return {Matrix3} A reference to this matrix.
381
- */
382
- makeRotation(e) {
383
- const n = Math.cos(e), r = Math.sin(e);
384
- return this.set(
385
- n,
386
- -r,
387
- 0,
388
- r,
389
- n,
390
- 0,
391
- 0,
392
- 0,
393
- 1
394
- ), this;
395
- }
396
- /**
397
- * Sets this matrix as a 2D scale transform.
398
- *
399
- * @param {number} x - The amount to scale in the X axis.
400
- * @param {number} y - The amount to scale in the Y axis.
401
- * @return {Matrix3} A reference to this matrix.
402
- */
403
- makeScale(e, n) {
404
- return this.set(
405
- e,
406
- 0,
407
- 0,
408
- 0,
409
- n,
410
- 0,
411
- 0,
412
- 0,
413
- 1
414
- ), this;
415
- }
416
- /**
417
- * Returns `true` if this matrix is equal with the given one.
418
- *
419
- * @param {Matrix3} matrix - The matrix to test for equality.
420
- * @return {boolean} Whether this matrix is equal with the given one.
421
- */
422
- equals(e) {
423
- const n = this.elements, r = e.elements;
424
- for (let i = 0; i < 9; i++)
425
- if (n[i] !== r[i]) return !1;
426
- return !0;
427
- }
428
- /**
429
- * Sets the elements of the matrix from the given array.
430
- *
431
- * @param {Array<number>} array - The matrix elements in column-major order.
432
- * @param {number} [offset=0] - Index of the first element in the array.
433
- * @return {Matrix3} A reference to this matrix.
434
- */
435
- fromArray(e, n = 0) {
436
- for (let r = 0; r < 9; r++)
437
- this.elements[r] = e[r + n];
438
- return this;
439
- }
440
- /**
441
- * Writes the elements of this matrix to the given array. If no array is provided,
442
- * the method returns a new instance.
443
- *
444
- * @param {Array<number>} [array=[]] - The target array holding the matrix elements in column-major order.
445
- * @param {number} [offset=0] - Index of the first element in the array.
446
- * @return {Array<number>} The matrix elements in column-major order.
447
- */
448
- toArray(e = [], n = 0) {
449
- const r = this.elements;
450
- return e[n] = r[0], e[n + 1] = r[1], e[n + 2] = r[2], e[n + 3] = r[3], e[n + 4] = r[4], e[n + 5] = r[5], e[n + 6] = r[6], e[n + 7] = r[7], e[n + 8] = r[8], e;
451
- }
452
- /**
453
- * Returns a matrix with copied values from this instance.
454
- *
455
- * @return {Matrix3} A clone of this instance.
456
- */
457
- clone() {
458
- return new this.constructor().fromArray(this.elements);
459
- }
460
- }
461
- const Re = /* @__PURE__ */ new ce(), Je = {};
462
- function Qe(t) {
463
- t in Je || (Je[t] = !0, console.warn(t));
464
- }
465
- const Ke = /* @__PURE__ */ new ce().set(
466
- 0.4123908,
467
- 0.3575843,
468
- 0.1804808,
469
- 0.212639,
470
- 0.7151687,
471
- 0.0721923,
472
- 0.0193308,
473
- 0.1191948,
474
- 0.9505322
475
- ), et = /* @__PURE__ */ new ce().set(
476
- 3.2409699,
477
- -1.5373832,
478
- -0.4986108,
479
- -0.9692436,
480
- 1.8759675,
481
- 0.0415551,
482
- 0.0556301,
483
- -0.203977,
484
- 1.0569715
485
- );
486
- function Tt() {
487
- const t = {
488
- enabled: !0,
489
- workingColorSpace: Xe,
490
- /**
491
- * Implementations of supported color spaces.
492
- *
493
- * Required:
494
- * - primaries: chromaticity coordinates [ rx ry gx gy bx by ]
495
- * - whitePoint: reference white [ x y ]
496
- * - transfer: transfer function (pre-defined)
497
- * - toXYZ: Matrix3 RGB to XYZ transform
498
- * - fromXYZ: Matrix3 XYZ to RGB transform
499
- * - luminanceCoefficients: RGB luminance coefficients
500
- *
501
- * Optional:
502
- * - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace, toneMappingMode: 'extended' | 'standard' }
503
- * - workingColorSpaceConfig: { unpackColorSpace: ColorSpace }
504
- *
505
- * Reference:
506
- * - https://www.russellcottrell.com/photo/matrixCalculator.htm
507
- */
508
- spaces: {},
509
- convert: function(i, o, s) {
510
- return this.enabled === !1 || o === s || !o || !s || (this.spaces[o].transfer === _e && (i.r = Q(i.r), i.g = Q(i.g), i.b = Q(i.b)), this.spaces[o].primaries !== this.spaces[s].primaries && (i.applyMatrix3(this.spaces[o].toXYZ), i.applyMatrix3(this.spaces[s].fromXYZ)), this.spaces[s].transfer === _e && (i.r = K(i.r), i.g = K(i.g), i.b = K(i.b))), i;
511
- },
512
- workingToColorSpace: function(i, o) {
513
- return this.convert(i, this.workingColorSpace, o);
514
- },
515
- colorSpaceToWorking: function(i, o) {
516
- return this.convert(i, o, this.workingColorSpace);
517
- },
518
- getPrimaries: function(i) {
519
- return this.spaces[i].primaries;
520
- },
521
- getTransfer: function(i) {
522
- return i === $t ? We : this.spaces[i].transfer;
523
- },
524
- getToneMappingMode: function(i) {
525
- return this.spaces[i].outputColorSpaceConfig.toneMappingMode || "standard";
526
- },
527
- getLuminanceCoefficients: function(i, o = this.workingColorSpace) {
528
- return i.fromArray(this.spaces[o].luminanceCoefficients);
529
- },
530
- define: function(i) {
531
- Object.assign(this.spaces, i);
532
- },
533
- // Internal APIs
534
- _getMatrix: function(i, o, s) {
535
- return i.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ);
536
- },
537
- _getDrawingBufferColorSpace: function(i) {
538
- return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace;
539
- },
540
- _getUnpackColorSpace: function(i = this.workingColorSpace) {
541
- return this.spaces[i].workingColorSpaceConfig.unpackColorSpace;
542
- },
543
- // Deprecated
544
- fromWorkingColorSpace: function(i, o) {
545
- return Qe("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), t.workingToColorSpace(i, o);
546
- },
547
- toWorkingColorSpace: function(i, o) {
548
- return Qe("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), t.colorSpaceToWorking(i, o);
549
- }
550
- }, e = [0.64, 0.33, 0.3, 0.6, 0.15, 0.06], n = [0.2126, 0.7152, 0.0722], r = [0.3127, 0.329];
551
- return t.define({
552
- [Xe]: {
553
- primaries: e,
554
- whitePoint: r,
555
- transfer: We,
556
- toXYZ: Ke,
557
- fromXYZ: et,
558
- luminanceCoefficients: n,
559
- workingColorSpaceConfig: { unpackColorSpace: B },
560
- outputColorSpaceConfig: { drawingBufferColorSpace: B }
561
- },
562
- [B]: {
563
- primaries: e,
564
- whitePoint: r,
565
- transfer: _e,
566
- toXYZ: Ke,
567
- fromXYZ: et,
568
- luminanceCoefficients: n,
569
- outputColorSpaceConfig: { drawingBufferColorSpace: B }
570
- }
571
- }), t;
572
- }
573
- const L = /* @__PURE__ */ Tt();
574
- function Q(t) {
575
- return t < 0.04045 ? t * 0.0773993808 : Math.pow(t * 0.9478672986 + 0.0521327014, 2.4);
80
+ return f(n);
576
81
  }
577
- function K(t) {
578
- return t < 31308e-7 ? t * 12.92 : 1.055 * Math.pow(t, 0.41666) - 0.055;
579
- }
580
- const pt = {
581
- aliceblue: 15792383,
582
- antiquewhite: 16444375,
583
- aqua: 65535,
584
- aquamarine: 8388564,
585
- azure: 15794175,
586
- beige: 16119260,
587
- bisque: 16770244,
588
- black: 0,
589
- blanchedalmond: 16772045,
590
- blue: 255,
591
- blueviolet: 9055202,
592
- brown: 10824234,
593
- burlywood: 14596231,
594
- cadetblue: 6266528,
595
- chartreuse: 8388352,
596
- chocolate: 13789470,
597
- coral: 16744272,
598
- cornflowerblue: 6591981,
599
- cornsilk: 16775388,
600
- crimson: 14423100,
601
- cyan: 65535,
602
- darkblue: 139,
603
- darkcyan: 35723,
604
- darkgoldenrod: 12092939,
605
- darkgray: 11119017,
606
- darkgreen: 25600,
607
- darkgrey: 11119017,
608
- darkkhaki: 12433259,
609
- darkmagenta: 9109643,
610
- darkolivegreen: 5597999,
611
- darkorange: 16747520,
612
- darkorchid: 10040012,
613
- darkred: 9109504,
614
- darksalmon: 15308410,
615
- darkseagreen: 9419919,
616
- darkslateblue: 4734347,
617
- darkslategray: 3100495,
618
- darkslategrey: 3100495,
619
- darkturquoise: 52945,
620
- darkviolet: 9699539,
621
- deeppink: 16716947,
622
- deepskyblue: 49151,
623
- dimgray: 6908265,
624
- dimgrey: 6908265,
625
- dodgerblue: 2003199,
626
- firebrick: 11674146,
627
- floralwhite: 16775920,
628
- forestgreen: 2263842,
629
- fuchsia: 16711935,
630
- gainsboro: 14474460,
631
- ghostwhite: 16316671,
632
- gold: 16766720,
633
- goldenrod: 14329120,
634
- gray: 8421504,
635
- green: 32768,
636
- greenyellow: 11403055,
637
- grey: 8421504,
638
- honeydew: 15794160,
639
- hotpink: 16738740,
640
- indianred: 13458524,
641
- indigo: 4915330,
642
- ivory: 16777200,
643
- khaki: 15787660,
644
- lavender: 15132410,
645
- lavenderblush: 16773365,
646
- lawngreen: 8190976,
647
- lemonchiffon: 16775885,
648
- lightblue: 11393254,
649
- lightcoral: 15761536,
650
- lightcyan: 14745599,
651
- lightgoldenrodyellow: 16448210,
652
- lightgray: 13882323,
653
- lightgreen: 9498256,
654
- lightgrey: 13882323,
655
- lightpink: 16758465,
656
- lightsalmon: 16752762,
657
- lightseagreen: 2142890,
658
- lightskyblue: 8900346,
659
- lightslategray: 7833753,
660
- lightslategrey: 7833753,
661
- lightsteelblue: 11584734,
662
- lightyellow: 16777184,
663
- lime: 65280,
664
- limegreen: 3329330,
665
- linen: 16445670,
666
- magenta: 16711935,
667
- maroon: 8388608,
668
- mediumaquamarine: 6737322,
669
- mediumblue: 205,
670
- mediumorchid: 12211667,
671
- mediumpurple: 9662683,
672
- mediumseagreen: 3978097,
673
- mediumslateblue: 8087790,
674
- mediumspringgreen: 64154,
675
- mediumturquoise: 4772300,
676
- mediumvioletred: 13047173,
677
- midnightblue: 1644912,
678
- mintcream: 16121850,
679
- mistyrose: 16770273,
680
- moccasin: 16770229,
681
- navajowhite: 16768685,
682
- navy: 128,
683
- oldlace: 16643558,
684
- olive: 8421376,
685
- olivedrab: 7048739,
686
- orange: 16753920,
687
- orangered: 16729344,
688
- orchid: 14315734,
689
- palegoldenrod: 15657130,
690
- palegreen: 10025880,
691
- paleturquoise: 11529966,
692
- palevioletred: 14381203,
693
- papayawhip: 16773077,
694
- peachpuff: 16767673,
695
- peru: 13468991,
696
- pink: 16761035,
697
- plum: 14524637,
698
- powderblue: 11591910,
699
- purple: 8388736,
700
- rebeccapurple: 6697881,
701
- red: 16711680,
702
- rosybrown: 12357519,
703
- royalblue: 4286945,
704
- saddlebrown: 9127187,
705
- salmon: 16416882,
706
- sandybrown: 16032864,
707
- seagreen: 3050327,
708
- seashell: 16774638,
709
- sienna: 10506797,
710
- silver: 12632256,
711
- skyblue: 8900331,
712
- slateblue: 6970061,
713
- slategray: 7372944,
714
- slategrey: 7372944,
715
- snow: 16775930,
716
- springgreen: 65407,
717
- steelblue: 4620980,
718
- tan: 13808780,
719
- teal: 32896,
720
- thistle: 14204888,
721
- tomato: 16737095,
722
- turquoise: 4251856,
723
- violet: 15631086,
724
- wheat: 16113331,
725
- white: 16777215,
726
- whitesmoke: 16119285,
727
- yellow: 16776960,
728
- yellowgreen: 10145074
729
- }, G = { h: 0, s: 0, l: 0 }, xe = { h: 0, s: 0, l: 0 };
730
- function Le(t, e, n) {
731
- return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * 6 * (2 / 3 - n) : t;
732
- }
733
- let oe = class {
734
- /**
735
- * Constructs a new color.
736
- *
737
- * Note that standard method of specifying color in three.js is with a hexadecimal triplet,
738
- * and that method is used throughout the rest of the documentation.
739
- *
740
- * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are
741
- * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance.
742
- * @param {number} [g] - The green component.
743
- * @param {number} [b] - The blue component.
744
- */
745
- constructor(e, n, r) {
746
- return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, this.set(e, n, r);
747
- }
748
- /**
749
- * Sets the colors's components from the given values.
750
- *
751
- * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are
752
- * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance.
753
- * @param {number} [g] - The green component.
754
- * @param {number} [b] - The blue component.
755
- * @return {Color} A reference to this color.
756
- */
757
- set(e, n, r) {
758
- if (n === void 0 && r === void 0) {
759
- const i = e;
760
- i && i.isColor ? this.copy(i) : typeof i == "number" ? this.setHex(i) : typeof i == "string" && this.setStyle(i);
761
- } else
762
- this.setRGB(e, n, r);
763
- return this;
764
- }
765
- /**
766
- * Sets the colors's components to the given scalar value.
767
- *
768
- * @param {number} scalar - The scalar value.
769
- * @return {Color} A reference to this color.
770
- */
771
- setScalar(e) {
772
- return this.r = e, this.g = e, this.b = e, this;
773
- }
774
- /**
775
- * Sets this color from a hexadecimal value.
776
- *
777
- * @param {number} hex - The hexadecimal value.
778
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
779
- * @return {Color} A reference to this color.
780
- */
781
- setHex(e, n = B) {
782
- return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, L.colorSpaceToWorking(this, n), this;
783
- }
784
- /**
785
- * Sets this color from RGB values.
786
- *
787
- * @param {number} r - Red channel value between `0.0` and `1.0`.
788
- * @param {number} g - Green channel value between `0.0` and `1.0`.
789
- * @param {number} b - Blue channel value between `0.0` and `1.0`.
790
- * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
791
- * @return {Color} A reference to this color.
792
- */
793
- setRGB(e, n, r, i = L.workingColorSpace) {
794
- return this.r = e, this.g = n, this.b = r, L.colorSpaceToWorking(this, i), this;
795
- }
796
- /**
797
- * Sets this color from RGB values.
798
- *
799
- * @param {number} h - Hue value between `0.0` and `1.0`.
800
- * @param {number} s - Saturation value between `0.0` and `1.0`.
801
- * @param {number} l - Lightness value between `0.0` and `1.0`.
802
- * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
803
- * @return {Color} A reference to this color.
804
- */
805
- setHSL(e, n, r, i = L.workingColorSpace) {
806
- if (e = Dt(e, 1), n = ie(n, 0, 1), r = ie(r, 0, 1), n === 0)
807
- this.r = this.g = this.b = r;
808
- else {
809
- const o = r <= 0.5 ? r * (1 + n) : r + n - r * n, s = 2 * r - o;
810
- this.r = Le(s, o, e + 1 / 3), this.g = Le(s, o, e), this.b = Le(s, o, e - 1 / 3);
811
- }
812
- return L.colorSpaceToWorking(this, i), this;
813
- }
814
- /**
815
- * Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`,
816
- * `rgb(100%, 0%, 0%)`, `hsl(0, 100%, 50%)`, `#ff0000`, `#f00`, or `red` ( or
817
- * any [X11 color name]{@link https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart} -
818
- * all 140 color names are supported).
819
- *
820
- * @param {string} style - Color as a CSS-style string.
821
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
822
- * @return {Color} A reference to this color.
823
- */
824
- setStyle(e, n = B) {
825
- function r(o) {
826
- o !== void 0 && parseFloat(o) < 1 && console.warn("THREE.Color: Alpha component of " + e + " will be ignored.");
827
- }
828
- let i;
829
- if (i = /^(\w+)\(([^\)]*)\)/.exec(e)) {
830
- let o;
831
- const s = i[1], a = i[2];
832
- switch (s) {
833
- case "rgb":
834
- case "rgba":
835
- if (o = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
836
- return r(o[4]), this.setRGB(
837
- Math.min(255, parseInt(o[1], 10)) / 255,
838
- Math.min(255, parseInt(o[2], 10)) / 255,
839
- Math.min(255, parseInt(o[3], 10)) / 255,
840
- n
841
- );
842
- if (o = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
843
- return r(o[4]), this.setRGB(
844
- Math.min(100, parseInt(o[1], 10)) / 100,
845
- Math.min(100, parseInt(o[2], 10)) / 100,
846
- Math.min(100, parseInt(o[3], 10)) / 100,
847
- n
848
- );
849
- break;
850
- case "hsl":
851
- case "hsla":
852
- if (o = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
853
- return r(o[4]), this.setHSL(
854
- parseFloat(o[1]) / 360,
855
- parseFloat(o[2]) / 100,
856
- parseFloat(o[3]) / 100,
857
- n
858
- );
859
- break;
860
- default:
861
- console.warn("THREE.Color: Unknown color model " + e);
862
- }
863
- } else if (i = /^\#([A-Fa-f\d]+)$/.exec(e)) {
864
- const o = i[1], s = o.length;
865
- if (s === 3)
866
- return this.setRGB(
867
- parseInt(o.charAt(0), 16) / 15,
868
- parseInt(o.charAt(1), 16) / 15,
869
- parseInt(o.charAt(2), 16) / 15,
870
- n
871
- );
872
- if (s === 6)
873
- return this.setHex(parseInt(o, 16), n);
874
- console.warn("THREE.Color: Invalid hex color " + e);
875
- } else if (e && e.length > 0)
876
- return this.setColorName(e, n);
877
- return this;
878
- }
879
- /**
880
- * Sets this color from a color name. Faster than {@link Color#setStyle} if
881
- * you don't need the other CSS-style formats.
882
- *
883
- * For convenience, the list of names is exposed in `Color.NAMES` as a hash.
884
- * ```js
885
- * Color.NAMES.aliceblue // returns 0xF0F8FF
886
- * ```
887
- *
888
- * @param {string} style - The color name.
889
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
890
- * @return {Color} A reference to this color.
891
- */
892
- setColorName(e, n = B) {
893
- const r = pt[e.toLowerCase()];
894
- return r !== void 0 ? this.setHex(r, n) : console.warn("THREE.Color: Unknown color " + e), this;
895
- }
896
- /**
897
- * Returns a new color with copied values from this instance.
898
- *
899
- * @return {Color} A clone of this instance.
900
- */
901
- clone() {
902
- return new this.constructor(this.r, this.g, this.b);
903
- }
904
- /**
905
- * Copies the values of the given color to this instance.
906
- *
907
- * @param {Color} color - The color to copy.
908
- * @return {Color} A reference to this color.
909
- */
910
- copy(e) {
911
- return this.r = e.r, this.g = e.g, this.b = e.b, this;
912
- }
913
- /**
914
- * Copies the given color into this color, and then converts this color from
915
- * `SRGBColorSpace` to `LinearSRGBColorSpace`.
916
- *
917
- * @param {Color} color - The color to copy/convert.
918
- * @return {Color} A reference to this color.
919
- */
920
- copySRGBToLinear(e) {
921
- return this.r = Q(e.r), this.g = Q(e.g), this.b = Q(e.b), this;
922
- }
923
- /**
924
- * Copies the given color into this color, and then converts this color from
925
- * `LinearSRGBColorSpace` to `SRGBColorSpace`.
926
- *
927
- * @param {Color} color - The color to copy/convert.
928
- * @return {Color} A reference to this color.
929
- */
930
- copyLinearToSRGB(e) {
931
- return this.r = K(e.r), this.g = K(e.g), this.b = K(e.b), this;
932
- }
933
- /**
934
- * Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
935
- *
936
- * @return {Color} A reference to this color.
937
- */
938
- convertSRGBToLinear() {
939
- return this.copySRGBToLinear(this), this;
940
- }
941
- /**
942
- * Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`.
943
- *
944
- * @return {Color} A reference to this color.
945
- */
946
- convertLinearToSRGB() {
947
- return this.copyLinearToSRGB(this), this;
948
- }
949
- /**
950
- * Returns the hexadecimal value of this color.
951
- *
952
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
953
- * @return {number} The hexadecimal value.
954
- */
955
- getHex(e = B) {
956
- return L.workingToColorSpace(k.copy(this), e), Math.round(ie(k.r * 255, 0, 255)) * 65536 + Math.round(ie(k.g * 255, 0, 255)) * 256 + Math.round(ie(k.b * 255, 0, 255));
957
- }
958
- /**
959
- * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
960
- *
961
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
962
- * @return {string} The hexadecimal value as a string.
963
- */
964
- getHexString(e = B) {
965
- return ("000000" + this.getHex(e).toString(16)).slice(-6);
966
- }
967
- /**
968
- * Converts the colors RGB values into the HSL format and stores them into the
969
- * given target object.
970
- *
971
- * @param {{h:number,s:number,l:number}} target - The target object that is used to store the method's result.
972
- * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
973
- * @return {{h:number,s:number,l:number}} The HSL representation of this color.
974
- */
975
- getHSL(e, n = L.workingColorSpace) {
976
- L.workingToColorSpace(k.copy(this), n);
977
- const r = k.r, i = k.g, o = k.b, s = Math.max(r, i, o), a = Math.min(r, i, o);
978
- let c, u;
979
- const f = (a + s) / 2;
980
- if (a === s)
981
- c = 0, u = 0;
982
- else {
983
- const l = s - a;
984
- switch (u = f <= 0.5 ? l / (s + a) : l / (2 - s - a), s) {
985
- case r:
986
- c = (i - o) / l + (i < o ? 6 : 0);
987
- break;
988
- case i:
989
- c = (o - r) / l + 2;
990
- break;
991
- case o:
992
- c = (r - i) / l + 4;
993
- break;
994
- }
995
- c /= 6;
996
- }
997
- return e.h = c, e.s = u, e.l = f, e;
998
- }
999
- /**
1000
- * Returns the RGB values of this color and stores them into the given target object.
1001
- *
1002
- * @param {Color} target - The target color that is used to store the method's result.
1003
- * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
1004
- * @return {Color} The RGB representation of this color.
1005
- */
1006
- getRGB(e, n = L.workingColorSpace) {
1007
- return L.workingToColorSpace(k.copy(this), n), e.r = k.r, e.g = k.g, e.b = k.b, e;
1008
- }
1009
- /**
1010
- * Returns the value of this color as a CSS style string. Example: `rgb(255,0,0)`.
1011
- *
1012
- * @param {string} [colorSpace=SRGBColorSpace] - The color space.
1013
- * @return {string} The CSS representation of this color.
1014
- */
1015
- getStyle(e = B) {
1016
- L.workingToColorSpace(k.copy(this), e);
1017
- const n = k.r, r = k.g, i = k.b;
1018
- return e !== B ? `color(${e} ${n.toFixed(3)} ${r.toFixed(3)} ${i.toFixed(3)})` : `rgb(${Math.round(n * 255)},${Math.round(r * 255)},${Math.round(i * 255)})`;
1019
- }
1020
- /**
1021
- * Adds the given HSL values to this color's values.
1022
- * Internally, this converts the color's RGB values to HSL, adds HSL
1023
- * and then converts the color back to RGB.
1024
- *
1025
- * @param {number} h - Hue value between `0.0` and `1.0`.
1026
- * @param {number} s - Saturation value between `0.0` and `1.0`.
1027
- * @param {number} l - Lightness value between `0.0` and `1.0`.
1028
- * @return {Color} A reference to this color.
1029
- */
1030
- offsetHSL(e, n, r) {
1031
- return this.getHSL(G), this.setHSL(G.h + e, G.s + n, G.l + r);
1032
- }
1033
- /**
1034
- * Adds the RGB values of the given color to the RGB values of this color.
1035
- *
1036
- * @param {Color} color - The color to add.
1037
- * @return {Color} A reference to this color.
1038
- */
1039
- add(e) {
1040
- return this.r += e.r, this.g += e.g, this.b += e.b, this;
1041
- }
1042
- /**
1043
- * Adds the RGB values of the given colors and stores the result in this instance.
1044
- *
1045
- * @param {Color} color1 - The first color.
1046
- * @param {Color} color2 - The second color.
1047
- * @return {Color} A reference to this color.
1048
- */
1049
- addColors(e, n) {
1050
- return this.r = e.r + n.r, this.g = e.g + n.g, this.b = e.b + n.b, this;
1051
- }
1052
- /**
1053
- * Adds the given scalar value to the RGB values of this color.
1054
- *
1055
- * @param {number} s - The scalar to add.
1056
- * @return {Color} A reference to this color.
1057
- */
1058
- addScalar(e) {
1059
- return this.r += e, this.g += e, this.b += e, this;
1060
- }
1061
- /**
1062
- * Subtracts the RGB values of the given color from the RGB values of this color.
1063
- *
1064
- * @param {Color} color - The color to subtract.
1065
- * @return {Color} A reference to this color.
1066
- */
1067
- sub(e) {
1068
- return this.r = Math.max(0, this.r - e.r), this.g = Math.max(0, this.g - e.g), this.b = Math.max(0, this.b - e.b), this;
1069
- }
1070
- /**
1071
- * Multiplies the RGB values of the given color with the RGB values of this color.
1072
- *
1073
- * @param {Color} color - The color to multiply.
1074
- * @return {Color} A reference to this color.
1075
- */
1076
- multiply(e) {
1077
- return this.r *= e.r, this.g *= e.g, this.b *= e.b, this;
1078
- }
1079
- /**
1080
- * Multiplies the given scalar value with the RGB values of this color.
1081
- *
1082
- * @param {number} s - The scalar to multiply.
1083
- * @return {Color} A reference to this color.
1084
- */
1085
- multiplyScalar(e) {
1086
- return this.r *= e, this.g *= e, this.b *= e, this;
1087
- }
1088
- /**
1089
- * Linearly interpolates this color's RGB values toward the RGB values of the
1090
- * given color. The alpha argument can be thought of as the ratio between
1091
- * the two colors, where `0.0` is this color and `1.0` is the first argument.
1092
- *
1093
- * @param {Color} color - The color to converge on.
1094
- * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`.
1095
- * @return {Color} A reference to this color.
1096
- */
1097
- lerp(e, n) {
1098
- return this.r += (e.r - this.r) * n, this.g += (e.g - this.g) * n, this.b += (e.b - this.b) * n, this;
1099
- }
1100
- /**
1101
- * Linearly interpolates between the given colors and stores the result in this instance.
1102
- * The alpha argument can be thought of as the ratio between the two colors, where `0.0`
1103
- * is the first and `1.0` is the second color.
1104
- *
1105
- * @param {Color} color1 - The first color.
1106
- * @param {Color} color2 - The second color.
1107
- * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`.
1108
- * @return {Color} A reference to this color.
1109
- */
1110
- lerpColors(e, n, r) {
1111
- return this.r = e.r + (n.r - e.r) * r, this.g = e.g + (n.g - e.g) * r, this.b = e.b + (n.b - e.b) * r, this;
1112
- }
1113
- /**
1114
- * Linearly interpolates this color's HSL values toward the HSL values of the
1115
- * given color. It differs from {@link Color#lerp} by not interpolating straight
1116
- * from one color to the other, but instead going through all the hues in between
1117
- * those two colors. The alpha argument can be thought of as the ratio between
1118
- * the two colors, where 0.0 is this color and 1.0 is the first argument.
1119
- *
1120
- * @param {Color} color - The color to converge on.
1121
- * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`.
1122
- * @return {Color} A reference to this color.
1123
- */
1124
- lerpHSL(e, n) {
1125
- this.getHSL(G), e.getHSL(xe);
1126
- const r = Se(G.h, xe.h, n), i = Se(G.s, xe.s, n), o = Se(G.l, xe.l, n);
1127
- return this.setHSL(r, i, o), this;
1128
- }
1129
- /**
1130
- * Sets the color's RGB components from the given 3D vector.
1131
- *
1132
- * @param {Vector3} v - The vector to set.
1133
- * @return {Color} A reference to this color.
1134
- */
1135
- setFromVector3(e) {
1136
- return this.r = e.x, this.g = e.y, this.b = e.z, this;
1137
- }
1138
- /**
1139
- * Transforms this color with the given 3x3 matrix.
1140
- *
1141
- * @param {Matrix3} m - The matrix.
1142
- * @return {Color} A reference to this color.
1143
- */
1144
- applyMatrix3(e) {
1145
- const n = this.r, r = this.g, i = this.b, o = e.elements;
1146
- return this.r = o[0] * n + o[3] * r + o[6] * i, this.g = o[1] * n + o[4] * r + o[7] * i, this.b = o[2] * n + o[5] * r + o[8] * i, this;
1147
- }
1148
- /**
1149
- * Returns `true` if this color is equal with the given one.
1150
- *
1151
- * @param {Color} c - The color to test for equality.
1152
- * @return {boolean} Whether this bounding color is equal with the given one.
1153
- */
1154
- equals(e) {
1155
- return e.r === this.r && e.g === this.g && e.b === this.b;
1156
- }
1157
- /**
1158
- * Sets this color's RGB components from the given array.
1159
- *
1160
- * @param {Array<number>} array - An array holding the RGB values.
1161
- * @param {number} [offset=0] - The offset into the array.
1162
- * @return {Color} A reference to this color.
1163
- */
1164
- fromArray(e, n = 0) {
1165
- return this.r = e[n], this.g = e[n + 1], this.b = e[n + 2], this;
1166
- }
1167
- /**
1168
- * Writes the RGB components of this color to the given array. If no array is provided,
1169
- * the method returns a new instance.
1170
- *
1171
- * @param {Array<number>} [array=[]] - The target array holding the color components.
1172
- * @param {number} [offset=0] - Index of the first element in the array.
1173
- * @return {Array<number>} The color components.
1174
- */
1175
- toArray(e = [], n = 0) {
1176
- return e[n] = this.r, e[n + 1] = this.g, e[n + 2] = this.b, e;
1177
- }
1178
- /**
1179
- * Sets the components of this color from the given buffer attribute.
1180
- *
1181
- * @param {BufferAttribute} attribute - The buffer attribute holding color data.
1182
- * @param {number} index - The index into the attribute.
1183
- * @return {Color} A reference to this color.
1184
- */
1185
- fromBufferAttribute(e, n) {
1186
- return this.r = e.getX(n), this.g = e.getY(n), this.b = e.getZ(n), this;
1187
- }
1188
- /**
1189
- * This methods defines the serialization result of this class. Returns the color
1190
- * as a hexadecimal value.
1191
- *
1192
- * @return {number} The hexadecimal value.
1193
- */
1194
- toJSON() {
1195
- return this.getHex();
1196
- }
1197
- *[Symbol.iterator]() {
1198
- yield this.r, yield this.g, yield this.b;
1199
- }
1200
- };
1201
- const k = /* @__PURE__ */ new oe();
1202
- oe.NAMES = pt;
1203
- typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: {
1204
- revision: xt
1205
- } }));
1206
- typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = xt);
1207
- const It = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_110m_admin_0_countries.geojson", Ht = "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json", Ot = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_admin_1_states_provinces.geojson", Pt = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4'><rect width='4' height='4' fill='%23f5f5f5'/></svg>", jt = {
82
+ const Mn = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_110m_admin_0_countries.geojson", _n = "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json", $n = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_admin_1_states_provinces.geojson", Rn = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4'><rect width='4' height='4' fill='%23f5f5f5'/></svg>", Cn = {
1208
83
  minColor: "#f8fafc",
1209
84
  maxColor: "#e5e7eb"
1210
85
  };
1211
- function je(t, e, n) {
1212
- t.prototype = e.prototype = n, n.constructor = t;
86
+ function Ee(e, n, t) {
87
+ e.prototype = n.prototype = t, t.constructor = e;
1213
88
  }
1214
- function bt(t, e) {
1215
- var n = Object.create(t.prototype);
1216
- for (var r in e) n[r] = e[r];
1217
- return n;
89
+ function on(e, n) {
90
+ var t = Object.create(e.prototype);
91
+ for (var r in n) t[r] = n[r];
92
+ return t;
1218
93
  }
1219
- function fe() {
94
+ function te() {
1220
95
  }
1221
- var se = 0.7, Fe = 1 / se, ee = "\\s*([+-]?\\d+)\\s*", ae = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", H = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Gt = /^#([0-9a-f]{3,8})$/, qt = new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`), zt = new RegExp(`^rgb\\(${H},${H},${H}\\)$`), Ut = new RegExp(`^rgba\\(${ee},${ee},${ee},${ae}\\)$`), Vt = new RegExp(`^rgba\\(${H},${H},${H},${ae}\\)$`), Zt = new RegExp(`^hsl\\(${ae},${H},${H}\\)$`), Yt = new RegExp(`^hsla\\(${ae},${H},${H},${ae}\\)$`), tt = {
96
+ var Q = 0.7, me = 1 / Q, X = "\\s*([+-]?\\d+)\\s*", ee = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", j = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", kn = /^#([0-9a-f]{3,8})$/, Ln = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), An = new RegExp(`^rgb\\(${j},${j},${j}\\)$`), Sn = new RegExp(`^rgba\\(${X},${X},${X},${ee}\\)$`), En = new RegExp(`^rgba\\(${j},${j},${j},${ee}\\)$`), In = new RegExp(`^hsl\\(${ee},${j},${j}\\)$`), Fn = new RegExp(`^hsla\\(${ee},${j},${j},${ee}\\)$`), He = {
1222
97
  aliceblue: 15792383,
1223
98
  antiquewhite: 16444375,
1224
99
  aqua: 65535,
@@ -1368,900 +243,993 @@ var se = 0.7, Fe = 1 / se, ee = "\\s*([+-]?\\d+)\\s*", ae = "\\s*([+-]?(?:\\d*\\
1368
243
  yellow: 16776960,
1369
244
  yellowgreen: 10145074
1370
245
  };
1371
- je(fe, ue, {
1372
- copy(t) {
1373
- return Object.assign(new this.constructor(), this, t);
246
+ Ee(te, ne, {
247
+ copy(e) {
248
+ return Object.assign(new this.constructor(), this, e);
1374
249
  },
1375
250
  displayable() {
1376
251
  return this.rgb().displayable();
1377
252
  },
1378
- hex: nt,
253
+ hex: Te,
1379
254
  // Deprecated! Use color.formatHex.
1380
- formatHex: nt,
1381
- formatHex8: Xt,
1382
- formatHsl: Wt,
1383
- formatRgb: rt,
1384
- toString: rt
255
+ formatHex: Te,
256
+ formatHex8: jn,
257
+ formatHsl: Pn,
258
+ formatRgb: Ge,
259
+ toString: Ge
1385
260
  });
1386
- function nt() {
261
+ function Te() {
1387
262
  return this.rgb().formatHex();
1388
263
  }
1389
- function Xt() {
264
+ function jn() {
1390
265
  return this.rgb().formatHex8();
1391
266
  }
1392
- function Wt() {
1393
- return wt(this).formatHsl();
267
+ function Pn() {
268
+ return an(this).formatHsl();
1394
269
  }
1395
- function rt() {
270
+ function Ge() {
1396
271
  return this.rgb().formatRgb();
1397
272
  }
1398
- function ue(t) {
1399
- var e, n;
1400
- return t = (t + "").trim().toLowerCase(), (e = Gt.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? it(e) : n === 3 ? new A(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? pe(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? pe(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = qt.exec(t)) ? new A(e[1], e[2], e[3], 1) : (e = zt.exec(t)) ? new A(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Ut.exec(t)) ? pe(e[1], e[2], e[3], e[4]) : (e = Vt.exec(t)) ? pe(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Zt.exec(t)) ? at(e[1], e[2] / 100, e[3] / 100, 1) : (e = Yt.exec(t)) ? at(e[1], e[2] / 100, e[3] / 100, e[4]) : tt.hasOwnProperty(t) ? it(tt[t]) : t === "transparent" ? new A(NaN, NaN, NaN, 0) : null;
273
+ function ne(e) {
274
+ var n, t;
275
+ return e = (e + "").trim().toLowerCase(), (n = kn.exec(e)) ? (t = n[1].length, n = parseInt(n[1], 16), t === 6 ? Ue(n) : t === 3 ? new C(n >> 8 & 15 | n >> 4 & 240, n >> 4 & 15 | n & 240, (n & 15) << 4 | n & 15, 1) : t === 8 ? fe(n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, (n & 255) / 255) : t === 4 ? fe(n >> 12 & 15 | n >> 8 & 240, n >> 8 & 15 | n >> 4 & 240, n >> 4 & 15 | n & 240, ((n & 15) << 4 | n & 15) / 255) : null) : (n = Ln.exec(e)) ? new C(n[1], n[2], n[3], 1) : (n = An.exec(e)) ? new C(n[1] * 255 / 100, n[2] * 255 / 100, n[3] * 255 / 100, 1) : (n = Sn.exec(e)) ? fe(n[1], n[2], n[3], n[4]) : (n = En.exec(e)) ? fe(n[1] * 255 / 100, n[2] * 255 / 100, n[3] * 255 / 100, n[4]) : (n = In.exec(e)) ? Ve(n[1], n[2] / 100, n[3] / 100, 1) : (n = Fn.exec(e)) ? Ve(n[1], n[2] / 100, n[3] / 100, n[4]) : He.hasOwnProperty(e) ? Ue(He[e]) : e === "transparent" ? new C(NaN, NaN, NaN, 0) : null;
1401
276
  }
1402
- function it(t) {
1403
- return new A(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
277
+ function Ue(e) {
278
+ return new C(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1404
279
  }
1405
- function pe(t, e, n, r) {
1406
- return r <= 0 && (t = e = n = NaN), new A(t, e, n, r);
280
+ function fe(e, n, t, r) {
281
+ return r <= 0 && (e = n = t = NaN), new C(e, n, t, r);
1407
282
  }
1408
- function Jt(t) {
1409
- return t instanceof fe || (t = ue(t)), t ? (t = t.rgb(), new A(t.r, t.g, t.b, t.opacity)) : new A();
283
+ function On(e) {
284
+ return e instanceof te || (e = ne(e)), e ? (e = e.rgb(), new C(e.r, e.g, e.b, e.opacity)) : new C();
1410
285
  }
1411
- function Te(t, e, n, r) {
1412
- return arguments.length === 1 ? Jt(t) : new A(t, e, n, r ?? 1);
286
+ function Ce(e, n, t, r) {
287
+ return arguments.length === 1 ? On(e) : new C(e, n, t, r ?? 1);
1413
288
  }
1414
- function A(t, e, n, r) {
1415
- this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
289
+ function C(e, n, t, r) {
290
+ this.r = +e, this.g = +n, this.b = +t, this.opacity = +r;
1416
291
  }
1417
- je(A, Te, bt(fe, {
1418
- brighter(t) {
1419
- return t = t == null ? Fe : Math.pow(Fe, t), new A(this.r * t, this.g * t, this.b * t, this.opacity);
292
+ Ee(C, Ce, on(te, {
293
+ brighter(e) {
294
+ return e = e == null ? me : Math.pow(me, e), new C(this.r * e, this.g * e, this.b * e, this.opacity);
1420
295
  },
1421
- darker(t) {
1422
- return t = t == null ? se : Math.pow(se, t), new A(this.r * t, this.g * t, this.b * t, this.opacity);
296
+ darker(e) {
297
+ return e = e == null ? Q : Math.pow(Q, e), new C(this.r * e, this.g * e, this.b * e, this.opacity);
1423
298
  },
1424
299
  rgb() {
1425
300
  return this;
1426
301
  },
1427
302
  clamp() {
1428
- return new A(Y(this.r), Y(this.g), Y(this.b), Ce(this.opacity));
303
+ return new C(Z(this.r), Z(this.g), Z(this.b), he(this.opacity));
1429
304
  },
1430
305
  displayable() {
1431
306
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1432
307
  },
1433
- hex: ot,
308
+ hex: De,
1434
309
  // Deprecated! Use color.formatHex.
1435
- formatHex: ot,
1436
- formatHex8: Qt,
1437
- formatRgb: st,
1438
- toString: st
310
+ formatHex: De,
311
+ formatHex8: zn,
312
+ formatRgb: qe,
313
+ toString: qe
1439
314
  }));
1440
- function ot() {
1441
- return `#${Z(this.r)}${Z(this.g)}${Z(this.b)}`;
315
+ function De() {
316
+ return `#${B(this.r)}${B(this.g)}${B(this.b)}`;
1442
317
  }
1443
- function Qt() {
1444
- return `#${Z(this.r)}${Z(this.g)}${Z(this.b)}${Z((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
318
+ function zn() {
319
+ return `#${B(this.r)}${B(this.g)}${B(this.b)}${B((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1445
320
  }
1446
- function st() {
1447
- const t = Ce(this.opacity);
1448
- return `${t === 1 ? "rgb(" : "rgba("}${Y(this.r)}, ${Y(this.g)}, ${Y(this.b)}${t === 1 ? ")" : `, ${t})`}`;
321
+ function qe() {
322
+ const e = he(this.opacity);
323
+ return `${e === 1 ? "rgb(" : "rgba("}${Z(this.r)}, ${Z(this.g)}, ${Z(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1449
324
  }
1450
- function Ce(t) {
1451
- return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
325
+ function he(e) {
326
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1452
327
  }
1453
- function Y(t) {
1454
- return Math.max(0, Math.min(255, Math.round(t) || 0));
328
+ function Z(e) {
329
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
1455
330
  }
1456
- function Z(t) {
1457
- return t = Y(t), (t < 16 ? "0" : "") + t.toString(16);
331
+ function B(e) {
332
+ return e = Z(e), (e < 16 ? "0" : "") + e.toString(16);
1458
333
  }
1459
- function at(t, e, n, r) {
1460
- return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new $(t, e, n, r);
334
+ function Ve(e, n, t, r) {
335
+ return r <= 0 ? e = n = t = NaN : t <= 0 || t >= 1 ? e = n = NaN : n <= 0 && (e = NaN), new E(e, n, t, r);
1461
336
  }
1462
- function wt(t) {
1463
- if (t instanceof $) return new $(t.h, t.s, t.l, t.opacity);
1464
- if (t instanceof fe || (t = ue(t)), !t) return new $();
1465
- if (t instanceof $) return t;
1466
- t = t.rgb();
1467
- var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), o = Math.max(e, n, r), s = NaN, a = o - i, c = (o + i) / 2;
1468
- return a ? (e === o ? s = (n - r) / a + (n < r) * 6 : n === o ? s = (r - e) / a + 2 : s = (e - n) / a + 4, a /= c < 0.5 ? o + i : 2 - o - i, s *= 60) : a = c > 0 && c < 1 ? 0 : s, new $(s, a, c, t.opacity);
337
+ function an(e) {
338
+ if (e instanceof E) return new E(e.h, e.s, e.l, e.opacity);
339
+ if (e instanceof te || (e = ne(e)), !e) return new E();
340
+ if (e instanceof E) return e;
341
+ e = e.rgb();
342
+ var n = e.r / 255, t = e.g / 255, r = e.b / 255, i = Math.min(n, t, r), o = Math.max(n, t, r), s = NaN, a = o - i, l = (o + i) / 2;
343
+ return a ? (n === o ? s = (t - r) / a + (t < r) * 6 : t === o ? s = (r - n) / a + 2 : s = (n - t) / a + 4, a /= l < 0.5 ? o + i : 2 - o - i, s *= 60) : a = l > 0 && l < 1 ? 0 : s, new E(s, a, l, e.opacity);
1469
344
  }
1470
- function Kt(t, e, n, r) {
1471
- return arguments.length === 1 ? wt(t) : new $(t, e, n, r ?? 1);
345
+ function Hn(e, n, t, r) {
346
+ return arguments.length === 1 ? an(e) : new E(e, n, t, r ?? 1);
1472
347
  }
1473
- function $(t, e, n, r) {
1474
- this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
348
+ function E(e, n, t, r) {
349
+ this.h = +e, this.s = +n, this.l = +t, this.opacity = +r;
1475
350
  }
1476
- je($, Kt, bt(fe, {
1477
- brighter(t) {
1478
- return t = t == null ? Fe : Math.pow(Fe, t), new $(this.h, this.s, this.l * t, this.opacity);
351
+ Ee(E, Hn, on(te, {
352
+ brighter(e) {
353
+ return e = e == null ? me : Math.pow(me, e), new E(this.h, this.s, this.l * e, this.opacity);
1479
354
  },
1480
- darker(t) {
1481
- return t = t == null ? se : Math.pow(se, t), new $(this.h, this.s, this.l * t, this.opacity);
355
+ darker(e) {
356
+ return e = e == null ? Q : Math.pow(Q, e), new E(this.h, this.s, this.l * e, this.opacity);
1482
357
  },
1483
358
  rgb() {
1484
- var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
1485
- return new A(
1486
- Be(t >= 240 ? t - 240 : t + 120, i, r),
1487
- Be(t, i, r),
1488
- Be(t < 120 ? t + 240 : t - 120, i, r),
359
+ var e = this.h % 360 + (this.h < 0) * 360, n = isNaN(e) || isNaN(this.s) ? 0 : this.s, t = this.l, r = t + (t < 0.5 ? t : 1 - t) * n, i = 2 * t - r;
360
+ return new C(
361
+ Me(e >= 240 ? e - 240 : e + 120, i, r),
362
+ Me(e, i, r),
363
+ Me(e < 120 ? e + 240 : e - 120, i, r),
1489
364
  this.opacity
1490
365
  );
1491
366
  },
1492
367
  clamp() {
1493
- return new $(ut(this.h), be(this.s), be(this.l), Ce(this.opacity));
368
+ return new E(Be(this.h), ce(this.s), ce(this.l), he(this.opacity));
1494
369
  },
1495
370
  displayable() {
1496
371
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1497
372
  },
1498
373
  formatHsl() {
1499
- const t = Ce(this.opacity);
1500
- return `${t === 1 ? "hsl(" : "hsla("}${ut(this.h)}, ${be(this.s) * 100}%, ${be(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
374
+ const e = he(this.opacity);
375
+ return `${e === 1 ? "hsl(" : "hsla("}${Be(this.h)}, ${ce(this.s) * 100}%, ${ce(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1501
376
  }
1502
377
  }));
1503
- function ut(t) {
1504
- return t = (t || 0) % 360, t < 0 ? t + 360 : t;
378
+ function Be(e) {
379
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1505
380
  }
1506
- function be(t) {
1507
- return Math.max(0, Math.min(1, t || 0));
381
+ function ce(e) {
382
+ return Math.max(0, Math.min(1, e || 0));
1508
383
  }
1509
- function Be(t, e, n) {
1510
- return (t < 60 ? e + (n - e) * t / 60 : t < 180 ? n : t < 240 ? e + (n - e) * (240 - t) / 60 : e) * 255;
384
+ function Me(e, n, t) {
385
+ return (e < 60 ? n + (t - n) * e / 60 : e < 180 ? t : e < 240 ? n + (t - n) * (240 - e) / 60 : n) * 255;
1511
386
  }
1512
- const Ge = (t) => () => t;
1513
- function en(t, e) {
1514
- return function(n) {
1515
- return t + n * e;
387
+ const Ie = (e) => () => e;
388
+ function Tn(e, n) {
389
+ return function(t) {
390
+ return e + t * n;
1516
391
  };
1517
392
  }
1518
- function tn(t, e, n) {
1519
- return t = Math.pow(t, n), e = Math.pow(e, n) - t, n = 1 / n, function(r) {
1520
- return Math.pow(t + r * e, n);
393
+ function Gn(e, n, t) {
394
+ return e = Math.pow(e, t), n = Math.pow(n, t) - e, t = 1 / t, function(r) {
395
+ return Math.pow(e + r * n, t);
1521
396
  };
1522
397
  }
1523
- function nn(t) {
1524
- return (t = +t) == 1 ? yt : function(e, n) {
1525
- return n - e ? tn(e, n, t) : Ge(isNaN(e) ? n : e);
398
+ function Un(e) {
399
+ return (e = +e) == 1 ? sn : function(n, t) {
400
+ return t - n ? Gn(n, t, e) : Ie(isNaN(n) ? t : n);
1526
401
  };
1527
402
  }
1528
- function yt(t, e) {
1529
- var n = e - t;
1530
- return n ? en(t, n) : Ge(isNaN(t) ? e : t);
403
+ function sn(e, n) {
404
+ var t = n - e;
405
+ return t ? Tn(e, t) : Ie(isNaN(e) ? n : e);
1531
406
  }
1532
- const Ie = (function t(e) {
1533
- var n = nn(e);
407
+ const ke = (function e(n) {
408
+ var t = Un(n);
1534
409
  function r(i, o) {
1535
- var s = n((i = Te(i)).r, (o = Te(o)).r), a = n(i.g, o.g), c = n(i.b, o.b), u = yt(i.opacity, o.opacity);
1536
- return function(f) {
1537
- return i.r = s(f), i.g = a(f), i.b = c(f), i.opacity = u(f), i + "";
410
+ var s = t((i = Ce(i)).r, (o = Ce(o)).r), a = t(i.g, o.g), l = t(i.b, o.b), f = sn(i.opacity, o.opacity);
411
+ return function(d) {
412
+ return i.r = s(d), i.g = a(d), i.b = l(d), i.opacity = f(d), i + "";
1538
413
  };
1539
414
  }
1540
- return r.gamma = t, r;
415
+ return r.gamma = e, r;
1541
416
  })(1);
1542
- function rn(t, e) {
1543
- e || (e = []);
1544
- var n = t ? Math.min(e.length, t.length) : 0, r = e.slice(), i;
417
+ function Dn(e, n) {
418
+ n || (n = []);
419
+ var t = e ? Math.min(n.length, e.length) : 0, r = n.slice(), i;
1545
420
  return function(o) {
1546
- for (i = 0; i < n; ++i) r[i] = t[i] * (1 - o) + e[i] * o;
421
+ for (i = 0; i < t; ++i) r[i] = e[i] * (1 - o) + n[i] * o;
1547
422
  return r;
1548
423
  };
1549
424
  }
1550
- function on(t) {
1551
- return ArrayBuffer.isView(t) && !(t instanceof DataView);
425
+ function qn(e) {
426
+ return ArrayBuffer.isView(e) && !(e instanceof DataView);
1552
427
  }
1553
- function sn(t, e) {
1554
- var n = e ? e.length : 0, r = t ? Math.min(n, t.length) : 0, i = new Array(r), o = new Array(n), s;
1555
- for (s = 0; s < r; ++s) i[s] = qe(t[s], e[s]);
1556
- for (; s < n; ++s) o[s] = e[s];
428
+ function Vn(e, n) {
429
+ var t = n ? n.length : 0, r = e ? Math.min(t, e.length) : 0, i = new Array(r), o = new Array(t), s;
430
+ for (s = 0; s < r; ++s) i[s] = Fe(e[s], n[s]);
431
+ for (; s < t; ++s) o[s] = n[s];
1557
432
  return function(a) {
1558
433
  for (s = 0; s < r; ++s) o[s] = i[s](a);
1559
434
  return o;
1560
435
  };
1561
436
  }
1562
- function an(t, e) {
1563
- var n = /* @__PURE__ */ new Date();
1564
- return t = +t, e = +e, function(r) {
1565
- return n.setTime(t * (1 - r) + e * r), n;
437
+ function Bn(e, n) {
438
+ var t = /* @__PURE__ */ new Date();
439
+ return e = +e, n = +n, function(r) {
440
+ return t.setTime(e * (1 - r) + n * r), t;
1566
441
  };
1567
442
  }
1568
- function Me(t, e) {
1569
- return t = +t, e = +e, function(n) {
1570
- return t * (1 - n) + e * n;
443
+ function ge(e, n) {
444
+ return e = +e, n = +n, function(t) {
445
+ return e * (1 - t) + n * t;
1571
446
  };
1572
447
  }
1573
- function un(t, e) {
1574
- var n = {}, r = {}, i;
1575
- (t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
1576
- for (i in e)
1577
- i in t ? n[i] = qe(t[i], e[i]) : r[i] = e[i];
448
+ function Zn(e, n) {
449
+ var t = {}, r = {}, i;
450
+ (e === null || typeof e != "object") && (e = {}), (n === null || typeof n != "object") && (n = {});
451
+ for (i in n)
452
+ i in e ? t[i] = Fe(e[i], n[i]) : r[i] = n[i];
1578
453
  return function(o) {
1579
- for (i in n) r[i] = n[i](o);
454
+ for (i in t) r[i] = t[i](o);
1580
455
  return r;
1581
456
  };
1582
457
  }
1583
- var He = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, $e = new RegExp(He.source, "g");
1584
- function cn(t) {
458
+ var Le = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, _e = new RegExp(Le.source, "g");
459
+ function Jn(e) {
1585
460
  return function() {
1586
- return t;
461
+ return e;
1587
462
  };
1588
463
  }
1589
- function fn(t) {
1590
- return function(e) {
1591
- return t(e) + "";
464
+ function Kn(e) {
465
+ return function(n) {
466
+ return e(n) + "";
1592
467
  };
1593
468
  }
1594
- function ln(t, e) {
1595
- var n = He.lastIndex = $e.lastIndex = 0, r, i, o, s = -1, a = [], c = [];
1596
- for (t = t + "", e = e + ""; (r = He.exec(t)) && (i = $e.exec(e)); )
1597
- (o = i.index) > n && (o = e.slice(n, o), a[s] ? a[s] += o : a[++s] = o), (r = r[0]) === (i = i[0]) ? a[s] ? a[s] += i : a[++s] = i : (a[++s] = null, c.push({ i: s, x: Me(r, i) })), n = $e.lastIndex;
1598
- return n < e.length && (o = e.slice(n), a[s] ? a[s] += o : a[++s] = o), a.length < 2 ? c[0] ? fn(c[0].x) : cn(e) : (e = c.length, function(u) {
1599
- for (var f = 0, l; f < e; ++f) a[(l = c[f]).i] = l.x(u);
469
+ function Yn(e, n) {
470
+ var t = Le.lastIndex = _e.lastIndex = 0, r, i, o, s = -1, a = [], l = [];
471
+ for (e = e + "", n = n + ""; (r = Le.exec(e)) && (i = _e.exec(n)); )
472
+ (o = i.index) > t && (o = n.slice(t, o), a[s] ? a[s] += o : a[++s] = o), (r = r[0]) === (i = i[0]) ? a[s] ? a[s] += i : a[++s] = i : (a[++s] = null, l.push({ i: s, x: ge(r, i) })), t = _e.lastIndex;
473
+ return t < n.length && (o = n.slice(t), a[s] ? a[s] += o : a[++s] = o), a.length < 2 ? l[0] ? Kn(l[0].x) : Jn(n) : (n = l.length, function(f) {
474
+ for (var d = 0, c; d < n; ++d) a[(c = l[d]).i] = c.x(f);
1600
475
  return a.join("");
1601
476
  });
1602
477
  }
1603
- function qe(t, e) {
1604
- var n = typeof e, r;
1605
- return e == null || n === "boolean" ? Ge(e) : (n === "number" ? Me : n === "string" ? (r = ue(e)) ? (e = r, Ie) : ln : e instanceof ue ? Ie : e instanceof Date ? an : on(e) ? rn : Array.isArray(e) ? sn : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? un : Me)(t, e);
478
+ function Fe(e, n) {
479
+ var t = typeof n, r;
480
+ return n == null || t === "boolean" ? Ie(n) : (t === "number" ? ge : t === "string" ? (r = ne(n)) ? (n = r, ke) : Yn : n instanceof ne ? ke : n instanceof Date ? Bn : qn(n) ? Dn : Array.isArray(n) ? Vn : typeof n.valueOf != "function" && typeof n.toString != "function" || isNaN(n) ? Zn : ge)(e, n);
1606
481
  }
1607
- function hn(t, e) {
1608
- return t = +t, e = +e, function(n) {
1609
- return Math.round(t * (1 - n) + e * n);
482
+ function Xn(e, n) {
483
+ return e = +e, n = +n, function(t) {
484
+ return Math.round(e * (1 - t) + n * t);
1610
485
  };
1611
486
  }
1612
- function ye(t, e) {
1613
- return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
487
+ function le(e, n) {
488
+ return e == null || n == null ? NaN : e < n ? -1 : e > n ? 1 : e >= n ? 0 : NaN;
1614
489
  }
1615
- function gn(t, e) {
1616
- return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
490
+ function Wn(e, n) {
491
+ return e == null || n == null ? NaN : n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
1617
492
  }
1618
- function Ft(t) {
1619
- let e, n, r;
1620
- t.length !== 2 ? (e = ye, n = (a, c) => ye(t(a), c), r = (a, c) => t(a) - c) : (e = t === ye || t === gn ? t : dn, n = t, r = t);
1621
- function i(a, c, u = 0, f = a.length) {
1622
- if (u < f) {
1623
- if (e(c, c) !== 0) return f;
493
+ function fn(e) {
494
+ let n, t, r;
495
+ e.length !== 2 ? (n = le, t = (a, l) => le(e(a), l), r = (a, l) => e(a) - l) : (n = e === le || e === Wn ? e : Qn, t = e, r = e);
496
+ function i(a, l, f = 0, d = a.length) {
497
+ if (f < d) {
498
+ if (n(l, l) !== 0) return d;
1624
499
  do {
1625
- const l = u + f >>> 1;
1626
- n(a[l], c) < 0 ? u = l + 1 : f = l;
1627
- } while (u < f);
500
+ const c = f + d >>> 1;
501
+ t(a[c], l) < 0 ? f = c + 1 : d = c;
502
+ } while (f < d);
1628
503
  }
1629
- return u;
504
+ return f;
1630
505
  }
1631
- function o(a, c, u = 0, f = a.length) {
1632
- if (u < f) {
1633
- if (e(c, c) !== 0) return f;
506
+ function o(a, l, f = 0, d = a.length) {
507
+ if (f < d) {
508
+ if (n(l, l) !== 0) return d;
1634
509
  do {
1635
- const l = u + f >>> 1;
1636
- n(a[l], c) <= 0 ? u = l + 1 : f = l;
1637
- } while (u < f);
510
+ const c = f + d >>> 1;
511
+ t(a[c], l) <= 0 ? f = c + 1 : d = c;
512
+ } while (f < d);
1638
513
  }
1639
- return u;
514
+ return f;
1640
515
  }
1641
- function s(a, c, u = 0, f = a.length) {
1642
- const l = i(a, c, u, f - 1);
1643
- return l > u && r(a[l - 1], c) > -r(a[l], c) ? l - 1 : l;
516
+ function s(a, l, f = 0, d = a.length) {
517
+ const c = i(a, l, f, d - 1);
518
+ return c > f && r(a[c - 1], l) > -r(a[c], l) ? c - 1 : c;
1644
519
  }
1645
520
  return { left: i, center: s, right: o };
1646
521
  }
1647
- function dn() {
522
+ function Qn() {
1648
523
  return 0;
1649
524
  }
1650
- function mn(t) {
1651
- return t === null ? NaN : +t;
1652
- }
1653
- const xn = Ft(ye), pn = xn.right;
1654
- Ft(mn).center;
1655
- const bn = Math.sqrt(50), wn = Math.sqrt(10), yn = Math.sqrt(2);
1656
- function ke(t, e, n) {
1657
- const r = (e - t) / Math.max(0, n), i = Math.floor(Math.log10(r)), o = r / Math.pow(10, i), s = o >= bn ? 10 : o >= wn ? 5 : o >= yn ? 2 : 1;
1658
- let a, c, u;
1659
- return i < 0 ? (u = Math.pow(10, -i) / s, a = Math.round(t * u), c = Math.round(e * u), a / u < t && ++a, c / u > e && --c, u = -u) : (u = Math.pow(10, i) * s, a = Math.round(t / u), c = Math.round(e / u), a * u < t && ++a, c * u > e && --c), c < a && 0.5 <= n && n < 2 ? ke(t, e, n * 2) : [a, c, u];
1660
- }
1661
- function Fn(t, e, n) {
1662
- if (e = +e, t = +t, n = +n, !(n > 0)) return [];
1663
- if (t === e) return [t];
1664
- const r = e < t, [i, o, s] = r ? ke(e, t, n) : ke(t, e, n);
525
+ function et(e) {
526
+ return e === null ? NaN : +e;
527
+ }
528
+ const nt = fn(le), tt = nt.right;
529
+ fn(et).center;
530
+ const rt = Math.sqrt(50), it = Math.sqrt(10), ot = Math.sqrt(2);
531
+ function pe(e, n, t) {
532
+ const r = (n - e) / Math.max(0, t), i = Math.floor(Math.log10(r)), o = r / Math.pow(10, i), s = o >= rt ? 10 : o >= it ? 5 : o >= ot ? 2 : 1;
533
+ let a, l, f;
534
+ return i < 0 ? (f = Math.pow(10, -i) / s, a = Math.round(e * f), l = Math.round(n * f), a / f < e && ++a, l / f > n && --l, f = -f) : (f = Math.pow(10, i) * s, a = Math.round(e / f), l = Math.round(n / f), a * f < e && ++a, l * f > n && --l), l < a && 0.5 <= t && t < 2 ? pe(e, n, t * 2) : [a, l, f];
535
+ }
536
+ function at(e, n, t) {
537
+ if (n = +n, e = +e, t = +t, !(t > 0)) return [];
538
+ if (e === n) return [e];
539
+ const r = n < e, [i, o, s] = r ? pe(n, e, t) : pe(e, n, t);
1665
540
  if (!(o >= i)) return [];
1666
- const a = o - i + 1, c = new Array(a);
541
+ const a = o - i + 1, l = new Array(a);
1667
542
  if (r)
1668
- if (s < 0) for (let u = 0; u < a; ++u) c[u] = (o - u) / -s;
1669
- else for (let u = 0; u < a; ++u) c[u] = (o - u) * s;
1670
- else if (s < 0) for (let u = 0; u < a; ++u) c[u] = (i + u) / -s;
1671
- else for (let u = 0; u < a; ++u) c[u] = (i + u) * s;
1672
- return c;
1673
- }
1674
- function Oe(t, e, n) {
1675
- return e = +e, t = +t, n = +n, ke(t, e, n)[2];
1676
- }
1677
- function Cn(t, e, n) {
1678
- e = +e, t = +t, n = +n;
1679
- const r = e < t, i = r ? Oe(e, t, n) : Oe(t, e, n);
543
+ if (s < 0) for (let f = 0; f < a; ++f) l[f] = (o - f) / -s;
544
+ else for (let f = 0; f < a; ++f) l[f] = (o - f) * s;
545
+ else if (s < 0) for (let f = 0; f < a; ++f) l[f] = (i + f) / -s;
546
+ else for (let f = 0; f < a; ++f) l[f] = (i + f) * s;
547
+ return l;
548
+ }
549
+ function Ae(e, n, t) {
550
+ return n = +n, e = +e, t = +t, pe(e, n, t)[2];
551
+ }
552
+ function st(e, n, t) {
553
+ n = +n, e = +e, t = +t;
554
+ const r = n < e, i = r ? Ae(n, e, t) : Ae(e, n, t);
1680
555
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
1681
556
  }
1682
- function Mn(t, e) {
557
+ function ft(e, n) {
1683
558
  switch (arguments.length) {
1684
559
  case 0:
1685
560
  break;
1686
561
  case 1:
1687
- this.range(t);
562
+ this.range(e);
1688
563
  break;
1689
564
  default:
1690
- this.range(e).domain(t);
565
+ this.range(n).domain(e);
1691
566
  break;
1692
567
  }
1693
568
  return this;
1694
569
  }
1695
- function kn(t) {
570
+ function ct(e) {
1696
571
  return function() {
1697
- return t;
572
+ return e;
1698
573
  };
1699
574
  }
1700
- function vn(t) {
1701
- return +t;
575
+ function ut(e) {
576
+ return +e;
1702
577
  }
1703
- var ct = [0, 1];
1704
- function J(t) {
1705
- return t;
578
+ var Ze = [0, 1];
579
+ function Y(e) {
580
+ return e;
1706
581
  }
1707
- function Pe(t, e) {
1708
- return (e -= t = +t) ? function(n) {
1709
- return (n - t) / e;
1710
- } : kn(isNaN(e) ? NaN : 0.5);
582
+ function Se(e, n) {
583
+ return (n -= e = +e) ? function(t) {
584
+ return (t - e) / n;
585
+ } : ct(isNaN(n) ? NaN : 0.5);
1711
586
  }
1712
- function En(t, e) {
1713
- var n;
1714
- return t > e && (n = t, t = e, e = n), function(r) {
1715
- return Math.max(t, Math.min(e, r));
587
+ function lt(e, n) {
588
+ var t;
589
+ return e > n && (t = e, e = n, n = t), function(r) {
590
+ return Math.max(e, Math.min(n, r));
1716
591
  };
1717
592
  }
1718
- function Nn(t, e, n) {
1719
- var r = t[0], i = t[1], o = e[0], s = e[1];
1720
- return i < r ? (r = Pe(i, r), o = n(s, o)) : (r = Pe(r, i), o = n(o, s)), function(a) {
593
+ function dt(e, n, t) {
594
+ var r = e[0], i = e[1], o = n[0], s = n[1];
595
+ return i < r ? (r = Se(i, r), o = t(s, o)) : (r = Se(r, i), o = t(o, s)), function(a) {
1721
596
  return o(r(a));
1722
597
  };
1723
598
  }
1724
- function An(t, e, n) {
1725
- var r = Math.min(t.length, e.length) - 1, i = new Array(r), o = new Array(r), s = -1;
1726
- for (t[r] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++s < r; )
1727
- i[s] = Pe(t[s], t[s + 1]), o[s] = n(e[s], e[s + 1]);
599
+ function mt(e, n, t) {
600
+ var r = Math.min(e.length, n.length) - 1, i = new Array(r), o = new Array(r), s = -1;
601
+ for (e[r] < e[0] && (e = e.slice().reverse(), n = n.slice().reverse()); ++s < r; )
602
+ i[s] = Se(e[s], e[s + 1]), o[s] = t(n[s], n[s + 1]);
1728
603
  return function(a) {
1729
- var c = pn(t, a, 1, r) - 1;
1730
- return o[c](i[c](a));
604
+ var l = tt(e, a, 1, r) - 1;
605
+ return o[l](i[l](a));
1731
606
  };
1732
607
  }
1733
- function _n(t, e) {
1734
- return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
1735
- }
1736
- function Sn() {
1737
- var t = ct, e = ct, n = qe, r, i, o, s = J, a, c, u;
1738
- function f() {
1739
- var g = Math.min(t.length, e.length);
1740
- return s !== J && (s = En(t[0], t[g - 1])), a = g > 2 ? An : Nn, c = u = null, l;
1741
- }
1742
- function l(g) {
1743
- return g == null || isNaN(g = +g) ? o : (c || (c = a(t.map(r), e, n)))(r(s(g)));
1744
- }
1745
- return l.invert = function(g) {
1746
- return s(i((u || (u = a(e, t.map(r), Me)))(g)));
1747
- }, l.domain = function(g) {
1748
- return arguments.length ? (t = Array.from(g, vn), f()) : t.slice();
1749
- }, l.range = function(g) {
1750
- return arguments.length ? (e = Array.from(g), f()) : e.slice();
1751
- }, l.rangeRound = function(g) {
1752
- return e = Array.from(g), n = hn, f();
1753
- }, l.clamp = function(g) {
1754
- return arguments.length ? (s = g ? !0 : J, f()) : s !== J;
1755
- }, l.interpolate = function(g) {
1756
- return arguments.length ? (n = g, f()) : n;
1757
- }, l.unknown = function(g) {
1758
- return arguments.length ? (o = g, l) : o;
1759
- }, function(g, w) {
1760
- return r = g, i = w, f();
608
+ function ht(e, n) {
609
+ return n.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
610
+ }
611
+ function gt() {
612
+ var e = Ze, n = Ze, t = Fe, r, i, o, s = Y, a, l, f;
613
+ function d() {
614
+ var h = Math.min(e.length, n.length);
615
+ return s !== Y && (s = lt(e[0], e[h - 1])), a = h > 2 ? mt : dt, l = f = null, c;
616
+ }
617
+ function c(h) {
618
+ return h == null || isNaN(h = +h) ? o : (l || (l = a(e.map(r), n, t)))(r(s(h)));
619
+ }
620
+ return c.invert = function(h) {
621
+ return s(i((f || (f = a(n, e.map(r), ge)))(h)));
622
+ }, c.domain = function(h) {
623
+ return arguments.length ? (e = Array.from(h, ut), d()) : e.slice();
624
+ }, c.range = function(h) {
625
+ return arguments.length ? (n = Array.from(h), d()) : n.slice();
626
+ }, c.rangeRound = function(h) {
627
+ return n = Array.from(h), t = Xn, d();
628
+ }, c.clamp = function(h) {
629
+ return arguments.length ? (s = h ? !0 : Y, d()) : s !== Y;
630
+ }, c.interpolate = function(h) {
631
+ return arguments.length ? (t = h, d()) : t;
632
+ }, c.unknown = function(h) {
633
+ return arguments.length ? (o = h, c) : o;
634
+ }, function(h, N) {
635
+ return r = h, i = N, d();
1761
636
  };
1762
637
  }
1763
- function Rn() {
1764
- return Sn()(J, J);
638
+ function pt() {
639
+ return gt()(Y, Y);
1765
640
  }
1766
- function Ln(t) {
1767
- return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
641
+ function xt(e) {
642
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1768
643
  }
1769
- function ve(t, e) {
1770
- if (!isFinite(t) || t === 0) return null;
1771
- var n = (t = e ? t.toExponential(e - 1) : t.toExponential()).indexOf("e"), r = t.slice(0, n);
644
+ function xe(e, n) {
645
+ if (!isFinite(e) || e === 0) return null;
646
+ var t = (e = n ? e.toExponential(n - 1) : e.toExponential()).indexOf("e"), r = e.slice(0, t);
1772
647
  return [
1773
648
  r.length > 1 ? r[0] + r.slice(2) : r,
1774
- +t.slice(n + 1)
649
+ +e.slice(t + 1)
1775
650
  ];
1776
651
  }
1777
- function te(t) {
1778
- return t = ve(Math.abs(t)), t ? t[1] : NaN;
652
+ function W(e) {
653
+ return e = xe(Math.abs(e)), e ? e[1] : NaN;
1779
654
  }
1780
- function Bn(t, e) {
1781
- return function(n, r) {
1782
- for (var i = n.length, o = [], s = 0, a = t[0], c = 0; i > 0 && a > 0 && (c + a + 1 > r && (a = Math.max(1, r - c)), o.push(n.substring(i -= a, i + a)), !((c += a + 1) > r)); )
1783
- a = t[s = (s + 1) % t.length];
1784
- return o.reverse().join(e);
655
+ function bt(e, n) {
656
+ return function(t, r) {
657
+ for (var i = t.length, o = [], s = 0, a = e[0], l = 0; i > 0 && a > 0 && (l + a + 1 > r && (a = Math.max(1, r - l)), o.push(t.substring(i -= a, i + a)), !((l += a + 1) > r)); )
658
+ a = e[s = (s + 1) % e.length];
659
+ return o.reverse().join(n);
1785
660
  };
1786
661
  }
1787
- function $n(t) {
1788
- return function(e) {
1789
- return e.replace(/[0-9]/g, function(n) {
1790
- return t[+n];
662
+ function yt(e) {
663
+ return function(n) {
664
+ return n.replace(/[0-9]/g, function(t) {
665
+ return e[+t];
1791
666
  });
1792
667
  };
1793
668
  }
1794
- var Dn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1795
- function Ee(t) {
1796
- if (!(e = Dn.exec(t))) throw new Error("invalid format: " + t);
1797
- var e;
1798
- return new ze({
1799
- fill: e[1],
1800
- align: e[2],
1801
- sign: e[3],
1802
- symbol: e[4],
1803
- zero: e[5],
1804
- width: e[6],
1805
- comma: e[7],
1806
- precision: e[8] && e[8].slice(1),
1807
- trim: e[9],
1808
- type: e[10]
669
+ var wt = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
670
+ function be(e) {
671
+ if (!(n = wt.exec(e))) throw new Error("invalid format: " + e);
672
+ var n;
673
+ return new je({
674
+ fill: n[1],
675
+ align: n[2],
676
+ sign: n[3],
677
+ symbol: n[4],
678
+ zero: n[5],
679
+ width: n[6],
680
+ comma: n[7],
681
+ precision: n[8] && n[8].slice(1),
682
+ trim: n[9],
683
+ type: n[10]
1809
684
  });
1810
685
  }
1811
- Ee.prototype = ze.prototype;
1812
- function ze(t) {
1813
- this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
686
+ be.prototype = je.prototype;
687
+ function je(e) {
688
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
1814
689
  }
1815
- ze.prototype.toString = function() {
690
+ je.prototype.toString = function() {
1816
691
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
1817
692
  };
1818
- function Tn(t) {
1819
- e: for (var e = t.length, n = 1, r = -1, i; n < e; ++n)
1820
- switch (t[n]) {
693
+ function vt(e) {
694
+ e: for (var n = e.length, t = 1, r = -1, i; t < n; ++t)
695
+ switch (e[t]) {
1821
696
  case ".":
1822
- r = i = n;
697
+ r = i = t;
1823
698
  break;
1824
699
  case "0":
1825
- r === 0 && (r = n), i = n;
700
+ r === 0 && (r = t), i = t;
1826
701
  break;
1827
702
  default:
1828
- if (!+t[n]) break e;
703
+ if (!+e[t]) break e;
1829
704
  r > 0 && (r = 0);
1830
705
  break;
1831
706
  }
1832
- return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
1833
- }
1834
- var Ne;
1835
- function In(t, e) {
1836
- var n = ve(t, e);
1837
- if (!n) return Ne = void 0, t.toPrecision(e);
1838
- var r = n[0], i = n[1], o = i - (Ne = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
1839
- return o === s ? r : o > s ? r + new Array(o - s + 1).join("0") : o > 0 ? r.slice(0, o) + "." + r.slice(o) : "0." + new Array(1 - o).join("0") + ve(t, Math.max(0, e + o - 1))[0];
1840
- }
1841
- function ft(t, e) {
1842
- var n = ve(t, e);
1843
- if (!n) return t + "";
1844
- var r = n[0], i = n[1];
707
+ return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
708
+ }
709
+ var ye;
710
+ function Nt(e, n) {
711
+ var t = xe(e, n);
712
+ if (!t) return ye = void 0, e.toPrecision(n);
713
+ var r = t[0], i = t[1], o = i - (ye = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
714
+ return o === s ? r : o > s ? r + new Array(o - s + 1).join("0") : o > 0 ? r.slice(0, o) + "." + r.slice(o) : "0." + new Array(1 - o).join("0") + xe(e, Math.max(0, n + o - 1))[0];
715
+ }
716
+ function Je(e, n) {
717
+ var t = xe(e, n);
718
+ if (!t) return e + "";
719
+ var r = t[0], i = t[1];
1845
720
  return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
1846
721
  }
1847
- const lt = {
1848
- "%": (t, e) => (t * 100).toFixed(e),
1849
- b: (t) => Math.round(t).toString(2),
1850
- c: (t) => t + "",
1851
- d: Ln,
1852
- e: (t, e) => t.toExponential(e),
1853
- f: (t, e) => t.toFixed(e),
1854
- g: (t, e) => t.toPrecision(e),
1855
- o: (t) => Math.round(t).toString(8),
1856
- p: (t, e) => ft(t * 100, e),
1857
- r: ft,
1858
- s: In,
1859
- X: (t) => Math.round(t).toString(16).toUpperCase(),
1860
- x: (t) => Math.round(t).toString(16)
722
+ const Ke = {
723
+ "%": (e, n) => (e * 100).toFixed(n),
724
+ b: (e) => Math.round(e).toString(2),
725
+ c: (e) => e + "",
726
+ d: xt,
727
+ e: (e, n) => e.toExponential(n),
728
+ f: (e, n) => e.toFixed(n),
729
+ g: (e, n) => e.toPrecision(n),
730
+ o: (e) => Math.round(e).toString(8),
731
+ p: (e, n) => Je(e * 100, n),
732
+ r: Je,
733
+ s: Nt,
734
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
735
+ x: (e) => Math.round(e).toString(16)
1861
736
  };
1862
- function ht(t) {
1863
- return t;
1864
- }
1865
- var gt = Array.prototype.map, dt = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1866
- function Hn(t) {
1867
- var e = t.grouping === void 0 || t.thousands === void 0 ? ht : Bn(gt.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", o = t.numerals === void 0 ? ht : $n(gt.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", a = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
1868
- function u(l, g) {
1869
- l = Ee(l);
1870
- var w = l.fill, y = l.align, F = l.sign, S = l.symbol, _ = l.zero, O = l.width, D = l.comma, v = l.precision, j = l.trim, M = l.type;
1871
- M === "n" ? (D = !0, M = "g") : lt[M] || (v === void 0 && (v = 12), j = !0, M = "g"), (_ || w === "0" && y === "=") && (_ = !0, w = "0", y = "=");
1872
- var T = (g && g.prefix !== void 0 ? g.prefix : "") + (S === "$" ? n : S === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : ""), le = (S === "$" ? r : /[%p]/.test(M) ? s : "") + (g && g.suffix !== void 0 ? g.suffix : ""), he = lt[M], ge = /[defgprs%]/.test(M);
1873
- v = v === void 0 ? 6 : /[gprs]/.test(M) ? Math.max(1, Math.min(21, v)) : Math.max(0, Math.min(20, v));
1874
- function ne(p) {
1875
- var P = T, E = le, I, re, X;
1876
- if (M === "c")
1877
- E = he(p) + E, p = "";
737
+ function Ye(e) {
738
+ return e;
739
+ }
740
+ var Xe = Array.prototype.map, We = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
741
+ function Mt(e) {
742
+ var n = e.grouping === void 0 || e.thousands === void 0 ? Ye : bt(Xe.call(e.grouping, Number), e.thousands + ""), t = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", o = e.numerals === void 0 ? Ye : yt(Xe.call(e.numerals, String)), s = e.percent === void 0 ? "%" : e.percent + "", a = e.minus === void 0 ? "−" : e.minus + "", l = e.nan === void 0 ? "NaN" : e.nan + "";
743
+ function f(c, h) {
744
+ c = be(c);
745
+ var N = c.fill, k = c.align, L = c.sign, w = c.symbol, A = c.zero, M = c.width, J = c.comma, I = c.precision, U = c.trim, R = c.type;
746
+ R === "n" ? (J = !0, R = "g") : Ke[R] || (I === void 0 && (I = 12), U = !0, R = "g"), (A || N === "0" && k === "=") && (A = !0, N = "0", k = "=");
747
+ var re = (h && h.prefix !== void 0 ? h.prefix : "") + (w === "$" ? t : w === "#" && /[boxX]/.test(R) ? "0" + R.toLowerCase() : ""), F = (w === "$" ? r : /[%p]/.test(R) ? s : "") + (h && h.suffix !== void 0 ? h.suffix : ""), ie = Ke[R], oe = /[defgprs%]/.test(R);
748
+ I = I === void 0 ? 6 : /[gprs]/.test(R) ? Math.max(1, Math.min(21, I)) : Math.max(0, Math.min(20, I));
749
+ function D(g) {
750
+ var P = re, _ = F, O, ae, K;
751
+ if (R === "c")
752
+ _ = ie(g) + _, g = "";
1878
753
  else {
1879
- p = +p;
1880
- var q = p < 0 || 1 / p < 0;
1881
- if (p = isNaN(p) ? c : he(Math.abs(p), v), j && (p = Tn(p)), q && +p == 0 && F !== "+" && (q = !1), P = (q ? F === "(" ? F : a : F === "-" || F === "(" ? "" : F) + P, E = (M === "s" && !isNaN(p) && Ne !== void 0 ? dt[8 + Ne / 3] : "") + E + (q && F === "(" ? ")" : ""), ge) {
1882
- for (I = -1, re = p.length; ++I < re; )
1883
- if (X = p.charCodeAt(I), 48 > X || X > 57) {
1884
- E = (X === 46 ? i + p.slice(I + 1) : p.slice(I)) + E, p = p.slice(0, I);
754
+ g = +g;
755
+ var S = g < 0 || 1 / g < 0;
756
+ if (g = isNaN(g) ? l : ie(Math.abs(g), I), U && (g = vt(g)), S && +g == 0 && L !== "+" && (S = !1), P = (S ? L === "(" ? L : a : L === "-" || L === "(" ? "" : L) + P, _ = (R === "s" && !isNaN(g) && ye !== void 0 ? We[8 + ye / 3] : "") + _ + (S && L === "(" ? ")" : ""), oe) {
757
+ for (O = -1, ae = g.length; ++O < ae; )
758
+ if (K = g.charCodeAt(O), 48 > K || K > 57) {
759
+ _ = (K === 46 ? i + g.slice(O + 1) : g.slice(O)) + _, g = g.slice(0, O);
1885
760
  break;
1886
761
  }
1887
762
  }
1888
763
  }
1889
- D && !_ && (p = e(p, 1 / 0));
1890
- var z = P.length + p.length + E.length, R = z < O ? new Array(O - z + 1).join(w) : "";
1891
- switch (D && _ && (p = e(R + p, R.length ? O - E.length : 1 / 0), R = ""), y) {
764
+ J && !A && (g = n(g, 1 / 0));
765
+ var H = P.length + g.length + _.length, $ = H < M ? new Array(M - H + 1).join(N) : "";
766
+ switch (J && A && (g = n($ + g, $.length ? M - _.length : 1 / 0), $ = ""), k) {
1892
767
  case "<":
1893
- p = P + p + E + R;
768
+ g = P + g + _ + $;
1894
769
  break;
1895
770
  case "=":
1896
- p = P + R + p + E;
771
+ g = P + $ + g + _;
1897
772
  break;
1898
773
  case "^":
1899
- p = R.slice(0, z = R.length >> 1) + P + p + E + R.slice(z);
774
+ g = $.slice(0, H = $.length >> 1) + P + g + _ + $.slice(H);
1900
775
  break;
1901
776
  default:
1902
- p = R + P + p + E;
777
+ g = $ + P + g + _;
1903
778
  break;
1904
779
  }
1905
- return o(p);
780
+ return o(g);
1906
781
  }
1907
- return ne.toString = function() {
1908
- return l + "";
1909
- }, ne;
1910
- }
1911
- function f(l, g) {
1912
- var w = Math.max(-8, Math.min(8, Math.floor(te(g) / 3))) * 3, y = Math.pow(10, -w), F = u((l = Ee(l), l.type = "f", l), { suffix: dt[8 + w / 3] });
1913
- return function(S) {
1914
- return F(y * S);
782
+ return D.toString = function() {
783
+ return c + "";
784
+ }, D;
785
+ }
786
+ function d(c, h) {
787
+ var N = Math.max(-8, Math.min(8, Math.floor(W(h) / 3))) * 3, k = Math.pow(10, -N), L = f((c = be(c), c.type = "f", c), { suffix: We[8 + N / 3] });
788
+ return function(w) {
789
+ return L(k * w);
1915
790
  };
1916
791
  }
1917
792
  return {
1918
- format: u,
1919
- formatPrefix: f
793
+ format: f,
794
+ formatPrefix: d
1920
795
  };
1921
796
  }
1922
- var we, Ct, Mt;
1923
- On({
797
+ var ue, cn, un;
798
+ _t({
1924
799
  thousands: ",",
1925
800
  grouping: [3],
1926
801
  currency: ["$", ""]
1927
802
  });
1928
- function On(t) {
1929
- return we = Hn(t), Ct = we.format, Mt = we.formatPrefix, we;
803
+ function _t(e) {
804
+ return ue = Mt(e), cn = ue.format, un = ue.formatPrefix, ue;
1930
805
  }
1931
- function Pn(t) {
1932
- return Math.max(0, -te(Math.abs(t)));
806
+ function $t(e) {
807
+ return Math.max(0, -W(Math.abs(e)));
1933
808
  }
1934
- function jn(t, e) {
1935
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(te(e) / 3))) * 3 - te(Math.abs(t)));
809
+ function Rt(e, n) {
810
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(W(n) / 3))) * 3 - W(Math.abs(e)));
1936
811
  }
1937
- function Gn(t, e) {
1938
- return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, te(e) - te(t)) + 1;
812
+ function Ct(e, n) {
813
+ return e = Math.abs(e), n = Math.abs(n) - e, Math.max(0, W(n) - W(e)) + 1;
1939
814
  }
1940
- function qn(t, e, n, r) {
1941
- var i = Cn(t, e, n), o;
1942
- switch (r = Ee(r ?? ",f"), r.type) {
815
+ function kt(e, n, t, r) {
816
+ var i = st(e, n, t), o;
817
+ switch (r = be(r ?? ",f"), r.type) {
1943
818
  case "s": {
1944
- var s = Math.max(Math.abs(t), Math.abs(e));
1945
- return r.precision == null && !isNaN(o = jn(i, s)) && (r.precision = o), Mt(r, s);
819
+ var s = Math.max(Math.abs(e), Math.abs(n));
820
+ return r.precision == null && !isNaN(o = Rt(i, s)) && (r.precision = o), un(r, s);
1946
821
  }
1947
822
  case "":
1948
823
  case "e":
1949
824
  case "g":
1950
825
  case "p":
1951
826
  case "r": {
1952
- r.precision == null && !isNaN(o = Gn(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = o - (r.type === "e"));
827
+ r.precision == null && !isNaN(o = Ct(i, Math.max(Math.abs(e), Math.abs(n)))) && (r.precision = o - (r.type === "e"));
1953
828
  break;
1954
829
  }
1955
830
  case "f":
1956
831
  case "%": {
1957
- r.precision == null && !isNaN(o = Pn(i)) && (r.precision = o - (r.type === "%") * 2);
832
+ r.precision == null && !isNaN(o = $t(i)) && (r.precision = o - (r.type === "%") * 2);
1958
833
  break;
1959
834
  }
1960
835
  }
1961
- return Ct(r);
1962
- }
1963
- function zn(t) {
1964
- var e = t.domain;
1965
- return t.ticks = function(n) {
1966
- var r = e();
1967
- return Fn(r[0], r[r.length - 1], n ?? 10);
1968
- }, t.tickFormat = function(n, r) {
1969
- var i = e();
1970
- return qn(i[0], i[i.length - 1], n ?? 10, r);
1971
- }, t.nice = function(n) {
1972
- n == null && (n = 10);
1973
- var r = e(), i = 0, o = r.length - 1, s = r[i], a = r[o], c, u, f = 10;
1974
- for (a < s && (u = s, s = a, a = u, u = i, i = o, o = u); f-- > 0; ) {
1975
- if (u = Oe(s, a, n), u === c)
1976
- return r[i] = s, r[o] = a, e(r);
1977
- if (u > 0)
1978
- s = Math.floor(s / u) * u, a = Math.ceil(a / u) * u;
1979
- else if (u < 0)
1980
- s = Math.ceil(s * u) / u, a = Math.floor(a * u) / u;
836
+ return cn(r);
837
+ }
838
+ function Lt(e) {
839
+ var n = e.domain;
840
+ return e.ticks = function(t) {
841
+ var r = n();
842
+ return at(r[0], r[r.length - 1], t ?? 10);
843
+ }, e.tickFormat = function(t, r) {
844
+ var i = n();
845
+ return kt(i[0], i[i.length - 1], t ?? 10, r);
846
+ }, e.nice = function(t) {
847
+ t == null && (t = 10);
848
+ var r = n(), i = 0, o = r.length - 1, s = r[i], a = r[o], l, f, d = 10;
849
+ for (a < s && (f = s, s = a, a = f, f = i, i = o, o = f); d-- > 0; ) {
850
+ if (f = Ae(s, a, t), f === l)
851
+ return r[i] = s, r[o] = a, n(r);
852
+ if (f > 0)
853
+ s = Math.floor(s / f) * f, a = Math.ceil(a / f) * f;
854
+ else if (f < 0)
855
+ s = Math.ceil(s * f) / f, a = Math.floor(a * f) / f;
1981
856
  else
1982
857
  break;
1983
- c = u;
858
+ l = f;
859
+ }
860
+ return e;
861
+ }, e;
862
+ }
863
+ function ln() {
864
+ var e = pt();
865
+ return e.copy = function() {
866
+ return ht(e, ln());
867
+ }, ft.apply(e, arguments), Lt(e);
868
+ }
869
+ const de = (e) => e.trim().toUpperCase(), Qe = (e, n, t = {}) => {
870
+ const r = de(n);
871
+ return e.find((i) => {
872
+ const o = i.properties ?? {};
873
+ if ((o.__isoA2 ?? (typeof o.iso_a2 == "string" ? o.iso_a2.toUpperCase() : void 0)) === r) return !0;
874
+ const a = String(o.name ?? "").toLowerCase();
875
+ return t[a] === r;
876
+ });
877
+ }, At = (e) => {
878
+ if (typeof e != "object" || e === null || !("coordinates" in e))
879
+ return [];
880
+ const n = e.coordinates, t = [], r = (i) => {
881
+ if (Array.isArray(i)) {
882
+ if (i.length >= 2 && typeof i[0] == "number" && typeof i[1] == "number") {
883
+ t.push([i[0], i[1]]);
884
+ return;
885
+ }
886
+ i.forEach(r);
887
+ }
888
+ };
889
+ return r(n), t;
890
+ }, en = (e) => {
891
+ const n = At(e.geometry);
892
+ if (!n.length) return;
893
+ const t = n.reduce(
894
+ (r, [i, o]) => ({
895
+ minLat: Math.min(r.minLat, o),
896
+ maxLat: Math.max(r.maxLat, o),
897
+ minLng: Math.min(r.minLng, i),
898
+ maxLng: Math.max(r.maxLng, i)
899
+ }),
900
+ {
901
+ minLat: Number.POSITIVE_INFINITY,
902
+ maxLat: Number.NEGATIVE_INFINITY,
903
+ minLng: Number.POSITIVE_INFINITY,
904
+ maxLng: Number.NEGATIVE_INFINITY
1984
905
  }
906
+ );
907
+ if (!(!Number.isFinite(t.minLat) || !Number.isFinite(t.minLng)))
1985
908
  return t;
1986
- }, t;
1987
- }
1988
- function kt() {
1989
- var t = Rn();
1990
- return t.copy = function() {
1991
- return _n(t, kt());
1992
- }, Mn.apply(t, arguments), zn(t);
1993
- }
1994
- const De = (t, e) => {
1995
- const n = t?.[e];
1996
- return typeof n == "number" ? n : 0;
1997
- }, mt = (t, e) => {
1998
- if (!t.length) return () => e.minColor;
1999
- const n = Math.min(...t), r = Math.max(...t);
2000
- if (n === r) return () => e.maxColor;
2001
- const i = kt().domain([n, r]).range([0, 1]), o = Ie(e.minColor, e.maxColor);
909
+ }, nn = (e) => {
910
+ const n = Math.max(0.1, e.maxLat - e.minLat), t = Math.max(0.1, e.maxLng - e.minLng), i = Math.max(n, t) / 112;
911
+ return Math.min(0.9, Math.max(0.14, i));
912
+ }, $e = (e, n) => {
913
+ const t = e?.[n];
914
+ return typeof t == "number" ? t : 0;
915
+ }, tn = (e, n) => {
916
+ if (!e.length) return () => n.minColor;
917
+ const t = Math.min(...e), r = Math.max(...e);
918
+ if (t === r) return () => n.maxColor;
919
+ const i = ln().domain([t, r]).range([0, 1]), o = ke(n.minColor, n.maxColor);
2002
920
  return (s) => o(i(s));
2003
- }, Un = (t) => t <= 1.35 ? 2 : t <= 2.1 ? 1 : 0, Vn = (t) => new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(t), Jn = ({
2004
- statisticsData: t,
2005
- resetSignal: e,
2006
- countryNumericToIsoMap: n = {},
2007
- countryNameToIsoMap: r = {},
2008
- primaryMetric: i = "visits",
2009
- colorScale: o = jt
921
+ }, St = (e) => e <= 1.35 ? 2 : e <= 2.1 ? 1 : 0, Et = (e) => new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(e), Re = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), It = (e, n) => {
922
+ let t = e.trim();
923
+ if (!t) return t;
924
+ const r = n?.trim().toUpperCase();
925
+ return r && /^[A-Z]{2}$/.test(r) && (t = t.replace(new RegExp(`\\s*\\(${r}\\)`, "gi"), "").replace(new RegExp(`\\s*\\[${r}\\]`, "gi"), "").replace(new RegExp(`\\s*[-–—]\\s*${r}\\s*$`, "i"), "").replace(new RegExp(`\\s+${r}\\s*$`, "i"), "")), t.trim() || e.trim();
926
+ }, Ft = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), jt = /* @__PURE__ */ new Set([
927
+ "countrycode",
928
+ "country_code",
929
+ "iso_a2",
930
+ "iso",
931
+ "adm0_a3",
932
+ "iso_3166_1"
933
+ ]), Pt = (e) => jt.has(e.toLowerCase()), Ot = (e, n) => e.toLowerCase() === "revenue" ? new Intl.NumberFormat("en-US", {
934
+ style: "currency",
935
+ currency: "USD",
936
+ notation: "compact",
937
+ maximumFractionDigits: 1
938
+ }).format(n) : Et(n), rn = "cool-globe-float-tooltip-override", zt = () => {
939
+ if (typeof document > "u" || document.getElementById(rn)) return;
940
+ const e = document.createElement("style");
941
+ e.id = rn, e.textContent = `
942
+ .cool-globe-host .float-tooltip-kap {
943
+ background: transparent !important;
944
+ background-color: transparent !important;
945
+ padding: 0 !important;
946
+ border-radius: 0 !important;
947
+ box-shadow: none !important;
948
+ max-width: none !important;
949
+ font-size: inherit !important;
950
+ font-family: inherit !important;
951
+ color: transparent !important;
952
+ }
953
+ `, document.head.appendChild(e);
954
+ }, Dt = ({
955
+ statisticsData: e,
956
+ resetSignal: n,
957
+ preselectedCountry: t,
958
+ countryNumericToIsoMap: r = {},
959
+ countryNameToIsoMap: i = {},
960
+ primaryMetric: o = "visits",
961
+ colorScale: s = Cn
2010
962
  }) => {
2011
- const s = W(null), a = W(null), c = W(void 0), u = W({}), f = W(null), l = W(e), [g, w] = U(0), [y, F] = U(), [S, _] = U(), [O, D] = U(null), [v, j] = U([]), [M, T] = U([]), [le, he] = U({
963
+ const a = V(null), l = V(null), f = V(void 0), d = V({}), c = V(null), h = V(n), N = V(void 0), [k, L] = G(!1), [w, A] = G(0), [M, J] = G(), [I, U] = G(), [R, re] = G(null), [F, ie] = G([]), [oe, D] = G([]), [g, P] = G({
2012
964
  width: 900,
2013
965
  height: 760
2014
- }), ge = me(
2015
- () => Object.values(t.countries).map(
2016
- (h) => De(h, i)
966
+ });
967
+ z(() => {
968
+ zt();
969
+ }, []);
970
+ const _ = se(
971
+ () => Object.values(e.countries).map(
972
+ (u) => $e(u, o)
2017
973
  ),
2018
- [i, t.countries]
2019
- ), ne = me(() => y ? Object.values(t.regions[y] ?? {}).map(
2020
- (h) => De(h, i)
2021
- ) : [], [y, i, t.regions]), p = me(
2022
- () => mt(ge, o),
2023
- [ge, o]
2024
- ), P = me(
2025
- () => mt(ne, o),
2026
- [ne, o]
974
+ [o, e.countries]
975
+ ), O = se(() => M ? Object.values(e.regions[M] ?? {}).map(
976
+ (u) => $e(u, o)
977
+ ) : [], [M, o, e.regions]), ae = se(
978
+ () => tn(_, s),
979
+ [_, s]
980
+ ), K = se(
981
+ () => tn(O, s),
982
+ [O, s]
2027
983
  );
2028
- V(() => {
984
+ z(() => {
2029
985
  (async () => {
2030
- let d = [];
986
+ let m = [];
2031
987
  try {
2032
- d = (await (await fetch(It)).json()).features;
988
+ m = (await (await fetch(Mn)).json()).features;
2033
989
  } catch {
2034
- const m = await (await fetch(Ht)).json(), C = m.objects.countries, N = Lt(
2035
- m,
2036
- C
990
+ const b = await (await fetch(_n)).json(), p = b.objects.countries, v = vn(
991
+ b,
992
+ p
2037
993
  );
2038
- d = N.type === "FeatureCollection" ? N.features : [N];
994
+ m = v.type === "FeatureCollection" ? v.features : [v];
2039
995
  }
2040
- const b = d.map((x) => {
2041
- const m = String(x.id ?? ""), C = x.properties ?? {}, N = String(
2042
- C.name ?? C.NAME ?? C.name_en ?? C.ADMIN ?? ""
2043
- ).trim() || `Country ${m}`, Ae = N.toLowerCase(), de = String(
2044
- C.iso_a2 ?? C.ISO_A2 ?? C.iso_a2_eh ?? ""
2045
- ).trim().toUpperCase(), Ve = n[m] ?? r[Ae] ?? (de && de !== "-99" ? de : void 0) ?? (m.length === 2 ? m.toUpperCase() : m);
996
+ const y = m.map((x) => {
997
+ const b = String(x.id ?? ""), p = x.properties ?? {}, v = String(
998
+ p.name ?? p.NAME ?? p.name_en ?? p.ADMIN ?? ""
999
+ ).trim() || `Country ${b}`, q = v.toLowerCase(), T = String(
1000
+ p.iso_a2 ?? p.ISO_A2 ?? p.iso_a2_eh ?? ""
1001
+ ).trim().toUpperCase(), we = r[b] ?? i[q] ?? (T && T !== "-99" ? T : void 0) ?? (b.length === 2 ? b.toUpperCase() : b);
2046
1002
  return {
2047
1003
  ...x,
2048
1004
  properties: {
2049
- ...C,
2050
- __isoA2: Ve,
2051
- name: N || Ve || `Country ${m}`
1005
+ ...p,
1006
+ __isoA2: we,
1007
+ name: v || we || `Country ${b}`
2052
1008
  }
2053
1009
  };
2054
1010
  });
2055
- j(b);
1011
+ ie(y);
2056
1012
  })();
2057
- }, []), V(() => {
2058
- if (!a.current) return;
2059
- const h = new ResizeObserver((d) => {
2060
- const b = d[0];
2061
- b && he({
2062
- width: Math.max(360, Math.floor(b.contentRect.width)),
2063
- height: Math.max(520, Math.floor(b.contentRect.height))
1013
+ }, []), z(() => {
1014
+ if (!l.current) return;
1015
+ const u = new ResizeObserver((m) => {
1016
+ const y = m[0];
1017
+ y && P({
1018
+ width: Math.max(360, Math.floor(y.contentRect.width)),
1019
+ height: Math.max(520, Math.floor(y.contentRect.height))
2064
1020
  });
2065
1021
  });
2066
- return h.observe(a.current), () => h.disconnect();
2067
- }, []), V(() => {
2068
- if (!y) {
2069
- T([]);
1022
+ return u.observe(l.current), () => u.disconnect();
1023
+ }, []), z(() => {
1024
+ if (!M) {
1025
+ D([]);
2070
1026
  return;
2071
1027
  }
2072
- const h = u.current[y];
2073
- if (h) {
2074
- T(h);
1028
+ const u = d.current[M];
1029
+ if (u) {
1030
+ D(u);
2075
1031
  return;
2076
1032
  }
2077
1033
  (async () => {
2078
- if (!f.current) {
2079
- const C = await (await fetch(Ot)).json();
2080
- f.current = C.features;
1034
+ if (!c.current) {
1035
+ const p = await (await fetch($n)).json();
1036
+ c.current = p.features;
2081
1037
  }
2082
- const x = (f.current ?? []).filter(
2083
- (m) => (m.properties ?? {}).iso_a2 === y
2084
- ).map((m) => {
2085
- const C = m.properties ?? {}, N = String(C.name ?? "").trim();
1038
+ const x = (c.current ?? []).filter(
1039
+ (b) => (b.properties ?? {}).iso_a2 === M
1040
+ ).map((b) => {
1041
+ const p = b.properties ?? {}, v = String(p.name ?? "").trim();
2086
1042
  return {
2087
- ...m,
1043
+ ...b,
2088
1044
  properties: {
2089
- ...C,
2090
- __countryCode: y,
2091
- __regionName: N,
2092
- name: N
1045
+ ...p,
1046
+ __countryCode: M,
1047
+ __regionName: v,
1048
+ name: v
2093
1049
  }
2094
1050
  };
2095
1051
  });
2096
- u.current[y] = x, T(x);
1052
+ d.current[M] = x, D(x);
2097
1053
  })();
2098
- }, [y]), V(() => {
2099
- if (S && g < 2) return void w(2);
2100
- y && g < 1 && w(1);
2101
- }, [y, S, g]), V(() => {
2102
- const h = s.current?.controls?.();
2103
- if (!h) return;
2104
- h.autoRotate = !0, h.autoRotateSpeed = 0.45, h.enablePan = !1, h.enableZoom = !0;
2105
- const d = s.current?.renderer?.();
2106
- d && d.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));
2107
- }, []), V(() => {
2108
- const h = s.current?.controls?.();
2109
- h && (h.autoRotate = !y && g === 0);
2110
- }, [y, g]), V(() => {
2111
- if (e === l.current) return;
2112
- l.current = e, w(0), F(void 0), _(void 0), D(null), T([]);
2113
- const h = s.current?.controls?.();
2114
- h && (h.autoRotate = !0), s.current?.pointOfView({ lat: 20, lng: 15, altitude: 2.6 }, 650);
2115
- }, [e]);
2116
- const E = () => {
2117
- const h = s.current?.globeMaterial?.();
2118
- h && (h.map = null, h.color = new oe("#f5f5f5"), h.emissive = new oe("#ffffff"), h.emissiveIntensity = 0.35, h.specular = new oe("#d4d4d8"), h.shininess = 3, h.needsUpdate = !0);
2119
- }, I = (h, d, b) => {
2120
- s.current?.pointOfView({ lat: h, lng: d, altitude: b }, 650);
2121
- }, re = () => {
2122
- const h = s.current?.controls?.();
2123
- h && (h.autoRotate = !1);
2124
- }, X = (h) => {
2125
- if (typeof h != "object" || h === null || !("coordinates" in h))
2126
- return [];
2127
- const d = h.coordinates, b = [], x = (m) => {
2128
- if (Array.isArray(m)) {
2129
- if (m.length >= 2 && typeof m[0] == "number" && typeof m[1] == "number") {
2130
- b.push([m[0], m[1]]);
2131
- return;
2132
- }
2133
- m.forEach(x);
2134
- }
2135
- };
2136
- return x(d), b;
2137
- }, q = (h) => {
2138
- const d = X(h.geometry);
2139
- if (!d.length) return;
2140
- const b = d.reduce(
2141
- (x, [m, C]) => ({
2142
- minLat: Math.min(x.minLat, C),
2143
- maxLat: Math.max(x.maxLat, C),
2144
- minLng: Math.min(x.minLng, m),
2145
- maxLng: Math.max(x.maxLng, m)
2146
- }),
2147
- {
2148
- minLat: Number.POSITIVE_INFINITY,
2149
- maxLat: Number.NEGATIVE_INFINITY,
2150
- minLng: Number.POSITIVE_INFINITY,
2151
- maxLng: Number.NEGATIVE_INFINITY
2152
- }
1054
+ }, [M]), z(() => {
1055
+ if (I && w < 2) return void A(2);
1056
+ M && w < 1 && A(1);
1057
+ }, [M, I, w]), z(() => {
1058
+ const u = a.current?.controls?.();
1059
+ if (!u) return;
1060
+ u.autoRotate = !0, u.autoRotateSpeed = 0.45, u.enablePan = !1, u.enableZoom = !0;
1061
+ const m = a.current?.renderer?.();
1062
+ m && m.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));
1063
+ }, []), z(() => {
1064
+ const u = a.current?.controls?.();
1065
+ u && (u.autoRotate = !M && w === 0);
1066
+ }, [M, w]);
1067
+ const S = ve((u, m, y) => {
1068
+ a.current?.pointOfView({ lat: u, lng: m, altitude: y }, 650);
1069
+ }, []), H = ve(() => {
1070
+ const u = a.current?.controls?.();
1071
+ u && (u.autoRotate = !1);
1072
+ }, []), $ = ve(
1073
+ (u, m, y) => {
1074
+ const x = de(u);
1075
+ if (!x || (H(), A(1), J(x), U(void 0), y?.focusCamera === !1)) return;
1076
+ const b = m ?? Qe(
1077
+ F,
1078
+ x,
1079
+ i
1080
+ ), p = b ? en(b) : void 0;
1081
+ p && S(
1082
+ (p.minLat + p.maxLat) / 2,
1083
+ (p.minLng + p.maxLng) / 2,
1084
+ nn(p)
1085
+ );
1086
+ },
1087
+ [F, i, S, H]
1088
+ );
1089
+ z(() => {
1090
+ if (n === h.current) return;
1091
+ h.current = n, U(void 0), re(null), N.current = void 0;
1092
+ const u = t?.trim() ? de(t) : void 0;
1093
+ if (u) {
1094
+ $(u);
1095
+ return;
1096
+ }
1097
+ A(0), J(void 0), D([]);
1098
+ const m = a.current?.controls?.();
1099
+ m && (m.autoRotate = !0), S(20, 15, 2.6);
1100
+ }, [S, t, n, $]), z(() => {
1101
+ const u = t?.trim() ? de(t) : void 0;
1102
+ if (!u || !k || !F.length) return;
1103
+ const m = `${u}:${String(n ?? "")}`;
1104
+ if (N.current === m) return;
1105
+ const y = Qe(
1106
+ F,
1107
+ u,
1108
+ i
2153
1109
  );
2154
- if (!(!Number.isFinite(b.minLat) || !Number.isFinite(b.minLng)))
2155
- return b;
2156
- }, z = (h) => {
2157
- const d = Math.max(0.1, h.maxLat - h.minLat), b = Math.max(0.1, h.maxLng - h.minLng), m = Math.max(d, b) / 112;
2158
- return Math.min(0.9, Math.max(0.14, m));
2159
- }, R = () => {
2160
- c.current && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
2161
- const h = s.current?.pointOfView?.().altitude ?? 2.4, d = Un(h);
2162
- w(d), d <= 0 && _(void 0);
1110
+ $(u, y), N.current = m;
1111
+ }, [
1112
+ F,
1113
+ i,
1114
+ k,
1115
+ t,
1116
+ n,
1117
+ $
1118
+ ]);
1119
+ const dn = () => {
1120
+ const u = a.current?.globeMaterial?.();
1121
+ u && (u.map = null, u.color = new Ne("#f5f5f5"), u.emissive = new Ne("#ffffff"), u.emissiveIntensity = 0.35, u.specular = new Ne("#d4d4d8"), u.shininess = 3, u.needsUpdate = !0);
1122
+ }, mn = () => {
1123
+ f.current && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
1124
+ const u = a.current?.pointOfView?.().altitude ?? 2.4, m = St(u);
1125
+ A(m), m <= 0 && U(void 0);
2163
1126
  }, 120);
2164
- }, vt = (h) => {
2165
- const d = h.properties ?? {};
2166
- if (g === 0) {
2167
- const b = r[String(d.name ?? "").toLowerCase()], x = d.__isoA2 ?? (typeof d.iso_a2 == "string" ? d.iso_a2.toUpperCase() : void 0) ?? b;
1127
+ }, hn = (u) => {
1128
+ const m = u.properties ?? {};
1129
+ if (w === 0) {
1130
+ const y = i[String(m.name ?? "").toLowerCase()], x = m.__isoA2 ?? (typeof m.iso_a2 == "string" ? m.iso_a2.toUpperCase() : void 0) ?? y;
2168
1131
  if (!x) return;
2169
- re(), w(1), F(x), _(void 0);
2170
- const m = q(h);
2171
- if (m) {
2172
- I(
2173
- (m.minLat + m.maxLat) / 2,
2174
- (m.minLng + m.maxLng) / 2,
2175
- z(m)
2176
- );
2177
- return;
2178
- }
1132
+ $(x, u);
2179
1133
  return;
2180
1134
  }
2181
- if (g >= 1) {
2182
- const b = d.__regionName;
2183
- if (!b) return;
2184
- re(), w(2), _(b);
2185
- const x = q(h);
1135
+ if (w >= 1) {
1136
+ const y = m.__regionName;
1137
+ if (!y) return;
1138
+ H(), A(2), U(y);
1139
+ const x = en(u);
2186
1140
  if (x) {
2187
- I(
1141
+ S(
2188
1142
  (x.minLat + x.maxLat) / 2,
2189
1143
  (x.minLng + x.maxLng) / 2,
2190
- Math.max(0.2, z(x) * 0.52)
1144
+ Math.max(0.2, nn(x) * 0.52)
2191
1145
  );
2192
1146
  return;
2193
1147
  }
2194
1148
  }
2195
- }, Et = g === 0 ? v : M.length ? [...v, ...M] : v, Ue = (h, d) => {
2196
- if (d && h)
2197
- return t.regions[h]?.[d];
2198
- if (h) return t.countries[h];
2199
- }, Nt = (h) => {
2200
- if (!h)
2201
- return "<div>No data</div>";
2202
- const d = Object.entries(h).filter(
2203
- ([, b]) => typeof b == "number" && Number.isFinite(b)
1149
+ }, gn = w === 0 ? F : oe.length ? [...F, ...oe] : F, Pe = (u, m) => {
1150
+ if (m && u)
1151
+ return e.regions[u]?.[m];
1152
+ if (u) return e.countries[u];
1153
+ }, pn = (u) => {
1154
+ if (!u)
1155
+ return '<div style="color:#697386;font-weight:500;font-size:15px;">No data available</div>';
1156
+ const m = Object.entries(u).filter(
1157
+ ([p, v]) => !Pt(p) && typeof v == "number" && Number.isFinite(v)
2204
1158
  );
2205
- return d.length ? (d.sort(([b], [x]) => b === i ? -1 : x === i ? 1 : b.localeCompare(x)), d.map(
2206
- ([b, x]) => `<div>${b}: ${Vn(x)}</div>`
2207
- ).join("")) : "<div>No data</div>";
1159
+ if (!m.length)
1160
+ return '<div style="color:#697386;font-weight:500;font-size:15px;">No data available</div>';
1161
+ m.sort(([p], [v]) => p === o ? -1 : v === o ? 1 : p.localeCompare(v));
1162
+ const y = "display:flex;justify-content:space-between;align-items:center;gap:24px;padding:6px 0;", x = "font-weight:500;color:#697386;font-size:15px;", b = "font-weight:600;color:#1A1F36;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap;";
1163
+ return m.map(([p, v]) => {
1164
+ const q = Re(Ft(p)), T = Re(
1165
+ Ot(p, v)
1166
+ );
1167
+ return `<div style="${y}"><span style="${x}">${q}</span><span style="${b}">${T}</span></div>`;
1168
+ }).join("");
2208
1169
  };
2209
- return /* @__PURE__ */ Ze(
1170
+ return /* @__PURE__ */ Oe(
2210
1171
  "div",
2211
1172
  {
2212
- ref: a,
1173
+ ref: l,
1174
+ className: "cool-globe-host",
2213
1175
  style: {
2214
1176
  position: "relative",
2215
1177
  height: "100%",
2216
1178
  overflow: "hidden",
2217
1179
  background: "white"
2218
1180
  },
2219
- children: /* @__PURE__ */ Ze(
2220
- At,
1181
+ children: /* @__PURE__ */ Oe(
1182
+ xn,
2221
1183
  {
2222
- ref: s,
2223
- globeImageUrl: Pt,
1184
+ ref: a,
1185
+ globeImageUrl: Rn,
2224
1186
  backgroundColor: "#ffffff",
2225
- polygonsData: Et,
1187
+ polygonsData: gn,
2226
1188
  polygonAltitude: 0.01,
2227
1189
  polygonsTransitionDuration: 180,
2228
- polygonCapColor: (h) => {
2229
- const d = h.properties ?? {}, b = !!d.__regionName;
2230
- if (g > 0 && !b)
1190
+ polygonCapColor: (u) => {
1191
+ const m = u.properties ?? {}, y = !!m.__regionName;
1192
+ if (w > 0 && !y)
2231
1193
  return "rgba(148,163,184,0.027)";
2232
- const x = g === 0 ? d.__isoA2 : d.__countryCode, m = d.__regionName, C = Ue(x, m), N = De(C, i), Ae = g === 0 ? p(N) : P(N);
2233
- return O === h ? "#60a5fa" : Ae;
1194
+ const x = w === 0 ? m.__isoA2 : m.__countryCode, b = m.__regionName, p = Pe(x, b), v = $e(p, o), q = w === 0 ? ae(v) : K(v);
1195
+ return R === u ? "#60a5fa" : q;
2234
1196
  },
2235
- polygonSideColor: (h) => {
2236
- const d = h.properties ?? {};
2237
- return g > 0 && !d.__regionName ? "rgba(148,163,184,0.027)" : d.__regionName ? "rgba(148,163,184,0.22)" : "rgba(226,232,240,0.45)";
1197
+ polygonSideColor: (u) => {
1198
+ const m = u.properties ?? {};
1199
+ return w > 0 && !m.__regionName ? "rgba(148,163,184,0.027)" : m.__regionName ? "rgba(148,163,184,0.22)" : "rgba(226,232,240,0.45)";
2238
1200
  },
2239
- polygonStrokeColor: (h) => {
2240
- const d = h.properties ?? {};
2241
- return g > 0 && !d.__regionName ? "rgba(100,116,139,0.067)" : d.__regionName ? "rgba(51,65,85,0.98)" : "rgba(156,163,175,0.95)";
1201
+ polygonStrokeColor: (u) => {
1202
+ const m = u.properties ?? {};
1203
+ return w > 0 && !m.__regionName ? "rgba(100,116,139,0.067)" : m.__regionName ? "rgba(51,65,85,0.98)" : "rgba(156,163,175,0.95)";
2242
1204
  },
2243
- polygonLabel: (h) => {
2244
- const d = h.properties ?? {}, b = g === 0 ? d.__isoA2 : d.__countryCode, x = d.__regionName, m = x ?? d.name ?? "Unknown", C = Ue(b, x), N = Nt(C);
2245
- return `<div style="padding:6px 8px; font-size:12px; background:#111827; color:#f9fafb; border-radius:6px;">
2246
- <div style="font-weight:700;">${m}</div>
2247
- ${N}
1205
+ polygonLabel: (u) => {
1206
+ const m = u.properties ?? {};
1207
+ if (w > 0 && !m.__regionName)
1208
+ return "";
1209
+ const y = w === 0 ? m.__isoA2 : m.__countryCode, x = m.__regionName, b = x ?? m.name ?? "Unknown", p = w === 0 ? m.__isoA2 : m.__countryCode ?? m.__isoA2, v = It(
1210
+ String(b),
1211
+ p
1212
+ ), q = Pe(y, x), T = pn(q);
1213
+ return `<div style="font-family:system-ui,-apple-system,'Segoe UI',Roboto,Inter,sans-serif;min-width:272px;max-width:320px;padding:20px;background:#ffffff;color:#1A1F36;border-radius:14px;box-shadow:0 8px 24px rgba(15,23,42,0.12);">
1214
+ <div style="font-size:17px;font-weight:600;color:#1A1F36;line-height:1.25;margin-bottom:4px;">${Re(v)}</div>
1215
+ <div style="margin-top:8px;">${T}</div>
2248
1216
  </div>`;
2249
1217
  },
2250
- onPolygonHover: (h) => {
2251
- D(h ?? null);
1218
+ onPolygonHover: (u) => {
1219
+ re(u ?? null);
2252
1220
  },
2253
- onPolygonClick: (h) => vt(h),
2254
- onZoom: R,
1221
+ onPolygonClick: (u) => hn(u),
1222
+ onZoom: mn,
2255
1223
  onGlobeReady: () => {
2256
- E(), I(20, 15, 2.6);
1224
+ dn(), L(!0), t?.trim() || S(20, 15, 2.6);
2257
1225
  },
2258
1226
  onGlobeClick: () => {
2259
- const h = s.current?.controls?.();
2260
- h && (h.autoRotate = !1);
1227
+ const u = a.current?.controls?.();
1228
+ u && (u.autoRotate = !1);
2261
1229
  },
2262
1230
  lineHoverPrecision: 0,
2263
- width: le.width,
2264
- height: le.height,
1231
+ width: g.width,
1232
+ height: g.height,
2265
1233
  showAtmosphere: !1
2266
1234
  }
2267
1235
  )
@@ -2269,5 +1237,5 @@ const De = (t, e) => {
2269
1237
  );
2270
1238
  };
2271
1239
  export {
2272
- Jn as CoolGlobe
1240
+ Dt as CoolGlobe
2273
1241
  };