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