aptechka 0.50.22 → 0.50.23
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 +1 -0
- package/lib/scroll/ScrollSegmentElement.d.ts +1 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +175 -169
- package/lib/scroll-segment/ScrollSegmentElement.d.ts +1 -1
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +72 -73
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var ze = Object.getOwnPropertySymbols;
|
|
3
3
|
var Fe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
4
|
+
var Ie = (u) => {
|
|
5
5
|
throw TypeError(u);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var ke = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Ae = (u, n) => {
|
|
8
8
|
for (var e in n || (n = {}))
|
|
9
|
-
Fe.call(n, e) &&
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
$e.call(n, e) &&
|
|
9
|
+
Fe.call(n, e) && ke(u, e, n[e]);
|
|
10
|
+
if (ze)
|
|
11
|
+
for (var e of ze(n))
|
|
12
|
+
$e.call(n, e) && ke(u, e, n[e]);
|
|
13
13
|
return u;
|
|
14
14
|
};
|
|
15
|
-
var Se = (u, n, e) => n.has(u) ||
|
|
16
|
-
var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ?
|
|
15
|
+
var Se = (u, n, e) => n.has(u) || Ie("Cannot " + e);
|
|
16
|
+
var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ie("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Se(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), c = (u, n, e) => (Se(u, n, "access private method"), e);
|
|
17
17
|
import { S as Ne } from "../Store-D2xCXENW.js";
|
|
18
18
|
import { i as H } from "../index-euf5anj6.js";
|
|
19
19
|
import { a as qe } from "../easings-Bni3YAAW.js";
|
|
20
|
-
import { d as
|
|
20
|
+
import { d as Yt } from "../events-CsVF98U6.js";
|
|
21
21
|
import { c as Te } from "../jss-DtnXPEnq.js";
|
|
22
22
|
import { a as ge, g as ve } from "../layout-DpZo-I0y.js";
|
|
23
23
|
import { c as De } from "../math-BOBiC4TN.js";
|
|
@@ -27,34 +27,34 @@ import { TICK_ORDER as Ge, RESIZE_ORDER as ye } from "../order/index.js";
|
|
|
27
27
|
import { D as Ke } from "../Damped-BXsGpI-B.js";
|
|
28
28
|
import { T as _e } from "../Tweened-BhDWLNF0.js";
|
|
29
29
|
import { WheelControls as Ze, KeyboardControls as je, DragControls as Je, AutoplayControls as Qe } from "../controls/index.js";
|
|
30
|
-
import { windowResizer as
|
|
30
|
+
import { windowResizer as Mt } from "../window-resizer/index.js";
|
|
31
31
|
import { scrollEntries as gt } from "../scroll-entries/index.js";
|
|
32
|
-
import { cssUnitParser as
|
|
32
|
+
import { cssUnitParser as Me } from "../css-unit-parser/index.js";
|
|
33
33
|
import { CSSProperty as p } from "../css-property/index.js";
|
|
34
34
|
import { device as Xe } from "../device/index.js";
|
|
35
|
-
import { elementResizer as
|
|
35
|
+
import { elementResizer as ee } from "../element-resizer/index.js";
|
|
36
36
|
import { s as Ye } from "../gestures-CcXV6fCp.js";
|
|
37
37
|
import { b as Ve } from "../dom-CVWzyXPH.js";
|
|
38
38
|
import { d as ts } from "../function-C10DGppn.js";
|
|
39
39
|
import { ScrollSegmentElement as es } from "../scroll-segment/index.js";
|
|
40
|
-
var m,
|
|
40
|
+
var m, Dt, g, vt, B, X, yt, Vt, de;
|
|
41
41
|
class ss {
|
|
42
42
|
constructor(n, e, i) {
|
|
43
|
-
s(this,
|
|
43
|
+
s(this, Vt);
|
|
44
44
|
s(this, m);
|
|
45
|
-
s(this,
|
|
45
|
+
s(this, Dt);
|
|
46
46
|
s(this, g);
|
|
47
47
|
s(this, vt, 0);
|
|
48
48
|
s(this, B, 0);
|
|
49
49
|
s(this, X, null);
|
|
50
50
|
s(this, yt, 0);
|
|
51
|
-
h(this, m, n), h(this,
|
|
51
|
+
h(this, m, n), h(this, Dt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Dt));
|
|
52
52
|
}
|
|
53
53
|
get element() {
|
|
54
54
|
return t(this, m);
|
|
55
55
|
}
|
|
56
56
|
get index() {
|
|
57
|
-
return t(this,
|
|
57
|
+
return t(this, Dt);
|
|
58
58
|
}
|
|
59
59
|
get size() {
|
|
60
60
|
return t(this, vt);
|
|
@@ -89,7 +89,7 @@ class ss {
|
|
|
89
89
|
h(this, yt, b * -1), t(this, g).vertical ? t(this, m).style.transform = `translate3d(0px, ${t(this, yt)}px, 0px)` : t(this, m).style.transform = `translate3d(${t(this, yt)}px, 0px, 0px)`;
|
|
90
90
|
}
|
|
91
91
|
setMark(n) {
|
|
92
|
-
t(this, X) !== n && (t(this, X) && t(this, m).classList.remove(t(this, X)), n && t(this, m).classList.add(n), h(this, X, n),
|
|
92
|
+
t(this, X) !== n && (t(this, X) && t(this, m).classList.remove(t(this, X)), n && t(this, m).classList.add(n), h(this, X, n), Yt(t(this, m), "scrollSectionMarkChange", {
|
|
93
93
|
composed: !0,
|
|
94
94
|
detail: {
|
|
95
95
|
mark: t(this, X)
|
|
@@ -98,16 +98,16 @@ class ss {
|
|
|
98
98
|
}));
|
|
99
99
|
}
|
|
100
100
|
setIndex(n) {
|
|
101
|
-
c(this,
|
|
101
|
+
c(this, Vt, de).call(this, "--index", n);
|
|
102
102
|
}
|
|
103
103
|
setCurrentIndex(n) {
|
|
104
|
-
c(this,
|
|
104
|
+
c(this, Vt, de).call(this, "--current-index", n);
|
|
105
105
|
}
|
|
106
106
|
setCurrentIndexArc(n) {
|
|
107
|
-
c(this,
|
|
107
|
+
c(this, Vt, de).call(this, "--current-index-arc", n);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
m = new WeakMap(),
|
|
110
|
+
m = new WeakMap(), Dt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Vt = new WeakSet(), de = function(n, e) {
|
|
111
111
|
e !== null ? t(this, m).style.setProperty(n, e.toString()) : t(this, m).style.removeProperty(n);
|
|
112
112
|
};
|
|
113
113
|
const is = Te({
|
|
@@ -148,8 +148,8 @@ const is = Te({
|
|
|
148
148
|
flexShrink: "0"
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt,
|
|
152
|
-
class
|
|
151
|
+
var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt, Rt, A, zt, it, M, rt, q, nt, kt, ht, ot, lt, f, Ot, l, se, ie, v, S, k, V, ct, R, w, E, Ht, at, U, G, K, Bt, ut, _, Wt, O, x, re, dt, o, Ce, te, At, pe, fe, we, Ee, L, Ft, Re, $t, ne, xe, Pe, St, Oe, me, he;
|
|
152
|
+
class Tt extends HTMLElement {
|
|
153
153
|
constructor() {
|
|
154
154
|
super();
|
|
155
155
|
s(this, o);
|
|
@@ -190,13 +190,13 @@ class te extends HTMLElement {
|
|
|
190
190
|
s(this, xt, new p(this, "--mass", 0));
|
|
191
191
|
s(this, Pt, new p(this, "--stiffness", 0));
|
|
192
192
|
s(this, Lt, new p(this, "--mouse-drag", !1));
|
|
193
|
-
s(this,
|
|
193
|
+
s(this, Rt, new p(
|
|
194
194
|
this,
|
|
195
195
|
"--section-distance-scale",
|
|
196
196
|
0.5
|
|
197
197
|
));
|
|
198
|
-
s(this,
|
|
199
|
-
s(this,
|
|
198
|
+
s(this, A, new p(this, "--autoplay", 0));
|
|
199
|
+
s(this, zt, new p(
|
|
200
200
|
this,
|
|
201
201
|
"--autoplay-pause-duration",
|
|
202
202
|
0
|
|
@@ -206,7 +206,7 @@ class te extends HTMLElement {
|
|
|
206
206
|
"--autoplay-user-direction",
|
|
207
207
|
!1
|
|
208
208
|
));
|
|
209
|
-
s(this,
|
|
209
|
+
s(this, M, new p(this, "--classes", !1));
|
|
210
210
|
s(this, rt, new p(
|
|
211
211
|
this,
|
|
212
212
|
"--current-index-start-offset",
|
|
@@ -218,7 +218,7 @@ class te extends HTMLElement {
|
|
|
218
218
|
0
|
|
219
219
|
));
|
|
220
220
|
s(this, nt, new p(this, "--focus-delay", 0));
|
|
221
|
-
s(this,
|
|
221
|
+
s(this, kt, new p(
|
|
222
222
|
this,
|
|
223
223
|
"--focus-duration",
|
|
224
224
|
3e3
|
|
@@ -227,42 +227,42 @@ class te extends HTMLElement {
|
|
|
227
227
|
s(this, ot, new p(this, "--hibernate", !1));
|
|
228
228
|
s(this, lt, null);
|
|
229
229
|
s(this, f, null);
|
|
230
|
-
s(this,
|
|
230
|
+
s(this, Ot, null);
|
|
231
231
|
s(this, l, []);
|
|
232
|
-
s(this, ee, 0);
|
|
233
232
|
s(this, se, 0);
|
|
233
|
+
s(this, ie, 0);
|
|
234
234
|
s(this, v, 0);
|
|
235
235
|
s(this, S, 0);
|
|
236
|
-
s(this,
|
|
236
|
+
s(this, k, 0);
|
|
237
237
|
s(this, V, null);
|
|
238
238
|
s(this, ct, null);
|
|
239
239
|
s(this, R, null);
|
|
240
240
|
s(this, w, null);
|
|
241
241
|
s(this, E, new Ne(0));
|
|
242
|
-
s(this,
|
|
242
|
+
s(this, Ht, 0);
|
|
243
243
|
s(this, at, 0);
|
|
244
244
|
s(this, U, !1);
|
|
245
245
|
s(this, G, !0);
|
|
246
246
|
s(this, K, !0);
|
|
247
|
-
s(this,
|
|
247
|
+
s(this, Bt);
|
|
248
248
|
s(this, ut);
|
|
249
249
|
s(this, _, new _e());
|
|
250
|
-
s(this,
|
|
250
|
+
s(this, Wt, !1);
|
|
251
251
|
s(this, O, null);
|
|
252
252
|
s(this, x, !1);
|
|
253
|
-
s(this,
|
|
253
|
+
s(this, re, null);
|
|
254
254
|
s(this, dt, []);
|
|
255
255
|
s(this, L, () => {
|
|
256
256
|
if (t(this, ot).current)
|
|
257
257
|
return;
|
|
258
258
|
t(this, d).unlistenAnimationFrame();
|
|
259
259
|
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
|
|
260
|
-
if (h(this,
|
|
260
|
+
if (h(this, se, this.vertical ? ge(this) : ve(this)), h(this, ie, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Me.parse(
|
|
261
261
|
getComputedStyle(t(this, f)).rowGap
|
|
262
|
-
)) : h(this,
|
|
262
|
+
)) : h(this, k, Me.parse(
|
|
263
263
|
getComputedStyle(t(this, f)).columnGap
|
|
264
264
|
)), t(this, N).current && t(this, l).length) {
|
|
265
|
-
const r = t(this, D).current, a = (t(this, v) - t(this,
|
|
265
|
+
const r = t(this, D).current, a = (t(this, v) - t(this, k) * (r - 1)) / r;
|
|
266
266
|
t(this, l).forEach((b) => {
|
|
267
267
|
b.setSize(a);
|
|
268
268
|
});
|
|
@@ -296,13 +296,13 @@ class te extends HTMLElement {
|
|
|
296
296
|
t(this, d).set(e * t(this, S), {
|
|
297
297
|
equalize: !0
|
|
298
298
|
});
|
|
299
|
-
h(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, fe).call(this) : c(this, o, pe).call(this), t(this,
|
|
299
|
+
h(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, fe).call(this) : c(this, o, pe).call(this), Yt(this, "scrollResize", { custom: !0 }), t(this, Ft).call(this);
|
|
300
300
|
});
|
|
301
|
-
s(this,
|
|
301
|
+
s(this, Ft, () => {
|
|
302
302
|
if (!t(this, U) || t(this, K) || t(this, G))
|
|
303
303
|
return;
|
|
304
304
|
const e = this.currentScrollValue;
|
|
305
|
-
if (h(this,
|
|
305
|
+
if (h(this, Ht, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
306
306
|
for (let i = 0; i < t(this, l).length; i++)
|
|
307
307
|
t(this, l)[i].transform();
|
|
308
308
|
t(this, E).current = c(this, o, me).call(this);
|
|
@@ -314,21 +314,21 @@ class te extends HTMLElement {
|
|
|
314
314
|
e
|
|
315
315
|
);
|
|
316
316
|
});
|
|
317
|
-
s(this,
|
|
318
|
-
t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this,
|
|
317
|
+
s(this, $t, (e, i) => {
|
|
318
|
+
t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, ne).call(this, e, i));
|
|
319
319
|
});
|
|
320
|
-
s(this,
|
|
320
|
+
s(this, ne, (e, i) => {
|
|
321
321
|
if (t(this, W).current) {
|
|
322
322
|
if (t(this, W).current < 0 && i > 0)
|
|
323
323
|
return;
|
|
324
324
|
if (t(this, W).current > 0 && i < 0)
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this,
|
|
327
|
+
if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, A).current && t(this, nt).current && (clearInterval(t(this, Bt)), h(this, Bt, setTimeout(() => {
|
|
328
328
|
const r = t(this, l)[c(this, o, me).call(this)];
|
|
329
329
|
r && this.scrollToSection(r.index, {
|
|
330
330
|
tween: {
|
|
331
|
-
duration: t(this,
|
|
331
|
+
duration: t(this, kt).current,
|
|
332
332
|
easing: qe
|
|
333
333
|
}
|
|
334
334
|
});
|
|
@@ -342,22 +342,22 @@ class te extends HTMLElement {
|
|
|
342
342
|
duration: t(this, et).current || 500
|
|
343
343
|
} : void 0
|
|
344
344
|
};
|
|
345
|
-
t(this,
|
|
345
|
+
t(this, Wt) ? this.scrollToSection(t(this, E).current, a) : this.shiftSections(r, a);
|
|
346
346
|
} else
|
|
347
347
|
t(this, d).shift(r * t(this, v));
|
|
348
348
|
} else
|
|
349
349
|
t(this, d).shift(i);
|
|
350
|
-
h(this,
|
|
350
|
+
h(this, Wt, e === "drag");
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
|
-
s(this,
|
|
353
|
+
s(this, he, () => {
|
|
354
354
|
h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, Ee).call(this);
|
|
355
355
|
});
|
|
356
356
|
if (H) {
|
|
357
357
|
const e = this.attachShadow({ mode: "open" });
|
|
358
358
|
e.adoptedStyleSheets = [is];
|
|
359
359
|
const i = document.createElement("div");
|
|
360
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this,
|
|
360
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Ot, document.createElement("slot")), t(this, f).appendChild(t(this, Ot)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, re, new MutationObserver((r) => {
|
|
361
361
|
this.tryResplit();
|
|
362
362
|
}));
|
|
363
363
|
}
|
|
@@ -420,19 +420,19 @@ class te extends HTMLElement {
|
|
|
420
420
|
return t(this, Lt);
|
|
421
421
|
}
|
|
422
422
|
get sectionDistanceScaleCSSProperty() {
|
|
423
|
-
return t(this,
|
|
423
|
+
return t(this, Rt);
|
|
424
424
|
}
|
|
425
425
|
get autoplayCSSProperty() {
|
|
426
|
-
return t(this,
|
|
426
|
+
return t(this, A);
|
|
427
427
|
}
|
|
428
428
|
get autoplayPauseDurationCSSProperty() {
|
|
429
|
-
return t(this,
|
|
429
|
+
return t(this, zt);
|
|
430
430
|
}
|
|
431
431
|
get autoplayUserDirectionCSSProperty() {
|
|
432
432
|
return t(this, it);
|
|
433
433
|
}
|
|
434
434
|
get classesCSSProperty() {
|
|
435
|
-
return t(this,
|
|
435
|
+
return t(this, M);
|
|
436
436
|
}
|
|
437
437
|
get currentIndexStartOffsetCSSProperty() {
|
|
438
438
|
return t(this, rt);
|
|
@@ -444,7 +444,7 @@ class te extends HTMLElement {
|
|
|
444
444
|
return t(this, nt);
|
|
445
445
|
}
|
|
446
446
|
get focusDurationCSSProperty() {
|
|
447
|
-
return t(this,
|
|
447
|
+
return t(this, kt);
|
|
448
448
|
}
|
|
449
449
|
get disabledCSSProperty() {
|
|
450
450
|
return t(this, ht);
|
|
@@ -468,10 +468,10 @@ class te extends HTMLElement {
|
|
|
468
468
|
return t(this, l);
|
|
469
469
|
}
|
|
470
470
|
get position() {
|
|
471
|
-
return t(this,
|
|
471
|
+
return t(this, se);
|
|
472
472
|
}
|
|
473
473
|
get contentPosition() {
|
|
474
|
-
return t(this,
|
|
474
|
+
return t(this, ie);
|
|
475
475
|
}
|
|
476
476
|
get viewportSize() {
|
|
477
477
|
return t(this, v);
|
|
@@ -480,7 +480,7 @@ class te extends HTMLElement {
|
|
|
480
480
|
return t(this, S);
|
|
481
481
|
}
|
|
482
482
|
get gap() {
|
|
483
|
-
return t(this,
|
|
483
|
+
return t(this, k);
|
|
484
484
|
}
|
|
485
485
|
get counter() {
|
|
486
486
|
return t(this, E);
|
|
@@ -494,13 +494,13 @@ class te extends HTMLElement {
|
|
|
494
494
|
return t(this, at);
|
|
495
495
|
}
|
|
496
496
|
get loopDistance() {
|
|
497
|
-
return t(this, y).current ? t(this, at) + t(this,
|
|
497
|
+
return t(this, y).current ? t(this, at) + t(this, k) : t(this, at);
|
|
498
498
|
}
|
|
499
499
|
get hasOverflow() {
|
|
500
500
|
return t(this, U);
|
|
501
501
|
}
|
|
502
502
|
get overscroll() {
|
|
503
|
-
return t(this,
|
|
503
|
+
return t(this, Ht);
|
|
504
504
|
}
|
|
505
505
|
get scrollLine() {
|
|
506
506
|
return t(this, O);
|
|
@@ -521,7 +521,7 @@ class te extends HTMLElement {
|
|
|
521
521
|
return t(this, P).current === "x" ? 0 : t(this, d).distance;
|
|
522
522
|
}
|
|
523
523
|
tryResplit() {
|
|
524
|
-
!t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o,
|
|
524
|
+
!t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o, te).call(this);
|
|
525
525
|
}
|
|
526
526
|
onScroll(...e) {
|
|
527
527
|
return t(this, d).subscribe(...e);
|
|
@@ -546,16 +546,16 @@ class te extends HTMLElement {
|
|
|
546
546
|
return;
|
|
547
547
|
const r = t(this, E).current, a = c(this, o, Re).call(this, e), b = t(this, l)[r], C = t(this, l)[a];
|
|
548
548
|
if (b && C) {
|
|
549
|
-
let
|
|
550
|
-
const be = c(this, o, me).call(this),
|
|
551
|
-
t(this, y).current ? a === 0 && r === t(this, l).length - 1 ?
|
|
549
|
+
let I = 0;
|
|
550
|
+
const be = c(this, o, me).call(this), Xt = t(this, l)[be], Be = Xt ? this.targetScrollValue - Xt.position : 0;
|
|
551
|
+
t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - b.position + t(this, k) : a === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, k)) : I = C.position - b.position : I = C.position - b.position, this.shiftPosition(I - Be, i);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
shiftSections(e, i) {
|
|
555
555
|
t(this, l).length && this.scrollToSection(t(this, E).current + e, i);
|
|
556
556
|
}
|
|
557
557
|
setPosition(e, i) {
|
|
558
|
-
c(this, o, xe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, _).set(t(this, d).current, { equalize: !0 }), t(this, _).set(e,
|
|
558
|
+
c(this, o, xe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, _).set(t(this, d).current, { equalize: !0 }), t(this, _).set(e, Ae({}, i.tween)), h(this, ut, setTimeout(() => {
|
|
559
559
|
h(this, ut, void 0);
|
|
560
560
|
}, i.tween.duration || 0))) : t(this, d).set(e, {
|
|
561
561
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
@@ -569,13 +569,13 @@ class te extends HTMLElement {
|
|
|
569
569
|
damping: 0.01,
|
|
570
570
|
min: 0,
|
|
571
571
|
order: Ge.SCROLL
|
|
572
|
-
})), this.setAttribute("tabindex", "0"), h(this, V, new Ze({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this,
|
|
572
|
+
})), this.setAttribute("tabindex", "0"), h(this, V, new Ze({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, $t)), h(this, ct, new je({
|
|
573
573
|
element: this
|
|
574
574
|
})), t(this, ct).changeEvent.subscribe(
|
|
575
|
-
t(this,
|
|
576
|
-
), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this,
|
|
575
|
+
t(this, $t)
|
|
576
|
+
), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, $t)), h(this, w, new Qe({
|
|
577
577
|
culling: this
|
|
578
|
-
})), t(this, w).changeEvent.subscribe(t(this,
|
|
578
|
+
})), t(this, w).changeEvent.subscribe(t(this, ne)), t(this, P).subscribe(() => {
|
|
579
579
|
c(this, o, Ce).call(this);
|
|
580
580
|
}), t(this, Y).subscribe(() => {
|
|
581
581
|
c(this, o, Ce).call(this);
|
|
@@ -586,31 +586,31 @@ class te extends HTMLElement {
|
|
|
586
586
|
}), t(this, F).subscribe(() => {
|
|
587
587
|
t(this, x) && t(this, L).call(this);
|
|
588
588
|
}), t(this, $).subscribe(({ current: e }) => {
|
|
589
|
-
t(this, x) && (e ? c(this, o,
|
|
589
|
+
t(this, x) && (e ? c(this, o, te).call(this) : c(this, o, At).call(this));
|
|
590
590
|
}), t(this, T).subscribe((e) => {
|
|
591
|
-
t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o,
|
|
591
|
+
t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
|
|
592
592
|
}), t(this, N).subscribe((e) => {
|
|
593
|
-
t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o,
|
|
593
|
+
t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
|
|
594
594
|
}), t(this, D).subscribe((e) => {
|
|
595
595
|
t(this, x) && (t(this, L).call(this), c(this, o, St).call(this));
|
|
596
596
|
}), t(this, y).subscribe((e) => {
|
|
597
|
-
e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this,
|
|
597
|
+
e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ht, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
|
|
598
598
|
}), t(this, Et).subscribe((e) => {
|
|
599
599
|
t(this, d).damping = e.current;
|
|
600
600
|
}), t(this, xt).subscribe((e) => {
|
|
601
601
|
t(this, d).mass = e.current;
|
|
602
602
|
}), t(this, Pt).subscribe((e) => {
|
|
603
603
|
t(this, d).stiffness = e.current;
|
|
604
|
-
}), t(this,
|
|
604
|
+
}), t(this, A).subscribe((e) => {
|
|
605
605
|
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();
|
|
606
606
|
}), t(this, it).subscribe((e) => {
|
|
607
607
|
e.current || (t(this, w).direction = 1);
|
|
608
|
-
}), t(this,
|
|
608
|
+
}), t(this, M).subscribe((e) => {
|
|
609
609
|
t(this, x) && c(this, o, St).call(this);
|
|
610
610
|
}), t(this, rt).subscribe((e) => {
|
|
611
|
-
t(this, x) && t(this,
|
|
611
|
+
t(this, x) && t(this, M).current && c(this, o, St).call(this);
|
|
612
612
|
}), t(this, q).subscribe((e) => {
|
|
613
|
-
t(this, x) && t(this,
|
|
613
|
+
t(this, x) && t(this, M).current && c(this, o, St).call(this);
|
|
614
614
|
}), t(this, d).isRunning.subscribe((e) => {
|
|
615
615
|
this.classList.toggle("active", e.current);
|
|
616
616
|
}), t(this, E).subscribe((e) => {
|
|
@@ -621,70 +621,70 @@ class te extends HTMLElement {
|
|
|
621
621
|
e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, fe).call(this));
|
|
622
622
|
}), t(this, ot).subscribe((e) => {
|
|
623
623
|
e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, we).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, Ee).call(this));
|
|
624
|
-
}), t(this, Ct).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this,
|
|
624
|
+
}), t(this, Ct).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, Rt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, zt).observe(), t(this, it).observe(), t(this, M).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, kt).observe(), t(this, ht).observe(), t(this, ot).observe(), Mt.subscribe(t(this, he), ye.LAST);
|
|
625
625
|
}
|
|
626
626
|
disconnectedCallback() {
|
|
627
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Ct).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this,
|
|
627
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Ct).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, Rt).unobserve(), t(this, A).unobserve(), t(this, zt).unobserve(), t(this, it).unobserve(), t(this, M).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, kt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), Mt.unsubscribe(t(this, he)), c(this, o, we).call(this), t(this, re).disconnect();
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(),
|
|
630
|
+
d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Rt = new WeakMap(), A = new WeakMap(), zt = new WeakMap(), it = new WeakMap(), M = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Ot = new WeakMap(), l = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Bt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Wt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), re = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
|
|
631
631
|
const e = t(this, P).current, i = t(this, Y).current ? "-reverse" : "";
|
|
632
632
|
t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
|
|
633
|
-
},
|
|
634
|
-
c(this, o,
|
|
633
|
+
}, te = function() {
|
|
634
|
+
c(this, o, At).call(this), t(this, Ot).assignedElements().forEach((e, i) => {
|
|
635
635
|
e instanceof HTMLElement && t(this, l).push(new ss(e, i, this));
|
|
636
|
-
}), t(this, f).style.transform = "",
|
|
636
|
+
}), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
|
|
637
637
|
custom: !0,
|
|
638
638
|
composed: !0
|
|
639
639
|
}), t(this, L).call(this), c(this, o, St).call(this);
|
|
640
|
-
},
|
|
640
|
+
}, At = function() {
|
|
641
641
|
t(this, l).forEach((e) => {
|
|
642
642
|
e.destroy();
|
|
643
|
-
}), h(this, l, []), t(this, E).reset(), t(this, d).reset(),
|
|
643
|
+
}), h(this, l, []), t(this, E).reset(), t(this, d).reset(), Yt(this, "scrollSectionsChange", {
|
|
644
644
|
custom: !0,
|
|
645
645
|
composed: !0
|
|
646
646
|
});
|
|
647
647
|
}, pe = function() {
|
|
648
|
-
t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this,
|
|
648
|
+
t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this, Ft)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Bt)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ct).disconnect(), t(this, R).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
|
|
649
649
|
e.unsetTransform();
|
|
650
650
|
}), t(this, L).call(this)));
|
|
651
651
|
}, fe = function() {
|
|
652
|
-
t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this,
|
|
652
|
+
t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Ft)), t(this, V).connect(), t(this, ct).connect(), t(this, R).connect(), t(this, A).current && t(this, w).connect());
|
|
653
653
|
}, we = function() {
|
|
654
|
-
t(this, K) || (h(this, K, !0),
|
|
654
|
+
t(this, K) || (h(this, K, !0), Mt.unsubscribe(t(this, L)), ee.unsubscribe(t(this, L)), c(this, o, pe).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, At).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
|
|
655
655
|
}, Ee = function() {
|
|
656
|
-
t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this),
|
|
657
|
-
}, L = new WeakMap(),
|
|
656
|
+
t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), Mt.subscribe(t(this, L), ye.SCROLL), ee.subscribe(this, t(this, L)));
|
|
657
|
+
}, L = new WeakMap(), Ft = new WeakMap(), Re = function(e) {
|
|
658
658
|
let i = t(this, E).current;
|
|
659
659
|
return t(this, y).current ? i = Ue(e, t(this, l).length) : i = De(e, 0, this.limit), i;
|
|
660
|
-
},
|
|
661
|
-
t(this, it).current && (t(this, w).direction = e), t(this,
|
|
662
|
-
t(this,
|
|
660
|
+
}, $t = new WeakMap(), ne = new WeakMap(), xe = function(e = 1) {
|
|
661
|
+
t(this, it).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
|
|
662
|
+
t(this, zt).current,
|
|
663
663
|
this.sectionalCSSProperty.current
|
|
664
664
|
);
|
|
665
665
|
}, Pe = function(e = "current") {
|
|
666
666
|
if (t(this, y).current && t(this, l).length) {
|
|
667
|
-
const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this,
|
|
668
|
-
return i < 0 ? t(this, S) + i + t(this, v) + t(this,
|
|
667
|
+
const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, k));
|
|
668
|
+
return i < 0 ? t(this, S) + i + t(this, v) + t(this, k) : i;
|
|
669
669
|
} else
|
|
670
670
|
return t(this, d)[e];
|
|
671
671
|
}, St = function() {
|
|
672
672
|
if (t(this, l).length) {
|
|
673
673
|
const e = t(this, E).current + t(this, rt).current;
|
|
674
|
-
if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null),
|
|
674
|
+
if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), Yt(this, "scrollLine", {
|
|
675
675
|
detail: { line: t(this, O) }
|
|
676
|
-
}), t(this,
|
|
676
|
+
}), t(this, M).current) {
|
|
677
677
|
this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
|
|
678
678
|
const i = t(this, D).current + t(this, q).current;
|
|
679
679
|
h(this, dt, []), t(this, l).forEach((r, a) => {
|
|
680
680
|
r.setCurrentIndex(null), r.setCurrentIndexArc(null);
|
|
681
|
-
const b = e - this.limit - 1 + t(this, q).current, C = e + i,
|
|
682
|
-
a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C +
|
|
681
|
+
const b = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
|
|
682
|
+
a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + I / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
}, Oe = function() {
|
|
687
|
-
if (t(this,
|
|
687
|
+
if (t(this, M).current) {
|
|
688
688
|
const e = Math.floor(t(this, dt).length / 2);
|
|
689
689
|
t(this, dt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, dt).forEach((i, r) => {
|
|
690
690
|
const a = Math.abs(r - e);
|
|
@@ -697,54 +697,54 @@ me = function() {
|
|
|
697
697
|
const a = t(this, d).direction;
|
|
698
698
|
for (let b = 0; b < t(this, l).length; b++) {
|
|
699
699
|
const C = t(this, l)[b];
|
|
700
|
-
let
|
|
701
|
-
const
|
|
702
|
-
|
|
700
|
+
let I = t(this, Wt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
|
|
701
|
+
const Xt = Math.abs(be + I - e);
|
|
702
|
+
Xt < i && (i = Xt, r = b);
|
|
703
703
|
}
|
|
704
704
|
return r;
|
|
705
|
-
},
|
|
706
|
-
H && !customElements.get("e-scroll") && customElements.define("e-scroll",
|
|
707
|
-
var
|
|
705
|
+
}, he = new WeakMap();
|
|
706
|
+
H && !customElements.get("e-scroll") && customElements.define("e-scroll", Tt);
|
|
707
|
+
var oe;
|
|
708
708
|
class Le extends HTMLElement {
|
|
709
709
|
constructor() {
|
|
710
710
|
super(...arguments);
|
|
711
|
-
s(this,
|
|
711
|
+
s(this, oe, null);
|
|
712
712
|
}
|
|
713
713
|
get scrollElement() {
|
|
714
|
-
return t(this,
|
|
714
|
+
return t(this, oe);
|
|
715
715
|
}
|
|
716
716
|
connectedCallback() {
|
|
717
|
-
const e = Ve(this,
|
|
718
|
-
e instanceof
|
|
717
|
+
const e = Ve(this, Tt);
|
|
718
|
+
e instanceof Tt ? h(this, oe, e) : console.error(this, "e-scroll not found");
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
|
|
722
|
-
var pt,
|
|
721
|
+
oe = new WeakMap();
|
|
722
|
+
var pt, z, Z, j, Nt, qt, ft, Ut, le, ce;
|
|
723
723
|
class rs extends Le {
|
|
724
724
|
constructor() {
|
|
725
725
|
super();
|
|
726
726
|
s(this, pt, null);
|
|
727
|
-
s(this,
|
|
727
|
+
s(this, z, null);
|
|
728
728
|
s(this, Z, !1);
|
|
729
729
|
s(this, j, 0);
|
|
730
|
-
s(this, $t, 0);
|
|
731
730
|
s(this, Nt, 0);
|
|
731
|
+
s(this, qt, 0);
|
|
732
732
|
s(this, ft, () => {
|
|
733
733
|
h(this, Z, this.offsetWidth > this.offsetHeight);
|
|
734
734
|
const e = t(this, Z) ? this.offsetWidth : this.offsetHeight;
|
|
735
|
-
h(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this,
|
|
735
|
+
h(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, z).style.width = t(this, j) + "px", t(this, z).style.height = "100%") : (t(this, z).style.width = "100%", t(this, z).style.height = t(this, j) + "px"), h(this, Nt, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ut).call(this);
|
|
736
736
|
});
|
|
737
|
-
s(this,
|
|
738
|
-
h(this,
|
|
737
|
+
s(this, Ut, () => {
|
|
738
|
+
h(this, qt, this.scrollElement.currentProgress * t(this, Nt)), t(this, Z) ? t(this, z).style.transform = `translate3d(${t(this, qt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, qt)}px, 0px)`;
|
|
739
739
|
});
|
|
740
|
-
s(this,
|
|
740
|
+
s(this, le, () => {
|
|
741
741
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
742
742
|
});
|
|
743
|
-
s(this,
|
|
743
|
+
s(this, ce, (e) => {
|
|
744
744
|
document.documentElement.classList.add("grabbing"), Ye(
|
|
745
745
|
(a) => {
|
|
746
|
-
const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this,
|
|
747
|
-
this.scrollElement.setPosition(i +
|
|
746
|
+
const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, Nt), I = (b - r) * C;
|
|
747
|
+
this.scrollElement.setPosition(i + I);
|
|
748
748
|
},
|
|
749
749
|
() => {
|
|
750
750
|
document.documentElement.classList.remove("grabbing");
|
|
@@ -788,32 +788,32 @@ class rs extends Le {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
get thumbElement() {
|
|
791
|
-
return t(this,
|
|
791
|
+
return t(this, z);
|
|
792
792
|
}
|
|
793
793
|
connectedCallback() {
|
|
794
794
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
795
795
|
const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
|
|
796
|
-
h(this,
|
|
796
|
+
h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ce)), Mt.subscribe(t(this, ft), ye.SCROLL), ee.subscribe(this, t(this, ft)), ee.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.subscribe(t(this, le));
|
|
797
797
|
}
|
|
798
798
|
disconnectedCallback() {
|
|
799
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this,
|
|
799
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ce)), Mt.unsubscribe(t(this, ft)), ee.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, le));
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
pt = new WeakMap(),
|
|
802
|
+
pt = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), Ut = new WeakMap(), le = new WeakMap(), ce = new WeakMap();
|
|
803
803
|
H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", rs);
|
|
804
|
-
var
|
|
804
|
+
var Gt, Kt, _t;
|
|
805
805
|
class He extends Le {
|
|
806
806
|
constructor() {
|
|
807
807
|
super();
|
|
808
|
-
s(this,
|
|
809
|
-
s(this,
|
|
808
|
+
s(this, Gt, new p(this, "--behaviour", "smooth"));
|
|
809
|
+
s(this, Kt, new p(
|
|
810
810
|
this,
|
|
811
811
|
"--tween-easing",
|
|
812
812
|
!1
|
|
813
813
|
));
|
|
814
|
-
s(this,
|
|
814
|
+
s(this, _t, new p(this, "--tween-duration", 0));
|
|
815
815
|
H && this.addEventListener("click", () => {
|
|
816
|
-
const e = t(this,
|
|
816
|
+
const e = t(this, Gt).current, i = t(this, Kt).current, r = t(this, _t).current;
|
|
817
817
|
this.handleClick({
|
|
818
818
|
behaviour: e,
|
|
819
819
|
tween: i || r ? { easing: i, duration: r } : void 0
|
|
@@ -821,37 +821,37 @@ class He extends Le {
|
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
connectedCallback() {
|
|
824
|
-
super.connectedCallback(), t(this,
|
|
824
|
+
super.connectedCallback(), t(this, Gt).observe(), t(this, Kt).observe(), t(this, _t).observe();
|
|
825
825
|
}
|
|
826
826
|
disconnectedCallback() {
|
|
827
|
-
t(this,
|
|
827
|
+
t(this, Gt).close(), t(this, Kt).close(), t(this, _t).close();
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
|
|
831
|
-
var
|
|
830
|
+
Gt = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap();
|
|
831
|
+
var Zt;
|
|
832
832
|
class ns extends He {
|
|
833
833
|
constructor() {
|
|
834
834
|
super(...arguments);
|
|
835
|
-
s(this,
|
|
835
|
+
s(this, Zt, new p(this, "--set", 1));
|
|
836
836
|
}
|
|
837
837
|
handleClick(e) {
|
|
838
|
-
this.scrollElement.scrollToSection(t(this,
|
|
838
|
+
this.scrollElement.scrollToSection(t(this, Zt).current, e);
|
|
839
839
|
}
|
|
840
840
|
connectedCallback() {
|
|
841
|
-
super.connectedCallback(), t(this,
|
|
841
|
+
super.connectedCallback(), t(this, Zt).observe();
|
|
842
842
|
}
|
|
843
843
|
disconnectedCallback() {
|
|
844
|
-
super.disconnectedCallback(), t(this,
|
|
844
|
+
super.disconnectedCallback(), t(this, Zt).close();
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
|
|
847
|
+
Zt = new WeakMap();
|
|
848
848
|
H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ns);
|
|
849
|
-
var J,
|
|
849
|
+
var J, jt;
|
|
850
850
|
class hs extends He {
|
|
851
851
|
constructor() {
|
|
852
852
|
super(...arguments);
|
|
853
853
|
s(this, J, new p(this, "--step", 1));
|
|
854
|
-
s(this,
|
|
854
|
+
s(this, jt, () => {
|
|
855
855
|
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");
|
|
856
856
|
});
|
|
857
857
|
}
|
|
@@ -860,52 +860,52 @@ class hs extends He {
|
|
|
860
860
|
}
|
|
861
861
|
connectedCallback() {
|
|
862
862
|
super.connectedCallback(), this.scrollElement && (t(this, J).subscribe(() => {
|
|
863
|
-
t(this,
|
|
863
|
+
t(this, jt).call(this);
|
|
864
864
|
}), t(this, J).observe(), this.scrollElement.addEventListener(
|
|
865
865
|
"scrollLine",
|
|
866
|
-
t(this,
|
|
867
|
-
), t(this,
|
|
866
|
+
t(this, jt)
|
|
867
|
+
), t(this, jt).call(this));
|
|
868
868
|
}
|
|
869
869
|
disconnectedCallback() {
|
|
870
870
|
super.disconnectedCallback(), t(this, J).close(), this.removeAttribute("disabled");
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
J = new WeakMap(),
|
|
873
|
+
J = new WeakMap(), jt = new WeakMap();
|
|
874
874
|
H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", hs);
|
|
875
|
-
var Q, mt,
|
|
875
|
+
var Q, mt, Jt, ae, ue, Qt;
|
|
876
876
|
class os {
|
|
877
877
|
constructor(n, e, i) {
|
|
878
878
|
s(this, Q, null);
|
|
879
879
|
s(this, mt, null);
|
|
880
|
-
s(this,
|
|
881
|
-
s(this,
|
|
882
|
-
s(this,
|
|
883
|
-
t(this, mt).scrollToSection(t(this,
|
|
884
|
-
behaviour: t(this,
|
|
880
|
+
s(this, Jt, null);
|
|
881
|
+
s(this, ae, null);
|
|
882
|
+
s(this, ue, () => {
|
|
883
|
+
t(this, mt).scrollToSection(t(this, Jt), {
|
|
884
|
+
behaviour: t(this, ae)
|
|
885
885
|
});
|
|
886
886
|
});
|
|
887
|
-
s(this,
|
|
887
|
+
s(this, Qt, () => {
|
|
888
888
|
t(this, Q).classList.toggle(
|
|
889
889
|
"current",
|
|
890
|
-
t(this, mt).counter.current === t(this,
|
|
890
|
+
t(this, mt).counter.current === t(this, Jt)
|
|
891
891
|
);
|
|
892
892
|
});
|
|
893
|
-
H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this,
|
|
893
|
+
H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ae, i), h(this, Jt, e), t(this, Q).addEventListener("click", t(this, ue)), t(this, mt).counter.subscribe(t(this, Qt)), t(this, Qt).call(this));
|
|
894
894
|
}
|
|
895
895
|
get element() {
|
|
896
896
|
return t(this, Q);
|
|
897
897
|
}
|
|
898
898
|
destroy() {
|
|
899
|
-
t(this, Q).removeEventListener("click", t(this,
|
|
899
|
+
t(this, Q).removeEventListener("click", t(this, ue)), t(this, mt).counter.unsubscribe(t(this, Qt)), t(this, Q).remove();
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
Q = new WeakMap(), mt = new WeakMap(),
|
|
903
|
-
var bt,
|
|
902
|
+
Q = new WeakMap(), mt = new WeakMap(), Jt = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), Qt = new WeakMap();
|
|
903
|
+
var bt, It;
|
|
904
904
|
class ls extends Le {
|
|
905
905
|
constructor() {
|
|
906
906
|
super(...arguments);
|
|
907
907
|
s(this, bt, []);
|
|
908
|
-
s(this,
|
|
908
|
+
s(this, It, ts(() => {
|
|
909
909
|
t(this, bt).forEach((i) => i.destroy()), h(this, bt, []);
|
|
910
910
|
const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
911
911
|
for (let i = 0; i < e; i++) {
|
|
@@ -921,35 +921,41 @@ class ls extends Le {
|
|
|
921
921
|
connectedCallback() {
|
|
922
922
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
923
923
|
"sectionsChange",
|
|
924
|
-
t(this,
|
|
924
|
+
t(this, It)
|
|
925
925
|
), this.scrollElement.sectionsInViewCSSProperty.subscribe(
|
|
926
|
-
t(this,
|
|
926
|
+
t(this, It)
|
|
927
927
|
);
|
|
928
928
|
}
|
|
929
929
|
disconnectedCallback() {
|
|
930
930
|
this.scrollElement.removeEventListener(
|
|
931
931
|
"sectionsChange",
|
|
932
|
-
t(this,
|
|
932
|
+
t(this, It)
|
|
933
933
|
), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
|
|
934
|
-
t(this,
|
|
934
|
+
t(this, It)
|
|
935
935
|
), t(this, bt).forEach((e) => e.destroy()), h(this, bt, []);
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
|
-
bt = new WeakMap(),
|
|
938
|
+
bt = new WeakMap(), It = new WeakMap();
|
|
939
939
|
H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ls);
|
|
940
940
|
class cs extends es {
|
|
941
941
|
connectedCallback() {
|
|
942
|
-
const n = Ve(this,
|
|
943
|
-
n instanceof
|
|
942
|
+
const n = Ve(this, Tt);
|
|
943
|
+
n instanceof Tt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
944
|
+
"scrollSectionsChange",
|
|
945
|
+
this.findAnotherScrollEntries
|
|
946
|
+
), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
|
|
947
|
+
}
|
|
948
|
+
disconnectedCallback() {
|
|
949
|
+
super.disconnectedCallback(), this.scrollContainer instanceof Tt && (this.scrollContainer.removeEventListener(
|
|
944
950
|
"scrollSectionsChange",
|
|
945
951
|
this.findAnotherScrollEntries
|
|
946
|
-
)
|
|
952
|
+
), this.scrollContainer.removeEventListener("scrollResize", this.resize));
|
|
947
953
|
}
|
|
948
954
|
}
|
|
949
955
|
H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", cs);
|
|
950
956
|
export {
|
|
951
957
|
ls as ScrollBulletButtonsElement,
|
|
952
|
-
|
|
958
|
+
Tt as ScrollElement,
|
|
953
959
|
cs as ScrollSegmentElement,
|
|
954
960
|
ns as ScrollSetButtonElement,
|
|
955
961
|
hs as ScrollStepButtonElement,
|