gralobe 1.0.6 → 1.0.8
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.
- package/LICENSE +21 -0
- package/README.md +11 -4
- package/dist/gralobe.js +696 -557
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +15 -15
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +72 -18
- package/package.json +4 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Controls as
|
|
3
|
-
const Ki = { type: "change" },
|
|
1
|
+
import * as S from "three";
|
|
2
|
+
import { Controls as Lr, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as kr, Plane as Ur, MathUtils as Fr, Matrix4 as An, Object3D as Nr } from "three";
|
|
3
|
+
const Ki = { type: "change" }, Ci = { type: "start" }, Tn = { type: "end" }, Mt = new kr(), Xi = new Ur(), zr = Math.cos(70 * Fr.DEG2RAD), Y = new se(), J = 2 * Math.PI, I = {
|
|
4
4
|
NONE: -1,
|
|
5
5
|
ROTATE: 0,
|
|
6
6
|
DOLLY: 1,
|
|
@@ -10,7 +10,7 @@ const Ki = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt
|
|
|
10
10
|
TOUCH_DOLLY_PAN: 5,
|
|
11
11
|
TOUCH_DOLLY_ROTATE: 6
|
|
12
12
|
}, Xt = 1e-6;
|
|
13
|
-
class
|
|
13
|
+
class $r extends Lr {
|
|
14
14
|
/**
|
|
15
15
|
* Constructs a new controls instance.
|
|
16
16
|
*
|
|
@@ -18,7 +18,7 @@ class zr extends Or {
|
|
|
18
18
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
19
19
|
*/
|
|
20
20
|
constructor(e, t = null) {
|
|
21
|
-
super(e, t), this.state =
|
|
21
|
+
super(e, t), this.state = I.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Gr.bind(this), this._onPointerDown = Br.bind(this), this._onPointerUp = Vr.bind(this), this._onContextMenu = Wr.bind(this), this._onMouseWheel = Yr.bind(this), this._onKeyDown = Zr.bind(this), this._onTouchStart = Kr.bind(this), this._onTouchMove = Xr.bind(this), this._onMouseDown = Hr.bind(this), this._onMouseMove = jr.bind(this), this._interceptControlDown = qr.bind(this), this._interceptControlUp = Qr.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
22
22
|
}
|
|
23
23
|
connect(e) {
|
|
24
24
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -79,11 +79,11 @@ class zr extends Or {
|
|
|
79
79
|
* was called, or the initial state.
|
|
80
80
|
*/
|
|
81
81
|
reset() {
|
|
82
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ki), this.update(), this.state =
|
|
82
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ki), this.update(), this.state = I.NONE;
|
|
83
83
|
}
|
|
84
84
|
update(e = null) {
|
|
85
85
|
const t = this.object.position;
|
|
86
|
-
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state ===
|
|
86
|
+
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === I.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
87
87
|
let i = this.minAzimuthAngle, n = this.maxAzimuthAngle;
|
|
88
88
|
isFinite(i) && isFinite(n) && (i < -Math.PI ? i += J : i > Math.PI && (i -= J), n < -Math.PI ? n += J : n > Math.PI && (n -= J), i <= n ? this._spherical.theta = Math.max(i, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + n) / 2 ? Math.max(i, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
89
89
|
let r = !1;
|
|
@@ -109,7 +109,7 @@ class zr extends Or {
|
|
|
109
109
|
c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), s = Y.length();
|
|
110
110
|
} else
|
|
111
111
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
112
|
-
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) <
|
|
112
|
+
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < zr ? this.object.lookAt(this.target) : (Xi.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Xi, this.target))));
|
|
113
113
|
} else if (this.object.isOrthographicCamera) {
|
|
114
114
|
const s = this.object.zoom;
|
|
115
115
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
|
@@ -309,13 +309,13 @@ class zr extends Or {
|
|
|
309
309
|
function Br(a) {
|
|
310
310
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Gr(a) {
|
|
313
313
|
this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Vr(a) {
|
|
316
316
|
switch (this._removePointer(a), this._pointers.length) {
|
|
317
317
|
case 0:
|
|
318
|
-
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tn), this.state =
|
|
318
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tn), this.state = I.NONE;
|
|
319
319
|
break;
|
|
320
320
|
case 1:
|
|
321
321
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -323,7 +323,7 @@ function Gr(a) {
|
|
|
323
323
|
break;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Hr(a) {
|
|
327
327
|
let e;
|
|
328
328
|
switch (a.button) {
|
|
329
329
|
case 0:
|
|
@@ -341,117 +341,117 @@ function Vr(a) {
|
|
|
341
341
|
switch (e) {
|
|
342
342
|
case tt.DOLLY:
|
|
343
343
|
if (this.enableZoom === !1) return;
|
|
344
|
-
this._handleMouseDownDolly(a), this.state =
|
|
344
|
+
this._handleMouseDownDolly(a), this.state = I.DOLLY;
|
|
345
345
|
break;
|
|
346
346
|
case tt.ROTATE:
|
|
347
347
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
348
348
|
if (this.enablePan === !1) return;
|
|
349
|
-
this._handleMouseDownPan(a), this.state =
|
|
349
|
+
this._handleMouseDownPan(a), this.state = I.PAN;
|
|
350
350
|
} else {
|
|
351
351
|
if (this.enableRotate === !1) return;
|
|
352
|
-
this._handleMouseDownRotate(a), this.state =
|
|
352
|
+
this._handleMouseDownRotate(a), this.state = I.ROTATE;
|
|
353
353
|
}
|
|
354
354
|
break;
|
|
355
355
|
case tt.PAN:
|
|
356
356
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
357
357
|
if (this.enableRotate === !1) return;
|
|
358
|
-
this._handleMouseDownRotate(a), this.state =
|
|
358
|
+
this._handleMouseDownRotate(a), this.state = I.ROTATE;
|
|
359
359
|
} else {
|
|
360
360
|
if (this.enablePan === !1) return;
|
|
361
|
-
this._handleMouseDownPan(a), this.state =
|
|
361
|
+
this._handleMouseDownPan(a), this.state = I.PAN;
|
|
362
362
|
}
|
|
363
363
|
break;
|
|
364
364
|
default:
|
|
365
|
-
this.state =
|
|
365
|
+
this.state = I.NONE;
|
|
366
366
|
}
|
|
367
|
-
this.state !==
|
|
367
|
+
this.state !== I.NONE && this.dispatchEvent(Ci);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function jr(a) {
|
|
370
370
|
switch (this.state) {
|
|
371
|
-
case
|
|
371
|
+
case I.ROTATE:
|
|
372
372
|
if (this.enableRotate === !1) return;
|
|
373
373
|
this._handleMouseMoveRotate(a);
|
|
374
374
|
break;
|
|
375
|
-
case
|
|
375
|
+
case I.DOLLY:
|
|
376
376
|
if (this.enableZoom === !1) return;
|
|
377
377
|
this._handleMouseMoveDolly(a);
|
|
378
378
|
break;
|
|
379
|
-
case
|
|
379
|
+
case I.PAN:
|
|
380
380
|
if (this.enablePan === !1) return;
|
|
381
381
|
this._handleMouseMovePan(a);
|
|
382
382
|
break;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function jr(a) {
|
|
386
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== O.NONE || (a.preventDefault(), this.dispatchEvent(Pi), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tn));
|
|
387
|
-
}
|
|
388
385
|
function Yr(a) {
|
|
389
|
-
this.enabled
|
|
386
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Ci), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tn));
|
|
390
387
|
}
|
|
391
388
|
function Zr(a) {
|
|
389
|
+
this.enabled !== !1 && this._handleKeyDown(a);
|
|
390
|
+
}
|
|
391
|
+
function Kr(a) {
|
|
392
392
|
switch (this._trackPointer(a), this._pointers.length) {
|
|
393
393
|
case 1:
|
|
394
394
|
switch (this.touches.ONE) {
|
|
395
395
|
case Qe.ROTATE:
|
|
396
396
|
if (this.enableRotate === !1) return;
|
|
397
|
-
this._handleTouchStartRotate(a), this.state =
|
|
397
|
+
this._handleTouchStartRotate(a), this.state = I.TOUCH_ROTATE;
|
|
398
398
|
break;
|
|
399
399
|
case Qe.PAN:
|
|
400
400
|
if (this.enablePan === !1) return;
|
|
401
|
-
this._handleTouchStartPan(a), this.state =
|
|
401
|
+
this._handleTouchStartPan(a), this.state = I.TOUCH_PAN;
|
|
402
402
|
break;
|
|
403
403
|
default:
|
|
404
|
-
this.state =
|
|
404
|
+
this.state = I.NONE;
|
|
405
405
|
}
|
|
406
406
|
break;
|
|
407
407
|
case 2:
|
|
408
408
|
switch (this.touches.TWO) {
|
|
409
409
|
case Qe.DOLLY_PAN:
|
|
410
410
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
411
|
-
this._handleTouchStartDollyPan(a), this.state =
|
|
411
|
+
this._handleTouchStartDollyPan(a), this.state = I.TOUCH_DOLLY_PAN;
|
|
412
412
|
break;
|
|
413
413
|
case Qe.DOLLY_ROTATE:
|
|
414
414
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
415
|
-
this._handleTouchStartDollyRotate(a), this.state =
|
|
415
|
+
this._handleTouchStartDollyRotate(a), this.state = I.TOUCH_DOLLY_ROTATE;
|
|
416
416
|
break;
|
|
417
417
|
default:
|
|
418
|
-
this.state =
|
|
418
|
+
this.state = I.NONE;
|
|
419
419
|
}
|
|
420
420
|
break;
|
|
421
421
|
default:
|
|
422
|
-
this.state =
|
|
422
|
+
this.state = I.NONE;
|
|
423
423
|
}
|
|
424
|
-
this.state !==
|
|
424
|
+
this.state !== I.NONE && this.dispatchEvent(Ci);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Xr(a) {
|
|
427
427
|
switch (this._trackPointer(a), this.state) {
|
|
428
|
-
case
|
|
428
|
+
case I.TOUCH_ROTATE:
|
|
429
429
|
if (this.enableRotate === !1) return;
|
|
430
430
|
this._handleTouchMoveRotate(a), this.update();
|
|
431
431
|
break;
|
|
432
|
-
case
|
|
432
|
+
case I.TOUCH_PAN:
|
|
433
433
|
if (this.enablePan === !1) return;
|
|
434
434
|
this._handleTouchMovePan(a), this.update();
|
|
435
435
|
break;
|
|
436
|
-
case
|
|
436
|
+
case I.TOUCH_DOLLY_PAN:
|
|
437
437
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
438
438
|
this._handleTouchMoveDollyPan(a), this.update();
|
|
439
439
|
break;
|
|
440
|
-
case
|
|
440
|
+
case I.TOUCH_DOLLY_ROTATE:
|
|
441
441
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
442
442
|
this._handleTouchMoveDollyRotate(a), this.update();
|
|
443
443
|
break;
|
|
444
444
|
default:
|
|
445
|
-
this.state =
|
|
445
|
+
this.state = I.NONE;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function Wr(a) {
|
|
449
449
|
this.enabled !== !1 && a.preventDefault();
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function qr(a) {
|
|
452
452
|
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Qr(a) {
|
|
455
455
|
a.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
456
456
|
}
|
|
457
457
|
function we(a) {
|
|
@@ -473,11 +473,11 @@ var he = {
|
|
|
473
473
|
duration: 0.5,
|
|
474
474
|
overwrite: !1,
|
|
475
475
|
delay: 0
|
|
476
|
-
},
|
|
476
|
+
}, Pi, K, N, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, Jr = oi / 4, es = 0, Dn = Math.sqrt, ts = Math.cos, is = Math.sin, Z = function(e) {
|
|
477
477
|
return typeof e == "string";
|
|
478
478
|
}, G = function(e) {
|
|
479
479
|
return typeof e == "function";
|
|
480
|
-
},
|
|
480
|
+
}, Pe = function(e) {
|
|
481
481
|
return typeof e == "number";
|
|
482
482
|
}, Ai = function(e) {
|
|
483
483
|
return typeof e > "u";
|
|
@@ -490,7 +490,7 @@ var he = {
|
|
|
490
490
|
}, Rt = function(e) {
|
|
491
491
|
return G(e) || Z(e);
|
|
492
492
|
}, Mn = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
493
|
-
}, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Rn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,
|
|
493
|
+
}, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Rn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, On = /[+-]=-?[.\d]+/, In = /[^,'"\[\]\s]+/gi, ns = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, z, _e, hi, Si, ce = {}, zt = {}, Ln, kn = function(e) {
|
|
494
494
|
return (zt = at(e, ce)) && re;
|
|
495
495
|
}, Di = function(e, t) {
|
|
496
496
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
@@ -500,16 +500,16 @@ var he = {
|
|
|
500
500
|
return e && (ce[e] = t) && zt && (zt[e] = t) || ce;
|
|
501
501
|
}, vt = function() {
|
|
502
502
|
return 0;
|
|
503
|
-
},
|
|
503
|
+
}, rs = {
|
|
504
504
|
suppressEvents: !0,
|
|
505
505
|
isStart: !0,
|
|
506
506
|
kill: !1
|
|
507
507
|
}, kt = {
|
|
508
508
|
suppressEvents: !0,
|
|
509
509
|
kill: !1
|
|
510
|
-
},
|
|
510
|
+
}, ss = {
|
|
511
511
|
suppressEvents: !0
|
|
512
|
-
}, Mi = {}, Re = [], ci = {}, Fn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "",
|
|
512
|
+
}, Mi = {}, Re = [], ci = {}, Fn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Oi = function(e) {
|
|
513
513
|
var t = e[0], i, n;
|
|
514
514
|
if (Ee(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
515
515
|
for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
|
|
@@ -520,7 +520,7 @@ var he = {
|
|
|
520
520
|
e[n] && (e[n]._gsap || (e[n]._gsap = new or(e[n], i))) || e.splice(n, 1);
|
|
521
521
|
return e;
|
|
522
522
|
}, He = function(e) {
|
|
523
|
-
return e._gsap ||
|
|
523
|
+
return e._gsap || Oi(me(e))[0]._gsap;
|
|
524
524
|
}, Nn = function(e, t, i) {
|
|
525
525
|
return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
526
526
|
}, te = function(e, t) {
|
|
@@ -532,28 +532,28 @@ var he = {
|
|
|
532
532
|
}, it = function(e, t) {
|
|
533
533
|
var i = t.charAt(0), n = parseFloat(t.substr(2));
|
|
534
534
|
return e = parseFloat(e), i === "+" ? e + n : i === "-" ? e - n : i === "*" ? e * n : e / n;
|
|
535
|
-
},
|
|
535
|
+
}, as = function(e, t) {
|
|
536
536
|
for (var i = t.length, n = 0; e.indexOf(t[n]) < 0 && ++n < i; )
|
|
537
537
|
;
|
|
538
538
|
return n < i;
|
|
539
|
-
},
|
|
539
|
+
}, $t = function() {
|
|
540
540
|
var e = Re.length, t = Re.slice(0), i, n;
|
|
541
541
|
for (ci = {}, Re.length = 0, i = 0; i < e; i++)
|
|
542
542
|
n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
|
|
543
|
-
},
|
|
543
|
+
}, Ii = function(e) {
|
|
544
544
|
return !!(e._initted || e._startAt || e.add);
|
|
545
545
|
}, zn = function(e, t, i, n) {
|
|
546
|
-
Re.length && !K &&
|
|
547
|
-
}, Bn = function(e) {
|
|
548
|
-
var t = parseFloat(e);
|
|
549
|
-
return (t || t === 0) && (e + "").match(On).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
546
|
+
Re.length && !K && $t(), e.render(t, i, !!(K && t < 0 && Ii(e))), Re.length && !K && $t();
|
|
550
547
|
}, $n = function(e) {
|
|
548
|
+
var t = parseFloat(e);
|
|
549
|
+
return (t || t === 0) && (e + "").match(In).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
550
|
+
}, Bn = function(e) {
|
|
551
551
|
return e;
|
|
552
552
|
}, ue = function(e, t) {
|
|
553
553
|
for (var i in t)
|
|
554
554
|
i in e || (e[i] = t[i]);
|
|
555
555
|
return e;
|
|
556
|
-
},
|
|
556
|
+
}, os = function(e) {
|
|
557
557
|
return function(t, i) {
|
|
558
558
|
for (var n in i)
|
|
559
559
|
n in t || n === "duration" && e || n === "ease" || (t[n] = i[n]);
|
|
@@ -566,18 +566,18 @@ var he = {
|
|
|
566
566
|
for (var i in t)
|
|
567
567
|
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] = Ee(t[i]) ? a(e[i] || (e[i] = {}), t[i]) : t[i]);
|
|
568
568
|
return e;
|
|
569
|
-
},
|
|
569
|
+
}, Bt = function(e, t) {
|
|
570
570
|
var i = {}, n;
|
|
571
571
|
for (n in e)
|
|
572
572
|
n in t || (i[n] = e[n]);
|
|
573
573
|
return i;
|
|
574
574
|
}, yt = function(e) {
|
|
575
|
-
var t = e.parent || z, i = e.keyframes ?
|
|
575
|
+
var t = e.parent || z, i = e.keyframes ? os(W(e.keyframes)) : ue;
|
|
576
576
|
if (ee(e.inherit))
|
|
577
577
|
for (; t; )
|
|
578
578
|
i(e, t.vars.defaults), t = t.parent || t._dp;
|
|
579
579
|
return e;
|
|
580
|
-
},
|
|
580
|
+
}, ls = function(e, t) {
|
|
581
581
|
for (var i = e.length, n = i === t.length; n && i-- && e[i] === t[i]; )
|
|
582
582
|
;
|
|
583
583
|
return i < 0;
|
|
@@ -591,20 +591,20 @@ var he = {
|
|
|
591
591
|
i === void 0 && (i = "_first"), n === void 0 && (n = "_last");
|
|
592
592
|
var r = t._prev, s = t._next;
|
|
593
593
|
r ? r._next = s : e[i] === t && (e[i] = s), s ? s._prev = r : e[n] === t && (e[n] = r), t._next = t._prev = t.parent = null;
|
|
594
|
-
},
|
|
594
|
+
}, Ie = function(e, t) {
|
|
595
595
|
e.parent && (!t || e.parent.autoRemoveChildren) && e.parent.remove && e.parent.remove(e), e._act = 0;
|
|
596
596
|
}, je = function(e, t) {
|
|
597
597
|
if (e && (!t || t._end > e._dur || t._start < 0))
|
|
598
598
|
for (var i = e; i; )
|
|
599
599
|
i._dirty = 1, i = i.parent;
|
|
600
600
|
return e;
|
|
601
|
-
},
|
|
601
|
+
}, hs = function(e) {
|
|
602
602
|
for (var t = e.parent; t && t.parent; )
|
|
603
603
|
t._dirty = 1, t.totalDuration(), t = t.parent;
|
|
604
604
|
return e;
|
|
605
605
|
}, ui = function(e, t, i, n) {
|
|
606
606
|
return e._startAt && (K ? e._startAt.revert(kt) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
|
|
607
|
-
},
|
|
607
|
+
}, cs = function a(e) {
|
|
608
608
|
return !e || e._ts && a(e.parent);
|
|
609
609
|
}, Qi = function(e) {
|
|
610
610
|
return e._repeat ? ot(e._tTime, e = e.duration() + e._rDelay) * e : 0;
|
|
@@ -627,7 +627,7 @@ var he = {
|
|
|
627
627
|
e._zTime = -k;
|
|
628
628
|
}
|
|
629
629
|
}, ye = function(e, t, i, n) {
|
|
630
|
-
return t.parent &&
|
|
630
|
+
return t.parent && Ie(t), t._start = j((Pe(i) ? i : i || e !== z ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Gn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Vn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
|
|
631
631
|
}, Hn = function(e, t) {
|
|
632
632
|
return (ce.ScrollTrigger || Di("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
|
|
633
633
|
}, jn = function(e, t, i, n, r) {
|
|
@@ -635,22 +635,22 @@ var he = {
|
|
|
635
635
|
return 1;
|
|
636
636
|
if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Fn !== oe.frame)
|
|
637
637
|
return Re.push(e), e._lazy = [r, n], 1;
|
|
638
|
-
},
|
|
638
|
+
}, us = function a(e) {
|
|
639
639
|
var t = e.parent;
|
|
640
640
|
return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
|
|
641
641
|
}, di = function(e) {
|
|
642
642
|
var t = e.data;
|
|
643
643
|
return t === "isFromStart" || t === "isStart";
|
|
644
|
-
},
|
|
645
|
-
var r = e.ratio, s = t < 0 || !t && (!e._start &&
|
|
644
|
+
}, ds = function(e, t, i, n) {
|
|
645
|
+
var r = e.ratio, s = t < 0 || !t && (!e._start && us(e) && !(!e._initted && di(e)) || (e._ts < 0 || e._dp._ts < 0) && !di(e)) ? 0 : 1, o = e._rDelay, l = 0, c, h, u;
|
|
646
646
|
if (o && e._repeat && (l = Dt(0, e._tDur, t), h = ot(l, o), e._yoyo && h & 1 && (s = 1 - s), h !== ot(e._tTime, o) && (r = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== r || K || n || e._zTime === k || !t && e._zTime) {
|
|
647
647
|
if (!e._initted && jn(e, t, n, i, l))
|
|
648
648
|
return;
|
|
649
649
|
for (u = e._zTime, e._zTime = t || (i ? k : 0), i || (i = t && !u), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l, c = e._pt; c; )
|
|
650
650
|
c.r(s, c.d), c = c._next;
|
|
651
|
-
t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s &&
|
|
651
|
+
t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && Ie(e, 1), !i && !K && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
652
652
|
} else e._zTime || (e._zTime = t);
|
|
653
|
-
},
|
|
653
|
+
}, ps = function(e, t, i) {
|
|
654
654
|
var n;
|
|
655
655
|
if (i > t)
|
|
656
656
|
for (n = e._first; n && n._start <= i; ) {
|
|
@@ -669,15 +669,15 @@ var he = {
|
|
|
669
669
|
return o && !n && (e._time *= s / e._dur), e._dur = s, e._tDur = r ? r < 0 ? 1e10 : j(s * (r + 1) + e._rDelay * r) : s, o > 0 && !n && Kt(e, e._tTime = e._tDur * o), e.parent && Zt(e), i || je(e.parent, e), e;
|
|
670
670
|
}, Ji = function(e) {
|
|
671
671
|
return e instanceof q ? je(e) : lt(e, e._dur);
|
|
672
|
-
},
|
|
672
|
+
}, fs = {
|
|
673
673
|
_start: 0,
|
|
674
674
|
endTime: vt,
|
|
675
675
|
totalDuration: vt
|
|
676
676
|
}, pe = function a(e, t, i) {
|
|
677
|
-
var n = e.labels, r = e._recent ||
|
|
677
|
+
var n = e.labels, r = e._recent || fs, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
|
|
678
678
|
return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (W(i) ? i[0] : i).totalDuration()), o > 1 ? a(e, t.substr(0, o - 1), i) + l : s + l)) : t == null ? s : +t;
|
|
679
679
|
}, xt = function(e, t, i) {
|
|
680
|
-
var n =
|
|
680
|
+
var n = Pe(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
|
|
681
681
|
if (n && (s.duration = t[1]), s.parent = i, e) {
|
|
682
682
|
for (o = s, l = i; l && !("immediateRender" in o); )
|
|
683
683
|
o = l.vars.defaults || {}, l = ee(l.vars.inherit) && l.parent;
|
|
@@ -689,20 +689,20 @@ var he = {
|
|
|
689
689
|
}, Dt = function(e, t, i) {
|
|
690
690
|
return i < e ? e : i > t ? t : i;
|
|
691
691
|
}, X = function(e, t) {
|
|
692
|
-
return !Z(e) || !(t =
|
|
693
|
-
},
|
|
692
|
+
return !Z(e) || !(t = ns.exec(e)) ? "" : t[1];
|
|
693
|
+
}, ms = function(e, t, i) {
|
|
694
694
|
return ke(i, function(n) {
|
|
695
695
|
return Dt(e, t, n);
|
|
696
696
|
});
|
|
697
697
|
}, pi = [].slice, Yn = function(e, t) {
|
|
698
698
|
return e && Ee(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Ee(e[0])) && !e.nodeType && e !== _e;
|
|
699
|
-
},
|
|
699
|
+
}, gs = function(e, t, i) {
|
|
700
700
|
return i === void 0 && (i = []), e.forEach(function(n) {
|
|
701
701
|
var r;
|
|
702
702
|
return Z(n) && !t || Yn(n, 1) ? (r = i).push.apply(r, me(n)) : i.push(n);
|
|
703
703
|
}) || i;
|
|
704
704
|
}, me = function(e, t, i) {
|
|
705
|
-
return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ?
|
|
705
|
+
return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ? gs(e, i) : Yn(e) ? pi.call(e, 0) : e ? [e] : [];
|
|
706
706
|
}, fi = function(e) {
|
|
707
707
|
return e = me(e)[0] || Et("Invalid scope") || {}, function(t) {
|
|
708
708
|
var i = e.current || e.nativeElement || e;
|
|
@@ -723,16 +723,16 @@ var he = {
|
|
|
723
723
|
edges: 0.5,
|
|
724
724
|
end: 1
|
|
725
725
|
}[n] || 0 : !o && l && (h = n[0], u = n[1]), function(p, m, f) {
|
|
726
|
-
var d = (f || t).length, g = s[d], _, y, x,
|
|
726
|
+
var d = (f || t).length, g = s[d], _, y, x, E, b, C, v, P, w;
|
|
727
727
|
if (!g) {
|
|
728
|
-
if (
|
|
729
|
-
for (
|
|
728
|
+
if (w = t.grid === "auto" ? 0 : (t.grid || [1, fe])[1], !w) {
|
|
729
|
+
for (v = -fe; v < (v = f[w++].getBoundingClientRect().left) && w < d; )
|
|
730
730
|
;
|
|
731
|
-
|
|
731
|
+
w < d && w--;
|
|
732
732
|
}
|
|
733
|
-
for (g = s[d] = [], _ = l ? Math.min(
|
|
734
|
-
x =
|
|
735
|
-
n === "random" && Zn(g), g.max =
|
|
733
|
+
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, v = 0, P = fe, C = 0; C < d; C++)
|
|
734
|
+
x = C % w - _, E = y - (C / w | 0), g[C] = b = c ? Math.abs(c === "y" ? E : x) : Dn(x * x + E * E), b > v && (v = b), b < P && (P = b);
|
|
735
|
+
n === "random" && Zn(g), g.max = v - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? rr(i) : i;
|
|
736
736
|
}
|
|
737
737
|
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
738
738
|
};
|
|
@@ -740,22 +740,22 @@ var he = {
|
|
|
740
740
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
741
741
|
return function(i) {
|
|
742
742
|
var n = j(Math.round(parseFloat(i) / e) * e * t);
|
|
743
|
-
return (n - n % 1) / t + (
|
|
743
|
+
return (n - n % 1) / t + (Pe(i) ? 0 : X(i));
|
|
744
744
|
};
|
|
745
745
|
}, Xn = function(e, t) {
|
|
746
746
|
var i = W(e), n, r;
|
|
747
|
-
return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !
|
|
747
|
+
return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Pe(e[0])) && (n *= n)) : e = mi(e.increment)), ke(t, i ? G(e) ? function(s) {
|
|
748
748
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
749
749
|
} : function(s) {
|
|
750
750
|
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), c = fe, h = 0, u = e.length, p, m; u--; )
|
|
751
751
|
r ? (p = e[u].x - o, m = e[u].y - l, p = p * p + m * m) : p = Math.abs(e[u] - o), p < c && (c = p, h = u);
|
|
752
|
-
return h = !n || c <= n ? e[h] : s, r || h === s ||
|
|
752
|
+
return h = !n || c <= n ? e[h] : s, r || h === s || Pe(s) ? h : h + X(s);
|
|
753
753
|
} : mi(e));
|
|
754
754
|
}, Wn = function(e, t, i, n) {
|
|
755
755
|
return ke(W(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
756
756
|
return W(e) ? e[~~(Math.random() * e.length)] : (i = i || 1e-5) && (n = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) && Math.floor(Math.round((e - i / 2 + Math.random() * (t - e + i * 0.99)) / i) * i * n) / n;
|
|
757
757
|
});
|
|
758
|
-
},
|
|
758
|
+
}, _s = function() {
|
|
759
759
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
760
760
|
t[i] = arguments[i];
|
|
761
761
|
return function(n) {
|
|
@@ -763,36 +763,36 @@ var he = {
|
|
|
763
763
|
return s(r);
|
|
764
764
|
}, n);
|
|
765
765
|
};
|
|
766
|
-
},
|
|
766
|
+
}, ys = function(e, t) {
|
|
767
767
|
return function(i) {
|
|
768
768
|
return e(parseFloat(i)) + (t || X(i));
|
|
769
769
|
};
|
|
770
|
-
},
|
|
770
|
+
}, xs = function(e, t, i) {
|
|
771
771
|
return Qn(e, t, 0, 1, i);
|
|
772
772
|
}, qn = function(e, t, i) {
|
|
773
773
|
return ke(i, function(n) {
|
|
774
774
|
return e[~~t(n)];
|
|
775
775
|
});
|
|
776
|
-
},
|
|
776
|
+
}, bs = function a(e, t, i) {
|
|
777
777
|
var n = t - e;
|
|
778
778
|
return W(e) ? qn(e, a(0, e.length), t) : ke(i, function(r) {
|
|
779
779
|
return (n + (r - e) % n) % n + e;
|
|
780
780
|
});
|
|
781
|
-
},
|
|
781
|
+
}, Es = function a(e, t, i) {
|
|
782
782
|
var n = t - e, r = n * 2;
|
|
783
783
|
return W(e) ? qn(e, a(0, e.length - 1), t) : ke(i, function(s) {
|
|
784
784
|
return s = (r + (s - e) % r) % r || 0, e + (s > n ? r - s : s);
|
|
785
785
|
});
|
|
786
786
|
}, wt = function(e) {
|
|
787
787
|
for (var t = 0, i = "", n, r, s, o; ~(n = e.indexOf("random(", t)); )
|
|
788
|
-
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ?
|
|
788
|
+
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? In : li), i += e.substr(t, n - t) + Wn(o ? r : +r[0], o ? 0 : +r[1], +r[2] || 1e-5), t = s + 1;
|
|
789
789
|
return i + e.substr(t, e.length - t);
|
|
790
790
|
}, Qn = function(e, t, i, n, r) {
|
|
791
791
|
var s = t - e, o = n - i;
|
|
792
792
|
return ke(r, function(l) {
|
|
793
793
|
return i + ((l - e) / s * o || 0);
|
|
794
794
|
});
|
|
795
|
-
},
|
|
795
|
+
}, vs = function a(e, t, i, n) {
|
|
796
796
|
var r = isNaN(e + t) ? 0 : function(m) {
|
|
797
797
|
return (1 - m) * e + m * t;
|
|
798
798
|
};
|
|
@@ -830,9 +830,9 @@ var he = {
|
|
|
830
830
|
}, le = function(e, t, i) {
|
|
831
831
|
var n = e.vars, r = n[t], s = N, o = e._ctx, l, c, h;
|
|
832
832
|
if (r)
|
|
833
|
-
return l = n[t + "Params"], c = n.callbackScope || e, i && Re.length &&
|
|
833
|
+
return l = n[t + "Params"], c = n.callbackScope || e, i && Re.length && $t(), o && (N = o), h = l ? r.apply(c, l) : r.call(c), N = s, h;
|
|
834
834
|
}, mt = function(e) {
|
|
835
|
-
return
|
|
835
|
+
return Ie(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
|
|
836
836
|
}, et, Jn = [], er = function(e) {
|
|
837
837
|
if (e)
|
|
838
838
|
if (e = !e.name && e.default || e, Ti() || e.headless) {
|
|
@@ -842,8 +842,8 @@ var he = {
|
|
|
842
842
|
init: vt,
|
|
843
843
|
render: Ni,
|
|
844
844
|
add: Li,
|
|
845
|
-
kill:
|
|
846
|
-
modifier:
|
|
845
|
+
kill: Ns,
|
|
846
|
+
modifier: Fs,
|
|
847
847
|
rawVars: 0
|
|
848
848
|
}, s = {
|
|
849
849
|
targetTest: 0,
|
|
@@ -855,7 +855,7 @@ var he = {
|
|
|
855
855
|
if (ht(), e !== n) {
|
|
856
856
|
if (ae[t])
|
|
857
857
|
return;
|
|
858
|
-
ue(n, ue(
|
|
858
|
+
ue(n, ue(Bt(e, r), s)), at(n.prototype, at(r, Bt(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
859
859
|
}
|
|
860
860
|
Un(t, n), e.register && e.register(re, n, ie);
|
|
861
861
|
} else
|
|
@@ -883,7 +883,7 @@ var he = {
|
|
|
883
883
|
}, Qt = function(e, t, i) {
|
|
884
884
|
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * L + 0.5 | 0;
|
|
885
885
|
}, tr = function(e, t, i) {
|
|
886
|
-
var n = e ?
|
|
886
|
+
var n = e ? Pe(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
|
|
887
887
|
if (!n) {
|
|
888
888
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
|
|
889
889
|
n = gt[e];
|
|
@@ -903,38 +903,38 @@ var he = {
|
|
|
903
903
|
return t && !f && (r = n[0] / L, s = n[1] / L, o = n[2] / L, u = Math.max(r, s, o), p = Math.min(r, s, o), h = (u + p) / 2, u === p ? l = c = 0 : (m = u - p, c = h > 0.5 ? m / (2 - u - p) : m / (u + p), l = u === r ? (s - o) / m + (s < o ? 6 : 0) : u === s ? (o - r) / m + 2 : (r - s) / m + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(c * 100 + 0.5), n[2] = ~~(h * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
|
|
904
904
|
}, ir = function(e) {
|
|
905
905
|
var t = [], i = [], n = -1;
|
|
906
|
-
return e.split(
|
|
906
|
+
return e.split(Oe).forEach(function(r) {
|
|
907
907
|
var s = r.match(Je) || [];
|
|
908
908
|
t.push.apply(t, s), i.push(n += s.length + 1);
|
|
909
909
|
}), t.c = i, t;
|
|
910
910
|
}, tn = function(e, t, i) {
|
|
911
|
-
var n = "", r = (e + n).match(
|
|
911
|
+
var n = "", r = (e + n).match(Oe), s = t ? "hsla(" : "rgba(", o = 0, l, c, h, u;
|
|
912
912
|
if (!r)
|
|
913
913
|
return e;
|
|
914
914
|
if (r = r.map(function(p) {
|
|
915
915
|
return (p = tr(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
|
|
916
916
|
}), i && (h = ir(e), l = i.c, l.join(n) !== h.c.join(n)))
|
|
917
|
-
for (c = e.replace(
|
|
917
|
+
for (c = e.replace(Oe, "1").split(Je), u = c.length - 1; o < u; o++)
|
|
918
918
|
n += c[o] + (~l.indexOf(o) ? r.shift() || s + "0,0,0,0)" : (h.length ? h : r.length ? r : i).shift());
|
|
919
919
|
if (!c)
|
|
920
|
-
for (c = e.split(
|
|
920
|
+
for (c = e.split(Oe), u = c.length - 1; o < u; o++)
|
|
921
921
|
n += c[o] + r[o];
|
|
922
922
|
return n + c[u];
|
|
923
|
-
},
|
|
923
|
+
}, Oe = (function() {
|
|
924
924
|
var a = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", e;
|
|
925
925
|
for (e in gt)
|
|
926
926
|
a += "|" + e + "\\b";
|
|
927
927
|
return new RegExp(a + ")", "gi");
|
|
928
|
-
})(),
|
|
928
|
+
})(), ws = /hsl[a]?\(/, nr = function(e) {
|
|
929
929
|
var t = e.join(" "), i;
|
|
930
|
-
if (
|
|
931
|
-
return i =
|
|
932
|
-
},
|
|
930
|
+
if (Oe.lastIndex = 0, Oe.test(t))
|
|
931
|
+
return i = ws.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], i, ir(e[1])), !0;
|
|
932
|
+
}, Ct, oe = (function() {
|
|
933
933
|
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
|
|
934
|
-
var _ = a() - n, y = g === !0, x,
|
|
935
|
-
if ((_ > e || _ < 0) && (i += _ - t), n += _,
|
|
934
|
+
var _ = a() - n, y = g === !0, x, E, b, C;
|
|
935
|
+
if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (C = ++u.frame, p = b - u.time * 1e3, u.time = b = b / 1e3, s += x + (x >= r ? 4 : r - x), E = 1), y || (l = c(d)), E)
|
|
936
936
|
for (m = 0; m < o.length; m++)
|
|
937
|
-
o[m](
|
|
937
|
+
o[m](b, p, C, g);
|
|
938
938
|
};
|
|
939
939
|
return u = {
|
|
940
940
|
time: 0,
|
|
@@ -948,10 +948,10 @@ var he = {
|
|
|
948
948
|
wake: function() {
|
|
949
949
|
Ln && (!hi && Ti() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version), kn(zt || _e.GreenSockGlobals || !_e.gsap && _e || {}), Jn.forEach(er)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
|
|
950
950
|
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
951
|
-
},
|
|
951
|
+
}, Ct = 1, f(2));
|
|
952
952
|
},
|
|
953
953
|
sleep: function() {
|
|
954
|
-
(h ? cancelAnimationFrame : clearTimeout)(l),
|
|
954
|
+
(h ? cancelAnimationFrame : clearTimeout)(l), Ct = 0, c = vt;
|
|
955
955
|
},
|
|
956
956
|
lagSmoothing: function(g, _) {
|
|
957
957
|
e = g || 1 / 0, t = Math.min(_ || 33, e);
|
|
@@ -960,8 +960,8 @@ var he = {
|
|
|
960
960
|
r = 1e3 / (g || 240), s = u.time * 1e3 + r;
|
|
961
961
|
},
|
|
962
962
|
add: function(g, _, y) {
|
|
963
|
-
var x = _ ? function(
|
|
964
|
-
g(
|
|
963
|
+
var x = _ ? function(E, b, C, v) {
|
|
964
|
+
g(E, b, C, v), u.remove(x);
|
|
965
965
|
} : g;
|
|
966
966
|
return u.remove(g), o[y ? "unshift" : "push"](x), ht(), x;
|
|
967
967
|
},
|
|
@@ -971,17 +971,17 @@ var he = {
|
|
|
971
971
|
_listeners: o
|
|
972
972
|
}, u;
|
|
973
973
|
})(), ht = function() {
|
|
974
|
-
return !
|
|
975
|
-
},
|
|
974
|
+
return !Ct && oe.wake();
|
|
975
|
+
}, D = {}, Cs = /^[\d.\-M][\d.\-,\s]/, Ps = /["']/g, As = function(e) {
|
|
976
976
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
|
|
977
977
|
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(Ps, "").trim() : +c, n = l.substr(o + 1).trim();
|
|
978
978
|
return t;
|
|
979
|
-
},
|
|
979
|
+
}, Ts = function(e) {
|
|
980
980
|
var t = e.indexOf("(") + 1, i = e.indexOf(")"), n = e.indexOf("(", t);
|
|
981
981
|
return e.substring(t, ~n && n < i ? e.indexOf(")", i + 1) : i);
|
|
982
|
-
},
|
|
983
|
-
var t = (e + "").split("("), i =
|
|
984
|
-
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [
|
|
982
|
+
}, Ss = function(e) {
|
|
983
|
+
var t = (e + "").split("("), i = D[t[0]];
|
|
984
|
+
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [As(t[1])] : Ts(e).split(",").map($n)) : D._CE && Cs.test(e) ? D._CE("", e) : i;
|
|
985
985
|
}, rr = function(e) {
|
|
986
986
|
return function(t) {
|
|
987
987
|
return 1 - e(1 - t);
|
|
@@ -990,7 +990,7 @@ var he = {
|
|
|
990
990
|
for (var i = e._first, n; i; )
|
|
991
991
|
i instanceof q ? a(i, t) : i.vars.yoyoEase && (!i._yoyo || !i._repeat) && i._yoyo !== t && (i.timeline ? a(i.timeline, t) : (n = i._ease, i._ease = i._yEase, i._yEase = n, i._yoyo = t)), i = i._next;
|
|
992
992
|
}, Ye = function(e, t) {
|
|
993
|
-
return e && (G(e) ? e :
|
|
993
|
+
return e && (G(e) ? e : D[e] || Ss(e)) || t;
|
|
994
994
|
}, Xe = function(e, t, i, n) {
|
|
995
995
|
i === void 0 && (i = function(l) {
|
|
996
996
|
return 1 - t(1 - l);
|
|
@@ -1003,9 +1003,9 @@ var he = {
|
|
|
1003
1003
|
easeInOut: n
|
|
1004
1004
|
}, s;
|
|
1005
1005
|
return te(e, function(o) {
|
|
1006
|
-
|
|
1006
|
+
D[o] = ce[o] = r, D[s = o.toLowerCase()] = i;
|
|
1007
1007
|
for (var l in r)
|
|
1008
|
-
|
|
1008
|
+
D[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = D[o + "." + l] = r[l];
|
|
1009
1009
|
}), r;
|
|
1010
1010
|
}, ar = function(e) {
|
|
1011
1011
|
return function(t) {
|
|
@@ -1013,7 +1013,7 @@ var he = {
|
|
|
1013
1013
|
};
|
|
1014
1014
|
}, Jt = function a(e, t, i) {
|
|
1015
1015
|
var n = t >= 1 ? t : 1, r = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = r / oi * (Math.asin(1 / n) || 0), o = function(h) {
|
|
1016
|
-
return h === 1 ? 1 : n * Math.pow(2, -10 * h) *
|
|
1016
|
+
return h === 1 ? 1 : n * Math.pow(2, -10 * h) * is((h - s) * r) + 1;
|
|
1017
1017
|
}, l = e === "out" ? o : e === "in" ? function(c) {
|
|
1018
1018
|
return 1 - o(1 - c);
|
|
1019
1019
|
} : ar(o);
|
|
@@ -1043,7 +1043,7 @@ te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
|
|
|
1043
1043
|
return i < 0.5 ? Math.pow(i * 2, t) / 2 : 1 - Math.pow((1 - i) * 2, t) / 2;
|
|
1044
1044
|
});
|
|
1045
1045
|
});
|
|
1046
|
-
|
|
1046
|
+
D.Linear.easeNone = D.none = D.Linear.easeIn;
|
|
1047
1047
|
Xe("Elastic", Jt("in"), Jt("out"), Jt());
|
|
1048
1048
|
(function(a, e) {
|
|
1049
1049
|
var t = 1 / e, i = 2 * t, n = 2.5 * t, r = function(o) {
|
|
@@ -1060,10 +1060,10 @@ Xe("Circ", function(a) {
|
|
|
1060
1060
|
return -(Dn(1 - a * a) - 1);
|
|
1061
1061
|
});
|
|
1062
1062
|
Xe("Sine", function(a) {
|
|
1063
|
-
return a === 1 ? 1 : -
|
|
1063
|
+
return a === 1 ? 1 : -ts(a * Jr) + 1;
|
|
1064
1064
|
});
|
|
1065
1065
|
Xe("Back", ei("in"), ei("out"), ei());
|
|
1066
|
-
|
|
1066
|
+
D.SteppedEase = D.steps = ce.SteppedEase = {
|
|
1067
1067
|
config: function(e, t) {
|
|
1068
1068
|
e === void 0 && (e = 1);
|
|
1069
1069
|
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 - k;
|
|
@@ -1072,15 +1072,15 @@ S.SteppedEase = S.steps = ce.SteppedEase = {
|
|
|
1072
1072
|
};
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
|
-
st.ease =
|
|
1075
|
+
st.ease = D["quad.out"];
|
|
1076
1076
|
te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(a) {
|
|
1077
1077
|
return Ri += a + "," + a + "Params,";
|
|
1078
1078
|
});
|
|
1079
1079
|
var or = function(e, t) {
|
|
1080
|
-
this.id =
|
|
1081
|
-
},
|
|
1080
|
+
this.id = es++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Fi;
|
|
1081
|
+
}, Pt = /* @__PURE__ */ (function() {
|
|
1082
1082
|
function a(t) {
|
|
1083
|
-
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, N && (this._ctx = N, N.data.push(this)),
|
|
1083
|
+
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, N && (this._ctx = N, N.data.push(this)), Ct || oe.wake();
|
|
1084
1084
|
}
|
|
1085
1085
|
var e = a.prototype;
|
|
1086
1086
|
return e.delay = function(i) {
|
|
@@ -1114,7 +1114,7 @@ var or = function(e, t) {
|
|
|
1114
1114
|
if (this._rts === i)
|
|
1115
1115
|
return this;
|
|
1116
1116
|
var r = this.parent && this._ts ? Gt(this.parent._time, this) : this._tTime;
|
|
1117
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this),
|
|
1117
|
+
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this), hs(this);
|
|
1118
1118
|
}, e.paused = function(i) {
|
|
1119
1119
|
return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ht(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== k && (this._tTime -= k)))), this) : this._ps;
|
|
1120
1120
|
}, e.startTime = function(i) {
|
|
@@ -1130,9 +1130,9 @@ var or = function(e, t) {
|
|
|
1130
1130
|
var n = this.parent || this._dp;
|
|
1131
1131
|
return n ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? Gt(n.rawTime(i), this) : this._tTime : this._tTime;
|
|
1132
1132
|
}, e.revert = function(i) {
|
|
1133
|
-
i === void 0 && (i =
|
|
1133
|
+
i === void 0 && (i = ss);
|
|
1134
1134
|
var n = K;
|
|
1135
|
-
return K = i,
|
|
1135
|
+
return K = i, Ii(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), K = n, this;
|
|
1136
1136
|
}, e.globalTime = function(i) {
|
|
1137
1137
|
for (var n = this, r = arguments.length ? i : n.rawTime(); n; )
|
|
1138
1138
|
r = n._start + r / (Math.abs(n._ts) || 1), n = n._dp;
|
|
@@ -1172,7 +1172,7 @@ var or = function(e, t) {
|
|
|
1172
1172
|
}, e.then = function(i) {
|
|
1173
1173
|
var n = this;
|
|
1174
1174
|
return new Promise(function(r) {
|
|
1175
|
-
var s = G(i) ? i :
|
|
1175
|
+
var s = G(i) ? i : Bn, o = function() {
|
|
1176
1176
|
var c = n.then;
|
|
1177
1177
|
n.then = null, G(s) && (s = s(n)) && (s.then || s === n) && (n.then = c), r(s), n.then = c;
|
|
1178
1178
|
};
|
|
@@ -1182,7 +1182,7 @@ var or = function(e, t) {
|
|
|
1182
1182
|
mt(this);
|
|
1183
1183
|
}, a;
|
|
1184
1184
|
})();
|
|
1185
|
-
ue(
|
|
1185
|
+
ue(Pt.prototype, {
|
|
1186
1186
|
_time: 0,
|
|
1187
1187
|
_start: 0,
|
|
1188
1188
|
_end: 0,
|
|
@@ -1226,21 +1226,21 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1226
1226
|
}, t.staggerFromTo = function(n, r, s, o, l, c, h, u) {
|
|
1227
1227
|
return o.startAt = s, yt(o).immediateRender = ee(o.immediateRender), this.staggerTo(n, r, o, l, c, h, u);
|
|
1228
1228
|
}, t.render = function(n, r, s) {
|
|
1229
|
-
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x,
|
|
1229
|
+
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, E, b, C, v;
|
|
1230
1230
|
if (this !== z && h > l && n >= 0 && (h = l), h !== this._tTime || s || u) {
|
|
1231
|
-
if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h,
|
|
1232
|
-
if (
|
|
1231
|
+
if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h, E = this._start, x = this._ts, _ = !x, u && (c || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
|
|
1232
|
+
if (C = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
|
|
1233
1233
|
return this.totalTime(g * 100 + n, r, s);
|
|
1234
|
-
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (
|
|
1235
|
-
var
|
|
1236
|
-
if (d <
|
|
1234
|
+
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d), C && d & 1 && (p = c - p, v = 1), d !== b && !this._lock) {
|
|
1235
|
+
var P = C && b & 1, w = P === (C && d & 1);
|
|
1236
|
+
if (d < b && (P = !P), o = P ? 0 : h % c ? c : h, this._lock = 1, this.render(o || (v ? 0 : j(d * g)), r, !c)._lock = 0, this._tTime = h, !r && this.parent && le(this, "onRepeat"), this.vars.repeatRefresh && !v && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
1237
1237
|
return this;
|
|
1238
|
-
if (c = this._dur, l = this._tDur,
|
|
1238
|
+
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = P ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !v && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
1239
1239
|
return this;
|
|
1240
|
-
sr(this,
|
|
1240
|
+
sr(this, v);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (y =
|
|
1243
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (y = ps(this, j(o), j(p)), y && (h -= p - (p = y._start))), this._tTime = h, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && h && !r && !b && (le(this, "onStart"), this._tTime !== h))
|
|
1244
1244
|
return this;
|
|
1245
1245
|
if (p >= o && n >= 0)
|
|
1246
1246
|
for (m = this._first; m; ) {
|
|
@@ -1260,7 +1260,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1260
1260
|
if (f = m._prev, (m._act || T <= m._end) && m._ts && y !== m) {
|
|
1261
1261
|
if (m.parent !== this)
|
|
1262
1262
|
return this.render(n, r, s);
|
|
1263
|
-
if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K &&
|
|
1263
|
+
if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K && Ii(m)), p !== this._time || !this._ts && !_) {
|
|
1264
1264
|
y = 0, f && (h += this._zTime = T ? -k : k);
|
|
1265
1265
|
break;
|
|
1266
1266
|
}
|
|
@@ -1269,13 +1269,13 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
if (y && !r && (this.pause(), y.render(p >= o ? 0 : -k)._zTime = p >= o ? 1 : -1, this._ts))
|
|
1272
|
-
return this._start =
|
|
1273
|
-
this._onUpdate && !r && le(this, "onUpdate", !0), (h === l && this._tTime >= this.totalDuration() || !h && o) && (
|
|
1272
|
+
return this._start = E, Zt(this), this.render(n, r, s);
|
|
1273
|
+
this._onUpdate && !r && le(this, "onUpdate", !0), (h === l && this._tTime >= this.totalDuration() || !h && o) && (E === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((n || !c) && (h === l && this._ts > 0 || !h && this._ts < 0) && Ie(this, 1), !r && !(n < 0 && !o) && (h || o || !l) && (le(this, h === l && n >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom())));
|
|
1274
1274
|
}
|
|
1275
1275
|
return this;
|
|
1276
1276
|
}, t.add = function(n, r) {
|
|
1277
1277
|
var s = this;
|
|
1278
|
-
if (
|
|
1278
|
+
if (Pe(r) || (r = pe(this, r, n)), !(n instanceof Pt)) {
|
|
1279
1279
|
if (W(n))
|
|
1280
1280
|
return n.forEach(function(o) {
|
|
1281
1281
|
return s.add(o, r);
|
|
@@ -1311,14 +1311,14 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1311
1311
|
}, t.removePause = function(n) {
|
|
1312
1312
|
var r = this._first;
|
|
1313
1313
|
for (n = pe(this, n); r; )
|
|
1314
|
-
r._start === n && r.data === "isPause" &&
|
|
1314
|
+
r._start === n && r.data === "isPause" && Ie(r), r = r._next;
|
|
1315
1315
|
}, t.killTweensOf = function(n, r, s) {
|
|
1316
1316
|
for (var o = this.getTweensOf(n, s), l = o.length; l--; )
|
|
1317
1317
|
Te !== o[l] && o[l].kill(n, r);
|
|
1318
1318
|
return this;
|
|
1319
1319
|
}, t.getTweensOf = function(n, r) {
|
|
1320
|
-
for (var s = [], o = me(n), l = this._first, c =
|
|
1321
|
-
l instanceof H ?
|
|
1320
|
+
for (var s = [], o = me(n), l = this._first, c = Pe(r), h; l; )
|
|
1321
|
+
l instanceof H ? as(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}, t.tweenTo = function(n, r) {
|
|
1324
1324
|
r = r || {};
|
|
@@ -1391,13 +1391,13 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
}, e;
|
|
1394
|
-
})(
|
|
1394
|
+
})(Pt);
|
|
1395
1395
|
ue(q.prototype, {
|
|
1396
1396
|
_lock: 0,
|
|
1397
1397
|
_hasPause: 0,
|
|
1398
1398
|
_forcing: 0
|
|
1399
1399
|
});
|
|
1400
|
-
var
|
|
1400
|
+
var Ds = function(e, t, i, n, r, s, o) {
|
|
1401
1401
|
var l = new ie(this._pt, e, t, 0, 1, pr, null, r), c = 0, h = 0, u, p, m, f, d, g, _, y;
|
|
1402
1402
|
for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = wt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), p = i.match(Wt) || []; u = Wt.exec(n); )
|
|
1403
1403
|
f = u[0], d = n.substring(c, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), f !== p[h++] && (g = parseFloat(p[h - 1]) || 0, l._pt = {
|
|
@@ -1408,13 +1408,13 @@ var Ss = function(e, t, i, n, r, s, o) {
|
|
|
1408
1408
|
c: f.charAt(1) === "=" ? it(g, f) - g : parseFloat(f) - g,
|
|
1409
1409
|
m: m && m < 4 ? Math.round : 0
|
|
1410
1410
|
}, c = Wt.lastIndex);
|
|
1411
|
-
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (
|
|
1411
|
+
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (On.test(n) || _) && (l.e = 0), this._pt = l, l;
|
|
1412
1412
|
}, Li = function(e, t, i, n, r, s, o, l, c, h) {
|
|
1413
1413
|
G(n) && (n = n(r || 0, e, s));
|
|
1414
|
-
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ?
|
|
1414
|
+
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? Ls : ur : Ui, f;
|
|
1415
1415
|
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (X(p) || 0), (f || f === 0) && (n = f))), !h || p !== n || gi)
|
|
1416
|
-
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ?
|
|
1417
|
-
},
|
|
1416
|
+
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Us : dr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Di(t, n), Ds.call(this, e, t, p, n, m, l || he.stringFilter, c));
|
|
1417
|
+
}, Ms = function(e, t, i, n, r) {
|
|
1418
1418
|
if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || W(e) || Mn(e))
|
|
1419
1419
|
return Z(e) ? bt(e, r, t, i, n) : e;
|
|
1420
1420
|
var s = {}, o;
|
|
@@ -1423,15 +1423,15 @@ var Ss = function(e, t, i, n, r, s, o) {
|
|
|
1423
1423
|
return s;
|
|
1424
1424
|
}, lr = function(e, t, i, n, r, s) {
|
|
1425
1425
|
var o, l, c, h;
|
|
1426
|
-
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] :
|
|
1426
|
+
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] : Ms(t[e], n, r, s, i), i, n, s) !== !1 && (i._pt = l = new ie(i._pt, r, e, 0, 1, o.render, o, 0, o.priority), i !== et))
|
|
1427
1427
|
for (c = i._ptLookup[i._targets.indexOf(r)], h = o._props.length; h--; )
|
|
1428
1428
|
c[o._props[h]] = l;
|
|
1429
1429
|
return o;
|
|
1430
1430
|
}, Te, gi, ki = function a(e, t, i) {
|
|
1431
|
-
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !
|
|
1432
|
-
if (
|
|
1433
|
-
if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop],
|
|
1434
|
-
if (
|
|
1431
|
+
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Pi, E = e.timeline, b, C, v, P, w, T, M, A, R, O, B, F, U;
|
|
1432
|
+
if (E && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? rr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !E && !!n.runBackwards, !E || p && !n.stagger) {
|
|
1433
|
+
if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : rs), d._lazy = 0), s) {
|
|
1434
|
+
if (Ie(e._startAt = H.set(g, ue({
|
|
1435
1435
|
data: "isStart",
|
|
1436
1436
|
overwrite: !1,
|
|
1437
1437
|
parent: _,
|
|
@@ -1448,7 +1448,7 @@ var Ss = function(e, t, i, n, r, s, o) {
|
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
1450
|
} else if (h && f && !d) {
|
|
1451
|
-
if (t && (o = !1),
|
|
1451
|
+
if (t && (o = !1), v = ue({
|
|
1452
1452
|
overwrite: !1,
|
|
1453
1453
|
data: "isFromStart",
|
|
1454
1454
|
//we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
|
|
@@ -1458,23 +1458,23 @@ var Ss = function(e, t, i, n, r, s, o) {
|
|
|
1458
1458
|
stagger: 0,
|
|
1459
1459
|
parent: _
|
|
1460
1460
|
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
1461
|
-
},
|
|
1461
|
+
}, b), F && (v[A.prop] = F), Ie(e._startAt = H.set(g, v)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (K ? e._startAt.revert(kt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
|
|
1462
1462
|
a(e._startAt, k, k);
|
|
1463
1463
|
else if (!t)
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f,
|
|
1467
|
-
if (
|
|
1468
|
-
|
|
1466
|
+
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, C = 0; C < g.length; C++) {
|
|
1467
|
+
if (w = g[C], M = w._gsap || Oi(g)[C]._gsap, e._ptLookup[C] = O = {}, ci[M.id] && Re.length && $t(), B = y === g ? C : y.indexOf(w), A && (R = new A()).init(w, F || b, e, B, y) !== !1 && (e._pt = P = new ie(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
|
|
1468
|
+
O[Q] = P;
|
|
1469
1469
|
}), R.priority && (T = 1)), !A || F)
|
|
1470
|
-
for (
|
|
1471
|
-
ae[
|
|
1472
|
-
e._op && e._op[
|
|
1470
|
+
for (v in b)
|
|
1471
|
+
ae[v] && (R = lr(v, b, e, B, w, y)) ? R.priority && (T = 1) : O[v] = P = Li.call(e, w, v, "get", b[v], B, y, 0, n.stringFilter);
|
|
1472
|
+
e._op && e._op[C] && e.kill(w, e._op[C]), x && e._pt && (Te = e, z.killTweensOf(w, O, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[M.id] = 1);
|
|
1473
1473
|
}
|
|
1474
1474
|
T && fr(e), e._onInit && e._onInit(e);
|
|
1475
1475
|
}
|
|
1476
|
-
e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 &&
|
|
1477
|
-
},
|
|
1476
|
+
e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && E.render(fe, !0, !0);
|
|
1477
|
+
}, Rs = function(e, t, i, n, r, s, o, l) {
|
|
1478
1478
|
var c = (e._pt && e._ptCache || (e._ptCache = {}))[t], h, u, p, m;
|
|
1479
1479
|
if (!c)
|
|
1480
1480
|
for (c = e._ptCache[t] = [], p = e._ptLookup, m = e._targets.length; m--; ) {
|
|
@@ -1487,7 +1487,7 @@ var Ss = function(e, t, i, n, r, s, o) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
for (m = c.length; m--; )
|
|
1489
1489
|
u = c[m], h = u._pt || u, h.s = (n || n === 0) && !r ? n : h.s + (n || 0) + s * h.c, h.c = i - h.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = h.s + X(u.b));
|
|
1490
|
-
},
|
|
1490
|
+
}, Os = function(e, t) {
|
|
1491
1491
|
var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
|
|
1492
1492
|
if (!n)
|
|
1493
1493
|
return t;
|
|
@@ -1525,60 +1525,60 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1525
1525
|
function e(i, n, r, s) {
|
|
1526
1526
|
var o;
|
|
1527
1527
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
|
|
1528
|
-
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) || Mn(i) ?
|
|
1529
|
-
if (o._targets = x.length ?
|
|
1530
|
-
if (n = o.vars,
|
|
1528
|
+
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) || Mn(i) ? Pe(i[0]) : "length" in n) ? [i] : me(i), E, b, C, v, P, w, T, M;
|
|
1529
|
+
if (o._targets = x.length ? Oi(x) : Et("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Rt(c) || Rt(h)) {
|
|
1530
|
+
if (n = o.vars, E = o.timeline = new q({
|
|
1531
1531
|
data: "nested",
|
|
1532
1532
|
defaults: d || {},
|
|
1533
1533
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1534
|
-
}),
|
|
1535
|
-
if (
|
|
1536
|
-
for (
|
|
1537
|
-
~hr.indexOf(
|
|
1538
|
-
for (
|
|
1539
|
-
|
|
1540
|
-
|
|
1534
|
+
}), E.kill(), E.parent = E._dp = we(o), E._start = 0, p || Rt(c) || Rt(h)) {
|
|
1535
|
+
if (v = x.length, T = p && Kn(p), Ee(p))
|
|
1536
|
+
for (P in p)
|
|
1537
|
+
~hr.indexOf(P) && (M || (M = {}), M[P] = p[P]);
|
|
1538
|
+
for (b = 0; b < v; b++)
|
|
1539
|
+
C = Bt(n, cr), C.stagger = 0, _ && (C.yoyoEase = _), M && at(C, M), w = x[b], C.duration = +bt(c, we(o), b, w, x), C.delay = (+bt(h, we(o), b, w, x) || 0) - o._delay, !p && v === 1 && C.delay && (o._delay = h = C.delay, o._start += h, C.delay = 0), E.to(w, C, T ? T(b, w, x) : 0), E._ease = D.none;
|
|
1540
|
+
E.duration() ? c = h = 0 : o.timeline = 0;
|
|
1541
1541
|
} else if (f) {
|
|
1542
|
-
yt(ue(
|
|
1542
|
+
yt(ue(E.vars.defaults, {
|
|
1543
1543
|
ease: "none"
|
|
1544
|
-
})),
|
|
1545
|
-
var A = 0, R,
|
|
1544
|
+
})), E._ease = Ye(f.ease || n.ease || "none");
|
|
1545
|
+
var A = 0, R, O, B;
|
|
1546
1546
|
if (W(f))
|
|
1547
1547
|
f.forEach(function(F) {
|
|
1548
|
-
return
|
|
1549
|
-
}),
|
|
1548
|
+
return E.to(x, F, ">");
|
|
1549
|
+
}), E.duration();
|
|
1550
1550
|
else {
|
|
1551
|
-
|
|
1552
|
-
for (
|
|
1553
|
-
|
|
1554
|
-
for (
|
|
1555
|
-
for (R = P
|
|
1551
|
+
C = {};
|
|
1552
|
+
for (P in f)
|
|
1553
|
+
P === "ease" || P === "easeEach" || Is(P, f[P], C, f.easeEach);
|
|
1554
|
+
for (P in C)
|
|
1555
|
+
for (R = C[P].sort(function(F, U) {
|
|
1556
1556
|
return F.t - U.t;
|
|
1557
|
-
}), A = 0,
|
|
1558
|
-
|
|
1559
|
-
ease:
|
|
1560
|
-
duration: (
|
|
1561
|
-
},
|
|
1562
|
-
|
|
1563
|
-
duration: c -
|
|
1557
|
+
}), A = 0, b = 0; b < R.length; b++)
|
|
1558
|
+
O = R[b], B = {
|
|
1559
|
+
ease: O.e,
|
|
1560
|
+
duration: (O.t - (b ? R[b - 1].t : 0)) / 100 * c
|
|
1561
|
+
}, B[P] = O.v, E.to(x, B, A), A += B.duration;
|
|
1562
|
+
E.duration() < c && E.to({}, {
|
|
1563
|
+
duration: c - E.duration()
|
|
1564
1564
|
});
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
|
-
c || o.duration(c =
|
|
1567
|
+
c || o.duration(c = E.duration());
|
|
1568
1568
|
} else
|
|
1569
1569
|
o.timeline = 0;
|
|
1570
|
-
return m === !0 && !
|
|
1570
|
+
return m === !0 && !Pi && (Te = we(o), z.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && cs(we(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && Hn(we(o), g), o;
|
|
1571
1571
|
}
|
|
1572
1572
|
var t = e.prototype;
|
|
1573
1573
|
return t.render = function(n, r, s) {
|
|
1574
|
-
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x,
|
|
1574
|
+
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x, E;
|
|
1575
1575
|
if (!c)
|
|
1576
|
-
|
|
1576
|
+
ds(this, n, r, s);
|
|
1577
1577
|
else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== h || this._lazy) {
|
|
1578
1578
|
if (p = u, x = this.timeline, this._repeat) {
|
|
1579
1579
|
if (d = c + this._rDelay, this._repeat < -1 && h)
|
|
1580
1580
|
return this.totalTime(d * 100 + n, r, s);
|
|
1581
|
-
if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (
|
|
1581
|
+
if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (E = this._yEase, p = c - p), g = ot(this._tTime, d), p === o && !s && this._initted && f === g)
|
|
1582
1582
|
return this._tTime = u, this;
|
|
1583
1583
|
f !== g && (x && this._yEase && sr(x, _), this.vars.repeatRefresh && !_ && !this._lock && p !== d && this._initted && (this._lock = s = 1, this.render(j(d * f), !0).invalidate()._lock = 0));
|
|
1584
1584
|
}
|
|
@@ -1590,11 +1590,11 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1590
1590
|
if (c !== this._dur)
|
|
1591
1591
|
return this.render(n, r, s);
|
|
1592
1592
|
}
|
|
1593
|
-
if (this._tTime = u, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (
|
|
1593
|
+
if (this._tTime = u, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (E || this._ease)(p / c), this._from && (this.ratio = y = 1 - y), !o && u && !r && !g && (le(this, "onStart"), this._tTime !== u))
|
|
1594
1594
|
return this;
|
|
1595
1595
|
for (m = this._pt; m; )
|
|
1596
1596
|
m.r(y, m.d), m = m._next;
|
|
1597
|
-
x && x.render(n < 0 ? n : x._dur * x._ease(p / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (h && ui(this, n, r, s), le(this, "onUpdate")), this._repeat && f !== g && this.vars.onRepeat && !r && this.parent && le(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (h && !this._onUpdate && ui(this, n, !0, !0), (n || !c) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) &&
|
|
1597
|
+
x && x.render(n < 0 ? n : x._dur * x._ease(p / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (h && ui(this, n, r, s), le(this, "onUpdate")), this._repeat && f !== g && this.vars.onRepeat && !r && this.parent && le(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (h && !this._onUpdate && ui(this, n, !0, !0), (n || !c) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && Ie(this, 1), !r && !(h && !o) && (u || o || _) && (le(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
|
|
1598
1598
|
}
|
|
1599
1599
|
return this;
|
|
1600
1600
|
}, t.targets = function() {
|
|
@@ -1602,9 +1602,9 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1602
1602
|
}, t.invalidate = function(n) {
|
|
1603
1603
|
return (!n || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(n), a.prototype.invalidate.call(this, n);
|
|
1604
1604
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1605
|
-
|
|
1605
|
+
Ct || oe.wake(), this._ts || this.play();
|
|
1606
1606
|
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
|
|
1607
|
-
return this._initted || ki(this, c), h = this._ease(c / this._dur),
|
|
1607
|
+
return this._initted || ki(this, c), h = this._ease(c / this._dur), Rs(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Gn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1608
1608
|
}, t.kill = function(n, r) {
|
|
1609
1609
|
if (r === void 0 && (r = "all"), !n && (!r || r === "all"))
|
|
1610
1610
|
return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!K), this;
|
|
@@ -1613,11 +1613,11 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1613
1613
|
return this.timeline.killTweensOf(n, r, Te && Te.vars.overwrite !== !0)._first || mt(this), this.parent && s !== this.timeline.totalDuration() && lt(this, this._dur * this.timeline._tDur / s, 0, 1), this;
|
|
1614
1614
|
}
|
|
1615
1615
|
var o = this._targets, l = n ? me(n) : o, c = this._ptLookup, h = this._pt, u, p, m, f, d, g, _;
|
|
1616
|
-
if ((!r || r === "all") &&
|
|
1616
|
+
if ((!r || r === "all") && ls(o, l))
|
|
1617
1617
|
return r === "all" && (this._pt = 0), mt(this);
|
|
1618
1618
|
for (u = this._op = this._op || [], r !== "all" && (Z(r) && (d = {}, te(r, function(y) {
|
|
1619
1619
|
return d[y] = 1;
|
|
1620
|
-
}), r = d), r =
|
|
1620
|
+
}), r = d), r = Os(o, r)), _ = o.length; _--; )
|
|
1621
1621
|
if (~l.indexOf(o[_])) {
|
|
1622
1622
|
p = c[_], r === "all" ? (u[_] = r, f = p, m = {}) : (m = u[_] = u[_] || {}, f = r);
|
|
1623
1623
|
for (d in f)
|
|
@@ -1647,7 +1647,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1647
1647
|
}, e.killTweensOf = function(n, r, s) {
|
|
1648
1648
|
return z.killTweensOf(n, r, s);
|
|
1649
1649
|
}, e;
|
|
1650
|
-
})(
|
|
1650
|
+
})(Pt);
|
|
1651
1651
|
ue(H.prototype, {
|
|
1652
1652
|
_targets: [],
|
|
1653
1653
|
_lazy: 0,
|
|
@@ -1665,15 +1665,15 @@ var Ui = function(e, t, i) {
|
|
|
1665
1665
|
return e[t] = i;
|
|
1666
1666
|
}, ur = function(e, t, i) {
|
|
1667
1667
|
return e[t](i);
|
|
1668
|
-
},
|
|
1668
|
+
}, Ls = function(e, t, i, n) {
|
|
1669
1669
|
return e[t](n.fp, i);
|
|
1670
|
-
},
|
|
1670
|
+
}, ks = function(e, t, i) {
|
|
1671
1671
|
return e.setAttribute(t, i);
|
|
1672
1672
|
}, Fi = function(e, t) {
|
|
1673
|
-
return G(e[t]) ? ur : Ai(e[t]) && e.setAttribute ?
|
|
1673
|
+
return G(e[t]) ? ur : Ai(e[t]) && e.setAttribute ? ks : Ui;
|
|
1674
1674
|
}, dr = function(e, t) {
|
|
1675
1675
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1676
|
-
},
|
|
1676
|
+
}, Us = function(e, t) {
|
|
1677
1677
|
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1678
1678
|
}, pr = function(e, t) {
|
|
1679
1679
|
var i = t._pt, n = "";
|
|
@@ -1690,14 +1690,14 @@ var Ui = function(e, t, i) {
|
|
|
1690
1690
|
}, Ni = function(e, t) {
|
|
1691
1691
|
for (var i = t._pt; i; )
|
|
1692
1692
|
i.r(e, i.d), i = i._next;
|
|
1693
|
-
},
|
|
1693
|
+
}, Fs = function(e, t, i, n) {
|
|
1694
1694
|
for (var r = this._pt, s; r; )
|
|
1695
1695
|
s = r._next, r.p === n && r.modifier(e, t, i), r = s;
|
|
1696
|
-
},
|
|
1696
|
+
}, Ns = function(e) {
|
|
1697
1697
|
for (var t = this._pt, i, n; t; )
|
|
1698
1698
|
n = t._next, t.p === e && !t.op || t.op === e ? Yt(this, t, "_pt") : t.dep || (i = 1), t = n;
|
|
1699
1699
|
return !i;
|
|
1700
|
-
},
|
|
1700
|
+
}, zs = function(e, t, i, n) {
|
|
1701
1701
|
n.mSet(e, t, n.m.call(n.tween, i, n.mt), n);
|
|
1702
1702
|
}, fr = function(e) {
|
|
1703
1703
|
for (var t = e._pt, i, n, r, s; t; ) {
|
|
@@ -1712,7 +1712,7 @@ var Ui = function(e, t, i) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
var e = a.prototype;
|
|
1714
1714
|
return e.modifier = function(i, n, r) {
|
|
1715
|
-
this.mSet = this.mSet || this.set, this.set =
|
|
1715
|
+
this.mSet = this.mSet || this.set, this.set = zs, this.m = i, this.mt = r, this.tween = n;
|
|
1716
1716
|
}, a;
|
|
1717
1717
|
})();
|
|
1718
1718
|
te(Ri + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(a) {
|
|
@@ -1728,8 +1728,8 @@ z = new q({
|
|
|
1728
1728
|
smoothChildTiming: !0
|
|
1729
1729
|
});
|
|
1730
1730
|
he.stringFilter = nr;
|
|
1731
|
-
var Ze = [], Ft = {},
|
|
1732
|
-
return (Ft[e] ||
|
|
1731
|
+
var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
1732
|
+
return (Ft[e] || $s).map(function(t) {
|
|
1733
1733
|
return t();
|
|
1734
1734
|
});
|
|
1735
1735
|
}, _i = function() {
|
|
@@ -1797,7 +1797,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1797
1797
|
}, e.revert = function(i) {
|
|
1798
1798
|
this.kill(i || {});
|
|
1799
1799
|
}, a;
|
|
1800
|
-
})(),
|
|
1800
|
+
})(), Gs = /* @__PURE__ */ (function() {
|
|
1801
1801
|
function a(t) {
|
|
1802
1802
|
this.contexts = [], this.scope = t, N && N.data.push(this);
|
|
1803
1803
|
}
|
|
@@ -1836,7 +1836,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1836
1836
|
},
|
|
1837
1837
|
getProperty: function(e, t, i, n) {
|
|
1838
1838
|
Z(e) && (e = me(e)[0]);
|
|
1839
|
-
var r = He(e || {}).get, s = i ?
|
|
1839
|
+
var r = He(e || {}).get, s = i ? Bn : $n;
|
|
1840
1840
|
return i === "native" && (i = ""), e && (t ? s((ae[t] && ae[t].get || r)(e, t, i, n)) : function(o, l, c) {
|
|
1841
1841
|
return s((ae[o] && ae[o].get || r)(e, o, l, c));
|
|
1842
1842
|
});
|
|
@@ -1886,10 +1886,10 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1886
1886
|
});
|
|
1887
1887
|
},
|
|
1888
1888
|
registerEase: function(e, t) {
|
|
1889
|
-
|
|
1889
|
+
D[e] = Ye(t);
|
|
1890
1890
|
},
|
|
1891
1891
|
parseEase: function(e, t) {
|
|
1892
|
-
return arguments.length ? Ye(e, t) :
|
|
1892
|
+
return arguments.length ? Ye(e, t) : D;
|
|
1893
1893
|
},
|
|
1894
1894
|
getById: function(e) {
|
|
1895
1895
|
return z.getById(e);
|
|
@@ -1905,7 +1905,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1905
1905
|
return e ? new mr(e, t) : N;
|
|
1906
1906
|
},
|
|
1907
1907
|
matchMedia: function(e) {
|
|
1908
|
-
return new
|
|
1908
|
+
return new Gs(e);
|
|
1909
1909
|
},
|
|
1910
1910
|
matchMediaRefresh: function() {
|
|
1911
1911
|
return Ze.forEach(function(e) {
|
|
@@ -1924,21 +1924,21 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1924
1924
|
n >= 0 && i.splice(n, 1);
|
|
1925
1925
|
},
|
|
1926
1926
|
utils: {
|
|
1927
|
-
wrap:
|
|
1928
|
-
wrapYoyo:
|
|
1927
|
+
wrap: bs,
|
|
1928
|
+
wrapYoyo: Es,
|
|
1929
1929
|
distribute: Kn,
|
|
1930
1930
|
random: Wn,
|
|
1931
1931
|
snap: Xn,
|
|
1932
|
-
normalize:
|
|
1932
|
+
normalize: xs,
|
|
1933
1933
|
getUnit: X,
|
|
1934
|
-
clamp:
|
|
1934
|
+
clamp: ms,
|
|
1935
1935
|
splitColor: tr,
|
|
1936
1936
|
toArray: me,
|
|
1937
1937
|
selector: fi,
|
|
1938
1938
|
mapRange: Qn,
|
|
1939
|
-
pipe:
|
|
1940
|
-
unitize:
|
|
1941
|
-
interpolate:
|
|
1939
|
+
pipe: _s,
|
|
1940
|
+
unitize: ys,
|
|
1941
|
+
interpolate: vs,
|
|
1942
1942
|
shuffle: Zn
|
|
1943
1943
|
},
|
|
1944
1944
|
install: kn,
|
|
@@ -1952,7 +1952,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1952
1952
|
globals: Un,
|
|
1953
1953
|
Tween: H,
|
|
1954
1954
|
Timeline: q,
|
|
1955
|
-
Animation:
|
|
1955
|
+
Animation: Pt,
|
|
1956
1956
|
getCache: He,
|
|
1957
1957
|
_removeLinkedListItem: Yt,
|
|
1958
1958
|
reverting: function() {
|
|
@@ -1962,7 +1962,7 @@ var Ze = [], Ft = {}, zs = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1962
1962
|
return e && N && (N.data.push(e), e._ctx = N), N;
|
|
1963
1963
|
},
|
|
1964
1964
|
suppressOverwrites: function(e) {
|
|
1965
|
-
return
|
|
1965
|
+
return Pi = e;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
};
|
|
@@ -1973,15 +1973,15 @@ oe.add(q.updateRoot);
|
|
|
1973
1973
|
et = Vt.to({}, {
|
|
1974
1974
|
duration: 0
|
|
1975
1975
|
});
|
|
1976
|
-
var
|
|
1976
|
+
var Vs = function(e, t) {
|
|
1977
1977
|
for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
|
|
1978
1978
|
i = i._next;
|
|
1979
1979
|
return i;
|
|
1980
|
-
},
|
|
1980
|
+
}, Hs = function(e, t) {
|
|
1981
1981
|
var i = e._targets, n, r, s;
|
|
1982
1982
|
for (n in t)
|
|
1983
1983
|
for (r = i.length; r--; )
|
|
1984
|
-
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s =
|
|
1984
|
+
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Vs(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
|
|
1985
1985
|
}, ii = function(e, t) {
|
|
1986
1986
|
return {
|
|
1987
1987
|
name: e,
|
|
@@ -1999,7 +1999,7 @@ var Gs = function(e, t) {
|
|
|
1999
1999
|
l[c] = t(r[c]);
|
|
2000
2000
|
r = l;
|
|
2001
2001
|
}
|
|
2002
|
-
|
|
2002
|
+
Hs(o, r);
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
@@ -2026,90 +2026,90 @@ var Gs = function(e, t) {
|
|
|
2026
2026
|
H.version = q.version = re.version = "3.13.0";
|
|
2027
2027
|
Ln = 1;
|
|
2028
2028
|
Ti() && ht();
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
var rn, Se, nt, zi, Ge, sn,
|
|
2029
|
+
D.Power0;
|
|
2030
|
+
D.Power1;
|
|
2031
|
+
D.Power2;
|
|
2032
|
+
D.Power3;
|
|
2033
|
+
D.Power4;
|
|
2034
|
+
D.Linear;
|
|
2035
|
+
D.Quad;
|
|
2036
|
+
D.Cubic;
|
|
2037
|
+
D.Quart;
|
|
2038
|
+
D.Quint;
|
|
2039
|
+
D.Strong;
|
|
2040
|
+
D.Elastic;
|
|
2041
|
+
D.Back;
|
|
2042
|
+
D.SteppedEase;
|
|
2043
|
+
D.Bounce;
|
|
2044
|
+
D.Sine;
|
|
2045
|
+
D.Expo;
|
|
2046
|
+
D.Circ;
|
|
2047
|
+
var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
2048
2048
|
return typeof window < "u";
|
|
2049
|
-
}, Ae = {},
|
|
2049
|
+
}, Ae = {}, $e = 180 / Math.PI, rt = Math.PI / 180, We = Math.atan2, an = 1e8, Bi = /([A-Z])/g, Ys = /(left|right|width|margin|padding|x)/i, Zs = /[\s,\(]\S/, xe = {
|
|
2050
2050
|
autoAlpha: "opacity,visibility",
|
|
2051
2051
|
scale: "scaleX,scaleY",
|
|
2052
2052
|
alpha: "opacity"
|
|
2053
2053
|
}, yi = function(e, t) {
|
|
2054
2054
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2055
|
-
}, Zs = function(e, t) {
|
|
2056
|
-
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2057
2055
|
}, Ks = function(e, t) {
|
|
2058
|
-
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u
|
|
2056
|
+
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2059
2057
|
}, Xs = function(e, t) {
|
|
2058
|
+
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
2059
|
+
}, Ws = function(e, t) {
|
|
2060
2060
|
var i = t.s + t.c * e;
|
|
2061
2061
|
t.set(t.t, t.p, ~~(i + (i < 0 ? -0.5 : 0.5)) + t.u, t);
|
|
2062
2062
|
}, gr = function(e, t) {
|
|
2063
2063
|
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
2064
2064
|
}, _r = function(e, t) {
|
|
2065
2065
|
return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
|
|
2066
|
-
}, Ws = function(e, t, i) {
|
|
2067
|
-
return e.style[t] = i;
|
|
2068
2066
|
}, qs = function(e, t, i) {
|
|
2069
|
-
return e.style
|
|
2067
|
+
return e.style[t] = i;
|
|
2070
2068
|
}, Qs = function(e, t, i) {
|
|
2071
|
-
return e.
|
|
2069
|
+
return e.style.setProperty(t, i);
|
|
2072
2070
|
}, Js = function(e, t, i) {
|
|
2071
|
+
return e._gsap[t] = i;
|
|
2072
|
+
}, ea = function(e, t, i) {
|
|
2073
2073
|
return e._gsap.scaleX = e._gsap.scaleY = i;
|
|
2074
|
-
},
|
|
2074
|
+
}, ta = function(e, t, i, n, r) {
|
|
2075
2075
|
var s = e._gsap;
|
|
2076
2076
|
s.scaleX = s.scaleY = i, s.renderTransform(r, s);
|
|
2077
|
-
},
|
|
2077
|
+
}, ia = function(e, t, i, n, r) {
|
|
2078
2078
|
var s = e._gsap;
|
|
2079
2079
|
s[t] = i, s.renderTransform(r, s);
|
|
2080
|
-
},
|
|
2080
|
+
}, $ = "transform", ne = $ + "Origin", na = function a(e, t) {
|
|
2081
2081
|
var i = this, n = this.target, r = n.style, s = n._gsap;
|
|
2082
2082
|
if (e in Ae && r) {
|
|
2083
2083
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
2084
2084
|
e = xe[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
|
|
2085
|
-
return i.tfm[o] =
|
|
2086
|
-
}) : this.tfm[e] = s.x ? s[e] :
|
|
2085
|
+
return i.tfm[o] = Ce(n, o);
|
|
2086
|
+
}) : this.tfm[e] = s.x ? s[e] : Ce(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
|
|
2087
2087
|
else
|
|
2088
2088
|
return xe.transform.split(",").forEach(function(o) {
|
|
2089
2089
|
return a.call(i, o, t);
|
|
2090
2090
|
});
|
|
2091
|
-
if (this.props.indexOf(
|
|
2091
|
+
if (this.props.indexOf($) >= 0)
|
|
2092
2092
|
return;
|
|
2093
|
-
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e =
|
|
2093
|
+
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = $;
|
|
2094
2094
|
}
|
|
2095
2095
|
(r || t) && this.props.push(e, t, r[e]);
|
|
2096
2096
|
}, yr = function(e) {
|
|
2097
2097
|
e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate"));
|
|
2098
|
-
},
|
|
2098
|
+
}, ra = function() {
|
|
2099
2099
|
var e = this.props, t = this.target, i = t.style, n = t._gsap, r, s;
|
|
2100
2100
|
for (r = 0; r < e.length; r += 3)
|
|
2101
|
-
e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace(
|
|
2101
|
+
e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace(Bi, "-$1").toLowerCase());
|
|
2102
2102
|
if (this.tfm) {
|
|
2103
2103
|
for (s in this.tfm)
|
|
2104
2104
|
n[s] = this.tfm[s];
|
|
2105
|
-
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r =
|
|
2105
|
+
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = $i(), (!r || !r.isStart) && !i[$] && (yr(i), n.zOrigin && i[ne] && (i[ne] += " " + n.zOrigin + "px", n.zOrigin = 0, n.renderTransform()), n.uncache = 1);
|
|
2106
2106
|
}
|
|
2107
2107
|
}, xr = function(e, t) {
|
|
2108
2108
|
var i = {
|
|
2109
2109
|
target: e,
|
|
2110
2110
|
props: [],
|
|
2111
|
-
revert:
|
|
2112
|
-
save:
|
|
2111
|
+
revert: ra,
|
|
2112
|
+
save: na
|
|
2113
2113
|
};
|
|
2114
2114
|
return e._gsap || re.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(n) {
|
|
2115
2115
|
return i.save(n);
|
|
@@ -2119,7 +2119,7 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2119
2119
|
return i && i.style ? i : Se.createElement(e);
|
|
2120
2120
|
}, ge = function a(e, t, i) {
|
|
2121
2121
|
var n = getComputedStyle(e);
|
|
2122
|
-
return n[t] || n.getPropertyValue(t.replace(
|
|
2122
|
+
return n[t] || n.getPropertyValue(t.replace(Bi, "-$1").toLowerCase()) || n.getPropertyValue(t) || !i && a(e, ct(t) || t, 1) || "";
|
|
2123
2123
|
}, on = "O,Moz,ms,Ms,Webkit".split(","), ct = function(e, t, i) {
|
|
2124
2124
|
var n = t || Ge, r = n.style, s = 5;
|
|
2125
2125
|
if (e in r && !i)
|
|
@@ -2128,9 +2128,9 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2128
2128
|
;
|
|
2129
2129
|
return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? on[s] : "") + e;
|
|
2130
2130
|
}, bi = function() {
|
|
2131
|
-
|
|
2131
|
+
js() && window.document && (rn = window, Se = rn.document, nt = Se.documentElement, Ge = xi("div") || {
|
|
2132
2132
|
style: {}
|
|
2133
|
-
}, xi("div"),
|
|
2133
|
+
}, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", br = !!ct("perspective"), $i = re.core.reverting, zi = 1);
|
|
2134
2134
|
}, ln = function(e) {
|
|
2135
2135
|
var t = e.ownerSVGElement, i = xi("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), n = e.cloneNode(!0), r;
|
|
2136
2136
|
n.style.display = "block", i.appendChild(n), nt.appendChild(i);
|
|
@@ -2161,7 +2161,7 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2161
2161
|
}, Ke = function(e, t) {
|
|
2162
2162
|
if (t) {
|
|
2163
2163
|
var i = e.style, n;
|
|
2164
|
-
t in Ae && t !== ne && (t =
|
|
2164
|
+
t in Ae && t !== ne && (t = $), i.removeProperty ? (n = t.substr(0, 2), (n === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(n === "--" ? t : t.replace(Bi, "-$1").toLowerCase())) : i.removeAttribute(t);
|
|
2165
2165
|
}
|
|
2166
2166
|
}, De = function(e, t, i, n, r, s) {
|
|
2167
2167
|
var o = new ie(e._pt, t, i, 0, 1, s ? _r : gr);
|
|
@@ -2170,11 +2170,11 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2170
2170
|
deg: 1,
|
|
2171
2171
|
rad: 1,
|
|
2172
2172
|
turn: 1
|
|
2173
|
-
},
|
|
2173
|
+
}, sa = {
|
|
2174
2174
|
grid: 1,
|
|
2175
2175
|
flex: 1
|
|
2176
2176
|
}, Le = function a(e, t, i, n) {
|
|
2177
|
-
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l =
|
|
2177
|
+
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l = Ys.test(t), c = e.tagName.toLowerCase() === "svg", h = (c ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, p = n === "px", m = n === "%", f, d, g, _;
|
|
2178
2178
|
if (n === s || !r || cn[n] || cn[s])
|
|
2179
2179
|
return r;
|
|
2180
2180
|
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && vr(e), (m || s === "%") && (Ae[t] || ~t.indexOf("adius")))
|
|
@@ -2185,20 +2185,20 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2185
2185
|
var y = e.style[t];
|
|
2186
2186
|
e.style[t] = u + n, f = e[h], y ? e.style[t] = y : Ke(e, t);
|
|
2187
2187
|
} else
|
|
2188
|
-
(m || s === "%") && !
|
|
2188
|
+
(m || s === "%") && !sa[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
|
|
2189
2189
|
return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
|
|
2190
|
-
},
|
|
2190
|
+
}, Ce = function(e, t, i, n) {
|
|
2191
2191
|
var r;
|
|
2192
2192
|
return zi || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Ae[t] && t !== "transform" ? (r = Tt(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || Nn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Le(e, t, r, i) + i : r;
|
|
2193
|
-
},
|
|
2193
|
+
}, aa = function(e, t, i, n) {
|
|
2194
2194
|
if (!i || i === "none") {
|
|
2195
2195
|
var r = ct(t, e, 1), s = r && ge(e, r, 1);
|
|
2196
2196
|
s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ge(e, "borderTopColor"));
|
|
2197
2197
|
}
|
|
2198
|
-
var o = new ie(this._pt, e.style, t, 0, 1, pr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x,
|
|
2199
|
-
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n], nr(h), i = h[0], n = h[1], p = i.match(Je) || [],
|
|
2198
|
+
var o = new ie(this._pt, e.style, t, 0, 1, pr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, E, b;
|
|
2199
|
+
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n], nr(h), i = h[0], n = h[1], p = i.match(Je) || [], b = n.match(Je) || [], b.length) {
|
|
2200
2200
|
for (; u = Je.exec(n); )
|
|
2201
|
-
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0,
|
|
2201
|
+
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, E = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + E), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || E, l === n.length && (n += x, o.e += x)), E !== x && (m = Le(e, t, d, x) || 0), o._pt = {
|
|
2202
2202
|
_next: o._pt,
|
|
2203
2203
|
p: y || c === 1 ? y : ",",
|
|
2204
2204
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
@@ -2209,30 +2209,30 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2209
2209
|
o.c = l < n.length ? n.substring(l, n.length) : "";
|
|
2210
2210
|
} else
|
|
2211
2211
|
o.r = t === "display" && n === "none" ? _r : gr;
|
|
2212
|
-
return
|
|
2212
|
+
return On.test(n) && (o.e = 0), this._pt = o, o;
|
|
2213
2213
|
}, un = {
|
|
2214
2214
|
top: "0%",
|
|
2215
2215
|
bottom: "100%",
|
|
2216
2216
|
left: "0%",
|
|
2217
2217
|
right: "100%",
|
|
2218
2218
|
center: "50%"
|
|
2219
|
-
},
|
|
2219
|
+
}, oa = function(e) {
|
|
2220
2220
|
var t = e.split(" "), i = t[0], n = t[1] || "50%";
|
|
2221
2221
|
return (i === "top" || i === "bottom" || n === "left" || n === "right") && (e = i, i = n, n = e), t[0] = un[i] || i, t[1] = un[n] || n, t.join(" ");
|
|
2222
|
-
},
|
|
2222
|
+
}, la = function(e, t) {
|
|
2223
2223
|
if (t.tween && t.tween._time === t.tween._dur) {
|
|
2224
2224
|
var i = t.t, n = i.style, r = t.u, s = i._gsap, o, l, c;
|
|
2225
2225
|
if (r === "all" || r === !0)
|
|
2226
2226
|
n.cssText = "", l = 1;
|
|
2227
2227
|
else
|
|
2228
2228
|
for (r = r.split(","), c = r.length; --c > -1; )
|
|
2229
|
-
o = r[c], Ae[o] && (l = 1, o = o === "transformOrigin" ? ne :
|
|
2230
|
-
l && (Ke(i,
|
|
2229
|
+
o = r[c], Ae[o] && (l = 1, o = o === "transformOrigin" ? ne : $), Ke(i, o);
|
|
2230
|
+
l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", Tt(i, 1), s.uncache = 1, yr(n)));
|
|
2231
2231
|
}
|
|
2232
2232
|
}, Ht = {
|
|
2233
2233
|
clearProps: function(e, t, i, n, r) {
|
|
2234
2234
|
if (r.data !== "isFromStart") {
|
|
2235
|
-
var s = e._pt = new ie(e._pt, t, i, 0, 0,
|
|
2235
|
+
var s = e._pt = new ie(e._pt, t, i, 0, 0, la);
|
|
2236
2236
|
return s.u = n, s.pr = -10, s.tween = r, e._props.push(i), 1;
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
@@ -2299,50 +2299,50 @@ var rn, Se, nt, zi, Ge, sn, Bi, Hs = function() {
|
|
|
2299
2299
|
return 1;
|
|
2300
2300
|
}
|
|
2301
2301
|
*/
|
|
2302
|
-
}, At = [1, 0, 0, 1, 0, 0], wr = {},
|
|
2302
|
+
}, At = [1, 0, 0, 1, 0, 0], wr = {}, Cr = function(e) {
|
|
2303
2303
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
2304
2304
|
}, dn = function(e) {
|
|
2305
|
-
var t = ge(e,
|
|
2306
|
-
return
|
|
2305
|
+
var t = ge(e, $);
|
|
2306
|
+
return Cr(t) ? At : t.substr(7).match(Rn).map(V);
|
|
2307
2307
|
}, Gi = function(e, t) {
|
|
2308
2308
|
var i = e._gsap || He(e), n = e.style, r = dn(e), s, o, l, c;
|
|
2309
2309
|
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = dn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
2310
2310
|
}, Ei = function(e, t, i, n, r, s) {
|
|
2311
|
-
var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "),
|
|
2312
|
-
i ? l !== At && (
|
|
2311
|
+
var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), E = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, C, v, P, w;
|
|
2312
|
+
i ? l !== At && (v = m * g - f * d) && (P = E * (g / v) + b * (-d / v) + (d * y - g * _) / v, w = E * (-f / v) + b * (m / v) - (m * y - f * _) / v, E = P, b = w) : (C = Er(e), E = C.x + (~x[0].indexOf("%") ? E / 100 * C.width : E), b = C.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * C.height : b)), n || n !== !1 && o.smooth ? (_ = E - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = E, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, E), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", E + " " + b);
|
|
2313
2313
|
}, Tt = function(e, t) {
|
|
2314
2314
|
var i = e._gsap || new or(e);
|
|
2315
2315
|
if ("x" in i && !t && !i.uncache)
|
|
2316
2316
|
return i;
|
|
2317
|
-
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x,
|
|
2318
|
-
return h = u = p = d = g = _ = y = x =
|
|
2317
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, E, b, C, v, P, w, T, M, A, R, O, B, F, U, Q, ut, dt, pt, Ue, ji, ve, Fe;
|
|
2318
|
+
return h = u = p = d = g = _ = y = x = E = 0, m = f = 1, i.svg = !!(e.getCTM && vr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), v = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), Ei(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, v)), b = i.xOrigin || 0, C = i.yOrigin || 0, v !== At && (M = v[0], A = v[1], R = v[2], O = v[3], h = B = v[4], u = F = v[5], v.length === 6 ? (m = Math.sqrt(M * M + A * A), f = Math.sqrt(O * O + R * R), d = M || A ? We(A, M) * $e : 0, y = R || O ? We(R, O) * $e + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * M + C * R), u -= C - (b * A + C * O))) : (Fe = v[6], ji = v[7], dt = v[8], pt = v[9], Ue = v[10], ve = v[11], h = v[12], u = v[13], p = v[14], P = We(Fe, Ue), g = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = B * w + dt * T, Q = F * w + pt * T, ut = Fe * w + Ue * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Ue = Fe * -T + Ue * w, ve = ji * -T + ve * w, B = U, F = Q, Fe = ut), P = We(-R, Ue), _ = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = M * w - dt * T, Q = A * w - pt * T, ut = R * w - Ue * T, ve = O * T + ve * w, M = U, A = Q, R = ut), P = We(A, M), d = P * $e, P && (w = Math.cos(P), T = Math.sin(P), U = M * w + A * T, Q = B * w + F * T, A = A * w - M * T, F = F * w - B * T, M = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(M * M + A * A + R * R)), f = V(Math.sqrt(F * F + Fe * Fe)), P = We(B, F), y = Math.abs(P) > 2e-4 ? P * $e : 0, E = ve ? 1 / (ve < 0 ? -ve : ve) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Cr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = E + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? ca : br ? Pr : ha, i.uncache = 0, i;
|
|
2319
2319
|
}, jt = function(e) {
|
|
2320
2320
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
2321
2321
|
}, ni = function(e, t, i) {
|
|
2322
2322
|
var n = X(t);
|
|
2323
2323
|
return V(parseFloat(t) + parseFloat(Le(e, "x", i + "px", n))) + n;
|
|
2324
|
-
}, la = function(e, t) {
|
|
2325
|
-
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Cr(e, t);
|
|
2326
|
-
}, Ne = "0deg", ft = "0px", ze = ") ", Cr = function(e, t) {
|
|
2327
|
-
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, b = "", E = _ === "auto" && e && e !== 1 || _ === !0;
|
|
2328
|
-
if (x && (u !== Ne || h !== Ne)) {
|
|
2329
|
-
var P = parseFloat(h) * rt, w = Math.sin(P), C = Math.cos(P), v;
|
|
2330
|
-
P = parseFloat(u) * rt, v = Math.cos(P), s = ni(y, s, w * v * -x), o = ni(y, o, -Math.sin(P) * -x), l = ni(y, l, C * v * -x + x);
|
|
2331
|
-
}
|
|
2332
|
-
g !== ft && (b += "perspective(" + g + ze), (n || r) && (b += "translate(" + n + "%, " + r + "%) "), (E || s !== ft || o !== ft || l !== ft) && (b += l !== ft || E ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + ze), c !== Ne && (b += "rotate(" + c + ze), h !== Ne && (b += "rotateY(" + h + ze), u !== Ne && (b += "rotateX(" + u + ze), (p !== Ne || m !== Ne) && (b += "skew(" + p + ", " + m + ze), (f !== 1 || d !== 1) && (b += "scale(" + f + ", " + d + ze), y.style[B] = b || "translate(0, 0)";
|
|
2333
2324
|
}, ha = function(e, t) {
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2325
|
+
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Pr(e, t);
|
|
2326
|
+
}, Ne = "0deg", ft = "0px", ze = ") ", Pr = function(e, t) {
|
|
2327
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, E = "", b = _ === "auto" && e && e !== 1 || _ === !0;
|
|
2328
|
+
if (x && (u !== Ne || h !== Ne)) {
|
|
2329
|
+
var C = parseFloat(h) * rt, v = Math.sin(C), P = Math.cos(C), w;
|
|
2330
|
+
C = parseFloat(u) * rt, w = Math.cos(C), s = ni(y, s, v * w * -x), o = ni(y, o, -Math.sin(C) * -x), l = ni(y, l, P * w * -x + x);
|
|
2331
|
+
}
|
|
2332
|
+
g !== ft && (E += "perspective(" + g + ze), (n || r) && (E += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (E += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + ze), c !== Ne && (E += "rotate(" + c + ze), h !== Ne && (E += "rotateY(" + h + ze), u !== Ne && (E += "rotateX(" + u + ze), (p !== Ne || m !== Ne) && (E += "skew(" + p + ", " + m + ze), (f !== 1 || d !== 1) && (E += "scale(" + f + ", " + d + ze), y.style[$] = E || "translate(0, 0)";
|
|
2333
|
+
}, ca = function(e, t) {
|
|
2334
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), E = parseFloat(o), b, C, v, P, w;
|
|
2335
|
+
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, C = Math.sin(l) * u, v = Math.sin(l - c) * -p, P = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), v *= w, P *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, C *= w)), b = V(b), C = V(C), v = V(v), P = V(P)) : (b = u, P = p, C = v = 0), (x && !~(s + "").indexOf("px") || E && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), E = Le(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * v) + g), E = V(E + d - (f * C + d * P) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), E = V(E + r / 100 * w.height)), w = "matrix(" + b + "," + C + "," + v + "," + P + "," + x + "," + E + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
|
|
2336
|
+
}, ua = function(e, t, i, n, r) {
|
|
2337
|
+
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? $e : 1), c = l - n, h = n + c + "deg", u, p;
|
|
2338
|
+
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * an) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * an) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Ks), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
2339
2339
|
}, pn = function(e, t) {
|
|
2340
2340
|
for (var i in t)
|
|
2341
2341
|
e[i] = t[i];
|
|
2342
2342
|
return e;
|
|
2343
|
-
},
|
|
2343
|
+
}, da = function(e, t, i) {
|
|
2344
2344
|
var n = pn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, c, h, u, p, m, f;
|
|
2345
|
-
n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[
|
|
2345
|
+
n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[$] = t, o = Tt(i, 1), Ke(i, $), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[$], s[$] = t, o = Tt(i, 1), s[$] = c);
|
|
2346
2346
|
for (l in Ae)
|
|
2347
2347
|
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m = X(c), f = X(h), u = m !== f ? Le(i, l, c, f) : parseFloat(c), p = parseFloat(h), e._pt = new ie(e._pt, o, l, u, p - u, yi), e._pt.u = f || 0, e._props.push(l));
|
|
2348
2348
|
pn(o, n);
|
|
@@ -2355,7 +2355,7 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
2355
2355
|
var p, m;
|
|
2356
2356
|
if (arguments.length < 4)
|
|
2357
2357
|
return p = s.map(function(f) {
|
|
2358
|
-
return
|
|
2358
|
+
return Ce(o, f, c);
|
|
2359
2359
|
}), m = p.join(" "), m.split(p[0]).length === 5 ? p[0] : m;
|
|
2360
2360
|
p = (h + "").split(" "), m = {}, s.forEach(function(f, d) {
|
|
2361
2361
|
return m[f] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
@@ -2369,65 +2369,65 @@ var Ar = {
|
|
|
2369
2369
|
return e.style && e.nodeType;
|
|
2370
2370
|
},
|
|
2371
2371
|
init: function(e, t, i, n, r) {
|
|
2372
|
-
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x,
|
|
2373
|
-
zi || bi(), this.styles = this.styles || xr(e),
|
|
2372
|
+
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, E, b, C, v, P;
|
|
2373
|
+
zi || bi(), this.styles = this.styles || xr(e), P = this.styles.props, this.tween = i;
|
|
2374
2374
|
for (d in t)
|
|
2375
2375
|
if (d !== "autoRound" && (h = t[d], !(ae[d] && lr(d, t, i, n, e, r)))) {
|
|
2376
2376
|
if (m = typeof h, f = Ht[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
|
|
2377
|
-
f(this, e, d, h, i) && (
|
|
2377
|
+
f(this, e, d, h, i) && (v = 1);
|
|
2378
2378
|
else if (d.substr(0, 2) === "--")
|
|
2379
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "",
|
|
2379
|
+
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = X(c), _ = X(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), P.push(d, 0, o[d]);
|
|
2380
2380
|
else if (m !== "undefined") {
|
|
2381
|
-
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(
|
|
2382
|
-
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)),
|
|
2383
|
-
this._pt = new ie(this._pt,
|
|
2381
|
+
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), X(c + "") || c === "auto" || (c += he.units[d] || X(Ce(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Ce(e, d))) : c = Ce(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in xe && (d === "autoAlpha" && (p === 1 && Ce(e, "visibility") === "hidden" && u && (p = 0), P.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = xe[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Ae, x) {
|
|
2382
|
+
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), E || (b = e._gsap, b.renderTransform && !t.parseTransform || Tt(e, t.parseTransform), C = t.smoothOrigin !== !1 && b.smooth, E = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), E.dep = 1), d === "scale")
|
|
2383
|
+
this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
2384
2384
|
else if (d === "transformOrigin") {
|
|
2385
|
-
|
|
2385
|
+
P.push(ne, 0, o[ne]), h = oa(h), b.svg ? Ei(e, h, 0, C, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
|
|
2386
2386
|
continue;
|
|
2387
2387
|
} else if (d === "svgOrigin") {
|
|
2388
|
-
Ei(e, h, 1,
|
|
2388
|
+
Ei(e, h, 1, C, 0, this);
|
|
2389
2389
|
continue;
|
|
2390
2390
|
} else if (d in wr) {
|
|
2391
|
-
|
|
2391
|
+
ua(this, b, d, p, y ? it(p, y + h) : h);
|
|
2392
2392
|
continue;
|
|
2393
2393
|
} else if (d === "smoothOrigin") {
|
|
2394
|
-
De(this,
|
|
2394
|
+
De(this, b, "smooth", b.smooth, h);
|
|
2395
2395
|
continue;
|
|
2396
2396
|
} else if (d === "force3D") {
|
|
2397
|
-
|
|
2397
|
+
b[d] = h;
|
|
2398
2398
|
continue;
|
|
2399
2399
|
} else if (d === "transform") {
|
|
2400
|
-
|
|
2400
|
+
da(this, h, e);
|
|
2401
2401
|
continue;
|
|
2402
2402
|
}
|
|
2403
2403
|
} else d in o || (d = ct(d) || d);
|
|
2404
|
-
if (x || (u || u === 0) && (p || p === 0) && !
|
|
2405
|
-
g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ?
|
|
2404
|
+
if (x || (u || u === 0) && (p || p === 0) && !Zs.test(h) && d in o)
|
|
2405
|
+
g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? b : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Ws : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Xs);
|
|
2406
2406
|
else if (d in o)
|
|
2407
|
-
|
|
2407
|
+
aa.call(this, e, d, c, y ? y + h : h);
|
|
2408
2408
|
else if (d in e)
|
|
2409
2409
|
this.add(e, d, c || e[d], y ? y + h : h, n, r);
|
|
2410
2410
|
else if (d !== "parseTransform") {
|
|
2411
2411
|
Di(d, h);
|
|
2412
2412
|
continue;
|
|
2413
2413
|
}
|
|
2414
|
-
x || (d in o ?
|
|
2414
|
+
x || (d in o ? P.push(d, 0, o[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, c || e[d])), s.push(d);
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
|
|
2417
|
+
v && fr(this);
|
|
2418
2418
|
},
|
|
2419
2419
|
render: function(e, t) {
|
|
2420
|
-
if (t.tween._time ||
|
|
2420
|
+
if (t.tween._time || !$i())
|
|
2421
2421
|
for (var i = t._pt; i; )
|
|
2422
2422
|
i.r(e, i.d), i = i._next;
|
|
2423
2423
|
else
|
|
2424
2424
|
t.styles.revert();
|
|
2425
2425
|
},
|
|
2426
|
-
get:
|
|
2426
|
+
get: Ce,
|
|
2427
2427
|
aliases: xe,
|
|
2428
2428
|
getSetter: function(e, t, i) {
|
|
2429
2429
|
var n = xe[t];
|
|
2430
|
-
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x ||
|
|
2430
|
+
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Ce(e, "x")) ? i && sn === i ? t === "scale" ? ea : Js : (sn = i || {}) && (t === "scale" ? ta : ia) : e.style && !Ai(e.style[t]) ? qs : ~t.indexOf("-") ? Qs : Fi(e, t);
|
|
2431
2431
|
},
|
|
2432
2432
|
core: {
|
|
2433
2433
|
_removeProperty: Ke,
|
|
@@ -2679,7 +2679,7 @@ class be {
|
|
|
2679
2679
|
this.listen(!1), this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
class
|
|
2682
|
+
class pa extends be {
|
|
2683
2683
|
constructor(e, t, i) {
|
|
2684
2684
|
super(e, t, i, "lil-boolean", "label"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "checkbox"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$input.addEventListener("change", () => {
|
|
2685
2685
|
this.setValue(this.$input.checked), this._callOnFinishChange();
|
|
@@ -2693,7 +2693,7 @@ function vi(a) {
|
|
|
2693
2693
|
let e, t;
|
|
2694
2694
|
return (e = a.match(/(#|0x)?([a-f0-9]{6})/i)) ? t = e[2] : (e = a.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? t = parseInt(e[1]).toString(16).padStart(2, 0) + parseInt(e[2]).toString(16).padStart(2, 0) + parseInt(e[3]).toString(16).padStart(2, 0) : (e = a.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (t = e[1] + e[1] + e[2] + e[2] + e[3] + e[3]), t ? "#" + t : !1;
|
|
2695
2695
|
}
|
|
2696
|
-
const
|
|
2696
|
+
const fa = {
|
|
2697
2697
|
isPrimitive: !0,
|
|
2698
2698
|
match: (a) => typeof a == "string",
|
|
2699
2699
|
fromHexString: vi,
|
|
@@ -2703,7 +2703,7 @@ const pa = {
|
|
|
2703
2703
|
match: (a) => typeof a == "number",
|
|
2704
2704
|
fromHexString: (a) => parseInt(a.substring(1), 16),
|
|
2705
2705
|
toHexString: (a) => "#" + a.toString(16).padStart(6, 0)
|
|
2706
|
-
},
|
|
2706
|
+
}, ma = {
|
|
2707
2707
|
isPrimitive: !1,
|
|
2708
2708
|
match: (a) => Array.isArray(a) || ArrayBuffer.isView(a),
|
|
2709
2709
|
fromHexString(a, e, t = 1) {
|
|
@@ -2715,7 +2715,7 @@ const pa = {
|
|
|
2715
2715
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2716
2716
|
return St.toHexString(n);
|
|
2717
2717
|
}
|
|
2718
|
-
},
|
|
2718
|
+
}, ga = {
|
|
2719
2719
|
isPrimitive: !1,
|
|
2720
2720
|
match: (a) => Object(a) === a,
|
|
2721
2721
|
fromHexString(a, e, t = 1) {
|
|
@@ -2727,13 +2727,13 @@ const pa = {
|
|
|
2727
2727
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2728
2728
|
return St.toHexString(n);
|
|
2729
2729
|
}
|
|
2730
|
-
},
|
|
2731
|
-
function
|
|
2732
|
-
return
|
|
2730
|
+
}, _a = [fa, St, ma, ga];
|
|
2731
|
+
function ya(a) {
|
|
2732
|
+
return _a.find((e) => e.match(a));
|
|
2733
2733
|
}
|
|
2734
|
-
class
|
|
2734
|
+
class xa extends be {
|
|
2735
2735
|
constructor(e, t, i, n) {
|
|
2736
|
-
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format =
|
|
2736
|
+
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format = ya(this.initialValue), this._rgbScale = n, this._initialValueHexString = this.save(), this._textFocused = !1, this.$input.addEventListener("input", () => {
|
|
2737
2737
|
this._setValueFromHexString(this.$input.value);
|
|
2738
2738
|
}), this.$input.addEventListener("blur", () => {
|
|
2739
2739
|
this._callOnFinishChange();
|
|
@@ -2774,7 +2774,7 @@ class ri extends be {
|
|
|
2774
2774
|
}, { passive: !0 }), this.$disable = this.$button;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
class
|
|
2777
|
+
class ba extends be {
|
|
2778
2778
|
constructor(e, t, i, n, r, s) {
|
|
2779
2779
|
super(e, t, i, "lil-number"), this._initInput(), this.min(n), this.max(r);
|
|
2780
2780
|
const o = s !== void 0;
|
|
@@ -2818,8 +2818,8 @@ class xa extends be {
|
|
|
2818
2818
|
o = y.clientX, l = c = y.clientY, s = !0, h = this.getValue(), u = 0, window.addEventListener("mousemove", f), window.addEventListener("mouseup", d);
|
|
2819
2819
|
}, f = (y) => {
|
|
2820
2820
|
if (s) {
|
|
2821
|
-
const x = y.clientX - o,
|
|
2822
|
-
Math.abs(
|
|
2821
|
+
const x = y.clientX - o, E = y.clientY - l;
|
|
2822
|
+
Math.abs(E) > p ? (y.preventDefault(), this.$input.blur(), s = !1, this._setDraggingStyle(!0, "vertical")) : Math.abs(x) > p && d();
|
|
2823
2823
|
}
|
|
2824
2824
|
if (!s) {
|
|
2825
2825
|
const x = y.clientY - c;
|
|
@@ -2837,7 +2837,7 @@ class xa extends be {
|
|
|
2837
2837
|
}
|
|
2838
2838
|
_initSlider() {
|
|
2839
2839
|
this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("lil-slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("lil-fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("lil-has-slider");
|
|
2840
|
-
const e = (_, y, x,
|
|
2840
|
+
const e = (_, y, x, E, b) => (_ - y) / (x - y) * (b - E) + E, t = (_) => {
|
|
2841
2841
|
const y = this.$slider.getBoundingClientRect();
|
|
2842
2842
|
let x = e(_, y.left, y.right, this._min, this._max);
|
|
2843
2843
|
this._snapClampSetValue(x);
|
|
@@ -2909,7 +2909,7 @@ class xa extends be {
|
|
|
2909
2909
|
return this._max !== void 0;
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
class
|
|
2912
|
+
class Ea extends be {
|
|
2913
2913
|
constructor(e, t, i, n) {
|
|
2914
2914
|
super(e, t, i, "lil-option"), this.$select = document.createElement("select"), this.$select.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$select.addEventListener("change", () => {
|
|
2915
2915
|
this.setValue(this._values[this.$select.selectedIndex]), this._callOnFinishChange();
|
|
@@ -2930,7 +2930,7 @@ class ba extends be {
|
|
|
2930
2930
|
return this.$select.selectedIndex = t, this.$display.textContent = t === -1 ? e : this._names[t], this;
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
class
|
|
2933
|
+
class va extends be {
|
|
2934
2934
|
constructor(e, t, i) {
|
|
2935
2935
|
super(e, t, i, "lil-string"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "text"), this.$input.setAttribute("spellcheck", "false"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$input.addEventListener("input", () => {
|
|
2936
2936
|
this.setValue(this.$input.value);
|
|
@@ -2944,7 +2944,7 @@ class Ea extends be {
|
|
|
2944
2944
|
return this.$input.value = this.getValue(), this;
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
|
-
var
|
|
2947
|
+
var wa = `.lil-gui {
|
|
2948
2948
|
font-family: var(--font-family);
|
|
2949
2949
|
font-size: var(--font-size);
|
|
2950
2950
|
line-height: 1;
|
|
@@ -3366,7 +3366,7 @@ var va = `.lil-gui {
|
|
|
3366
3366
|
font-family: "lil-gui";
|
|
3367
3367
|
src: url("data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAALkAAsAAAAABtQAAAKVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDMgqBBIEbATYCJAMUCwwABCAFhAoHgQQbHAbIDiUFEYVARAAAYQTVWNmz9MxhEgodq49wYRUFKE8GWNiUBxI2LBRaVnc51U83Gmhs0Q7JXWMiz5eteLwrKwuxHO8VFxUX9UpZBs6pa5ABRwHA+t3UxUnH20EvVknRerzQgX6xC/GH6ZUvTcAjAv122dF28OTqCXrPuyaDER30YBA1xnkVutDDo4oCi71Ca7rrV9xS8dZHbPHefsuwIyCpmT7j+MnjAH5X3984UZoFFuJ0yiZ4XEJFxjagEBeqs+e1iyK8Xf/nOuwF+vVK0ur765+vf7txotUi0m3N0m/84RGSrBCNrh8Ee5GjODjF4gnWP+dJrH/Lk9k4oT6d+gr6g/wssA2j64JJGP6cmx554vUZnpZfn6ZfX2bMwPPrlANsB86/DiHjhl0OP+c87+gaJo/gY084s3HoYL/ZkWHTRfBXvvoHnnkHvngKun4KBE/ede7tvq3/vQOxDXB1/fdNz6XbPdcr0Vhpojj9dG+owuSKFsslCi1tgEjirjXdwMiov2EioadxmqTHUCIwo8NgQaeIasAi0fTYSPTbSmwbMOFduyh9wvBrESGY0MtgRjtgQR8Q1bRPohn2UoCRZf9wyYANMXFeJTysqAe0I4mrherOekFdKMrYvJjLvOIUM9SuwYB5DVZUwwVjJJOaUnZCmcEkIZZrKqNvRGRMvmFZsmhP4VMKCSXBhSqUBxgMS7h0cZvEd71AWkEhGWaeMFcNnpqyJkyXgYL7PQ1MoSq0wDAkRtJIijkZSmqYTiSImfLiSWXIZwhRh3Rug2X0kk1Dgj+Iu43u5p98ghopcpSo0Uyc8SnjlYX59WUeaMoDqmVD2TOWD9a4pCRAzf2ECgwGcrHjPOWY9bNxq/OL3I/QjwEAAAA=") format("woff2");
|
|
3368
3368
|
}`;
|
|
3369
|
-
function
|
|
3369
|
+
function Ca(a) {
|
|
3370
3370
|
const e = document.createElement("style");
|
|
3371
3371
|
e.innerHTML = a;
|
|
3372
3372
|
const t = document.querySelector("head link[rel=stylesheet], head style");
|
|
@@ -3422,7 +3422,7 @@ class Vi {
|
|
|
3422
3422
|
this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
|
|
3423
3423
|
return;
|
|
3424
3424
|
}
|
|
3425
|
-
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (wa
|
|
3425
|
+
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Ca(wa), fn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
|
|
3426
3426
|
}
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -3441,15 +3441,15 @@ class Vi {
|
|
|
3441
3441
|
*/
|
|
3442
3442
|
add(e, t, i, n, r) {
|
|
3443
3443
|
if (Object(i) === i)
|
|
3444
|
-
return new
|
|
3444
|
+
return new Ea(this, e, t, i);
|
|
3445
3445
|
const s = e[t];
|
|
3446
3446
|
switch (typeof s) {
|
|
3447
3447
|
case "number":
|
|
3448
|
-
return new
|
|
3448
|
+
return new ba(this, e, t, i, n, r);
|
|
3449
3449
|
case "boolean":
|
|
3450
|
-
return new
|
|
3450
|
+
return new pa(this, e, t);
|
|
3451
3451
|
case "string":
|
|
3452
|
-
return new
|
|
3452
|
+
return new va(this, e, t);
|
|
3453
3453
|
case "function":
|
|
3454
3454
|
return new ri(this, e, t);
|
|
3455
3455
|
}
|
|
@@ -3478,7 +3478,7 @@ class Vi {
|
|
|
3478
3478
|
* @returns {Controller}
|
|
3479
3479
|
*/
|
|
3480
3480
|
addColor(e, t, i = 1) {
|
|
3481
|
-
return new
|
|
3481
|
+
return new xa(this, e, t, i);
|
|
3482
3482
|
}
|
|
3483
3483
|
/**
|
|
3484
3484
|
* Adds a folder to the GUI, which is just another GUI. This method returns
|
|
@@ -3708,7 +3708,7 @@ class Vi {
|
|
|
3708
3708
|
function Pa(a) {
|
|
3709
3709
|
return a;
|
|
3710
3710
|
}
|
|
3711
|
-
function
|
|
3711
|
+
function Aa(a) {
|
|
3712
3712
|
if (a == null) return Pa;
|
|
3713
3713
|
var e, t, i = a.scale[0], n = a.scale[1], r = a.translate[0], s = a.translate[1];
|
|
3714
3714
|
return function(o, l) {
|
|
@@ -3718,25 +3718,25 @@ function Ca(a) {
|
|
|
3718
3718
|
return u;
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
|
-
function
|
|
3721
|
+
function Ta(a, e) {
|
|
3722
3722
|
for (var t, i = a.length, n = i - e; n < --i; ) t = a[n], a[n++] = a[i], a[i] = t;
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3724
|
+
function Sa(a, e) {
|
|
3725
3725
|
return typeof e == "string" && (e = a.objects[e]), e.type === "GeometryCollection" ? { type: "FeatureCollection", features: e.geometries.map(function(t) {
|
|
3726
3726
|
return mn(a, t);
|
|
3727
3727
|
}) } : mn(a, e);
|
|
3728
3728
|
}
|
|
3729
3729
|
function mn(a, e) {
|
|
3730
|
-
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r =
|
|
3730
|
+
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Da(a, e);
|
|
3731
3731
|
return t == null && i == null ? { type: "Feature", properties: n, geometry: r } : i == null ? { type: "Feature", id: t, properties: n, geometry: r } : { type: "Feature", id: t, bbox: i, properties: n, geometry: r };
|
|
3732
3732
|
}
|
|
3733
|
-
function
|
|
3734
|
-
var t =
|
|
3733
|
+
function Da(a, e) {
|
|
3734
|
+
var t = Aa(a.transform), i = a.arcs;
|
|
3735
3735
|
function n(h, u) {
|
|
3736
3736
|
u.length && u.pop();
|
|
3737
3737
|
for (var p = i[h < 0 ? ~h : h], m = 0, f = p.length; m < f; ++m)
|
|
3738
3738
|
u.push(t(p[m], m));
|
|
3739
|
-
h < 0 &&
|
|
3739
|
+
h < 0 && Ta(u, f);
|
|
3740
3740
|
}
|
|
3741
3741
|
function r(h) {
|
|
3742
3742
|
return t(h);
|
|
@@ -3881,7 +3881,7 @@ const Tr = [
|
|
|
3881
3881
|
{ id: "858", code: "UY", name: "Uruguay", population: 3.5, gdpPerCapita: 25041, co2Emissions: 2, lifeExpectancy: 78.4, humanDevIndex: 0.83, internetUsers: 87, renewableEnergy: 55, urbanPopulation: 95.6, healthExpenditure: 9.3, educationExpenditure: 5, forestArea: 10.5, accessElectricity: 100 },
|
|
3882
3882
|
{ id: "188", code: "CR", name: "Costa Rica", population: 5, gdpPerCapita: 23101, co2Emissions: 1.5, lifeExpectancy: 80.8, humanDevIndex: 0.809, internetUsers: 81, renewableEnergy: 73, urbanPopulation: 81.4, healthExpenditure: 7.3, educationExpenditure: 6.7, forestArea: 59, accessElectricity: 100 },
|
|
3883
3883
|
{ id: "591", code: "PA", name: "Panama", population: 4.4, gdpPerCapita: 35317, co2Emissions: 2.5, lifeExpectancy: 79.2, humanDevIndex: 0.805, internetUsers: 68, renewableEnergy: 35, urbanPopulation: 68.4, healthExpenditure: 7.3, educationExpenditure: 3.2, forestArea: 62.1, accessElectricity: 95 }
|
|
3884
|
-
],
|
|
3884
|
+
], Ma = [
|
|
3885
3885
|
{
|
|
3886
3886
|
id: "humanDevIndex",
|
|
3887
3887
|
name: "Human Development Index",
|
|
@@ -3983,11 +3983,11 @@ const Tr = [
|
|
|
3983
3983
|
format: (a) => `${a.toFixed(0)}%`
|
|
3984
3984
|
}
|
|
3985
3985
|
];
|
|
3986
|
-
function
|
|
3986
|
+
function Ra(a, e) {
|
|
3987
3987
|
const [t, i] = a.domain;
|
|
3988
3988
|
return Math.max(0, Math.min(1, (e - t) / (i - t)));
|
|
3989
3989
|
}
|
|
3990
|
-
const
|
|
3990
|
+
const Oa = {
|
|
3991
3991
|
// North America
|
|
3992
3992
|
US: "840",
|
|
3993
3993
|
USA: "840",
|
|
@@ -4188,7 +4188,7 @@ const Ra = {
|
|
|
4188
4188
|
};
|
|
4189
4189
|
function gn(a) {
|
|
4190
4190
|
const e = a.toUpperCase().trim();
|
|
4191
|
-
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") :
|
|
4191
|
+
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Oa[e] || a;
|
|
4192
4192
|
}
|
|
4193
4193
|
function Ia(a) {
|
|
4194
4194
|
const e = {};
|
|
@@ -4198,15 +4198,15 @@ function Ia(a) {
|
|
|
4198
4198
|
e[gn(t)] = i;
|
|
4199
4199
|
}), e;
|
|
4200
4200
|
}
|
|
4201
|
-
const
|
|
4202
|
-
class
|
|
4201
|
+
const Ot = 2048, It = 1024;
|
|
4202
|
+
class La {
|
|
4203
4203
|
canvas;
|
|
4204
4204
|
ctx;
|
|
4205
4205
|
countries = [];
|
|
4206
4206
|
loaded = !1;
|
|
4207
4207
|
statsMap;
|
|
4208
4208
|
constructor() {
|
|
4209
|
-
this.canvas = document.createElement("canvas"), this.canvas.width =
|
|
4209
|
+
this.canvas = document.createElement("canvas"), this.canvas.width = Ot, this.canvas.height = It, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(), Tr.forEach((e) => {
|
|
4210
4210
|
this.statsMap.set(e.id, e);
|
|
4211
4211
|
}), this.loadCountries();
|
|
4212
4212
|
}
|
|
@@ -4214,7 +4214,7 @@ class Oa {
|
|
|
4214
4214
|
try {
|
|
4215
4215
|
const t = await (await fetch(
|
|
4216
4216
|
"https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json"
|
|
4217
|
-
)).json(), i =
|
|
4217
|
+
)).json(), i = Sa(t, t.objects.countries);
|
|
4218
4218
|
this.countries = i.features, this.loaded = !0, console.log(`Loaded ${this.countries.length} country boundaries`);
|
|
4219
4219
|
} catch (e) {
|
|
4220
4220
|
console.error("Failed to load country boundaries:", e);
|
|
@@ -4231,10 +4231,10 @@ class Oa {
|
|
|
4231
4231
|
* Render a choropleth texture for the given statistic
|
|
4232
4232
|
*/
|
|
4233
4233
|
renderTexture(e) {
|
|
4234
|
-
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0,
|
|
4234
|
+
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), this.loaded ? (this.countries.forEach((t) => {
|
|
4235
4235
|
const i = this.statsMap.get(t.id);
|
|
4236
4236
|
if (i) {
|
|
4237
|
-
const n = e.accessor(i), r =
|
|
4237
|
+
const n = e.accessor(i), r = Ra(e, n), s = this.interpolateColor(e.colorScale, r);
|
|
4238
4238
|
this.ctx.fillStyle = s;
|
|
4239
4239
|
} else
|
|
4240
4240
|
this.ctx.fillStyle = "#2a2a2a";
|
|
@@ -4278,7 +4278,7 @@ class Oa {
|
|
|
4278
4278
|
* Project lat/lon to canvas coordinates (equirectangular projection)
|
|
4279
4279
|
*/
|
|
4280
4280
|
projectPoint(e, t) {
|
|
4281
|
-
const i = (e + 180) / 360 *
|
|
4281
|
+
const i = (e + 180) / 360 * Ot, n = (90 - t) / 180 * It;
|
|
4282
4282
|
return [i, n];
|
|
4283
4283
|
}
|
|
4284
4284
|
interpolateColor(e, t) {
|
|
@@ -4301,7 +4301,7 @@ class Oa {
|
|
|
4301
4301
|
* Render a choropleth texture with custom values
|
|
4302
4302
|
*/
|
|
4303
4303
|
renderCustomTexture(e, t, i) {
|
|
4304
|
-
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0,
|
|
4304
|
+
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), !this.loaded)
|
|
4305
4305
|
return this.canvas;
|
|
4306
4306
|
const n = Ia(e);
|
|
4307
4307
|
return this.countries.forEach((r) => {
|
|
@@ -4332,19 +4332,28 @@ class Oa {
|
|
|
4332
4332
|
return this.canvas.toDataURL("image/png");
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
|
-
|
|
4335
|
+
function Sr(a) {
|
|
4336
|
+
return a === "%" ? (e) => `${e.toFixed(1)}%` : a === "$" ? (e) => `$${e.toLocaleString()}` : a === "years" ? (e) => `${e.toFixed(1)} yrs` : a.includes("per capita") || a.includes("per 100") || a.includes("per 1000") ? (e) => `${e.toFixed(1)}` : a === "% GDP" || a === "% of GDP" ? (e) => `${e.toFixed(1)}%` : a === "" || a === "index" ? (e) => e.toFixed(3) : (e) => {
|
|
4337
|
+
const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
|
|
4338
|
+
return a ? `${t} ${a}` : t;
|
|
4339
|
+
};
|
|
4340
|
+
}
|
|
4341
|
+
function go(a, e, t) {
|
|
4342
|
+
return (t ?? Sr(e))(a);
|
|
4343
|
+
}
|
|
4344
|
+
class ka {
|
|
4336
4345
|
container;
|
|
4337
4346
|
visible = !1;
|
|
4338
4347
|
constructor() {
|
|
4339
|
-
this.container = document.createElement("div"), this.container.id = "legend", this.container.innerHTML = `
|
|
4348
|
+
this.container = document.createElement("div"), this.container.id = "legend", this.container.setAttribute("data-testid", "globe-legend"), this.container.innerHTML = `
|
|
4340
4349
|
<div class="legend-hint">Press G to toggle globe/flat</div>
|
|
4341
|
-
<div class="legend-title"></div>
|
|
4350
|
+
<div class="legend-title" data-testid="legend-title"></div>
|
|
4342
4351
|
<div class="legend-gradient"></div>
|
|
4343
4352
|
<div class="legend-labels">
|
|
4344
|
-
<span class="legend-min"></span>
|
|
4345
|
-
<span class="legend-max"></span>
|
|
4353
|
+
<span class="legend-min" data-testid="legend-min"></span>
|
|
4354
|
+
<span class="legend-max" data-testid="legend-max"></span>
|
|
4346
4355
|
</div>
|
|
4347
|
-
<div class="legend-description"></div>
|
|
4356
|
+
<div class="legend-description" data-testid="legend-description"></div>
|
|
4348
4357
|
`, this.applyStyles(), document.body.appendChild(this.container);
|
|
4349
4358
|
}
|
|
4350
4359
|
applyStyles() {
|
|
@@ -4410,11 +4419,19 @@ class La {
|
|
|
4410
4419
|
}
|
|
4411
4420
|
`, document.head.appendChild(e);
|
|
4412
4421
|
}
|
|
4422
|
+
/**
|
|
4423
|
+
* Show the legend with the given statistic definition.
|
|
4424
|
+
*
|
|
4425
|
+
* If the statistic doesn't have a format function (e.g., when loaded from JSON),
|
|
4426
|
+
* a default formatter is created based on the unit.
|
|
4427
|
+
*/
|
|
4413
4428
|
show(e) {
|
|
4414
4429
|
const t = this.container.querySelector(".legend-title"), i = this.container.querySelector(".legend-gradient"), n = this.container.querySelector(".legend-min"), r = this.container.querySelector(".legend-max"), s = this.container.querySelector(".legend-description");
|
|
4415
4430
|
t.textContent = e.name, s.textContent = e.description;
|
|
4416
4431
|
const [o, l, c] = e.colorScale;
|
|
4417
|
-
i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})
|
|
4432
|
+
i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})`;
|
|
4433
|
+
const h = e.format ?? Sr(e.unit);
|
|
4434
|
+
n.textContent = h(e.domain[0]), r.textContent = h(e.domain[1]), this.container.classList.add("visible"), this.visible = !0;
|
|
4418
4435
|
}
|
|
4419
4436
|
hide() {
|
|
4420
4437
|
this.container.classList.remove("visible"), this.visible = !1;
|
|
@@ -4422,12 +4439,15 @@ class La {
|
|
|
4422
4439
|
isVisible() {
|
|
4423
4440
|
return this.visible;
|
|
4424
4441
|
}
|
|
4442
|
+
getContainer() {
|
|
4443
|
+
return this.container;
|
|
4444
|
+
}
|
|
4425
4445
|
dispose() {
|
|
4426
4446
|
this.container.remove();
|
|
4427
4447
|
}
|
|
4428
4448
|
}
|
|
4429
|
-
var
|
|
4430
|
-
function
|
|
4449
|
+
var Ua = { trailer: 59 };
|
|
4450
|
+
function Dr(a = 256) {
|
|
4431
4451
|
let e = 0, t = new Uint8Array(a);
|
|
4432
4452
|
return { get buffer() {
|
|
4433
4453
|
return t.buffer;
|
|
@@ -4454,45 +4474,45 @@ function Sr(a = 256) {
|
|
|
4454
4474
|
t = new Uint8Array(n), e > 0 && t.set(o.subarray(0, e), 0);
|
|
4455
4475
|
}
|
|
4456
4476
|
}
|
|
4457
|
-
var si = 12, _n = 5003,
|
|
4458
|
-
function
|
|
4477
|
+
var si = 12, _n = 5003, Fa = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
4478
|
+
function Na(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array(_n), o = new Int32Array(_n)) {
|
|
4459
4479
|
let l = s.length, c = Math.max(2, i);
|
|
4460
4480
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4461
|
-
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2,
|
|
4462
|
-
for (let
|
|
4463
|
-
|
|
4464
|
-
let
|
|
4465
|
-
for (let
|
|
4481
|
+
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, E = 0, b = t[0], C = 0;
|
|
4482
|
+
for (let w = l; w < 65536; w *= 2) ++C;
|
|
4483
|
+
C = 8 - C, n.writeByte(c), P(_);
|
|
4484
|
+
let v = t.length;
|
|
4485
|
+
for (let w = 1; w < v; w++)
|
|
4466
4486
|
e: {
|
|
4467
|
-
let T = t[
|
|
4468
|
-
if (s[A] ===
|
|
4469
|
-
|
|
4487
|
+
let T = t[w], M = (T << si) + b, A = T << C ^ b;
|
|
4488
|
+
if (s[A] === M) {
|
|
4489
|
+
b = o[A];
|
|
4470
4490
|
break e;
|
|
4471
4491
|
}
|
|
4472
4492
|
let R = A === 0 ? 1 : l - A;
|
|
4473
|
-
for (; s[A] >= 0; ) if (A -= R, A < 0 && (A += l), s[A] ===
|
|
4474
|
-
|
|
4493
|
+
for (; s[A] >= 0; ) if (A -= R, A < 0 && (A += l), s[A] === M) {
|
|
4494
|
+
b = o[A];
|
|
4475
4495
|
break e;
|
|
4476
4496
|
}
|
|
4477
|
-
|
|
4497
|
+
P(b), b = T, x < 1 << si ? (o[A] = x++, s[A] = M) : (s.fill(-1), x = _ + 2, f = !0, P(_));
|
|
4478
4498
|
}
|
|
4479
|
-
return
|
|
4480
|
-
function
|
|
4481
|
-
for (h &=
|
|
4482
|
-
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)),
|
|
4483
|
-
for (; u > 0; ) r[
|
|
4484
|
-
|
|
4499
|
+
return P(b), P(y), n.writeByte(0), n.bytesView();
|
|
4500
|
+
function P(w) {
|
|
4501
|
+
for (h &= Fa[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
|
|
4502
|
+
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
|
|
4503
|
+
for (; u > 0; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
|
|
4504
|
+
E > 0 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0);
|
|
4485
4505
|
}
|
|
4486
4506
|
}
|
|
4487
4507
|
}
|
|
4488
|
-
var
|
|
4489
|
-
function
|
|
4508
|
+
var za = Na;
|
|
4509
|
+
function Mr(a, e, t) {
|
|
4490
4510
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
4491
4511
|
}
|
|
4492
|
-
function
|
|
4512
|
+
function Rr(a, e, t, i) {
|
|
4493
4513
|
return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
4494
4514
|
}
|
|
4495
|
-
function
|
|
4515
|
+
function Or(a, e, t) {
|
|
4496
4516
|
return a >> 4 << 8 | e & 240 | t >> 4;
|
|
4497
4517
|
}
|
|
4498
4518
|
function Lt(a, e, t) {
|
|
@@ -4518,18 +4538,18 @@ function yn(a, e, t) {
|
|
|
4518
4538
|
function ai() {
|
|
4519
4539
|
return { ac: 0, rc: 0, gc: 0, bc: 0, cnt: 0, nn: 0, fw: 0, bk: 0, tm: 0, mtm: 0, err: 0 };
|
|
4520
4540
|
}
|
|
4521
|
-
function
|
|
4541
|
+
function $a(a, e) {
|
|
4522
4542
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
|
|
4523
4543
|
if (e === "rgba4444") for (let r = 0; r < n; ++r) {
|
|
4524
|
-
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u =
|
|
4544
|
+
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u = Rr(h, c, l, o), p = u in i ? i[u] : i[u] = ai();
|
|
4525
4545
|
p.rc += h, p.gc += c, p.bc += l, p.ac += o, p.cnt++;
|
|
4526
4546
|
}
|
|
4527
4547
|
else if (e === "rgb444") for (let r = 0; r < n; ++r) {
|
|
4528
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
4548
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Or(c, l, o), u = h in i ? i[h] : i[h] = ai();
|
|
4529
4549
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4530
4550
|
}
|
|
4531
4551
|
else for (let r = 0; r < n; ++r) {
|
|
4532
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
4552
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Mr(c, l, o), u = h in i ? i[h] : i[h] = ai();
|
|
4533
4553
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4534
4554
|
}
|
|
4535
4555
|
return i;
|
|
@@ -4538,73 +4558,73 @@ function Ba(a, e, t = {}) {
|
|
|
4538
4558
|
let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
|
|
4539
4559
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4540
4560
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4541
|
-
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u =
|
|
4561
|
+
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u = $a(l, i), p = u.length, m = p - 1, f = new Uint32Array(p + 1);
|
|
4542
4562
|
for (var d = 0, g = 0; g < p; ++g) {
|
|
4543
|
-
let
|
|
4544
|
-
if (
|
|
4545
|
-
var _ = 1 /
|
|
4546
|
-
h && (
|
|
4563
|
+
let O = u[g];
|
|
4564
|
+
if (O != null) {
|
|
4565
|
+
var _ = 1 / O.cnt;
|
|
4566
|
+
h && (O.ac *= _), O.rc *= _, O.gc *= _, O.bc *= _, u[d++] = O;
|
|
4547
4567
|
}
|
|
4548
4568
|
}
|
|
4549
4569
|
Nt(e) / d < 0.022 && (c = !1);
|
|
4550
4570
|
for (var g = 0; g < d - 1; ++g) u[g].fw = g + 1, u[g + 1].bk = g, c && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
4551
4571
|
c && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
4552
|
-
var y, x,
|
|
4572
|
+
var y, x, E;
|
|
4553
4573
|
for (g = 0; g < d; ++g) {
|
|
4554
4574
|
yn(u, g);
|
|
4555
|
-
var
|
|
4556
|
-
for (x = ++f[0]; x > 1 && (
|
|
4575
|
+
var b = u[g].err;
|
|
4576
|
+
for (x = ++f[0]; x > 1 && (E = x >> 1, !(u[y = f[E]].err <= b)); x = E) f[x] = y;
|
|
4557
4577
|
f[x] = g;
|
|
4558
4578
|
}
|
|
4559
|
-
var
|
|
4560
|
-
for (g = 0; g <
|
|
4561
|
-
for (var
|
|
4562
|
-
var
|
|
4563
|
-
if (
|
|
4564
|
-
|
|
4565
|
-
var
|
|
4566
|
-
for (x = 1; (
|
|
4567
|
-
f[x] =
|
|
4579
|
+
var C = d - e;
|
|
4580
|
+
for (g = 0; g < C; ) {
|
|
4581
|
+
for (var v; ; ) {
|
|
4582
|
+
var P = f[1];
|
|
4583
|
+
if (v = u[P], v.tm >= v.mtm && u[v.nn].mtm <= v.tm) break;
|
|
4584
|
+
v.mtm == m ? P = f[1] = f[f[0]--] : (yn(u, P), v.tm = g);
|
|
4585
|
+
var b = u[P].err;
|
|
4586
|
+
for (x = 1; (E = x + x) <= f[0] && (E < f[0] && u[f[E]].err > u[f[E + 1]].err && E++, !(b <= u[y = f[E]].err)); x = E) f[x] = y;
|
|
4587
|
+
f[x] = P;
|
|
4568
4588
|
}
|
|
4569
|
-
var
|
|
4570
|
-
h && (
|
|
4589
|
+
var w = u[v.nn], T = v.cnt, M = w.cnt, _ = 1 / (T + M);
|
|
4590
|
+
h && (v.ac = _ * (T * v.ac + M * w.ac)), v.rc = _ * (T * v.rc + M * w.rc), v.gc = _ * (T * v.gc + M * w.gc), v.bc = _ * (T * v.bc + M * w.bc), v.cnt += w.cnt, v.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
|
|
4571
4591
|
}
|
|
4572
4592
|
let A = [];
|
|
4573
4593
|
var R = 0;
|
|
4574
4594
|
for (g = 0; ; ++R) {
|
|
4575
|
-
let
|
|
4576
|
-
h && (U = Lt(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (
|
|
4577
|
-
let Q = h ? [
|
|
4578
|
-
if (
|
|
4595
|
+
let O = Lt(Math.round(u[g].rc), 0, 255), B = Lt(Math.round(u[g].gc), 0, 255), F = Lt(Math.round(u[g].bc), 0, 255), U = 255;
|
|
4596
|
+
h && (U = Lt(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (O = B = F = r, U = 0));
|
|
4597
|
+
let Q = h ? [O, B, F, U] : [O, B, F];
|
|
4598
|
+
if (Ga(A, Q) || A.push(Q), (g = u[g].fw) == 0) break;
|
|
4579
4599
|
}
|
|
4580
4600
|
return A;
|
|
4581
4601
|
}
|
|
4582
|
-
function
|
|
4602
|
+
function Ga(a, e) {
|
|
4583
4603
|
for (let t = 0; t < a.length; t++) {
|
|
4584
4604
|
let i = a[t], n = i[0] === e[0] && i[1] === e[1] && i[2] === e[2], r = i.length >= 4 && e.length >= 4 ? i[3] === e[3] : !0;
|
|
4585
4605
|
if (n && r) return !0;
|
|
4586
4606
|
}
|
|
4587
4607
|
return !1;
|
|
4588
4608
|
}
|
|
4589
|
-
function
|
|
4609
|
+
function Va(a, e, t = "rgb565") {
|
|
4590
4610
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4591
4611
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4592
4612
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
4593
4613
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
4594
4614
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
4595
|
-
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f =
|
|
4615
|
+
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f = Rr(m, p, u, h), d = f in o ? o[f] : o[f] = Ha(m, p, u, h, e);
|
|
4596
4616
|
s[l] = d;
|
|
4597
4617
|
}
|
|
4598
4618
|
else {
|
|
4599
|
-
let l = t === "rgb444" ?
|
|
4619
|
+
let l = t === "rgb444" ? Or : Mr;
|
|
4600
4620
|
for (let c = 0; c < n; c++) {
|
|
4601
|
-
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] =
|
|
4621
|
+
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] = ja(m, p, u, e);
|
|
4602
4622
|
s[c] = d;
|
|
4603
4623
|
}
|
|
4604
4624
|
}
|
|
4605
4625
|
return s;
|
|
4606
4626
|
}
|
|
4607
|
-
function
|
|
4627
|
+
function Ha(a, e, t, i, n) {
|
|
4608
4628
|
let r = 0, s = 1e100;
|
|
4609
4629
|
for (let o = 0; o < n.length; o++) {
|
|
4610
4630
|
let l = n[o], c = l[3], h = Ve(c - i);
|
|
@@ -4618,7 +4638,7 @@ function Va(a, e, t, i, n) {
|
|
|
4618
4638
|
}
|
|
4619
4639
|
return r;
|
|
4620
4640
|
}
|
|
4621
|
-
function
|
|
4641
|
+
function ja(a, e, t, i) {
|
|
4622
4642
|
let n = 0, r = 1e100;
|
|
4623
4643
|
for (let s = 0; s < i.length; s++) {
|
|
4624
4644
|
let o = i[s], l = o[0], c = Ve(l - a);
|
|
@@ -4633,12 +4653,12 @@ function Ha(a, e, t, i) {
|
|
|
4633
4653
|
function Ve(a) {
|
|
4634
4654
|
return a * a;
|
|
4635
4655
|
}
|
|
4636
|
-
function
|
|
4637
|
-
let { initialCapacity: e = 4096, auto: t = !0 } = a, i =
|
|
4656
|
+
function Ya(a = {}) {
|
|
4657
|
+
let { initialCapacity: e = 4096, auto: t = !0 } = a, i = Dr(e), n = 5003, r = new Uint8Array(256), s = new Int32Array(n), o = new Int32Array(n), l = !1;
|
|
4638
4658
|
return { reset() {
|
|
4639
4659
|
i.reset(), l = !1;
|
|
4640
4660
|
}, finish() {
|
|
4641
|
-
i.writeByte(
|
|
4661
|
+
i.writeByte(Ua.trailer);
|
|
4642
4662
|
}, bytes() {
|
|
4643
4663
|
return i.bytes();
|
|
4644
4664
|
}, bytesView() {
|
|
@@ -4648,30 +4668,30 @@ function ja(a = {}) {
|
|
|
4648
4668
|
}, get stream() {
|
|
4649
4669
|
return i;
|
|
4650
4670
|
}, writeHeader: c, writeFrame(h, u, p, m = {}) {
|
|
4651
|
-
let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose:
|
|
4652
|
-
if (t ? l || (
|
|
4671
|
+
let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: E = -1 } = m, b = !1;
|
|
4672
|
+
if (t ? l || (b = !0, c(), l = !0) : b = !!m.first, u = Math.max(0, Math.floor(u)), p = Math.max(0, Math.floor(p)), b) {
|
|
4653
4673
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
4654
|
-
|
|
4674
|
+
Ka(i, u, p, _, x), xn(i, _), y >= 0 && Xa(i, y);
|
|
4655
4675
|
}
|
|
4656
|
-
let
|
|
4657
|
-
|
|
4658
|
-
let
|
|
4659
|
-
|
|
4676
|
+
let C = Math.round(g / 10);
|
|
4677
|
+
Za(i, E, C, f, d);
|
|
4678
|
+
let v = !!_ && !b;
|
|
4679
|
+
Wa(i, u, p, v ? _ : null), v && xn(i, _), qa(i, h, u, p, x, r, s, o);
|
|
4660
4680
|
} };
|
|
4661
4681
|
function c() {
|
|
4662
4682
|
Ir(i, "GIF89a");
|
|
4663
4683
|
}
|
|
4664
4684
|
}
|
|
4665
|
-
function
|
|
4685
|
+
function Za(a, e, t, i, n) {
|
|
4666
4686
|
a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
|
|
4667
4687
|
var r, s;
|
|
4668
4688
|
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Me(a, t), a.writeByte(n || 0), a.writeByte(0);
|
|
4669
4689
|
}
|
|
4670
|
-
function
|
|
4690
|
+
function Ka(a, e, t, i, n = 8) {
|
|
4671
4691
|
let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
|
|
4672
4692
|
Me(a, e), Me(a, t), a.writeBytes([l, 0, 0]);
|
|
4673
4693
|
}
|
|
4674
|
-
function
|
|
4694
|
+
function Xa(a, e) {
|
|
4675
4695
|
a.writeByte(33), a.writeByte(255), a.writeByte(11), Ir(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Me(a, e), a.writeByte(0);
|
|
4676
4696
|
}
|
|
4677
4697
|
function xn(a, e) {
|
|
@@ -4681,14 +4701,14 @@ function xn(a, e) {
|
|
|
4681
4701
|
i < e.length && (n = e[i]), a.writeByte(n[0]), a.writeByte(n[1]), a.writeByte(n[2]);
|
|
4682
4702
|
}
|
|
4683
4703
|
}
|
|
4684
|
-
function
|
|
4704
|
+
function Wa(a, e, t, i) {
|
|
4685
4705
|
if (a.writeByte(44), Me(a, 0), Me(a, 0), Me(a, e), Me(a, t), i) {
|
|
4686
4706
|
let n = 0, r = 0, s = Hi(i.length) - 1;
|
|
4687
4707
|
a.writeByte(128 | n | r | 0 | s);
|
|
4688
4708
|
} else a.writeByte(0);
|
|
4689
4709
|
}
|
|
4690
|
-
function
|
|
4691
|
-
|
|
4710
|
+
function qa(a, e, t, i, n = 8, r, s, o) {
|
|
4711
|
+
za(t, i, e, n, a, r, s, o);
|
|
4692
4712
|
}
|
|
4693
4713
|
function Me(a, e) {
|
|
4694
4714
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
@@ -4699,7 +4719,7 @@ function Ir(a, e) {
|
|
|
4699
4719
|
function Hi(a) {
|
|
4700
4720
|
return Math.max(Math.ceil(Math.log2(a)), 1);
|
|
4701
4721
|
}
|
|
4702
|
-
class
|
|
4722
|
+
class Qa {
|
|
4703
4723
|
renderer;
|
|
4704
4724
|
scene;
|
|
4705
4725
|
camera;
|
|
@@ -4709,22 +4729,94 @@ class qa {
|
|
|
4709
4729
|
recordedChunks = [];
|
|
4710
4730
|
captureCanvas;
|
|
4711
4731
|
captureCtx;
|
|
4732
|
+
compositeCanvas;
|
|
4733
|
+
compositeCtx;
|
|
4712
4734
|
gifWidth = 480;
|
|
4713
4735
|
gifHeight = 270;
|
|
4736
|
+
legendElement = null;
|
|
4737
|
+
countryLabels = null;
|
|
4714
4738
|
constructor(e, t, i) {
|
|
4715
|
-
this.renderer = e, this.scene = t, this.camera = i, this.captureCanvas = document.createElement("canvas"), this.captureCtx = this.captureCanvas.getContext("2d", { willReadFrequently: !0 });
|
|
4739
|
+
this.renderer = e, this.scene = t, this.camera = i, this.captureCanvas = document.createElement("canvas"), this.captureCtx = this.captureCanvas.getContext("2d", { willReadFrequently: !0 }), this.compositeCanvas = document.createElement("canvas"), this.compositeCtx = this.compositeCanvas.getContext("2d");
|
|
4740
|
+
}
|
|
4741
|
+
/**
|
|
4742
|
+
* Set the legend element to include in exports
|
|
4743
|
+
*/
|
|
4744
|
+
setLegendElement(e) {
|
|
4745
|
+
this.legendElement = e;
|
|
4746
|
+
}
|
|
4747
|
+
/**
|
|
4748
|
+
* Set the country labels component to include in exports
|
|
4749
|
+
*/
|
|
4750
|
+
setCountryLabels(e) {
|
|
4751
|
+
this.countryLabels = e;
|
|
4752
|
+
}
|
|
4753
|
+
/**
|
|
4754
|
+
* Draw country labels onto canvas
|
|
4755
|
+
*/
|
|
4756
|
+
drawCountryLabelsOnCanvas(e, t, i) {
|
|
4757
|
+
if (this.countryLabels)
|
|
4758
|
+
try {
|
|
4759
|
+
this.countryLabels.getVisibleLabelsForCanvas(this.camera, t, i).forEach((r) => {
|
|
4760
|
+
e.save(), e.globalAlpha = r.opacity, e.font = "bold 12px Arial, sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.strokeStyle = "rgba(0, 0, 0, 0.8)", e.lineWidth = 3, e.strokeText(r.text, r.x, r.y), e.fillStyle = "#ffffff", e.fillText(r.text, r.x, r.y), e.restore();
|
|
4761
|
+
});
|
|
4762
|
+
} catch (n) {
|
|
4763
|
+
console.warn("Failed to draw country labels:", n);
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
/**
|
|
4767
|
+
* Draw all overlays (legend + country labels) onto canvas
|
|
4768
|
+
*/
|
|
4769
|
+
drawOverlaysOnCanvas(e, t, i) {
|
|
4770
|
+
this.drawCountryLabelsOnCanvas(e, t, i), this.drawLegendOnCanvas(e, t, i);
|
|
4716
4771
|
}
|
|
4717
4772
|
/**
|
|
4718
|
-
*
|
|
4773
|
+
* Draw legend onto canvas at specified position
|
|
4774
|
+
*/
|
|
4775
|
+
drawLegendOnCanvas(e, t, i) {
|
|
4776
|
+
try {
|
|
4777
|
+
if (!this.legendElement || !this.legendElement.classList.contains("visible")) return;
|
|
4778
|
+
const n = this.legendElement, r = n.querySelector(".legend-title"), s = n.querySelector(".legend-gradient"), o = n.querySelector(".legend-min"), l = n.querySelector(".legend-max"), c = n.querySelector(".legend-description");
|
|
4779
|
+
if (!r || !s) return;
|
|
4780
|
+
const h = 280, u = 100, p = 20, m = t - h - p, f = i - u - p, d = 12;
|
|
4781
|
+
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(m, f, h, u, d) : e.rect(m, f, h, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, f + 28);
|
|
4782
|
+
const g = m + 16, _ = f + 40, y = h - 32, x = 20, E = s.style.background || "";
|
|
4783
|
+
let b = [];
|
|
4784
|
+
const C = E.match(/rgba?\([^)]+\)/g);
|
|
4785
|
+
if (C && C.length >= 2)
|
|
4786
|
+
b = C;
|
|
4787
|
+
else {
|
|
4788
|
+
const v = E.match(/#[0-9a-fA-F]{3,8}/g);
|
|
4789
|
+
v && v.length >= 2 && (b = v);
|
|
4790
|
+
}
|
|
4791
|
+
if (b.length >= 2) {
|
|
4792
|
+
const v = e.createLinearGradient(g, 0, g + y, 0);
|
|
4793
|
+
v.addColorStop(0, b[0]), b.length >= 3 ? (v.addColorStop(0.5, b[1]), v.addColorStop(1, b[2])) : v.addColorStop(1, b[1]), e.fillStyle = v, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill();
|
|
4794
|
+
} else {
|
|
4795
|
+
const v = e.createLinearGradient(g, 0, g + y, 0);
|
|
4796
|
+
v.addColorStop(0, "#cc6600"), v.addColorStop(0.5, "#ffaa44"), v.addColorStop(1, "#ffeecc"), e.fillStyle = v, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill(), console.log("Legend gradient style:", E);
|
|
4797
|
+
}
|
|
4798
|
+
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, f + 78), l) {
|
|
4799
|
+
const v = l.textContent || "", P = e.measureText(v).width;
|
|
4800
|
+
e.fillText(v, g + y - P, f + 78);
|
|
4801
|
+
}
|
|
4802
|
+
c && c.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(c.textContent, g, f + 95));
|
|
4803
|
+
} catch (n) {
|
|
4804
|
+
console.warn("Failed to draw legend on canvas:", n);
|
|
4805
|
+
}
|
|
4806
|
+
}
|
|
4807
|
+
/**
|
|
4808
|
+
* Capture a single screenshot (includes legend if visible)
|
|
4719
4809
|
*/
|
|
4720
4810
|
screenshot(e = {}) {
|
|
4721
4811
|
const { width: t = 1920, height: i = 1080 } = e, n = this.renderer.domElement.width, r = this.renderer.domElement.height;
|
|
4722
|
-
this.renderer.setSize(t, i), this.camera.aspect = t / i, this.camera.updateProjectionMatrix(), this.renderer.render(this.scene, this.camera);
|
|
4723
|
-
const s = this.
|
|
4812
|
+
this.renderer.setSize(t, i), this.camera.aspect = t / i, this.camera.updateProjectionMatrix(), this.renderer.render(this.scene, this.camera), this.compositeCanvas.width = t, this.compositeCanvas.height = i, this.compositeCtx.drawImage(this.renderer.domElement, 0, 0), this.drawOverlaysOnCanvas(this.compositeCtx, t, i);
|
|
4813
|
+
const s = this.compositeCanvas.toDataURL("image/png");
|
|
4724
4814
|
this.renderer.setSize(n, r), this.camera.aspect = n / r, this.camera.updateProjectionMatrix(), this.downloadFile(s, `globe-${Date.now()}.png`);
|
|
4725
4815
|
}
|
|
4726
4816
|
/**
|
|
4727
4817
|
* Start recording video using MediaRecorder
|
|
4818
|
+
* Prefers MP4 format when available, falls back to WebM
|
|
4819
|
+
* Includes legend overlay if visible
|
|
4728
4820
|
* Returns a promise that resolves when recording has started
|
|
4729
4821
|
*/
|
|
4730
4822
|
startVideoRecording(e = {}) {
|
|
@@ -4733,20 +4825,46 @@ class qa {
|
|
|
4733
4825
|
t();
|
|
4734
4826
|
return;
|
|
4735
4827
|
}
|
|
4736
|
-
const
|
|
4828
|
+
const i = this.renderer.domElement;
|
|
4829
|
+
this.compositeCanvas.width = i.width, this.compositeCanvas.height = i.height, this.compositeCtx.drawImage(i, 0, 0), this.drawOverlaysOnCanvas(this.compositeCtx, this.compositeCanvas.width, this.compositeCanvas.height);
|
|
4830
|
+
const n = this.compositeCanvas.captureStream(60), r = [
|
|
4831
|
+
{ mime: "video/mp4;codecs=avc1", ext: "mp4" },
|
|
4832
|
+
{ mime: "video/mp4", ext: "mp4" },
|
|
4833
|
+
{ mime: "video/webm;codecs=h264", ext: "webm" },
|
|
4834
|
+
{ mime: "video/webm;codecs=vp9", ext: "webm" },
|
|
4835
|
+
{ mime: "video/webm;codecs=vp8", ext: "webm" },
|
|
4836
|
+
{ mime: "video/webm", ext: "webm" }
|
|
4837
|
+
];
|
|
4838
|
+
let s = "video/webm", o = "webm";
|
|
4839
|
+
for (const { mime: c, ext: h } of r)
|
|
4840
|
+
if (MediaRecorder.isTypeSupported(c)) {
|
|
4841
|
+
s = c, o = h, console.log(`Video recording using: ${c}`);
|
|
4842
|
+
break;
|
|
4843
|
+
}
|
|
4737
4844
|
this.mediaRecorder = new MediaRecorder(n, {
|
|
4738
|
-
mimeType:
|
|
4845
|
+
mimeType: s,
|
|
4739
4846
|
videoBitsPerSecond: 8e6
|
|
4740
|
-
}), this.recordedChunks = []
|
|
4741
|
-
|
|
4847
|
+
}), this.recordedChunks = [];
|
|
4848
|
+
const l = o;
|
|
4849
|
+
this.mediaRecorder.ondataavailable = (c) => {
|
|
4850
|
+
c.data.size > 0 && this.recordedChunks.push(c.data);
|
|
4742
4851
|
}, this.mediaRecorder.onstop = () => {
|
|
4743
|
-
const
|
|
4744
|
-
this.downloadFile(
|
|
4852
|
+
const c = s.split(";")[0], h = new Blob(this.recordedChunks, { type: c }), u = URL.createObjectURL(h);
|
|
4853
|
+
this.downloadFile(u, `globe-${Date.now()}.${l}`), URL.revokeObjectURL(u);
|
|
4745
4854
|
}, this.mediaRecorder.onstart = () => {
|
|
4746
|
-
this.isRecording = !0, t();
|
|
4855
|
+
this.isRecording = !0, setTimeout(() => t(), 50);
|
|
4747
4856
|
}, this.mediaRecorder.start(100);
|
|
4748
4857
|
});
|
|
4749
4858
|
}
|
|
4859
|
+
/**
|
|
4860
|
+
* Update video frame - call this in animation loop while recording video
|
|
4861
|
+
* Composites the renderer output with the legend overlay
|
|
4862
|
+
*/
|
|
4863
|
+
updateVideoFrame() {
|
|
4864
|
+
if (!this.isRecording || !this.mediaRecorder) return;
|
|
4865
|
+
const e = this.compositeCanvas.width, t = this.compositeCanvas.height;
|
|
4866
|
+
this.compositeCtx.drawImage(this.renderer.domElement, 0, 0, e, t), this.drawOverlaysOnCanvas(this.compositeCtx, e, t);
|
|
4867
|
+
}
|
|
4750
4868
|
/**
|
|
4751
4869
|
* Stop video recording
|
|
4752
4870
|
*/
|
|
@@ -4764,12 +4882,12 @@ class qa {
|
|
|
4764
4882
|
}
|
|
4765
4883
|
/**
|
|
4766
4884
|
* Capture a single GIF frame (call this in animation loop)
|
|
4767
|
-
* Captures RGBA data directly from canvas
|
|
4885
|
+
* Captures RGBA data directly from canvas, includes legend if visible
|
|
4768
4886
|
*/
|
|
4769
4887
|
captureGifFrame() {
|
|
4770
4888
|
if (!this.isRecording) return;
|
|
4771
4889
|
const e = this.renderer.domElement, t = this.gifWidth, i = this.gifHeight;
|
|
4772
|
-
this.captureCtx.drawImage(e, 0, 0, t, i);
|
|
4890
|
+
this.captureCtx.drawImage(e, 0, 0, t, i), this.drawOverlaysOnCanvas(this.captureCtx, t, i);
|
|
4773
4891
|
const n = this.captureCtx.getImageData(0, 0, t, i);
|
|
4774
4892
|
this.frames.push({
|
|
4775
4893
|
data: new Uint8ClampedArray(n.data),
|
|
@@ -4790,9 +4908,9 @@ class qa {
|
|
|
4790
4908
|
const { fps: t = 20, filename: i } = e, n = Math.round(1e3 / t);
|
|
4791
4909
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
4792
4910
|
try {
|
|
4793
|
-
const r = this.frames[0], s = r.width, o = r.height, l = Ba(r.data, 256), c =
|
|
4911
|
+
const r = this.frames[0], s = r.width, o = r.height, l = Ba(r.data, 256), c = Ya();
|
|
4794
4912
|
for (let f = 0; f < this.frames.length; f++) {
|
|
4795
|
-
const d = this.frames[f], g =
|
|
4913
|
+
const d = this.frames[f], g = Va(d.data, l);
|
|
4796
4914
|
c.writeFrame(g, s, o, {
|
|
4797
4915
|
palette: f === 0 ? l : void 0,
|
|
4798
4916
|
// Only first frame needs palette
|
|
@@ -4826,7 +4944,7 @@ class qa {
|
|
|
4826
4944
|
i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
4827
4945
|
}
|
|
4828
4946
|
}
|
|
4829
|
-
class
|
|
4947
|
+
class Ja extends Nr {
|
|
4830
4948
|
/**
|
|
4831
4949
|
* Constructs a new CSS2D object.
|
|
4832
4950
|
*
|
|
@@ -4844,7 +4962,7 @@ class Qa extends Fr {
|
|
|
4844
4962
|
}
|
|
4845
4963
|
}
|
|
4846
4964
|
const qe = new se(), bn = new An(), En = new An(), vn = new se(), wn = new se();
|
|
4847
|
-
class
|
|
4965
|
+
class eo {
|
|
4848
4966
|
/**
|
|
4849
4967
|
* Constructs a new CSS2D renderer.
|
|
4850
4968
|
*
|
|
@@ -4901,15 +5019,15 @@ class Ja {
|
|
|
4901
5019
|
const d = p(f).sort(function(_, y) {
|
|
4902
5020
|
if (_.renderOrder !== y.renderOrder)
|
|
4903
5021
|
return y.renderOrder - _.renderOrder;
|
|
4904
|
-
const x = o.objects.get(_).distanceToCameraSquared,
|
|
4905
|
-
return x -
|
|
5022
|
+
const x = o.objects.get(_).distanceToCameraSquared, E = o.objects.get(y).distanceToCameraSquared;
|
|
5023
|
+
return x - E;
|
|
4906
5024
|
}), g = d.length;
|
|
4907
5025
|
for (let _ = 0, y = d.length; _ < y; _++)
|
|
4908
5026
|
d[_].element.style.zIndex = g - _;
|
|
4909
5027
|
}
|
|
4910
5028
|
}
|
|
4911
5029
|
}
|
|
4912
|
-
const
|
|
5030
|
+
const to = {
|
|
4913
5031
|
// Major economies
|
|
4914
5032
|
CN: [35, 105],
|
|
4915
5033
|
IN: [22, 78],
|
|
@@ -5008,7 +5126,7 @@ const eo = {
|
|
|
5008
5126
|
UY: [-33, -56],
|
|
5009
5127
|
CR: [10, -84],
|
|
5010
5128
|
PA: [9, -80]
|
|
5011
|
-
},
|
|
5129
|
+
}, io = /* @__PURE__ */ new Set([
|
|
5012
5130
|
"CN",
|
|
5013
5131
|
"IN",
|
|
5014
5132
|
"US",
|
|
@@ -5039,7 +5157,7 @@ const eo = {
|
|
|
5039
5157
|
"PK",
|
|
5040
5158
|
"BD",
|
|
5041
5159
|
"VN"
|
|
5042
|
-
]),
|
|
5160
|
+
]), no = /* @__PURE__ */ new Set([
|
|
5043
5161
|
"CN",
|
|
5044
5162
|
"IN",
|
|
5045
5163
|
"US",
|
|
@@ -5047,7 +5165,7 @@ const eo = {
|
|
|
5047
5165
|
"RU",
|
|
5048
5166
|
"AU",
|
|
5049
5167
|
"CA"
|
|
5050
|
-
]),
|
|
5168
|
+
]), ro = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), so = /* @__PURE__ */ new Set([
|
|
5051
5169
|
"IN",
|
|
5052
5170
|
"AR",
|
|
5053
5171
|
"KZ",
|
|
@@ -5078,7 +5196,7 @@ const eo = {
|
|
|
5078
5196
|
"TR",
|
|
5079
5197
|
"CL",
|
|
5080
5198
|
"MM"
|
|
5081
|
-
]),
|
|
5199
|
+
]), ao = /* @__PURE__ */ new Set([
|
|
5082
5200
|
"AF",
|
|
5083
5201
|
"UA",
|
|
5084
5202
|
"MG",
|
|
@@ -5120,7 +5238,7 @@ const eo = {
|
|
|
5120
5238
|
"IQ",
|
|
5121
5239
|
"BD"
|
|
5122
5240
|
]);
|
|
5123
|
-
class
|
|
5241
|
+
class oo {
|
|
5124
5242
|
labelRenderer;
|
|
5125
5243
|
labels = [];
|
|
5126
5244
|
labelGroup;
|
|
@@ -5130,7 +5248,7 @@ class ao {
|
|
|
5130
5248
|
globe = null;
|
|
5131
5249
|
camera = null;
|
|
5132
5250
|
constructor(e, t) {
|
|
5133
|
-
this.sphereRadius = t, this.labelRenderer = new
|
|
5251
|
+
this.sphereRadius = t, this.labelRenderer = new eo(), this.labelRenderer.setSize(window.innerWidth, window.innerHeight), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new S.Group(), this.injectStyles(), this.createLabels();
|
|
5134
5252
|
}
|
|
5135
5253
|
injectStyles() {
|
|
5136
5254
|
const e = document.createElement("style");
|
|
@@ -5217,15 +5335,15 @@ class ao {
|
|
|
5217
5335
|
`, document.head.appendChild(e);
|
|
5218
5336
|
}
|
|
5219
5337
|
getSizeCategory(e) {
|
|
5220
|
-
return
|
|
5338
|
+
return ro.has(e) ? "large" : so.has(e) ? "medium" : ao.has(e) ? "small" : "tiny";
|
|
5221
5339
|
}
|
|
5222
5340
|
createLabels() {
|
|
5223
5341
|
Tr.forEach((e) => {
|
|
5224
|
-
const t =
|
|
5342
|
+
const t = to[e.code];
|
|
5225
5343
|
if (!t) return;
|
|
5226
5344
|
const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
|
|
5227
5345
|
s.className = `country-label hidden size-${r}`, s.textContent = e.name;
|
|
5228
|
-
const o = new
|
|
5346
|
+
const o = new Ja(s), l = {
|
|
5229
5347
|
element: s,
|
|
5230
5348
|
object: o,
|
|
5231
5349
|
country: e,
|
|
@@ -5236,8 +5354,8 @@ class ao {
|
|
|
5236
5354
|
this.labelGroup.add(o), this.labels.push(l), this.updateLabelPosition(o, l, this.currentMorph);
|
|
5237
5355
|
});
|
|
5238
5356
|
}
|
|
5239
|
-
tempVector = new
|
|
5240
|
-
cameraDirection = new
|
|
5357
|
+
tempVector = new S.Vector3();
|
|
5358
|
+
cameraDirection = new S.Vector3();
|
|
5241
5359
|
updateLabelPosition(e, t, i) {
|
|
5242
5360
|
const { lat: n, lon: r, element: s } = t, o = n * Math.PI / 180, l = r * Math.PI / 180, c = this.sphereRadius + 0.5, h = c * Math.cos(o) * Math.sin(l), u = c * Math.sin(o), p = c * Math.cos(o) * Math.cos(l), m = 2 * Math.PI * this.sphereRadius, f = Math.PI * this.sphereRadius, d = (r + 180) / 360, g = (n + 90) / 180, _ = (d - 0.5) * m, y = (g - 0.5) * f, x = 0.5;
|
|
5243
5361
|
if (this.globe && i > 0.01)
|
|
@@ -5247,8 +5365,8 @@ class ao {
|
|
|
5247
5365
|
this.tempVector.z * i + x * (1 - i)
|
|
5248
5366
|
), this.camera && i > 0.5) {
|
|
5249
5367
|
this.cameraDirection.copy(this.camera.position).normalize();
|
|
5250
|
-
const
|
|
5251
|
-
s.style.opacity =
|
|
5368
|
+
const C = this.tempVector.clone().normalize().dot(this.cameraDirection) > 0.15;
|
|
5369
|
+
s.style.opacity = C ? "" : "0";
|
|
5252
5370
|
} else
|
|
5253
5371
|
s.style.opacity = "";
|
|
5254
5372
|
else
|
|
@@ -5276,10 +5394,10 @@ class ao {
|
|
|
5276
5394
|
n = !1;
|
|
5277
5395
|
break;
|
|
5278
5396
|
case "minimal":
|
|
5279
|
-
n =
|
|
5397
|
+
n = no.has(i);
|
|
5280
5398
|
break;
|
|
5281
5399
|
case "major":
|
|
5282
|
-
n =
|
|
5400
|
+
n = io.has(i);
|
|
5283
5401
|
break;
|
|
5284
5402
|
case "all":
|
|
5285
5403
|
case "capitals":
|
|
@@ -5333,6 +5451,25 @@ class ao {
|
|
|
5333
5451
|
getStyle() {
|
|
5334
5452
|
return this.currentStyle;
|
|
5335
5453
|
}
|
|
5454
|
+
/**
|
|
5455
|
+
* Get visible labels with their screen positions for canvas rendering
|
|
5456
|
+
*/
|
|
5457
|
+
getVisibleLabelsForCanvas(e, t, i) {
|
|
5458
|
+
if (this.currentStyle === "none") return [];
|
|
5459
|
+
const n = [], r = new S.Vector3();
|
|
5460
|
+
return this.labels.forEach((s) => {
|
|
5461
|
+
const o = s.element.style.opacity, l = o === "" ? 1 : parseFloat(o) || 0;
|
|
5462
|
+
if (l < 0.1 || s.element.classList.contains("hidden")) return;
|
|
5463
|
+
s.object.getWorldPosition(r), r.project(e);
|
|
5464
|
+
const c = (r.x * 0.5 + 0.5) * t, h = (-r.y * 0.5 + 0.5) * i;
|
|
5465
|
+
c >= 0 && c <= t && h >= 0 && h <= i && r.z < 1 && n.push({
|
|
5466
|
+
text: s.country.name,
|
|
5467
|
+
x: c,
|
|
5468
|
+
y: h,
|
|
5469
|
+
opacity: l
|
|
5470
|
+
});
|
|
5471
|
+
}), n;
|
|
5472
|
+
}
|
|
5336
5473
|
/**
|
|
5337
5474
|
* Dispose resources
|
|
5338
5475
|
*/
|
|
@@ -5453,7 +5590,7 @@ const wi = {
|
|
|
5453
5590
|
}
|
|
5454
5591
|
};
|
|
5455
5592
|
wi.lifeExpectancy;
|
|
5456
|
-
const
|
|
5593
|
+
const Be = 50, lo = `
|
|
5457
5594
|
uniform float uMorph;
|
|
5458
5595
|
uniform float uTime;
|
|
5459
5596
|
uniform float uParchment;
|
|
@@ -5473,7 +5610,7 @@ varying float vDiscard;
|
|
|
5473
5610
|
varying float vExtrudeAmount;
|
|
5474
5611
|
|
|
5475
5612
|
const float PI = 3.14159265359;
|
|
5476
|
-
const float RADIUS = ${
|
|
5613
|
+
const float RADIUS = ${Be.toFixed(1)};
|
|
5477
5614
|
|
|
5478
5615
|
// Hash functions for procedural variation
|
|
5479
5616
|
float hash(vec2 p) {
|
|
@@ -5663,7 +5800,7 @@ void main() {
|
|
|
5663
5800
|
|
|
5664
5801
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5665
5802
|
}
|
|
5666
|
-
`,
|
|
5803
|
+
`, ho = `
|
|
5667
5804
|
uniform sampler2D uTexture;
|
|
5668
5805
|
uniform sampler2D uDataTexture;
|
|
5669
5806
|
uniform sampler2D uCloudTexture;
|
|
@@ -5820,13 +5957,13 @@ void main() {
|
|
|
5820
5957
|
|
|
5821
5958
|
gl_FragColor = vec4(color, 1.0);
|
|
5822
5959
|
}
|
|
5823
|
-
`,
|
|
5960
|
+
`, co = `
|
|
5824
5961
|
varying vec3 vNormal;
|
|
5825
5962
|
varying vec3 vPosition;
|
|
5826
5963
|
uniform float uMorph;
|
|
5827
5964
|
|
|
5828
5965
|
const float PI = 3.14159265359;
|
|
5829
|
-
const float RADIUS = ${
|
|
5966
|
+
const float RADIUS = ${Be.toFixed(1)};
|
|
5830
5967
|
|
|
5831
5968
|
void main() {
|
|
5832
5969
|
vNormal = normalize(normalMatrix * normal);
|
|
@@ -5855,7 +5992,7 @@ void main() {
|
|
|
5855
5992
|
vPosition = pos;
|
|
5856
5993
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5857
5994
|
}
|
|
5858
|
-
`,
|
|
5995
|
+
`, uo = `
|
|
5859
5996
|
varying vec3 vNormal;
|
|
5860
5997
|
varying vec3 vPosition;
|
|
5861
5998
|
uniform float uMorph;
|
|
@@ -5870,7 +6007,7 @@ void main() {
|
|
|
5870
6007
|
|
|
5871
6008
|
gl_FragColor = vec4(color, intensity * 0.6);
|
|
5872
6009
|
}
|
|
5873
|
-
`,
|
|
6010
|
+
`, po = `
|
|
5874
6011
|
attribute float aSize;
|
|
5875
6012
|
attribute float aPhase;
|
|
5876
6013
|
uniform float uTime;
|
|
@@ -5887,7 +6024,7 @@ void main() {
|
|
|
5887
6024
|
gl_PointSize = aSize * (300.0 / -mvPosition.z) * twinkle;
|
|
5888
6025
|
gl_Position = projectionMatrix * mvPosition;
|
|
5889
6026
|
}
|
|
5890
|
-
`,
|
|
6027
|
+
`, fo = `
|
|
5891
6028
|
varying float vOpacity;
|
|
5892
6029
|
|
|
5893
6030
|
void main() {
|
|
@@ -5897,14 +6034,14 @@ void main() {
|
|
|
5897
6034
|
|
|
5898
6035
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
5899
6036
|
}
|
|
5900
|
-
`,
|
|
6037
|
+
`, Cn = {
|
|
5901
6038
|
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
5902
6039
|
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
5903
6040
|
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
5904
6041
|
light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
|
|
5905
6042
|
night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
5906
6043
|
topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
|
|
5907
|
-
},
|
|
6044
|
+
}, Pn = {
|
|
5908
6045
|
texture: "satellite",
|
|
5909
6046
|
labels: "all",
|
|
5910
6047
|
statistic: "lifeExpectancy",
|
|
@@ -5920,7 +6057,7 @@ void main() {
|
|
|
5920
6057
|
},
|
|
5921
6058
|
extrudeHeight: !1
|
|
5922
6059
|
};
|
|
5923
|
-
class
|
|
6060
|
+
class _o {
|
|
5924
6061
|
container;
|
|
5925
6062
|
config;
|
|
5926
6063
|
// Three.js core
|
|
@@ -5939,7 +6076,7 @@ class mo {
|
|
|
5939
6076
|
legend = null;
|
|
5940
6077
|
exporter = null;
|
|
5941
6078
|
countryLabels = null;
|
|
5942
|
-
textureLoader = new
|
|
6079
|
+
textureLoader = new S.TextureLoader();
|
|
5943
6080
|
dataTexture = null;
|
|
5944
6081
|
// State
|
|
5945
6082
|
morph = 0;
|
|
@@ -5959,31 +6096,31 @@ class mo {
|
|
|
5959
6096
|
} else
|
|
5960
6097
|
this.container = e;
|
|
5961
6098
|
this.config = {
|
|
5962
|
-
...
|
|
6099
|
+
...Pn,
|
|
5963
6100
|
...t,
|
|
5964
|
-
effects: { ...
|
|
6101
|
+
effects: { ...Pn.effects, ...t.effects }
|
|
5965
6102
|
}, this.init();
|
|
5966
6103
|
}
|
|
5967
6104
|
async init() {
|
|
5968
6105
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
5969
|
-
this.scene = new
|
|
6106
|
+
this.scene = new S.Scene(), this.scene.background = new S.Color(2066), this.camera = new S.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new S.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new $r(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new La(), this.config.showLegend && (this.legend = new ka()), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new oo(this.container, Be), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new Qa(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), window.addEventListener("keydown", this.handleKeydown), this.animate();
|
|
5970
6107
|
}
|
|
5971
6108
|
async createGlobe() {
|
|
5972
6109
|
const e = await this.textureLoader.loadAsync(
|
|
5973
|
-
|
|
6110
|
+
Cn[this.config.texture]
|
|
5974
6111
|
);
|
|
5975
|
-
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter =
|
|
6112
|
+
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = S.LinearMipmapLinearFilter, e.magFilter = S.LinearFilter;
|
|
5976
6113
|
const t = document.createElement("canvas");
|
|
5977
|
-
t.width = 2048, t.height = 1024, this.dataTexture = new
|
|
5978
|
-
const i = new
|
|
5979
|
-
Math.PI * 2 *
|
|
5980
|
-
Math.PI *
|
|
6114
|
+
t.width = 2048, t.height = 1024, this.dataTexture = new S.CanvasTexture(t);
|
|
6115
|
+
const i = new S.PlaneGeometry(
|
|
6116
|
+
Math.PI * 2 * Be,
|
|
6117
|
+
Math.PI * Be,
|
|
5981
6118
|
256,
|
|
5982
6119
|
128
|
|
5983
6120
|
);
|
|
5984
|
-
this.material = new
|
|
5985
|
-
vertexShader:
|
|
5986
|
-
fragmentShader:
|
|
6121
|
+
this.material = new S.ShaderMaterial({
|
|
6122
|
+
vertexShader: lo,
|
|
6123
|
+
fragmentShader: ho,
|
|
5987
6124
|
uniforms: {
|
|
5988
6125
|
// Core uniforms
|
|
5989
6126
|
uMorph: { value: 0 },
|
|
@@ -5998,7 +6135,7 @@ class mo {
|
|
|
5998
6135
|
uDataOpacity: { value: 0 },
|
|
5999
6136
|
uDataOverlay: { value: 0 },
|
|
6000
6137
|
uExtrudeHeight: { value: this.config.extrudeHeight ? 1 : 0 },
|
|
6001
|
-
uSunDir: { value: new
|
|
6138
|
+
uSunDir: { value: new S.Vector3(1, 0.5, 1).normalize() },
|
|
6002
6139
|
// Effect uniforms
|
|
6003
6140
|
uClouds: { value: this.config.effects.clouds ? 1 : 0 },
|
|
6004
6141
|
uCloudSpeed: { value: this.config.effects.cloudSpeed || 1 },
|
|
@@ -6016,54 +6153,54 @@ class mo {
|
|
|
6016
6153
|
uScanEffect: { value: 0 },
|
|
6017
6154
|
uScanSpeed: { value: 1 },
|
|
6018
6155
|
uHologram: { value: this.config.effects.hologramMode ? 1 : 0 },
|
|
6019
|
-
uHologramColor: { value: new
|
|
6156
|
+
uHologramColor: { value: new S.Color(65535) },
|
|
6020
6157
|
uVintage: { value: this.config.effects.vintageMode ? 1 : 0 },
|
|
6021
6158
|
uThermal: { value: this.config.effects.thermalMode ? 1 : 0 },
|
|
6022
6159
|
uBlueprint: { value: this.config.effects.blueprintMode ? 1 : 0 },
|
|
6023
6160
|
uGlowPulse: { value: this.config.effects.glowPulse ? 1 : 0 },
|
|
6024
|
-
uGlowColor: { value: new
|
|
6161
|
+
uGlowColor: { value: new S.Color(4491519) }
|
|
6025
6162
|
},
|
|
6026
|
-
side:
|
|
6027
|
-
}), this.globe = new
|
|
6163
|
+
side: S.DoubleSide
|
|
6164
|
+
}), this.globe = new S.Mesh(i, this.material), this.scene.add(this.globe);
|
|
6028
6165
|
}
|
|
6029
6166
|
createAtmosphere() {
|
|
6030
|
-
const e = new
|
|
6031
|
-
Math.PI * 2 *
|
|
6032
|
-
Math.PI *
|
|
6167
|
+
const e = new S.PlaneGeometry(
|
|
6168
|
+
Math.PI * 2 * Be * 1.15,
|
|
6169
|
+
Math.PI * Be * 1.15,
|
|
6033
6170
|
128,
|
|
6034
6171
|
64
|
|
6035
|
-
), t = new
|
|
6036
|
-
vertexShader:
|
|
6037
|
-
fragmentShader:
|
|
6172
|
+
), t = new S.ShaderMaterial({
|
|
6173
|
+
vertexShader: co,
|
|
6174
|
+
fragmentShader: uo,
|
|
6038
6175
|
uniforms: {
|
|
6039
6176
|
uMorph: { value: 0 }
|
|
6040
6177
|
},
|
|
6041
|
-
side:
|
|
6178
|
+
side: S.BackSide,
|
|
6042
6179
|
transparent: !0,
|
|
6043
|
-
blending:
|
|
6180
|
+
blending: S.AdditiveBlending,
|
|
6044
6181
|
depthWrite: !1
|
|
6045
6182
|
});
|
|
6046
|
-
this.atmosphere = new
|
|
6183
|
+
this.atmosphere = new S.Mesh(e, t), this.scene.add(this.atmosphere);
|
|
6047
6184
|
}
|
|
6048
6185
|
createStars() {
|
|
6049
|
-
const t = new
|
|
6186
|
+
const t = new S.BufferGeometry(), i = new Float32Array(3e3 * 3), n = new Float32Array(3e3), r = new Float32Array(3e3);
|
|
6050
6187
|
for (let o = 0; o < 3e3; o++) {
|
|
6051
6188
|
const l = 300 + Math.random() * 300, c = Math.random() * Math.PI * 2, h = Math.acos(2 * Math.random() - 1);
|
|
6052
6189
|
i[o * 3] = l * Math.sin(h) * Math.cos(c), i[o * 3 + 1] = l * Math.sin(h) * Math.sin(c), i[o * 3 + 2] = l * Math.cos(h), n[o] = 0.5 + Math.random() * 1.5, r[o] = Math.random() * Math.PI * 2;
|
|
6053
6190
|
}
|
|
6054
|
-
t.setAttribute("position", new
|
|
6055
|
-
const s = new
|
|
6056
|
-
vertexShader:
|
|
6057
|
-
fragmentShader:
|
|
6191
|
+
t.setAttribute("position", new S.BufferAttribute(i, 3)), t.setAttribute("aSize", new S.BufferAttribute(n, 1)), t.setAttribute("aPhase", new S.BufferAttribute(r, 1));
|
|
6192
|
+
const s = new S.ShaderMaterial({
|
|
6193
|
+
vertexShader: po,
|
|
6194
|
+
fragmentShader: fo,
|
|
6058
6195
|
uniforms: {
|
|
6059
6196
|
uTime: { value: 0 },
|
|
6060
6197
|
uTwinkle: { value: this.config.effects.starTwinkle ? 1 : 0 }
|
|
6061
6198
|
},
|
|
6062
6199
|
transparent: !0,
|
|
6063
|
-
blending:
|
|
6200
|
+
blending: S.AdditiveBlending,
|
|
6064
6201
|
depthWrite: !1
|
|
6065
6202
|
});
|
|
6066
|
-
this.stars = new
|
|
6203
|
+
this.stars = new S.Points(t, s), this.scene.add(this.stars);
|
|
6067
6204
|
}
|
|
6068
6205
|
createGUI() {
|
|
6069
6206
|
this.gui = new Vi({ title: "Globe Controls", width: 300 });
|
|
@@ -6130,11 +6267,11 @@ class mo {
|
|
|
6130
6267
|
return;
|
|
6131
6268
|
}
|
|
6132
6269
|
this.currentStatistic = e;
|
|
6133
|
-
const i =
|
|
6270
|
+
const i = Ma.find((n) => n.id === e);
|
|
6134
6271
|
if (i && this.choropleth) {
|
|
6135
6272
|
const n = this.choropleth.renderTexture(i);
|
|
6136
6273
|
if (this.material && n) {
|
|
6137
|
-
const r = new
|
|
6274
|
+
const r = new S.CanvasTexture(n);
|
|
6138
6275
|
r.needsUpdate = !0, this.material.uniforms.uDataTexture.value = r, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
|
|
6139
6276
|
}
|
|
6140
6277
|
}
|
|
@@ -6148,7 +6285,7 @@ class mo {
|
|
|
6148
6285
|
t.definition.domain
|
|
6149
6286
|
);
|
|
6150
6287
|
if (this.material && i) {
|
|
6151
|
-
const n = new
|
|
6288
|
+
const n = new S.CanvasTexture(i);
|
|
6152
6289
|
n.needsUpdate = !0, this.material.uniforms.uDataTexture.value = n, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
|
|
6153
6290
|
}
|
|
6154
6291
|
}
|
|
@@ -6159,11 +6296,11 @@ class mo {
|
|
|
6159
6296
|
this.countryLabels?.setStyle(e);
|
|
6160
6297
|
}
|
|
6161
6298
|
async setTexture(e) {
|
|
6162
|
-
const t =
|
|
6299
|
+
const t = Cn[e];
|
|
6163
6300
|
if (!(!t || !this.material))
|
|
6164
6301
|
try {
|
|
6165
6302
|
const i = await this.textureLoader.loadAsync(t);
|
|
6166
|
-
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter =
|
|
6303
|
+
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter = S.LinearMipmapLinearFilter, i.magFilter = S.LinearFilter, this.material.uniforms.uTexture.value = i;
|
|
6167
6304
|
} catch (i) {
|
|
6168
6305
|
console.error("Failed to load texture:", e, i);
|
|
6169
6306
|
}
|
|
@@ -6199,8 +6336,10 @@ class mo {
|
|
|
6199
6336
|
}
|
|
6200
6337
|
export {
|
|
6201
6338
|
wi as BUILT_IN_STATISTICS,
|
|
6202
|
-
|
|
6339
|
+
_o as GlobeViz,
|
|
6203
6340
|
Tr as WORLD_STATISTICS,
|
|
6341
|
+
Sr as createFormatter,
|
|
6342
|
+
go as formatValue,
|
|
6204
6343
|
Ia as normalizeCountryValues,
|
|
6205
6344
|
gn as toNumericCode
|
|
6206
6345
|
};
|