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