aptechka 0.50.18 → 0.50.19
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 +347 -346
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var We = Object.defineProperty;
|
|
2
|
+
var ke = Object.getOwnPropertySymbols;
|
|
3
|
+
var Fe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ze = (u) => {
|
|
5
5
|
throw TypeError(u);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
for (var e in
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
7
|
+
var Ie = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Me = (u, n) => {
|
|
8
|
+
for (var e in n || (n = {}))
|
|
9
|
+
Fe.call(n, e) && Ie(u, e, n[e]);
|
|
10
|
+
if (ke)
|
|
11
|
+
for (var e of ke(n))
|
|
12
|
+
$e.call(n, e) && Ie(u, e, n[e]);
|
|
13
13
|
return u;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (u,
|
|
17
|
-
import { S as
|
|
15
|
+
var Se = (u, n, e) => n.has(u) || ze("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) ? ze("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
|
+
import { S as Ne } from "../Store-D2xCXENW.js";
|
|
18
18
|
import { i as H } from "../index-euf5anj6.js";
|
|
19
|
-
import { a as
|
|
19
|
+
import { a as qe } from "../easings-Bni3YAAW.js";
|
|
20
20
|
import { d as ue } from "../events-CsVF98U6.js";
|
|
21
|
-
import { c as
|
|
22
|
-
import { a as
|
|
23
|
-
import { c as
|
|
24
|
-
import { l as
|
|
21
|
+
import { c as Te } from "../jss-DtnXPEnq.js";
|
|
22
|
+
import { a as ge, g as ve } from "../layout-DpZo-I0y.js";
|
|
23
|
+
import { c as De } from "../math-BOBiC4TN.js";
|
|
24
|
+
import { l as Ue } 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
|
|
31
|
-
import { scrollEntries as
|
|
32
|
-
import { cssUnitParser as
|
|
26
|
+
import { TICK_ORDER as Ge, RESIZE_ORDER as ye } from "../order/index.js";
|
|
27
|
+
import { D as Ke } from "../Damped-BXsGpI-B.js";
|
|
28
|
+
import { T as _e } from "../Tweened-BhDWLNF0.js";
|
|
29
|
+
import { WheelControls as Ze, KeyboardControls as je, DragControls as Je, AutoplayControls as Qe } from "../controls/index.js";
|
|
30
|
+
import { windowResizer as At } from "../window-resizer/index.js";
|
|
31
|
+
import { scrollEntries as gt } from "../scroll-entries/index.js";
|
|
32
|
+
import { cssUnitParser as Ae } 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
|
|
41
|
-
class
|
|
42
|
-
constructor(
|
|
34
|
+
import { device as Xe } from "../device/index.js";
|
|
35
|
+
import { elementResizer as Yt } from "../element-resizer/index.js";
|
|
36
|
+
import { s as Ye } from "../gestures-CcXV6fCp.js";
|
|
37
|
+
import { b as Ve } from "../dom-CVWzyXPH.js";
|
|
38
|
+
import { d as ts } from "../function-C10DGppn.js";
|
|
39
|
+
import { ScrollSegmentElement as es } from "../scroll-segment/index.js";
|
|
40
|
+
var m, Tt, g, vt, B, X, yt, Dt, de;
|
|
41
|
+
class ss {
|
|
42
|
+
constructor(n, e, i) {
|
|
43
43
|
s(this, Dt);
|
|
44
|
-
s(this,
|
|
45
|
-
s(this,
|
|
46
|
-
s(this,
|
|
47
|
-
s(this,
|
|
44
|
+
s(this, m);
|
|
45
|
+
s(this, Tt);
|
|
46
|
+
s(this, g);
|
|
47
|
+
s(this, vt, 0);
|
|
48
48
|
s(this, B, 0);
|
|
49
|
-
s(this,
|
|
50
|
-
s(this,
|
|
51
|
-
h(this,
|
|
49
|
+
s(this, X, null);
|
|
50
|
+
s(this, yt, 0);
|
|
51
|
+
h(this, m, n), h(this, Tt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Tt));
|
|
52
52
|
}
|
|
53
53
|
get element() {
|
|
54
|
-
return t(this,
|
|
54
|
+
return t(this, m);
|
|
55
55
|
}
|
|
56
56
|
get index() {
|
|
57
|
-
return t(this,
|
|
57
|
+
return t(this, Tt);
|
|
58
58
|
}
|
|
59
59
|
get size() {
|
|
60
|
-
return t(this,
|
|
60
|
+
return t(this, vt);
|
|
61
61
|
}
|
|
62
62
|
get position() {
|
|
63
63
|
return t(this, B);
|
|
64
64
|
}
|
|
65
65
|
get transformPosition() {
|
|
66
|
-
return t(this,
|
|
66
|
+
return t(this, yt);
|
|
67
67
|
}
|
|
68
68
|
destroy() {
|
|
69
|
-
|
|
69
|
+
gt.unregister(t(this, m)), this.unsetTransform();
|
|
70
70
|
}
|
|
71
71
|
unsetTransform() {
|
|
72
|
-
t(this,
|
|
72
|
+
t(this, m).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setSize();
|
|
73
73
|
}
|
|
74
|
-
setSize(
|
|
75
|
-
|
|
74
|
+
setSize(n) {
|
|
75
|
+
n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, m).style.width = n + "px", t(this, m).style.height = "") : (t(this, m).style.height = n + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
|
|
76
76
|
}
|
|
77
77
|
resize() {
|
|
78
|
-
h(this,
|
|
78
|
+
h(this, vt, t(this, g).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, B, t(this, g).vertical ? ge(t(this, m)) : ve(t(this, m))), h(this, B, t(this, B) - t(this, g).contentPosition);
|
|
79
79
|
}
|
|
80
80
|
transform() {
|
|
81
|
-
let
|
|
82
|
-
const e = t(this,
|
|
83
|
-
t(this,
|
|
84
|
-
t(this,
|
|
85
|
-
t(this,
|
|
86
|
-
|
|
81
|
+
let n = 0;
|
|
82
|
+
const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
|
|
83
|
+
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, B) + t(this, vt) < t(this, g).currentScrollValue && (n = t(this, g).distance * -1 - t(this, g).gap), gt.update(
|
|
84
|
+
t(this, m),
|
|
85
|
+
t(this, g).axisCSSProperty.current,
|
|
86
|
+
n
|
|
87
87
|
);
|
|
88
|
-
const i = t(this,
|
|
89
|
-
h(this,
|
|
88
|
+
const i = t(this, g).currentScrollValue + n, r = t(this, B) - t(this, g).viewportSize - e, a = t(this, B) + t(this, vt) + e, b = De(i, r, a);
|
|
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
|
-
setMark(
|
|
92
|
-
t(this,
|
|
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), ue(t(this, m), "scrollSectionMarkChange", {
|
|
93
93
|
composed: !0,
|
|
94
94
|
detail: {
|
|
95
|
-
mark: t(this,
|
|
95
|
+
mark: t(this, X)
|
|
96
96
|
},
|
|
97
97
|
custom: !0
|
|
98
98
|
}));
|
|
99
99
|
}
|
|
100
|
-
setIndex(
|
|
101
|
-
c(this, Dt, de).call(this, "--index",
|
|
100
|
+
setIndex(n) {
|
|
101
|
+
c(this, Dt, de).call(this, "--index", n);
|
|
102
102
|
}
|
|
103
|
-
setCurrentIndex(
|
|
104
|
-
c(this, Dt, de).call(this, "--current-index",
|
|
103
|
+
setCurrentIndex(n) {
|
|
104
|
+
c(this, Dt, de).call(this, "--current-index", n);
|
|
105
105
|
}
|
|
106
|
-
setCurrentIndexArc(
|
|
107
|
-
c(this, Dt, de).call(this, "--current-index-arc",
|
|
106
|
+
setCurrentIndexArc(n) {
|
|
107
|
+
c(this, Dt, de).call(this, "--current-index-arc", n);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
e ? t(this,
|
|
110
|
+
m = new WeakMap(), Tt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Dt = new WeakSet(), de = function(n, e) {
|
|
111
|
+
e !== null ? t(this, m).style.setProperty(n, e.toString()) : t(this, m).style.removeProperty(n);
|
|
112
112
|
};
|
|
113
|
-
const
|
|
113
|
+
const is = Te({
|
|
114
114
|
":host": {
|
|
115
115
|
position: "relative",
|
|
116
116
|
width: "100%",
|
|
@@ -148,66 +148,66 @@ const es = Ae({
|
|
|
148
148
|
flexShrink: "0"
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
var d,
|
|
152
|
-
class
|
|
151
|
+
var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt, Vt, M, kt, it, A, rt, q, nt, It, ht, ot, lt, f, Rt, l, ee, se, v, S, I, V, ct, R, w, E, Ot, at, U, G, K, Ht, ut, _, Bt, O, x, ie, dt, o, Ce, Xt, Mt, pe, fe, we, Ee, L, Wt, Re, Ft, re, xe, Pe, St, Oe, me, ne;
|
|
152
|
+
class te extends HTMLElement {
|
|
153
153
|
constructor() {
|
|
154
154
|
super();
|
|
155
155
|
s(this, o);
|
|
156
156
|
s(this, d, null);
|
|
157
|
-
s(this,
|
|
158
|
-
s(this,
|
|
159
|
-
s(this,
|
|
157
|
+
s(this, Ct, new p(this, "--controls", !0));
|
|
158
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
159
|
+
s(this, Y, new p(this, "--reverse", !1));
|
|
160
160
|
s(this, W, new p(this, "--direction", 0));
|
|
161
161
|
s(this, F, new p(this, "--pages", 0, {
|
|
162
162
|
validate: (e) => Math.max(0, e - 1)
|
|
163
163
|
}));
|
|
164
164
|
s(this, $, new p(this, "--split", !1));
|
|
165
|
-
s(this,
|
|
166
|
-
s(this,
|
|
165
|
+
s(this, T, new p(this, "--sectional", !1));
|
|
166
|
+
s(this, tt, new p(
|
|
167
167
|
this,
|
|
168
168
|
"--tween-easing",
|
|
169
169
|
!1
|
|
170
170
|
));
|
|
171
|
-
s(this,
|
|
171
|
+
s(this, et, new p(
|
|
172
172
|
this,
|
|
173
173
|
"--tween-duration",
|
|
174
174
|
!1
|
|
175
175
|
));
|
|
176
176
|
s(this, N, new p(this, "--auto-size", !1));
|
|
177
|
-
s(this,
|
|
177
|
+
s(this, st, new p(
|
|
178
178
|
this,
|
|
179
179
|
"--wheel-max-delta",
|
|
180
180
|
!1
|
|
181
181
|
));
|
|
182
|
-
s(this,
|
|
183
|
-
s(this,
|
|
182
|
+
s(this, wt, new p(this, "--drag-inertion", 1));
|
|
183
|
+
s(this, D, new p(
|
|
184
184
|
this,
|
|
185
185
|
"--sections-in-view",
|
|
186
186
|
1
|
|
187
187
|
));
|
|
188
|
-
s(this,
|
|
188
|
+
s(this, y, new p(this, "--loop", !1));
|
|
189
189
|
s(this, Et, new p(this, "--damping", 20));
|
|
190
|
-
s(this,
|
|
191
|
-
s(this,
|
|
192
|
-
s(this,
|
|
190
|
+
s(this, xt, new p(this, "--mass", 0));
|
|
191
|
+
s(this, Pt, new p(this, "--stiffness", 0));
|
|
192
|
+
s(this, Lt, new p(this, "--mouse-drag", !1));
|
|
193
193
|
s(this, Vt, new p(
|
|
194
194
|
this,
|
|
195
195
|
"--section-distance-scale",
|
|
196
196
|
0.5
|
|
197
197
|
));
|
|
198
198
|
s(this, M, new p(this, "--autoplay", 0));
|
|
199
|
-
s(this,
|
|
199
|
+
s(this, kt, new p(
|
|
200
200
|
this,
|
|
201
201
|
"--autoplay-pause-duration",
|
|
202
202
|
0
|
|
203
203
|
));
|
|
204
|
-
s(this,
|
|
204
|
+
s(this, it, new p(
|
|
205
205
|
this,
|
|
206
206
|
"--autoplay-user-direction",
|
|
207
207
|
!1
|
|
208
208
|
));
|
|
209
|
-
s(this,
|
|
210
|
-
s(this,
|
|
209
|
+
s(this, A, new p(this, "--classes", !1));
|
|
210
|
+
s(this, rt, new p(
|
|
211
211
|
this,
|
|
212
212
|
"--current-index-start-offset",
|
|
213
213
|
0
|
|
@@ -217,104 +217,105 @@ class Yt extends HTMLElement {
|
|
|
217
217
|
"--current-index-end-offset",
|
|
218
218
|
0
|
|
219
219
|
));
|
|
220
|
-
s(this,
|
|
221
|
-
s(this,
|
|
220
|
+
s(this, nt, new p(this, "--focus-delay", 0));
|
|
221
|
+
s(this, It, new p(
|
|
222
222
|
this,
|
|
223
223
|
"--focus-duration",
|
|
224
224
|
3e3
|
|
225
225
|
));
|
|
226
|
-
s(this,
|
|
227
|
-
s(this,
|
|
228
|
-
s(this,
|
|
226
|
+
s(this, ht, new p(this, "--disabled", !1));
|
|
227
|
+
s(this, ot, new p(this, "--hibernate", !1));
|
|
228
|
+
s(this, lt, null);
|
|
229
229
|
s(this, f, null);
|
|
230
|
-
s(this,
|
|
230
|
+
s(this, Rt, null);
|
|
231
231
|
s(this, l, []);
|
|
232
232
|
s(this, ee, 0);
|
|
233
233
|
s(this, se, 0);
|
|
234
|
-
s(this,
|
|
235
|
-
s(this,
|
|
236
|
-
s(this,
|
|
234
|
+
s(this, v, 0);
|
|
235
|
+
s(this, S, 0);
|
|
236
|
+
s(this, I, 0);
|
|
237
237
|
s(this, V, null);
|
|
238
|
-
s(this,
|
|
239
|
-
s(this,
|
|
240
|
-
s(this,
|
|
241
|
-
s(this, E, new
|
|
242
|
-
s(this,
|
|
243
|
-
s(this,
|
|
238
|
+
s(this, ct, null);
|
|
239
|
+
s(this, R, null);
|
|
240
|
+
s(this, w, null);
|
|
241
|
+
s(this, E, new Ne(0));
|
|
242
|
+
s(this, Ot, 0);
|
|
243
|
+
s(this, at, 0);
|
|
244
244
|
s(this, U, !1);
|
|
245
245
|
s(this, G, !0);
|
|
246
246
|
s(this, K, !0);
|
|
247
247
|
s(this, Ht);
|
|
248
|
-
s(this,
|
|
249
|
-
s(this, _, new
|
|
248
|
+
s(this, ut);
|
|
249
|
+
s(this, _, new _e());
|
|
250
250
|
s(this, Bt, !1);
|
|
251
|
-
s(this,
|
|
252
|
-
s(this,
|
|
251
|
+
s(this, O, null);
|
|
252
|
+
s(this, x, !1);
|
|
253
253
|
s(this, ie, null);
|
|
254
|
-
s(this,
|
|
255
|
-
|
|
254
|
+
s(this, dt, []);
|
|
255
|
+
s(this, L, () => {
|
|
256
|
+
if (t(this, ot).current)
|
|
256
257
|
return;
|
|
257
258
|
t(this, d).unlistenAnimationFrame();
|
|
258
|
-
const e = this.currentScrollValue / t(this,
|
|
259
|
-
if (h(this, ee, this.vertical ?
|
|
259
|
+
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
|
|
260
|
+
if (h(this, ee, this.vertical ? ge(this) : ve(this)), h(this, se, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Ae.parse(
|
|
260
261
|
getComputedStyle(t(this, f)).rowGap
|
|
261
|
-
)) : h(this,
|
|
262
|
+
)) : h(this, I, Ae.parse(
|
|
262
263
|
getComputedStyle(t(this, f)).columnGap
|
|
263
264
|
)), t(this, N).current && t(this, l).length) {
|
|
264
|
-
const
|
|
265
|
-
t(this, l).forEach((
|
|
266
|
-
|
|
265
|
+
const r = t(this, D).current, a = (t(this, v) - t(this, I) * (r - 1)) / r;
|
|
266
|
+
t(this, l).forEach((b) => {
|
|
267
|
+
b.setSize(a);
|
|
267
268
|
});
|
|
268
269
|
} else
|
|
269
|
-
t(this, l).forEach((
|
|
270
|
-
|
|
270
|
+
t(this, l).forEach((r) => {
|
|
271
|
+
r.setSize();
|
|
271
272
|
});
|
|
272
|
-
if (t(this, l).forEach((
|
|
273
|
-
|
|
273
|
+
if (t(this, l).forEach((r) => {
|
|
274
|
+
r.resize();
|
|
274
275
|
}), t(this, F).current) {
|
|
275
|
-
h(this,
|
|
276
|
-
const
|
|
277
|
-
this.vertical ? (t(this, f).style.width =
|
|
276
|
+
h(this, S, t(this, v) * t(this, F).current);
|
|
277
|
+
const r = t(this, S) + t(this, v);
|
|
278
|
+
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%");
|
|
278
279
|
} else
|
|
279
|
-
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this,
|
|
280
|
-
if (!t(this,
|
|
281
|
-
const
|
|
282
|
-
h(this,
|
|
280
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, S, t(this, f).offsetWidth - t(this, v)));
|
|
281
|
+
if (!t(this, y).current) {
|
|
282
|
+
const r = getComputedStyle(this), a = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
283
|
+
h(this, S, t(this, S) + a), t(this, d).max = t(this, S);
|
|
283
284
|
}
|
|
284
|
-
if (t(this,
|
|
285
|
-
const
|
|
286
|
-
h(this,
|
|
285
|
+
if (t(this, y).current && t(this, l).length) {
|
|
286
|
+
const r = t(this, l)[t(this, l).length - 1], a = r.position + r.size - t(this, v), b = t(this, S) - a;
|
|
287
|
+
h(this, at, r.position + r.size + b);
|
|
287
288
|
} else
|
|
288
|
-
h(this,
|
|
289
|
-
if (t(this,
|
|
290
|
-
const
|
|
291
|
-
t(this, d).set(
|
|
289
|
+
h(this, at, t(this, S));
|
|
290
|
+
if (t(this, T).current && t(this, l).length) {
|
|
291
|
+
const r = t(this, l)[i];
|
|
292
|
+
t(this, d).set(r.position, {
|
|
292
293
|
equalize: !0
|
|
293
294
|
});
|
|
294
295
|
} else
|
|
295
|
-
t(this, d).set(e * t(this,
|
|
296
|
+
t(this, d).set(e * t(this, S), {
|
|
296
297
|
equalize: !0
|
|
297
298
|
});
|
|
298
|
-
h(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > 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), t(this, Wt).call(this);
|
|
299
300
|
});
|
|
300
301
|
s(this, Wt, () => {
|
|
301
302
|
if (!t(this, U) || t(this, K) || t(this, G))
|
|
302
303
|
return;
|
|
303
304
|
const e = this.currentScrollValue;
|
|
304
|
-
if (h(this,
|
|
305
|
+
if (h(this, Ot, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
305
306
|
for (let i = 0; i < t(this, l).length; i++)
|
|
306
307
|
t(this, l)[i].transform();
|
|
307
308
|
t(this, E).current = c(this, o, me).call(this);
|
|
308
309
|
} else
|
|
309
310
|
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
310
|
-
|
|
311
|
+
c(this, o, Oe).call(this), gt.update(
|
|
311
312
|
this,
|
|
312
|
-
t(this,
|
|
313
|
+
t(this, P).current,
|
|
313
314
|
e
|
|
314
315
|
);
|
|
315
316
|
});
|
|
316
317
|
s(this, Ft, (e, i) => {
|
|
317
|
-
t(this,
|
|
318
|
+
t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, re).call(this, e, i));
|
|
318
319
|
});
|
|
319
320
|
s(this, re, (e, i) => {
|
|
320
321
|
if (t(this, W).current) {
|
|
@@ -323,40 +324,40 @@ class Yt extends HTMLElement {
|
|
|
323
324
|
if (t(this, W).current > 0 && i < 0)
|
|
324
325
|
return;
|
|
325
326
|
}
|
|
326
|
-
if (t(this,
|
|
327
|
-
const
|
|
328
|
-
|
|
327
|
+
if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, M).current && t(this, nt).current && (clearInterval(t(this, Ht)), h(this, Ht, setTimeout(() => {
|
|
328
|
+
const r = t(this, l)[c(this, o, me).call(this)];
|
|
329
|
+
r && this.scrollToSection(r.index, {
|
|
329
330
|
tween: {
|
|
330
|
-
duration: t(this,
|
|
331
|
-
easing:
|
|
331
|
+
duration: t(this, It).current,
|
|
332
|
+
easing: qe
|
|
332
333
|
}
|
|
333
334
|
});
|
|
334
|
-
}, t(this,
|
|
335
|
-
if (t(this,
|
|
336
|
-
const
|
|
335
|
+
}, t(this, nt).current))), !(e.includes("drag") && !Xe.isTouch && !t(this, Lt).current)) {
|
|
336
|
+
if (t(this, T).current && e !== "drag") {
|
|
337
|
+
const r = Math.sign(i);
|
|
337
338
|
if (t(this, l).length) {
|
|
338
|
-
const
|
|
339
|
-
tween: t(this,
|
|
340
|
-
easing: t(this,
|
|
341
|
-
duration: t(this,
|
|
339
|
+
const a = {
|
|
340
|
+
tween: t(this, tt).current || t(this, et).current ? {
|
|
341
|
+
easing: t(this, tt).current || "easeInOutCubic",
|
|
342
|
+
duration: t(this, et).current || 500
|
|
342
343
|
} : void 0
|
|
343
344
|
};
|
|
344
|
-
t(this, Bt) ? this.scrollToSection(t(this, E).current,
|
|
345
|
+
t(this, Bt) ? this.scrollToSection(t(this, E).current, a) : this.shiftSections(r, a);
|
|
345
346
|
} else
|
|
346
|
-
t(this, d).shift(
|
|
347
|
+
t(this, d).shift(r * t(this, v));
|
|
347
348
|
} else
|
|
348
349
|
t(this, d).shift(i);
|
|
349
350
|
h(this, Bt, e === "drag");
|
|
350
351
|
}
|
|
351
352
|
});
|
|
352
353
|
s(this, ne, () => {
|
|
353
|
-
h(this,
|
|
354
|
+
h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, Ee).call(this);
|
|
354
355
|
});
|
|
355
356
|
if (H) {
|
|
356
357
|
const e = this.attachShadow({ mode: "open" });
|
|
357
|
-
e.adoptedStyleSheets = [
|
|
358
|
+
e.adoptedStyleSheets = [is];
|
|
358
359
|
const i = document.createElement("div");
|
|
359
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), 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, Rt, document.createElement("slot")), t(this, f).appendChild(t(this, Rt)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, ie, new MutationObserver((r) => {
|
|
360
361
|
this.tryResplit();
|
|
361
362
|
}));
|
|
362
363
|
}
|
|
@@ -365,13 +366,13 @@ class Yt extends HTMLElement {
|
|
|
365
366
|
return t(this, d);
|
|
366
367
|
}
|
|
367
368
|
get controlsCSSProperty() {
|
|
368
|
-
return t(this,
|
|
369
|
+
return t(this, Ct);
|
|
369
370
|
}
|
|
370
371
|
get axisCSSProperty() {
|
|
371
|
-
return t(this,
|
|
372
|
+
return t(this, P);
|
|
372
373
|
}
|
|
373
374
|
get reverseCSSProperty() {
|
|
374
|
-
return t(this,
|
|
375
|
+
return t(this, Y);
|
|
375
376
|
}
|
|
376
377
|
get directionCSSProperty() {
|
|
377
378
|
return t(this, W);
|
|
@@ -383,40 +384,40 @@ class Yt extends HTMLElement {
|
|
|
383
384
|
return t(this, $);
|
|
384
385
|
}
|
|
385
386
|
get sectionalCSSProperty() {
|
|
386
|
-
return t(this,
|
|
387
|
+
return t(this, T);
|
|
387
388
|
}
|
|
388
389
|
get easingCSSProperty() {
|
|
389
|
-
return t(this,
|
|
390
|
+
return t(this, tt);
|
|
390
391
|
}
|
|
391
392
|
get durationCSSProperty() {
|
|
392
|
-
return t(this,
|
|
393
|
+
return t(this, et);
|
|
393
394
|
}
|
|
394
395
|
get autoSizeCSSProperty() {
|
|
395
396
|
return t(this, N);
|
|
396
397
|
}
|
|
397
398
|
get wheelMaxDeltaCSSProperty() {
|
|
398
|
-
return t(this,
|
|
399
|
+
return t(this, st);
|
|
399
400
|
}
|
|
400
401
|
get dragInertionCSSProperty() {
|
|
401
|
-
return t(this,
|
|
402
|
+
return t(this, wt);
|
|
402
403
|
}
|
|
403
404
|
get sectionsInViewCSSProperty() {
|
|
404
|
-
return t(this,
|
|
405
|
+
return t(this, D);
|
|
405
406
|
}
|
|
406
407
|
get loopCSSProperty() {
|
|
407
|
-
return t(this,
|
|
408
|
+
return t(this, y);
|
|
408
409
|
}
|
|
409
410
|
get dampingCSSProperty() {
|
|
410
411
|
return t(this, Et);
|
|
411
412
|
}
|
|
412
413
|
get massCSSProperty() {
|
|
413
|
-
return t(this,
|
|
414
|
+
return t(this, xt);
|
|
414
415
|
}
|
|
415
416
|
get stiffnessCSSProperty() {
|
|
416
|
-
return t(this,
|
|
417
|
+
return t(this, Pt);
|
|
417
418
|
}
|
|
418
419
|
get mouseDragCSSProperty() {
|
|
419
|
-
return t(this,
|
|
420
|
+
return t(this, Lt);
|
|
420
421
|
}
|
|
421
422
|
get sectionDistanceScaleCSSProperty() {
|
|
422
423
|
return t(this, Vt);
|
|
@@ -425,40 +426,40 @@ class Yt extends HTMLElement {
|
|
|
425
426
|
return t(this, M);
|
|
426
427
|
}
|
|
427
428
|
get autoplayPauseDurationCSSProperty() {
|
|
428
|
-
return t(this,
|
|
429
|
+
return t(this, kt);
|
|
429
430
|
}
|
|
430
431
|
get autoplayUserDirectionCSSProperty() {
|
|
431
|
-
return t(this,
|
|
432
|
+
return t(this, it);
|
|
432
433
|
}
|
|
433
434
|
get classesCSSProperty() {
|
|
434
|
-
return t(this,
|
|
435
|
+
return t(this, A);
|
|
435
436
|
}
|
|
436
437
|
get currentIndexStartOffsetCSSProperty() {
|
|
437
|
-
return t(this,
|
|
438
|
+
return t(this, rt);
|
|
438
439
|
}
|
|
439
440
|
get currentIndexEndOffsetCSSProperty() {
|
|
440
441
|
return t(this, q);
|
|
441
442
|
}
|
|
442
443
|
get focusDelayCSSProperty() {
|
|
443
|
-
return t(this,
|
|
444
|
+
return t(this, nt);
|
|
444
445
|
}
|
|
445
446
|
get focusDurationCSSProperty() {
|
|
446
|
-
return t(this,
|
|
447
|
+
return t(this, It);
|
|
447
448
|
}
|
|
448
449
|
get disabledCSSProperty() {
|
|
449
|
-
return t(this,
|
|
450
|
+
return t(this, ht);
|
|
450
451
|
}
|
|
451
452
|
get hibernatedCSSProperty() {
|
|
452
|
-
return t(this,
|
|
453
|
+
return t(this, ot);
|
|
453
454
|
}
|
|
454
455
|
get currentScrollValue() {
|
|
455
|
-
return c(this, o,
|
|
456
|
+
return c(this, o, Pe).call(this, "current");
|
|
456
457
|
}
|
|
457
458
|
get targetScrollValue() {
|
|
458
|
-
return c(this, o,
|
|
459
|
+
return c(this, o, Pe).call(this, "target");
|
|
459
460
|
}
|
|
460
461
|
get contentWrapperElement() {
|
|
461
|
-
return t(this,
|
|
462
|
+
return t(this, lt);
|
|
462
463
|
}
|
|
463
464
|
get contentElement() {
|
|
464
465
|
return t(this, f);
|
|
@@ -473,39 +474,39 @@ class Yt extends HTMLElement {
|
|
|
473
474
|
return t(this, se);
|
|
474
475
|
}
|
|
475
476
|
get viewportSize() {
|
|
476
|
-
return t(this,
|
|
477
|
+
return t(this, v);
|
|
477
478
|
}
|
|
478
479
|
get scrollSize() {
|
|
479
|
-
return t(this,
|
|
480
|
+
return t(this, S);
|
|
480
481
|
}
|
|
481
482
|
get gap() {
|
|
482
|
-
return t(this,
|
|
483
|
+
return t(this, I);
|
|
483
484
|
}
|
|
484
485
|
get counter() {
|
|
485
486
|
return t(this, E);
|
|
486
487
|
}
|
|
487
488
|
get limit() {
|
|
488
489
|
return Math.ceil(
|
|
489
|
-
t(this, l).length - t(this,
|
|
490
|
+
t(this, l).length - t(this, D).current
|
|
490
491
|
);
|
|
491
492
|
}
|
|
492
493
|
get distance() {
|
|
493
|
-
return t(this,
|
|
494
|
+
return t(this, at);
|
|
494
495
|
}
|
|
495
496
|
get loopDistance() {
|
|
496
|
-
return t(this,
|
|
497
|
+
return t(this, y).current ? t(this, at) + t(this, I) : t(this, at);
|
|
497
498
|
}
|
|
498
499
|
get hasOverflow() {
|
|
499
500
|
return t(this, U);
|
|
500
501
|
}
|
|
501
502
|
get overscroll() {
|
|
502
|
-
return t(this,
|
|
503
|
+
return t(this, Ot);
|
|
503
504
|
}
|
|
504
505
|
get scrollLine() {
|
|
505
|
-
return t(this,
|
|
506
|
+
return t(this, O);
|
|
506
507
|
}
|
|
507
508
|
get vertical() {
|
|
508
|
-
return t(this,
|
|
509
|
+
return t(this, P).current === "y";
|
|
509
510
|
}
|
|
510
511
|
get currentProgress() {
|
|
511
512
|
return this.currentScrollValue / this.loopDistance || 0;
|
|
@@ -514,13 +515,13 @@ class Yt extends HTMLElement {
|
|
|
514
515
|
return this.targetScrollValue / this.loopDistance || 0;
|
|
515
516
|
}
|
|
516
517
|
get scrollWidth() {
|
|
517
|
-
return t(this,
|
|
518
|
+
return t(this, P).current === "y" ? 0 : t(this, d).distance;
|
|
518
519
|
}
|
|
519
520
|
get scrollHeight() {
|
|
520
|
-
return t(this,
|
|
521
|
+
return t(this, P).current === "x" ? 0 : t(this, d).distance;
|
|
521
522
|
}
|
|
522
523
|
tryResplit() {
|
|
523
|
-
!t(this, K) && (t(this,
|
|
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, Xt).call(this);
|
|
524
525
|
}
|
|
525
526
|
onScroll(...e) {
|
|
526
527
|
return t(this, d).subscribe(...e);
|
|
@@ -529,33 +530,33 @@ class Yt extends HTMLElement {
|
|
|
529
530
|
t(this, d).unsubscribe(...e);
|
|
530
531
|
}
|
|
531
532
|
//https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
|
|
532
|
-
range(e, i,
|
|
533
|
-
const
|
|
534
|
-
return this.currentProgress <
|
|
533
|
+
range(e, i, r = 0) {
|
|
534
|
+
const a = e - r, b = a + i + r * 2;
|
|
535
|
+
return this.currentProgress < a ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - a) / (b - a);
|
|
535
536
|
}
|
|
536
|
-
curve(e, i,
|
|
537
|
-
return Math.sin(this.range(e, i,
|
|
537
|
+
curve(e, i, r = 0) {
|
|
538
|
+
return Math.sin(this.range(e, i, r) * Math.PI);
|
|
538
539
|
}
|
|
539
|
-
visible(e, i,
|
|
540
|
-
const
|
|
541
|
-
return this.currentProgress >=
|
|
540
|
+
visible(e, i, r = 0) {
|
|
541
|
+
const a = e - r, b = a + i + r * 2;
|
|
542
|
+
return this.currentProgress >= a && this.currentProgress <= b;
|
|
542
543
|
}
|
|
543
544
|
scrollToSection(e, i) {
|
|
544
545
|
if (!t(this, l).length)
|
|
545
546
|
return;
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
548
|
-
let
|
|
549
|
-
const
|
|
550
|
-
t(this,
|
|
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
|
+
if (b && C) {
|
|
549
|
+
let z = 0;
|
|
550
|
+
const be = c(this, o, me).call(this), Qt = t(this, l)[be], Be = Qt ? this.targetScrollValue - Qt.position : 0;
|
|
551
|
+
t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? z = t(this, S) + t(this, v) - b.position + t(this, I) : a === t(this, l).length - 1 && r === 0 ? z = C.position - (t(this, S) + t(this, v) + t(this, I)) : z = C.position - b.position : z = C.position - b.position, this.shiftPosition(z - Be, i);
|
|
551
552
|
}
|
|
552
553
|
}
|
|
553
554
|
shiftSections(e, i) {
|
|
554
555
|
t(this, l).length && this.scrollToSection(t(this, E).current + e, i);
|
|
555
556
|
}
|
|
556
557
|
setPosition(e, i) {
|
|
557
|
-
c(this, o, xe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this,
|
|
558
|
-
h(this,
|
|
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, Me({}, i.tween)), h(this, ut, setTimeout(() => {
|
|
559
|
+
h(this, ut, void 0);
|
|
559
560
|
}, i.tween.duration || 0))) : t(this, d).set(e, {
|
|
560
561
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
561
562
|
});
|
|
@@ -564,79 +565,79 @@ class Yt extends HTMLElement {
|
|
|
564
565
|
this.setPosition(t(this, d).target + e, i);
|
|
565
566
|
}
|
|
566
567
|
connectedCallback() {
|
|
567
|
-
|
|
568
|
+
gt.register(this), h(this, d, new Ke(0, {
|
|
568
569
|
damping: 0.01,
|
|
569
570
|
min: 0,
|
|
570
|
-
order:
|
|
571
|
-
})), this.setAttribute("tabindex", "0"), h(this, V, new
|
|
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, Ft)), h(this, ct, new je({
|
|
572
573
|
element: this
|
|
573
|
-
})), t(this,
|
|
574
|
+
})), t(this, ct).changeEvent.subscribe(
|
|
574
575
|
t(this, Ft)
|
|
575
|
-
), h(this,
|
|
576
|
+
), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, Ft)), h(this, w, new Qe({
|
|
576
577
|
culling: this
|
|
577
|
-
})), t(this,
|
|
578
|
-
c(this, o,
|
|
579
|
-
}), t(this,
|
|
580
|
-
c(this, o,
|
|
581
|
-
}), t(this,
|
|
582
|
-
t(this, V).axis = e.current ? "max" : t(this,
|
|
583
|
-
}), t(this,
|
|
584
|
-
t(this,
|
|
578
|
+
})), t(this, w).changeEvent.subscribe(t(this, re)), t(this, P).subscribe(() => {
|
|
579
|
+
c(this, o, Ce).call(this);
|
|
580
|
+
}), t(this, Y).subscribe(() => {
|
|
581
|
+
c(this, o, Ce).call(this);
|
|
582
|
+
}), t(this, st).subscribe((e) => {
|
|
583
|
+
t(this, V).axis = e.current ? "max" : t(this, P).current;
|
|
584
|
+
}), t(this, wt).subscribe((e) => {
|
|
585
|
+
t(this, R).inertion = typeof e.current == "number" ? e.current : 1;
|
|
585
586
|
}), t(this, F).subscribe(() => {
|
|
586
|
-
t(this,
|
|
587
|
+
t(this, x) && t(this, L).call(this);
|
|
587
588
|
}), t(this, $).subscribe(({ current: e }) => {
|
|
588
|
-
t(this,
|
|
589
|
-
}), t(this, A).subscribe((e) => {
|
|
590
|
-
t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, x).interval = e.current, t(this, P) && (e.current && !e.previous && !t(this, l).length ? c(this, o, Qt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
|
|
591
|
-
}), t(this, N).subscribe((e) => {
|
|
592
|
-
t(this, P) && (t(this, k).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, Qt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
|
|
589
|
+
t(this, x) && (e ? c(this, o, Xt).call(this) : c(this, o, Mt).call(this));
|
|
593
590
|
}), t(this, T).subscribe((e) => {
|
|
594
|
-
t(this,
|
|
595
|
-
}), t(this,
|
|
596
|
-
|
|
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, Xt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
|
|
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, Xt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
|
|
594
|
+
}), t(this, D).subscribe((e) => {
|
|
595
|
+
t(this, x) && (t(this, L).call(this), c(this, o, St).call(this));
|
|
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, Ot, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
|
|
597
598
|
}), t(this, Et).subscribe((e) => {
|
|
598
599
|
t(this, d).damping = e.current;
|
|
599
|
-
}), t(this,
|
|
600
|
+
}), t(this, xt).subscribe((e) => {
|
|
600
601
|
t(this, d).mass = e.current;
|
|
601
|
-
}), t(this,
|
|
602
|
+
}), t(this, Pt).subscribe((e) => {
|
|
602
603
|
t(this, d).stiffness = e.current;
|
|
603
604
|
}), t(this, M).subscribe((e) => {
|
|
604
|
-
t(this,
|
|
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
|
+
}), t(this, it).subscribe((e) => {
|
|
607
|
+
e.current || (t(this, w).direction = 1);
|
|
608
|
+
}), t(this, A).subscribe((e) => {
|
|
609
|
+
t(this, x) && c(this, o, St).call(this);
|
|
605
610
|
}), t(this, rt).subscribe((e) => {
|
|
606
|
-
|
|
607
|
-
}), t(this, D).subscribe((e) => {
|
|
608
|
-
t(this, P) && c(this, o, gt).call(this);
|
|
609
|
-
}), t(this, nt).subscribe((e) => {
|
|
610
|
-
t(this, P) && t(this, D).current && c(this, o, gt).call(this);
|
|
611
|
+
t(this, x) && t(this, A).current && c(this, o, St).call(this);
|
|
611
612
|
}), t(this, q).subscribe((e) => {
|
|
612
|
-
t(this,
|
|
613
|
+
t(this, x) && t(this, A).current && c(this, o, St).call(this);
|
|
613
614
|
}), t(this, d).isRunning.subscribe((e) => {
|
|
614
615
|
this.classList.toggle("active", e.current);
|
|
615
616
|
}), t(this, E).subscribe((e) => {
|
|
616
|
-
t(this, l).length && c(this, o,
|
|
617
|
+
t(this, l).length && c(this, o, St).call(this);
|
|
617
618
|
}), t(this, _).subscribe((e) => {
|
|
618
619
|
t(this, _).isRunning.current && t(this, d).set(e.current, { equalize: !0 });
|
|
619
|
-
}), t(this,
|
|
620
|
+
}), t(this, ht).subscribe((e) => {
|
|
620
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));
|
|
621
|
-
}), t(this,
|
|
622
|
-
e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o,
|
|
623
|
-
}), t(this,
|
|
622
|
+
}), t(this, ot).subscribe((e) => {
|
|
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, Vt).observe(), t(this, M).observe(), t(this, M).observe(), t(this, kt).observe(), t(this, it).observe(), t(this, A).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, It).observe(), t(this, ht).observe(), t(this, ot).observe(), At.subscribe(t(this, ne), ye.LAST);
|
|
624
625
|
}
|
|
625
626
|
disconnectedCallback() {
|
|
626
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), 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, Vt).unobserve(), t(this, M).unobserve(), t(this, kt).unobserve(), t(this, it).unobserve(), t(this, A).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, It).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), At.unsubscribe(t(this, ne)), c(this, o, we).call(this), t(this, ie).disconnect();
|
|
627
628
|
}
|
|
628
629
|
}
|
|
629
|
-
d = new WeakMap(),
|
|
630
|
-
const e = t(this,
|
|
631
|
-
t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this,
|
|
632
|
-
},
|
|
633
|
-
c(this, o,
|
|
634
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
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(), Vt = new WeakMap(), M = new WeakMap(), kt = new WeakMap(), it = new WeakMap(), A = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), It = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Rt = new WeakMap(), l = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), v = new WeakMap(), S = new WeakMap(), I = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ot = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Ht = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Bt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), ie = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
|
|
631
|
+
const e = t(this, P).current, i = t(this, Y).current ? "-reverse" : "";
|
|
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
|
+
}, Xt = function() {
|
|
634
|
+
c(this, o, Mt).call(this), t(this, Rt).assignedElements().forEach((e, i) => {
|
|
635
|
+
e instanceof HTMLElement && t(this, l).push(new ss(e, i, this));
|
|
635
636
|
}), t(this, f).style.transform = "", ue(this, "scrollSectionsChange", {
|
|
636
637
|
custom: !0,
|
|
637
638
|
composed: !0
|
|
638
|
-
}), t(this,
|
|
639
|
-
},
|
|
639
|
+
}), t(this, L).call(this), c(this, o, St).call(this);
|
|
640
|
+
}, Mt = function() {
|
|
640
641
|
t(this, l).forEach((e) => {
|
|
641
642
|
e.destroy();
|
|
642
643
|
}), h(this, l, []), t(this, E).reset(), t(this, d).reset(), ue(this, "scrollSectionsChange", {
|
|
@@ -644,67 +645,67 @@ d = new WeakMap(), wt = new WeakMap(), L = new WeakMap(), tt = new WeakMap(), W
|
|
|
644
645
|
composed: !0
|
|
645
646
|
});
|
|
646
647
|
}, pe = function() {
|
|
647
|
-
t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this, Wt)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Ht)), clearInterval(t(this,
|
|
648
|
+
t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this, Wt)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Ht)), 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) => {
|
|
648
649
|
e.unsetTransform();
|
|
649
|
-
}), t(this,
|
|
650
|
+
}), t(this, L).call(this)));
|
|
650
651
|
}, fe = function() {
|
|
651
|
-
t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Wt)), t(this, V).connect(), t(this,
|
|
652
|
-
}, Ce = function() {
|
|
653
|
-
t(this, K) || (h(this, K, !0), Tt.unsubscribe(t(this, k)), Xt.unsubscribe(t(this, k)), 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()), vt.unregister(this));
|
|
652
|
+
t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Wt)), t(this, V).connect(), t(this, ct).connect(), t(this, R).connect(), t(this, M).current && t(this, w).connect());
|
|
654
653
|
}, we = function() {
|
|
655
|
-
t(this, K)
|
|
656
|
-
},
|
|
654
|
+
t(this, K) || (h(this, K, !0), At.unsubscribe(t(this, L)), Yt.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, Mt).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
|
|
655
|
+
}, Ee = function() {
|
|
656
|
+
t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), At.subscribe(t(this, L), ye.SCROLL), Yt.subscribe(this, t(this, L)));
|
|
657
|
+
}, L = new WeakMap(), Wt = new WeakMap(), Re = function(e) {
|
|
657
658
|
let i = t(this, E).current;
|
|
658
|
-
return t(this,
|
|
659
|
+
return t(this, y).current ? i = Ue(e, t(this, l).length) : i = De(e, 0, this.limit), i;
|
|
659
660
|
}, Ft = new WeakMap(), re = new WeakMap(), xe = function(e = 1) {
|
|
660
|
-
t(this,
|
|
661
|
-
t(this,
|
|
661
|
+
t(this, it).current && (t(this, w).direction = e), t(this, M).current && t(this, w).pauseAndContinue(
|
|
662
|
+
t(this, kt).current,
|
|
662
663
|
this.sectionalCSSProperty.current
|
|
663
664
|
);
|
|
664
|
-
},
|
|
665
|
-
if (t(this,
|
|
666
|
-
const i = t(this, d)[e] % (t(this,
|
|
667
|
-
return i < 0 ? t(this,
|
|
665
|
+
}, Pe = function(e = "current") {
|
|
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, I));
|
|
668
|
+
return i < 0 ? t(this, S) + i + t(this, v) + t(this, I) : i;
|
|
668
669
|
} else
|
|
669
670
|
return t(this, d)[e];
|
|
670
|
-
},
|
|
671
|
+
}, St = function() {
|
|
671
672
|
if (t(this, l).length) {
|
|
672
|
-
const e = t(this, E).current + t(this,
|
|
673
|
-
if (e === 0 ? h(this,
|
|
674
|
-
detail: { line: t(this,
|
|
675
|
-
}), t(this,
|
|
676
|
-
this.classList.remove("end", "start"), t(this,
|
|
677
|
-
const i = t(this,
|
|
678
|
-
t(this, l).forEach((
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
});
|
|
683
|
-
const m = Math.floor(n.length / 2);
|
|
684
|
-
n.sort((a, S) => a.transformPosition - S.transformPosition), n.forEach((a, S) => {
|
|
685
|
-
const w = Math.abs(S - m);
|
|
686
|
-
a.setCurrentIndex(S), a.setCurrentIndexArc(w);
|
|
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), ue(this, "scrollLine", {
|
|
675
|
+
detail: { line: t(this, O) }
|
|
676
|
+
}), t(this, A).current) {
|
|
677
|
+
this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
|
|
678
|
+
const i = t(this, D).current + t(this, q).current;
|
|
679
|
+
h(this, dt, []), t(this, l).forEach((r, a) => {
|
|
680
|
+
r.setCurrentIndex(null), r.setCurrentIndexArc(null);
|
|
681
|
+
const b = e - this.limit - 1 + t(this, q).current, C = e + i, z = this.sections.length - C;
|
|
682
|
+
a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + z / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
|
|
687
683
|
});
|
|
688
684
|
}
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
|
|
685
|
+
}
|
|
686
|
+
}, Oe = function() {
|
|
687
|
+
if (t(this, A).current) {
|
|
688
|
+
const e = Math.floor(t(this, dt).length / 2);
|
|
689
|
+
t(this, dt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, dt).forEach((i, r) => {
|
|
690
|
+
const a = Math.abs(r - e);
|
|
691
|
+
i.setCurrentIndex(r), i.setCurrentIndexArc(a);
|
|
692
692
|
});
|
|
693
|
+
}
|
|
693
694
|
}, // TODO: Учитывать loop
|
|
694
695
|
me = function() {
|
|
695
|
-
let e = this.targetScrollValue, i = 1 / 0,
|
|
696
|
-
const
|
|
697
|
-
for (let
|
|
698
|
-
const
|
|
699
|
-
let
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
return
|
|
696
|
+
let e = this.targetScrollValue, i = 1 / 0, r = 0;
|
|
697
|
+
const a = t(this, d).direction;
|
|
698
|
+
for (let b = 0; b < t(this, l).length; b++) {
|
|
699
|
+
const C = t(this, l)[b];
|
|
700
|
+
let z = t(this, Bt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
|
|
701
|
+
const Qt = Math.abs(be + z - e);
|
|
702
|
+
Qt < i && (i = Qt, r = b);
|
|
703
|
+
}
|
|
704
|
+
return r;
|
|
704
705
|
}, ne = new WeakMap();
|
|
705
|
-
H && !customElements.get("e-scroll") && customElements.define("e-scroll",
|
|
706
|
+
H && !customElements.get("e-scroll") && customElements.define("e-scroll", te);
|
|
706
707
|
var he;
|
|
707
|
-
class
|
|
708
|
+
class Le extends HTMLElement {
|
|
708
709
|
constructor() {
|
|
709
710
|
super(...arguments);
|
|
710
711
|
s(this, he, null);
|
|
@@ -713,17 +714,17 @@ class Pe extends HTMLElement {
|
|
|
713
714
|
return t(this, he);
|
|
714
715
|
}
|
|
715
716
|
connectedCallback() {
|
|
716
|
-
const e =
|
|
717
|
-
e instanceof
|
|
717
|
+
const e = Ve(this, te);
|
|
718
|
+
e instanceof te ? h(this, he, e) : console.error(this, "e-scroll not found");
|
|
718
719
|
}
|
|
719
720
|
}
|
|
720
721
|
he = new WeakMap();
|
|
721
|
-
var pt,
|
|
722
|
-
class
|
|
722
|
+
var pt, k, Z, j, $t, Nt, ft, qt, oe, le;
|
|
723
|
+
class rs extends Le {
|
|
723
724
|
constructor() {
|
|
724
725
|
super();
|
|
725
726
|
s(this, pt, null);
|
|
726
|
-
s(this,
|
|
727
|
+
s(this, k, null);
|
|
727
728
|
s(this, Z, !1);
|
|
728
729
|
s(this, j, 0);
|
|
729
730
|
s(this, $t, 0);
|
|
@@ -731,30 +732,30 @@ class ss extends Pe {
|
|
|
731
732
|
s(this, ft, () => {
|
|
732
733
|
h(this, Z, this.offsetWidth > this.offsetHeight);
|
|
733
734
|
const e = t(this, Z) ? this.offsetWidth : this.offsetHeight;
|
|
734
|
-
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, 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"), h(this, $t, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, qt).call(this);
|
|
735
736
|
});
|
|
736
737
|
s(this, qt, () => {
|
|
737
|
-
h(this, Nt, this.scrollElement.currentProgress * t(this, $t)), t(this, Z) ? t(this,
|
|
738
|
+
h(this, Nt, this.scrollElement.currentProgress * t(this, $t)), t(this, Z) ? t(this, k).style.transform = `translate3d(${t(this, Nt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Nt)}px, 0px)`;
|
|
738
739
|
});
|
|
739
740
|
s(this, oe, () => {
|
|
740
741
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
741
742
|
});
|
|
742
743
|
s(this, le, (e) => {
|
|
743
|
-
document.documentElement.classList.add("grabbing"),
|
|
744
|
-
(
|
|
745
|
-
const
|
|
746
|
-
this.scrollElement.setPosition(i +
|
|
744
|
+
document.documentElement.classList.add("grabbing"), Ye(
|
|
745
|
+
(a) => {
|
|
746
|
+
const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, $t), z = (b - r) * C;
|
|
747
|
+
this.scrollElement.setPosition(i + z);
|
|
747
748
|
},
|
|
748
749
|
() => {
|
|
749
750
|
document.documentElement.classList.remove("grabbing");
|
|
750
751
|
}
|
|
751
752
|
);
|
|
752
|
-
const i = this.scrollElement.damped.target,
|
|
753
|
+
const i = this.scrollElement.damped.target, r = t(this, Z) ? e.x : e.y;
|
|
753
754
|
});
|
|
754
755
|
if (H) {
|
|
755
756
|
const e = this.attachShadow({ mode: "open" });
|
|
756
757
|
e.adoptedStyleSheets = [
|
|
757
|
-
|
|
758
|
+
Te({
|
|
758
759
|
":host": {
|
|
759
760
|
display: "inline-block",
|
|
760
761
|
zIndex: "1",
|
|
@@ -787,21 +788,21 @@ class ss extends Pe {
|
|
|
787
788
|
}
|
|
788
789
|
}
|
|
789
790
|
get thumbElement() {
|
|
790
|
-
return t(this,
|
|
791
|
+
return t(this, k);
|
|
791
792
|
}
|
|
792
793
|
connectedCallback() {
|
|
793
794
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
794
795
|
const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
|
|
795
|
-
h(this,
|
|
796
|
+
h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, le)), At.subscribe(t(this, ft), ye.SCROLL), Yt.subscribe(this, t(this, ft)), Yt.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, oe));
|
|
796
797
|
}
|
|
797
798
|
disconnectedCallback() {
|
|
798
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this,
|
|
799
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, le)), At.unsubscribe(t(this, ft)), Yt.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, oe));
|
|
799
800
|
}
|
|
800
801
|
}
|
|
801
|
-
pt = new WeakMap(),
|
|
802
|
-
H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar",
|
|
802
|
+
pt = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), $t = new WeakMap(), Nt = new WeakMap(), ft = new WeakMap(), qt = new WeakMap(), oe = new WeakMap(), le = new WeakMap();
|
|
803
|
+
H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", rs);
|
|
803
804
|
var Ut, Gt, Kt;
|
|
804
|
-
class
|
|
805
|
+
class He extends Le {
|
|
805
806
|
constructor() {
|
|
806
807
|
super();
|
|
807
808
|
s(this, Ut, new p(this, "--behaviour", "smooth"));
|
|
@@ -812,10 +813,10 @@ class Oe extends Pe {
|
|
|
812
813
|
));
|
|
813
814
|
s(this, Kt, new p(this, "--tween-duration", 0));
|
|
814
815
|
H && this.addEventListener("click", () => {
|
|
815
|
-
const e = t(this, Ut).current, i = t(this, Gt).current,
|
|
816
|
+
const e = t(this, Ut).current, i = t(this, Gt).current, r = t(this, Kt).current;
|
|
816
817
|
this.handleClick({
|
|
817
818
|
behaviour: e,
|
|
818
|
-
tween: i ||
|
|
819
|
+
tween: i || r ? { easing: i, duration: r } : void 0
|
|
819
820
|
});
|
|
820
821
|
});
|
|
821
822
|
}
|
|
@@ -828,7 +829,7 @@ class Oe extends Pe {
|
|
|
828
829
|
}
|
|
829
830
|
Ut = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap();
|
|
830
831
|
var _t;
|
|
831
|
-
class
|
|
832
|
+
class ns extends He {
|
|
832
833
|
constructor() {
|
|
833
834
|
super(...arguments);
|
|
834
835
|
s(this, _t, new p(this, "--set", 1));
|
|
@@ -844,9 +845,9 @@ class is extends Oe {
|
|
|
844
845
|
}
|
|
845
846
|
}
|
|
846
847
|
_t = new WeakMap();
|
|
847
|
-
H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button",
|
|
848
|
+
H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ns);
|
|
848
849
|
var J, Zt;
|
|
849
|
-
class
|
|
850
|
+
class hs extends He {
|
|
850
851
|
constructor() {
|
|
851
852
|
super(...arguments);
|
|
852
853
|
s(this, J, new p(this, "--step", 1));
|
|
@@ -870,10 +871,10 @@ class rs extends Oe {
|
|
|
870
871
|
}
|
|
871
872
|
}
|
|
872
873
|
J = new WeakMap(), Zt = new WeakMap();
|
|
873
|
-
H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button",
|
|
874
|
+
H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", hs);
|
|
874
875
|
var Q, mt, jt, ce, ae, Jt;
|
|
875
|
-
class
|
|
876
|
-
constructor(
|
|
876
|
+
class os {
|
|
877
|
+
constructor(n, e, i) {
|
|
877
878
|
s(this, Q, null);
|
|
878
879
|
s(this, mt, null);
|
|
879
880
|
s(this, jt, null);
|
|
@@ -889,7 +890,7 @@ class ns {
|
|
|
889
890
|
t(this, mt).counter.current === t(this, jt)
|
|
890
891
|
);
|
|
891
892
|
});
|
|
892
|
-
H && (h(this, Q, document.createElement("button")), h(this, mt,
|
|
893
|
+
H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ce, i), h(this, jt, e), t(this, Q).addEventListener("click", t(this, ae)), t(this, mt).counter.subscribe(t(this, Jt)), t(this, Jt).call(this));
|
|
893
894
|
}
|
|
894
895
|
get element() {
|
|
895
896
|
return t(this, Q);
|
|
@@ -899,58 +900,58 @@ class ns {
|
|
|
899
900
|
}
|
|
900
901
|
}
|
|
901
902
|
Q = new WeakMap(), mt = new WeakMap(), jt = new WeakMap(), ce = new WeakMap(), ae = new WeakMap(), Jt = new WeakMap();
|
|
902
|
-
var bt,
|
|
903
|
-
class
|
|
903
|
+
var bt, zt;
|
|
904
|
+
class ls extends Le {
|
|
904
905
|
constructor() {
|
|
905
906
|
super(...arguments);
|
|
906
907
|
s(this, bt, []);
|
|
907
|
-
s(this,
|
|
908
|
+
s(this, zt, ts(() => {
|
|
908
909
|
t(this, bt).forEach((i) => i.destroy()), h(this, bt, []);
|
|
909
910
|
const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
910
911
|
for (let i = 0; i < e; i++) {
|
|
911
|
-
const
|
|
912
|
+
const r = new os(
|
|
912
913
|
this.scrollElement,
|
|
913
914
|
i,
|
|
914
915
|
this.getAttribute("behaviour") || "smooth"
|
|
915
916
|
);
|
|
916
|
-
this.appendChild(
|
|
917
|
+
this.appendChild(r.element), t(this, bt).push(r);
|
|
917
918
|
}
|
|
918
919
|
}, 0));
|
|
919
920
|
}
|
|
920
921
|
connectedCallback() {
|
|
921
922
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
922
923
|
"sectionsChange",
|
|
923
|
-
t(this,
|
|
924
|
+
t(this, zt)
|
|
924
925
|
), this.scrollElement.sectionsInViewCSSProperty.subscribe(
|
|
925
|
-
t(this,
|
|
926
|
+
t(this, zt)
|
|
926
927
|
);
|
|
927
928
|
}
|
|
928
929
|
disconnectedCallback() {
|
|
929
930
|
this.scrollElement.removeEventListener(
|
|
930
931
|
"sectionsChange",
|
|
931
|
-
t(this,
|
|
932
|
+
t(this, zt)
|
|
932
933
|
), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
|
|
933
|
-
t(this,
|
|
934
|
+
t(this, zt)
|
|
934
935
|
), t(this, bt).forEach((e) => e.destroy()), h(this, bt, []);
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
|
-
bt = new WeakMap(),
|
|
938
|
-
H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons",
|
|
939
|
-
class
|
|
938
|
+
bt = new WeakMap(), zt = new WeakMap();
|
|
939
|
+
H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ls);
|
|
940
|
+
class cs extends es {
|
|
940
941
|
connectedCallback() {
|
|
941
|
-
const
|
|
942
|
-
|
|
942
|
+
const n = Ve(this, te);
|
|
943
|
+
n instanceof te ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
943
944
|
"scrollSectionsChange",
|
|
944
945
|
this.findAnotherScrollEntries
|
|
945
946
|
)) : console.error(this, "e-scroll not found");
|
|
946
947
|
}
|
|
947
948
|
}
|
|
948
|
-
H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment",
|
|
949
|
+
H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", cs);
|
|
949
950
|
export {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
951
|
+
ls as ScrollBulletButtonsElement,
|
|
952
|
+
te as ScrollElement,
|
|
953
|
+
cs as ScrollSegmentElement,
|
|
954
|
+
ns as ScrollSetButtonElement,
|
|
955
|
+
hs as ScrollStepButtonElement,
|
|
956
|
+
rs as ScrollbarElement
|
|
956
957
|
};
|