aptechka 0.4.8 → 0.4.10
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/DragControls-C7P6P5HO.cjs +1 -0
- package/lib/DragControls-CZhJHO0_.js +146 -0
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +2 -2
- package/lib/controls/Controls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +16 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.d.ts +1 -0
- package/lib/controls/index.js +10 -9
- package/lib/{createStylesheet-BdXmIliB.js → createStylesheet-D6C3BPkl.js} +1 -1
- package/lib/{createStylesheet-DXVWlg2K.cjs → createStylesheet-W0b965g0.cjs} +1 -1
- package/lib/{createTheme-D0IoYkYN.js → createTheme-CHnsCgAr.js} +1 -1
- package/lib/{createTheme-B_W5dUY9.cjs → createTheme-Cfaw9UmV.cjs} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/{index-B7uhBNcF.cjs → index-C_qv6rk4.cjs} +1 -1
- package/lib/{index-CSoExCvs.js → index-ilQWX_BM.js} +2 -2
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +2 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +423 -410
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/string-DhgS_iFl.cjs +1 -0
- package/lib/{string-3lAkpJJP.js → string-f0Dnk0L1.js} +9 -5
- package/lib/{tags-B5dMXiBy.cjs → tags-CK7mk_EP.cjs} +1 -1
- package/lib/{tags-pG4smcDE.js → tags-D0zt3vue.js} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +43 -42
- package/lib/utils/string.d.ts +1 -0
- package/package.json +2 -2
- package/lib/WheelControls-0zNcnAB3.cjs +0 -1
- package/lib/WheelControls-BAyRKpRZ.js +0 -97
- package/lib/string-vBu90jhV.cjs +0 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
var
|
|
1
|
+
var es = (e, s, r) => {
|
|
2
2
|
if (!s.has(e))
|
|
3
3
|
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var o = (e, s, r) => (
|
|
5
|
+
var o = (e, s, r) => (es(e, s, "read from private field"), r ? r.call(e) : s.get(e)), F = (e, s, r) => {
|
|
6
6
|
if (s.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
9
|
-
},
|
|
10
|
-
import { D as
|
|
11
|
-
import { S as
|
|
12
|
-
import { D as
|
|
13
|
-
import { i as
|
|
14
|
-
import { a as
|
|
15
|
-
import { c as
|
|
9
|
+
}, A = (e, s, r, h) => (es(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r);
|
|
10
|
+
import { D as Ps } from "../Damped-HhitpTP_.js";
|
|
11
|
+
import { S as St } from "../Store-BQXXikps.js";
|
|
12
|
+
import { D as Es } from "../Derived-kPJs5JC5.js";
|
|
13
|
+
import { i as Ge } from "../browser-0zX67oeU.js";
|
|
14
|
+
import { a as _e, g as be } from "../layout-HoBT_Da2.js";
|
|
15
|
+
import { c as Ke, s as Ms, b as xs, a as Ls } from "../math-BOBiC4TN.js";
|
|
16
16
|
import "../ticker/index.js";
|
|
17
|
-
import { W as
|
|
18
|
-
import { CustomElement as
|
|
19
|
-
import { TICK_ORDER as
|
|
20
|
-
import { windowResizer as
|
|
17
|
+
import { W as Vs, K as $s, D as Fs } from "../DragControls-CZhJHO0_.js";
|
|
18
|
+
import { CustomElement as us, define as Kt } from "../custom-element/index.js";
|
|
19
|
+
import { TICK_ORDER as Os, RESIZE_ORDER as Ue } from "../order/index.js";
|
|
20
|
+
import { windowResizer as Bt } from "../window-resizer/index.js";
|
|
21
21
|
import { scrollEntries as Et } from "../scroll-entries/index.js";
|
|
22
|
-
import { e as
|
|
23
|
-
import { c as
|
|
24
|
-
import { cssUnitParser as
|
|
25
|
-
import { CSSProperty as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
import { e as qe, D as Le, ay as Ce, p as zs } from "../tags-D0zt3vue.js";
|
|
23
|
+
import { c as Ne } from "../createStylesheet-D6C3BPkl.js";
|
|
24
|
+
import { cssUnitParser as ss } from "../css-unit-parser/index.js";
|
|
25
|
+
import { CSSProperty as S } from "../css-property/index.js";
|
|
26
|
+
import { d as Ds } from "../Viewport-wlgZaIn7.js";
|
|
27
|
+
import { s as As } from "../gestures-D2Fdra_G.js";
|
|
28
|
+
import { f as Ts } from "../dom-0S_WDL4g.js";
|
|
29
|
+
import { aptechkaTheme as is } from "../theme/index.js";
|
|
30
|
+
import { d as ps } from "../function-C10DGppn.js";
|
|
31
|
+
var Rs = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Bs = (e, s, r, h) => {
|
|
32
|
+
for (var n = h > 1 ? void 0 : h ? Is(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
32
33
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
33
|
-
return h && n &&
|
|
34
|
-
},
|
|
34
|
+
return h && n && Rs(s, r, n), n;
|
|
35
|
+
}, Ze = (e, s, r) => {
|
|
35
36
|
if (!s.has(e))
|
|
36
37
|
throw TypeError("Cannot " + r);
|
|
37
|
-
}, i = (e, s, r) => (
|
|
38
|
+
}, i = (e, s, r) => (Ze(e, s, "read from private field"), r ? r.call(e) : s.get(e)), l = (e, s, r) => {
|
|
38
39
|
if (s.has(e))
|
|
39
40
|
throw TypeError("Cannot add the same private member more than once");
|
|
40
41
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
41
|
-
},
|
|
42
|
-
class
|
|
42
|
+
}, g = (e, s, r, h) => (Ze(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), C = (e, s, r) => (Ze(e, s, "access private method"), r), d, O, j, N, tt, Lt, D, mt, Vt, $t, Ft, w, ye, m, he, ne, L, _, K, Z, Wt, at, W, Ut, vt, Ht, Gt, te, ke, Tt, ee, We, Je, Pe, Qe, ae, Ve, oe, $e, Mt, Me, Fe, fs, qt, le, Oe, V, k, pt, X;
|
|
43
|
+
class Hs {
|
|
43
44
|
constructor(s, r) {
|
|
44
45
|
F(this, V, void 0);
|
|
45
46
|
F(this, k, void 0);
|
|
46
|
-
F(this,
|
|
47
|
+
F(this, pt, 0);
|
|
47
48
|
F(this, X, 0);
|
|
48
|
-
|
|
49
|
+
A(this, V, s), A(this, k, r), Et.register(o(this, V));
|
|
49
50
|
}
|
|
50
51
|
get size() {
|
|
51
|
-
return o(this,
|
|
52
|
+
return o(this, pt);
|
|
52
53
|
}
|
|
53
54
|
get position() {
|
|
54
55
|
return o(this, X);
|
|
@@ -57,22 +58,22 @@ class Ds {
|
|
|
57
58
|
Et.unregister(o(this, V)), o(this, V).style.transform = "";
|
|
58
59
|
}
|
|
59
60
|
resize() {
|
|
60
|
-
|
|
61
|
+
A(this, pt, o(this, k).vertical ? o(this, V).offsetHeight : o(this, V).offsetWidth), A(this, X, o(this, k).vertical ? _e(o(this, V)) : be(o(this, V))), A(this, X, o(this, X) - o(this, k).contentPosition);
|
|
61
62
|
}
|
|
62
63
|
transform() {
|
|
63
64
|
let s = 0;
|
|
64
|
-
const r = o(this, k).viewportSize - o(this,
|
|
65
|
-
o(this, k).infiniteCSSProperty.current && o(this, k).overscroll && o(this, X) + o(this,
|
|
65
|
+
const r = o(this, k).viewportSize - o(this, pt);
|
|
66
|
+
o(this, k).infiniteCSSProperty.current && o(this, k).overscroll && o(this, X) + o(this, pt) < o(this, k).currentScrollValue && (s = o(this, k).distance * -1 - o(this, k).gap), Et.update(
|
|
66
67
|
o(this, V),
|
|
67
68
|
o(this, k).axisAttibute.current,
|
|
68
69
|
s
|
|
69
70
|
);
|
|
70
|
-
const h = o(this, k).currentScrollValue + s, n = o(this, X) - o(this, k).viewportSize - r, c = o(this, X) + o(this,
|
|
71
|
+
const h = o(this, k).currentScrollValue + s, n = o(this, X) - o(this, k).viewportSize - r, c = o(this, X) + o(this, pt) + r, p = Ke(h, n, c);
|
|
71
72
|
o(this, k).vertical ? o(this, V).style.transform = `translate3d(0px, ${p * -1}px, 0px)` : o(this, V).style.transform = `translate3d(${p * -1}px, 0px, 0px)`;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
V = new WeakMap(), k = new WeakMap(),
|
|
75
|
-
const
|
|
75
|
+
V = new WeakMap(), k = new WeakMap(), pt = new WeakMap(), X = new WeakMap();
|
|
76
|
+
const Gs = Ne({
|
|
76
77
|
":host": {
|
|
77
78
|
position: "relative",
|
|
78
79
|
width: "100%",
|
|
@@ -104,109 +105,113 @@ const As = Ge({
|
|
|
104
105
|
flexShrink: "0"
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
|
-
let
|
|
108
|
+
let Ee = class extends us {
|
|
108
109
|
constructor() {
|
|
109
|
-
super(), l(this,
|
|
110
|
+
super(), l(this, te), l(this, Tt), l(this, We), l(this, Pe), l(this, ae), l(this, oe), l(this, Fe), l(this, le), l(this, d, null), l(this, O, new S(this, "--axis", "y")), l(this, j, new S(this, "--pages", 0, {
|
|
110
111
|
validate: (e) => Math.max(0, e - 1)
|
|
111
|
-
})), l(this, N, new
|
|
112
|
+
})), l(this, N, new S(this, "--split", !1)), l(this, tt, new S(this, "--sectional", !1)), l(this, Lt, new S(
|
|
112
113
|
this,
|
|
113
114
|
"--wheel-max-delta",
|
|
114
115
|
!1
|
|
115
|
-
)), l(this,
|
|
116
|
-
const e = this.currentScrollValue / i(this,
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
const s = i(this,
|
|
120
|
-
this.vertical ? (i(this,
|
|
116
|
+
)), l(this, D, new S(this, "--infinite", !1)), l(this, mt, new S(this, "--damping", 0.03)), l(this, Vt, new S(this, "--mouse-drag", !1)), l(this, $t, new S(this, "--disabled", !1)), l(this, Ft, new S(this, "--hibernated", !1)), l(this, w, null), l(this, ye, null), l(this, m, []), l(this, he, 0), l(this, ne, 0), l(this, L, 0), l(this, _, 0), l(this, K, 0), l(this, Z, null), l(this, Wt, null), l(this, at, null), l(this, W, new St(0)), l(this, Ut, 0), l(this, vt, 0), l(this, Ht, !0), l(this, Gt, !0), l(this, Mt, () => {
|
|
117
|
+
const e = this.currentScrollValue / i(this, _) || 0;
|
|
118
|
+
if (g(this, he, this.vertical ? _e(this) : be(this)), g(this, ne, this.vertical ? _e(i(this, w)) : be(i(this, w))), g(this, L, this.vertical ? this.offsetHeight : this.offsetWidth), i(this, j).current) {
|
|
119
|
+
g(this, _, i(this, L) * i(this, j).current);
|
|
120
|
+
const s = i(this, _) + i(this, L);
|
|
121
|
+
this.vertical ? (i(this, w).style.width = s + "px", i(this, w).style.height = "100%") : (i(this, w).style.height = s + "px", i(this, w).style.width = "100%");
|
|
121
122
|
} else
|
|
122
|
-
this.vertical ? (i(this,
|
|
123
|
-
if (this.vertical ?
|
|
124
|
-
getComputedStyle(i(this,
|
|
125
|
-
)) :
|
|
126
|
-
getComputedStyle(i(this,
|
|
127
|
-
)), !i(this,
|
|
123
|
+
this.vertical ? (i(this, w).style.width = "100%", i(this, w).style.height = "max-content", g(this, _, i(this, w).offsetHeight - i(this, L))) : (i(this, w).style.width = "max-content", i(this, w).style.height = "100%", g(this, _, i(this, w).offsetWidth - i(this, L)));
|
|
124
|
+
if (this.vertical ? g(this, K, ss.parse(
|
|
125
|
+
getComputedStyle(i(this, w)).rowGap
|
|
126
|
+
)) : g(this, K, ss.parse(
|
|
127
|
+
getComputedStyle(i(this, w)).columnGap
|
|
128
|
+
)), !i(this, D).current) {
|
|
128
129
|
const s = getComputedStyle(this);
|
|
129
|
-
|
|
130
|
+
g(this, _, i(this, _) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), i(this, d).max = i(this, _);
|
|
130
131
|
}
|
|
131
|
-
if (i(this,
|
|
132
|
+
if (i(this, m).forEach((s) => {
|
|
132
133
|
s.resize(), s.transform();
|
|
133
|
-
}), i(this,
|
|
134
|
-
const s = i(this,
|
|
135
|
-
|
|
134
|
+
}), i(this, D).current && i(this, m).length) {
|
|
135
|
+
const s = i(this, m)[i(this, m).length - 1], r = s.position + s.size - i(this, L), h = i(this, _) - r;
|
|
136
|
+
g(this, vt, s.position + s.size + h);
|
|
136
137
|
} else
|
|
137
|
-
|
|
138
|
-
if (i(this, tt).current && i(this,
|
|
139
|
-
const s = i(this,
|
|
138
|
+
g(this, vt, i(this, _));
|
|
139
|
+
if (i(this, tt).current && i(this, m).length) {
|
|
140
|
+
const s = i(this, m)[i(this, W).current];
|
|
140
141
|
i(this, d).set(s.position, !0);
|
|
141
142
|
} else
|
|
142
|
-
i(this, d).set(e * i(this,
|
|
143
|
-
}), l(this,
|
|
143
|
+
i(this, d).set(e * i(this, _), !0);
|
|
144
|
+
}), l(this, Me, () => {
|
|
144
145
|
const e = this.currentScrollValue;
|
|
145
|
-
if (
|
|
146
|
+
if (g(this, Ut, Math.max(0, e - i(this, _))), i(this, m).length) {
|
|
146
147
|
let s = 0;
|
|
147
|
-
for (let r = 0; r < i(this,
|
|
148
|
-
const h = i(this,
|
|
148
|
+
for (let r = 0; r < i(this, m).length; r++) {
|
|
149
|
+
const h = i(this, m)[r];
|
|
149
150
|
h.transform(), this.targetScrollValue + this.viewportSize / 2 >= h.position && (s = r);
|
|
150
151
|
}
|
|
151
152
|
i(this, W).current = s;
|
|
152
153
|
} else
|
|
153
|
-
this.vertical ? i(this,
|
|
154
|
+
this.vertical ? i(this, w).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : i(this, w).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
154
155
|
Et.update(
|
|
155
156
|
this,
|
|
156
157
|
i(this, O).current,
|
|
157
158
|
e
|
|
158
159
|
);
|
|
159
|
-
}), l(this,
|
|
160
|
-
if (i(this,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
}), l(this, qt, (e, s) => {
|
|
161
|
+
if (!(e === "drag" && !Ds.isMobile && !i(this, Vt).current))
|
|
162
|
+
if (i(this, tt).current) {
|
|
163
|
+
const r = Math.sign(s);
|
|
164
|
+
i(this, m).length ? this.shiftSections(r) : i(this, d).shift(r * i(this, L));
|
|
165
|
+
} else
|
|
166
|
+
i(this, d).shift(s);
|
|
167
|
+
}), Ge && (g(this, d, new Ps(0, {
|
|
166
168
|
damping: 0.01,
|
|
167
169
|
min: 0,
|
|
168
|
-
order:
|
|
169
|
-
})), this.openShadow(
|
|
170
|
+
order: Os.SCROLL
|
|
171
|
+
})), this.openShadow(Gs), qe(this, {
|
|
170
172
|
tabIndex: 0,
|
|
171
173
|
children: [
|
|
172
|
-
|
|
174
|
+
Le({
|
|
173
175
|
class: "static",
|
|
174
|
-
children: [
|
|
176
|
+
children: [Ce({ name: "static" })]
|
|
175
177
|
}),
|
|
176
|
-
|
|
178
|
+
Le({
|
|
177
179
|
class: "content",
|
|
178
|
-
children: [
|
|
180
|
+
children: [Ce({ ref: (e) => g(this, ye, e) })],
|
|
179
181
|
style: {
|
|
180
|
-
flexDirection: new
|
|
182
|
+
flexDirection: new Es(
|
|
181
183
|
i(this, O),
|
|
182
184
|
(e) => e === "x" ? "row" : "column"
|
|
183
185
|
)
|
|
184
186
|
},
|
|
185
|
-
ref: (e) =>
|
|
187
|
+
ref: (e) => g(this, w, e)
|
|
186
188
|
})
|
|
187
189
|
]
|
|
188
|
-
}),
|
|
189
|
-
i(this,
|
|
190
|
-
}), i(this,
|
|
190
|
+
}), g(this, Z, new Vs({ element: this })), i(this, Z).changeEvent.subscribe(i(this, qt)), g(this, Wt, new $s({ element: this })), i(this, Wt).changeEvent.subscribe(i(this, qt)), g(this, at, new Fs({ element: this })), i(this, at).changeEvent.subscribe(i(this, qt)), i(this, O).subscribe(({ current: e }) => {
|
|
191
|
+
i(this, w).style.flexDirection = e === "x" ? "row" : "column", i(this, Z).axis = i(this, Lt).current ? "max" : e, i(this, Wt).dimension = e === "x" ? "width" : "height", i(this, at).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && i(this, Mt).call(this);
|
|
192
|
+
}), i(this, Lt).subscribe((e) => {
|
|
191
193
|
i(this, Z).axis = e.current ? "max" : i(this, O).current;
|
|
192
194
|
}), i(this, j).subscribe(() => {
|
|
193
|
-
this.isConnected && i(this,
|
|
195
|
+
this.isConnected && i(this, Mt).call(this);
|
|
194
196
|
}), i(this, N).subscribe(({ current: e }) => {
|
|
195
|
-
this.isConnected && (e ? C(this,
|
|
197
|
+
this.isConnected && (e ? C(this, te, ke).call(this) : C(this, Tt, ee).call(this));
|
|
196
198
|
}), i(this, tt).subscribe((e) => {
|
|
197
|
-
i(this, W).current = 0, i(this, Z).debounce = e.current, i(this, d).reset(), this.isConnected && (e.current && !e.previous ? C(this,
|
|
198
|
-
}), i(this,
|
|
199
|
-
e.current ? (this.isConnected && (i(this,
|
|
200
|
-
}), i(this,
|
|
199
|
+
i(this, W).current = 0, i(this, Z).debounce = e.current, i(this, at).swipe = e.current, i(this, d).reset(), this.isConnected && (e.current && !e.previous ? C(this, te, ke).call(this) : !e.current && e.previous && C(this, Tt, ee).call(this));
|
|
200
|
+
}), i(this, D).subscribe((e) => {
|
|
201
|
+
e.current ? (this.isConnected && (i(this, m).length || (i(this, N).current = !0)), i(this, m).length && (i(this, d).max = 1 / 0, i(this, d).min = -1 / 0)) : (g(this, Ut, 0), i(this, d).max = i(this, _), i(this, d).min = 0);
|
|
202
|
+
}), i(this, mt).subscribe((e) => {
|
|
201
203
|
i(this, d).damping = e.current;
|
|
202
|
-
}), i(this,
|
|
203
|
-
e.current && !e.previous ? C(this,
|
|
204
|
-
}), i(this,
|
|
205
|
-
e.current && !e.previous ? C(this,
|
|
204
|
+
}), i(this, $t).subscribe((e) => {
|
|
205
|
+
e.current && !e.previous ? C(this, We, Je).call(this) : !e.current && e.previous && C(this, Pe, Qe).call(this);
|
|
206
|
+
}), i(this, Ft).subscribe((e) => {
|
|
207
|
+
e.current && !e.previous ? C(this, ae, Ve).call(this) : !e.current && e.previous && C(this, oe, $e).call(this);
|
|
206
208
|
}));
|
|
207
209
|
}
|
|
208
210
|
get dampingCSSProperty() {
|
|
209
|
-
return i(this,
|
|
211
|
+
return i(this, mt);
|
|
212
|
+
}
|
|
213
|
+
get mouseDragCSSProperty() {
|
|
214
|
+
return i(this, Vt);
|
|
210
215
|
}
|
|
211
216
|
get axisAttibute() {
|
|
212
217
|
return i(this, O);
|
|
@@ -221,43 +226,43 @@ let ye = class extends as {
|
|
|
221
226
|
return i(this, tt);
|
|
222
227
|
}
|
|
223
228
|
get infiniteCSSProperty() {
|
|
224
|
-
return i(this,
|
|
229
|
+
return i(this, D);
|
|
225
230
|
}
|
|
226
231
|
get dampingAttibute() {
|
|
227
|
-
return i(this,
|
|
232
|
+
return i(this, mt);
|
|
228
233
|
}
|
|
229
234
|
get disabledAttibute() {
|
|
230
|
-
return i(this,
|
|
235
|
+
return i(this, $t);
|
|
231
236
|
}
|
|
232
237
|
get hibernatedAttibute() {
|
|
233
|
-
return i(this,
|
|
238
|
+
return i(this, Ft);
|
|
234
239
|
}
|
|
235
240
|
get currentScrollValue() {
|
|
236
|
-
return C(this,
|
|
241
|
+
return C(this, le, Oe).call(this, "current");
|
|
237
242
|
}
|
|
238
243
|
get targetScrollValue() {
|
|
239
|
-
return C(this,
|
|
244
|
+
return C(this, le, Oe).call(this, "target");
|
|
240
245
|
}
|
|
241
246
|
get contentElement() {
|
|
242
|
-
return i(this,
|
|
247
|
+
return i(this, w);
|
|
243
248
|
}
|
|
244
249
|
get sections() {
|
|
245
|
-
return i(this,
|
|
250
|
+
return i(this, m);
|
|
246
251
|
}
|
|
247
252
|
get position() {
|
|
248
|
-
return i(this,
|
|
253
|
+
return i(this, he);
|
|
249
254
|
}
|
|
250
255
|
get contentPosition() {
|
|
251
|
-
return i(this,
|
|
256
|
+
return i(this, ne);
|
|
252
257
|
}
|
|
253
258
|
get viewportSize() {
|
|
254
259
|
return i(this, L);
|
|
255
260
|
}
|
|
256
261
|
get scrollSize() {
|
|
257
|
-
return i(this,
|
|
262
|
+
return i(this, _);
|
|
258
263
|
}
|
|
259
264
|
get gap() {
|
|
260
|
-
return i(this,
|
|
265
|
+
return i(this, K);
|
|
261
266
|
}
|
|
262
267
|
get counter() {
|
|
263
268
|
return i(this, W);
|
|
@@ -265,17 +270,20 @@ let ye = class extends as {
|
|
|
265
270
|
get distance() {
|
|
266
271
|
return i(this, vt);
|
|
267
272
|
}
|
|
273
|
+
get infiniteDistance() {
|
|
274
|
+
return i(this, D).current ? i(this, vt) + i(this, K) : i(this, vt);
|
|
275
|
+
}
|
|
268
276
|
get overscroll() {
|
|
269
|
-
return i(this,
|
|
277
|
+
return i(this, Ut);
|
|
270
278
|
}
|
|
271
279
|
get vertical() {
|
|
272
280
|
return i(this, O).current === "y";
|
|
273
281
|
}
|
|
274
282
|
get currentProgress() {
|
|
275
|
-
return this.currentScrollValue /
|
|
283
|
+
return this.currentScrollValue / this.infiniteDistance || 0;
|
|
276
284
|
}
|
|
277
285
|
get targetProgress() {
|
|
278
|
-
return this.targetScrollValue /
|
|
286
|
+
return this.targetScrollValue / this.infiniteDistance || 0;
|
|
279
287
|
}
|
|
280
288
|
get speed() {
|
|
281
289
|
return i(this, d).speed;
|
|
@@ -312,28 +320,28 @@ let ye = class extends as {
|
|
|
312
320
|
}
|
|
313
321
|
// TODO: Поправить значение когда скролл не секционный ??
|
|
314
322
|
scrollToSection(e, s = "smooth") {
|
|
315
|
-
if (!i(this,
|
|
323
|
+
if (!i(this, m).length)
|
|
316
324
|
return;
|
|
317
325
|
const r = i(this, W).current;
|
|
318
|
-
C(this,
|
|
319
|
-
const h = i(this,
|
|
326
|
+
C(this, Fe, fs).call(this, e);
|
|
327
|
+
const h = i(this, m)[r], n = i(this, m)[i(this, W).current];
|
|
320
328
|
if (h && n) {
|
|
321
329
|
let c = 0;
|
|
322
|
-
const p = i(this,
|
|
323
|
-
i(this,
|
|
330
|
+
const p = i(this, m).length - 1;
|
|
331
|
+
i(this, D).current ? i(this, W).current === 0 && r === p ? c = i(this, _) + i(this, L) - h.position + i(this, K) : i(this, W).current === p && r === 0 ? c = n.position - (i(this, _) + i(this, L) + i(this, K)) : c = n.position - h.position : c = n.position - h.position, i(this, d).shift(c, s === "instant");
|
|
324
332
|
}
|
|
325
333
|
}
|
|
326
334
|
shiftSections(e, s = "smooth") {
|
|
327
|
-
i(this,
|
|
335
|
+
i(this, m).length && this.scrollToSection(i(this, W).current + e, s);
|
|
328
336
|
}
|
|
329
337
|
setPosition(e, s = "smooth") {
|
|
330
338
|
i(this, d).set(e, s === "instant");
|
|
331
339
|
}
|
|
332
340
|
connectedCallback() {
|
|
333
|
-
i(this, O).observe(), i(this, j).observe(), i(this, N).observe(), i(this, tt).observe(), i(this,
|
|
341
|
+
i(this, O).observe(), i(this, j).observe(), i(this, N).observe(), i(this, tt).observe(), i(this, Lt).observe(), i(this, D).observe(), i(this, mt).observe(), i(this, Vt).observe(), i(this, $t).observe(), i(this, Ft).observe(), C(this, oe, $e).call(this);
|
|
334
342
|
}
|
|
335
343
|
disconnectedCallback() {
|
|
336
|
-
i(this, O).unobserve(), i(this, j).unobserve(), i(this, N).unobserve(), i(this, tt).unobserve(), i(this,
|
|
344
|
+
i(this, O).unobserve(), i(this, j).unobserve(), i(this, N).unobserve(), i(this, tt).unobserve(), i(this, Lt).unobserve(), i(this, D).unobserve(), i(this, mt).unobserve(), i(this, Vt).unobserve(), i(this, $t).unobserve(), i(this, Ft).unobserve(), C(this, ae, Ve).call(this);
|
|
337
345
|
}
|
|
338
346
|
};
|
|
339
347
|
d = /* @__PURE__ */ new WeakMap();
|
|
@@ -341,110 +349,114 @@ O = /* @__PURE__ */ new WeakMap();
|
|
|
341
349
|
j = /* @__PURE__ */ new WeakMap();
|
|
342
350
|
N = /* @__PURE__ */ new WeakMap();
|
|
343
351
|
tt = /* @__PURE__ */ new WeakMap();
|
|
344
|
-
xt = /* @__PURE__ */ new WeakMap();
|
|
345
|
-
T = /* @__PURE__ */ new WeakMap();
|
|
346
|
-
St = /* @__PURE__ */ new WeakMap();
|
|
347
352
|
Lt = /* @__PURE__ */ new WeakMap();
|
|
353
|
+
D = /* @__PURE__ */ new WeakMap();
|
|
354
|
+
mt = /* @__PURE__ */ new WeakMap();
|
|
348
355
|
Vt = /* @__PURE__ */ new WeakMap();
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
S = /* @__PURE__ */ new WeakMap();
|
|
352
|
-
te = /* @__PURE__ */ new WeakMap();
|
|
353
|
-
ee = /* @__PURE__ */ new WeakMap();
|
|
354
|
-
L = /* @__PURE__ */ new WeakMap();
|
|
356
|
+
$t = /* @__PURE__ */ new WeakMap();
|
|
357
|
+
Ft = /* @__PURE__ */ new WeakMap();
|
|
355
358
|
w = /* @__PURE__ */ new WeakMap();
|
|
356
|
-
|
|
359
|
+
ye = /* @__PURE__ */ new WeakMap();
|
|
360
|
+
m = /* @__PURE__ */ new WeakMap();
|
|
361
|
+
he = /* @__PURE__ */ new WeakMap();
|
|
362
|
+
ne = /* @__PURE__ */ new WeakMap();
|
|
363
|
+
L = /* @__PURE__ */ new WeakMap();
|
|
364
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
365
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
357
366
|
Z = /* @__PURE__ */ new WeakMap();
|
|
358
|
-
|
|
367
|
+
Wt = /* @__PURE__ */ new WeakMap();
|
|
368
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
359
369
|
W = /* @__PURE__ */ new WeakMap();
|
|
360
|
-
|
|
370
|
+
Ut = /* @__PURE__ */ new WeakMap();
|
|
361
371
|
vt = /* @__PURE__ */ new WeakMap();
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
372
|
+
Ht = /* @__PURE__ */ new WeakMap();
|
|
373
|
+
Gt = /* @__PURE__ */ new WeakMap();
|
|
374
|
+
te = /* @__PURE__ */ new WeakSet();
|
|
375
|
+
ke = function() {
|
|
376
|
+
C(this, Tt, ee).call(this), i(this, ye).assignedElements().forEach((e) => {
|
|
377
|
+
e instanceof HTMLElement && i(this, m).push(new Hs(e, this));
|
|
378
|
+
}), i(this, w).style.transform = "", this.dispatchEvent(
|
|
367
379
|
new CustomEvent("sectionsChange", {
|
|
368
380
|
composed: !0
|
|
369
381
|
})
|
|
370
|
-
), i(this,
|
|
382
|
+
), i(this, Mt).call(this);
|
|
371
383
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
i(this,
|
|
384
|
+
Tt = /* @__PURE__ */ new WeakSet();
|
|
385
|
+
ee = function() {
|
|
386
|
+
i(this, m).forEach((e) => {
|
|
375
387
|
e.destroy();
|
|
376
|
-
}),
|
|
388
|
+
}), g(this, m, []), this.dispatchEvent(
|
|
377
389
|
new CustomEvent("sectionsChange", {
|
|
378
390
|
composed: !0
|
|
379
391
|
})
|
|
380
392
|
);
|
|
381
393
|
};
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
i(this, d).unsubscribe(i(this,
|
|
394
|
+
We = /* @__PURE__ */ new WeakSet();
|
|
395
|
+
Je = function() {
|
|
396
|
+
i(this, Ht) || (g(this, Ht, !0), i(this, d).unsubscribe(i(this, Me)), i(this, d).stopAnimation(), i(this, Z).disconnect(), i(this, Wt).disconnect(), i(this, at).disconnect());
|
|
385
397
|
};
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
i(this, d).subscribe(i(this,
|
|
398
|
+
Pe = /* @__PURE__ */ new WeakSet();
|
|
399
|
+
Qe = function() {
|
|
400
|
+
i(this, Ht) && (g(this, Ht, !1), i(this, d).subscribe(i(this, Me)), i(this, Z).connect(), i(this, Wt).connect(), i(this, at).connect());
|
|
389
401
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
402
|
+
ae = /* @__PURE__ */ new WeakSet();
|
|
403
|
+
Ve = function() {
|
|
404
|
+
i(this, Gt) || (g(this, Gt, !0), Bt.unsubscribe(i(this, Mt)), i(this, d).reset(), C(this, We, Je).call(this), i(this, w).style.transform = "", i(this, N).current && C(this, Tt, ee).call(this), Et.unregister(this));
|
|
393
405
|
};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
i(this, N).current && C(this,
|
|
406
|
+
oe = /* @__PURE__ */ new WeakSet();
|
|
407
|
+
$e = function() {
|
|
408
|
+
i(this, Gt) && (g(this, Gt, !1), i(this, N).current && C(this, te, ke).call(this), Et.register(this), Bt.subscribe(i(this, Mt), Ue.SCROLL), C(this, Pe, Qe).call(this));
|
|
397
409
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
i(this,
|
|
410
|
+
Mt = /* @__PURE__ */ new WeakMap();
|
|
411
|
+
Me = /* @__PURE__ */ new WeakMap();
|
|
412
|
+
Fe = /* @__PURE__ */ new WeakSet();
|
|
413
|
+
fs = function(e) {
|
|
414
|
+
i(this, D).current ? (i(this, W).current = e % i(this, m).length, i(this, W).current = i(this, W).current < 0 ? i(this, m).length + i(this, W).current : i(this, W).current) : i(this, W).current = Ke(e, 0, i(this, m).length - 1);
|
|
403
415
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
if (i(this,
|
|
408
|
-
const s = i(this, d)[e] % (i(this,
|
|
409
|
-
return s < 0 ? i(this,
|
|
416
|
+
qt = /* @__PURE__ */ new WeakMap();
|
|
417
|
+
le = /* @__PURE__ */ new WeakSet();
|
|
418
|
+
Oe = function(e = "current") {
|
|
419
|
+
if (i(this, D).current && i(this, m).length) {
|
|
420
|
+
const s = i(this, d)[e] % (i(this, _) + i(this, L) + i(this, K));
|
|
421
|
+
return s < 0 ? i(this, _) + s + i(this, L) + i(this, K) : s;
|
|
410
422
|
} else
|
|
411
423
|
return i(this, d)[e];
|
|
412
424
|
};
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
],
|
|
416
|
-
var
|
|
417
|
-
class
|
|
425
|
+
Ee = Bs([
|
|
426
|
+
Kt("e-scroll")
|
|
427
|
+
], Ee);
|
|
428
|
+
var se;
|
|
429
|
+
class xe extends us {
|
|
418
430
|
constructor() {
|
|
419
431
|
super(...arguments);
|
|
420
|
-
F(this,
|
|
432
|
+
F(this, se, null);
|
|
421
433
|
}
|
|
422
434
|
get scrollElement() {
|
|
423
|
-
return o(this,
|
|
435
|
+
return o(this, se);
|
|
424
436
|
}
|
|
425
437
|
connectedCallback() {
|
|
426
|
-
const r =
|
|
427
|
-
r instanceof
|
|
438
|
+
const r = Ts(this, Ee);
|
|
439
|
+
r instanceof Ee ? A(this, se, r) : console.error(this, "e-scroll not found");
|
|
428
440
|
}
|
|
429
441
|
}
|
|
430
|
-
|
|
431
|
-
var
|
|
432
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
442
|
+
se = new WeakMap();
|
|
443
|
+
var Ks = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, qs = (e, s, r, h) => {
|
|
444
|
+
for (var n = h > 1 ? void 0 : h ? Us(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
433
445
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
434
|
-
return h && n &&
|
|
435
|
-
},
|
|
446
|
+
return h && n && Ks(s, r, n), n;
|
|
447
|
+
}, ds = (e, s, r) => {
|
|
436
448
|
if (!s.has(e))
|
|
437
449
|
throw TypeError("Cannot " + r);
|
|
438
|
-
}, u = (e, s, r) => (
|
|
450
|
+
}, u = (e, s, r) => (ds(e, s, "read from private field"), r ? r.call(e) : s.get(e)), G = (e, s, r) => {
|
|
439
451
|
if (s.has(e))
|
|
440
452
|
throw TypeError("Cannot add the same private member more than once");
|
|
441
453
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
442
|
-
},
|
|
443
|
-
const
|
|
454
|
+
}, dt = (e, s, r, h) => (ds(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), Nt, z, et, st, Zt, Jt, ce, ue, pe, fe;
|
|
455
|
+
const Ns = Ne({
|
|
444
456
|
":host": {
|
|
445
457
|
display: "inline-block",
|
|
446
458
|
zIndex: "1",
|
|
447
|
-
backgroundColor:
|
|
459
|
+
backgroundColor: is.colorLight.var
|
|
448
460
|
},
|
|
449
461
|
':host([axis="y"])': {
|
|
450
462
|
position: "absolute",
|
|
@@ -461,7 +473,7 @@ const Bs = Ge({
|
|
|
461
473
|
height: "1vmin"
|
|
462
474
|
},
|
|
463
475
|
".default-thumb": {
|
|
464
|
-
backgroundColor:
|
|
476
|
+
backgroundColor: is.colorDark.var,
|
|
465
477
|
borderRadius: "1vmin",
|
|
466
478
|
touchAction: "none"
|
|
467
479
|
},
|
|
@@ -469,28 +481,29 @@ const Bs = Ge({
|
|
|
469
481
|
touchAction: "none"
|
|
470
482
|
}
|
|
471
483
|
});
|
|
472
|
-
let
|
|
484
|
+
let rs = class extends xe {
|
|
473
485
|
constructor() {
|
|
474
|
-
super(),
|
|
475
|
-
|
|
486
|
+
super(), G(this, Nt, null), G(this, z, null), G(this, et, !1), G(this, st, 0), G(this, Zt, 0), G(this, Jt, 0), G(this, ce, () => {
|
|
487
|
+
dt(this, et, this.offsetWidth > this.offsetHeight);
|
|
476
488
|
const e = u(this, et) ? this.offsetWidth : this.offsetHeight;
|
|
477
|
-
|
|
478
|
-
}),
|
|
479
|
-
|
|
480
|
-
}),
|
|
489
|
+
dt(this, st, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), dt(this, st, Math.max(u(this, st), 30)), u(this, et) ? (u(this, z).style.width = u(this, st) + "px", u(this, z).style.height = "100%") : (u(this, z).style.width = "100%", u(this, z).style.height = u(this, st) + "px"), dt(this, Zt, e - u(this, st)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
490
|
+
}), G(this, ue, () => {
|
|
491
|
+
dt(this, Jt, this.scrollElement.currentProgress * u(this, Zt)), u(this, et) ? u(this, z).style.transform = `translate3d(${u(this, Jt)}px, 0px, 0px)` : u(this, z).style.transform = `translate3d(0px, ${u(this, Jt)}px, 0px)`;
|
|
492
|
+
}), G(this, pe, () => {
|
|
481
493
|
this.setAttribute("axis", this.scrollElement.axisAttibute.current);
|
|
482
|
-
}),
|
|
483
|
-
|
|
484
|
-
const n = u(this, et) ? h.x : h.y, c = this.scrollElement.distance / u(this,
|
|
494
|
+
}), G(this, fe, (e) => {
|
|
495
|
+
As((h) => {
|
|
496
|
+
const n = u(this, et) ? h.x : h.y, c = this.scrollElement.distance / u(this, Zt), p = (n - r) * c;
|
|
485
497
|
this.scrollElement.setPosition(s + p);
|
|
486
498
|
});
|
|
487
499
|
const s = this.scrollElement.targetScrollValue, r = u(this, et) ? e.x : e.y;
|
|
488
|
-
}),
|
|
500
|
+
}), Ge && (this.openShadow(Ns), qe(this, {
|
|
489
501
|
slot: "static",
|
|
502
|
+
"drag-dead-zone": "",
|
|
490
503
|
children: [
|
|
491
|
-
|
|
492
|
-
ref: (e) =>
|
|
493
|
-
children:
|
|
504
|
+
Ce({
|
|
505
|
+
ref: (e) => dt(this, Nt, e),
|
|
506
|
+
children: Le({ class: "default-thumb" })
|
|
494
507
|
})
|
|
495
508
|
]
|
|
496
509
|
}));
|
|
@@ -500,228 +513,228 @@ let ts = class extends We {
|
|
|
500
513
|
}
|
|
501
514
|
connectedCallback() {
|
|
502
515
|
super.connectedCallback();
|
|
503
|
-
const e = u(this,
|
|
504
|
-
|
|
516
|
+
const e = u(this, Nt).assignedElements()[0] || u(this, Nt).firstElementChild;
|
|
517
|
+
dt(this, z, e), u(this, z).addEventListener("pointerdown", u(this, fe)), Bt.subscribe(u(this, ce), Ue.SCROLL + 1), this.scrollElement.onScroll(u(this, ue)), this.scrollElement.axisAttibute.subscribe(u(this, pe));
|
|
505
518
|
}
|
|
506
519
|
disconnectedCallback() {
|
|
507
|
-
u(this, z).removeEventListener("pointerdown", u(this,
|
|
520
|
+
u(this, z).removeEventListener("pointerdown", u(this, fe)), Bt.unsubscribe(u(this, ce)), this.scrollElement.offScroll(u(this, ue)), this.scrollElement.axisAttibute.unsubscribe(u(this, pe));
|
|
508
521
|
}
|
|
509
522
|
};
|
|
510
|
-
|
|
523
|
+
Nt = /* @__PURE__ */ new WeakMap();
|
|
511
524
|
z = /* @__PURE__ */ new WeakMap();
|
|
512
525
|
et = /* @__PURE__ */ new WeakMap();
|
|
513
526
|
st = /* @__PURE__ */ new WeakMap();
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
],
|
|
523
|
-
const
|
|
527
|
+
Zt = /* @__PURE__ */ new WeakMap();
|
|
528
|
+
Jt = /* @__PURE__ */ new WeakMap();
|
|
529
|
+
ce = /* @__PURE__ */ new WeakMap();
|
|
530
|
+
ue = /* @__PURE__ */ new WeakMap();
|
|
531
|
+
pe = /* @__PURE__ */ new WeakMap();
|
|
532
|
+
fe = /* @__PURE__ */ new WeakMap();
|
|
533
|
+
rs = qs([
|
|
534
|
+
Kt("e-scrollbar")
|
|
535
|
+
], rs);
|
|
536
|
+
const Zs = Ne({
|
|
524
537
|
button: {
|
|
525
538
|
all: "inherit"
|
|
526
539
|
}
|
|
527
540
|
});
|
|
528
|
-
class
|
|
541
|
+
class Ss extends xe {
|
|
529
542
|
constructor() {
|
|
530
|
-
super(), this.openShadow(
|
|
543
|
+
super(), this.openShadow(Zs), Ge && qe(this, {
|
|
531
544
|
children: [
|
|
532
|
-
|
|
545
|
+
zs({
|
|
533
546
|
onClick: () => {
|
|
534
547
|
this.handleClick();
|
|
535
548
|
},
|
|
536
|
-
children: [
|
|
549
|
+
children: [Ce()]
|
|
537
550
|
})
|
|
538
551
|
]
|
|
539
552
|
});
|
|
540
553
|
}
|
|
541
554
|
}
|
|
542
|
-
var
|
|
543
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
555
|
+
var Js = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Xs = (e, s, r, h) => {
|
|
556
|
+
for (var n = h > 1 ? void 0 : h ? Qs(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
544
557
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
545
|
-
return h && n &&
|
|
558
|
+
return h && n && Js(s, r, n), n;
|
|
546
559
|
};
|
|
547
|
-
let
|
|
560
|
+
let hs = class extends Ss {
|
|
548
561
|
handleClick() {
|
|
549
562
|
const e = this.getAttribute("index"), s = this.getAttribute("behaviour");
|
|
550
563
|
this.scrollElement.scrollToSection(parseInt(e || "0"), s);
|
|
551
564
|
}
|
|
552
565
|
};
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
],
|
|
556
|
-
var
|
|
557
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
566
|
+
hs = Xs([
|
|
567
|
+
Kt("e-scroll-set-button")
|
|
568
|
+
], hs);
|
|
569
|
+
var Ys = Object.defineProperty, js = Object.getOwnPropertyDescriptor, ti = (e, s, r, h) => {
|
|
570
|
+
for (var n = h > 1 ? void 0 : h ? js(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
558
571
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
559
|
-
return h && n &&
|
|
572
|
+
return h && n && Ys(s, r, n), n;
|
|
560
573
|
};
|
|
561
|
-
let
|
|
574
|
+
let ns = class extends Ss {
|
|
562
575
|
handleClick() {
|
|
563
576
|
const e = this.getAttribute("step"), s = this.getAttribute("behaviour");
|
|
564
577
|
this.scrollElement.shiftSections(parseInt(e || "1"), s);
|
|
565
578
|
}
|
|
566
579
|
};
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
],
|
|
570
|
-
var
|
|
571
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
580
|
+
ns = ti([
|
|
581
|
+
Kt("e-scroll-step-button")
|
|
582
|
+
], ns);
|
|
583
|
+
var ei = Object.defineProperty, si = Object.getOwnPropertyDescriptor, ii = (e, s, r, h) => {
|
|
584
|
+
for (var n = h > 1 ? void 0 : h ? si(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
572
585
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
573
|
-
return h && n &&
|
|
574
|
-
},
|
|
586
|
+
return h && n && ei(s, r, n), n;
|
|
587
|
+
}, ms = (e, s, r) => {
|
|
575
588
|
if (!s.has(e))
|
|
576
589
|
throw TypeError("Cannot " + r);
|
|
577
|
-
},
|
|
590
|
+
}, xt = (e, s, r) => (ms(e, s, "read from private field"), r ? r.call(e) : s.get(e)), as = (e, s, r) => {
|
|
578
591
|
if (s.has(e))
|
|
579
592
|
throw TypeError("Cannot add the same private member more than once");
|
|
580
593
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
581
|
-
},
|
|
582
|
-
class
|
|
594
|
+
}, os = (e, s, r, h) => (ms(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), gt, Qt, Y, ft, Rt, ie, re, It;
|
|
595
|
+
class ri {
|
|
583
596
|
constructor(s, r, h) {
|
|
584
597
|
F(this, Y, void 0);
|
|
585
|
-
F(this,
|
|
586
|
-
F(this,
|
|
587
|
-
F(this,
|
|
588
|
-
F(this,
|
|
589
|
-
o(this,
|
|
598
|
+
F(this, ft, void 0);
|
|
599
|
+
F(this, Rt, void 0);
|
|
600
|
+
F(this, ie, void 0);
|
|
601
|
+
F(this, re, () => {
|
|
602
|
+
o(this, ft).scrollToSection(o(this, Rt), o(this, ie));
|
|
590
603
|
});
|
|
591
|
-
F(this,
|
|
604
|
+
F(this, It, () => {
|
|
592
605
|
o(this, Y).classList.toggle(
|
|
593
606
|
"current",
|
|
594
|
-
o(this,
|
|
607
|
+
o(this, ft).counter.current === o(this, Rt)
|
|
595
608
|
);
|
|
596
609
|
});
|
|
597
|
-
|
|
610
|
+
A(this, Y, document.createElement("button")), A(this, ft, s), A(this, ie, h), A(this, Rt, r), o(this, Y).addEventListener("click", o(this, re)), o(this, ft).counter.subscribe(o(this, It)), o(this, It).call(this);
|
|
598
611
|
}
|
|
599
612
|
get element() {
|
|
600
613
|
return o(this, Y);
|
|
601
614
|
}
|
|
602
615
|
destroy() {
|
|
603
|
-
o(this, Y).removeEventListener("click", o(this,
|
|
616
|
+
o(this, Y).removeEventListener("click", o(this, re)), o(this, ft).counter.unsubscribe(o(this, It)), o(this, Y).remove();
|
|
604
617
|
}
|
|
605
618
|
}
|
|
606
|
-
Y = new WeakMap(),
|
|
607
|
-
let
|
|
619
|
+
Y = new WeakMap(), ft = new WeakMap(), Rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), It = new WeakMap();
|
|
620
|
+
let ls = class extends xe {
|
|
608
621
|
constructor() {
|
|
609
|
-
super(...arguments),
|
|
610
|
-
|
|
622
|
+
super(...arguments), as(this, gt, []), as(this, Qt, ps(() => {
|
|
623
|
+
xt(this, gt).forEach((e) => e.destroy()), os(this, gt, []);
|
|
611
624
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
612
|
-
const s = new
|
|
625
|
+
const s = new ri(
|
|
613
626
|
this.scrollElement,
|
|
614
627
|
e,
|
|
615
628
|
this.getAttribute("behaviour") || "smooth"
|
|
616
629
|
);
|
|
617
|
-
this.appendChild(s.element),
|
|
630
|
+
this.appendChild(s.element), xt(this, gt).push(s);
|
|
618
631
|
}
|
|
619
632
|
}, 0));
|
|
620
633
|
}
|
|
621
634
|
connectedCallback() {
|
|
622
635
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
623
636
|
"sectionsChange",
|
|
624
|
-
|
|
625
|
-
),
|
|
637
|
+
xt(this, Qt)
|
|
638
|
+
), xt(this, Qt).call(this);
|
|
626
639
|
}
|
|
627
640
|
disconnectedCallback() {
|
|
628
641
|
this.scrollElement.removeEventListener(
|
|
629
642
|
"sectionsChange",
|
|
630
|
-
|
|
631
|
-
),
|
|
643
|
+
xt(this, Qt)
|
|
644
|
+
), xt(this, gt).forEach((e) => e.destroy()), os(this, gt, []);
|
|
632
645
|
}
|
|
633
646
|
};
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
],
|
|
639
|
-
var
|
|
640
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
647
|
+
gt = /* @__PURE__ */ new WeakMap();
|
|
648
|
+
Qt = /* @__PURE__ */ new WeakMap();
|
|
649
|
+
ls = ii([
|
|
650
|
+
Kt("e-scroll-bullet-buttons")
|
|
651
|
+
], ls);
|
|
652
|
+
var hi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ai = (e, s, r, h) => {
|
|
653
|
+
for (var n = h > 1 ? void 0 : h ? ni(s, r) : s, c = e.length - 1, p; c >= 0; c--)
|
|
641
654
|
(p = e[c]) && (n = (h ? p(s, r, n) : p(n)) || n);
|
|
642
|
-
return h && n &&
|
|
643
|
-
},
|
|
655
|
+
return h && n && hi(s, r, n), n;
|
|
656
|
+
}, Xe = (e, s, r) => {
|
|
644
657
|
if (!s.has(e))
|
|
645
658
|
throw TypeError("Cannot " + r);
|
|
646
|
-
}, t = (e, s, r) => (
|
|
659
|
+
}, t = (e, s, r) => (Xe(e, s, "read from private field"), r ? r.call(e) : s.get(e)), a = (e, s, r) => {
|
|
647
660
|
if (s.has(e))
|
|
648
661
|
throw TypeError("Cannot add the same private member more than once");
|
|
649
662
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
650
|
-
}, f = (e, s, r, h) => (
|
|
651
|
-
let
|
|
663
|
+
}, f = (e, s, r, h) => (Xe(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), b = (e, s, r) => (Xe(e, s, "access private method"), r), Ot, wt, _t, bt, Ct, $, I, B, H, kt, M, ot, lt, rt, ht, nt, zt, Xt, E, q, U, ct, ut, J, de, v, Dt, At, Se, R, Q, x, P, T, Yt, Pt, y, me, ze, Ye, vs, De, gs, Ae, ws, Te, _s, Re, bs, Ie, Cs, Be, ys, ve, jt, it, yt, je, ks, ts, Ws, ge, He, we;
|
|
664
|
+
let cs = class extends xe {
|
|
652
665
|
constructor() {
|
|
653
|
-
super(...arguments), a(this,
|
|
666
|
+
super(...arguments), a(this, me), a(this, Ye), a(this, De), a(this, Ae), a(this, Te), a(this, Re), a(this, Ie), a(this, Be), a(this, it), a(this, je), a(this, ts), a(this, ge), a(this, Ot, new S(this, "--target", "")), a(this, wt, new S(this, "--disabled", !1)), a(this, _t, new S(
|
|
654
667
|
this,
|
|
655
668
|
"--distance-offset",
|
|
656
669
|
0
|
|
657
|
-
)), a(this,
|
|
670
|
+
)), a(this, bt, new S(this, "--start-offset", 0)), a(this, Ct, new S(
|
|
658
671
|
this,
|
|
659
672
|
"--capture-once",
|
|
660
673
|
!1
|
|
661
|
-
)), a(this, $, new
|
|
674
|
+
)), a(this, $, new S(this, "--captured", "")), a(this, I, new S(this, "--released", "")), a(this, B, new S(
|
|
662
675
|
this,
|
|
663
676
|
"--captured-from-start",
|
|
664
677
|
""
|
|
665
|
-
)), a(this,
|
|
678
|
+
)), a(this, H, new S(
|
|
666
679
|
this,
|
|
667
680
|
"--captured-from-finish",
|
|
668
681
|
""
|
|
669
|
-
)), a(this,
|
|
682
|
+
)), a(this, kt, new S(
|
|
670
683
|
this,
|
|
671
684
|
"--released-from-start",
|
|
672
685
|
""
|
|
673
|
-
)), a(this, M, new
|
|
686
|
+
)), a(this, M, new S(
|
|
674
687
|
this,
|
|
675
688
|
"--released-from-finish",
|
|
676
689
|
""
|
|
677
|
-
)), a(this,
|
|
690
|
+
)), a(this, ot, new S(this, "--passed-var", "")), a(this, lt, new S(this, "--progress-var", "")), a(this, rt, new S(this, "--distance-var", "")), a(this, ht, new S(this, "--start-var", "")), a(this, nt, new S(this, "--finish-var", "")), a(this, zt, new S(this, "--smoothstep", !1)), a(this, Xt, new S(
|
|
678
691
|
this,
|
|
679
692
|
"--smootherstep",
|
|
680
693
|
!1
|
|
681
|
-
)), a(this,
|
|
682
|
-
t(this, y) || (this.resize(), t(this,
|
|
683
|
-
}), a(this,
|
|
684
|
-
!t(this, y) && t(this,
|
|
685
|
-
}), a(this,
|
|
694
|
+
)), a(this, E, new St(!1)), a(this, q, new St(!1)), a(this, U, new St(!1)), a(this, ct, new St(!1)), a(this, ut, new St(!1)), a(this, J, new St(!1)), a(this, de, []), a(this, v, this), a(this, Dt, 0), a(this, At, 0), a(this, Se, 0), a(this, R, 0), a(this, Q, 0), a(this, x, 0), a(this, P, 0), a(this, T, 0), a(this, Yt, !1), a(this, Pt, !1), a(this, y, !0), a(this, ve, () => {
|
|
695
|
+
t(this, y) || (this.resize(), t(this, jt).call(this));
|
|
696
|
+
}), a(this, jt, () => {
|
|
697
|
+
!t(this, y) && t(this, Yt) && this.tick();
|
|
698
|
+
}), a(this, we, ps(() => {
|
|
686
699
|
const e = Et.getAll(this).reverse();
|
|
687
700
|
let s = 0;
|
|
688
701
|
e.forEach((r, h) => {
|
|
689
702
|
r.element === this.scrollElement && (s = h);
|
|
690
|
-
}), f(this,
|
|
703
|
+
}), f(this, de, e.slice(s + 1));
|
|
691
704
|
}, 0));
|
|
692
705
|
}
|
|
693
706
|
get distanceOffsetCSSProperty() {
|
|
694
|
-
return t(this,
|
|
707
|
+
return t(this, _t);
|
|
695
708
|
}
|
|
696
709
|
get startOffsetCSSProperty() {
|
|
697
|
-
return t(this,
|
|
710
|
+
return t(this, bt);
|
|
698
711
|
}
|
|
699
712
|
get captureOnceCSSProperty() {
|
|
700
|
-
return t(this,
|
|
713
|
+
return t(this, Ct);
|
|
701
714
|
}
|
|
702
715
|
get capturedCSSProperty() {
|
|
703
716
|
return t(this, $);
|
|
704
717
|
}
|
|
705
718
|
get releasedCSSProperty() {
|
|
706
|
-
return t(this,
|
|
719
|
+
return t(this, I);
|
|
707
720
|
}
|
|
708
721
|
get capturedFromStartCSSProperty() {
|
|
709
|
-
return t(this,
|
|
722
|
+
return t(this, B);
|
|
710
723
|
}
|
|
711
724
|
get capturedFromFinishCSSProperty() {
|
|
712
|
-
return t(this,
|
|
725
|
+
return t(this, H);
|
|
713
726
|
}
|
|
714
727
|
get releasedFromStartCSSProperty() {
|
|
715
|
-
return t(this,
|
|
728
|
+
return t(this, kt);
|
|
716
729
|
}
|
|
717
730
|
get releasedFromFinishCSSProperty() {
|
|
718
731
|
return t(this, M);
|
|
719
732
|
}
|
|
720
733
|
get passedVarCSSProperty() {
|
|
721
|
-
return t(this,
|
|
734
|
+
return t(this, ot);
|
|
722
735
|
}
|
|
723
736
|
get progressVarCSSProperty() {
|
|
724
|
-
return t(this,
|
|
737
|
+
return t(this, lt);
|
|
725
738
|
}
|
|
726
739
|
get distanceVarCSSProperty() {
|
|
727
740
|
return t(this, rt);
|
|
@@ -733,19 +746,19 @@ let ns = class extends We {
|
|
|
733
746
|
return t(this, nt);
|
|
734
747
|
}
|
|
735
748
|
get smoothstepCSSProperty() {
|
|
736
|
-
return t(this,
|
|
749
|
+
return t(this, zt);
|
|
737
750
|
}
|
|
738
751
|
get smootherstepCSSProperty() {
|
|
739
|
-
return t(this,
|
|
752
|
+
return t(this, Xt);
|
|
740
753
|
}
|
|
741
754
|
get disabledCSSProperty() {
|
|
742
|
-
return t(this,
|
|
755
|
+
return t(this, wt);
|
|
743
756
|
}
|
|
744
757
|
get targetCSSProperty() {
|
|
745
|
-
return t(this,
|
|
758
|
+
return t(this, Ot);
|
|
746
759
|
}
|
|
747
760
|
get isCaptured() {
|
|
748
|
-
return t(this,
|
|
761
|
+
return t(this, E);
|
|
749
762
|
}
|
|
750
763
|
get isReleased() {
|
|
751
764
|
return t(this, q);
|
|
@@ -754,22 +767,22 @@ let ns = class extends We {
|
|
|
754
767
|
return t(this, U);
|
|
755
768
|
}
|
|
756
769
|
get isReleasedFromStart() {
|
|
757
|
-
return t(this,
|
|
770
|
+
return t(this, ct);
|
|
758
771
|
}
|
|
759
772
|
get isCapturedFromFinish() {
|
|
760
|
-
return t(this,
|
|
773
|
+
return t(this, ut);
|
|
761
774
|
}
|
|
762
775
|
get isReleasedFromFinish() {
|
|
763
776
|
return t(this, J);
|
|
764
777
|
}
|
|
765
778
|
get directionPosition() {
|
|
766
|
-
return t(this,
|
|
779
|
+
return t(this, Dt);
|
|
767
780
|
}
|
|
768
781
|
get directionSize() {
|
|
769
|
-
return t(this,
|
|
782
|
+
return t(this, At);
|
|
770
783
|
}
|
|
771
784
|
get passed() {
|
|
772
|
-
return t(this,
|
|
785
|
+
return t(this, R);
|
|
773
786
|
}
|
|
774
787
|
get progress() {
|
|
775
788
|
return t(this, Q);
|
|
@@ -778,223 +791,223 @@ let ns = class extends We {
|
|
|
778
791
|
return t(this, x);
|
|
779
792
|
}
|
|
780
793
|
get finish() {
|
|
781
|
-
return t(this,
|
|
794
|
+
return t(this, T);
|
|
782
795
|
}
|
|
783
796
|
get distance() {
|
|
784
|
-
return t(this,
|
|
797
|
+
return t(this, P);
|
|
785
798
|
}
|
|
786
799
|
get isCapturedOnce() {
|
|
787
|
-
return t(this,
|
|
800
|
+
return t(this, Pt);
|
|
788
801
|
}
|
|
789
802
|
get isDisabled() {
|
|
790
803
|
return t(this, y);
|
|
791
804
|
}
|
|
792
805
|
resize() {
|
|
793
|
-
f(this,
|
|
806
|
+
f(this, At, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), f(this, Dt, this.scrollElement.vertical ? _e(this, this.scrollElement) : be(this, this.scrollElement)), f(this, x, this.getStart()), f(this, P, this.getDistance()), f(this, x, t(this, x) + t(this, bt).current), f(this, P, t(this, P) + t(this, _t).current), f(this, T, t(this, x) + t(this, P)), this.scrollElement.currentScrollValue > t(this, T) && !t(this, E).current && !t(this, q).current && (t(this, E).current = !0), this.setVar(t(this, ht).current, t(this, x)), this.setVar(t(this, nt).current, t(this, T)), this.setVar(t(this, rt).current, t(this, P)), f(this, Yt, !0);
|
|
794
807
|
}
|
|
795
808
|
tick() {
|
|
796
809
|
let e = this.scrollElement.currentScrollValue;
|
|
797
|
-
t(this,
|
|
810
|
+
t(this, de).forEach((r) => {
|
|
798
811
|
e += r.value;
|
|
799
|
-
}), f(this,
|
|
812
|
+
}), f(this, R, this.updateValue(e - t(this, x), 0, t(this, P)) || 0), f(this, Q, t(this, R) / t(this, P) || 0);
|
|
800
813
|
const s = Math.round(e);
|
|
801
|
-
t(this,
|
|
814
|
+
t(this, E).current && (s > t(this, x) ? t(this, U).current || b(this, Te, _s).call(this) : t(this, U).current && !t(this, ct).current && b(this, Ie, Cs).call(this), s < t(this, T) ? t(this, J).current && !t(this, ut).current && b(this, Re, bs).call(this) : t(this, U).current && !t(this, J).current && b(this, Be, ys).call(this)), s > t(this, x) && s < t(this, T) ? (b(this, me, ze).call(this), t(this, E).current || b(this, De, gs).call(this)) : t(this, E).current && (f(this, R, Ms(t(this, P) / 2, t(this, R), 0, t(this, P))), f(this, Q, t(this, R) / t(this, P)), b(this, me, ze).call(this), b(this, Ae, ws).call(this)), t(this, Pt) && t(this, Ct).current && (t(this, $).current && t(this, v).classList.add(t(this, $).current), f(this, y, !0));
|
|
802
815
|
}
|
|
803
816
|
disable() {
|
|
804
|
-
this.style.cssText = "", f(this,
|
|
817
|
+
this.style.cssText = "", f(this, Dt, 0), f(this, At, 0), f(this, R, 0), f(this, Q, 0), f(this, x, 0), f(this, P, 0), f(this, T, 0), f(this, Yt, !1), t(this, E).current = !1, t(this, q).current = !1, t(this, U).current = !1, t(this, ct).current = !1, t(this, ut).current = !1, t(this, J).current = !1, f(this, Pt, !1), f(this, y, !0), b(this, ge, He).call(this);
|
|
805
818
|
}
|
|
806
819
|
enable() {
|
|
807
820
|
f(this, y, !1);
|
|
808
821
|
}
|
|
809
822
|
connectedCallback() {
|
|
810
|
-
super.connectedCallback(), t(this,
|
|
823
|
+
super.connectedCallback(), t(this, Ot).observe(), t(this, wt).observe(), t(this, _t).observe(), t(this, bt).observe(), t(this, Ct).observe(), t(this, $).observe(), t(this, I).observe(), t(this, B).observe(), t(this, H).observe(), t(this, kt).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, rt).observe(), t(this, ht).observe(), t(this, nt).observe(), t(this, zt).observe(), t(this, Xt).observe();
|
|
811
824
|
let e = !1;
|
|
812
825
|
this.scrollElement.addEventListener(
|
|
813
826
|
"sectionsChange",
|
|
814
|
-
t(this,
|
|
815
|
-
), t(this,
|
|
816
|
-
s.previous && b(this,
|
|
817
|
-
}), t(this,
|
|
827
|
+
t(this, we)
|
|
828
|
+
), t(this, we).call(this), t(this, wt).current || this.enable(), t(this, Ot).subscribe((s) => {
|
|
829
|
+
s.previous && b(this, ge, He).call(this), s.current ? s.current === "parent" ? f(this, v, this.parentElement || this) : f(this, v, document.querySelector(s.current) || this) : f(this, v, this);
|
|
830
|
+
}), t(this, wt).subscribe((s) => {
|
|
818
831
|
s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
|
|
819
|
-
}), t(this,
|
|
832
|
+
}), t(this, bt).subscribe(() => {
|
|
820
833
|
e && !t(this, y) && this.resize();
|
|
821
|
-
}), t(this,
|
|
834
|
+
}), t(this, _t).subscribe(() => {
|
|
822
835
|
e && !t(this, y) && this.resize();
|
|
823
836
|
}), t(this, $).subscribe((s) => {
|
|
824
|
-
b(this, it,
|
|
825
|
-
}), t(this, H).subscribe((s) => {
|
|
826
|
-
b(this, it, Ct).call(this, s);
|
|
827
|
-
}), t(this, G).subscribe((s) => {
|
|
828
|
-
b(this, it, Ct).call(this, s);
|
|
837
|
+
b(this, it, yt).call(this, s);
|
|
829
838
|
}), t(this, B).subscribe((s) => {
|
|
830
|
-
b(this, it,
|
|
831
|
-
}), t(this,
|
|
832
|
-
b(this, it,
|
|
839
|
+
b(this, it, yt).call(this, s);
|
|
840
|
+
}), t(this, H).subscribe((s) => {
|
|
841
|
+
b(this, it, yt).call(this, s);
|
|
842
|
+
}), t(this, I).subscribe((s) => {
|
|
843
|
+
b(this, it, yt).call(this, s);
|
|
844
|
+
}), t(this, kt).subscribe((s) => {
|
|
845
|
+
b(this, it, yt).call(this, s);
|
|
833
846
|
}), t(this, M).subscribe((s) => {
|
|
834
|
-
b(this, it,
|
|
835
|
-
}), t(this,
|
|
847
|
+
b(this, it, yt).call(this, s);
|
|
848
|
+
}), t(this, Ct).subscribe((s) => {
|
|
836
849
|
t(this, y) || !s.current && s.previous && (this.resize(), this.enable());
|
|
837
|
-
}), t(this, at).subscribe((s) => {
|
|
838
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed));
|
|
839
850
|
}), t(this, ot).subscribe((s) => {
|
|
851
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed));
|
|
852
|
+
}), t(this, lt).subscribe((s) => {
|
|
840
853
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, Q)));
|
|
841
854
|
}), t(this, ht).subscribe((s) => {
|
|
842
855
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, x)));
|
|
843
856
|
}), t(this, nt).subscribe((s) => {
|
|
844
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
857
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
|
|
845
858
|
}), t(this, rt).subscribe((s) => {
|
|
846
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
847
|
-
}),
|
|
859
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, P)));
|
|
860
|
+
}), Bt.subscribe(t(this, ve), Ue.SEGMENT), this.scrollElement.onScroll(t(this, jt)), e = !0;
|
|
848
861
|
}
|
|
849
862
|
disconnectedCallback() {
|
|
850
|
-
|
|
863
|
+
Bt.unsubscribe(t(this, ve)), this.scrollElement.offScroll(t(this, jt)), t(this, Ot).close(), t(this, wt).close(), t(this, _t).close(), t(this, bt).close(), t(this, Ct).close(), t(this, $).close(), t(this, I).close(), t(this, B).close(), t(this, H).close(), t(this, kt).close(), t(this, M).close(), t(this, ot).close(), t(this, lt).close(), t(this, rt).close(), t(this, ht).close(), t(this, nt).close(), t(this, zt).close(), t(this, Xt).close(), t(this, E).close(), t(this, q).close(), t(this, U).close(), t(this, ct).close(), t(this, ut).close(), t(this, J).close(), this.disable();
|
|
851
864
|
}
|
|
852
865
|
removeVar(e) {
|
|
853
|
-
e && t(this,
|
|
866
|
+
e && t(this, v).style.removeProperty(`--${e}`);
|
|
854
867
|
}
|
|
855
868
|
setVar(e, s) {
|
|
856
|
-
e && t(this,
|
|
869
|
+
e && t(this, v).style.setProperty(`--${e}`, s.toString());
|
|
857
870
|
}
|
|
858
871
|
updateValue(e, s = 0, r = 1) {
|
|
859
|
-
return this.smootherstepCSSProperty.current ?
|
|
872
|
+
return this.smootherstepCSSProperty.current ? xs(e, s, r) * r : t(this, zt).current ? Ls(e, s, r) * r : Ke(e, s, r);
|
|
860
873
|
}
|
|
861
874
|
getDistance() {
|
|
862
|
-
return t(this,
|
|
875
|
+
return t(this, At) + t(this, Se);
|
|
863
876
|
}
|
|
864
877
|
getStart() {
|
|
865
|
-
return t(this,
|
|
878
|
+
return t(this, Dt) - t(this, Se);
|
|
866
879
|
}
|
|
867
880
|
};
|
|
868
|
-
|
|
869
|
-
gt = /* @__PURE__ */ new WeakMap();
|
|
881
|
+
Ot = /* @__PURE__ */ new WeakMap();
|
|
870
882
|
wt = /* @__PURE__ */ new WeakMap();
|
|
871
883
|
_t = /* @__PURE__ */ new WeakMap();
|
|
872
884
|
bt = /* @__PURE__ */ new WeakMap();
|
|
885
|
+
Ct = /* @__PURE__ */ new WeakMap();
|
|
873
886
|
$ = /* @__PURE__ */ new WeakMap();
|
|
887
|
+
I = /* @__PURE__ */ new WeakMap();
|
|
874
888
|
B = /* @__PURE__ */ new WeakMap();
|
|
875
889
|
H = /* @__PURE__ */ new WeakMap();
|
|
876
|
-
|
|
877
|
-
yt = /* @__PURE__ */ new WeakMap();
|
|
890
|
+
kt = /* @__PURE__ */ new WeakMap();
|
|
878
891
|
M = /* @__PURE__ */ new WeakMap();
|
|
879
|
-
at = /* @__PURE__ */ new WeakMap();
|
|
880
892
|
ot = /* @__PURE__ */ new WeakMap();
|
|
893
|
+
lt = /* @__PURE__ */ new WeakMap();
|
|
881
894
|
rt = /* @__PURE__ */ new WeakMap();
|
|
882
895
|
ht = /* @__PURE__ */ new WeakMap();
|
|
883
896
|
nt = /* @__PURE__ */ new WeakMap();
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
897
|
+
zt = /* @__PURE__ */ new WeakMap();
|
|
898
|
+
Xt = /* @__PURE__ */ new WeakMap();
|
|
899
|
+
E = /* @__PURE__ */ new WeakMap();
|
|
887
900
|
q = /* @__PURE__ */ new WeakMap();
|
|
888
901
|
U = /* @__PURE__ */ new WeakMap();
|
|
889
|
-
lt = /* @__PURE__ */ new WeakMap();
|
|
890
902
|
ct = /* @__PURE__ */ new WeakMap();
|
|
903
|
+
ut = /* @__PURE__ */ new WeakMap();
|
|
891
904
|
J = /* @__PURE__ */ new WeakMap();
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
905
|
+
de = /* @__PURE__ */ new WeakMap();
|
|
906
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
907
|
+
Dt = /* @__PURE__ */ new WeakMap();
|
|
908
|
+
At = /* @__PURE__ */ new WeakMap();
|
|
909
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
910
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
898
911
|
Q = /* @__PURE__ */ new WeakMap();
|
|
899
912
|
x = /* @__PURE__ */ new WeakMap();
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
913
|
+
P = /* @__PURE__ */ new WeakMap();
|
|
914
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
915
|
+
Yt = /* @__PURE__ */ new WeakMap();
|
|
916
|
+
Pt = /* @__PURE__ */ new WeakMap();
|
|
904
917
|
y = /* @__PURE__ */ new WeakMap();
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
b(this,
|
|
918
|
+
me = /* @__PURE__ */ new WeakSet();
|
|
919
|
+
ze = function() {
|
|
920
|
+
b(this, Ye, vs).call(this), this.setVar(t(this, ot).current, t(this, R)), this.setVar(t(this, lt).current, t(this, Q));
|
|
908
921
|
};
|
|
909
|
-
|
|
910
|
-
|
|
922
|
+
Ye = /* @__PURE__ */ new WeakSet();
|
|
923
|
+
vs = function() {
|
|
911
924
|
this.dispatchEvent(
|
|
912
925
|
new CustomEvent("segmentPass", {
|
|
913
926
|
detail: {
|
|
914
|
-
distance: t(this,
|
|
927
|
+
distance: t(this, P),
|
|
915
928
|
start: t(this, x),
|
|
916
|
-
finish: t(this,
|
|
917
|
-
passed: t(this,
|
|
929
|
+
finish: t(this, T),
|
|
930
|
+
passed: t(this, R),
|
|
918
931
|
progress: t(this, Q)
|
|
919
932
|
}
|
|
920
933
|
})
|
|
921
934
|
);
|
|
922
935
|
};
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
t(this,
|
|
936
|
+
De = /* @__PURE__ */ new WeakSet();
|
|
937
|
+
gs = function() {
|
|
938
|
+
t(this, E).current = !0, t(this, q).current = !1, f(this, Pt, !0), t(this, I).current && t(this, v).classList.remove(t(this, I).current), t(this, M).current && t(this, v).classList.remove(
|
|
926
939
|
t(this, M).current
|
|
927
|
-
), t(this, M).current && t(this,
|
|
940
|
+
), t(this, M).current && t(this, v).classList.remove(
|
|
928
941
|
t(this, M).current
|
|
929
|
-
), t(this, $).current && t(this,
|
|
942
|
+
), t(this, $).current && t(this, v).classList.add(t(this, $).current);
|
|
930
943
|
};
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
t(this, q).current = !0, t(this,
|
|
944
|
+
Ae = /* @__PURE__ */ new WeakSet();
|
|
945
|
+
ws = function() {
|
|
946
|
+
t(this, q).current = !0, t(this, E).current = !1, f(this, Pt, !0), t(this, $).current && t(this, v).classList.remove(t(this, $).current), t(this, B).current && t(this, v).classList.remove(
|
|
947
|
+
t(this, B).current
|
|
948
|
+
), t(this, H).current && t(this, v).classList.remove(
|
|
934
949
|
t(this, H).current
|
|
935
|
-
), t(this,
|
|
936
|
-
t(this, G).current
|
|
937
|
-
), t(this, B).current && t(this, m).classList.add(t(this, B).current);
|
|
950
|
+
), t(this, I).current && t(this, v).classList.add(t(this, I).current);
|
|
938
951
|
};
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
t(this,
|
|
942
|
-
t(this,
|
|
952
|
+
Te = /* @__PURE__ */ new WeakSet();
|
|
953
|
+
_s = function() {
|
|
954
|
+
t(this, E).current = !0, t(this, U).current = !0, t(this, ct).current = !1, t(this, B).current && t(this, v).classList.add(
|
|
955
|
+
t(this, B).current
|
|
943
956
|
);
|
|
944
957
|
};
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
t(this,
|
|
948
|
-
t(this,
|
|
958
|
+
Re = /* @__PURE__ */ new WeakSet();
|
|
959
|
+
bs = function() {
|
|
960
|
+
t(this, E).current = !0, t(this, ut).current = !0, t(this, J).current = !1, t(this, H).current && t(this, v).classList.add(
|
|
961
|
+
t(this, H).current
|
|
949
962
|
);
|
|
950
963
|
};
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
t(this, q).current = !0, t(this,
|
|
964
|
+
Ie = /* @__PURE__ */ new WeakSet();
|
|
965
|
+
Cs = function() {
|
|
966
|
+
t(this, q).current = !0, t(this, ct).current = !0, t(this, U).current = !1, t(this, M).current && t(this, v).classList.add(
|
|
954
967
|
t(this, M).current
|
|
955
968
|
);
|
|
956
969
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
t(this, q).current = !0, t(this, J).current = !0, t(this,
|
|
970
|
+
Be = /* @__PURE__ */ new WeakSet();
|
|
971
|
+
ys = function() {
|
|
972
|
+
t(this, q).current = !0, t(this, J).current = !0, t(this, ut).current = !1, t(this, M).current && t(this, v).classList.add(
|
|
960
973
|
t(this, M).current
|
|
961
974
|
);
|
|
962
975
|
};
|
|
963
|
-
|
|
964
|
-
|
|
976
|
+
ve = /* @__PURE__ */ new WeakMap();
|
|
977
|
+
jt = /* @__PURE__ */ new WeakMap();
|
|
965
978
|
it = /* @__PURE__ */ new WeakSet();
|
|
966
|
-
|
|
979
|
+
yt = function(e) {
|
|
967
980
|
if (t(this, y)) {
|
|
968
|
-
e.previous && t(this,
|
|
981
|
+
e.previous && t(this, v).classList.remove(e.previous), e.current && t(this, v).classList.remove(e.current);
|
|
969
982
|
return;
|
|
970
983
|
}
|
|
971
|
-
e.current && t(this,
|
|
984
|
+
e.current && t(this, E).current ? (e.previous && t(this, v).classList.remove(e.previous), t(this, v).classList.add(e.current)) : !e.current && e.previous && t(this, v).classList.remove(e.previous);
|
|
972
985
|
};
|
|
973
|
-
|
|
974
|
-
|
|
986
|
+
je = /* @__PURE__ */ new WeakSet();
|
|
987
|
+
ks = function(...e) {
|
|
975
988
|
e.forEach((s) => {
|
|
976
|
-
s && t(this,
|
|
989
|
+
s && t(this, v).classList.remove(s);
|
|
977
990
|
});
|
|
978
991
|
};
|
|
979
|
-
|
|
980
|
-
|
|
992
|
+
ts = /* @__PURE__ */ new WeakSet();
|
|
993
|
+
Ws = function(...e) {
|
|
981
994
|
e.forEach((s) => {
|
|
982
|
-
s && t(this,
|
|
995
|
+
s && t(this, v).style.removeProperty(`--${s}`);
|
|
983
996
|
});
|
|
984
997
|
};
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
b(this,
|
|
998
|
+
ge = /* @__PURE__ */ new WeakSet();
|
|
999
|
+
He = function() {
|
|
1000
|
+
b(this, je, ks).call(this, t(this, $).current, t(this, B).current, t(this, H).current, t(this, I).current, t(this, kt).current, t(this, M).current), b(this, ts, Ws).call(this, t(this, ot).current, t(this, lt).current, t(this, rt).current, t(this, ht).current, t(this, nt).current);
|
|
988
1001
|
};
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
],
|
|
1002
|
+
we = /* @__PURE__ */ new WeakMap();
|
|
1003
|
+
cs = ai([
|
|
1004
|
+
Kt("e-scroll-segment")
|
|
1005
|
+
], cs);
|
|
993
1006
|
export {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1007
|
+
ls as ScrollBulletButtonsElement,
|
|
1008
|
+
Ee as ScrollElement,
|
|
1009
|
+
cs as ScrollSegmentElement,
|
|
1010
|
+
hs as ScrollSetButtonElement,
|
|
1011
|
+
ns as ScrollStepButtonElement,
|
|
1012
|
+
rs as ScrollbarElement
|
|
1000
1013
|
};
|