aptechka 0.31.1 → 0.32.0

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