aptechka 0.50.16 → 0.50.18

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