aptechka 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Tweened-CDYmG9hk.js +138 -0
- package/lib/Tweened-DlyMbHu_.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +53 -6
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +28 -26
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +14 -18
- package/lib/order/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +189 -171
- package/package.json +1 -9
- package/lib/Animation-CuR3fbKl.js +0 -104
- package/lib/Animation-Dt4Kc5VA.cjs +0 -1
- package/lib/Damped-C236fv4v.cjs +0 -1
- package/lib/Damped-OSAezqOR.js +0 -52
- package/lib/Tweened-B7zGiekd.cjs +0 -1
- package/lib/Tweened-DfDr-AYv.js +0 -43
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/pointer/Pointer.d.ts +0 -22
- package/lib/pointer/PointerElement.d.ts +0 -13
- package/lib/pointer/index.cjs +0 -1
- package/lib/pointer/index.d.ts +0 -2
- package/lib/pointer/index.js +0 -151
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
var K = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
+
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var I = Object.getOwnPropertySymbols;
|
|
4
|
+
var _ = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var T = (i) => {
|
|
6
|
+
throw TypeError(i);
|
|
7
|
+
};
|
|
8
|
+
var P = (i, s, t) => s in i ? K(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t, R = (i, s) => {
|
|
9
|
+
for (var t in s || (s = {}))
|
|
10
|
+
_.call(s, t) && P(i, t, s[t]);
|
|
11
|
+
if (I)
|
|
12
|
+
for (var t of I(s))
|
|
13
|
+
j.call(s, t) && P(i, t, s[t]);
|
|
14
|
+
return i;
|
|
15
|
+
}, y = (i, s) => L(i, V(s));
|
|
16
|
+
var q = (i, s, t) => s.has(i) || T("Cannot " + t);
|
|
17
|
+
var e = (i, s, t) => (q(i, s, "read from private field"), t ? t.call(i) : s.get(i)), a = (i, s, t) => s.has(i) ? T("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), h = (i, s, t, r) => (q(i, s, "write to private field"), r ? r.call(i, t) : s.set(i, t), t), N = (i, s, t) => (q(i, s, "access private method"), t);
|
|
18
|
+
import { l as B } from "./easings-BKi40vHz.js";
|
|
19
|
+
import { p as z, n as c, c as E } from "./polyfills-AItxku8u.js";
|
|
20
|
+
import { S as w } from "./Store-OTdcl6SX.js";
|
|
21
|
+
import { ticker as C } from "./ticker/index.js";
|
|
22
|
+
import { TICK_ORDER as G } from "./order/index.js";
|
|
23
|
+
var f, A, F, l, S, n, u, m, d, g, M, k, O;
|
|
24
|
+
class H extends w {
|
|
25
|
+
constructor(t, r) {
|
|
26
|
+
super(t || 0, r);
|
|
27
|
+
a(this, M);
|
|
28
|
+
a(this, f);
|
|
29
|
+
a(this, A, G.ANIMATION);
|
|
30
|
+
a(this, F);
|
|
31
|
+
a(this, l, new w(!1));
|
|
32
|
+
a(this, S, 0);
|
|
33
|
+
a(this, n, 0);
|
|
34
|
+
a(this, u, -1 / 0);
|
|
35
|
+
a(this, m, 1 / 0);
|
|
36
|
+
a(this, d, 0);
|
|
37
|
+
a(this, g, null);
|
|
38
|
+
a(this, O, (t) => {
|
|
39
|
+
this.handleAnimationFrame(t);
|
|
40
|
+
});
|
|
41
|
+
h(this, n, this.current);
|
|
42
|
+
}
|
|
43
|
+
get direction() {
|
|
44
|
+
return e(this, S);
|
|
45
|
+
}
|
|
46
|
+
get target() {
|
|
47
|
+
return e(this, n);
|
|
48
|
+
}
|
|
49
|
+
get min() {
|
|
50
|
+
return e(this, u);
|
|
51
|
+
}
|
|
52
|
+
set min(t) {
|
|
53
|
+
h(this, u, t), this.set(e(this, n), {
|
|
54
|
+
equalize: !0
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
get max() {
|
|
58
|
+
return e(this, m);
|
|
59
|
+
}
|
|
60
|
+
set max(t) {
|
|
61
|
+
h(this, m, t), this.set(e(this, n), {
|
|
62
|
+
equalize: !0
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
get from() {
|
|
66
|
+
return e(this, d);
|
|
67
|
+
}
|
|
68
|
+
get isRunning() {
|
|
69
|
+
return e(this, l);
|
|
70
|
+
}
|
|
71
|
+
get delta() {
|
|
72
|
+
return Math.abs(e(this, n) - e(this, d));
|
|
73
|
+
}
|
|
74
|
+
get deltaProgress() {
|
|
75
|
+
return this.delta ? z(Math.abs(this.current - e(this, d)) / this.delta, 6) : 0;
|
|
76
|
+
}
|
|
77
|
+
get distance() {
|
|
78
|
+
return Math.abs(e(this, m) - e(this, u));
|
|
79
|
+
}
|
|
80
|
+
get distanceProgress() {
|
|
81
|
+
return this.distance ? z(Math.abs(this.current - e(this, u)) / this.distance, 6) : 0;
|
|
82
|
+
}
|
|
83
|
+
set(t, r) {
|
|
84
|
+
(e(this, n) !== t || r != null && r.restart) && (h(this, g, t), this.updateOptions(r), h(this, g, null), e(this, n) !== this.current && this.start());
|
|
85
|
+
}
|
|
86
|
+
shift(t, r) {
|
|
87
|
+
this.set(e(this, n) + t, r);
|
|
88
|
+
}
|
|
89
|
+
reset() {
|
|
90
|
+
super.reset(), this.set(this.initial, { equalize: !0 });
|
|
91
|
+
}
|
|
92
|
+
close() {
|
|
93
|
+
super.close(), this.reset(), this.unlistenAnimationFrame();
|
|
94
|
+
}
|
|
95
|
+
listenAnimationFrame() {
|
|
96
|
+
e(this, l).current || (e(this, l).current = !0, C.subscribe(e(this, O), {
|
|
97
|
+
maxFPS: e(this, f),
|
|
98
|
+
order: e(this, A),
|
|
99
|
+
culling: e(this, F)
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
unlistenAnimationFrame() {
|
|
103
|
+
e(this, l).current && (e(this, l).current = !1, C.unsubscribe(e(this, O)));
|
|
104
|
+
}
|
|
105
|
+
updateOptions(t) {
|
|
106
|
+
h(this, f, c(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, A, c(t == null ? void 0 : t.order, e(this, A))), h(this, F, c(t == null ? void 0 : t.culling, e(this, F))), h(this, u, c(t == null ? void 0 : t.min, e(this, u))), h(this, m, c(t == null ? void 0 : t.max, e(this, m))), N(this, M, k).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, n)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = e(this, n)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
|
|
107
|
+
}
|
|
108
|
+
start() {
|
|
109
|
+
this.listenAnimationFrame();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
f = new WeakMap(), A = new WeakMap(), F = new WeakMap(), l = new WeakMap(), S = new WeakMap(), n = new WeakMap(), u = new WeakMap(), m = new WeakMap(), d = new WeakMap(), g = new WeakMap(), M = new WeakSet(), k = function(t) {
|
|
113
|
+
h(this, S, Math.sign(t - e(this, n))), h(this, n, E(t, e(this, u), e(this, m))), h(this, d, this.current);
|
|
114
|
+
}, O = new WeakMap();
|
|
115
|
+
var b, x;
|
|
116
|
+
class Z extends H {
|
|
117
|
+
constructor(t, r) {
|
|
118
|
+
super(t || 0, r);
|
|
119
|
+
a(this, b, B);
|
|
120
|
+
a(this, x, 1e3);
|
|
121
|
+
this.updateOptions(y(R({}, r), { equalize: !0 }));
|
|
122
|
+
}
|
|
123
|
+
updateOptions(t) {
|
|
124
|
+
super.updateOptions(t), h(this, b, c(t == null ? void 0 : t.easing, e(this, b))), h(this, x, c(t == null ? void 0 : t.duration, e(this, x)));
|
|
125
|
+
}
|
|
126
|
+
handleAnimationFrame(t) {
|
|
127
|
+
const r = t.timeElapsedSinceSubscription / 1e3 / (e(this, x) / 1e3), D = e(this, b).call(this, E(r, 0, 1));
|
|
128
|
+
this.current = z(this.from + (this.target - this.from) * D, 6), r > 1 && this.unlistenAnimationFrame();
|
|
129
|
+
}
|
|
130
|
+
start() {
|
|
131
|
+
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
b = new WeakMap(), x = new WeakMap();
|
|
135
|
+
export {
|
|
136
|
+
H as A,
|
|
137
|
+
Z as T
|
|
138
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var E=Object.defineProperty,D=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var I=i=>{throw TypeError(i)};var z=(i,s,t)=>s in i?E(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,N=(i,s)=>{for(var t in s||(s={}))L.call(s,t)&&z(i,t,s[t]);if(M)for(var t of M(s))V.call(s,t)&&z(i,t,s[t]);return i},P=(i,s)=>D(i,K(s));var O=(i,s,t)=>s.has(i)||I("Cannot "+t);var e=(i,s,t)=>(O(i,s,"read from private field"),t?t.call(i):s.get(i)),a=(i,s,t)=>s.has(i)?I("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),h=(i,s,t,r)=>(O(i,s,"write to private field"),r?r.call(i,t):s.set(i,t),t),T=(i,s,t)=>(O(i,s,"access private method"),t);const j=require("./easings-DsS5-Kqc.cjs"),u=require("./polyfills-Caa6z-Ay.cjs"),y=require("./Store-CDb6RMce.cjs"),R=require("./ticker/index.cjs"),B=require("./order/index.cjs");var f,A,F,m,q,n,l,c,g,d,C,w,S;class k extends y.Store{constructor(t,r){super(t||0,r);a(this,C);a(this,f);a(this,A,B.TICK_ORDER.ANIMATION);a(this,F);a(this,m,new y.Store(!1));a(this,q,0);a(this,n,0);a(this,l,-1/0);a(this,c,1/0);a(this,g,0);a(this,d,null);a(this,S,t=>{this.handleAnimationFrame(t)});h(this,n,this.current)}get direction(){return e(this,q)}get target(){return e(this,n)}get min(){return e(this,l)}set min(t){h(this,l,t),this.set(e(this,n),{equalize:!0})}get max(){return e(this,c)}set max(t){h(this,c,t),this.set(e(this,n),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,m)}get delta(){return Math.abs(e(this,n)-e(this,g))}get deltaProgress(){return this.delta?u.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,c)-e(this,l))}get distanceProgress(){return this.distance?u.preciseNumber(Math.abs(this.current-e(this,l))/this.distance,6):0}set(t,r){(e(this,n)!==t||r!=null&&r.restart)&&(h(this,d,t),this.updateOptions(r),h(this,d,null),e(this,n)!==this.current&&this.start())}shift(t,r){this.set(e(this,n)+t,r)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,m).current||(e(this,m).current=!0,R.ticker.subscribe(e(this,S),{maxFPS:e(this,f),order:e(this,A),culling:e(this,F)}))}unlistenAnimationFrame(){e(this,m).current&&(e(this,m).current=!1,R.ticker.unsubscribe(e(this,S)))}updateOptions(t){h(this,f,u.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,A,u.nullishCoalescing(t==null?void 0:t.order,e(this,A))),h(this,F,u.nullishCoalescing(t==null?void 0:t.culling,e(this,F))),h(this,l,u.nullishCoalescing(t==null?void 0:t.min,e(this,l))),h(this,c,u.nullishCoalescing(t==null?void 0:t.max,e(this,c))),T(this,C,w).call(this,typeof e(this,d)=="number"?e(this,d):e(this,n)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,n)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,A=new WeakMap,F=new WeakMap,m=new WeakMap,q=new WeakMap,n=new WeakMap,l=new WeakMap,c=new WeakMap,g=new WeakMap,d=new WeakMap,C=new WeakSet,w=function(t){h(this,q,Math.sign(t-e(this,n))),h(this,n,u.clamp(t,e(this,l),e(this,c))),h(this,g,this.current)},S=new WeakMap;var b,x;class G extends k{constructor(t,r){super(t||0,r);a(this,b,j.linear);a(this,x,1e3);this.updateOptions(P(N({},r),{equalize:!0}))}updateOptions(t){super.updateOptions(t),h(this,b,u.nullishCoalescing(t==null?void 0:t.easing,e(this,b))),h(this,x,u.nullishCoalescing(t==null?void 0:t.duration,e(this,x)))}handleAnimationFrame(t){const r=t.timeElapsedSinceSubscription/1e3/(e(this,x)/1e3),_=e(this,b).call(this,u.clamp(r,0,1));this.current=u.preciseNumber(this.from+(this.target-this.from)*_,6),r>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}b=new WeakMap,x=new WeakMap;exports.Animation=k;exports.Tweened=G;
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var F=Object.defineProperty,O=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var f=t=>{throw TypeError(t)};var g=(t,s,e)=>s in t?F(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,p=(t,s)=>{for(var e in s||(s={}))q.call(s,e)&&g(t,e,s[e]);if(d)for(var e of d(s))v.call(s,e)&&g(t,e,s[e]);return t},b=(t,s)=>O(t,T(s));var w=(t,s,e)=>s.has(t)||f("Cannot "+e);var a=(t,s,e)=>(w(t,s,"read from private field"),e?e.call(t):s.get(t)),c=(t,s,e)=>s.has(t)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),m=(t,s,e,r)=>(w(t,s,"write to private field"),r?r.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../Tweened-DlyMbHu_.cjs"),n=require("../polyfills-Caa6z-Ay.cjs");var i,h;class C extends l.Animation{constructor(e,r){super(e,r);c(this,i);c(this,h);this.damping=20,this.stiffness=0,this.mass=0,m(this,i,0),m(this,h,0),this.updateOptions(b(p({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(e){this.damping=n.nullishCoalescing(e==null?void 0:e.damping,this.damping),this.mass=n.nullishCoalescing(e==null?void 0:e.mass,this.mass),this.stiffness=n.nullishCoalescing(e==null?void 0:e.stiffness,this.stiffness),super.updateOptions(e)}handleAnimationFrame(e){n.preciseNumber(this.current,6)===n.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,y=Math.abs(r-this.target);m(this,h,y/e.timeBetweenFrames);const u=e.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const A=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;m(this,i,a(this,i)+A/this.mass*u),this.current+=a(this,i)*u}else this.current=n.damp(this.current,this.target,this.damping,u)}}i=new WeakMap,h=new WeakMap;exports.Animation=l.Animation;exports.Tweened=l.Tweened;exports.Damped=C;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,8 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var O = Object.defineProperty, b = Object.defineProperties;
|
|
2
|
+
var v = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var d = Object.getOwnPropertySymbols;
|
|
4
|
+
var y = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var g = (s) => {
|
|
6
|
+
throw TypeError(s);
|
|
7
|
+
};
|
|
8
|
+
var f = (s, e, t) => e in s ? O(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, l = (s, e) => {
|
|
9
|
+
for (var t in e || (e = {}))
|
|
10
|
+
y.call(e, t) && f(s, t, e[t]);
|
|
11
|
+
if (d)
|
|
12
|
+
for (var t of d(e))
|
|
13
|
+
B.call(e, t) && f(s, t, e[t]);
|
|
14
|
+
return s;
|
|
15
|
+
}, p = (s, e) => b(s, v(e));
|
|
16
|
+
var A = (s, e, t) => e.has(s) || g("Cannot " + t);
|
|
17
|
+
var a = (s, e, t) => (A(s, e, "read from private field"), t ? t.call(s) : e.get(s)), c = (s, e, t) => e.has(s) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), n = (s, e, t, r) => (A(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
|
|
18
|
+
import { A as T } from "../Tweened-CDYmG9hk.js";
|
|
19
|
+
import { T as k } from "../Tweened-CDYmG9hk.js";
|
|
20
|
+
import { n as u, p as F, d as q } from "../polyfills-AItxku8u.js";
|
|
21
|
+
var i, h;
|
|
22
|
+
class M extends T {
|
|
23
|
+
constructor(t, r) {
|
|
24
|
+
super(t, r);
|
|
25
|
+
c(this, i);
|
|
26
|
+
c(this, h);
|
|
27
|
+
this.damping = 20, this.stiffness = 0, this.mass = 0, n(this, i, 0), n(this, h, 0), this.updateOptions(p(l({}, r), { equalize: !0 }));
|
|
28
|
+
}
|
|
29
|
+
get velocity() {
|
|
30
|
+
return a(this, i);
|
|
31
|
+
}
|
|
32
|
+
get speed() {
|
|
33
|
+
return a(this, h);
|
|
34
|
+
}
|
|
35
|
+
updateOptions(t) {
|
|
36
|
+
this.damping = u(t == null ? void 0 : t.damping, this.damping), this.mass = u(t == null ? void 0 : t.mass, this.mass), this.stiffness = u(t == null ? void 0 : t.stiffness, this.stiffness), super.updateOptions(t);
|
|
37
|
+
}
|
|
38
|
+
handleAnimationFrame(t) {
|
|
39
|
+
F(this.current, 6) === F(this.target, 6) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
40
|
+
const r = this.current, w = Math.abs(r - this.target);
|
|
41
|
+
n(this, h, w / t.timeBetweenFrames);
|
|
42
|
+
const m = t.timeBetweenFrames / 1e3;
|
|
43
|
+
if (this.mass || this.stiffness) {
|
|
44
|
+
const x = (this.target - this.current) * this.stiffness - a(this, i) * this.damping;
|
|
45
|
+
n(this, i, a(this, i) + x / this.mass * m), this.current += a(this, i) * m;
|
|
46
|
+
} else
|
|
47
|
+
this.current = q(this.current, this.target, this.damping, m);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
i = new WeakMap(), h = new WeakMap();
|
|
4
51
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
52
|
+
T as Animation,
|
|
53
|
+
M as Damped,
|
|
54
|
+
k as Tweened
|
|
8
55
|
};
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=h=>{throw TypeError(h)};var
|
|
1
|
+
"use strict";var Q=h=>{throw TypeError(h)};var N=(h,n,e)=>n.has(h)||Q("Cannot "+e);var t=(h,n,e)=>(N(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?Q("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),i=(h,n,e,a)=>(N(h,n,"write to private field"),a?a.call(h,e):n.set(h,e),e),L=(h,n,e)=>(N(h,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-DlyMbHu_.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-Caa6z-Ay.cjs"),_=require("../order/index.cjs");var R;class K{constructor(){s(this,R,new V.Notifier)}get changeEvent(){return t(this,R)}}R=new WeakMap;var w,d,u,D;class p extends K{constructor(e){super();s(this,w,null);s(this,d,null);s(this,u,"offsetHeight");s(this,D,e=>{const a=e.shiftKey?-1:1;let r;e.code==="Space"?r=a*t(this,d)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,d)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,d)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,d)[t(this,u)]:e.code==="PageDown"?r=1*t(this,d)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,d).scrollWidth:t(this,d).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,d,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,D))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,D))}}w=new WeakMap,d=new WeakMap,u=new WeakMap,D=new WeakMap;var b,E,H,P,l,C,f,o,O,F,q,W,T;class ee extends K{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,l);s(this,C);s(this,f);s(this,q);s(this,W);s(this,T);this.direction=1,i(this,l,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,q,a=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",a.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,l).current))}),i(this,W,()=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,l).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,l).set(1,{equalize:!0}):t(this,l).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,O).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,O).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,O).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e){e&&!t(this,l).target&&(clearInterval(t(this,C)),t(this,l).set(1,{duration:Math.min(e,1e3)}),i(this,C,setTimeout(()=>{t(this,l).set(0,{duration:Math.min(e,5e3)})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,l=new WeakMap,C=new WeakMap,f=new WeakMap,o=new WeakSet,O=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,W),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,q),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,q)),clearInterval(t(this,C)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,T))},q=new WeakMap,W=new WeakMap,T=new WeakMap;var B,x,I,X;class te extends K{constructor(e){super();s(this,B,null);s(this,x);s(this,I);s(this,X,e=>{let a=0;if(e.preventDefault(),!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(a=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const r=Date.now();if(r-t(this,I)>40&&(a=100*Math.sign(a)),i(this,I,r),Math.abs(a)<100||t(this,x))return;this.changeEvent.notify("wheel",a),i(this,x,setTimeout(()=>{i(this,x,void 0)},80))}else this.changeEvent.notify("wheel",a)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,I,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,X),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,X)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,I=new WeakMap,X=new WeakMap;var v,g,A,c,Y,M;const y=class y extends K{constructor(e){super();s(this,g,null);s(this,A,!1);s(this,c,0);s(this,Y,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let a=e;i(this,c,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,A)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,A,!0);const S=a.x-r.x,z=a.y-r.y;this.axis==="x"?i(this,c,S):i(this,c,z),a=r,(this.axis==="x"&&Math.abs(S)>Math.abs(z)||this.axis==="y"&&Math.abs(z)>Math.abs(S))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(y,v,null),this.swipe||(i(this,c,t(this,c)*3),k.ticker.subscribe(t(this,M),{order:_.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,M,()=>{Math.floor(t(this,c))||k.ticker.unsubscribe(t(this,M)),i(this,c,t(this,c)*.95),i(this,c,$.preciseNumber(t(this,c),3)),this.changeEvent.notify("drag",t(this,c))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,Y))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,Y)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,A=new WeakMap,c=new WeakMap,Y=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=K;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var Q = (h) => {
|
|
2
2
|
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var t = (h, n, e) => (
|
|
4
|
+
var F = (h, n, e) => n.has(h) || Q("Cannot " + e);
|
|
5
|
+
var t = (h, n, e) => (F(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? Q("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), i = (h, n, e, r) => (F(h, n, "write to private field"), r ? r.call(h, e) : n.set(h, e), e), M = (h, n, e) => (F(h, n, "access private method"), e);
|
|
6
6
|
import { Notifier as j } from "../notifier/index.js";
|
|
7
7
|
import { i as m } from "../browser-0zX67oeU.js";
|
|
8
8
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
9
|
-
import { ticker as
|
|
9
|
+
import { ticker as T } from "../ticker/index.js";
|
|
10
10
|
import "../Store-OTdcl6SX.js";
|
|
11
11
|
import { e as G } from "../easings-BKi40vHz.js";
|
|
12
|
-
import { T as J } from "../Tweened-
|
|
12
|
+
import { T as J } from "../Tweened-CDYmG9hk.js";
|
|
13
13
|
import { s as Z } from "../gestures-D2Fdra_G.js";
|
|
14
14
|
import { p as $ } from "../polyfills-AItxku8u.js";
|
|
15
15
|
import { TICK_ORDER as p } from "../order/index.js";
|
|
16
|
-
var
|
|
17
|
-
class
|
|
16
|
+
var N;
|
|
17
|
+
class O {
|
|
18
18
|
constructor() {
|
|
19
|
-
s(this,
|
|
19
|
+
s(this, N, new j());
|
|
20
20
|
}
|
|
21
21
|
get changeEvent() {
|
|
22
|
-
return t(this,
|
|
22
|
+
return t(this, N);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
N = new WeakMap();
|
|
26
26
|
var b, c, f, P;
|
|
27
|
-
class ce extends
|
|
27
|
+
class ce extends O {
|
|
28
28
|
constructor(e) {
|
|
29
29
|
super();
|
|
30
30
|
s(this, b, null);
|
|
@@ -54,8 +54,8 @@ class ce extends B {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
b = new WeakMap(), c = new WeakMap(), f = new WeakMap(), P = new WeakMap();
|
|
57
|
-
var o, y, X, Y, l,
|
|
58
|
-
class fe extends
|
|
57
|
+
var o, y, X, Y, l, I, u, w, K, S, k, R, C;
|
|
58
|
+
class fe extends O {
|
|
59
59
|
constructor(e) {
|
|
60
60
|
super();
|
|
61
61
|
s(this, w);
|
|
@@ -64,7 +64,7 @@ class fe extends B {
|
|
|
64
64
|
s(this, X);
|
|
65
65
|
s(this, Y);
|
|
66
66
|
s(this, l);
|
|
67
|
-
s(this,
|
|
67
|
+
s(this, I);
|
|
68
68
|
s(this, u);
|
|
69
69
|
s(this, k);
|
|
70
70
|
s(this, R);
|
|
@@ -96,27 +96,27 @@ class fe extends B {
|
|
|
96
96
|
t(this, u) && (i(this, u, !1), M(this, w, S).call(this));
|
|
97
97
|
}
|
|
98
98
|
pauseAndContinue(e) {
|
|
99
|
-
e && !t(this, l).target && (clearInterval(t(this,
|
|
99
|
+
e && !t(this, l).target && (clearInterval(t(this, I)), t(this, l).set(1, { duration: Math.min(e, 1e3) }), i(this, I, setTimeout(() => {
|
|
100
100
|
t(this, l).set(0, { duration: Math.min(e, 5e3) });
|
|
101
101
|
}, e)));
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
o = new WeakMap(), y = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(),
|
|
104
|
+
o = new WeakMap(), y = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(), I = new WeakMap(), u = new WeakMap(), w = new WeakSet(), K = function() {
|
|
105
105
|
M(this, w, S).call(this), t(this, y) ? i(this, Y, setInterval(
|
|
106
106
|
t(this, R),
|
|
107
107
|
Math.abs(t(this, o))
|
|
108
|
-
)) :
|
|
108
|
+
)) : T.subscribe(t(this, k), t(this, X)), document.addEventListener(
|
|
109
109
|
"visibilitychange",
|
|
110
110
|
t(this, C)
|
|
111
111
|
);
|
|
112
112
|
}, S = function() {
|
|
113
|
-
clearInterval(t(this, Y)),
|
|
113
|
+
clearInterval(t(this, Y)), T.unsubscribe(t(this, k)), clearInterval(t(this, I)), t(this, l).close(), document.removeEventListener(
|
|
114
114
|
"visibilitychange",
|
|
115
115
|
t(this, C)
|
|
116
116
|
);
|
|
117
117
|
}, k = new WeakMap(), R = new WeakMap(), C = new WeakMap();
|
|
118
118
|
var A, v, D, W;
|
|
119
|
-
class ue extends
|
|
119
|
+
class ue extends O {
|
|
120
120
|
constructor(e) {
|
|
121
121
|
super();
|
|
122
122
|
s(this, A, null);
|
|
@@ -155,7 +155,7 @@ class ue extends B {
|
|
|
155
155
|
}
|
|
156
156
|
A = new WeakMap(), v = new WeakMap(), D = new WeakMap(), W = new WeakMap();
|
|
157
157
|
var x, g, H, d, z, L;
|
|
158
|
-
const E = class E extends
|
|
158
|
+
const E = class E extends O {
|
|
159
159
|
constructor(e) {
|
|
160
160
|
super();
|
|
161
161
|
s(this, g, null);
|
|
@@ -166,23 +166,25 @@ const E = class E extends B {
|
|
|
166
166
|
(a) => a instanceof HTMLElement && a.hasAttribute("drag-dead-zone")
|
|
167
167
|
))
|
|
168
168
|
return;
|
|
169
|
-
this.swipe ||
|
|
169
|
+
this.swipe || T.unsubscribe(t(this, L));
|
|
170
170
|
let r = e;
|
|
171
171
|
i(this, d, 0), document.documentElement.classList.add("grabbing"), Z(
|
|
172
172
|
(a) => {
|
|
173
173
|
if (t(this, H) || t(E, x) && t(E, x) !== t(this, g))
|
|
174
174
|
return;
|
|
175
175
|
this.swipe && i(this, H, !0);
|
|
176
|
-
const
|
|
177
|
-
this.axis === "x" ? i(this, d,
|
|
176
|
+
const q = r.x - a.x, B = r.y - a.y;
|
|
177
|
+
this.axis === "x" ? i(this, d, q) : i(this, d, B), r = a, (this.axis === "x" && Math.abs(q) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(q)) && (i(E, x, t(this, g)), this.changeEvent.notify("drag", t(this, d)));
|
|
178
178
|
},
|
|
179
179
|
() => {
|
|
180
|
-
i(E, x, null), this.swipe || (i(this, d, t(this, d) * 3),
|
|
180
|
+
i(E, x, null), this.swipe || (i(this, d, t(this, d) * 3), T.subscribe(t(this, L), {
|
|
181
|
+
order: p.CONTROLS - 1
|
|
182
|
+
})), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
|
|
181
183
|
}
|
|
182
184
|
);
|
|
183
185
|
});
|
|
184
186
|
s(this, L, () => {
|
|
185
|
-
Math.floor(t(this, d)) ||
|
|
187
|
+
Math.floor(t(this, d)) || T.unsubscribe(t(this, L)), i(this, d, t(this, d) * 0.95), i(this, d, $(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
|
|
186
188
|
});
|
|
187
189
|
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, g, e != null && e.element && U(e.element) || document.documentElement);
|
|
188
190
|
}
|
|
@@ -193,14 +195,14 @@ const E = class E extends B {
|
|
|
193
195
|
m && (t(this, g).removeEventListener(
|
|
194
196
|
"pointerdown",
|
|
195
197
|
t(this, z)
|
|
196
|
-
),
|
|
198
|
+
), T.unsubscribe(t(this, L)));
|
|
197
199
|
}
|
|
198
200
|
};
|
|
199
201
|
x = new WeakMap(), g = new WeakMap(), H = new WeakMap(), d = new WeakMap(), z = new WeakMap(), L = new WeakMap(), s(E, x, null);
|
|
200
202
|
let V = E;
|
|
201
203
|
export {
|
|
202
204
|
fe as AutoplayControls,
|
|
203
|
-
|
|
205
|
+
O as Controls,
|
|
204
206
|
V as DragControls,
|
|
205
207
|
ce as KeyboardControls,
|
|
206
208
|
ue as WheelControls
|
package/lib/order/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var L=(A=>(A[A.FIRST=-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var L=(A=>(A[A.FIRST=-1e4]="FIRST",A[A.DEVICE=-9999]="DEVICE",A[A.CSS_VARIABLE=-9998]="CSS_VARIABLE",A[A.MEDIA=-9997]="MEDIA",A[A.SOURCE_MANAGER=-9996]="SOURCE_MANAGER",A[A.LAYOUT_BOX=-9995]="LAYOUT_BOX",A[A.LAST=1e4]="LAST",A))(L||{}),e=(A=>(A[A.FIRST=-1e4]="FIRST",A[A.CONNECTOR=-9999]="CONNECTOR",A[A.CONTROLS=-9998]="CONTROLS",A[A.ANIMATION=-9997]="ANIMATION",A[A.LAYOUT_BOX=-9996]="LAYOUT_BOX",A[A.LADDER=-9995]="LADDER",A[A.LAST=1e4]="LAST",A))(e||{});exports.RESIZE_ORDER=L;exports.TICK_ORDER=e;
|
package/lib/order/index.d.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
export declare enum RESIZE_ORDER {
|
|
2
|
-
FIRST = -
|
|
3
|
-
DEVICE = -
|
|
4
|
-
CSS_VARIABLE = -
|
|
5
|
-
MEDIA = -
|
|
6
|
-
SOURCE_MANAGER = -
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
LAYOUT_BOX = -99993,
|
|
10
|
-
EN3 = -99992,
|
|
11
|
-
LAST = 100000
|
|
2
|
+
FIRST = -10000,
|
|
3
|
+
DEVICE = -9999,
|
|
4
|
+
CSS_VARIABLE = -9998,
|
|
5
|
+
MEDIA = -9997,
|
|
6
|
+
SOURCE_MANAGER = -9996,
|
|
7
|
+
LAYOUT_BOX = -9995,
|
|
8
|
+
LAST = 10000
|
|
12
9
|
}
|
|
13
10
|
export declare enum TICK_ORDER {
|
|
14
|
-
FIRST = -
|
|
15
|
-
CONNECTOR = -
|
|
16
|
-
|
|
17
|
-
ANIMATION = -
|
|
18
|
-
LAYOUT_BOX = -
|
|
19
|
-
LADDER = -
|
|
20
|
-
|
|
21
|
-
LAST = 100001
|
|
11
|
+
FIRST = -10000,
|
|
12
|
+
CONNECTOR = -9999,
|
|
13
|
+
CONTROLS = -9998,
|
|
14
|
+
ANIMATION = -9997,
|
|
15
|
+
LAYOUT_BOX = -9996,
|
|
16
|
+
LADDER = -9995,
|
|
17
|
+
LAST = 10000
|
|
22
18
|
}
|
package/lib/order/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var L = /* @__PURE__ */ ((A) => (A[A.FIRST = -
|
|
1
|
+
var L = /* @__PURE__ */ ((A) => (A[A.FIRST = -1e4] = "FIRST", A[A.DEVICE = -9999] = "DEVICE", A[A.CSS_VARIABLE = -9998] = "CSS_VARIABLE", A[A.MEDIA = -9997] = "MEDIA", A[A.SOURCE_MANAGER = -9996] = "SOURCE_MANAGER", A[A.LAYOUT_BOX = -9995] = "LAYOUT_BOX", A[A.LAST = 1e4] = "LAST", A))(L || {}), N = /* @__PURE__ */ ((A) => (A[A.FIRST = -1e4] = "FIRST", A[A.CONNECTOR = -9999] = "CONNECTOR", A[A.CONTROLS = -9998] = "CONTROLS", A[A.ANIMATION = -9997] = "ANIMATION", A[A.LAYOUT_BOX = -9996] = "LAYOUT_BOX", A[A.LADDER = -9995] = "LADDER", A[A.LAST = 1e4] = "LAST", A))(N || {});
|
|
2
2
|
export {
|
|
3
3
|
L as RESIZE_ORDER,
|
|
4
4
|
N as TICK_ORDER
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),u=require("../object-HBC5QlzO.cjs"),C=require("../function-MthRj-GJ.cjs"),O=require("../gestures-DHLrn6Q8.cjs"),h=require("../string-DhgS_iFl.cjs"),f=require("../layout-8ryRAMGJ.cjs"),r=require("../polyfills-Caa6z-Ay.cjs"),b=require("../style-At6aDoqG.cjs");function E(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function w(t,e){const n=t.length;e=e%n;const i=new Array(n);for(let s=0;s<n;s++){const o=(s+e)%n;i[o]=t[s]}return i}function I(t,e=2){if(!+t)return"0 Bytes";const n=1024,i=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(i))} ${s[o]}`}function B(t,e){const n=t.measureText(e),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function P(t){return Math.floor(t)+.5}function T(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(c=i,d=i*l):(d=n,c=n/l),[(n-d)*s,(i-c)*o,d,c]}function Q(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(d=n,c=n/l):(c=i,d=i*l),[(n-d)*s,(i-c)*o,d,c]}function D(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function R(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function A(t,e,n=!1){let i=t.x-e.width/2,s=e.height/2-t.y;return n&&(i=i/(e.width/2),s=s/(e.height/2)),{x:i,y:s}}function v(t,e){const n=t.x/e.width,i=t.y/e.height;return{x:n,y:i}}function q(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function x(t,e){const n=t.styleMap.get(e);if(n){const i=n.toString();return i.startsWith("var")?x(t,i.slice(4,-1)):i}}function z(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(s=>{const o=x(i,s);o&&(e[s]=o)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function M(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function $(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function g(t){let e="";for(const n in t){const i=t[n];typeof i=="object"?(e+=`${n} {`,e+=g(i),e+="}"):e+=`${h.camelToKebab(n)}: ${i};`}return e}function k(t){if(S.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(g(t)),e}return null}function N(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function j(t,e=""){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const n=t.split("#"),i=n[0].split("?"),s=i[0].startsWith("/")?i[0]:"/"+i[0],o=e+s,l=i==null?void 0:i[1],p=n==null?void 0:n[1];return{leaf:s,pathname:o,parameters:l,hash:p}}function W(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function V(t,e,n,i){const s=n||location.search,o=i?i.startsWith("#")?i:"#"+i:"",l=s?s.startsWith("?")?s:"?"+s:"",p=`${e}${o}${l}`;t==="push"?history.pushState(null,"",p):t==="replace"&&history.replaceState(null,"",p)}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.createJSONAndSave=u.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=u.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=u.dispatchSizeChangeEvent;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=O.setupDrag;exports.camelToKebab=h.camelToKebab;exports.capitalize=h.capitalize;exports.generateId=h.generateId;exports.isUppercase=h.isUppercase;exports.kebabToCamel=h.kebabToCamel;exports.snakeToDotted=h.snakeToDotted;exports.toPascalCase=h.toPascalCase;exports.uncapitalize=h.uncapitalize;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=r.calculateDistance;exports.calculateDistanceWithRadius=r.calculateDistanceWithRadius;exports.clamp=r.clamp;exports.damp=r.damp;exports.lerp=r.lerp;exports.mapRange=r.mapRange;exports.nullishCoalescing=r.nullishCoalescing;exports.preciseNumber=r.preciseNumber;exports.round=r.round;exports.roundNumberTo=r.roundNumberTo;exports.smootherstep=r.smootherstep;exports.smoothstep=r.smoothstep;exports.step=r.step;exports.toStep=r.toStep;exports.getElementTransitionDurationMS=b.getElementTransitionDurationMS;exports.getElementTransitionDurationS=b.getElementTransitionDurationS;exports.changeHistory=V;exports.contain=Q;exports.cover=T;exports.createStylesheet=k;exports.decode=$;exports.dotCircleCollision=R;exports.dotRectCollision=D;exports.encode=M;exports.fixPosition=P;exports.formatBytes=I;exports.getPointerPosition=q;exports.getRootVariables=z;exports.insert=E;exports.measureText=B;exports.normalize=v;exports.normalizeBase=W;exports.screenToCartesian=A;exports.shiftArray=w;exports.splitPath=j;exports.styleToString=g;exports.wait=N;
|