aptechka 0.19.0 → 0.20.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/{Animation-w6BLTCum.js → Animation-CuR3fbKl.js} +3 -4
- package/lib/Animation-Dt4Kc5VA.cjs +1 -0
- package/lib/Damped-C236fv4v.cjs +1 -0
- package/lib/{Damped-DEHDEq-b.js → Damped-OSAezqOR.js} +16 -17
- package/lib/Tweened-B7zGiekd.cjs +1 -0
- package/lib/Tweened-DfDr-AYv.js +43 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/polyfills-AItxku8u.js +76 -0
- package/lib/polyfills-Caa6z-Ay.cjs +1 -0
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.d.ts +0 -1
- package/lib/source/index.js +67 -152
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +168 -127
- package/package.json +1 -33
- package/lib/Animation-DI864E0i.cjs +0 -1
- package/lib/Damped-ipnDc0iX.cjs +0 -1
- package/lib/Tweened-B1TfANfR.cjs +0 -1
- package/lib/Tweened-C52xXDLY.js +0 -44
- package/lib/canvas/index.cjs +0 -1
- package/lib/canvas/index.d.ts +0 -34
- package/lib/canvas/index.js +0 -108
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/image/index.cjs +0 -1
- package/lib/image/index.d.ts +0 -10
- package/lib/image/index.js +0 -15
- package/lib/jss-CjccJC-K.js +0 -21
- package/lib/jss-GJLvaNfT.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.cjs +0 -1
- package/lib/polyfills-CM4SCDTt.cjs +0 -1
- package/lib/polyfills-X6KXuHg-.js +0 -33
- package/lib/sequence/index.cjs +0 -1
- package/lib/sequence/index.d.ts +0 -20
- package/lib/sequence/index.js +0 -158
- package/lib/source/SourceElement.d.ts +0 -24
- package/lib/test/starting-style/index.d.ts +0 -1
- package/lib/video/index.cjs +0 -1
- package/lib/video/index.d.ts +0 -21
- package/lib/video/index.js +0 -55
|
@@ -4,12 +4,11 @@ var I = (i) => {
|
|
|
4
4
|
var S = (i, r, t) => r.has(i) || I("Cannot " + t);
|
|
5
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
6
|
import { S as q } from "./Store-OTdcl6SX.js";
|
|
7
|
-
import { c as y } from "./
|
|
8
|
-
import { p as z, n as F } from "./polyfills-X6KXuHg-.js";
|
|
7
|
+
import { p as z, n as F, c as y } from "./polyfills-AItxku8u.js";
|
|
9
8
|
import { ticker as O } from "./ticker/index.js";
|
|
10
9
|
import { TICK_ORDER as N } from "./order/index.js";
|
|
11
10
|
var f, d, A, l, b, s, n, m, c, g, M, R, x;
|
|
12
|
-
class
|
|
11
|
+
class E extends q {
|
|
13
12
|
constructor(t, u) {
|
|
14
13
|
super(t || 0, u);
|
|
15
14
|
a(this, M);
|
|
@@ -101,5 +100,5 @@ f = new WeakMap(), d = new WeakMap(), A = new WeakMap(), l = new WeakMap(), b =
|
|
|
101
100
|
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
101
|
}, x = new WeakMap();
|
|
103
102
|
export {
|
|
104
|
-
|
|
103
|
+
E as A
|
|
105
104
|
};
|
|
@@ -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"),c=require("./polyfills-Caa6z-Ay.cjs"),P=require("./ticker/index.cjs"),z=require("./order/index.cjs");var f,b,A,m,F,r,u,l,g,d,q,y,x;class N extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,z.TICK_ORDER.ANIMATION);a(this,A);a(this,m,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,m)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?c.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?c.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,m).current||(e(this,m).current=!0,P.ticker.subscribe(e(this,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,m).current&&(e(this,m).current=!1,P.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,f,c.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,c.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,A,c.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,c.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,c.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,m=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,c.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var q=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?q(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 A=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(A(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),c=(t,e,s,r)=>(A(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const h=require("./polyfills-Caa6z-Ay.cjs"),w=require("./Animation-Dt4Kc5VA.cjs");var i,n;class B extends w.Animation{constructor(s,r){super(s,r);u(this,i);u(this,n);this.damping=20,this.stiffness=0,this.mass=0,c(this,i,0),c(this,n,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,n)}updateOptions(s){this.damping=h.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=h.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=h.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){h.preciseNumber(this.current,6)===h.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,F=Math.abs(r-this.target);c(this,n,F/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const b=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;c(this,i,a(this,i)+b/this.mass*m),this.current+=a(this,i)*m}else this.current=h.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,n=new WeakMap;exports.Damped=B;
|
|
@@ -14,40 +14,39 @@ var f = (s, e, t) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
return s;
|
|
15
15
|
}, p = (s, e) => w(s, x(e));
|
|
16
16
|
var A = (s, e, t) => e.has(s) || g("Cannot " + t);
|
|
17
|
-
var
|
|
18
|
-
import { d as D } from "./
|
|
19
|
-
import {
|
|
20
|
-
import { A as q } from "./Animation-w6BLTCum.js";
|
|
17
|
+
var r = (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, a) => (A(s, e, "write to private field"), a ? a.call(s, t) : e.set(s, t), t);
|
|
18
|
+
import { n as u, p as F, d as D } from "./polyfills-AItxku8u.js";
|
|
19
|
+
import { A as q } from "./Animation-CuR3fbKl.js";
|
|
21
20
|
var i, h;
|
|
22
|
-
class
|
|
23
|
-
constructor(t,
|
|
24
|
-
super(t,
|
|
21
|
+
class N extends q {
|
|
22
|
+
constructor(t, a) {
|
|
23
|
+
super(t, a);
|
|
25
24
|
c(this, i);
|
|
26
25
|
c(this, h);
|
|
27
|
-
this.damping = 20, this.stiffness = 0, this.mass = 0,
|
|
26
|
+
this.damping = 20, this.stiffness = 0, this.mass = 0, n(this, i, 0), n(this, h, 0), this.updateOptions(p(l({}, a), { equalize: !0 }));
|
|
28
27
|
}
|
|
29
28
|
get velocity() {
|
|
30
|
-
return
|
|
29
|
+
return r(this, i);
|
|
31
30
|
}
|
|
32
31
|
get speed() {
|
|
33
|
-
return
|
|
32
|
+
return r(this, h);
|
|
34
33
|
}
|
|
35
34
|
updateOptions(t) {
|
|
36
35
|
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
36
|
}
|
|
38
37
|
handleAnimationFrame(t) {
|
|
39
38
|
F(this.current, 6) === F(this.target, 6) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
const
|
|
39
|
+
const a = this.current, O = Math.abs(a - this.target);
|
|
40
|
+
n(this, h, O / t.timeBetweenFrames);
|
|
41
|
+
const m = t.timeBetweenFrames / 1e3;
|
|
43
42
|
if (this.mass || this.stiffness) {
|
|
44
|
-
const b = (this.target - this.current) * this.stiffness -
|
|
45
|
-
|
|
43
|
+
const b = (this.target - this.current) * this.stiffness - r(this, i) * this.damping;
|
|
44
|
+
n(this, i, r(this, i) + b / this.mass * m), this.current += r(this, i) * m;
|
|
46
45
|
} else
|
|
47
|
-
this.current = D(this.current, this.target, this.damping,
|
|
46
|
+
this.current = D(this.current, this.target, this.damping, m);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
i = new WeakMap(), h = new WeakMap();
|
|
51
50
|
export {
|
|
52
|
-
|
|
51
|
+
N as D
|
|
53
52
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var F=Object.defineProperty,O=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var o=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={}))o.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,b(t));var f=(i,t,e)=>t.has(i)||d("Cannot "+e);var r=(i,t,e)=>(f(i,t,"read from private field"),e?e.call(i):t.get(i)),l=(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)=>(f(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e);const w=require("./easings-DsS5-Kqc.cjs"),u=require("./polyfills-Caa6z-Ay.cjs"),C=require("./Animation-Dt4Kc5VA.cjs");var n,a;class S extends C.Animation{constructor(e,s){super(e||0,s);l(this,n,w.linear);l(this,a,1e3);this.updateOptions(A(g({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,u.nullishCoalescing(e==null?void 0:e.easing,r(this,n))),h(this,a,u.nullishCoalescing(e==null?void 0:e.duration,r(this,a)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(r(this,a)/1e3),q=r(this,n).call(this,u.clamp(s,0,1));this.current=u.preciseNumber(this.from+(this.target-this.from)*q,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,a=new WeakMap;exports.Tweened=S;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var F = Object.defineProperty, o = 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 = (t) => {
|
|
6
|
+
throw TypeError(t);
|
|
7
|
+
};
|
|
8
|
+
var l = (t, i, e) => i in t ? F(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e, d = (t, i) => {
|
|
9
|
+
for (var e in i || (i = {}))
|
|
10
|
+
b.call(i, e) && l(t, e, i[e]);
|
|
11
|
+
if (u)
|
|
12
|
+
for (var e of u(i))
|
|
13
|
+
x.call(i, e) && l(t, e, i[e]);
|
|
14
|
+
return t;
|
|
15
|
+
}, f = (t, i) => o(t, O(i));
|
|
16
|
+
var p = (t, i, e) => i.has(t) || c("Cannot " + e);
|
|
17
|
+
var n = (t, i, e) => (p(t, i, "read from private field"), e ? e.call(t) : i.get(t)), m = (t, i, e) => i.has(t) ? c("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), h = (t, i, e, a) => (p(t, i, "write to private field"), a ? a.call(t, e) : i.set(t, e), e);
|
|
18
|
+
import { l as S } from "./easings-BKi40vHz.js";
|
|
19
|
+
import { n as A, c as T, p as q } from "./polyfills-AItxku8u.js";
|
|
20
|
+
import { A as w } from "./Animation-CuR3fbKl.js";
|
|
21
|
+
var s, r;
|
|
22
|
+
class j extends w {
|
|
23
|
+
constructor(e, a) {
|
|
24
|
+
super(e || 0, a);
|
|
25
|
+
m(this, s, S);
|
|
26
|
+
m(this, r, 1e3);
|
|
27
|
+
this.updateOptions(f(d({}, a), { equalize: !0 }));
|
|
28
|
+
}
|
|
29
|
+
updateOptions(e) {
|
|
30
|
+
super.updateOptions(e), h(this, s, A(e == null ? void 0 : e.easing, n(this, s))), h(this, r, A(e == null ? void 0 : e.duration, n(this, r)));
|
|
31
|
+
}
|
|
32
|
+
handleAnimationFrame(e) {
|
|
33
|
+
const a = e.timeElapsedSinceSubscription / 1e3 / (n(this, r) / 1e3), g = n(this, s).call(this, T(a, 0, 1));
|
|
34
|
+
this.current = q(this.from + (this.target - this.from) * g, 6), a > 1 && this.unlistenAnimationFrame();
|
|
35
|
+
}
|
|
36
|
+
start() {
|
|
37
|
+
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
s = new WeakMap(), r = new WeakMap();
|
|
41
|
+
export {
|
|
42
|
+
j as T
|
|
43
|
+
};
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-Dt4Kc5VA.cjs"),n=require("../Damped-C236fv4v.cjs"),i=require("../Tweened-B7zGiekd.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as r } from "../Animation-
|
|
2
|
-
import { D as m } from "../Damped-
|
|
3
|
-
import { T as t } from "../Tweened-
|
|
1
|
+
import { A as r } from "../Animation-CuR3fbKl.js";
|
|
2
|
+
import { D as m } from "../Damped-OSAezqOR.js";
|
|
3
|
+
import { T as t } from "../Tweened-DfDr-AYv.js";
|
|
4
4
|
export {
|
|
5
5
|
r as Animation,
|
|
6
6
|
m as Damped,
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=h=>{throw TypeError(h)};var F=(h,n,e)=>n.has(h)||Q("Cannot "+e);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,a)=>(F(h,n,"write to private field"),a?a.call(h,e):n.set(h,e),e),M=(h,n,e)=>(F(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-
|
|
1
|
+
"use strict";var Q=h=>{throw TypeError(h)};var F=(h,n,e)=>n.has(h)||Q("Cannot "+e);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,a)=>(F(h,n,"write to private field"),a?a.call(h,e):n.set(h,e),e),M=(h,n,e)=>(F(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-B7zGiekd.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-Caa6z-Ay.cjs"),_=require("../order/index.cjs");var S;class K{constructor(){s(this,S,new V.Notifier)}get changeEvent(){return t(this,S)}}S=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,R,N,q,W,B;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,B);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,B,()=>{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)&&M(this,o,R).call(this)}set speed(e){i(this,b,e),t(this,f)&&M(this,o,R).call(this)}connect(){t(this,f)||(i(this,f,!0),M(this,o,R).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),M(this,o,N).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,R=function(){M(this,o,N).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,B))},N=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,q)),clearInterval(t(this,C)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,B))},q=new WeakMap,W=new WeakMap,B=new WeakMap;var T,x,I,X;class te extends K{constructor(e){super();s(this,T,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,T,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,T).addEventListener("wheel",t(this,X),{passive:!1})}disconnect(){m.isBrowser&&(t(this,T).removeEventListener("wheel",t(this,X)),clearTimeout(t(this,x)))}}T=new WeakMap,x=new WeakMap,I=new WeakMap,X=new WeakMap;var v,g,A,c,Y,L;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,L));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 z=a.x-r.x,O=a.y-r.y;this.axis==="x"?i(this,c,z):i(this,c,O),a=r,(this.axis==="x"&&Math.abs(z)>Math.abs(O)||this.axis==="y"&&Math.abs(O)>Math.abs(z))&&(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,L),{order:_.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,L,()=>{Math.floor(t(this,c))||k.ticker.unsubscribe(t(this,L)),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,L)))}};v=new WeakMap,g=new WeakMap,A=new WeakMap,c=new WeakMap,Y=new WeakMap,L=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
|
@@ -9,9 +9,9 @@ import { g as U } from "../dom-0S_WDL4g.js";
|
|
|
9
9
|
import { ticker as I } 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-DfDr-AYv.js";
|
|
13
13
|
import { s as Z } from "../gestures-D2Fdra_G.js";
|
|
14
|
-
import { p as $ } from "../polyfills-
|
|
14
|
+
import { p as $ } from "../polyfills-AItxku8u.js";
|
|
15
15
|
import { TICK_ORDER as p } from "../order/index.js";
|
|
16
16
|
var q;
|
|
17
17
|
class B {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var vt=r=>{throw TypeError(r)};var Ue=(r,s,t)=>s.has(r)||vt("Cannot "+t);var e=(r,s,t)=>(Ue(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?vt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ue(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ue(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),ue=require("../object-HBC5QlzO.cjs"),Jt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const we=require("../string-DhgS_iFl.cjs"),Yt=require("../connector/index.cjs"),Gt=require("../Viewport-BDPsnAF4.cjs"),Ut=require("../math-GDWEqu7y.cjs"),Xe=require("../polyfills-CM4SCDTt.cjs"),yt=require("../element-resizer/index.cjs"),Xt=require("../style-At6aDoqG.cjs"),Qt=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,be,I,H,a,kt,Et,xt,Qe,je,Ct,Tt,Lt,zt,et,tt,Rt,st,it,Mt,nt,Be,ot,rt,at,Oe,Ze;const We=class We{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,be);o(this,I);o(this,H);o(this,Oe,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Ze,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,it).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,it).call(this),c(this,d,s),(t=e(this,be))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,st).call(this),l(this,a,Qe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,be=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else Qt.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,je).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,Be).call(this,e(this,d),g):u==="children"?l(this,a,Be).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Qe).call(this)},Qe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,be,Yt.connector.subscribe(s,{connectCallback:e(this,Oe),disconnectCallback:e(this,Ze),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},je=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,je).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,et).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,tt).call(this,i,h)})):l(this,a,tt).call(this,i,n)}},et=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,et).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${we.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${we.camelToKebab(t)}: ${i};`))}},tt=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=we.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,st).call(this)}},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},it=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,nt).call(this,t,n)})):l(this,a,nt).call(this,t,i)}},nt=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},Be=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],me=Array.isArray(g)?g:[g],qe=[],x=[];T.length&&me.forEach((N,P)=>{v.includes(N)?x.push(N):qe.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,rt).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,rt).call(this,N);q instanceof Node&&n.appendChild(q)}}),qe.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof We)l(this,a,ot).call(this,s,i.node);else if(i instanceof Function)l(this,a,Be).call(this,s,ue.isESClass(i)?new i:i());else{const n=l(this,a,at).call(this,i);n instanceof Node&&l(this,a,ot).call(this,s,n)}}))},ot=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},rt=function(s){return s instanceof We?s.node:typeof s=="function"?ue.isESClass(s)?new s:s():l(this,a,at).call(this,s)},at=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Oe=new WeakMap,Ze=new WeakMap;let A=We;function p(...r){return new A(...r)}function jt(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function Ve(r){return new A("input",r)}function At(r){return new A("label",r)}function fe(r){return new A("slot",r)}function lt(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function es(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${we.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${we.camelToKebab(n)}`]=r[n];return i}const f=es({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ts='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ss='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
|
|
1
|
+
"use strict";var vt=r=>{throw TypeError(r)};var Xe=(r,s,t)=>s.has(r)||vt("Cannot "+t);var e=(r,s,t)=>(Xe(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?vt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Xe(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Xe(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),p=require("../Store-CDb6RMce.cjs"),ue=require("../object-HBC5QlzO.cjs"),Jt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const we=require("../string-DhgS_iFl.cjs"),Yt=require("../connector/index.cjs"),Gt=require("../Viewport-BDPsnAF4.cjs"),Be=require("../polyfills-Caa6z-Ay.cjs"),yt=require("../element-resizer/index.cjs"),Ut=require("../style-At6aDoqG.cjs"),Xt=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,be,I,H,a,kt,Et,xt,Qe,je,Ct,Tt,Lt,zt,et,tt,Rt,st,it,Mt,nt,_e,ot,rt,at,Ze,We;const Je=class Je{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,be);o(this,I);o(this,H);o(this,Ze,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,We,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,it).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,it).call(this),c(this,d,s),(t=e(this,be))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,st).call(this),l(this,a,Qe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,be=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else Xt.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,je).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,_e).call(this,e(this,d),g):u==="children"?l(this,a,_e).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Qe).call(this)},Qe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,be,Yt.connector.subscribe(s,{connectCallback:e(this,Ze),disconnectCallback:e(this,We),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},je=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,je).call(this,t)});else if(typeof s=="object")if(s instanceof p.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof p.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,et).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof p.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,tt).call(this,i,h)})):l(this,a,tt).call(this,i,n)}},et=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof p.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,et).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof p.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${we.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${we.camelToKebab(t)}: ${i};`))}},tt=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=we.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,st).call(this)}},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},it=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof p.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,nt).call(this,t,n)})):l(this,a,nt).call(this,t,i)}},nt=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},_e=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof p.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],pe=Array.isArray(g)?g:[g],qe=[],x=[];T.length&&pe.forEach((N,P)=>{v.includes(N)?x.push(N):qe.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,rt).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,rt).call(this,N);q instanceof Node&&n.appendChild(q)}}),qe.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Je)l(this,a,ot).call(this,s,i.node);else if(i instanceof Function)l(this,a,_e).call(this,s,ue.isESClass(i)?new i:i());else{const n=l(this,a,at).call(this,i);n instanceof Node&&l(this,a,ot).call(this,s,n)}}))},ot=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},rt=function(s){return s instanceof Je?s.node:typeof s=="function"?ue.isESClass(s)?new s:s():l(this,a,at).call(this,s)},at=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ze=new WeakMap,We=new WeakMap;let A=Je;function m(...r){return new A(...r)}function Qt(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function Ve(r){return new A("input",r)}function At(r){return new A("label",r)}function fe(r){return new A("slot",r)}function lt(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function jt(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${we.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${we.camelToKebab(n)}`]=r[n];return i}const f=jt({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',es='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ts='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
8
|
</svg>
|
|
9
|
-
`;var Z,L,D;class is{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,m.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new is,ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',os=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,j,W,pe;const pt=class pt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(os),c(this,j,this.attachInternals()),p(this,{children:At({children:[lt({class:"fake",children:fe({children:[lt({class:"default",children:[ns]})]})}),Ve({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,pe).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,pe).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,pe).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,pe).call(this)}};B=new WeakMap,j=new WeakMap,W=new WeakSet,pe=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},pt.formAssociated=!0;let ht=pt;customElements.get("e-checkbox")||customElements.define("e-checkbox",ht);var _;class ge extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const rs=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class It extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rs),p(this,{children:[p("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",It);const as=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ht extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),p(this,{children:[Ve({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ht);const ls=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Dt extends ge{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),p(this,{children:[jt({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Dt);const hs=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,ee,te,V,K,ve,ye,F,Y,Se,ke,w,X,ct,dt,_e,Ee;class Vt extends ge{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,ee,[]);o(this,te);o(this,V);o(this,K);o(this,ve);o(this,ye);o(this,F);o(this,Y,!1);o(this,Se,t=>{const i=l(this,w,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Ut.clamp(u,e(this,V),e(this,K)),k=Xe.toStep(g,e(this,te));i[h]=k}),e(this,ye)==="number"?i[0]:i});o(this,ke,()=>{l(this,w,X).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ct).call(this)});o(this,Ee,()=>{l(this,w,ct).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),c(this,V,Xe.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Xe.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,ve,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ye,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),p(this,{class:e(this,F)?"":"infinite",children:l(this,w,X).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[Ve({type:"number",step:e(this,te),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const me=l(this,w,X).call(this),qe=me[T],x=e(this,ee)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,dt).call(this);P.classList.add("grabbing"),St.setupDrag(O=>{const bt=O.x-v.x,Ot=e(this,F)?P.offsetWidth/(q||1):1,Zt=qe+bt/Ot*e(this,ve);if(me[T]=Zt,!e(this,F)){const Wt=l(this,w,_e).call(this,x,0);x.style.transform=`translateX(${Wt+bt}px)`}this.updateStores([...me])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,_e).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,Se)),this.firstStore.subscribe(e(this,ke)),yt.elementResizer.subscribe(this,e(this,Ee))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,Se)),this.firstStore.unsubscribe(e(this,ke)),yt.elementResizer.unsubscribe(e(this,Ee))}}J=new WeakMap,ee=new WeakMap,te=new WeakMap,V=new WeakMap,K=new WeakMap,ve=new WeakMap,ye=new WeakMap,F=new WeakMap,Y=new WeakMap,Se=new WeakMap,ke=new WeakMap,w=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ct=function(){l(this,w,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,_e).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},dt=function(){return e(this,F)?e(this,K)-e(this,V):0},_e=function(t,i){const n=t.parentElement,h=l(this,w,dt).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},Ee=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Vt);const cs=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,z,G,ne,oe,Je,xe,ft;const wt=class wt extends HTMLElement{constructor(){super();o(this,xe);o(this,se,null);o(this,ie,"");o(this,z,null);o(this,G,!1);o(this,ne);o(this,oe,null);o(this,Je,()=>{ue.dispatchSizeChangeEvent(this)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,Je))),p(this,{children:[Q({class:"head",children:fe({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:fe()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,G)}open(){clearTimeout(e(this,ne)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,xe,ft).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,xe,ft).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},Xt.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,oe).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,z=new WeakMap,G=new WeakMap,ne=new WeakMap,oe=new WeakMap,Je=new WeakMap,xe=new WeakSet,ft=function(){ue.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},wt.formAssociated=!0;let ut=wt;customElements.get("e-select")||customElements.define("e-select",ut);var Ce;class qt extends HTMLElement{constructor(){super(...arguments);o(this,Ce,null)}get selectElement(){return e(this,Ce)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,Ce,t):console.log(this,"e-select not found")}}Ce=new WeakMap;const ds=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Te,gt;class us extends qt{constructor(){super();o(this,Te);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ds),p(this,{tabindex:0,onClick:()=>{l(this,Te,gt).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Te,gt).call(this)},children:fe()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Te=new WeakSet,gt=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",us);const fs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Le,ae,ze;class gs extends qt{constructor(){super();o(this,Le,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Le).innerHTML=i.innerHTML)});o(this,ze,()=>{this.classList.toggle("opened",this.selectElement.opened)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(fs),p(this,{children:[fe(),fe({name:"arrow",children:p($t,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Le,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,ze))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,ze))}}Le=new WeakMap,ae=new WeakMap,ze=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",gs);const ms=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Bt extends ge{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ms);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];p(this,{children:p("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[p("e-select-head",{lightChildren:[lt({"data-value-holder":""})]}),...i.map((h,u)=>p("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Bt);const ps=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class _t extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ps),p(this,{children:[Ve({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",_t);const ws={boolean:It,color:Ht,link:Dt,number:Vt,select:Bt,string:_t},bs=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,le,he,ce,de,Re,Me;class mt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,Re,()=>{m.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Me,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new ws[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(bs),p(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,he)+":"}),b({class:"head-buttons",children:[Q({class:"head-button",children:Pt,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,R)}addStore(t){e(this,de).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,Re)),addEventListener("keydown",e(this,Me)),ue.dispatchSizeChangeEvent(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,Re)),removeEventListener("keydown",e(this,Me))}}R=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,Re=new WeakMap,Me=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",mt);const vs=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Ae,S,Ne,Fe,Pe,$e,Ye;const Ge=class Ge extends HTMLElement{constructor(t){super();o(this,M);o(this,Ae,new m.Store(null));o(this,S,new m.Store([]));o(this,Ne);o(this,Fe,null);o(this,Pe,null);o(this,$e,null);o(this,Ye,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(vs),c(this,M,t.key),c(this,Ne,new MutationObserver(e(this,Ye))),p(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Ae),p($t,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Fe,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Pe,n),c(this,$e,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Ae)}get content(){return e(this,S)}get bodyElement(){return e(this,Fe)}get contentElement(){return e(this,Pe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ne).observe(e(this,$e),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ge?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ge({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof mt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new mt({store:t.store})]}}};M=new WeakMap,Ae=new WeakMap,S=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Ye=new WeakMap;let Ke=Ge;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",Ke);const ys=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
9
|
+
`;var Z,L,D;class ss{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,p.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new ss,is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',ns=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,j,W,me;const mt=class mt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ns),c(this,j,this.attachInternals()),m(this,{children:At({children:[lt({class:"fake",children:fe({children:[lt({class:"default",children:[is]})]})}),Ve({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,me).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,me).call(this)}};B=new WeakMap,j=new WeakMap,W=new WeakSet,me=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},mt.formAssociated=!0;let ht=mt;customElements.get("e-checkbox")||customElements.define("e-checkbox",ht);var _;class ge extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const os=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class It extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(os),m(this,{children:[m("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",It);const rs=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ht extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rs),m(this,{children:[Ve({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ht);const as=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Dt extends ge{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),m(this,{children:[Qt({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Dt);const ls=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,ee,te,V,K,ve,ye,F,Y,Se,ke,w,X,ct,dt,Ke,Ee;class Vt extends ge{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,ee,[]);o(this,te);o(this,V);o(this,K);o(this,ve);o(this,ye);o(this,F);o(this,Y,!1);o(this,Se,t=>{const i=l(this,w,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Be.clamp(u,e(this,V),e(this,K)),k=Be.toStep(g,e(this,te));i[h]=k}),e(this,ye)==="number"?i[0]:i});o(this,ke,()=>{l(this,w,X).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ct).call(this)});o(this,Ee,()=>{l(this,w,ct).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),c(this,V,Be.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Be.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,ve,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ye,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),m(this,{class:e(this,F)?"":"infinite",children:l(this,w,X).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[Ve({type:"number",step:e(this,te),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const pe=l(this,w,X).call(this),qe=pe[T],x=e(this,ee)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,dt).call(this);P.classList.add("grabbing"),St.setupDrag(O=>{const bt=O.x-v.x,Ot=e(this,F)?P.offsetWidth/(q||1):1,Zt=qe+bt/Ot*e(this,ve);if(pe[T]=Zt,!e(this,F)){const Wt=l(this,w,Ke).call(this,x,0);x.style.transform=`translateX(${Wt+bt}px)`}this.updateStores([...pe])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,Ke).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,Se)),this.firstStore.subscribe(e(this,ke)),yt.elementResizer.subscribe(this,e(this,Ee))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,Se)),this.firstStore.unsubscribe(e(this,ke)),yt.elementResizer.unsubscribe(e(this,Ee))}}J=new WeakMap,ee=new WeakMap,te=new WeakMap,V=new WeakMap,K=new WeakMap,ve=new WeakMap,ye=new WeakMap,F=new WeakMap,Y=new WeakMap,Se=new WeakMap,ke=new WeakMap,w=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ct=function(){l(this,w,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,Ke).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},dt=function(){return e(this,F)?e(this,K)-e(this,V):0},Ke=function(t,i){const n=t.parentElement,h=l(this,w,dt).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},Ee=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Vt);const hs=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,z,G,ne,oe,Ye,xe,ft;const wt=class wt extends HTMLElement{constructor(){super();o(this,xe);o(this,se,null);o(this,ie,"");o(this,z,null);o(this,G,!1);o(this,ne);o(this,oe,null);o(this,Ye,()=>{ue.dispatchSizeChangeEvent(this)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,Ye))),m(this,{children:[Q({class:"head",children:fe({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:fe()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,G)}open(){clearTimeout(e(this,ne)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,xe,ft).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,xe,ft).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},Ut.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,oe).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,z=new WeakMap,G=new WeakMap,ne=new WeakMap,oe=new WeakMap,Ye=new WeakMap,xe=new WeakSet,ft=function(){ue.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},wt.formAssociated=!0;let ut=wt;customElements.get("e-select")||customElements.define("e-select",ut);var Ce;class qt extends HTMLElement{constructor(){super(...arguments);o(this,Ce,null)}get selectElement(){return e(this,Ce)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,Ce,t):console.log(this,"e-select not found")}}Ce=new WeakMap;const cs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Te,gt;class ds extends qt{constructor(){super();o(this,Te);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),m(this,{tabindex:0,onClick:()=>{l(this,Te,gt).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Te,gt).call(this)},children:fe()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Te=new WeakSet,gt=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",ds);const us=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Le,ae,ze;class fs extends qt{constructor(){super();o(this,Le,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Le).innerHTML=i.innerHTML)});o(this,ze,()=>{this.classList.toggle("opened",this.selectElement.opened)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(us),m(this,{children:[fe(),fe({name:"arrow",children:m($t,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Le,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,ze))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,ze))}}Le=new WeakMap,ae=new WeakMap,ze=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",fs);const gs=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Bt extends ge{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(gs);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];m(this,{children:m("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[m("e-select-head",{lightChildren:[lt({"data-value-holder":""})]}),...i.map((h,u)=>m("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Bt);const ps=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class _t extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ps),m(this,{children:[Ve({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",_t);const ms={boolean:It,color:Ht,link:Dt,number:Vt,select:Bt,string:_t},ws=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,le,he,ce,de,Re,Me;class pt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,Re,()=>{p.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Me,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new ms[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ws),m(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,he)+":"}),b({class:"head-buttons",children:[Q({class:"head-button",children:Pt,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,R)}addStore(t){e(this,de).addStore(t)}connectedCallback(){p.activeStores.subscribe(e(this,Re)),addEventListener("keydown",e(this,Me)),ue.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(e(this,Re)),removeEventListener("keydown",e(this,Me))}}R=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,Re=new WeakMap,Me=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",pt);const bs=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Ae,S,Ne,Fe,Pe,$e,Ge;const Ue=class Ue extends HTMLElement{constructor(t){super();o(this,M);o(this,Ae,new p.Store(null));o(this,S,new p.Store([]));o(this,Ne);o(this,Fe,null);o(this,Pe,null);o(this,$e,null);o(this,Ge,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(bs),c(this,M,t.key),c(this,Ne,new MutationObserver(e(this,Ge))),m(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Ae),m($t,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Fe,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Pe,n),c(this,$e,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Ae)}get content(){return e(this,S)}get bodyElement(){return e(this,Fe)}get contentElement(){return e(this,Pe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ne).observe(e(this,$e),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ue?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ue({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof pt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new pt({store:t.store})]}}};M=new WeakMap,Ae=new WeakMap,S=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Ge=new WeakMap;let Oe=Ue;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",Oe);const vs=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
10
10
|
100dvh -
|
|
11
11
|
(
|
|
12
12
|
var(--tweaker-offset) * 2 +
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Gt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
16
16
|
100dvh -
|
|
17
17
|
var(--tweaker-folder-height)
|
|
18
|
-
)`}}});var Ie,He,De;class Kt extends
|
|
18
|
+
)`}}});var Ie,He,De;class Kt extends Oe{constructor(){super({key:""});o(this,Ie,!1);o(this,He,()=>{C.save()});o(this,De,Jt.debounce(()=>{p.activeStores.current.forEach(t=>{if(t.name){const i=t.name.split(".");this.handleStore({store:t,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),e(this,Ie)||(c(this,Ie,!0),this.contentElement.scroll({top:C.scrollValue}),this.contentElement.addEventListener("scroll",()=>{C.scrollValue=this.contentElement.scrollTop}))},10));C.load(),this.shadowRoot.adoptedStyleSheets.push(vs),this.head.current=[b({class:"tweaker-buttons",onClick:t=>{t.stopPropagation()},children:[Q({class:"tweaker-button",children:Ft,onClick:()=>{p.storeRegistry.resetState()}}),Q({class:["tweaker-button"],children:[Pt],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(p.storeRegistry.getState()))}}),Q({class:"tweaker-button",children:es,onClick:()=>{ue.createJSONAndSave(p.storeRegistry.name,p.storeRegistry.getState())}}),At({class:"tweaker-button",children:[ts,Ve({type:"file",style:{display:"none"},onChange:t=>{var h;const n=(h=t.currentTarget.files)==null?void 0:h[0];if(n){const u=new FileReader;u.onload=g=>{var T,v;const k=(v=(T=g.target)==null?void 0:T.result)==null?void 0:v.toString();k&&p.storeRegistry.loadState(k)},u.readAsText(n)}}})]})]})],m(this.bodyElement,{children:[b({class:"resize",onPointerdown:t=>{t.preventDefault();const i=this.getBoundingClientRect(),n=this.contentElement.scrollTop;St.setupDrag(h=>{const u=t.x-h.x,g=Math.max(400,i.width+u);this.style.width=g+"px",C.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:n})},10)})},onDblclick:()=>{this.style.width="",C.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",e(this,He)),p.activeStores.subscribe(e(this,De)),C.changedSizes("tweaker")&&(this.style.width=C.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",e(this,He)),C.save(),p.activeStores.unsubscribe(e(this,De))}}Ie=new WeakMap,He=new WeakMap,De=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Kt);U.isBrowser&&document.body.appendChild(new Kt);
|
|
@@ -12,8 +12,7 @@ import "../ticker/index.js";
|
|
|
12
12
|
import { c as Oe, u as jt } from "../string-f0Dnk0L1.js";
|
|
13
13
|
import { connector as es } from "../connector/index.js";
|
|
14
14
|
import { a as ts } from "../Viewport-taEXS8Uv.js";
|
|
15
|
-
import { c as ss } from "../
|
|
16
|
-
import { n as St, t as is } from "../polyfills-X6KXuHg-.js";
|
|
15
|
+
import { n as St, c as ss, t as is } from "../polyfills-AItxku8u.js";
|
|
17
16
|
import { elementResizer as kt } from "../element-resizer/index.js";
|
|
18
17
|
import { g as ns } from "../style-j2TwriJ_.js";
|
|
19
18
|
const os = /* @__PURE__ */ new Set([
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(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),c=(i,s,t,
|
|
1
|
+
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(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),c=(i,s,t,l)=>(k(i,s,"write to private field"),l?l.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../polyfills-Caa6z-Ay.cjs");require("../ticker/index.cjs");const R=require("../Damped-C236fv4v.cjs"),j=require("../element-resizer/index.cjs"),B=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,m,a,y,d,u,b,x,f,w,C,p;class O{constructor(s){n(this,o);n(this,m);n(this,a);n(this,y);n(this,d);n(this,u);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,y).set(1)});n(this,w,s=>{e(this,y).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),l={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,d)){const z=q.screenToCartesian(h,l);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,l);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,m).set(h.x),e(this,a).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,l=0,h=0;e(this,d)?e(this,u)?(s=-1,t=1,l=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,l=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,l=0,h=1):(s=0,t=e(this,b),l=0,h=e(this,x)),e(this,m).min=s,e(this,m).max=t,e(this,a).min=l,e(this,a).max=h});c(this,o,I.getElement(s.element)),c(this,m,new R.Damped(0,s.damped)),c(this,a,new R.Damped(0,s.damped)),c(this,y,new R.Damped(0,_({min:0,max:1},s.damped))),c(this,d,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,m)}get y(){return e(this,a)}get z(){return e(this,y)}get cartesian(){return e(this,d)}set cartesian(s){c(this,d,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,m).reset(),e(this,a).reset(),e(this,y).reset()}}o=new WeakMap,m=new WeakMap,a=new WeakMap,y=new WeakMap,d=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -17,9 +17,9 @@ var t = (i, s, e) => (T(i, s, "read from private field"), e ? e.call(i) : s.get(
|
|
|
17
17
|
import "../Store-OTdcl6SX.js";
|
|
18
18
|
import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
|
|
19
19
|
import { g as K } from "../dom-0S_WDL4g.js";
|
|
20
|
-
import { c as B } from "../
|
|
20
|
+
import { c as B } from "../polyfills-AItxku8u.js";
|
|
21
21
|
import "../ticker/index.js";
|
|
22
|
-
import { D as R } from "../Damped-
|
|
22
|
+
import { D as R } from "../Damped-OSAezqOR.js";
|
|
23
23
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
24
24
|
import { windowResizer as j } from "../window-resizer/index.js";
|
|
25
25
|
import { CSSProperty as P } from "../css-property/index.js";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function i(t, n, e) {
|
|
2
|
+
return (1 - e) * t + e * n;
|
|
3
|
+
}
|
|
4
|
+
function d(t, n, e, r) {
|
|
5
|
+
return i(t, n, 1 - Math.exp(-e * r));
|
|
6
|
+
}
|
|
7
|
+
function l(t, n, e = 0, r = 1) {
|
|
8
|
+
return n < t ? e : r;
|
|
9
|
+
}
|
|
10
|
+
function h(t, n = 5) {
|
|
11
|
+
return +t.toFixed(n);
|
|
12
|
+
}
|
|
13
|
+
function f(t, n = 0, e = 0) {
|
|
14
|
+
return Math.max(n, Math.min(t, e));
|
|
15
|
+
}
|
|
16
|
+
function M(t, n, e) {
|
|
17
|
+
const s = (t - n[0]) / (n[1] - n[0]) * (e[1] - e[0]) + e[0];
|
|
18
|
+
return f(s, e[0], e[1]);
|
|
19
|
+
}
|
|
20
|
+
function m(t, n, e) {
|
|
21
|
+
return t <= n ? 0 : t >= e ? 1 : (t = (t - n) / (e - n), t * t * (3 - 2 * t));
|
|
22
|
+
}
|
|
23
|
+
function y(t, n, e) {
|
|
24
|
+
return t <= n ? 0 : t >= e ? 1 : (t = (t - n) / (e - n), t * t * t * (t * (t * 6 - 15) + 10));
|
|
25
|
+
}
|
|
26
|
+
function D(t, n) {
|
|
27
|
+
const e = n.x - t.x, r = n.y - t.y;
|
|
28
|
+
return Math.sqrt(Math.pow(e, 2) + Math.pow(r, 2));
|
|
29
|
+
}
|
|
30
|
+
function b(t, n, e, r, s, o) {
|
|
31
|
+
const u = r - t, c = s - n;
|
|
32
|
+
return Math.sqrt(u * u + c * c) - (e + o);
|
|
33
|
+
}
|
|
34
|
+
const a = [
|
|
35
|
+
1,
|
|
36
|
+
10,
|
|
37
|
+
100,
|
|
38
|
+
1e3,
|
|
39
|
+
1e4,
|
|
40
|
+
1e5,
|
|
41
|
+
1e6,
|
|
42
|
+
1e7,
|
|
43
|
+
1e8,
|
|
44
|
+
1e9,
|
|
45
|
+
1e10
|
|
46
|
+
];
|
|
47
|
+
function V(t, n = 5) {
|
|
48
|
+
return Math.round(t * a[n]) / a[n];
|
|
49
|
+
}
|
|
50
|
+
function q(t, n) {
|
|
51
|
+
return Math.round(t / n) * n;
|
|
52
|
+
}
|
|
53
|
+
function w(t, n) {
|
|
54
|
+
var r;
|
|
55
|
+
const e = ((r = n.toString().split(".")[1]) == null ? void 0 : r.length) || 0;
|
|
56
|
+
return e ? +t.toFixed(e) : Math.ceil(t);
|
|
57
|
+
}
|
|
58
|
+
function F(t, n) {
|
|
59
|
+
return typeof t == "undefined" ? n : t;
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
m as a,
|
|
63
|
+
y as b,
|
|
64
|
+
f as c,
|
|
65
|
+
d,
|
|
66
|
+
D as e,
|
|
67
|
+
b as f,
|
|
68
|
+
q as g,
|
|
69
|
+
i as l,
|
|
70
|
+
M as m,
|
|
71
|
+
F as n,
|
|
72
|
+
V as p,
|
|
73
|
+
h as r,
|
|
74
|
+
l as s,
|
|
75
|
+
w as t
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function a(t,e,n){return(1-n)*t+n*e}function l(t,e,n,r){return a(t,e,1-Math.exp(-n*r))}function d(t,e,n=0,r=1){return e<t?n:r}function f(t,e=5){return+t.toFixed(e)}function p(t,e=0,n=0){return Math.max(e,Math.min(t,n))}function h(t,e,n){const u=(t-e[0])/(e[1]-e[0])*(n[1]-n[0])+n[0];return p(u,n[0],n[1])}function m(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function M(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function D(t,e){const n=e.x-t.x,r=e.y-t.y;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}function y(t,e,n,r,u,c){const o=r-t,i=u-e;return Math.sqrt(o*o+i*i)-(n+c)}const s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function b(t,e=5){return Math.round(t*s[e])/s[e]}function N(t,e){return Math.round(t/e)*e}function R(t,e){var r;const n=((r=e.toString().split(".")[1])==null?void 0:r.length)||0;return n?+t.toFixed(n):Math.ceil(t)}function S(t,e){return typeof t=="undefined"?e:t}exports.calculateDistance=D;exports.calculateDistanceWithRadius=y;exports.clamp=p;exports.damp=l;exports.lerp=a;exports.mapRange=h;exports.nullishCoalescing=S;exports.preciseNumber=b;exports.round=f;exports.roundNumberTo=N;exports.smootherstep=M;exports.smoothstep=m;exports.step=d;exports.toStep=R;
|