aptechka 0.5.41 → 0.5.44
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-BcWwYyuC.cjs → Animation-DDHjrbtL.cjs} +1 -1
- package/lib/{Animation-BCsZmZbP.js → Animation-Dq_05jlR.js} +1 -1
- package/lib/DRACOLoader-C2CFpMGS.cjs +2 -0
- package/lib/DRACOLoader-D2KY2dku.js +241 -0
- package/lib/{Damped-Ct0JVxUB.js → Damped-P4MkCGoY.js} +2 -2
- package/lib/{Damped-C9p_f19T.cjs → Damped-l0mnlhar.cjs} +1 -1
- package/lib/KTX2Loader-DdUl1XiY.cjs +2 -0
- package/lib/KTX2Loader-DqpAffDj.js +536 -0
- package/lib/MeshoptDecoder-6XfTpOG2.js +201 -0
- package/lib/MeshoptDecoder-CMeN3oU0.cjs +1 -0
- package/lib/{Tweened-CdEuSQDX.js → Tweened-CwDC2zl8.js} +2 -2
- package/lib/{Tweened-DISO_ORE.cjs → Tweened-DIt9j9B-.cjs} +1 -1
- package/lib/accordion/AccordionElement.d.ts +2 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +26 -26
- package/lib/animation/Animation.d.ts +2 -2
- package/lib/animation/AnimationLink.d.ts +1 -1
- package/lib/animation/Damped.d.ts +1 -1
- package/lib/animation/Tweened.d.ts +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.d.ts +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +26 -26
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +17 -17
- package/lib/controls/AutoplayControls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +1 -1
- package/lib/controls/WheelControls.d.ts +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +118 -110
- package/lib/css-property/index.d.ts +1 -1
- package/lib/custom-element/index.d.ts +1 -4
- package/lib/element-constructor/ElementConstructor.d.ts +2 -2
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/core/En3View.d.ts +2 -2
- package/lib/en3/core/en3.d.ts +2 -2
- package/lib/en3/index.cjs +22 -24
- package/lib/en3/index.js +1811 -2733
- package/lib/en3/loaders/en3GLTFLoader.d.ts +5 -5
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/en3/objects/En3ClipHelpers.d.ts +1 -1
- package/lib/en3/objects/En3GLTF.d.ts +3 -3
- package/lib/en3/objects/En3Image.d.ts +1 -1
- package/lib/en3/objects/En3ImageLike.d.ts +2 -2
- package/lib/en3/objects/En3Video.d.ts +1 -1
- package/lib/en3/objects/fluid/Advection.d.ts +1 -1
- package/lib/en3/objects/fluid/Divergence.d.ts +1 -1
- package/lib/en3/objects/fluid/En3Fluid.d.ts +1 -1
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -1
- package/lib/en3/objects/fluid/ExternalForce.d.ts +1 -1
- package/lib/en3/objects/fluid/Poisson.d.ts +1 -1
- package/lib/en3/objects/fluid/Pressure.d.ts +1 -1
- package/lib/en3/objects/fluid/Simulation.d.ts +1 -1
- package/lib/en3/objects/fluid/Viscous.d.ts +1 -1
- package/lib/en3/utils/coverTexture.d.ts +1 -1
- package/lib/{index-BtsOv9u0.js → index-BN9X-l9M.js} +63 -63
- package/lib/index-BbgmbQ-5.cjs +9 -0
- package/lib/layout-box/index.d.ts +2 -2
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +9 -9
- package/lib/pointer/Pointer.d.ts +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -1
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/{polyfills-mNjpy6Nt.js → polyfills-BA-CL_HF.js} +3 -3
- package/lib/polyfills-DHs2SNbz.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +1 -1
- package/lib/popover/PopoverElement.d.ts +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +48 -48
- package/lib/scroll/ScrollElement.d.ts +21 -10
- package/lib/scroll/ScrollSegmentElement.d.ts +3 -3
- package/lib/scroll/ScrollUserElement.d.ts +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +546 -502
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/select/SelectUserElement.d.ts +1 -1
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.d.ts +1 -1
- package/lib/sequence/index.js +7 -7
- package/lib/slicer/SlicerElement.d.ts +2 -2
- package/lib/slicer/index.cjs +4 -4
- package/lib/slicer/index.js +31 -31
- package/lib/source/SourceElement.d.ts +2 -2
- package/lib/source/SourceManager.d.ts +1 -1
- package/lib/tweaker/TweakerBooleanManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerColorManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerElement.d.ts +1 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +2 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +3 -3
- package/lib/tweaker/TweakerLinkManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerNumberManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerRangeManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerSelectManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerStringManagerElement.d.ts +1 -1
- package/lib/tweaker/index.cjs +2 -2
- package/lib/tweaker/index.js +125 -125
- package/lib/tweaker/tweakerManagerConstructors.d.ts +1 -1
- package/lib/utils/function.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/layout.d.ts +1 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -13
- package/package.json +4 -12
- package/lib/index-Buf76Qoq.cjs +0 -9
- package/lib/polyfills-BsJ5md2Q.cjs +0 -1
- package/lib/resized/index.cjs +0 -1
- package/lib/resized/index.d.ts +0 -12
- package/lib/resized/index.js +0 -30
package/lib/canvas/index.js
CHANGED
|
@@ -4,20 +4,20 @@ import "../Store-BQXXikps.js";
|
|
|
4
4
|
import { c as z } from "../math-BOBiC4TN.js";
|
|
5
5
|
import { e as A, q as D } from "../tags-CMPg9ETZ.js";
|
|
6
6
|
import { c as L } from "../createStylesheet-DBCEbDjI.js";
|
|
7
|
-
import { elementResizer as
|
|
7
|
+
import { elementResizer as M } from "../element-resizer/index.js";
|
|
8
8
|
import { ticker as S } from "../ticker/index.js";
|
|
9
|
-
var T = Object.defineProperty, q = Object.getOwnPropertyDescriptor, G = (t, i, s,
|
|
10
|
-
for (var r =
|
|
11
|
-
(R = t[k]) && (r = (
|
|
12
|
-
return
|
|
13
|
-
},
|
|
9
|
+
var T = Object.defineProperty, q = Object.getOwnPropertyDescriptor, G = (t, i, s, l) => {
|
|
10
|
+
for (var r = l > 1 ? void 0 : l ? q(i, s) : i, k = t.length - 1, R; k >= 0; k--)
|
|
11
|
+
(R = t[k]) && (r = (l ? R(i, s, r) : R(r)) || r);
|
|
12
|
+
return l && r && T(i, s, r), r;
|
|
13
|
+
}, E = (t, i, s) => {
|
|
14
14
|
if (!i.has(t))
|
|
15
15
|
throw TypeError("Cannot " + s);
|
|
16
|
-
}, e = (t, i, s) => (
|
|
16
|
+
}, e = (t, i, s) => (E(t, i, "read from private field"), s ? s.call(t) : i.get(t)), a = (t, i, s) => {
|
|
17
17
|
if (i.has(t))
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
19
|
i instanceof WeakSet ? i.add(t) : i.set(t, s);
|
|
20
|
-
},
|
|
20
|
+
}, h = (t, i, s, l) => (E(t, i, "write to private field"), i.set(t, s), s), u = (t, i, s) => (E(t, i, "access private method"), s), c, n, d, o, p, m, f, _, w, W, C, P, x, v, g, b;
|
|
21
21
|
const H = L({
|
|
22
22
|
":host, canvas": {
|
|
23
23
|
display: "block",
|
|
@@ -27,25 +27,25 @@ const H = L({
|
|
|
27
27
|
});
|
|
28
28
|
let y = class extends O {
|
|
29
29
|
constructor() {
|
|
30
|
-
super(), a(this, w), a(this, C), a(this, g), a(this,
|
|
31
|
-
|
|
30
|
+
super(), a(this, w), a(this, C), a(this, g), a(this, c, new F(this, "--fps", 0)), a(this, n, null), a(this, d, null), a(this, o, 0), a(this, p, 0), a(this, m, 1), a(this, f, 0), a(this, _, 1), a(this, x, (t) => {
|
|
31
|
+
h(this, m, z(devicePixelRatio, 1, 2)), h(this, o, t.contentRect.width), h(this, p, t.contentRect.height), e(this, n).width = e(this, o) * this.pixelRatio, e(this, n).height = e(this, p) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), u(this, g, b).call(this);
|
|
32
32
|
}), a(this, v, (t) => {
|
|
33
|
-
|
|
33
|
+
h(this, f, t.timestamp), h(this, _, t.timeBetweenFrames), u(this, g, b).call(this);
|
|
34
34
|
}), this.openShadow(H), A(this, {
|
|
35
35
|
children: D({
|
|
36
36
|
ref: (t) => {
|
|
37
|
-
|
|
37
|
+
h(this, n, t), h(this, d, t.getContext("2d"));
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
|
-
}), e(this,
|
|
40
|
+
}), e(this, c).subscribe((t) => {
|
|
41
41
|
typeof t.previous != "undefined" && t.current !== t.previous && u(this, w, W).call(this);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
get fpsCSSProperty() {
|
|
45
|
-
return e(this,
|
|
45
|
+
return e(this, c);
|
|
46
46
|
}
|
|
47
47
|
get canvasElement() {
|
|
48
|
-
return e(this,
|
|
48
|
+
return e(this, n);
|
|
49
49
|
}
|
|
50
50
|
get context() {
|
|
51
51
|
return e(this, d);
|
|
@@ -54,17 +54,17 @@ let y = class extends O {
|
|
|
54
54
|
return e(this, m);
|
|
55
55
|
}
|
|
56
56
|
get width() {
|
|
57
|
-
return e(this,
|
|
57
|
+
return e(this, o);
|
|
58
58
|
}
|
|
59
59
|
get height() {
|
|
60
|
-
return e(this,
|
|
60
|
+
return e(this, p);
|
|
61
61
|
}
|
|
62
62
|
get detail() {
|
|
63
63
|
return {
|
|
64
|
-
width: e(this,
|
|
65
|
-
height: e(this,
|
|
64
|
+
width: e(this, o),
|
|
65
|
+
height: e(this, p),
|
|
66
66
|
element: this,
|
|
67
|
-
canvasElement: e(this,
|
|
67
|
+
canvasElement: e(this, n),
|
|
68
68
|
pixelRatio: e(this, m),
|
|
69
69
|
context: e(this, d),
|
|
70
70
|
timestamp: e(this, f),
|
|
@@ -72,17 +72,17 @@ let y = class extends O {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
connectedCallback() {
|
|
75
|
-
e(this,
|
|
75
|
+
e(this, c).observe(), M.subscribe(this, e(this, x)), u(this, w, W).call(this);
|
|
76
76
|
}
|
|
77
77
|
disconnectedCallback() {
|
|
78
|
-
e(this,
|
|
78
|
+
e(this, c).unobserve(), M.unsubscribe(e(this, x)), u(this, C, P).call(this);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
o = /* @__PURE__ */ new WeakMap();
|
|
82
81
|
c = /* @__PURE__ */ new WeakMap();
|
|
82
|
+
n = /* @__PURE__ */ new WeakMap();
|
|
83
83
|
d = /* @__PURE__ */ new WeakMap();
|
|
84
|
+
o = /* @__PURE__ */ new WeakMap();
|
|
84
85
|
p = /* @__PURE__ */ new WeakMap();
|
|
85
|
-
l = /* @__PURE__ */ new WeakMap();
|
|
86
86
|
m = /* @__PURE__ */ new WeakMap();
|
|
87
87
|
f = /* @__PURE__ */ new WeakMap();
|
|
88
88
|
_ = /* @__PURE__ */ new WeakMap();
|
|
@@ -90,7 +90,7 @@ w = /* @__PURE__ */ new WeakSet();
|
|
|
90
90
|
W = function() {
|
|
91
91
|
S.unsubscribe(e(this, v)), this.hasAttribute("static") || S.subscribe(e(this, v), {
|
|
92
92
|
culling: this,
|
|
93
|
-
maxFPS: e(this,
|
|
93
|
+
maxFPS: e(this, c).current
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
96
|
C = /* @__PURE__ */ new WeakSet();
|
|
@@ -100,7 +100,7 @@ P = function() {
|
|
|
100
100
|
x = /* @__PURE__ */ new WeakMap();
|
|
101
101
|
v = /* @__PURE__ */ new WeakMap();
|
|
102
102
|
g = /* @__PURE__ */ new WeakSet();
|
|
103
|
-
|
|
103
|
+
b = function() {
|
|
104
104
|
this.dispatchEvent(
|
|
105
105
|
new CustomEvent("canvasRender", {
|
|
106
106
|
composed: !0,
|
package/lib/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-Djb6mb1o.cjs"),_=require("../createStylesheet-CqHU9_qv.cjs"),v=require("../theme/index.cjs"),w='<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>';var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,e,a,c)=>{for(var i=c>1?void 0:c?b(e,a):e,u=t.length-1,p;u>=0;u--)(p=t[u])&&(i=(c?p(e,a,i):p(i))||i);return c&&i&&x(e,a,i),i},k=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)},l=(t,e,a)=>(k(t,e,"read from private field"),a?a.call(t):e.get(t)),f=(t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)},g=(t,e,a,c)=>(k(t,e,"write to private field"),e.set(t,a),a),d=(t,e,a)=>(k(t,e,"access private method"),a),s,o,h,n;const C=_.createStylesheet({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:v.aptechkaTheme.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:v.aptechkaTheme.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:v.aptechkaTheme.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});exports.CheckboxElement=class extends m.CustomElement{constructor(){super(),f(this,h),f(this,s,null),f(this,o,void 0),this.openShadow(C),g(this,o,this.attachInternals()),r.element(this,{children:r.label({children:[r.span({class:"fake",children:r.slot({children:[r.span({class:"default",children:[w]})]})}),r.input({ref:e=>{g(this,s,e),e.required=this.hasAttribute("required"),e.value=this.getAttribute("value")||"",e.checked=this.hasAttribute("checked"),e.name=this.getAttribute("name")||"",d(this,h,n).call(this)},class:"real",type:"checkbox",onChange:()=>{d(this,h,n).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return l(this,s).checked}set checked(e){l(this,s).checked=e,d(this,h,n).call(this)}get value(){return l(this,s).value}set value(e){l(this,s).value=e,d(this,h,n).call(this)}};s=new WeakMap;o=new WeakMap;h=new WeakSet;n=function(){this.checked?l(this,o).setFormValue(this.value):l(this,o).setFormValue(null),this.classList.toggle("checked",this.checked)};exports.CheckboxElement.formAssociated=!0;exports.CheckboxElement=y([m.define("e-checkbox")],exports.CheckboxElement);
|
package/lib/checkbox/index.js
CHANGED
|
@@ -4,18 +4,18 @@ import { e as x, a3 as y, aB as g, ay as b, a0 as C } from "../tags-CMPg9ETZ.js"
|
|
|
4
4
|
import { c as A } from "../createStylesheet-DBCEbDjI.js";
|
|
5
5
|
import { aptechkaTheme as u } from "../theme/index.js";
|
|
6
6
|
const E = '<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>';
|
|
7
|
-
var S = Object.defineProperty, F = Object.getOwnPropertyDescriptor, M = (e, t, a,
|
|
8
|
-
for (var
|
|
9
|
-
(p = e[d]) && (
|
|
10
|
-
return
|
|
7
|
+
var S = Object.defineProperty, F = Object.getOwnPropertyDescriptor, M = (e, t, a, l) => {
|
|
8
|
+
for (var i = l > 1 ? void 0 : l ? F(t, a) : t, d = e.length - 1, p; d >= 0; d--)
|
|
9
|
+
(p = e[d]) && (i = (l ? p(t, a, i) : p(i)) || i);
|
|
10
|
+
return l && i && S(t, a, i), i;
|
|
11
11
|
}, m = (e, t, a) => {
|
|
12
12
|
if (!t.has(e))
|
|
13
13
|
throw TypeError("Cannot " + a);
|
|
14
|
-
},
|
|
14
|
+
}, h = (e, t, a) => (m(e, t, "read from private field"), a ? a.call(e) : t.get(e)), v = (e, t, a) => {
|
|
15
15
|
if (t.has(e))
|
|
16
16
|
throw TypeError("Cannot add the same private member more than once");
|
|
17
17
|
t instanceof WeakSet ? t.add(e) : t.set(e, a);
|
|
18
|
-
}, k = (e, t, a,
|
|
18
|
+
}, k = (e, t, a, l) => (m(e, t, "write to private field"), t.set(e, a), a), n = (e, t, a) => (m(e, t, "access private method"), a), s, o, r, c;
|
|
19
19
|
const O = A({
|
|
20
20
|
":host": {
|
|
21
21
|
position: "relative",
|
|
@@ -60,7 +60,7 @@ const O = A({
|
|
|
60
60
|
});
|
|
61
61
|
let f = class extends w {
|
|
62
62
|
constructor() {
|
|
63
|
-
super(), v(this,
|
|
63
|
+
super(), v(this, r), v(this, s, null), v(this, o, void 0), this.openShadow(O), k(this, o, this.attachInternals()), x(this, {
|
|
64
64
|
children: y({
|
|
65
65
|
children: [
|
|
66
66
|
g({
|
|
@@ -76,12 +76,12 @@ let f = class extends w {
|
|
|
76
76
|
}),
|
|
77
77
|
C({
|
|
78
78
|
ref: (e) => {
|
|
79
|
-
k(this,
|
|
79
|
+
k(this, s, e), e.required = this.hasAttribute("required"), e.value = this.getAttribute("value") || "", e.checked = this.hasAttribute("checked"), e.name = this.getAttribute("name") || "", n(this, r, c).call(this);
|
|
80
80
|
},
|
|
81
81
|
class: "real",
|
|
82
82
|
type: "checkbox",
|
|
83
83
|
onChange: () => {
|
|
84
|
-
|
|
84
|
+
n(this, r, c).call(this), this.dispatchEvent(
|
|
85
85
|
new Event("change", {
|
|
86
86
|
composed: !0
|
|
87
87
|
})
|
|
@@ -93,23 +93,23 @@ let f = class extends w {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
get checked() {
|
|
96
|
-
return
|
|
96
|
+
return h(this, s).checked;
|
|
97
97
|
}
|
|
98
98
|
set checked(e) {
|
|
99
|
-
|
|
99
|
+
h(this, s).checked = e, n(this, r, c).call(this);
|
|
100
100
|
}
|
|
101
101
|
get value() {
|
|
102
|
-
return
|
|
102
|
+
return h(this, s).value;
|
|
103
103
|
}
|
|
104
104
|
set value(e) {
|
|
105
|
-
|
|
105
|
+
h(this, s).value = e, n(this, r, c).call(this);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
s = /* @__PURE__ */ new WeakMap();
|
|
109
|
+
o = /* @__PURE__ */ new WeakMap();
|
|
110
|
+
r = /* @__PURE__ */ new WeakSet();
|
|
111
111
|
c = function() {
|
|
112
|
-
this.checked ?
|
|
112
|
+
this.checked ? h(this, o).setFormValue(this.value) : h(this, o).setFormValue(null), this.classList.toggle("checked", this.checked);
|
|
113
113
|
};
|
|
114
114
|
f.formAssociated = !0;
|
|
115
115
|
f = M([
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var N=(r,n,e)=>{if(!n.has(r))throw TypeError("Cannot "+e)};var t=(r,n,e)=>(N(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,e)},i=(r,n,e,a)=>(N(r,n,"write to private field"),a?a.call(r,e):n.set(r,e),e);var L=(r,n,e)=>(N(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-JBOkFLTh.cjs"),M=require("../ticker/index.cjs");require("../Store-C-1ruEIm.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-DIt9j9B-.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-DHs2SNbz.cjs"),_=require("../order/index.cjs");var z;class R{constructor(){s(this,z,new V.Notifier)}get changeEvent(){return t(this,z)}}z=new WeakMap;var o,d,u,D;class p extends R{constructor(e){super();s(this,o,null);s(this,d,null);s(this,u,"offsetHeight");s(this,D,e=>{const a=e.shiftKey?-1:1;let h;e.code==="Space"?h=a*t(this,d)[t(this,u)]*.4:e.code==="ArrowLeft"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowRight"?h=1*t(this,d)[t(this,u)]*.2:e.code==="ArrowUp"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowDown"?h=1*t(this,d)[t(this,u)]*.2:e.code==="PageUp"?h=-1*t(this,d)[t(this,u)]:e.code==="PageDown"?h=1*t(this,d)[t(this,u)]:e.code==="Home"?h=0:e.code==="End"&&(h=t(this,u)==="offsetWidth"?t(this,d).scrollWidth:t(this,d).scrollHeight),h&&(e.stopPropagation(),this.changeEvent.notify("keyboard",h))});m.isBrowser&&(i(this,o,e!=null&&e.element&&Q.getElement(e.element)||window),i(this,d,t(this,o)instanceof HTMLElement?t(this,o):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,o).addEventListener("keydown",t(this,D))}disconnect(){m.isBrowser&&t(this,o).removeEventListener("keydown",t(this,D))}}o=new WeakMap,d=new WeakMap,u=new WeakMap,D=new WeakMap;var w,y,H,P,l,k,f,C,S,W,U,q,X,B;class ee extends R{constructor(e){super();s(this,C);s(this,W);s(this,w,void 0);s(this,y,void 0);s(this,H,void 0);s(this,P,void 0);s(this,l,void 0);s(this,k,void 0);s(this,f,void 0);s(this,q,void 0);s(this,X,void 0);s(this,B,void 0);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,w)*this.direction*(1-t(this,l).current))}),i(this,X,()=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,w))*this.direction*(1-t(this,l).current))}),i(this,B,()=>{t(this,y)&&(document.hidden?t(this,l).set(1,{equalize:!0}):t(this,l).set(0,{equalize:!0}))}),i(this,w,(e==null?void 0:e.speed)||1),i(this,y,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,y,e),t(this,f)&&L(this,C,S).call(this)}set speed(e){i(this,w,e),t(this,f)&&L(this,C,S).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,C,S).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,W,U).call(this))}pauseAndContinue(e){e&&!t(this,l).target&&(clearInterval(t(this,k)),t(this,l).set(1,{duration:Math.min(e,1e3)}),i(this,k,setTimeout(()=>{t(this,l).set(0,{duration:Math.min(e,5e3)})},e)))}}w=new WeakMap,y=new WeakMap,H=new WeakMap,P=new WeakMap,l=new WeakMap,k=new WeakMap,f=new WeakMap,C=new WeakSet,S=function(){L(this,W,U).call(this),t(this,y)?i(this,P,setInterval(t(this,X),Math.abs(t(this,w)))):M.ticker.subscribe(t(this,q),t(this,H)),document.addEventListener("visibilitychange",t(this,B))},W=new WeakSet,U=function(){clearInterval(t(this,P)),M.ticker.unsubscribe(t(this,q)),clearInterval(t(this,k)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,B))},q=new WeakMap,X=new WeakMap,B=new WeakMap;var T,E,I,Y;class te extends R{constructor(e){super();s(this,T,null);s(this,E,void 0);s(this,I,void 0);s(this,Y,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 h=Date.now();if(h-t(this,I)>40&&(a=100*Math.sign(a)),i(this,I,h),Math.abs(a)<100||t(this,E))return;this.changeEvent.notify("wheel",a),i(this,E,setTimeout(()=>{i(this,E,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&&Q.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,T).addEventListener("wheel",t(this,Y),{passive:!1})}disconnect(){m.isBrowser&&(t(this,T).removeEventListener("wheel",t(this,Y)),clearTimeout(t(this,E)))}}T=new WeakMap,E=new WeakMap,I=new WeakMap,Y=new WeakMap;var x,b,A,c,K,v;const g=class g extends R{constructor(e){super();s(this,b,null);s(this,A,!1);s(this,c,0);s(this,K,e=>{if(e.composedPath().find(h=>h instanceof HTMLElement&&h.hasAttribute("drag-dead-zone")))return;this.swipe||M.ticker.unsubscribe(t(this,v));let a=e;i(this,c,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(h=>{if(t(this,A)||t(g,x)&&t(g,x)!==t(this,b))return;this.swipe&&i(this,A,!0);const O=a.x-h.x,F=a.y-h.y;this.axis==="x"?i(this,c,O):i(this,c,F),a=h,(this.axis==="x"&&Math.abs(O)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(O))&&(i(g,x,t(this,b)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(g,x,null),this.swipe||(i(this,c,t(this,c)*3),M.ticker.subscribe(t(this,v),{order:_.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,v,()=>{Math.floor(t(this,c))||M.ticker.unsubscribe(t(this,v)),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,b,e!=null&&e.element&&Q.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,b).addEventListener("pointerdown",t(this,K))}disconnect(){m.isBrowser&&(t(this,b).removeEventListener("pointerdown",t(this,K)),M.ticker.unsubscribe(t(this,v)))}};x=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,K=new WeakMap,v=new WeakMap,s(g,x,null);let j=g;exports.AutoplayControls=ee;exports.Controls=R;exports.DragControls=j;exports.KeyboardControls=p;exports.WheelControls=te;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,205 +1,213 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
1
|
+
var S = (a, n, e) => {
|
|
2
|
+
if (!n.has(a))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var t = (a,
|
|
6
|
-
if (
|
|
5
|
+
var t = (a, n, e) => (S(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => {
|
|
6
|
+
if (n.has(a))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, i = (a,
|
|
10
|
-
|
|
8
|
+
n instanceof WeakSet ? n.add(a) : n.set(a, e);
|
|
9
|
+
}, i = (a, n, e, r) => (S(a, n, "write to private field"), r ? r.call(a, e) : n.set(a, e), e);
|
|
10
|
+
var L = (a, n, e) => (S(a, n, "access private method"), e);
|
|
11
|
+
import { Notifier as j } from "../notifier/index.js";
|
|
11
12
|
import { i as m } from "../browser-0zX67oeU.js";
|
|
12
|
-
import { g as
|
|
13
|
-
import { ticker as
|
|
13
|
+
import { g as Q } from "../dom-0S_WDL4g.js";
|
|
14
|
+
import { ticker as M } from "../ticker/index.js";
|
|
14
15
|
import "../Store-BQXXikps.js";
|
|
15
|
-
import {
|
|
16
|
-
import { T as
|
|
17
|
-
import { s as
|
|
18
|
-
import { p as
|
|
19
|
-
import { TICK_ORDER as
|
|
20
|
-
var
|
|
21
|
-
class
|
|
16
|
+
import { e as G } from "../easings-BKi40vHz.js";
|
|
17
|
+
import { T as J } from "../Tweened-CwDC2zl8.js";
|
|
18
|
+
import { s as Z } from "../gestures-D2Fdra_G.js";
|
|
19
|
+
import { p as $ } from "../polyfills-BA-CL_HF.js";
|
|
20
|
+
import { TICK_ORDER as p } from "../order/index.js";
|
|
21
|
+
var B;
|
|
22
|
+
class F {
|
|
22
23
|
constructor() {
|
|
23
|
-
s(this,
|
|
24
|
+
s(this, B, new j());
|
|
24
25
|
}
|
|
25
26
|
get changeEvent() {
|
|
26
|
-
return t(this,
|
|
27
|
+
return t(this, B);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
class
|
|
30
|
+
B = new WeakMap();
|
|
31
|
+
var w, c, f, P;
|
|
32
|
+
class ce extends F {
|
|
32
33
|
constructor(e) {
|
|
33
34
|
super();
|
|
34
|
-
s(this,
|
|
35
|
-
s(this,
|
|
35
|
+
s(this, w, null);
|
|
36
|
+
s(this, c, null);
|
|
36
37
|
s(this, f, "offsetHeight");
|
|
37
|
-
s(this,
|
|
38
|
-
const
|
|
38
|
+
s(this, P, (e) => {
|
|
39
|
+
const r = e.shiftKey ? -1 : 1;
|
|
39
40
|
let h;
|
|
40
|
-
e.code === "Space" ? h =
|
|
41
|
+
e.code === "Space" ? h = r * t(this, c)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "PageUp" ? h = -1 * t(this, c)[t(this, f)] : e.code === "PageDown" ? h = 1 * t(this, c)[t(this, f)] : e.code === "Home" ? h = 0 : e.code === "End" && (h = t(this, f) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), h && (e.stopPropagation(), this.changeEvent.notify("keyboard", h));
|
|
41
42
|
});
|
|
42
|
-
m && (i(this,
|
|
43
|
+
m && (i(this, w, e != null && e.element && Q(e.element) || window), i(this, c, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
43
44
|
}
|
|
44
45
|
set dimension(e) {
|
|
45
46
|
i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
46
47
|
}
|
|
47
48
|
connect() {
|
|
48
|
-
m && t(this,
|
|
49
|
+
m && t(this, w).addEventListener(
|
|
49
50
|
"keydown",
|
|
50
|
-
t(this,
|
|
51
|
+
t(this, P)
|
|
51
52
|
);
|
|
52
53
|
}
|
|
53
54
|
disconnect() {
|
|
54
|
-
m && t(this,
|
|
55
|
+
m && t(this, w).removeEventListener(
|
|
55
56
|
"keydown",
|
|
56
|
-
t(this,
|
|
57
|
+
t(this, P)
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
class
|
|
61
|
+
w = new WeakMap(), c = new WeakMap(), f = new WeakMap(), P = new WeakMap();
|
|
62
|
+
var b, E, X, Y, l, I, u, T, q, R, U, k, W, C;
|
|
63
|
+
class fe extends F {
|
|
63
64
|
constructor(e) {
|
|
64
65
|
super();
|
|
65
|
-
s(this,
|
|
66
|
-
s(this,
|
|
67
|
-
s(this,
|
|
68
|
-
s(this,
|
|
66
|
+
s(this, T);
|
|
67
|
+
s(this, R);
|
|
68
|
+
s(this, b, void 0);
|
|
69
|
+
s(this, E, void 0);
|
|
70
|
+
s(this, X, void 0);
|
|
71
|
+
s(this, Y, void 0);
|
|
69
72
|
s(this, l, void 0);
|
|
70
|
-
s(this, L, void 0);
|
|
71
|
-
s(this, M, void 0);
|
|
72
|
-
s(this, P, void 0);
|
|
73
73
|
s(this, I, void 0);
|
|
74
|
-
|
|
74
|
+
s(this, u, void 0);
|
|
75
|
+
s(this, k, void 0);
|
|
76
|
+
s(this, W, void 0);
|
|
77
|
+
s(this, C, void 0);
|
|
78
|
+
this.direction = 1, i(this, l, new J(0, { easing: G })), i(this, u, !1), i(this, k, (r) => {
|
|
75
79
|
t(this, l).current !== 1 && this.changeEvent.notify(
|
|
76
80
|
"autoplay",
|
|
77
|
-
|
|
81
|
+
r.timeBetweenFrames * t(this, b) * this.direction * (1 - t(this, l).current)
|
|
78
82
|
);
|
|
79
|
-
}), i(this,
|
|
83
|
+
}), i(this, W, () => {
|
|
80
84
|
t(this, l).current !== 1 && this.changeEvent.notify(
|
|
81
85
|
"autoplay",
|
|
82
|
-
Math.sign(t(this,
|
|
86
|
+
Math.sign(t(this, b)) * this.direction * (1 - t(this, l).current)
|
|
83
87
|
);
|
|
84
|
-
}), i(this,
|
|
85
|
-
t(this,
|
|
86
|
-
}), i(this,
|
|
88
|
+
}), i(this, C, () => {
|
|
89
|
+
t(this, E) && (document.hidden ? t(this, l).set(1, { equalize: !0 }) : t(this, l).set(0, { equalize: !0 }));
|
|
90
|
+
}), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this, E, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
|
|
87
91
|
}
|
|
88
92
|
set interval(e) {
|
|
89
|
-
i(this,
|
|
93
|
+
i(this, E, e), t(this, u) && L(this, T, q).call(this);
|
|
90
94
|
}
|
|
91
95
|
set speed(e) {
|
|
92
|
-
i(this,
|
|
96
|
+
i(this, b, e), t(this, u) && L(this, T, q).call(this);
|
|
93
97
|
}
|
|
94
98
|
connect() {
|
|
95
|
-
|
|
96
|
-
t(this, P),
|
|
97
|
-
Math.abs(t(this, o))
|
|
98
|
-
)) : x.subscribe(t(this, M), t(this, D)), document.addEventListener(
|
|
99
|
-
"visibilitychange",
|
|
100
|
-
t(this, I)
|
|
101
|
-
);
|
|
99
|
+
t(this, u) || (i(this, u, !0), L(this, T, q).call(this));
|
|
102
100
|
}
|
|
103
101
|
disconnect() {
|
|
104
|
-
|
|
105
|
-
"visibilitychange",
|
|
106
|
-
t(this, I)
|
|
107
|
-
);
|
|
102
|
+
t(this, u) && (i(this, u, !1), L(this, R, U).call(this));
|
|
108
103
|
}
|
|
109
104
|
pauseAndContinue(e) {
|
|
110
|
-
e && !t(this, l).target && (clearInterval(t(this,
|
|
105
|
+
e && !t(this, l).target && (clearInterval(t(this, I)), t(this, l).set(1, { duration: Math.min(e, 1e3) }), i(this, I, setTimeout(() => {
|
|
111
106
|
t(this, l).set(0, { duration: Math.min(e, 5e3) });
|
|
112
107
|
}, e)));
|
|
113
108
|
}
|
|
114
109
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
b = new WeakMap(), E = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(), I = new WeakMap(), u = new WeakMap(), T = new WeakSet(), q = function() {
|
|
111
|
+
L(this, R, U).call(this), t(this, E) ? i(this, Y, setInterval(
|
|
112
|
+
t(this, W),
|
|
113
|
+
Math.abs(t(this, b))
|
|
114
|
+
)) : M.subscribe(t(this, k), t(this, X)), document.addEventListener(
|
|
115
|
+
"visibilitychange",
|
|
116
|
+
t(this, C)
|
|
117
|
+
);
|
|
118
|
+
}, R = new WeakSet(), U = function() {
|
|
119
|
+
clearInterval(t(this, Y)), M.unsubscribe(t(this, k)), clearInterval(t(this, I)), t(this, l).close(), document.removeEventListener(
|
|
120
|
+
"visibilitychange",
|
|
121
|
+
t(this, C)
|
|
122
|
+
);
|
|
123
|
+
}, k = new WeakMap(), W = new WeakMap(), C = new WeakMap();
|
|
124
|
+
var A, y, D, z;
|
|
125
|
+
class ue extends F {
|
|
118
126
|
constructor(e) {
|
|
119
127
|
super();
|
|
120
|
-
s(this,
|
|
121
|
-
s(this,
|
|
122
|
-
s(this,
|
|
123
|
-
s(this,
|
|
124
|
-
let
|
|
128
|
+
s(this, A, null);
|
|
129
|
+
s(this, y, void 0);
|
|
130
|
+
s(this, D, void 0);
|
|
131
|
+
s(this, z, (e) => {
|
|
132
|
+
let r = 0;
|
|
125
133
|
if (e.preventDefault(), !(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
|
|
126
|
-
if (
|
|
134
|
+
if (r = (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) {
|
|
127
135
|
const h = Date.now();
|
|
128
|
-
if (h - t(this,
|
|
136
|
+
if (h - t(this, D) > 40 && (r = 100 * Math.sign(r)), i(this, D, h), Math.abs(r) < 100 || t(this, y))
|
|
129
137
|
return;
|
|
130
|
-
this.changeEvent.notify("wheel",
|
|
131
|
-
i(this,
|
|
138
|
+
this.changeEvent.notify("wheel", r), i(this, y, setTimeout(() => {
|
|
139
|
+
i(this, y, void 0);
|
|
132
140
|
}, 80));
|
|
133
141
|
} else
|
|
134
|
-
this.changeEvent.notify("wheel",
|
|
142
|
+
this.changeEvent.notify("wheel", r);
|
|
135
143
|
});
|
|
136
|
-
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,
|
|
144
|
+
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, D, Date.now()), m && i(this, A, e != null && e.element && Q(e.element) || window);
|
|
137
145
|
}
|
|
138
146
|
connect() {
|
|
139
|
-
m && t(this,
|
|
147
|
+
m && t(this, A).addEventListener(
|
|
140
148
|
"wheel",
|
|
141
|
-
t(this,
|
|
149
|
+
t(this, z),
|
|
142
150
|
{
|
|
143
151
|
passive: !1
|
|
144
152
|
}
|
|
145
153
|
);
|
|
146
154
|
}
|
|
147
155
|
disconnect() {
|
|
148
|
-
m && (t(this,
|
|
156
|
+
m && (t(this, A).removeEventListener(
|
|
149
157
|
"wheel",
|
|
150
|
-
t(this,
|
|
151
|
-
), clearTimeout(t(this,
|
|
158
|
+
t(this, z)
|
|
159
|
+
), clearTimeout(t(this, y)));
|
|
152
160
|
}
|
|
153
161
|
}
|
|
154
|
-
|
|
155
|
-
var
|
|
156
|
-
const
|
|
162
|
+
A = new WeakMap(), y = new WeakMap(), D = new WeakMap(), z = new WeakMap();
|
|
163
|
+
var v, o, H, d, K, x;
|
|
164
|
+
const g = class g extends F {
|
|
157
165
|
constructor(e) {
|
|
158
166
|
super();
|
|
159
|
-
s(this,
|
|
160
|
-
s(this,
|
|
161
|
-
s(this,
|
|
162
|
-
s(this,
|
|
167
|
+
s(this, o, null);
|
|
168
|
+
s(this, H, !1);
|
|
169
|
+
s(this, d, 0);
|
|
170
|
+
s(this, K, (e) => {
|
|
163
171
|
if (e.composedPath().find(
|
|
164
172
|
(h) => h instanceof HTMLElement && h.hasAttribute("drag-dead-zone")
|
|
165
173
|
))
|
|
166
174
|
return;
|
|
167
|
-
this.swipe ||
|
|
168
|
-
let
|
|
169
|
-
i(this,
|
|
175
|
+
this.swipe || M.unsubscribe(t(this, x));
|
|
176
|
+
let r = e;
|
|
177
|
+
i(this, d, 0), document.documentElement.classList.add("grabbing"), Z(
|
|
170
178
|
(h) => {
|
|
171
|
-
if (t(this,
|
|
179
|
+
if (t(this, H) || t(g, v) && t(g, v) !== t(this, o))
|
|
172
180
|
return;
|
|
173
|
-
this.swipe && i(this,
|
|
174
|
-
const
|
|
175
|
-
this.axis === "x" ? i(this,
|
|
181
|
+
this.swipe && i(this, H, !0);
|
|
182
|
+
const N = r.x - h.x, O = r.y - h.y;
|
|
183
|
+
this.axis === "x" ? i(this, d, N) : i(this, d, O), r = h, (this.axis === "x" && Math.abs(N) > Math.abs(O) || this.axis === "y" && Math.abs(O) > Math.abs(N)) && (i(g, v, t(this, o)), this.changeEvent.notify("drag", t(this, d)));
|
|
176
184
|
},
|
|
177
185
|
() => {
|
|
178
|
-
i(
|
|
186
|
+
i(g, v, null), this.swipe || (i(this, d, t(this, d) * 3), M.subscribe(t(this, x), { order: p.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
|
|
179
187
|
}
|
|
180
188
|
);
|
|
181
189
|
});
|
|
182
|
-
s(this,
|
|
183
|
-
Math.floor(t(this,
|
|
190
|
+
s(this, x, () => {
|
|
191
|
+
Math.floor(t(this, d)) || M.unsubscribe(t(this, x)), i(this, d, t(this, d) * 0.95), i(this, d, $(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
|
|
184
192
|
});
|
|
185
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this,
|
|
193
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, o, e != null && e.element && Q(e.element) || document.documentElement);
|
|
186
194
|
}
|
|
187
195
|
connect() {
|
|
188
|
-
m && t(this,
|
|
196
|
+
m && t(this, o).addEventListener("pointerdown", t(this, K));
|
|
189
197
|
}
|
|
190
198
|
disconnect() {
|
|
191
|
-
m && (t(this,
|
|
199
|
+
m && (t(this, o).removeEventListener(
|
|
192
200
|
"pointerdown",
|
|
193
|
-
t(this,
|
|
194
|
-
),
|
|
201
|
+
t(this, K)
|
|
202
|
+
), M.unsubscribe(t(this, x)));
|
|
195
203
|
}
|
|
196
204
|
};
|
|
197
|
-
|
|
198
|
-
let
|
|
205
|
+
v = new WeakMap(), o = new WeakMap(), H = new WeakMap(), d = new WeakMap(), K = new WeakMap(), x = new WeakMap(), s(g, v, null);
|
|
206
|
+
let V = g;
|
|
199
207
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
fe as AutoplayControls,
|
|
209
|
+
F as Controls,
|
|
210
|
+
V as DragControls,
|
|
211
|
+
ce as KeyboardControls,
|
|
212
|
+
ue as WheelControls
|
|
205
213
|
};
|