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