aptechka 0.25.2 → 0.26.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.
Files changed (92) hide show
  1. package/lib/Animation-B9m8bw96.cjs +1 -0
  2. package/lib/Animation-DN95L7Xo.js +105 -0
  3. package/lib/Damped-CTsV8tl_.cjs +1 -0
  4. package/lib/Damped-Chu29wn-.js +53 -0
  5. package/lib/Tweened-BUuSLSF7.js +44 -0
  6. package/lib/Tweened-BttGiyB0.cjs +1 -0
  7. package/lib/animation/index.cjs +1 -1
  8. package/lib/animation/index.js +6 -53
  9. package/lib/canvas-CU5Xjahf.cjs +1 -0
  10. package/lib/canvas-DeZ0SLUJ.js +34 -0
  11. package/lib/connector/index.cjs +1 -1
  12. package/lib/connector/index.js +1 -1
  13. package/lib/controls/index.cjs +1 -1
  14. package/lib/controls/index.js +3 -3
  15. package/lib/coordinates-CgdGoSYs.js +24 -0
  16. package/lib/coordinates-D8Np3cPD.cjs +1 -0
  17. package/lib/css-property/index.cjs +1 -1
  18. package/lib/css-property/index.js +1 -1
  19. package/lib/dev/index.cjs +1 -1
  20. package/lib/dev/index.js +1 -1
  21. package/lib/device/index.cjs +1 -1
  22. package/lib/device/index.js +1 -1
  23. package/lib/element-resizer/react/index.cjs +1 -0
  24. package/lib/element-resizer/react/index.js +8 -0
  25. package/lib/element-resizer/vanilla/index.cjs +1 -0
  26. package/lib/element-resizer/{index.js → vanilla/index.js} +2 -2
  27. package/lib/en3/index.cjs +8 -0
  28. package/lib/en3/index.js +374 -0
  29. package/lib/events-CsVF98U6.js +6 -0
  30. package/lib/events-KVanG9sR.cjs +1 -0
  31. package/lib/intersector/react/index.cjs +1 -0
  32. package/lib/intersector/react/index.js +12 -0
  33. package/lib/intersector/vanilla/index.cjs +1 -0
  34. package/lib/intersector/{index.js → vanilla/index.js} +2 -2
  35. package/lib/jss-CjccJC-K.js +21 -0
  36. package/lib/jss-GJLvaNfT.cjs +1 -0
  37. package/lib/layout-box/index.cjs +1 -1
  38. package/lib/layout-box/index.js +3 -3
  39. package/lib/loading/index.cjs +1 -1
  40. package/lib/loading/index.js +42 -85
  41. package/lib/math-BOBiC4TN.js +45 -0
  42. package/lib/math-GDWEqu7y.cjs +1 -0
  43. package/lib/media/index.cjs +1 -1
  44. package/lib/media/index.js +1 -1
  45. package/lib/media-elements/index.cjs +5 -0
  46. package/lib/media-elements/index.js +389 -0
  47. package/lib/morph/index.cjs +1 -0
  48. package/lib/morph/index.js +227 -0
  49. package/lib/need_redo_tweaker/index.cjs +4 -4
  50. package/lib/need_redo_tweaker/index.js +6 -4
  51. package/lib/object-CCiXnER2.cjs +1 -0
  52. package/lib/object-D6MVWB4l.js +85 -0
  53. package/lib/pointer/index.cjs +1 -0
  54. package/lib/pointer/index.js +151 -0
  55. package/lib/polyfills-CM4SCDTt.cjs +1 -0
  56. package/lib/polyfills-X6KXuHg-.js +33 -0
  57. package/lib/router/index.cjs +1 -0
  58. package/lib/router/index.js +266 -0
  59. package/lib/scroll/react/index.cjs +30 -0
  60. package/lib/scroll/react/index.js +761 -0
  61. package/lib/scroll/vanilla/index.cjs +1 -0
  62. package/lib/scroll/vanilla/index.js +1120 -0
  63. package/lib/slicer/index.cjs +11 -0
  64. package/lib/slicer/index.js +108 -0
  65. package/lib/source/index.cjs +1 -1
  66. package/lib/source/index.js +1 -1
  67. package/lib/style-BqzUd8Fy.cjs +1 -0
  68. package/lib/style-M-RBTQxT.js +21 -0
  69. package/lib/ticker/react/index.cjs +1 -0
  70. package/lib/ticker/react/index.js +19 -0
  71. package/lib/ticker/vanilla/index.cjs +1 -0
  72. package/lib/ticker/{index.js → vanilla/index.js} +2 -2
  73. package/lib/url-BDc0awLa.js +22 -0
  74. package/lib/url-C3Vj8msL.cjs +1 -0
  75. package/lib/utils/index.cjs +1 -1
  76. package/lib/utils/index.js +146 -222
  77. package/lib/window-resizer/react/index.cjs +1 -0
  78. package/lib/window-resizer/react/index.js +8 -0
  79. package/lib/window-resizer/vanilla/index.cjs +1 -0
  80. package/lib/window-resizer/vanilla/index.js +32 -0
  81. package/package.json +132 -20
  82. package/lib/Tweened-CDYmG9hk.js +0 -138
  83. package/lib/Tweened-DlyMbHu_.cjs +0 -1
  84. package/lib/element-resizer/index.cjs +0 -1
  85. package/lib/intersector/index.cjs +0 -1
  86. package/lib/polyfills-AItxku8u.js +0 -76
  87. package/lib/polyfills-Caa6z-Ay.cjs +0 -1
  88. package/lib/style-B2GS6rev.js +0 -104
  89. package/lib/style-qftK_UJp.cjs +0 -1
  90. package/lib/ticker/index.cjs +0 -1
  91. package/lib/window-resizer/index.cjs +0 -1
  92. package/lib/window-resizer/index.js +0 -42
@@ -0,0 +1 @@
1
+ "use strict";var C=i=>{throw TypeError(i)};var S=(i,s,t)=>s.has(i)||C("Cannot "+t);var e=(i,s,t)=>(S(i,s,"read from private field"),t?t.call(i):s.get(i)),a=(i,s,t)=>s.has(i)?C("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),h=(i,s,t,n)=>(S(i,s,"write to private field"),n?n.call(i,t):s.set(i,t),t),M=(i,s,t)=>(S(i,s,"access private method"),t);const I=require("./Store-CDb6RMce.cjs"),z=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),P=require("./ticker/vanilla/index.cjs"),N=require("./order/index.cjs");var f,b,A,c,F,r,u,l,g,d,q,y,x;class O extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,N.TICK_ORDER.ANIMATION);a(this,A);a(this,c,new I.Store(!1));a(this,F,0);a(this,r,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,x,t=>{this.handleAnimationFrame(t)});h(this,r,this.current)}get direction(){return e(this,F)}get target(){return e(this,r)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,r),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,r),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?m.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?m.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,r)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,r)!==this.current&&this.start())}shift(t,n){this.set(e(this,r)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,c).current||(e(this,c).current=!0,P.ticker.subscribe(e(this,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,P.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,f,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,m.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,A,m.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.nullishCoalescing(t==null?void 0:t.max,e(this,l))),M(this,q,y).call(this,typeof e(this,d)=="number"?e(this,d):e(this,r)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,r)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,F=new WeakMap,r=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,y=function(t){h(this,F,Math.sign(t-e(this,r))),h(this,r,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=O;
@@ -0,0 +1,105 @@
1
+ var I = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var S = (i, r, t) => r.has(i) || I("Cannot " + t);
5
+ var e = (i, r, t) => (S(i, r, "read from private field"), t ? t.call(i) : r.get(i)), a = (i, r, t) => r.has(i) ? I("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, t), h = (i, r, t, u) => (S(i, r, "write to private field"), u ? u.call(i, t) : r.set(i, t), t), P = (i, r, t) => (S(i, r, "access private method"), t);
6
+ import { S as q } from "./Store-OTdcl6SX.js";
7
+ import { c as y } from "./math-BOBiC4TN.js";
8
+ import { p as z, n as F } from "./polyfills-X6KXuHg-.js";
9
+ import { ticker as O } from "./ticker/vanilla/index.js";
10
+ import { TICK_ORDER as N } from "./order/index.js";
11
+ var f, d, A, l, b, s, n, m, c, g, M, R, x;
12
+ class K extends q {
13
+ constructor(t, u) {
14
+ super(t || 0, u);
15
+ a(this, M);
16
+ a(this, f);
17
+ a(this, d, N.ANIMATION);
18
+ a(this, A);
19
+ a(this, l, new q(!1));
20
+ a(this, b, 0);
21
+ a(this, s, 0);
22
+ a(this, n, -1 / 0);
23
+ a(this, m, 1 / 0);
24
+ a(this, c, 0);
25
+ a(this, g, null);
26
+ a(this, x, (t) => {
27
+ this.handleAnimationFrame(t);
28
+ });
29
+ h(this, s, this.current);
30
+ }
31
+ get direction() {
32
+ return e(this, b);
33
+ }
34
+ get target() {
35
+ return e(this, s);
36
+ }
37
+ get min() {
38
+ return e(this, n);
39
+ }
40
+ set min(t) {
41
+ h(this, n, t), this.set(e(this, s), {
42
+ equalize: !0
43
+ });
44
+ }
45
+ get max() {
46
+ return e(this, m);
47
+ }
48
+ set max(t) {
49
+ h(this, m, t), this.set(e(this, s), {
50
+ equalize: !0
51
+ });
52
+ }
53
+ get from() {
54
+ return e(this, c);
55
+ }
56
+ get isRunning() {
57
+ return e(this, l);
58
+ }
59
+ get delta() {
60
+ return Math.abs(e(this, s) - e(this, c));
61
+ }
62
+ get deltaProgress() {
63
+ return this.delta ? z(Math.abs(this.current - e(this, c)) / this.delta, 6) : 0;
64
+ }
65
+ get distance() {
66
+ return Math.abs(e(this, m) - e(this, n));
67
+ }
68
+ get distanceProgress() {
69
+ return this.distance ? z(Math.abs(this.current - e(this, n)) / this.distance, 6) : 0;
70
+ }
71
+ set(t, u) {
72
+ (e(this, s) !== t || u != null && u.restart) && (h(this, g, t), this.updateOptions(u), h(this, g, null), e(this, s) !== this.current && this.start());
73
+ }
74
+ shift(t, u) {
75
+ this.set(e(this, s) + t, u);
76
+ }
77
+ reset() {
78
+ super.reset(), this.set(this.initial, { equalize: !0 });
79
+ }
80
+ close() {
81
+ super.close(), this.reset(), this.unlistenAnimationFrame();
82
+ }
83
+ listenAnimationFrame() {
84
+ e(this, l).current || (e(this, l).current = !0, O.subscribe(e(this, x), {
85
+ maxFPS: e(this, f),
86
+ order: e(this, d),
87
+ culling: e(this, A)
88
+ }));
89
+ }
90
+ unlistenAnimationFrame() {
91
+ e(this, l).current && (e(this, l).current = !1, O.unsubscribe(e(this, x)));
92
+ }
93
+ updateOptions(t) {
94
+ h(this, f, F(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, F(t == null ? void 0 : t.order, e(this, d))), h(this, A, F(t == null ? void 0 : t.culling, e(this, A))), h(this, n, F(t == null ? void 0 : t.min, e(this, n))), h(this, m, F(t == null ? void 0 : t.max, e(this, m))), P(this, M, R).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
95
+ }
96
+ start() {
97
+ this.listenAnimationFrame();
98
+ }
99
+ }
100
+ f = new WeakMap(), d = new WeakMap(), A = new WeakMap(), l = new WeakMap(), b = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), R = function(t) {
101
+ h(this, b, Math.sign(t - e(this, s))), h(this, s, y(t, e(this, n), e(this, m))), h(this, c, this.current);
102
+ }, x = new WeakMap();
103
+ export {
104
+ K as A
105
+ };
@@ -0,0 +1 @@
1
+ "use strict";var b=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(e));var q=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),u=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(q(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const w=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),B=require("./Animation-B9m8bw96.cjs");var i,h;class D extends B.Animation{constructor(s,r){super(s,r);u(this,i);u(this,h);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,6)===c.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,A=Math.abs(r-this.target);n(this,h,A/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const F=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+F/this.mass*m),this.current+=a(this,i)*m}else this.current=w.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=D;
@@ -0,0 +1,53 @@
1
+ var v = Object.defineProperty, w = Object.defineProperties;
2
+ var x = 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 ? v(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) => w(s, x(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), m = (s, e, t, r) => (A(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
18
+ import { d as D } from "./math-BOBiC4TN.js";
19
+ import { n as u, p as F } from "./polyfills-X6KXuHg-.js";
20
+ import { A as q } from "./Animation-DN95L7Xo.js";
21
+ var i, h;
22
+ class j extends q {
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, m(this, i, 0), m(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, O = Math.abs(r - this.target);
41
+ m(this, h, O / t.timeBetweenFrames);
42
+ const n = t.timeBetweenFrames / 1e3;
43
+ if (this.mass || this.stiffness) {
44
+ const b = (this.target - this.current) * this.stiffness - a(this, i) * this.damping;
45
+ m(this, i, a(this, i) + b / this.mass * n), this.current += a(this, i) * n;
46
+ } else
47
+ this.current = D(this.current, this.target, this.damping, n);
48
+ }
49
+ }
50
+ i = new WeakMap(), h = new WeakMap();
51
+ export {
52
+ j as D
53
+ };
@@ -0,0 +1,44 @@
1
+ var g = Object.defineProperty, F = Object.defineProperties;
2
+ var O = Object.getOwnPropertyDescriptors;
3
+ var u = Object.getOwnPropertySymbols;
4
+ var b = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
5
+ var c = (e) => {
6
+ throw TypeError(e);
7
+ };
8
+ var l = (e, i, t) => i in e ? g(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, d = (e, i) => {
9
+ for (var t in i || (i = {}))
10
+ b.call(i, t) && l(e, t, i[t]);
11
+ if (u)
12
+ for (var t of u(i))
13
+ x.call(i, t) && l(e, t, i[t]);
14
+ return e;
15
+ }, f = (e, i) => F(e, O(i));
16
+ var p = (e, i, t) => i.has(e) || c("Cannot " + t);
17
+ var n = (e, i, t) => (p(e, i, "read from private field"), t ? t.call(e) : i.get(e)), m = (e, i, t) => i.has(e) ? c("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), h = (e, i, t, a) => (p(e, i, "write to private field"), a ? a.call(e, t) : i.set(e, t), t);
18
+ import { l as S } from "./easings-BKi40vHz.js";
19
+ import { c as T } from "./math-BOBiC4TN.js";
20
+ import { n as A, p as q } from "./polyfills-X6KXuHg-.js";
21
+ import { A as w } from "./Animation-DN95L7Xo.js";
22
+ var s, r;
23
+ class k extends w {
24
+ constructor(t, a) {
25
+ super(t || 0, a);
26
+ m(this, s, S);
27
+ m(this, r, 1e3);
28
+ this.updateOptions(f(d({}, a), { equalize: !0 }));
29
+ }
30
+ updateOptions(t) {
31
+ super.updateOptions(t), h(this, s, A(t == null ? void 0 : t.easing, n(this, s))), h(this, r, A(t == null ? void 0 : t.duration, n(this, r)));
32
+ }
33
+ handleAnimationFrame(t) {
34
+ const a = t.timeElapsedSinceSubscription / 1e3 / (n(this, r) / 1e3), o = n(this, s).call(this, T(a, 0, 1));
35
+ this.current = q(this.from + (this.target - this.from) * o, 6), a > 1 && this.unlistenAnimationFrame();
36
+ }
37
+ start() {
38
+ this.unlistenAnimationFrame(), this.listenAnimationFrame();
39
+ }
40
+ }
41
+ s = new WeakMap(), r = new WeakMap();
42
+ export {
43
+ k as T
44
+ };
@@ -0,0 +1 @@
1
+ "use strict";var F=Object.defineProperty,o=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var m=(i,t,e)=>t in i?F(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))b.call(t,e)&&m(i,e,t[e]);if(c)for(var e of c(t))p.call(t,e)&&m(i,e,t[e]);return i},A=(i,t)=>o(i,O(t));var q=(i,t,e)=>t.has(i)||d("Cannot "+e);var a=(i,t,e)=>(q(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>t.has(i)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),h=(i,t,e,s)=>(q(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e);const w=require("./easings-DsS5-Kqc.cjs"),C=require("./math-GDWEqu7y.cjs"),l=require("./polyfills-CM4SCDTt.cjs"),S=require("./Animation-B9m8bw96.cjs");var n,r;class T extends S.Animation{constructor(e,s){super(e||0,s);u(this,n,w.linear);u(this,r,1e3);this.updateOptions(A(g({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,l.nullishCoalescing(e==null?void 0:e.easing,a(this,n))),h(this,r,l.nullishCoalescing(e==null?void 0:e.duration,a(this,r)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(a(this,r)/1e3),f=a(this,n).call(this,C.clamp(s,0,1));this.current=l.preciseNumber(this.from+(this.target-this.from)*f,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,r=new WeakMap;exports.Tweened=T;
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-B9m8bw96.cjs"),n=require("../Damped-CTsV8tl_.cjs"),i=require("../Tweened-BttGiyB0.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,55 +1,8 @@
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();
1
+ import { A as r } from "../Animation-DN95L7Xo.js";
2
+ import { D as m } from "../Damped-Chu29wn-.js";
3
+ import { T as t } from "../Tweened-BUuSLSF7.js";
51
4
  export {
52
- T as Animation,
53
- M as Damped,
54
- k as Tweened
5
+ r as Animation,
6
+ m as Damped,
7
+ t as Tweened
55
8
  };
@@ -0,0 +1 @@
1
+ "use strict";function x(r,d){const u=r.measureText(d),e=u.actualBoundingBoxAscent+u.actualBoundingBoxDescent,n=u.width;return{height:e,width:n}}function a(r){return Math.floor(r)+.5}function m(r,d,u,e,n,l){let c=r/d,s=u/e,t=0,i=0;return n=typeof n=="undefined"?.5:n,l=typeof l=="undefined"?.5:l,c>s?(t=e,i=e*c):(i=u,t=u/c),[(u-i)*n,(e-t)*l,i,t]}function y(r,d,u,e,n,l){let c=r/d,s=u/e,t=0,i=0;return n=typeof n=="undefined"?.5:n,l=typeof l=="undefined"?.5:l,c>s?(i=u,t=u/c):(t=e,i=e*c),[(u-i)*n,(e-t)*l,i,t]}exports.contain=y;exports.cover=m;exports.fixPosition=a;exports.measureText=x;
@@ -0,0 +1,34 @@
1
+ function i(r, c) {
2
+ const u = r.measureText(c), l = u.actualBoundingBoxAscent + u.actualBoundingBoxDescent, n = u.width;
3
+ return {
4
+ height: l,
5
+ width: n
6
+ };
7
+ }
8
+ function x(r) {
9
+ return Math.floor(r) + 0.5;
10
+ }
11
+ function m(r, c, u, l, n, e) {
12
+ let a = r / c, s = u / l, t = 0, d = 0;
13
+ return n = typeof n == "undefined" ? 0.5 : n, e = typeof e == "undefined" ? 0.5 : e, a > s ? (t = l, d = l * a) : (d = u, t = u / a), [
14
+ (u - d) * n,
15
+ (l - t) * e,
16
+ d,
17
+ t
18
+ ];
19
+ }
20
+ function y(r, c, u, l, n, e) {
21
+ let a = r / c, s = u / l, t = 0, d = 0;
22
+ return n = typeof n == "undefined" ? 0.5 : n, e = typeof e == "undefined" ? 0.5 : e, a > s ? (d = u, t = u / a) : (t = l, d = l * a), [
23
+ (u - d) * n,
24
+ (l - t) * e,
25
+ d,
26
+ t
27
+ ];
28
+ }
29
+ export {
30
+ y as a,
31
+ m as c,
32
+ x as f,
33
+ i as m
34
+ };
@@ -1 +1 @@
1
- "use strict";var f=t=>{throw TypeError(t)};var h=(t,c,e)=>c.has(t)||f("Cannot "+e);var a=(t,c,e)=>(h(t,c,"read from private field"),e?e.call(t):c.get(t)),r=(t,c,e)=>c.has(t)?f("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(t):c.set(t,e),d=(t,c,e,s)=>(h(t,c,"write to private field"),s?s.call(t,e):c.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../order/index.cjs"),u=require("../ticker/index.cjs");var i,o,l;class k{constructor(){r(this,i,[]);r(this,o);r(this,l,c=>{var e,s,b;for(let C=a(this,i).length-1;C>=0;C--){const n=a(this,i)[C];n.node.isConnected&&!n.isConnected?((e=n.connectCallback)==null||e.call(n,n.node),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((s=n.disconnectCallback)==null||s.call(n,n.node),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.isConnected||(n.timer=Math.max(0,c.timeElapsedSinceSubscription-n.startTime),n.timer>n.maxWaitSec*1e3&&((b=n.disconnectCallback)==null||b.call(n,n.node,!0),this.unsubscribe(n)))}})}subscribe(c,e){const s=a(this,i).length;return a(this,i).push({node:c,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec:1/0,timer:0,startTime:performance.now(),unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),s||u.ticker.subscribe(a(this,l),{order:m.TICK_ORDER.CONNECTOR}),()=>{this.unsubscribe(e)}}unsubscribe(c){a(this,i).forEach(e=>{e.connectCallback===c.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===c.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,i,a(this,i).filter(e=>e.connectCallback||e.disconnectCallback)),a(this,i).length||(u.ticker.unsubscribe(a(this,l)),d(this,o,void 0))}destroy(){clearInterval(a(this,o)),d(this,i,[])}}i=new WeakMap,o=new WeakMap,l=new WeakMap;const x=new k;exports.Connector=k;exports.connector=x;
1
+ "use strict";var f=t=>{throw TypeError(t)};var h=(t,c,e)=>c.has(t)||f("Cannot "+e);var a=(t,c,e)=>(h(t,c,"read from private field"),e?e.call(t):c.get(t)),r=(t,c,e)=>c.has(t)?f("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(t):c.set(t,e),d=(t,c,e,s)=>(h(t,c,"write to private field"),s?s.call(t,e):c.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../order/index.cjs"),u=require("../ticker/vanilla/index.cjs");var i,l,o;class k{constructor(){r(this,i,[]);r(this,l);r(this,o,c=>{var e,s,b;for(let C=a(this,i).length-1;C>=0;C--){const n=a(this,i)[C];n.node.isConnected&&!n.isConnected?((e=n.connectCallback)==null||e.call(n,n.node),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((s=n.disconnectCallback)==null||s.call(n,n.node),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.isConnected||(n.timer=Math.max(0,c.timeElapsedSinceSubscription-n.startTime),n.timer>n.maxWaitSec*1e3&&((b=n.disconnectCallback)==null||b.call(n,n.node,!0),this.unsubscribe(n)))}})}subscribe(c,e){const s=a(this,i).length;return a(this,i).push({node:c,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec:1/0,timer:0,startTime:performance.now(),unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),s||u.ticker.subscribe(a(this,o),{order:m.TICK_ORDER.CONNECTOR}),()=>{this.unsubscribe(e)}}unsubscribe(c){a(this,i).forEach(e=>{e.connectCallback===c.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===c.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,i,a(this,i).filter(e=>e.connectCallback||e.disconnectCallback)),a(this,i).length||(u.ticker.unsubscribe(a(this,o)),d(this,l,void 0))}destroy(){clearInterval(a(this,l)),d(this,i,[])}}i=new WeakMap,l=new WeakMap,o=new WeakMap;const x=new k;exports.Connector=k;exports.connector=x;
@@ -4,7 +4,7 @@ var b = (t) => {
4
4
  var h = (t, c, e) => c.has(t) || b("Cannot " + e);
5
5
  var a = (t, c, e) => (h(t, c, "read from private field"), e ? e.call(t) : c.get(t)), r = (t, c, e) => c.has(t) ? b("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(t) : c.set(t, e), d = (t, c, e, s) => (h(t, c, "write to private field"), s ? s.call(t, e) : c.set(t, e), e);
6
6
  import { TICK_ORDER as k } from "../order/index.js";
7
- import { ticker as m } from "../ticker/index.js";
7
+ import { ticker as m } from "../ticker/vanilla/index.js";
8
8
  var i, l, o;
9
9
  class u {
10
10
  constructor() {
@@ -1 +1 @@
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;
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/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.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,v,I,X;class te extends K{constructor(e){super();s(this,B,null);s(this,v);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,v))return;this.changeEvent.notify("wheel",a),i(this,v,setTimeout(()=>{i(this,v,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,v)))}}B=new WeakMap,v=new WeakMap,I=new WeakMap,X=new WeakMap;var x,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,x)&&t(y,x)!==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,x,t(this,g)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(y,x,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)))}};x=new WeakMap,g=new WeakMap,A=new WeakMap,c=new WeakMap,Y=new WeakMap,M=new WeakMap,s(y,x,null);let U=y;exports.AutoplayControls=ee;exports.Controls=K;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
@@ -6,12 +6,12 @@ var t = (h, n, e) => (F(h, n, "read from private field"), e ? e.call(h) : n.get(
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 T } from "../ticker/index.js";
9
+ import { ticker as T } from "../ticker/vanilla/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-CDYmG9hk.js";
12
+ import { T as J } from "../Tweened-BUuSLSF7.js";
13
13
  import { s as Z } from "../gestures-D2Fdra_G.js";
14
- import { p as $ } from "../polyfills-AItxku8u.js";
14
+ import { p as $ } from "../polyfills-X6KXuHg-.js";
15
15
  import { TICK_ORDER as p } from "../order/index.js";
16
16
  var N;
17
17
  class O {
@@ -0,0 +1,24 @@
1
+ function s(t, h, n = !1) {
2
+ let i = t.x - h.width / 2, g = h.height / 2 - t.y;
3
+ return n && (i = i / (h.width / 2), g = g / (h.height / 2)), { x: i, y: g };
4
+ }
5
+ function x(t, h) {
6
+ const n = t.x / h.width, i = t.y / h.height;
7
+ return { x: n, y: i };
8
+ }
9
+ function e(t, h) {
10
+ return h = h || {
11
+ x: 0,
12
+ y: 0,
13
+ width: document.documentElement.offsetWidth,
14
+ height: innerHeight
15
+ }, {
16
+ x: (t.x - h.x) / h.width * h.width,
17
+ y: (t.y - h.y) / h.height * h.height
18
+ };
19
+ }
20
+ export {
21
+ e as g,
22
+ x as n,
23
+ s
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";function o(t,i,n=!1){let h=t.x-i.width/2,e=i.height/2-t.y;return n&&(h=h/(i.width/2),e=e/(i.height/2)),{x:h,y:e}}function s(t,i){const n=t.x/i.width,h=t.y/i.height;return{x:n,y:h}}function g(t,i){return i=i||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-i.x)/i.width*i.width,y:(t.y-i.y)/i.height*i.height}}exports.getPointerPosition=g;exports.normalize=s;exports.screenToCartesian=o;
@@ -1 +1 @@
1
- "use strict";var w=s=>{throw TypeError(s)};var f=(s,r,e)=>r.has(s)||w("Cannot "+e);var t=(s,r,e)=>(f(s,r,"read from private field"),e?e.call(s):r.get(s)),c=(s,r,e)=>r.has(s)?w("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),i=(s,r,e,n)=>(f(s,r,"write to private field"),n?n.call(s,e):r.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../css-value-parser/index.cjs"),g=require("../order/index.cjs"),p=require("../Store-CDb6RMce.cjs"),v=require("../dom-JBOkFLTh.cjs"),R=require("../window-resizer/index.cjs");var a,b,u,o,h,l;class y extends p.Store{constructor(e,n,d,S){super(d,S);c(this,a);c(this,b);c(this,u);c(this,o);c(this,h,!1);c(this,l,()=>{this.check()});i(this,a,v.getElement(e)),i(this,b,n),i(this,u,d.toString()),i(this,o,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,u)}observe(){t(this,h)||(i(this,h,!0),R.windowResizer.subscribe(t(this,l),g.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,h)&&(i(this,h,!1),R.windowResizer.unsubscribe(t(this,l)))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,a)).getPropertyValue(t(this,b));if(!(t(this,o)&&t(this,u)===e))if(i(this,u,e),e){const n=V.cssValueParser.parse(t(this,u));this.current=n}else this.current=this.initial}}a=new WeakMap,b=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,l=new WeakMap;exports.CSSProperty=y;
1
+ "use strict";var w=s=>{throw TypeError(s)};var f=(s,r,e)=>r.has(s)||w("Cannot "+e);var t=(s,r,e)=>(f(s,r,"read from private field"),e?e.call(s):r.get(s)),c=(s,r,e)=>r.has(s)?w("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),i=(s,r,e,h)=>(f(s,r,"write to private field"),h?h.call(s,e):r.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../css-value-parser/index.cjs"),V=require("../order/index.cjs"),g=require("../Store-CDb6RMce.cjs"),p=require("../dom-JBOkFLTh.cjs"),R=require("../window-resizer/vanilla/index.cjs");var a,l,u,b,n,o;class y extends g.Store{constructor(e,h,d,S){super(d,S);c(this,a);c(this,l);c(this,u);c(this,b);c(this,n,!1);c(this,o,()=>{this.check()});i(this,a,p.getElement(e)),i(this,l,h),i(this,u,d.toString()),i(this,b,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,u)}observe(){t(this,n)||(i(this,n,!0),R.windowResizer.subscribe(t(this,o),V.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,n)&&(i(this,n,!1),R.windowResizer.unsubscribe(t(this,o)))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,a)).getPropertyValue(t(this,l));if(!(t(this,b)&&t(this,u)===e))if(i(this,u,e),e){const h=v.cssValueParser.parse(t(this,u));this.current=h}else this.current=this.initial}}a=new WeakMap,l=new WeakMap,u=new WeakMap,b=new WeakMap,n=new WeakMap,o=new WeakMap;exports.CSSProperty=y;
@@ -7,7 +7,7 @@ import { cssValueParser as R } from "../css-value-parser/index.js";
7
7
  import { RESIZE_ORDER as V } from "../order/index.js";
8
8
  import { S as g } from "../Store-OTdcl6SX.js";
9
9
  import { g as v } from "../dom-0S_WDL4g.js";
10
- import { windowResizer as w } from "../window-resizer/index.js";
10
+ import { windowResizer as w } from "../window-resizer/vanilla/index.js";
11
11
  var b, o, u, l, c, n;
12
12
  class d extends g {
13
13
  constructor(e, a, m, f) {
package/lib/dev/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),t=require("../Store-CDb6RMce.cjs"),c=require("../ticker/index.cjs");function i(){c.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof o.CSSProperty&&r.check()}})}exports.devMode=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),t=require("../Store-CDb6RMce.cjs"),c=require("../ticker/vanilla/index.cjs");function i(){c.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof o.CSSProperty&&r.check()}})}exports.devMode=i;
package/lib/dev/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CSSProperty as o } from "../css-property/index.js";
2
2
  import { a as t } from "../Store-OTdcl6SX.js";
3
- import { ticker as c } from "../ticker/index.js";
3
+ import { ticker as c } from "../ticker/vanilla/index.js";
4
4
  function s() {
5
5
  c.subscribe(() => {
6
6
  for (let r = 0; r < t.current.length; r++) {
@@ -1 +1 @@
1
- "use strict";var P=t=>{throw TypeError(t)};var S=(t,s,n)=>s.has(t)||P("Cannot "+n);var i=(t,s,n)=>(S(t,s,"read from private field"),n?n.call(t):s.get(t)),o=(t,s,n)=>s.has(t)?P("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,n),e=(t,s,n,f)=>(S(t,s,"write to private field"),f?f.call(t,n):s.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../order/index.cjs"),k=require("../window-resizer/index.cjs"),z=require("../browser-CpzFX2xg.cjs"),D=require("../Store-CDb6RMce.cjs");var r,p,b,d,a,u,l,c;class M{constructor(){o(this,r);o(this,p);o(this,b);o(this,d);o(this,a);o(this,u);o(this,l);o(this,c);var s,n;if(e(this,r,"unknown"),e(this,p,"unknown"),e(this,b,0),e(this,d,!1),e(this,a,!1),e(this,u,!1),e(this,l,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},z.isBrowser){this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE);{const x=document.createElement("canvas"),E=x.getContext("webgl")||x.getContext("experimental-webgl");e(this,u,E&&E instanceof WebGLRenderingContext||!1)}{const x=document.createElement("canvas");x.getContext("2d")&&e(this,l,x.toDataURL("image/webp").indexOf("data:image/webp")==0)}const f=window.navigator.userAgent,v=((n=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:n.platform)||window.navigator.platform,C=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];C.includes(v)?(e(this,r,"macOS"),e(this,c,!0)):T.includes(v)?(e(this,r,"iOS"),e(this,c,!0)):R.includes(v)?e(this,r,"Windows"):/Android/.test(f)?e(this,r,"Android"):/Linux/.test(v)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,p)}get gpuTier(){return i(this,b)}get isMobile(){return i(this,d)}get isTouch(){return i(this,a)}get isWebgl(){return i(this,u)}get isWebp(){return i(this,l)}get isApple(){return i(this,c)}}r=new WeakMap,p=new WeakMap,b=new WeakMap,d=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap;const I=new M;var A=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(A||{}),O=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(O||{}),m,g,w,h;class q{constructor(){o(this,m);o(this,g);o(this,w);o(this,h);e(this,m,0),e(this,g,0),e(this,w,0),e(this,h,new D.Store(void 0)),this.resize=()=>{e(this,m,document.documentElement.clientWidth),e(this,g,innerHeight),e(this,w,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},z.isBrowser&&(this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE))}get width(){return i(this,m)}get height(){return i(this,g)}get type(){return i(this,h)}get pixelRatio(){return i(this,w)}}m=new WeakMap,g=new WeakMap,w=new WeakMap,h=new WeakMap;const y=new q;exports.ViewportBreakpoints=A;exports.ViewportMediaRules=O;exports.device=I;exports.viewport=y;
1
+ "use strict";var P=t=>{throw TypeError(t)};var S=(t,s,n)=>s.has(t)||P("Cannot "+n);var i=(t,s,n)=>(S(t,s,"read from private field"),n?n.call(t):s.get(t)),o=(t,s,n)=>s.has(t)?P("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,n),e=(t,s,n,f)=>(S(t,s,"write to private field"),f?f.call(t,n):s.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../order/index.cjs"),k=require("../window-resizer/vanilla/index.cjs"),z=require("../browser-CpzFX2xg.cjs"),D=require("../Store-CDb6RMce.cjs");var r,p,b,d,a,u,l,c;class M{constructor(){o(this,r);o(this,p);o(this,b);o(this,d);o(this,a);o(this,u);o(this,l);o(this,c);var s,n;if(e(this,r,"unknown"),e(this,p,"unknown"),e(this,b,0),e(this,d,!1),e(this,a,!1),e(this,u,!1),e(this,l,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},z.isBrowser){this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE);{const x=document.createElement("canvas"),E=x.getContext("webgl")||x.getContext("experimental-webgl");e(this,u,E&&E instanceof WebGLRenderingContext||!1)}{const x=document.createElement("canvas");x.getContext("2d")&&e(this,l,x.toDataURL("image/webp").indexOf("data:image/webp")==0)}const f=window.navigator.userAgent,v=((n=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:n.platform)||window.navigator.platform,C=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];C.includes(v)?(e(this,r,"macOS"),e(this,c,!0)):T.includes(v)?(e(this,r,"iOS"),e(this,c,!0)):R.includes(v)?e(this,r,"Windows"):/Android/.test(f)?e(this,r,"Android"):/Linux/.test(v)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,p)}get gpuTier(){return i(this,b)}get isMobile(){return i(this,d)}get isTouch(){return i(this,a)}get isWebgl(){return i(this,u)}get isWebp(){return i(this,l)}get isApple(){return i(this,c)}}r=new WeakMap,p=new WeakMap,b=new WeakMap,d=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap;const I=new M;var A=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(A||{}),O=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(O||{}),m,g,w,h;class _{constructor(){o(this,m);o(this,g);o(this,w);o(this,h);e(this,m,0),e(this,g,0),e(this,w,0),e(this,h,new D.Store(void 0)),this.resize=()=>{e(this,m,document.documentElement.clientWidth),e(this,g,innerHeight),e(this,w,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},z.isBrowser&&(this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE))}get width(){return i(this,m)}get height(){return i(this,g)}get type(){return i(this,h)}get pixelRatio(){return i(this,w)}}m=new WeakMap,g=new WeakMap,w=new WeakMap,h=new WeakMap;const q=new _;exports.ViewportBreakpoints=A;exports.ViewportMediaRules=O;exports.device=I;exports.viewport=q;
@@ -4,7 +4,7 @@ var P = (t) => {
4
4
  var W = (t, s, n) => s.has(t) || P("Cannot " + n);
5
5
  var e = (t, s, n) => (W(t, s, "read from private field"), n ? n.call(t) : s.get(t)), o = (t, s, n) => s.has(t) ? P("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, n), i = (t, s, n, b) => (W(t, s, "write to private field"), b ? b.call(t, n) : s.set(t, n), n);
6
6
  import { RESIZE_ORDER as A } from "../order/index.js";
7
- import { windowResizer as k } from "../window-resizer/index.js";
7
+ import { windowResizer as k } from "../window-resizer/vanilla/index.js";
8
8
  import { i as C } from "../browser-0zX67oeU.js";
9
9
  import { S as T } from "../Store-OTdcl6SX.js";
10
10
  var h, w, f, m, a, d, l, c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),i=require("../vanilla/index.cjs");function n([e,r]){t.useEffect(()=>i.elementResizer.subscribe(e,r),[e,r])}exports.useElementResizer=n;
@@ -0,0 +1,8 @@
1
+ import { useEffect as t } from "react";
2
+ import { elementResizer as i } from "../vanilla/index.js";
3
+ function f([e, r]) {
4
+ t(() => i.subscribe(e, r), [e, r]);
5
+ }
6
+ export {
7
+ f as useElementResizer
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";var h=r=>{throw TypeError(r)};var y=(r,t,s)=>t.has(r)||h("Cannot "+s);var n=(r,t,s)=>(y(r,t,"read from private field"),s?s.call(r):t.get(r)),b=(r,t,s)=>t.has(r)?h("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),f=(r,t,s,e)=>(y(r,t,"write to private field"),e?e.call(r,s):t.set(r,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../browser-CpzFX2xg.cjs"),w=require("../../dom-JBOkFLTh.cjs");var i,o,u;class z{constructor(){b(this,i,[]);b(this,o,null);b(this,u,t=>{n(this,i).map(e=>({subscriber:e,entry:t.find(l=>l.target===e.element)})).forEach(e=>{e.entry&&(e.subscriber.entry=e.entry,e.subscriber.callback(e.entry))})});d.isBrowser&&window.ResizeObserver&&f(this,o,new ResizeObserver(n(this,u)))}subscribe(t,s){const e=w.getElement(t);if(!e)return()=>{};const l=n(this,i).find(c=>c.element===e);if(!l)n(this,o).observe(e);else{const c=n(this,i).find(m=>m.element===e&&m.entry);c!=null&&c.element.isConnected&&s(c.entry)}return n(this,i).push({element:e,callback:s,entry:(l==null?void 0:l.entry)||null}),()=>{this.unsubscribe(s)}}unsubscribe(t){const s=n(this,i).find(e=>e.callback===t);s&&(f(this,i,n(this,i).filter(e=>e.callback!==s.callback)),n(this,i).find(e=>e.element===s.element)||n(this,o).unobserve(s.element))}}i=new WeakMap,o=new WeakMap,u=new WeakMap;const v=new z;exports.ElementResizer=z;exports.elementResizer=v;
@@ -3,8 +3,8 @@ var h = (n) => {
3
3
  };
4
4
  var y = (n, t, s) => t.has(n) || h("Cannot " + s);
5
5
  var r = (n, t, s) => (y(n, t, "read from private field"), s ? s.call(n) : t.get(n)), b = (n, t, s) => t.has(n) ? h("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), u = (n, t, s, e) => (y(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
6
- import { i as p } from "../browser-0zX67oeU.js";
7
- import { g as w } from "../dom-0S_WDL4g.js";
6
+ import { i as p } from "../../browser-0zX67oeU.js";
7
+ import { g as w } from "../../dom-0S_WDL4g.js";
8
8
  var i, o, f;
9
9
  class z {
10
10
  constructor() {
@@ -0,0 +1,8 @@
1
+ "use strict";var ue=Object.defineProperty,me=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable;var ee=s=>{throw TypeError(s)};var Q=(s,e,i)=>e in s?ue(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,k=(s,e)=>{for(var i in e||(e={}))ge.call(e,i)&&Q(s,i,e[i]);if(J)for(var i of J(e))xe.call(e,i)&&Q(s,i,e[i]);return s},te=(s,e)=>me(s,fe(e));var ie=(s,e,i)=>e.has(s)||ee("Cannot "+i);var t=(s,e,i)=>(ie(s,e,"read from private field"),i?i.call(s):e.get(s)),r=(s,e,i)=>e.has(s)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,i),a=(s,e,i,n)=>(ie(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("../order/index.cjs"),re=require("../window-resizer/vanilla/index.cjs"),ae=require("../ticker/vanilla/index.cjs"),he=require("../dom-JBOkFLTh.cjs"),u=require("three"),ne=require("../layout-box/index.cjs");function ce(s){const e=i=>{i.dispose();for(const n of Object.keys(i)){const h=i[n];h&&typeof h=="object"&&"minFilter"in h&&h.dispose()}};s.traverse(i=>{if(i instanceof u.Mesh){if(i.geometry.dispose(),!Array.isArray(i.material)&&i.material.isMaterial)e(i.material);else if(Array.isArray(i.material))for(const n of i.material)e(n)}})}var P,o,C,v,w,O,D,R;class X{constructor(e,i){r(this,P);r(this,o);r(this,C);r(this,v);r(this,w);r(this,O);r(this,D);r(this,R);a(this,P,e),a(this,o,(i==null?void 0:i.cameraType)==="orthographic"?new u.OrthographicCamera:new u.PerspectiveCamera),a(this,C,new u.Scene),a(this,v,[]),a(this,w,(i==null?void 0:i.cameraDistance)||1e3),t(this,o).near=(i==null?void 0:i.cameraNear)||1,t(this,o).far=(i==null?void 0:i.cameraFar)||11e3,a(this,O,(i==null?void 0:i.cameraFov)||"auto"),t(this,o).position.z=t(this,w),t(this,o).name=`Cameras.${t(this,P)}`,a(this,D,he.getElement(i==null?void 0:i.sizeElement)||document.documentElement),this.beforeRenderCallback=i==null?void 0:i.beforeRender,a(this,R,new ne.LayoutBox(t(this,D))),t(this,R).onResize(()=>{this.resize()})}get name(){return t(this,P)}get camera(){return t(this,o)}get scene(){return t(this,C)}get box(){return t(this,R)}get cameraDistance(){return t(this,w)}set cameraDistance(e){a(this,w,e),this.resize()}get sizeElement(){return t(this,D)}get isClipped(){return t(this,D)!==d.containerElement}resize(){const{width:e,height:i}=t(this,R);t(this,o).userData.controlled||(t(this,o).position.z=t(this,w)),t(this,o)instanceof u.PerspectiveCamera?(t(this,o).aspect=e/i,t(this,o).fov=t(this,O)==="auto"?2*Math.atan(i/2/t(this,w))*(180/Math.PI):t(this,o).userData.controlled?t(this,o).fov:t(this,O)):t(this,o)instanceof u.OrthographicCamera&&(t(this,o).left=e/-2,t(this,o).right=e/2,t(this,o).top=i/2,t(this,o).bottom=i/-2),t(this,o).updateProjectionMatrix()}destroy(){t(this,v).forEach(e=>{e.userData.box.destroy()}),t(this,C).clear(),ce(t(this,C)),d.destroyView(this.name),t(this,R).destroy()}attachToHTMLElement(e,i,n){const h=new ne.LayoutBox(e,te(k({},n),{containerElement:t(this,D),cartesian:!0,scrollStep:!this.isClipped}));return h.bindObject(i),i.userData.box=h,t(this,v).push(i),i}detachFromHTMLElement(e){a(this,v,t(this,v).filter(i=>i===e?(e.userData.box.destroy(),!1):!0))}add(...e){const i=e[0],n=e[1],h=e[2];return n&&this.attachToHTMLElement(n,i,h),this.scene.add(i),i}remove(e,i){this.scene.remove(e),i&&this.detachFromHTMLElement(e)}}P=new WeakMap,o=new WeakMap,C=new WeakMap,v=new WeakMap,w=new WeakMap,O=new WeakMap,D=new WeakMap,R=new WeakMap;var A,_,F,z,I;class ye{constructor(e){r(this,A);r(this,_);r(this,F);r(this,z);r(this,I);a(this,A,e.targetName||void 0),a(this,_,e.eventDispatcher||e.object3D),a(this,F,e.propagation||!1),a(this,z,e.object3D),a(this,I,t(this,A)?()=>t(this,z).getObjectByName(t(this,A))||t(this,z):()=>t(this,z))}get object3D(){return t(this,z)}get eventDispatcher(){return t(this,_)}get propagation(){return t(this,F)}get target(){return t(this,I).call(this)}dispatch(e,i){this.eventDispatcher.dispatchEvent(k({originalEvent:i,type:e},this.intersection))}}A=new WeakMap,_=new WeakMap,F=new WeakMap,z=new WeakMap,I=new WeakMap;var E,m,H,N,q,B,W;class Ee{constructor(){r(this,E,[]);r(this,m,[]);r(this,H,new u.Vector2);r(this,N,new u.Raycaster);r(this,q,e=>{for(let i=0;i<t(this,m).length;i++)t(this,m)[i].dispatch("pointerDown",e)});r(this,B,e=>{for(let i=0;i<t(this,m).length;i++)t(this,m)[i].dispatch("pointerUp",e)});r(this,W,e=>{if(!t(this,E).length)return;t(this,H).x=e.clientX/d.width*2-1,t(this,H).y=-(e.clientY/d.height)*2+1,d.camera&&t(this,N).setFromCamera(t(this,H),d.camera);const i=[];for(const c of t(this,E)){const f=t(this,N).intersectObject(c.target);f.length&&(c.intersection=f[0],i.push(c))}let n=!1;const h=t(this,m).filter(c=>!i.find(f=>f.object3D.uuid===c.object3D.uuid)),y=i.sort((c,f)=>f.object3D.position.z-c.object3D.position.z).filter((c,f)=>n?(h.push(c),!1):(n=!c.propagation,!0)),p=y.filter(c=>!t(this,m).find(f=>f.object3D.uuid===c.object3D.uuid));for(let c=0;c<h.length;c++)h[c].dispatch("pointerLeave",e);for(let c=0;c<p.length;c++)p[c].dispatch("pointerEnter",e);a(this,m,y);for(let c=0;c<t(this,m).length;c++)t(this,m)[c].dispatch("pointerMove",e)});d.containerElement.addEventListener("pointerdown",t(this,q)),d.containerElement.addEventListener("pointerup",t(this,B)),d.containerElement.addEventListener("pointermove",t(this,W))}destroy(){d.containerElement.removeEventListener("pointerdown",t(this,q)),d.containerElement.removeEventListener("pointerup",t(this,B)),d.containerElement.removeEventListener("pointermove",t(this,W)),a(this,E,[]),a(this,m,[])}add(e,i){if(t(this,E).find(h=>h.object3D.uuid===e.uuid))return;const n=new ye(k({object3D:e},i));t(this,E).push(n)}remove(e){a(this,E,t(this,E).filter(i=>i.object3D.uuid!==e.uuid)),a(this,m,t(this,m).filter(i=>i.object3D.uuid!==e.uuid))}}E=new WeakMap,m=new WeakMap,H=new WeakMap,N=new WeakMap,q=new WeakMap,B=new WeakMap,W=new WeakMap;var U,b,l,j,g,M,T,L,Y,S,Z,x,$,G;class be{constructor(){r(this,U,`https://unpkg.com/three@0.${u.REVISION}.x`);r(this,b,null);r(this,l,null);r(this,j,null);r(this,g,new Map);r(this,M,0);r(this,T,0);r(this,L,0);r(this,Y,2);r(this,S,!1);r(this,Z,!1);r(this,x,null);r(this,$,()=>{a(this,M,t(this,b).clientWidth),a(this,T,t(this,b).clientHeight),a(this,L,Math.min(t(this,Y),devicePixelRatio||1)),t(this,l).setPixelRatio(t(this,L)),t(this,l).setSize(t(this,M),t(this,T)),t(this,x)&&(t(this,x).setPixelRatio(t(this,L)),t(this,x).setSize(t(this,M),t(this,T)))});r(this,G,()=>{t(this,l).setRenderTarget(null),t(this,g).forEach(e=>{this.render(e)})})}get CDNVersion(){return t(this,U)}get containerElement(){return t(this,b)}get webglRenderer(){return t(this,l)}get raycaster(){return t(this,j)}get views(){return t(this,g)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return t(this,M)}get height(){return t(this,T)}get pixelRatio(){return t(this,L)}get composer(){return t(this,x)}setup(e){if(t(this,S)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}a(this,b,he.getElement(e==null?void 0:e.containerElement)||document.body),a(this,Y,(e==null?void 0:e.maxPixelRatio)||2),a(this,l,new u.WebGLRenderer(e==null?void 0:e.webGLRendererParameters)),t(this,l).domElement.style.cssText=`
2
+ position: fixed;
3
+ left: 0;
4
+ top: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ z-index: ${(e==null?void 0:e.zIndex)||0};
8
+ `,(t(this,b).shadowRoot||t(this,b)).append(t(this,l).domElement),t(this,g).set("default",new X("default",k({sizeElement:t(this,b)},e==null?void 0:e.view))),a(this,j,new Ee),e!=null&&e.composer&&(a(this,x,new e.composer(t(this,l))),this.render=()=>{t(this,x).render()}),a(this,S,!0),re.windowResizer.subscribe(t(this,$),se.RESIZE_ORDER.CANVAS),ae.ticker.subscribe(t(this,G),{order:se.TICK_ORDER.CANVAS})}destroy(){if(!t(this,S)){console.warn("[en3.setup]: You are trying to destory en3 but it has not been initialized.");return}re.windowResizer.unsubscribe(t(this,$)),ae.ticker.unsubscribe(t(this,G)),t(this,j).destroy(),t(this,g).forEach(e=>{e.destroy()}),t(this,l).dispose(),t(this,l).domElement.remove(),a(this,l,null),t(this,x).dispose(),a(this,x,null),a(this,S,!1)}createView(e,i){const n=t(this,g).size,h=new X(e,i);return t(this,g).set(e,h),n===1&&t(this,l).setScissorTest(!0),h}getView(e){return t(this,g).get(e)}destroyView(e){const i=t(this,g).get(e);i&&(t(this,g).delete(e),i.destroy(),t(this,g).size<=1&&t(this,l).setScissorTest(!1))}render(e){var i;if(t(this,g).size>1||this.view.isClipped){const n=e.box.left+e.box.CSSTranslation.x+e.box.scrollValue.x,h=d.height-e.box.height-e.box.top+e.box.CSSTranslation.y+e.box.scrollValue.y*-1;t(this,l).setScissor(n,h,e.box.width,e.box.height),t(this,l).setViewport(n,h,e.box.width,e.box.height)}(i=e.beforeRenderCallback)==null||i.call(e),t(this,l).render(e.scene,e.camera)}}U=new WeakMap,b=new WeakMap,l=new WeakMap,j=new WeakMap,g=new WeakMap,M=new WeakMap,T=new WeakMap,L=new WeakMap,Y=new WeakMap,S=new WeakMap,Z=new WeakMap,x=new WeakMap,$=new WeakMap,G=new WeakMap;const d=new be;function we(s,e,i){const n=e.x,h=e.y,V=i||s.image.width/s.image.height;let y=0,p=0,c=s.offset.x,f=s.offset.y,oe=s.rotation,le=s.center.x,de=s.center.y;n/h>V?(y=1,p=h/n*V):(p=1,y=n/h/V),s.matrix.setUvTransform(c,f,y,p,oe,le,de)}const K=new u.Vector3,pe=new u.Vector3;function ve(s,e="default"){const i=d.getView(e),{width:n,height:h}=d,V=n/h;s instanceof u.Vector3?K.copy(s):K.set(...s);const y=i.camera.getWorldPosition(pe).distanceTo(K);if(i.camera instanceof u.OrthographicCamera)return{width:n/i.camera.zoom,height:h/i.camera.zoom,factor:1,distance:y,aspect:V};{const p=i.camera.fov*Math.PI/180,c=2*Math.tan(p/2)*y,f=c*(n/h);return{width:f,height:c,factor:n/f,distance:y,aspect:V}}}function De(s,e){s.traverse(i=>{i instanceof u.Mesh&&i.material&&(Array.isArray(i.material)?i.material:[i.material]).forEach(e)})}function Re(s,e){s.traverse(i=>{i instanceof u.Mesh&&e(i)})}exports.En3View=X;exports.coverTexture=we;exports.dispose=ce;exports.en3=d;exports.getCurrentViewport=ve;exports.traverseMaterials=De;exports.traverseMeshes=Re;