aptechka 0.50.6 → 0.50.7
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/index.cjs +1 -1
- package/lib/scroll/index.js +323 -320
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var Ve = Object.defineProperty;
|
|
2
|
+
var Ee = Object.getOwnPropertySymbols;
|
|
3
|
+
var Oe = Object.prototype.hasOwnProperty, Re = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var xe = (a) => {
|
|
5
5
|
throw TypeError(a);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var Pe = (a, h, e) => h in a ? Ve(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e, Le = (a, h) => {
|
|
8
8
|
for (var e in h || (h = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
9
|
+
Oe.call(h, e) && Pe(a, e, h[e]);
|
|
10
|
+
if (Ee)
|
|
11
|
+
for (var e of Ee(h))
|
|
12
|
+
Re.call(h, e) && Pe(a, e, h[e]);
|
|
13
13
|
return a;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (a, h, e) => (
|
|
17
|
-
import { S as
|
|
18
|
-
import { i as
|
|
19
|
-
import { a as
|
|
20
|
-
import { d as
|
|
21
|
-
import { c as
|
|
22
|
-
import { a as
|
|
23
|
-
import { c as
|
|
24
|
-
import { l as
|
|
15
|
+
var pe = (a, h, e) => h.has(a) || xe("Cannot " + e);
|
|
16
|
+
var t = (a, h, e) => (pe(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? xe("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (pe(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), c = (a, h, e) => (pe(a, h, "access private method"), e);
|
|
17
|
+
import { S as He } from "../Store-D2xCXENW.js";
|
|
18
|
+
import { i as W } from "../index-euf5anj6.js";
|
|
19
|
+
import { a as Be } from "../easings-Bni3YAAW.js";
|
|
20
|
+
import { d as le } from "../events-CsVF98U6.js";
|
|
21
|
+
import { c as ze } from "../jss-Chm3yE5y.js";
|
|
22
|
+
import { a as fe, g as me } from "../layout-DpZo-I0y.js";
|
|
23
|
+
import { c as Ie } from "../math-BOBiC4TN.js";
|
|
24
|
+
import { l as We } from "../number-DwCxt_Ck.js";
|
|
25
25
|
import "../ticker/index.js";
|
|
26
|
-
import { TICK_ORDER as
|
|
27
|
-
import { D as
|
|
28
|
-
import { T as
|
|
29
|
-
import { WheelControls as
|
|
30
|
-
import { windowResizer as
|
|
26
|
+
import { TICK_ORDER as Fe, RESIZE_ORDER as be } from "../order/index.js";
|
|
27
|
+
import { D as $e } from "../Damped-CucKOQsI.js";
|
|
28
|
+
import { T as Ne } from "../Tweened-CcPeZ0UE.js";
|
|
29
|
+
import { WheelControls as qe, KeyboardControls as Ue, DragControls as Ge, AutoplayControls as Ke } from "../controls/index.js";
|
|
30
|
+
import { windowResizer as Tt } from "../window-resizer/index.js";
|
|
31
31
|
import { scrollEntries as St } from "../scroll-entries/index.js";
|
|
32
|
-
import { cssUnitParser as
|
|
32
|
+
import { cssUnitParser as ke } from "../css-unit-parser/index.js";
|
|
33
33
|
import { CSSProperty as p } from "../css-property/index.js";
|
|
34
|
-
import { device as
|
|
35
|
-
import { elementResizer as
|
|
36
|
-
import { s as
|
|
37
|
-
import { b as
|
|
38
|
-
import { d as
|
|
39
|
-
import { ScrollSegmentElement as
|
|
40
|
-
var b,
|
|
41
|
-
class
|
|
34
|
+
import { device as _e } from "../device/index.js";
|
|
35
|
+
import { elementResizer as Jt } from "../element-resizer/index.js";
|
|
36
|
+
import { s as Ze } from "../gestures-D2Fdra_G.js";
|
|
37
|
+
import { b as Te } from "../dom-CVWzyXPH.js";
|
|
38
|
+
import { d as je } from "../function-C10DGppn.js";
|
|
39
|
+
import { ScrollSegmentElement as Je } from "../scroll-segment/index.js";
|
|
40
|
+
var b, Xt, g, gt, F, X;
|
|
41
|
+
class Qe {
|
|
42
42
|
constructor(h, e, i) {
|
|
43
43
|
s(this, b);
|
|
44
|
-
s(this,
|
|
44
|
+
s(this, Xt);
|
|
45
45
|
s(this, g);
|
|
46
46
|
s(this, gt, 0);
|
|
47
|
-
s(this,
|
|
48
|
-
s(this,
|
|
49
|
-
n(this, b, h), n(this,
|
|
47
|
+
s(this, F, 0);
|
|
48
|
+
s(this, X, null);
|
|
49
|
+
n(this, b, h), n(this, Xt, e), n(this, g, i), St.register(t(this, b));
|
|
50
50
|
}
|
|
51
51
|
get index() {
|
|
52
|
-
return t(this,
|
|
52
|
+
return t(this, Xt);
|
|
53
53
|
}
|
|
54
54
|
get size() {
|
|
55
55
|
return t(this, gt);
|
|
56
56
|
}
|
|
57
57
|
get position() {
|
|
58
|
-
return t(this,
|
|
58
|
+
return t(this, F);
|
|
59
59
|
}
|
|
60
60
|
destroy() {
|
|
61
61
|
St.unregister(t(this, b)), this.unsetTransform();
|
|
@@ -67,31 +67,31 @@ class Je {
|
|
|
67
67
|
h ? (t(this, b).style.setProperty("--size", h + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, b).style.width = h + "px", t(this, b).style.height = "") : (t(this, b).style.height = h + "px", t(this, b).style.width = "")) : (t(this, b).style.width = "", t(this, b).style.height = "", t(this, b).style.removeProperty("--size"));
|
|
68
68
|
}
|
|
69
69
|
resize() {
|
|
70
|
-
n(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), n(this,
|
|
70
|
+
n(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), n(this, F, t(this, g).vertical ? fe(t(this, b)) : me(t(this, b))), n(this, F, t(this, F) - t(this, g).contentPosition);
|
|
71
71
|
}
|
|
72
72
|
transform() {
|
|
73
73
|
let h = 0;
|
|
74
74
|
const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
|
|
75
|
-
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this,
|
|
75
|
+
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, F) + t(this, gt) < t(this, g).currentScrollValue && (h = t(this, g).distance * -1 - t(this, g).gap), St.update(
|
|
76
76
|
t(this, b),
|
|
77
77
|
t(this, g).axisCSSProperty.current,
|
|
78
78
|
h
|
|
79
79
|
);
|
|
80
|
-
const i = t(this, g).currentScrollValue + h, r = t(this,
|
|
80
|
+
const i = t(this, g).currentScrollValue + h, r = t(this, F) - t(this, g).viewportSize - e, d = t(this, F) + t(this, gt) + e, m = Ie(i, r, d);
|
|
81
81
|
t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${m * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${m * -1}px, 0px, 0px)`;
|
|
82
82
|
}
|
|
83
83
|
mark(h) {
|
|
84
|
-
t(this,
|
|
84
|
+
t(this, X) !== h && (t(this, X) && t(this, b).classList.remove(t(this, X)), h && t(this, b).classList.add(h), n(this, X, h), le(t(this, b), "scrollSectionMarkChange", {
|
|
85
85
|
composed: !0,
|
|
86
86
|
detail: {
|
|
87
|
-
mark: t(this,
|
|
87
|
+
mark: t(this, X)
|
|
88
88
|
},
|
|
89
89
|
custom: !0
|
|
90
90
|
}));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
b = new WeakMap(),
|
|
94
|
-
const
|
|
93
|
+
b = new WeakMap(), Xt = new WeakMap(), g = new WeakMap(), gt = new WeakMap(), F = new WeakMap(), X = new WeakMap();
|
|
94
|
+
const Xe = ze({
|
|
95
95
|
":host": {
|
|
96
96
|
position: "relative",
|
|
97
97
|
width: "100%",
|
|
@@ -129,66 +129,66 @@ const Qe = ke({
|
|
|
129
129
|
flexShrink: "0"
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
var u, vt, x,
|
|
133
|
-
class
|
|
132
|
+
var u, vt, x, Y, $, N, D, T, tt, et, M, st, yt, V, v, Ct, wt, Et, Pt, At, A, xt, it, O, rt, q, nt, Lt, ht, ot, lt, f, Dt, l, Yt, te, y, S, z, R, ct, H, w, E, Mt, at, U, G, K, Vt, ut, _, Ot, B, P, Rt, o, Se, zt, It, ce, ae, ge, ve, L, Ht, Ae, Bt, ee, ye, Ce, bt, ue, se;
|
|
133
|
+
class Qt extends HTMLElement {
|
|
134
134
|
constructor() {
|
|
135
135
|
super();
|
|
136
136
|
s(this, o);
|
|
137
137
|
s(this, u, null);
|
|
138
138
|
s(this, vt, new p(this, "--controls", !0));
|
|
139
139
|
s(this, x, new p(this, "--axis", "y"));
|
|
140
|
-
s(this,
|
|
141
|
-
s(this,
|
|
142
|
-
s(this,
|
|
140
|
+
s(this, Y, new p(this, "--reverse", !1));
|
|
141
|
+
s(this, $, new p(this, "--direction", 0));
|
|
142
|
+
s(this, N, new p(this, "--pages", 0, {
|
|
143
143
|
validate: (e) => Math.max(0, e - 1)
|
|
144
144
|
}));
|
|
145
|
-
s(this,
|
|
146
|
-
s(this,
|
|
147
|
-
s(this,
|
|
145
|
+
s(this, D, new p(this, "--split", !1));
|
|
146
|
+
s(this, T, new p(this, "--sectional", !1));
|
|
147
|
+
s(this, tt, new p(
|
|
148
148
|
this,
|
|
149
149
|
"--tween-easing",
|
|
150
150
|
!1
|
|
151
151
|
));
|
|
152
|
-
s(this,
|
|
152
|
+
s(this, et, new p(
|
|
153
153
|
this,
|
|
154
154
|
"--tween-duration",
|
|
155
155
|
!1
|
|
156
156
|
));
|
|
157
|
-
s(this,
|
|
158
|
-
s(this,
|
|
157
|
+
s(this, M, new p(this, "--auto-size", !1));
|
|
158
|
+
s(this, st, new p(
|
|
159
159
|
this,
|
|
160
160
|
"--wheel-max-delta",
|
|
161
161
|
!1
|
|
162
162
|
));
|
|
163
163
|
s(this, yt, new p(this, "--drag-inertion", 1));
|
|
164
|
-
s(this,
|
|
164
|
+
s(this, V, new p(
|
|
165
165
|
this,
|
|
166
166
|
"--sections-in-view",
|
|
167
167
|
1
|
|
168
168
|
));
|
|
169
|
-
s(this,
|
|
169
|
+
s(this, v, new p(this, "--loop", !1));
|
|
170
170
|
s(this, Ct, new p(this, "--damping", 20));
|
|
171
171
|
s(this, wt, new p(this, "--mass", 0));
|
|
172
172
|
s(this, Et, new p(this, "--stiffness", 0));
|
|
173
173
|
s(this, Pt, new p(this, "--mouse-drag", !1));
|
|
174
|
-
s(this,
|
|
174
|
+
s(this, At, new p(
|
|
175
175
|
this,
|
|
176
176
|
"--section-distance-scale",
|
|
177
177
|
0.5
|
|
178
178
|
));
|
|
179
|
-
s(this,
|
|
179
|
+
s(this, A, new p(this, "--autoplay", 0));
|
|
180
180
|
s(this, xt, new p(
|
|
181
181
|
this,
|
|
182
182
|
"--autoplay-pause-duration",
|
|
183
183
|
0
|
|
184
184
|
));
|
|
185
|
-
s(this,
|
|
185
|
+
s(this, it, new p(
|
|
186
186
|
this,
|
|
187
187
|
"--autoplay-user-direction",
|
|
188
188
|
!1
|
|
189
189
|
));
|
|
190
|
-
s(this,
|
|
191
|
-
s(this,
|
|
190
|
+
s(this, O, new p(this, "--classes", !1));
|
|
191
|
+
s(this, rt, new p(
|
|
192
192
|
this,
|
|
193
193
|
"--current-index-start-offset",
|
|
194
194
|
0
|
|
@@ -198,50 +198,51 @@ class Jt extends HTMLElement {
|
|
|
198
198
|
"--current-index-end-offset",
|
|
199
199
|
0
|
|
200
200
|
));
|
|
201
|
-
s(this,
|
|
201
|
+
s(this, nt, new p(this, "--focus-delay", 0));
|
|
202
202
|
s(this, Lt, new p(
|
|
203
203
|
this,
|
|
204
204
|
"--focus-duration",
|
|
205
205
|
3e3
|
|
206
206
|
));
|
|
207
|
-
s(this,
|
|
208
|
-
s(this,
|
|
209
|
-
s(this,
|
|
207
|
+
s(this, ht, new p(this, "--disabled", !1));
|
|
208
|
+
s(this, ot, new p(this, "--hibernate", !1));
|
|
209
|
+
s(this, lt, null);
|
|
210
210
|
s(this, f, null);
|
|
211
|
-
s(this,
|
|
211
|
+
s(this, Dt, null);
|
|
212
212
|
s(this, l, []);
|
|
213
|
-
s(this, Xt, 0);
|
|
214
213
|
s(this, Yt, 0);
|
|
215
|
-
s(this,
|
|
214
|
+
s(this, te, 0);
|
|
215
|
+
s(this, y, 0);
|
|
216
216
|
s(this, S, 0);
|
|
217
217
|
s(this, z, 0);
|
|
218
|
-
s(this,
|
|
219
|
-
s(this,
|
|
220
|
-
s(this,
|
|
218
|
+
s(this, R, null);
|
|
219
|
+
s(this, ct, null);
|
|
220
|
+
s(this, H, null);
|
|
221
221
|
s(this, w, null);
|
|
222
|
-
s(this, E, new
|
|
223
|
-
s(this,
|
|
224
|
-
s(this,
|
|
222
|
+
s(this, E, new He(0));
|
|
223
|
+
s(this, Mt, 0);
|
|
224
|
+
s(this, at, 0);
|
|
225
225
|
s(this, U, !1);
|
|
226
226
|
s(this, G, !0);
|
|
227
|
-
s(this,
|
|
228
|
-
s(this,
|
|
227
|
+
s(this, K, !0);
|
|
228
|
+
s(this, Vt);
|
|
229
229
|
s(this, ut);
|
|
230
|
-
s(this,
|
|
231
|
-
s(this,
|
|
232
|
-
s(this,
|
|
230
|
+
s(this, _, new Ne());
|
|
231
|
+
s(this, Ot, !1);
|
|
232
|
+
s(this, B, null);
|
|
233
233
|
s(this, P, !1);
|
|
234
|
+
s(this, Rt, null);
|
|
234
235
|
s(this, L, () => {
|
|
235
|
-
if (t(this,
|
|
236
|
+
if (t(this, ot).current)
|
|
236
237
|
return;
|
|
237
238
|
t(this, u).unlistenAnimationFrame();
|
|
238
239
|
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
|
|
239
|
-
if (n(this,
|
|
240
|
+
if (n(this, Yt, this.vertical ? fe(this) : me(this)), n(this, te, this.vertical ? fe(t(this, f)) : me(t(this, f))), n(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, z, ke.parse(
|
|
240
241
|
getComputedStyle(t(this, f)).rowGap
|
|
241
|
-
)) : n(this, z,
|
|
242
|
+
)) : n(this, z, ke.parse(
|
|
242
243
|
getComputedStyle(t(this, f)).columnGap
|
|
243
|
-
)), t(this,
|
|
244
|
-
const r = t(this,
|
|
244
|
+
)), t(this, M).current && t(this, l).length) {
|
|
245
|
+
const r = t(this, V).current, d = (t(this, y) - t(this, z) * (r - 1)) / r;
|
|
245
246
|
t(this, l).forEach((m) => {
|
|
246
247
|
m.setSize(d);
|
|
247
248
|
});
|
|
@@ -251,22 +252,22 @@ class Jt extends HTMLElement {
|
|
|
251
252
|
});
|
|
252
253
|
if (t(this, l).forEach((r) => {
|
|
253
254
|
r.resize();
|
|
254
|
-
}), t(this,
|
|
255
|
-
n(this, S, t(this,
|
|
256
|
-
const r = t(this, S) + t(this,
|
|
255
|
+
}), t(this, N).current) {
|
|
256
|
+
n(this, S, t(this, y) * t(this, N).current);
|
|
257
|
+
const r = t(this, S) + t(this, y);
|
|
257
258
|
this.vertical ? (t(this, f).style.width = r + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = r + "px", t(this, f).style.width = "100%");
|
|
258
259
|
} else
|
|
259
|
-
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this,
|
|
260
|
-
if (!t(this,
|
|
260
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", n(this, S, t(this, f).offsetWidth - t(this, y)));
|
|
261
|
+
if (!t(this, v).current) {
|
|
261
262
|
const r = getComputedStyle(this), d = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
262
263
|
n(this, S, t(this, S) + d), t(this, u).max = t(this, S);
|
|
263
264
|
}
|
|
264
|
-
if (t(this,
|
|
265
|
-
const r = t(this, l)[t(this, l).length - 1], d = r.position + r.size - t(this,
|
|
266
|
-
n(this,
|
|
265
|
+
if (t(this, v).current && t(this, l).length) {
|
|
266
|
+
const r = t(this, l)[t(this, l).length - 1], d = r.position + r.size - t(this, y), m = t(this, S) - d;
|
|
267
|
+
n(this, at, r.position + r.size + m);
|
|
267
268
|
} else
|
|
268
|
-
n(this,
|
|
269
|
-
if (t(this,
|
|
269
|
+
n(this, at, t(this, S));
|
|
270
|
+
if (t(this, T).current && t(this, l).length) {
|
|
270
271
|
const r = t(this, l)[i];
|
|
271
272
|
t(this, u).set(r.position, {
|
|
272
273
|
equalize: !0
|
|
@@ -275,16 +276,16 @@ class Jt extends HTMLElement {
|
|
|
275
276
|
t(this, u).set(e * t(this, S), {
|
|
276
277
|
equalize: !0
|
|
277
278
|
});
|
|
278
|
-
n(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this,
|
|
279
|
+
n(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, ae).call(this) : c(this, o, ce).call(this), t(this, Ht).call(this);
|
|
279
280
|
});
|
|
280
|
-
s(this,
|
|
281
|
-
if (!t(this, U) || t(this,
|
|
281
|
+
s(this, Ht, () => {
|
|
282
|
+
if (!t(this, U) || t(this, K) || t(this, G))
|
|
282
283
|
return;
|
|
283
284
|
const e = this.currentScrollValue;
|
|
284
|
-
if (n(this,
|
|
285
|
+
if (n(this, Mt, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
285
286
|
for (let i = 0; i < t(this, l).length; i++)
|
|
286
287
|
t(this, l)[i].transform();
|
|
287
|
-
t(this, E).current = c(this, o,
|
|
288
|
+
t(this, E).current = c(this, o, ue).call(this);
|
|
288
289
|
} else
|
|
289
290
|
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
290
291
|
St.update(
|
|
@@ -293,50 +294,52 @@ class Jt extends HTMLElement {
|
|
|
293
294
|
e
|
|
294
295
|
);
|
|
295
296
|
});
|
|
296
|
-
s(this,
|
|
297
|
-
t(this, vt).current && (c(this, o,
|
|
297
|
+
s(this, Bt, (e, i) => {
|
|
298
|
+
t(this, vt).current && (c(this, o, ye).call(this, Math.sign(i) || 1), t(this, ee).call(this, e, i));
|
|
298
299
|
});
|
|
299
|
-
s(this,
|
|
300
|
-
if (t(this,
|
|
301
|
-
if (t(this,
|
|
300
|
+
s(this, ee, (e, i) => {
|
|
301
|
+
if (t(this, $).current) {
|
|
302
|
+
if (t(this, $).current < 0 && i > 0)
|
|
302
303
|
return;
|
|
303
|
-
if (t(this,
|
|
304
|
+
if (t(this, $).current > 0 && i < 0)
|
|
304
305
|
return;
|
|
305
306
|
}
|
|
306
|
-
if (t(this, ut) || t(this,
|
|
307
|
-
const r = t(this, l)[c(this, o,
|
|
307
|
+
if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, A).current && t(this, nt).current && (clearInterval(t(this, Vt)), n(this, Vt, setTimeout(() => {
|
|
308
|
+
const r = t(this, l)[c(this, o, ue).call(this)];
|
|
308
309
|
r && this.scrollToSection(r.index, {
|
|
309
310
|
tween: {
|
|
310
311
|
duration: t(this, Lt).current,
|
|
311
|
-
easing:
|
|
312
|
+
easing: Be
|
|
312
313
|
}
|
|
313
314
|
});
|
|
314
|
-
}, t(this,
|
|
315
|
-
if (t(this,
|
|
315
|
+
}, t(this, nt).current))), !(e.includes("drag") && !_e.isTouch && !t(this, Pt).current)) {
|
|
316
|
+
if (t(this, T).current && e !== "drag") {
|
|
316
317
|
const r = Math.sign(i);
|
|
317
318
|
if (t(this, l).length) {
|
|
318
319
|
const d = {
|
|
319
|
-
tween: t(this,
|
|
320
|
-
easing: t(this,
|
|
321
|
-
duration: t(this,
|
|
320
|
+
tween: t(this, tt).current || t(this, et).current ? {
|
|
321
|
+
easing: t(this, tt).current || "easeInOutCubic",
|
|
322
|
+
duration: t(this, et).current || 500
|
|
322
323
|
} : void 0
|
|
323
324
|
};
|
|
324
|
-
t(this,
|
|
325
|
+
t(this, Ot) ? this.scrollToSection(t(this, E).current, d) : this.shiftSections(r, d);
|
|
325
326
|
} else
|
|
326
|
-
t(this, u).shift(r * t(this,
|
|
327
|
+
t(this, u).shift(r * t(this, y));
|
|
327
328
|
} else
|
|
328
329
|
t(this, u).shift(i);
|
|
329
|
-
n(this,
|
|
330
|
+
n(this, Ot, e === "drag");
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
|
-
s(this,
|
|
333
|
-
n(this, P, !0), this.hibernatedCSSProperty.current || c(this, o,
|
|
333
|
+
s(this, se, () => {
|
|
334
|
+
n(this, P, !0), this.hibernatedCSSProperty.current || c(this, o, ve).call(this);
|
|
334
335
|
});
|
|
335
|
-
if (
|
|
336
|
+
if (W) {
|
|
336
337
|
const e = this.attachShadow({ mode: "open" });
|
|
337
|
-
e.adoptedStyleSheets = [
|
|
338
|
+
e.adoptedStyleSheets = [Xe];
|
|
338
339
|
const i = document.createElement("div");
|
|
339
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this,
|
|
340
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", n(this, f, document.createElement("div")), t(this, f).className = "content", n(this, Dt, document.createElement("slot")), t(this, f).appendChild(t(this, Dt)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), n(this, Rt, new MutationObserver((r) => {
|
|
341
|
+
!t(this, K) && (t(this, v).current || t(this, D).current || t(this, v).current || t(this, M).current || t(this, T).current) && c(this, o, zt).call(this);
|
|
342
|
+
}));
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
345
|
get damped() {
|
|
@@ -349,40 +352,40 @@ class Jt extends HTMLElement {
|
|
|
349
352
|
return t(this, x);
|
|
350
353
|
}
|
|
351
354
|
get reverseCSSProperty() {
|
|
352
|
-
return t(this,
|
|
355
|
+
return t(this, Y);
|
|
353
356
|
}
|
|
354
357
|
get directionCSSProperty() {
|
|
355
|
-
return t(this,
|
|
358
|
+
return t(this, $);
|
|
356
359
|
}
|
|
357
360
|
get pagesCSSProperty() {
|
|
358
|
-
return t(this,
|
|
361
|
+
return t(this, N);
|
|
359
362
|
}
|
|
360
363
|
get splitCSSProperty() {
|
|
361
|
-
return t(this,
|
|
364
|
+
return t(this, D);
|
|
362
365
|
}
|
|
363
366
|
get sectionalCSSProperty() {
|
|
364
|
-
return t(this,
|
|
367
|
+
return t(this, T);
|
|
365
368
|
}
|
|
366
369
|
get easingCSSProperty() {
|
|
367
|
-
return t(this,
|
|
370
|
+
return t(this, tt);
|
|
368
371
|
}
|
|
369
372
|
get durationCSSProperty() {
|
|
370
|
-
return t(this,
|
|
373
|
+
return t(this, et);
|
|
371
374
|
}
|
|
372
375
|
get autoSizeCSSProperty() {
|
|
373
|
-
return t(this,
|
|
376
|
+
return t(this, M);
|
|
374
377
|
}
|
|
375
378
|
get wheelMaxDeltaCSSProperty() {
|
|
376
|
-
return t(this,
|
|
379
|
+
return t(this, st);
|
|
377
380
|
}
|
|
378
381
|
get dragInertionCSSProperty() {
|
|
379
382
|
return t(this, yt);
|
|
380
383
|
}
|
|
381
384
|
get sectionsInViewCSSProperty() {
|
|
382
|
-
return t(this,
|
|
385
|
+
return t(this, V);
|
|
383
386
|
}
|
|
384
387
|
get loopCSSProperty() {
|
|
385
|
-
return t(this,
|
|
388
|
+
return t(this, v);
|
|
386
389
|
}
|
|
387
390
|
get dampingCSSProperty() {
|
|
388
391
|
return t(this, Ct);
|
|
@@ -397,46 +400,46 @@ class Jt extends HTMLElement {
|
|
|
397
400
|
return t(this, Pt);
|
|
398
401
|
}
|
|
399
402
|
get sectionDistanceScaleCSSProperty() {
|
|
400
|
-
return t(this,
|
|
403
|
+
return t(this, At);
|
|
401
404
|
}
|
|
402
405
|
get autoplayCSSProperty() {
|
|
403
|
-
return t(this,
|
|
406
|
+
return t(this, A);
|
|
404
407
|
}
|
|
405
408
|
get autoplayPauseDurationCSSProperty() {
|
|
406
409
|
return t(this, xt);
|
|
407
410
|
}
|
|
408
411
|
get autoplayUserDirectionCSSProperty() {
|
|
409
|
-
return t(this,
|
|
412
|
+
return t(this, it);
|
|
410
413
|
}
|
|
411
414
|
get classesCSSProperty() {
|
|
412
|
-
return t(this,
|
|
415
|
+
return t(this, O);
|
|
413
416
|
}
|
|
414
417
|
get currentIndexStartOffsetCSSProperty() {
|
|
415
|
-
return t(this,
|
|
418
|
+
return t(this, rt);
|
|
416
419
|
}
|
|
417
420
|
get currentIndexEndOffsetCSSProperty() {
|
|
418
421
|
return t(this, q);
|
|
419
422
|
}
|
|
420
423
|
get focusDelayCSSProperty() {
|
|
421
|
-
return t(this,
|
|
424
|
+
return t(this, nt);
|
|
422
425
|
}
|
|
423
426
|
get focusDurationCSSProperty() {
|
|
424
427
|
return t(this, Lt);
|
|
425
428
|
}
|
|
426
429
|
get disabledCSSProperty() {
|
|
427
|
-
return t(this,
|
|
430
|
+
return t(this, ht);
|
|
428
431
|
}
|
|
429
432
|
get hibernatedCSSProperty() {
|
|
430
|
-
return t(this,
|
|
433
|
+
return t(this, ot);
|
|
431
434
|
}
|
|
432
435
|
get currentScrollValue() {
|
|
433
|
-
return c(this, o,
|
|
436
|
+
return c(this, o, Ce).call(this, "current");
|
|
434
437
|
}
|
|
435
438
|
get targetScrollValue() {
|
|
436
|
-
return c(this, o,
|
|
439
|
+
return c(this, o, Ce).call(this, "target");
|
|
437
440
|
}
|
|
438
441
|
get contentWrapperElement() {
|
|
439
|
-
return t(this,
|
|
442
|
+
return t(this, lt);
|
|
440
443
|
}
|
|
441
444
|
get contentElement() {
|
|
442
445
|
return t(this, f);
|
|
@@ -445,13 +448,13 @@ class Jt extends HTMLElement {
|
|
|
445
448
|
return t(this, l);
|
|
446
449
|
}
|
|
447
450
|
get position() {
|
|
448
|
-
return t(this,
|
|
451
|
+
return t(this, Yt);
|
|
449
452
|
}
|
|
450
453
|
get contentPosition() {
|
|
451
|
-
return t(this,
|
|
454
|
+
return t(this, te);
|
|
452
455
|
}
|
|
453
456
|
get viewportSize() {
|
|
454
|
-
return t(this,
|
|
457
|
+
return t(this, y);
|
|
455
458
|
}
|
|
456
459
|
get scrollSize() {
|
|
457
460
|
return t(this, S);
|
|
@@ -464,23 +467,23 @@ class Jt extends HTMLElement {
|
|
|
464
467
|
}
|
|
465
468
|
get limit() {
|
|
466
469
|
return Math.ceil(
|
|
467
|
-
t(this, l).length - t(this,
|
|
470
|
+
t(this, l).length - t(this, V).current
|
|
468
471
|
);
|
|
469
472
|
}
|
|
470
473
|
get distance() {
|
|
471
|
-
return t(this,
|
|
474
|
+
return t(this, at);
|
|
472
475
|
}
|
|
473
476
|
get loopDistance() {
|
|
474
|
-
return t(this,
|
|
477
|
+
return t(this, v).current ? t(this, at) + t(this, z) : t(this, at);
|
|
475
478
|
}
|
|
476
479
|
get hasOverflow() {
|
|
477
480
|
return t(this, U);
|
|
478
481
|
}
|
|
479
482
|
get overscroll() {
|
|
480
|
-
return t(this,
|
|
483
|
+
return t(this, Mt);
|
|
481
484
|
}
|
|
482
485
|
get scrollLine() {
|
|
483
|
-
return t(this,
|
|
486
|
+
return t(this, B);
|
|
484
487
|
}
|
|
485
488
|
get vertical() {
|
|
486
489
|
return t(this, x).current === "y";
|
|
@@ -518,18 +521,18 @@ class Jt extends HTMLElement {
|
|
|
518
521
|
scrollToSection(e, i) {
|
|
519
522
|
if (!t(this, l).length)
|
|
520
523
|
return;
|
|
521
|
-
const r = t(this, E).current, d = c(this, o,
|
|
524
|
+
const r = t(this, E).current, d = c(this, o, Ae).call(this, e), m = t(this, l)[r], C = t(this, l)[d];
|
|
522
525
|
if (m && C) {
|
|
523
526
|
let I = 0;
|
|
524
|
-
const
|
|
525
|
-
t(this,
|
|
527
|
+
const de = c(this, o, ue).call(this), jt = t(this, l)[de], Me = jt ? this.targetScrollValue - jt.position : 0;
|
|
528
|
+
t(this, v).current ? d === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, y) - m.position + t(this, z) : d === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, y) + t(this, z)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - Me, i);
|
|
526
529
|
}
|
|
527
530
|
}
|
|
528
531
|
shiftSections(e, i) {
|
|
529
532
|
t(this, l).length && this.scrollToSection(t(this, E).current + e, i);
|
|
530
533
|
}
|
|
531
534
|
setPosition(e, i) {
|
|
532
|
-
c(this, o,
|
|
535
|
+
c(this, o, ye).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, _).set(t(this, u).current, { equalize: !0 }), t(this, _).set(e, Le({}, i.tween)), n(this, ut, setTimeout(() => {
|
|
533
536
|
n(this, ut, void 0);
|
|
534
537
|
}, i.tween.duration || 0))) : t(this, u).set(e, {
|
|
535
538
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
@@ -539,117 +542,117 @@ class Jt extends HTMLElement {
|
|
|
539
542
|
this.setPosition(t(this, u).target + e, i);
|
|
540
543
|
}
|
|
541
544
|
connectedCallback() {
|
|
542
|
-
St.register(this), n(this, u, new
|
|
545
|
+
St.register(this), n(this, u, new $e(0, {
|
|
543
546
|
damping: 0.01,
|
|
544
547
|
min: 0,
|
|
545
|
-
order:
|
|
546
|
-
})), this.setAttribute("tabindex", "0"), n(this,
|
|
548
|
+
order: Fe.SCROLL
|
|
549
|
+
})), this.setAttribute("tabindex", "0"), n(this, R, new qe({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, Bt)), n(this, ct, new Ue({
|
|
547
550
|
element: this
|
|
548
|
-
})), t(this,
|
|
549
|
-
t(this,
|
|
550
|
-
), n(this,
|
|
551
|
+
})), t(this, ct).changeEvent.subscribe(
|
|
552
|
+
t(this, Bt)
|
|
553
|
+
), n(this, H, new Ge({ element: t(this, f) })), t(this, H).changeEvent.subscribe(t(this, Bt)), n(this, w, new Ke({
|
|
551
554
|
culling: this
|
|
552
|
-
})), t(this, w).changeEvent.subscribe(t(this,
|
|
553
|
-
c(this, o,
|
|
554
|
-
}), t(this,
|
|
555
|
-
c(this, o,
|
|
556
|
-
}), t(this,
|
|
557
|
-
t(this,
|
|
555
|
+
})), t(this, w).changeEvent.subscribe(t(this, ee)), t(this, x).subscribe(() => {
|
|
556
|
+
c(this, o, Se).call(this);
|
|
557
|
+
}), t(this, Y).subscribe(() => {
|
|
558
|
+
c(this, o, Se).call(this);
|
|
559
|
+
}), t(this, st).subscribe((e) => {
|
|
560
|
+
t(this, R).axis = e.current ? "max" : t(this, x).current;
|
|
558
561
|
}), t(this, yt).subscribe((e) => {
|
|
559
|
-
t(this,
|
|
560
|
-
}), t(this,
|
|
562
|
+
t(this, H).inertion = typeof e.current == "number" ? e.current : 1;
|
|
563
|
+
}), t(this, N).subscribe(() => {
|
|
561
564
|
t(this, P) && t(this, L).call(this);
|
|
562
|
-
}), t(this,
|
|
563
|
-
t(this, P) && (e ? c(this, o,
|
|
564
|
-
}), t(this,
|
|
565
|
-
t(this,
|
|
566
|
-
}), t(this,
|
|
567
|
-
t(this, P) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o,
|
|
568
|
-
}), t(this,
|
|
565
|
+
}), t(this, D).subscribe(({ current: e }) => {
|
|
566
|
+
t(this, P) && (e ? c(this, o, zt).call(this) : c(this, o, It).call(this));
|
|
567
|
+
}), t(this, T).subscribe((e) => {
|
|
568
|
+
t(this, R).debounce = e.current, t(this, H).swipe = e.current, t(this, w).interval = e.current, t(this, P) && (e.current && !e.previous && !t(this, l).length ? c(this, o, zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, It).call(this));
|
|
569
|
+
}), t(this, M).subscribe((e) => {
|
|
570
|
+
t(this, P) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, It).call(this));
|
|
571
|
+
}), t(this, V).subscribe((e) => {
|
|
569
572
|
t(this, P) && (t(this, L).call(this), c(this, o, bt).call(this));
|
|
570
|
-
}), t(this,
|
|
571
|
-
e.current ? (t(this, P) && (t(this, l).length || (t(this,
|
|
573
|
+
}), t(this, v).subscribe((e) => {
|
|
574
|
+
e.current ? (t(this, P) && (t(this, l).length || (t(this, D).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (n(this, Mt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
572
575
|
}), t(this, Ct).subscribe((e) => {
|
|
573
576
|
t(this, u).damping = e.current;
|
|
574
577
|
}), t(this, wt).subscribe((e) => {
|
|
575
578
|
t(this, u).mass = e.current;
|
|
576
579
|
}), t(this, Et).subscribe((e) => {
|
|
577
580
|
t(this, u).stiffness = e.current;
|
|
578
|
-
}), t(this,
|
|
581
|
+
}), t(this, A).subscribe((e) => {
|
|
579
582
|
t(this, w).speed = e.current, !t(this, G) && e.current && !e.previous ? t(this, w).connect() : !e.current && e.previous && t(this, w).disconnect();
|
|
580
|
-
}), t(this,
|
|
583
|
+
}), t(this, it).subscribe((e) => {
|
|
581
584
|
e.current || (t(this, w).direction = 1);
|
|
582
|
-
}), t(this,
|
|
585
|
+
}), t(this, O).subscribe((e) => {
|
|
583
586
|
t(this, P) && c(this, o, bt).call(this);
|
|
584
|
-
}), t(this,
|
|
585
|
-
t(this, P) && t(this,
|
|
587
|
+
}), t(this, rt).subscribe((e) => {
|
|
588
|
+
t(this, P) && t(this, O).current && c(this, o, bt).call(this);
|
|
586
589
|
}), t(this, q).subscribe((e) => {
|
|
587
|
-
t(this, P) && t(this,
|
|
590
|
+
t(this, P) && t(this, O).current && c(this, o, bt).call(this);
|
|
588
591
|
}), t(this, u).isRunning.subscribe((e) => {
|
|
589
592
|
this.classList.toggle("active", e.current);
|
|
590
593
|
}), t(this, E).subscribe((e) => {
|
|
591
594
|
t(this, l).length && c(this, o, bt).call(this);
|
|
592
|
-
}), t(this,
|
|
593
|
-
t(this,
|
|
594
|
-
}), t(this, nt).subscribe((e) => {
|
|
595
|
-
e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, le).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, ce).call(this));
|
|
595
|
+
}), t(this, _).subscribe((e) => {
|
|
596
|
+
t(this, _).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
|
|
596
597
|
}), t(this, ht).subscribe((e) => {
|
|
597
|
-
e.current && !e.previous ? (this.classList.add("
|
|
598
|
-
}), t(this,
|
|
598
|
+
e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, ce).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, ae).call(this));
|
|
599
|
+
}), t(this, ot).subscribe((e) => {
|
|
600
|
+
e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, ge).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, ve).call(this));
|
|
601
|
+
}), t(this, vt).observe(), t(this, x).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, N).observe(), t(this, D).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, M).observe(), t(this, st).observe(), t(this, yt).observe(), t(this, V).observe(), t(this, v).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, At).observe(), t(this, A).observe(), t(this, A).observe(), t(this, xt).observe(), t(this, it).observe(), t(this, O).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, Lt).observe(), t(this, ht).observe(), t(this, ot).observe(), Tt.subscribe(t(this, se), be.LAST), t(this, Rt).observe(this, { childList: !0 });
|
|
599
602
|
}
|
|
600
603
|
disconnectedCallback() {
|
|
601
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, x).unobserve(), t(this,
|
|
604
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, x).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, N).unobserve(), t(this, D).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, M).unobserve(), t(this, st).unobserve(), t(this, yt).unobserve(), t(this, V).unobserve(), t(this, v).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, At).unobserve(), t(this, A).unobserve(), t(this, xt).unobserve(), t(this, it).unobserve(), t(this, O).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, Lt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), Tt.unsubscribe(t(this, se)), c(this, o, ge).call(this), t(this, Rt).disconnect();
|
|
602
605
|
}
|
|
603
606
|
}
|
|
604
|
-
u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(),
|
|
605
|
-
const e = t(this, x).current, i = t(this,
|
|
606
|
-
t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this,
|
|
607
|
-
},
|
|
608
|
-
c(this, o,
|
|
609
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
610
|
-
}), t(this, f).style.transform = "",
|
|
607
|
+
u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), N = new WeakMap(), D = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), M = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), V = new WeakMap(), v = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), A = new WeakMap(), xt = new WeakMap(), it = new WeakMap(), O = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Dt = new WeakMap(), l = new WeakMap(), Yt = new WeakMap(), te = new WeakMap(), y = new WeakMap(), S = new WeakMap(), z = new WeakMap(), R = new WeakMap(), ct = new WeakMap(), H = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Mt = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Vt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Ot = new WeakMap(), B = new WeakMap(), P = new WeakMap(), Rt = new WeakMap(), o = new WeakSet(), Se = function() {
|
|
608
|
+
const e = t(this, x).current, i = t(this, Y).current ? "-reverse" : "";
|
|
609
|
+
t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, R).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, H).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, P) && t(this, L).call(this);
|
|
610
|
+
}, zt = function() {
|
|
611
|
+
c(this, o, It).call(this), t(this, Dt).assignedElements().forEach((e, i) => {
|
|
612
|
+
e instanceof HTMLElement && t(this, l).push(new Qe(e, i, this));
|
|
613
|
+
}), t(this, f).style.transform = "", le(this, "scrollSectionsChange", {
|
|
611
614
|
custom: !0,
|
|
612
615
|
composed: !0
|
|
613
616
|
}), t(this, L).call(this), c(this, o, bt).call(this);
|
|
614
|
-
},
|
|
617
|
+
}, It = function() {
|
|
615
618
|
t(this, l).forEach((e) => {
|
|
616
619
|
e.destroy();
|
|
617
|
-
}), n(this, l, []), t(this, E).reset(), t(this, u).reset(),
|
|
620
|
+
}), n(this, l, []), t(this, E).reset(), t(this, u).reset(), le(this, "scrollSectionsChange", {
|
|
618
621
|
custom: !0,
|
|
619
622
|
composed: !0
|
|
620
623
|
});
|
|
621
|
-
},
|
|
622
|
-
t(this, G) || (n(this, G, !0), t(this, u).unsubscribe(t(this,
|
|
624
|
+
}, ce = function() {
|
|
625
|
+
t(this, G) || (n(this, G, !0), t(this, u).unsubscribe(t(this, Ht)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Vt)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, R).disconnect(), t(this, ct).disconnect(), t(this, H).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
|
|
623
626
|
e.unsetTransform();
|
|
624
627
|
}), t(this, L).call(this)));
|
|
625
|
-
},
|
|
626
|
-
t(this, G) && (n(this, G, !1), t(this, u).subscribe(t(this,
|
|
627
|
-
}, Se = function() {
|
|
628
|
-
t(this, at) || (n(this, at, !0), It.unsubscribe(t(this, L)), jt.unsubscribe(t(this, L)), c(this, o, le).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, zt).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
|
|
628
|
+
}, ae = function() {
|
|
629
|
+
t(this, G) && (n(this, G, !1), t(this, u).subscribe(t(this, Ht)), t(this, R).connect(), t(this, ct).connect(), t(this, H).connect(), t(this, A).current && t(this, w).connect());
|
|
629
630
|
}, ge = function() {
|
|
630
|
-
t(this,
|
|
631
|
-
},
|
|
631
|
+
t(this, K) || (n(this, K, !0), Tt.unsubscribe(t(this, L)), Jt.unsubscribe(t(this, L)), c(this, o, ce).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, It).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
|
|
632
|
+
}, ve = function() {
|
|
633
|
+
t(this, K) && (n(this, K, !1), St.register(this), (t(this, v).current || t(this, D).current || t(this, v).current || t(this, M).current || t(this, T).current) && c(this, o, zt).call(this), c(this, o, ae).call(this), Tt.subscribe(t(this, L), be.SCROLL), Jt.subscribe(this, t(this, L)));
|
|
634
|
+
}, L = new WeakMap(), Ht = new WeakMap(), Ae = function(e) {
|
|
632
635
|
let i = t(this, E).current;
|
|
633
|
-
return t(this,
|
|
634
|
-
},
|
|
635
|
-
t(this,
|
|
636
|
+
return t(this, v).current ? i = We(e, t(this, l).length) : i = Ie(e, 0, this.limit), i;
|
|
637
|
+
}, Bt = new WeakMap(), ee = new WeakMap(), ye = function(e = 1) {
|
|
638
|
+
t(this, it).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
|
|
636
639
|
t(this, xt).current,
|
|
637
640
|
this.sectionalCSSProperty.current
|
|
638
641
|
);
|
|
639
|
-
},
|
|
640
|
-
if (t(this,
|
|
641
|
-
const i = t(this, u)[e] % (t(this, S) + t(this,
|
|
642
|
-
return i < 0 ? t(this, S) + i + t(this,
|
|
642
|
+
}, Ce = function(e = "current") {
|
|
643
|
+
if (t(this, v).current && t(this, l).length) {
|
|
644
|
+
const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, z));
|
|
645
|
+
return i < 0 ? t(this, S) + i + t(this, y) + t(this, z) : i;
|
|
643
646
|
} else
|
|
644
647
|
return t(this, u)[e];
|
|
645
648
|
}, bt = function() {
|
|
646
649
|
if (t(this, l).length) {
|
|
647
|
-
const e = t(this, E).current + t(this,
|
|
648
|
-
if (e === 0 ? n(this,
|
|
649
|
-
detail: { line: t(this,
|
|
650
|
-
}), t(this,
|
|
651
|
-
this.classList.remove("end", "start"), t(this,
|
|
652
|
-
const i = t(this,
|
|
650
|
+
const e = t(this, E).current + t(this, rt).current;
|
|
651
|
+
if (e === 0 ? n(this, B, "start") : e === this.limit ? n(this, B, "end") : n(this, B, null), le(this, "scrollLine", {
|
|
652
|
+
detail: { line: t(this, B) }
|
|
653
|
+
}), t(this, O).current) {
|
|
654
|
+
this.classList.remove("end", "start"), t(this, B) && this.classList.add(t(this, B));
|
|
655
|
+
const i = t(this, V).current + t(this, q).current;
|
|
653
656
|
t(this, l).forEach((r, d) => {
|
|
654
657
|
const m = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
|
|
655
658
|
d >= e && d < C || d <= m ? r.mark("current") : d >= C && d < C + I / 2 || d <= m + i ? r.mark("next") : r.mark("previous");
|
|
@@ -657,70 +660,70 @@ u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), X = new WeakMap(), W =
|
|
|
657
660
|
}
|
|
658
661
|
}
|
|
659
662
|
}, // TODO: Учитывать loop
|
|
660
|
-
|
|
663
|
+
ue = function() {
|
|
661
664
|
let e = this.targetScrollValue, i = 1 / 0, r = 0;
|
|
662
665
|
const d = t(this, u).direction;
|
|
663
666
|
for (let m = 0; m < t(this, l).length; m++) {
|
|
664
667
|
const C = t(this, l)[m];
|
|
665
|
-
let I = t(this,
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
+
let I = t(this, Ot) ? C.size * d * -1 * 0.4 : 0, de = C.position;
|
|
669
|
+
const jt = Math.abs(de + I - e);
|
|
670
|
+
jt < i && (i = jt, r = m);
|
|
668
671
|
}
|
|
669
672
|
return r;
|
|
670
|
-
},
|
|
671
|
-
|
|
672
|
-
var
|
|
673
|
-
class
|
|
673
|
+
}, se = new WeakMap();
|
|
674
|
+
W && !customElements.get("e-scroll") && customElements.define("e-scroll", Qt);
|
|
675
|
+
var ie;
|
|
676
|
+
class we extends HTMLElement {
|
|
674
677
|
constructor() {
|
|
675
678
|
super(...arguments);
|
|
676
|
-
s(this,
|
|
679
|
+
s(this, ie, null);
|
|
677
680
|
}
|
|
678
681
|
get scrollElement() {
|
|
679
|
-
return t(this,
|
|
682
|
+
return t(this, ie);
|
|
680
683
|
}
|
|
681
684
|
connectedCallback() {
|
|
682
|
-
const e =
|
|
683
|
-
e instanceof
|
|
685
|
+
const e = Te(this, Qt);
|
|
686
|
+
e instanceof Qt ? n(this, ie, e) : console.error(this, "e-scroll not found");
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
|
|
687
|
-
var dt, k,
|
|
688
|
-
class
|
|
689
|
+
ie = new WeakMap();
|
|
690
|
+
var dt, k, Z, j, Wt, Ft, pt, $t, re, ne;
|
|
691
|
+
class Ye extends we {
|
|
689
692
|
constructor() {
|
|
690
693
|
super();
|
|
691
694
|
s(this, dt, null);
|
|
692
695
|
s(this, k, null);
|
|
693
|
-
s(this,
|
|
694
|
-
s(this,
|
|
695
|
-
s(this,
|
|
696
|
-
s(this,
|
|
696
|
+
s(this, Z, !1);
|
|
697
|
+
s(this, j, 0);
|
|
698
|
+
s(this, Wt, 0);
|
|
699
|
+
s(this, Ft, 0);
|
|
697
700
|
s(this, pt, () => {
|
|
698
|
-
n(this,
|
|
699
|
-
const e = t(this,
|
|
700
|
-
n(this,
|
|
701
|
+
n(this, Z, this.offsetWidth > this.offsetHeight);
|
|
702
|
+
const e = t(this, Z) ? this.offsetWidth : this.offsetHeight;
|
|
703
|
+
n(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, k).style.width = t(this, j) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, j) + "px"), n(this, Wt, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, $t).call(this);
|
|
701
704
|
});
|
|
702
|
-
s(this,
|
|
703
|
-
n(this,
|
|
705
|
+
s(this, $t, () => {
|
|
706
|
+
n(this, Ft, this.scrollElement.currentProgress * t(this, Wt)), t(this, Z) ? t(this, k).style.transform = `translate3d(${t(this, Ft)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Ft)}px, 0px)`;
|
|
704
707
|
});
|
|
705
|
-
s(this,
|
|
708
|
+
s(this, re, () => {
|
|
706
709
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
707
710
|
});
|
|
708
|
-
s(this,
|
|
709
|
-
document.documentElement.classList.add("grabbing"),
|
|
711
|
+
s(this, ne, (e) => {
|
|
712
|
+
document.documentElement.classList.add("grabbing"), Ze(
|
|
710
713
|
(d) => {
|
|
711
|
-
const m = t(this,
|
|
714
|
+
const m = t(this, Z) ? d.x : d.y, C = this.scrollElement.distance / t(this, Wt), I = (m - r) * C;
|
|
712
715
|
this.scrollElement.setPosition(i + I);
|
|
713
716
|
},
|
|
714
717
|
() => {
|
|
715
718
|
document.documentElement.classList.remove("grabbing");
|
|
716
719
|
}
|
|
717
720
|
);
|
|
718
|
-
const i = this.scrollElement.damped.target, r = t(this,
|
|
721
|
+
const i = this.scrollElement.damped.target, r = t(this, Z) ? e.x : e.y;
|
|
719
722
|
});
|
|
720
|
-
if (
|
|
723
|
+
if (W) {
|
|
721
724
|
const e = this.attachShadow({ mode: "open" });
|
|
722
725
|
e.adoptedStyleSheets = [
|
|
723
|
-
|
|
726
|
+
ze({
|
|
724
727
|
":host": {
|
|
725
728
|
display: "inline-block",
|
|
726
729
|
zIndex: "1",
|
|
@@ -758,27 +761,27 @@ class Xe extends Ce {
|
|
|
758
761
|
connectedCallback() {
|
|
759
762
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
760
763
|
const e = t(this, dt).assignedElements()[0] || t(this, dt).firstElementChild;
|
|
761
|
-
n(this, k, e), t(this, k).addEventListener("pointerdown", t(this,
|
|
764
|
+
n(this, k, e), t(this, k).addEventListener("pointerdown", t(this, ne)), Tt.subscribe(t(this, pt), be.SCROLL), Jt.subscribe(this, t(this, pt)), Jt.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, $t)), this.scrollElement.axisCSSProperty.subscribe(t(this, re));
|
|
762
765
|
}
|
|
763
766
|
disconnectedCallback() {
|
|
764
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this,
|
|
767
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, ne)), Tt.unsubscribe(t(this, pt)), Jt.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, $t)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, re));
|
|
765
768
|
}
|
|
766
769
|
}
|
|
767
|
-
dt = new WeakMap(), k = new WeakMap(),
|
|
768
|
-
|
|
769
|
-
var
|
|
770
|
-
class
|
|
770
|
+
dt = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Wt = new WeakMap(), Ft = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), re = new WeakMap(), ne = new WeakMap();
|
|
771
|
+
W && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", Ye);
|
|
772
|
+
var Nt, qt, Ut;
|
|
773
|
+
class De extends we {
|
|
771
774
|
constructor() {
|
|
772
775
|
super();
|
|
773
|
-
s(this,
|
|
774
|
-
s(this,
|
|
776
|
+
s(this, Nt, new p(this, "--behaviour", "smooth"));
|
|
777
|
+
s(this, qt, new p(
|
|
775
778
|
this,
|
|
776
779
|
"--tween-easing",
|
|
777
780
|
!1
|
|
778
781
|
));
|
|
779
|
-
s(this,
|
|
780
|
-
|
|
781
|
-
const e = t(this,
|
|
782
|
+
s(this, Ut, new p(this, "--tween-duration", 0));
|
|
783
|
+
W && this.addEventListener("click", () => {
|
|
784
|
+
const e = t(this, Nt).current, i = t(this, qt).current, r = t(this, Ut).current;
|
|
782
785
|
this.handleClick({
|
|
783
786
|
behaviour: e,
|
|
784
787
|
tween: i || r ? { easing: i, duration: r } : void 0
|
|
@@ -786,95 +789,95 @@ class Ae extends Ce {
|
|
|
786
789
|
});
|
|
787
790
|
}
|
|
788
791
|
connectedCallback() {
|
|
789
|
-
super.connectedCallback(), t(this,
|
|
792
|
+
super.connectedCallback(), t(this, Nt).observe(), t(this, qt).observe(), t(this, Ut).observe();
|
|
790
793
|
}
|
|
791
794
|
disconnectedCallback() {
|
|
792
|
-
t(this,
|
|
795
|
+
t(this, Nt).close(), t(this, qt).close(), t(this, Ut).close();
|
|
793
796
|
}
|
|
794
797
|
}
|
|
795
|
-
|
|
796
|
-
var
|
|
797
|
-
class
|
|
798
|
+
Nt = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap();
|
|
799
|
+
var Gt;
|
|
800
|
+
class ts extends De {
|
|
798
801
|
constructor() {
|
|
799
802
|
super(...arguments);
|
|
800
|
-
s(this,
|
|
803
|
+
s(this, Gt, new p(this, "--set", 1));
|
|
801
804
|
}
|
|
802
805
|
handleClick(e) {
|
|
803
|
-
this.scrollElement.scrollToSection(t(this,
|
|
806
|
+
this.scrollElement.scrollToSection(t(this, Gt).current, e);
|
|
804
807
|
}
|
|
805
808
|
connectedCallback() {
|
|
806
|
-
super.connectedCallback(), t(this,
|
|
809
|
+
super.connectedCallback(), t(this, Gt).observe();
|
|
807
810
|
}
|
|
808
811
|
disconnectedCallback() {
|
|
809
|
-
super.disconnectedCallback(), t(this,
|
|
812
|
+
super.disconnectedCallback(), t(this, Gt).close();
|
|
810
813
|
}
|
|
811
814
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
var
|
|
815
|
-
class
|
|
815
|
+
Gt = new WeakMap();
|
|
816
|
+
W && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ts);
|
|
817
|
+
var J, Kt;
|
|
818
|
+
class es extends De {
|
|
816
819
|
constructor() {
|
|
817
820
|
super(...arguments);
|
|
818
|
-
s(this,
|
|
819
|
-
s(this,
|
|
820
|
-
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this,
|
|
821
|
+
s(this, J, new p(this, "--step", 1));
|
|
822
|
+
s(this, Kt, () => {
|
|
823
|
+
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, J).current > 0 && this.scrollElement.scrollLine === "end" || t(this, J).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
821
824
|
});
|
|
822
825
|
}
|
|
823
826
|
handleClick(e) {
|
|
824
|
-
this.scrollElement.shiftSections(t(this,
|
|
827
|
+
this.scrollElement.shiftSections(t(this, J).current, e);
|
|
825
828
|
}
|
|
826
829
|
connectedCallback() {
|
|
827
|
-
super.connectedCallback(), this.scrollElement && (t(this,
|
|
828
|
-
t(this,
|
|
829
|
-
}), t(this,
|
|
830
|
+
super.connectedCallback(), this.scrollElement && (t(this, J).subscribe(() => {
|
|
831
|
+
t(this, Kt).call(this);
|
|
832
|
+
}), t(this, J).observe(), this.scrollElement.addEventListener(
|
|
830
833
|
"scrollLine",
|
|
831
|
-
t(this,
|
|
832
|
-
), t(this,
|
|
834
|
+
t(this, Kt)
|
|
835
|
+
), t(this, Kt).call(this));
|
|
833
836
|
}
|
|
834
837
|
disconnectedCallback() {
|
|
835
|
-
super.disconnectedCallback(), t(this,
|
|
838
|
+
super.disconnectedCallback(), t(this, J).close(), this.removeAttribute("disabled");
|
|
836
839
|
}
|
|
837
840
|
}
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
var
|
|
841
|
-
class
|
|
841
|
+
J = new WeakMap(), Kt = new WeakMap();
|
|
842
|
+
W && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", es);
|
|
843
|
+
var Q, ft, _t, he, oe, Zt;
|
|
844
|
+
class ss {
|
|
842
845
|
constructor(h, e, i) {
|
|
843
|
-
s(this,
|
|
846
|
+
s(this, Q, null);
|
|
844
847
|
s(this, ft, null);
|
|
845
|
-
s(this,
|
|
846
|
-
s(this,
|
|
847
|
-
s(this,
|
|
848
|
-
t(this, ft).scrollToSection(t(this,
|
|
849
|
-
behaviour: t(this,
|
|
848
|
+
s(this, _t, null);
|
|
849
|
+
s(this, he, null);
|
|
850
|
+
s(this, oe, () => {
|
|
851
|
+
t(this, ft).scrollToSection(t(this, _t), {
|
|
852
|
+
behaviour: t(this, he)
|
|
850
853
|
});
|
|
851
854
|
});
|
|
852
|
-
s(this,
|
|
853
|
-
t(this,
|
|
855
|
+
s(this, Zt, () => {
|
|
856
|
+
t(this, Q).classList.toggle(
|
|
854
857
|
"current",
|
|
855
|
-
t(this, ft).counter.current === t(this,
|
|
858
|
+
t(this, ft).counter.current === t(this, _t)
|
|
856
859
|
);
|
|
857
860
|
});
|
|
858
|
-
|
|
861
|
+
W && (n(this, Q, document.createElement("button")), n(this, ft, h), n(this, he, i), n(this, _t, e), t(this, Q).addEventListener("click", t(this, oe)), t(this, ft).counter.subscribe(t(this, Zt)), t(this, Zt).call(this));
|
|
859
862
|
}
|
|
860
863
|
get element() {
|
|
861
|
-
return t(this,
|
|
864
|
+
return t(this, Q);
|
|
862
865
|
}
|
|
863
866
|
destroy() {
|
|
864
|
-
t(this,
|
|
867
|
+
t(this, Q).removeEventListener("click", t(this, oe)), t(this, ft).counter.unsubscribe(t(this, Zt)), t(this, Q).remove();
|
|
865
868
|
}
|
|
866
869
|
}
|
|
867
|
-
|
|
870
|
+
Q = new WeakMap(), ft = new WeakMap(), _t = new WeakMap(), he = new WeakMap(), oe = new WeakMap(), Zt = new WeakMap();
|
|
868
871
|
var mt, kt;
|
|
869
|
-
class
|
|
872
|
+
class is extends we {
|
|
870
873
|
constructor() {
|
|
871
874
|
super(...arguments);
|
|
872
875
|
s(this, mt, []);
|
|
873
|
-
s(this, kt,
|
|
876
|
+
s(this, kt, je(() => {
|
|
874
877
|
t(this, mt).forEach((i) => i.destroy()), n(this, mt, []);
|
|
875
878
|
const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
876
879
|
for (let i = 0; i < e; i++) {
|
|
877
|
-
const r = new
|
|
880
|
+
const r = new ss(
|
|
878
881
|
this.scrollElement,
|
|
879
882
|
i,
|
|
880
883
|
this.getAttribute("behaviour") || "smooth"
|
|
@@ -901,22 +904,22 @@ class ss extends Ce {
|
|
|
901
904
|
}
|
|
902
905
|
}
|
|
903
906
|
mt = new WeakMap(), kt = new WeakMap();
|
|
904
|
-
|
|
905
|
-
class
|
|
907
|
+
W && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", is);
|
|
908
|
+
class rs extends Je {
|
|
906
909
|
connectedCallback() {
|
|
907
|
-
const h =
|
|
908
|
-
h instanceof
|
|
910
|
+
const h = Te(this, Qt);
|
|
911
|
+
h instanceof Qt ? (this.scrollContainer = h, this.scrollContainer.addEventListener(
|
|
909
912
|
"scrollSectionsChange",
|
|
910
913
|
this.findAnotherScrollEntries
|
|
911
914
|
)) : console.error(this, "e-scroll not found");
|
|
912
915
|
}
|
|
913
916
|
}
|
|
914
|
-
|
|
917
|
+
W && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", rs);
|
|
915
918
|
export {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
919
|
+
is as ScrollBulletButtonsElement,
|
|
920
|
+
Qt as ScrollElement,
|
|
921
|
+
rs as ScrollSegmentElement,
|
|
922
|
+
ts as ScrollSetButtonElement,
|
|
923
|
+
es as ScrollStepButtonElement,
|
|
924
|
+
Ye as ScrollbarElement
|
|
922
925
|
};
|