aptechka 0.4.4 → 0.4.6

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.
Files changed (49) hide show
  1. package/lib/checkbox/index.cjs +1 -0
  2. package/lib/checkbox/index.d.ts +16 -0
  3. package/lib/checkbox/index.js +120 -0
  4. package/lib/{index-DGji4duy.js → index-BigQay-N.js} +112 -109
  5. package/lib/index-DTrWxWOM.cjs +9 -0
  6. package/lib/popover/PopoverButtonElement.d.ts +3 -3
  7. package/lib/popover/index.cjs +1 -1
  8. package/lib/popover/index.js +60 -47
  9. package/lib/router/index.js +1 -3
  10. package/lib/scroll/ScrollBulletButtonsElement.d.ts +12 -0
  11. package/lib/scroll/ScrollButtonElement.d.ts +6 -0
  12. package/lib/scroll/ScrollElement.d.ts +15 -1
  13. package/lib/scroll/ScrollSetButtonElement.d.ts +10 -0
  14. package/lib/scroll/ScrollStepButtonElement.d.ts +10 -0
  15. package/lib/scroll/index.cjs +1 -1
  16. package/lib/scroll/index.d.ts +3 -0
  17. package/lib/scroll/index.js +388 -252
  18. package/lib/select/index.cjs +1 -1
  19. package/lib/select/index.js +1 -1
  20. package/lib/source/SourceClass.d.ts +1 -1
  21. package/lib/theme/index.cjs +1 -1
  22. package/lib/theme/index.d.ts +5 -0
  23. package/lib/theme/index.js +5 -4
  24. package/lib/{studio/tweaker → tweaker}/TweakerBooleanManagerElement.d.ts +1 -1
  25. package/lib/{studio/tweaker → tweaker}/TweakerColorManagerElement.d.ts +1 -1
  26. package/lib/{studio/tweaker → tweaker}/TweakerElement.d.ts +1 -1
  27. package/lib/{studio/tweaker → tweaker}/TweakerFieldElement.d.ts +4 -4
  28. package/lib/{studio/tweaker → tweaker}/TweakerFolderElement.d.ts +4 -4
  29. package/lib/{studio/tweaker → tweaker}/TweakerLinkManagerElement.d.ts +1 -1
  30. package/lib/{studio/tweaker → tweaker}/TweakerNumberManagerElement.d.ts +1 -1
  31. package/lib/{studio/tweaker → tweaker}/TweakerRangeManagerElement.d.ts +1 -1
  32. package/lib/{studio/tweaker → tweaker}/TweakerSelectManagerElement.d.ts +1 -1
  33. package/lib/tweaker/TweakerStoreManagerElement.d.ts +11 -0
  34. package/lib/{studio/tweaker → tweaker}/TweakerStringManagerElement.d.ts +1 -1
  35. package/lib/tweaker/index.cjs +10 -0
  36. package/lib/tweaker/index.d.ts +1 -0
  37. package/lib/{studio → tweaker}/index.js +276 -311
  38. package/lib/{studio/tweaker → tweaker}/tweakerManagerConstructors.d.ts +1 -1
  39. package/lib/{studio/studioStorage.d.ts → tweaker/tweakerStorage.d.ts} +3 -3
  40. package/package.json +17 -14
  41. package/lib/abstract-elements/AbstractButtonElement.d.ts +0 -6
  42. package/lib/abstract-elements/index.cjs +0 -1
  43. package/lib/abstract-elements/index.d.ts +0 -1
  44. package/lib/abstract-elements/index.js +0 -27
  45. package/lib/index-CUE4tEUr.cjs +0 -9
  46. package/lib/studio/StudioElement.d.ts +0 -13
  47. package/lib/studio/index.cjs +0 -10
  48. package/lib/studio/index.d.ts +0 -1
  49. package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +0 -11
@@ -1,76 +1,77 @@
1
- var Mt = (e, s, i) => {
1
+ var Ft = (e, s, i) => {
2
2
  if (!s.has(e))
3
3
  throw TypeError("Cannot " + i);
4
4
  };
5
- var n = (e, s, i) => (Mt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), F = (e, s, i) => {
5
+ var h = (e, s, i) => (Ft(e, s, "read from private field"), i ? i.call(e) : s.get(e)), S = (e, s, i) => {
6
6
  if (s.has(e))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
9
- }, V = (e, s, i, r) => (Mt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i);
10
- import { D as Bt } from "../Damped-HhitpTP_.js";
11
- import { S as Kt } from "../Store-BQXXikps.js";
12
- import { D as Gt } from "../Derived-kPJs5JC5.js";
13
- import { i as zt } from "../browser-0zX67oeU.js";
14
- import { a as vt, g as wt } from "../layout-HoBT_Da2.js";
15
- import { c as At } from "../math-BOBiC4TN.js";
9
+ }, y = (e, s, i, r) => (Ft(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i);
10
+ import { D as ne } from "../Damped-HhitpTP_.js";
11
+ import { S as he } from "../Store-BQXXikps.js";
12
+ import { D as oe } from "../Derived-kPJs5JC5.js";
13
+ import { i as Dt } from "../browser-0zX67oeU.js";
14
+ import { a as Pt, g as Mt } from "../layout-HoBT_Da2.js";
15
+ import { c as Qt } from "../math-BOBiC4TN.js";
16
16
  import "../ticker/index.js";
17
- import { W as Ut, K as Zt } from "../WheelControls-BAyRKpRZ.js";
18
- import { CustomElement as $t, define as Dt } from "../custom-element/index.js";
19
- import { TICK_ORDER as qt, RESIZE_ORDER as Ot } from "../order/index.js";
20
- import { windowResizer as ct } from "../window-resizer/index.js";
21
- import { scrollEntries as U } from "../scroll-entries/index.js";
22
- import { e as Vt, D as Ct, ay as bt } from "../tags-CAxO5Rs3.js";
23
- import { c as Rt } from "../createStylesheet-DrkbCUJk.js";
24
- import { cssUnitParser as Jt } from "../css-unit-parser/index.js";
25
- import { CSSProperty as E } from "../css-property/index.js";
26
- import { f as Nt } from "../dom-0S_WDL4g.js";
27
- import { aptechkaTheme as Pt } from "../theme/index.js";
28
- var Qt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Yt = (e, s, i, r) => {
29
- for (var l = r > 1 ? void 0 : r ? Xt(s, i) : s, f = e.length - 1, w; f >= 0; f--)
30
- (w = e[f]) && (l = (r ? w(s, i, l) : w(l)) || l);
31
- return r && l && Qt(s, i, l), l;
32
- }, kt = (e, s, i) => {
17
+ import { W as le, K as ae } from "../WheelControls-BAyRKpRZ.js";
18
+ import { CustomElement as Xt, define as at } from "../custom-element/index.js";
19
+ import { TICK_ORDER as ce, RESIZE_ORDER as Yt } from "../order/index.js";
20
+ import { windowResizer as _t } from "../window-resizer/index.js";
21
+ import { scrollEntries as N } from "../scroll-entries/index.js";
22
+ import { e as Tt, D as Lt, ay as St, p as ue } from "../tags-CAxO5Rs3.js";
23
+ import { c as Vt } from "../createStylesheet-DrkbCUJk.js";
24
+ import { cssUnitParser as pe } from "../css-unit-parser/index.js";
25
+ import { CSSProperty as k } from "../css-property/index.js";
26
+ import { f as fe } from "../dom-0S_WDL4g.js";
27
+ import { aptechkaTheme as Gt } from "../theme/index.js";
28
+ import { d as de } from "../function-C10DGppn.js";
29
+ var ve = Object.defineProperty, me = Object.getOwnPropertyDescriptor, ge = (e, s, i, r) => {
30
+ for (var n = r > 1 ? void 0 : r ? me(s, i) : s, a = e.length - 1, u; a >= 0; a--)
31
+ (u = e[a]) && (n = (r ? u(s, i, n) : u(n)) || n);
32
+ return r && n && ve(s, i, n), n;
33
+ }, Rt = (e, s, i) => {
33
34
  if (!s.has(e))
34
35
  throw TypeError("Cannot " + i);
35
- }, t = (e, s, i) => (kt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), h = (e, s, i) => {
36
+ }, t = (e, s, i) => (Rt(e, s, "read from private field"), i ? i.call(e) : s.get(e)), o = (e, s, i) => {
36
37
  if (s.has(e))
37
38
  throw TypeError("Cannot add the same private member more than once");
38
39
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
39
- }, d = (e, s, i, r) => (kt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), m = (e, s, i) => (kt(e, s, "access private method"), i), a, x, L, W, z, B, y, R, K, G, u, ut, c, j, tt, _, p, D, M, H, v, q, T, Q, pt, Z, X, ft, Et, dt, Wt, et, _t, st, St, I, gt, xt, Tt, it, rt, yt, S, g, O, C;
40
- class jt {
40
+ }, v = (e, s, i, r) => (Rt(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), m = (e, s, i) => (Rt(e, s, "access private method"), i), c, E, O, P, z, Z, C, B, q, J, f, Et, p, ct, ut, w, d, T, M, G, b, j, H, rt, xt, Q, nt, yt, It, Ct, Bt, pt, $t, ft, Ot, K, kt, zt, jt, dt, vt, At, _, g, V, L;
41
+ class be {
41
42
  constructor(s, i) {
42
- F(this, S, void 0);
43
- F(this, g, void 0);
44
- F(this, O, 0);
45
- F(this, C, 0);
46
- V(this, S, s), V(this, g, i), U.register(n(this, S));
43
+ S(this, _, void 0);
44
+ S(this, g, void 0);
45
+ S(this, V, 0);
46
+ S(this, L, 0);
47
+ y(this, _, s), y(this, g, i), N.register(h(this, _));
47
48
  }
48
49
  get size() {
49
- return n(this, O);
50
+ return h(this, V);
50
51
  }
51
52
  get position() {
52
- return n(this, C);
53
+ return h(this, L);
53
54
  }
54
55
  destroy() {
55
- U.unregister(n(this, S)), n(this, S).style.transform = "";
56
+ N.unregister(h(this, _)), h(this, _).style.transform = "";
56
57
  }
57
58
  resize() {
58
- V(this, O, n(this, g).vertical ? n(this, S).offsetHeight : n(this, S).offsetWidth), V(this, C, n(this, g).vertical ? vt(n(this, S)) : wt(n(this, S))), V(this, C, n(this, C) - n(this, g).contentPosition);
59
+ y(this, V, h(this, g).vertical ? h(this, _).offsetHeight : h(this, _).offsetWidth), y(this, L, h(this, g).vertical ? Pt(h(this, _)) : Mt(h(this, _))), y(this, L, h(this, L) - h(this, g).contentPosition);
59
60
  }
60
61
  transform() {
61
62
  let s = 0;
62
- const i = n(this, g).viewportSize - n(this, O);
63
- n(this, g).infiniteProperty.current && n(this, g).overscroll && n(this, C) + n(this, O) < n(this, g).currentScrollValue && (s = n(this, g).distance * -1 - n(this, g).gap), U.update(
64
- n(this, S),
65
- n(this, g).axisAttibute.current,
63
+ const i = h(this, g).viewportSize - h(this, V);
64
+ h(this, g).infiniteProperty.current && h(this, g).overscroll && h(this, L) + h(this, V) < h(this, g).currentScrollValue && (s = h(this, g).distance * -1 - h(this, g).gap), N.update(
65
+ h(this, _),
66
+ h(this, g).axisAttibute.current,
66
67
  s
67
68
  );
68
- const r = n(this, g).currentScrollValue + s, l = n(this, C) - n(this, g).viewportSize - i, f = n(this, C) + n(this, O) + i, w = At(r, l, f);
69
- n(this, g).vertical ? n(this, S).style.transform = `translate3d(0px, ${w * -1}px, 0px)` : n(this, S).style.transform = `translate3d(${w * -1}px, 0px, 0px)`;
69
+ const r = h(this, g).currentScrollValue + s, n = h(this, L) - h(this, g).viewportSize - i, a = h(this, L) + h(this, V) + i, u = Qt(r, n, a);
70
+ h(this, g).vertical ? h(this, _).style.transform = `translate3d(0px, ${u * -1}px, 0px)` : h(this, _).style.transform = `translate3d(${u * -1}px, 0px, 0px)`;
70
71
  }
71
72
  }
72
- S = new WeakMap(), g = new WeakMap(), O = new WeakMap(), C = new WeakMap();
73
- const te = Rt({
73
+ _ = new WeakMap(), g = new WeakMap(), V = new WeakMap(), L = new WeakMap();
74
+ const we = Vt({
74
75
  ":host": {
75
76
  position: "relative",
76
77
  width: "100%",
@@ -102,328 +103,339 @@ const te = Rt({
102
103
  flexShrink: "0"
103
104
  }
104
105
  });
105
- let mt = class extends $t {
106
+ let Wt = class extends Xt {
106
107
  constructor() {
107
- super(), h(this, Q), h(this, Z), h(this, ft), h(this, dt), h(this, et), h(this, st), h(this, xt), h(this, rt), h(this, a, null), h(this, x, new E(this, "--axis", "y")), h(this, L, new E(this, "--pages", 0, {
108
+ super(), o(this, rt), o(this, Q), o(this, yt), o(this, Ct), o(this, pt), o(this, ft), o(this, zt), o(this, vt), o(this, c, null), o(this, E, new k(this, "--axis", "y")), o(this, O, new k(this, "--pages", 0, {
108
109
  validate: (e) => Math.max(0, e - 1)
109
- })), h(this, W, new E(this, "--split", !1)), h(this, z, new E(this, "--sectional", !1)), h(this, B, new E(
110
+ })), o(this, P, new k(this, "--split", !1)), o(this, z, new k(this, "--sectional", !1)), o(this, Z, new k(
110
111
  this,
111
112
  "--wheel-max-delta",
112
113
  !1
113
- )), h(this, y, new E(this, "--infinite", !1)), h(this, R, new E(this, "--damping", 0.03)), h(this, K, new E(this, "--disabled", !1)), h(this, G, new E(this, "--hibernated", !1)), h(this, u, null), h(this, ut, null), h(this, c, []), h(this, j, 0), h(this, tt, 0), h(this, _, 0), h(this, p, 0), h(this, D, 0), h(this, M, null), h(this, H, null), h(this, v, new Kt(0)), h(this, q, 0), h(this, T, 0), h(this, I, () => {
114
- const e = this.currentScrollValue / t(this, p) || 0;
115
- if (d(this, j, this.vertical ? vt(this) : wt(this)), d(this, tt, this.vertical ? vt(t(this, u)) : wt(t(this, u))), d(this, _, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, L).current) {
116
- d(this, p, t(this, _) * t(this, L).current);
117
- const s = t(this, p) + t(this, _);
118
- this.vertical ? (t(this, u).style.width = s + "px", t(this, u).style.height = "100%") : (t(this, u).style.height = s + "px", t(this, u).style.width = "100%");
114
+ )), o(this, C, new k(this, "--infinite", !1)), o(this, B, new k(this, "--damping", 0.03)), o(this, q, new k(this, "--disabled", !1)), o(this, J, new k(this, "--hibernated", !1)), o(this, f, null), o(this, Et, null), o(this, p, []), o(this, ct, 0), o(this, ut, 0), o(this, w, 0), o(this, d, 0), o(this, T, 0), o(this, M, null), o(this, G, null), o(this, b, new he(0)), o(this, j, 0), o(this, H, 0), o(this, K, () => {
115
+ const e = this.currentScrollValue / t(this, d) || 0;
116
+ if (v(this, ct, this.vertical ? Pt(this) : Mt(this)), v(this, ut, this.vertical ? Pt(t(this, f)) : Mt(t(this, f))), v(this, w, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, O).current) {
117
+ v(this, d, t(this, w) * t(this, O).current);
118
+ const s = t(this, d) + t(this, w);
119
+ this.vertical ? (t(this, f).style.width = s + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = s + "px", t(this, f).style.width = "100%");
119
120
  } else
120
- this.vertical ? (t(this, u).style.width = "100%", t(this, u).style.height = "max-content", d(this, p, t(this, u).offsetHeight - t(this, _))) : (t(this, u).style.width = "max-content", t(this, u).style.height = "100%", d(this, p, t(this, u).offsetWidth - t(this, _)));
121
- if (d(this, D, Jt.parse(getComputedStyle(t(this, u)).gap)), !t(this, y).current) {
121
+ this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", v(this, d, t(this, f).offsetHeight - t(this, w))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", v(this, d, t(this, f).offsetWidth - t(this, w)));
122
+ if (v(this, T, pe.parse(getComputedStyle(t(this, f)).gap)), !t(this, C).current) {
122
123
  const s = getComputedStyle(this);
123
- d(this, p, t(this, p) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), t(this, a).max = t(this, p);
124
+ v(this, d, t(this, d) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), t(this, c).max = t(this, d);
124
125
  }
125
- if (t(this, c).forEach((s) => {
126
+ if (t(this, p).forEach((s) => {
126
127
  s.resize(), s.transform();
127
- }), t(this, y).current && t(this, c).length) {
128
- const s = t(this, c)[t(this, c).length - 1], i = s.position + s.size - t(this, _), r = t(this, p) - i;
129
- d(this, T, s.position + s.size + r);
128
+ }), t(this, C).current && t(this, p).length) {
129
+ const s = t(this, p)[t(this, p).length - 1], i = s.position + s.size - t(this, w), r = t(this, d) - i;
130
+ v(this, H, s.position + s.size + r);
130
131
  } else
131
- d(this, T, t(this, p));
132
- if (t(this, z).current && t(this, c).length) {
133
- const s = t(this, c)[t(this, v).current];
134
- t(this, a).set(s.position, !0);
132
+ v(this, H, t(this, d));
133
+ if (t(this, z).current && t(this, p).length) {
134
+ const s = t(this, p)[t(this, b).current];
135
+ t(this, c).set(s.position, !0);
135
136
  } else
136
- t(this, a).set(e * t(this, p), !0);
137
- }), h(this, gt, () => {
137
+ t(this, c).set(e * t(this, d), !0);
138
+ }), o(this, kt, () => {
138
139
  const e = this.currentScrollValue;
139
- if (d(this, q, Math.max(0, e - t(this, p))), t(this, c).length) {
140
+ if (v(this, j, Math.max(0, e - t(this, d))), t(this, p).length) {
140
141
  let s = 0;
141
- for (let i = 0; i < t(this, c).length; i++) {
142
- const r = t(this, c)[i];
142
+ for (let i = 0; i < t(this, p).length; i++) {
143
+ const r = t(this, p)[i];
143
144
  r.transform(), this.targetScrollValue + this.viewportSize / 2 >= r.position && (s = i);
144
145
  }
145
- t(this, v).current = s;
146
+ t(this, b).current = s;
146
147
  } else
147
- this.vertical ? t(this, u).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, u).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
148
- U.update(this, t(this, x).current, e);
149
- }), h(this, it, (e) => {
148
+ this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
149
+ N.update(this, t(this, E).current, e);
150
+ }), o(this, dt, (e) => {
150
151
  if (t(this, z).current) {
151
152
  const s = Math.sign(e);
152
- t(this, c).length ? this.shiftSections(s) : t(this, a).shift(s * t(this, _));
153
+ t(this, p).length ? this.shiftSections(s) : t(this, c).shift(s * t(this, w));
153
154
  } else
154
- t(this, a).shift(e);
155
- }), zt && (d(this, a, new Bt(0, {
155
+ t(this, c).shift(e);
156
+ }), Dt && (v(this, c, new ne(0, {
156
157
  damping: 0.01,
157
158
  min: 0,
158
- order: qt.SCROLL
159
- })), this.openShadow(te), Vt(this, {
159
+ order: ce.SCROLL
160
+ })), this.openShadow(we), Tt(this, {
160
161
  tabIndex: 0,
161
162
  children: [
162
- Ct({
163
+ Lt({
163
164
  class: "static",
164
- children: [bt({ name: "static" })]
165
+ children: [St({ name: "static" })]
165
166
  }),
166
- Ct({
167
+ Lt({
167
168
  class: "content",
168
- children: [bt({ ref: (e) => d(this, ut, e) })],
169
+ children: [St({ ref: (e) => v(this, Et, e) })],
169
170
  style: {
170
- flexDirection: new Gt(
171
- t(this, x),
171
+ flexDirection: new oe(
172
+ t(this, E),
172
173
  (e) => e === "x" ? "row" : "column"
173
174
  )
174
175
  },
175
- ref: (e) => d(this, u, e)
176
+ ref: (e) => v(this, f, e)
176
177
  })
177
178
  ]
178
- }), d(this, M, new Ut({ element: this })), t(this, M).changeEvent.subscribe(t(this, it)), d(this, H, new Zt({ element: this })), t(this, H).changeEvent.subscribe(t(this, it)), t(this, x).subscribe(({ current: e }) => {
179
- t(this, u).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, B).current ? "max" : e, t(this, H).dimension = e === "x" ? "width" : "height", this.isConnected && t(this, I).call(this);
180
- }), t(this, B).subscribe((e) => {
181
- t(this, M).axis = e.current ? "max" : t(this, x).current;
182
- }), t(this, L).subscribe(() => {
183
- this.isConnected && t(this, I).call(this);
184
- }), t(this, W).subscribe(({ current: e }) => {
185
- this.isConnected && (e ? m(this, Q, pt).call(this) : m(this, Z, X).call(this));
179
+ }), v(this, M, new le({ element: this })), t(this, M).changeEvent.subscribe(t(this, dt)), v(this, G, new ae({ element: this })), t(this, G).changeEvent.subscribe(t(this, dt)), t(this, E).subscribe(({ current: e }) => {
180
+ t(this, f).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, Z).current ? "max" : e, t(this, G).dimension = e === "x" ? "width" : "height", this.isConnected && t(this, K).call(this);
181
+ }), t(this, Z).subscribe((e) => {
182
+ t(this, M).axis = e.current ? "max" : t(this, E).current;
183
+ }), t(this, O).subscribe(() => {
184
+ this.isConnected && t(this, K).call(this);
185
+ }), t(this, P).subscribe(({ current: e }) => {
186
+ this.isConnected && (e ? m(this, rt, xt).call(this) : m(this, Q, nt).call(this));
186
187
  }), t(this, z).subscribe((e) => {
187
- t(this, v).current = 0, t(this, M).debounce = e.current, t(this, a).reset(), this.isConnected && (e.current && !e.previous ? m(this, Q, pt).call(this) : !e.current && e.previous && m(this, Z, X).call(this));
188
- }), t(this, y).subscribe((e) => {
189
- e.current ? (this.isConnected && (t(this, c).length || (t(this, W).current = !0)), t(this, c).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (d(this, q, 0), t(this, a).max = t(this, p), t(this, a).min = 0);
190
- }), t(this, R).subscribe((e) => {
191
- t(this, a).damping = e.current;
192
- }), t(this, K).subscribe((e) => {
193
- e.current && !e.previous ? m(this, ft, Et).call(this) : !e.current && e.previous && m(this, dt, Wt).call(this);
194
- }), t(this, G).subscribe((e) => {
195
- e.current && !e.previous ? m(this, et, _t).call(this) : !e.current && e.previous && m(this, st, St).call(this);
188
+ t(this, b).current = 0, t(this, M).debounce = e.current, t(this, c).reset(), this.isConnected && (e.current && !e.previous ? m(this, rt, xt).call(this) : !e.current && e.previous && m(this, Q, nt).call(this));
189
+ }), t(this, C).subscribe((e) => {
190
+ e.current ? (this.isConnected && (t(this, p).length || (t(this, P).current = !0)), t(this, p).length && (t(this, c).max = 1 / 0, t(this, c).min = -1 / 0)) : (v(this, j, 0), t(this, c).max = t(this, d), t(this, c).min = 0);
191
+ }), t(this, B).subscribe((e) => {
192
+ t(this, c).damping = e.current;
193
+ }), t(this, q).subscribe((e) => {
194
+ e.current && !e.previous ? m(this, yt, It).call(this) : !e.current && e.previous && m(this, Ct, Bt).call(this);
195
+ }), t(this, J).subscribe((e) => {
196
+ e.current && !e.previous ? m(this, pt, $t).call(this) : !e.current && e.previous && m(this, ft, Ot).call(this);
196
197
  }));
197
198
  }
198
199
  get dampingProperty() {
199
- return t(this, R);
200
+ return t(this, B);
200
201
  }
201
202
  get axisAttibute() {
202
- return t(this, x);
203
+ return t(this, E);
203
204
  }
204
205
  get pagesAttibute() {
205
- return t(this, L);
206
+ return t(this, O);
206
207
  }
207
208
  get splitAttibute() {
208
- return t(this, W);
209
+ return t(this, P);
209
210
  }
210
211
  get sectionalAttibute() {
211
212
  return t(this, z);
212
213
  }
213
214
  get infiniteProperty() {
214
- return t(this, y);
215
+ return t(this, C);
215
216
  }
216
217
  get dampingAttibute() {
217
- return t(this, R);
218
+ return t(this, B);
218
219
  }
219
220
  get disabledAttibute() {
220
- return t(this, K);
221
+ return t(this, q);
221
222
  }
222
223
  get hibernatedAttibute() {
223
- return t(this, G);
224
+ return t(this, J);
224
225
  }
225
226
  get currentScrollValue() {
226
- return m(this, rt, yt).call(this, "current");
227
+ return m(this, vt, At).call(this, "current");
227
228
  }
228
229
  get targetScrollValue() {
229
- return m(this, rt, yt).call(this, "target");
230
+ return m(this, vt, At).call(this, "target");
230
231
  }
231
232
  get contentElement() {
232
- return t(this, u);
233
+ return t(this, f);
234
+ }
235
+ get sections() {
236
+ return t(this, p);
233
237
  }
234
238
  get position() {
235
- return t(this, j);
239
+ return t(this, ct);
236
240
  }
237
241
  get contentPosition() {
238
- return t(this, tt);
242
+ return t(this, ut);
239
243
  }
240
244
  get viewportSize() {
241
- return t(this, _);
245
+ return t(this, w);
242
246
  }
243
247
  get scrollSize() {
244
- return t(this, p);
248
+ return t(this, d);
245
249
  }
246
250
  get gap() {
247
- return t(this, D);
251
+ return t(this, T);
248
252
  }
249
253
  get counter() {
250
- return t(this, v);
254
+ return t(this, b);
251
255
  }
252
256
  get distance() {
253
- return t(this, T);
257
+ return t(this, H);
254
258
  }
255
259
  get overscroll() {
256
- return t(this, q);
260
+ return t(this, j);
257
261
  }
258
262
  get vertical() {
259
- return t(this, x).current === "y";
263
+ return t(this, E).current === "y";
260
264
  }
261
265
  get currentProgress() {
262
- return this.currentScrollValue / t(this, T) || 0;
266
+ return this.currentScrollValue / t(this, H) || 0;
263
267
  }
264
268
  get targetProgress() {
265
- return this.targetScrollValue / t(this, T) || 0;
269
+ return this.targetScrollValue / t(this, H) || 0;
266
270
  }
267
271
  get speed() {
268
- return t(this, a).speed;
272
+ return t(this, c).speed;
269
273
  }
270
274
  get direction() {
271
- return t(this, a).direction;
275
+ return t(this, c).direction;
272
276
  }
273
277
  get isRunning() {
274
- return t(this, a).isRunning;
278
+ return t(this, c).isRunning;
275
279
  }
276
280
  get scrollWidth() {
277
- return t(this, x).current === "y" ? 0 : t(this, a).length;
281
+ return t(this, E).current === "y" ? 0 : t(this, c).length;
278
282
  }
279
283
  get scrollHeight() {
280
- return t(this, x).current === "x" ? 0 : t(this, a).length;
284
+ return t(this, E).current === "x" ? 0 : t(this, c).length;
281
285
  }
282
286
  onScroll(...e) {
283
- return t(this, a).subscribe(...e);
287
+ return t(this, c).subscribe(...e);
284
288
  }
285
289
  offScroll(...e) {
286
- t(this, a).unsubscribe(...e);
290
+ t(this, c).unsubscribe(...e);
287
291
  }
288
292
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
289
293
  range(e, s, i = 0) {
290
- const r = e - i, l = r + s + i * 2;
291
- return this.currentProgress < r ? 0 : this.currentProgress > l ? 1 : (this.currentProgress - r) / (l - r);
294
+ const r = e - i, n = r + s + i * 2;
295
+ return this.currentProgress < r ? 0 : this.currentProgress > n ? 1 : (this.currentProgress - r) / (n - r);
292
296
  }
293
297
  curve(e, s, i = 0) {
294
298
  return Math.sin(this.range(e, s, i) * Math.PI);
295
299
  }
296
300
  visible(e, s, i = 0) {
297
- const r = e - i, l = r + s + i * 2;
298
- return this.currentProgress >= r && this.currentProgress <= l;
301
+ const r = e - i, n = r + s + i * 2;
302
+ return this.currentProgress >= r && this.currentProgress <= n;
299
303
  }
300
304
  // TODO: Поправить значение когда скролл не секционный ??
301
305
  scrollToSection(e, s = "smooth") {
302
- if (!t(this, c).length)
306
+ if (!t(this, p).length)
303
307
  return;
304
- const i = t(this, v).current;
305
- m(this, xt, Tt).call(this, e);
306
- const r = t(this, c)[i], l = t(this, c)[t(this, v).current];
307
- if (r && l) {
308
- let f = 0;
309
- const w = t(this, c).length - 1;
310
- t(this, y).current ? t(this, v).current === 0 && i === w ? f = t(this, p) + t(this, _) - r.position + t(this, D) : t(this, v).current === w && i === 0 ? f = l.position - (t(this, p) + t(this, _) + t(this, D)) : f = l.position - r.position : f = l.position - r.position, t(this, a).shift(f, s === "instant");
308
+ const i = t(this, b).current;
309
+ m(this, zt, jt).call(this, e);
310
+ const r = t(this, p)[i], n = t(this, p)[t(this, b).current];
311
+ if (r && n) {
312
+ let a = 0;
313
+ const u = t(this, p).length - 1;
314
+ t(this, C).current ? t(this, b).current === 0 && i === u ? a = t(this, d) + t(this, w) - r.position + t(this, T) : t(this, b).current === u && i === 0 ? a = n.position - (t(this, d) + t(this, w) + t(this, T)) : a = n.position - r.position : a = n.position - r.position, t(this, c).shift(a, s === "instant");
311
315
  }
312
316
  }
313
317
  shiftSections(e, s = "smooth") {
314
- t(this, c).length && this.scrollToSection(t(this, v).current + e, s);
318
+ t(this, p).length && this.scrollToSection(t(this, b).current + e, s);
315
319
  }
316
320
  setPosition(e, s = "smooth") {
317
- t(this, a).set(e, s === "instant");
321
+ t(this, c).set(e, s === "instant");
318
322
  }
319
323
  connectedCallback() {
320
- t(this, x).observe(), t(this, L).observe(), t(this, W).observe(), t(this, z).observe(), t(this, B).observe(), t(this, y).observe(), t(this, R).observe(), t(this, K).observe(), t(this, G).observe(), m(this, st, St).call(this);
324
+ t(this, E).observe(), t(this, O).observe(), t(this, P).observe(), t(this, z).observe(), t(this, Z).observe(), t(this, C).observe(), t(this, B).observe(), t(this, q).observe(), t(this, J).observe(), m(this, ft, Ot).call(this);
321
325
  }
322
326
  disconnectedCallback() {
323
- t(this, x).unobserve(), t(this, L).unobserve(), t(this, W).unobserve(), t(this, z).unobserve(), t(this, B).unobserve(), t(this, y).unobserve(), t(this, R).unobserve(), t(this, K).unobserve(), t(this, G).unobserve(), m(this, et, _t).call(this);
327
+ t(this, E).unobserve(), t(this, O).unobserve(), t(this, P).unobserve(), t(this, z).unobserve(), t(this, Z).unobserve(), t(this, C).unobserve(), t(this, B).unobserve(), t(this, q).unobserve(), t(this, J).unobserve(), m(this, pt, $t).call(this);
324
328
  }
325
329
  };
326
- a = /* @__PURE__ */ new WeakMap();
327
- x = /* @__PURE__ */ new WeakMap();
328
- L = /* @__PURE__ */ new WeakMap();
329
- W = /* @__PURE__ */ new WeakMap();
330
+ c = /* @__PURE__ */ new WeakMap();
331
+ E = /* @__PURE__ */ new WeakMap();
332
+ O = /* @__PURE__ */ new WeakMap();
333
+ P = /* @__PURE__ */ new WeakMap();
330
334
  z = /* @__PURE__ */ new WeakMap();
335
+ Z = /* @__PURE__ */ new WeakMap();
336
+ C = /* @__PURE__ */ new WeakMap();
331
337
  B = /* @__PURE__ */ new WeakMap();
332
- y = /* @__PURE__ */ new WeakMap();
333
- R = /* @__PURE__ */ new WeakMap();
334
- K = /* @__PURE__ */ new WeakMap();
335
- G = /* @__PURE__ */ new WeakMap();
336
- u = /* @__PURE__ */ new WeakMap();
337
- ut = /* @__PURE__ */ new WeakMap();
338
- c = /* @__PURE__ */ new WeakMap();
339
- j = /* @__PURE__ */ new WeakMap();
340
- tt = /* @__PURE__ */ new WeakMap();
341
- _ = /* @__PURE__ */ new WeakMap();
338
+ q = /* @__PURE__ */ new WeakMap();
339
+ J = /* @__PURE__ */ new WeakMap();
340
+ f = /* @__PURE__ */ new WeakMap();
341
+ Et = /* @__PURE__ */ new WeakMap();
342
342
  p = /* @__PURE__ */ new WeakMap();
343
- D = /* @__PURE__ */ new WeakMap();
343
+ ct = /* @__PURE__ */ new WeakMap();
344
+ ut = /* @__PURE__ */ new WeakMap();
345
+ w = /* @__PURE__ */ new WeakMap();
346
+ d = /* @__PURE__ */ new WeakMap();
347
+ T = /* @__PURE__ */ new WeakMap();
344
348
  M = /* @__PURE__ */ new WeakMap();
349
+ G = /* @__PURE__ */ new WeakMap();
350
+ b = /* @__PURE__ */ new WeakMap();
351
+ j = /* @__PURE__ */ new WeakMap();
345
352
  H = /* @__PURE__ */ new WeakMap();
346
- v = /* @__PURE__ */ new WeakMap();
347
- q = /* @__PURE__ */ new WeakMap();
348
- T = /* @__PURE__ */ new WeakMap();
349
- Q = /* @__PURE__ */ new WeakSet();
350
- pt = function() {
351
- m(this, Z, X).call(this), t(this, ut).assignedElements().forEach((e) => {
352
- e instanceof HTMLElement && t(this, c).push(new jt(e, this));
353
- }), t(this, u).style.transform = "", t(this, I).call(this);
353
+ rt = /* @__PURE__ */ new WeakSet();
354
+ xt = function() {
355
+ m(this, Q, nt).call(this), t(this, Et).assignedElements().forEach((e) => {
356
+ e instanceof HTMLElement && t(this, p).push(new be(e, this));
357
+ }), t(this, f).style.transform = "", this.dispatchEvent(
358
+ new CustomEvent("sectionsChange", {
359
+ composed: !0
360
+ })
361
+ ), t(this, K).call(this);
354
362
  };
355
- Z = /* @__PURE__ */ new WeakSet();
356
- X = function() {
357
- t(this, c).forEach((e) => {
363
+ Q = /* @__PURE__ */ new WeakSet();
364
+ nt = function() {
365
+ t(this, p).forEach((e) => {
358
366
  e.destroy();
359
- }), d(this, c, []);
367
+ }), v(this, p, []), this.dispatchEvent(
368
+ new CustomEvent("sectionsChange", {
369
+ composed: !0
370
+ })
371
+ );
360
372
  };
361
- ft = /* @__PURE__ */ new WeakSet();
362
- Et = function() {
363
- t(this, a).unsubscribe(t(this, gt)), t(this, a).stopAnimation(), t(this, M).disconnect(), t(this, H).disconnect();
373
+ yt = /* @__PURE__ */ new WeakSet();
374
+ It = function() {
375
+ t(this, c).unsubscribe(t(this, kt)), t(this, c).stopAnimation(), t(this, M).disconnect(), t(this, G).disconnect();
364
376
  };
365
- dt = /* @__PURE__ */ new WeakSet();
366
- Wt = function() {
367
- t(this, a).subscribe(t(this, gt)), t(this, M).connect(), t(this, H).connect();
377
+ Ct = /* @__PURE__ */ new WeakSet();
378
+ Bt = function() {
379
+ t(this, c).subscribe(t(this, kt)), t(this, M).connect(), t(this, G).connect();
368
380
  };
369
- et = /* @__PURE__ */ new WeakSet();
370
- _t = function() {
371
- ct.unsubscribe(t(this, I)), t(this, a).reset(), m(this, ft, Et).call(this), t(this, u).style.transform = "", t(this, W).current && m(this, Z, X).call(this), U.unregister(this);
381
+ pt = /* @__PURE__ */ new WeakSet();
382
+ $t = function() {
383
+ _t.unsubscribe(t(this, K)), t(this, c).reset(), m(this, yt, It).call(this), t(this, f).style.transform = "", t(this, P).current && m(this, Q, nt).call(this), N.unregister(this);
372
384
  };
373
- st = /* @__PURE__ */ new WeakSet();
374
- St = function() {
375
- t(this, W).current && m(this, Q, pt).call(this), U.register(this), ct.subscribe(t(this, I), Ot.SCROLL), m(this, dt, Wt).call(this);
385
+ ft = /* @__PURE__ */ new WeakSet();
386
+ Ot = function() {
387
+ t(this, P).current && m(this, rt, xt).call(this), N.register(this), _t.subscribe(t(this, K), Yt.SCROLL), m(this, Ct, Bt).call(this);
376
388
  };
377
- I = /* @__PURE__ */ new WeakMap();
378
- gt = /* @__PURE__ */ new WeakMap();
379
- xt = /* @__PURE__ */ new WeakSet();
380
- Tt = function(e) {
381
- t(this, y).current ? (t(this, v).current = e % t(this, c).length, t(this, v).current = t(this, v).current < 0 ? t(this, c).length + t(this, v).current : t(this, v).current) : t(this, v).current = At(e, 0, t(this, c).length - 1);
389
+ K = /* @__PURE__ */ new WeakMap();
390
+ kt = /* @__PURE__ */ new WeakMap();
391
+ zt = /* @__PURE__ */ new WeakSet();
392
+ jt = function(e) {
393
+ t(this, C).current ? (t(this, b).current = e % t(this, p).length, t(this, b).current = t(this, b).current < 0 ? t(this, p).length + t(this, b).current : t(this, b).current) : t(this, b).current = Qt(e, 0, t(this, p).length - 1);
382
394
  };
383
- it = /* @__PURE__ */ new WeakMap();
384
- rt = /* @__PURE__ */ new WeakSet();
385
- yt = function(e = "current") {
386
- if (t(this, y).current && t(this, c).length) {
387
- const s = t(this, a)[e] % (t(this, p) + t(this, _) + t(this, D));
388
- return s < 0 ? t(this, p) + s + t(this, _) + t(this, D) : s;
395
+ dt = /* @__PURE__ */ new WeakMap();
396
+ vt = /* @__PURE__ */ new WeakSet();
397
+ At = function(e = "current") {
398
+ if (t(this, C).current && t(this, p).length) {
399
+ const s = t(this, c)[e] % (t(this, d) + t(this, w) + t(this, T));
400
+ return s < 0 ? t(this, d) + s + t(this, w) + t(this, T) : s;
389
401
  } else
390
- return t(this, a)[e];
402
+ return t(this, c)[e];
391
403
  };
392
- mt = Yt([
393
- Dt("e-scroll")
394
- ], mt);
395
- var Y;
396
- class ee extends $t {
404
+ Wt = ge([
405
+ at("e-scroll")
406
+ ], Wt);
407
+ var ht;
408
+ class Ht extends Xt {
397
409
  constructor() {
398
410
  super(...arguments);
399
- F(this, Y, null);
411
+ S(this, ht, null);
400
412
  }
401
413
  get scrollElement() {
402
- return n(this, Y);
414
+ return h(this, ht);
403
415
  }
404
416
  connectedCallback() {
405
- const i = Nt(this, mt);
406
- i instanceof mt ? V(this, Y, i) : console.error(this, "e-scroll not found");
417
+ const i = fe(this, Wt);
418
+ i instanceof Wt ? y(this, ht, i) : console.error(this, "e-scroll not found");
407
419
  }
408
420
  }
409
- Y = new WeakMap();
410
- var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, re = (e, s, i, r) => {
411
- for (var l = r > 1 ? void 0 : r ? ie(s, i) : s, f = e.length - 1, w; f >= 0; f--)
412
- (w = e[f]) && (l = (r ? w(s, i, l) : w(l)) || l);
413
- return r && l && se(s, i, l), l;
414
- }, Ht = (e, s, i) => {
421
+ ht = new WeakMap();
422
+ var _e = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Ee = (e, s, i, r) => {
423
+ for (var n = r > 1 ? void 0 : r ? Se(s, i) : s, a = e.length - 1, u; a >= 0; a--)
424
+ (u = e[a]) && (n = (r ? u(s, i, n) : u(n)) || n);
425
+ return r && n && _e(s, i, n), n;
426
+ }, te = (e, s, i) => {
415
427
  if (!s.has(e))
416
428
  throw TypeError("Cannot " + i);
417
- }, o = (e, s, i) => (Ht(e, s, "read from private field"), i ? i.call(e) : s.get(e)), k = (e, s, i) => {
429
+ }, l = (e, s, i) => (te(e, s, "read from private field"), i ? i.call(e) : s.get(e)), W = (e, s, i) => {
418
430
  if (s.has(e))
419
431
  throw TypeError("Cannot add the same private member more than once");
420
432
  s instanceof WeakSet ? s.add(e) : s.set(e, i);
421
- }, P = (e, s, i, r) => (Ht(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), nt, b, A, $, J, N, ht, ot, lt, at;
422
- const ne = Rt({
433
+ }, I = (e, s, i, r) => (te(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), tt, x, A, D, et, st, mt, gt, bt, wt;
434
+ const xe = Vt({
423
435
  ":host": {
424
436
  display: "inline-block",
425
437
  zIndex: "1",
426
- backgroundColor: Pt.colorLight.var
438
+ backgroundColor: Gt.colorLight.var
427
439
  },
428
440
  ':host([axis="y"])': {
429
441
  position: "absolute",
@@ -440,7 +452,7 @@ const ne = Rt({
440
452
  height: "1vmin"
441
453
  },
442
454
  ".default-thumb": {
443
- backgroundColor: Pt.colorDark.var,
455
+ backgroundColor: Gt.colorDark.var,
444
456
  borderRadius: "1vmin",
445
457
  touchAction: "none"
446
458
  },
@@ -448,56 +460,180 @@ const ne = Rt({
448
460
  touchAction: "none"
449
461
  }
450
462
  });
451
- let Lt = class extends ee {
463
+ let Kt = class extends Ht {
452
464
  constructor() {
453
- super(), k(this, nt, null), k(this, b, null), k(this, A, !1), k(this, $, 0), k(this, J, 0), k(this, N, 0), k(this, ht, () => {
454
- P(this, A, this.offsetWidth > this.offsetHeight);
455
- const e = o(this, A) ? this.offsetWidth : this.offsetHeight;
456
- P(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), P(this, $, Math.max(o(this, $), 30)), o(this, A) ? (o(this, b).style.width = o(this, $) + "px", o(this, b).style.height = "100%") : (o(this, b).style.width = "100%", o(this, b).style.height = o(this, $) + "px"), P(this, J, e - o(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
457
- }), k(this, ot, () => {
458
- P(this, N, this.scrollElement.currentProgress * o(this, J)), o(this, A) ? o(this, b).style.transform = `translate3d(${o(this, N)}px, 0px, 0px)` : o(this, b).style.transform = `translate3d(0px, ${o(this, N)}px, 0px)`;
459
- }), k(this, lt, () => {
465
+ super(), W(this, tt, null), W(this, x, null), W(this, A, !1), W(this, D, 0), W(this, et, 0), W(this, st, 0), W(this, mt, () => {
466
+ I(this, A, this.offsetWidth > this.offsetHeight);
467
+ const e = l(this, A) ? this.offsetWidth : this.offsetHeight;
468
+ I(this, D, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), I(this, D, Math.max(l(this, D), 30)), l(this, A) ? (l(this, x).style.width = l(this, D) + "px", l(this, x).style.height = "100%") : (l(this, x).style.width = "100%", l(this, x).style.height = l(this, D) + "px"), I(this, et, e - l(this, D)), this.scrollElement.scrollSize || (this.style.display = "none");
469
+ }), W(this, gt, () => {
470
+ I(this, st, this.scrollElement.currentProgress * l(this, et)), l(this, A) ? l(this, x).style.transform = `translate3d(${l(this, st)}px, 0px, 0px)` : l(this, x).style.transform = `translate3d(0px, ${l(this, st)}px, 0px)`;
471
+ }), W(this, bt, () => {
460
472
  this.setAttribute("axis", this.scrollElement.axisAttibute.current);
461
- }), k(this, at, (e) => {
462
- const s = (f) => {
463
- const w = o(this, A) ? f.x : f.y, It = this.scrollElement.distance / o(this, J), Ft = (w - l) * It;
464
- this.scrollElement.setPosition(r + Ft);
473
+ }), W(this, wt, (e) => {
474
+ const s = (a) => {
475
+ const u = l(this, A) ? a.x : a.y, ie = this.scrollElement.distance / l(this, et), re = (u - n) * ie;
476
+ this.scrollElement.setPosition(r + re);
465
477
  }, i = () => {
466
478
  removeEventListener("pointermove", s), removeEventListener("pointerup", i), removeEventListener("touchend", i);
467
479
  };
468
480
  addEventListener("pointermove", s), addEventListener("pointerup", i), addEventListener("touchend", i);
469
- const r = this.scrollElement.targetScrollValue, l = o(this, A) ? e.x : e.y;
470
- }), zt && (this.openShadow(ne), Vt(this, {
481
+ const r = this.scrollElement.targetScrollValue, n = l(this, A) ? e.x : e.y;
482
+ }), Dt && (this.openShadow(xe), Tt(this, {
471
483
  slot: "static",
472
- children: [bt({ ref: (e) => P(this, nt, e) })]
484
+ children: [
485
+ St({
486
+ ref: (e) => I(this, tt, e),
487
+ children: Lt({ class: "default-thumb" })
488
+ })
489
+ ]
473
490
  }));
474
491
  }
475
492
  get thumbElement() {
476
- return o(this, b);
493
+ return l(this, x);
477
494
  }
478
495
  connectedCallback() {
479
496
  super.connectedCallback();
480
- const e = o(this, nt).assignedElements()[0];
481
- e instanceof HTMLElement ? P(this, b, e) : (P(this, b, document.createElement("div")), o(this, b).classList.add("default-thumb"), this.shadowRoot.appendChild(o(this, b))), o(this, b).addEventListener("pointerdown", o(this, at)), ct.subscribe(o(this, ht), Ot.SCROLL + 1), this.scrollElement.onScroll(o(this, ot)), this.scrollElement.axisAttibute.subscribe(o(this, lt));
497
+ const e = l(this, tt).assignedElements()[0] || l(this, tt).firstElementChild;
498
+ I(this, x, e), l(this, x).addEventListener("pointerdown", l(this, wt)), _t.subscribe(l(this, mt), Yt.SCROLL + 1), this.scrollElement.onScroll(l(this, gt)), this.scrollElement.axisAttibute.subscribe(l(this, bt));
482
499
  }
483
500
  disconnectedCallback() {
484
- o(this, b).removeEventListener("pointerdown", o(this, at)), ct.unsubscribe(o(this, ht)), this.scrollElement.offScroll(o(this, ot)), this.scrollElement.axisAttibute.unsubscribe(o(this, lt));
501
+ l(this, x).removeEventListener("pointerdown", l(this, wt)), _t.unsubscribe(l(this, mt)), this.scrollElement.offScroll(l(this, gt)), this.scrollElement.axisAttibute.unsubscribe(l(this, bt));
485
502
  }
486
503
  };
487
- nt = /* @__PURE__ */ new WeakMap();
488
- b = /* @__PURE__ */ new WeakMap();
504
+ tt = /* @__PURE__ */ new WeakMap();
505
+ x = /* @__PURE__ */ new WeakMap();
489
506
  A = /* @__PURE__ */ new WeakMap();
490
- $ = /* @__PURE__ */ new WeakMap();
491
- J = /* @__PURE__ */ new WeakMap();
492
- N = /* @__PURE__ */ new WeakMap();
493
- ht = /* @__PURE__ */ new WeakMap();
494
- ot = /* @__PURE__ */ new WeakMap();
495
- lt = /* @__PURE__ */ new WeakMap();
496
- at = /* @__PURE__ */ new WeakMap();
497
- Lt = re([
498
- Dt("e-scrollbar")
499
- ], Lt);
507
+ D = /* @__PURE__ */ new WeakMap();
508
+ et = /* @__PURE__ */ new WeakMap();
509
+ st = /* @__PURE__ */ new WeakMap();
510
+ mt = /* @__PURE__ */ new WeakMap();
511
+ gt = /* @__PURE__ */ new WeakMap();
512
+ bt = /* @__PURE__ */ new WeakMap();
513
+ wt = /* @__PURE__ */ new WeakMap();
514
+ Kt = Ee([
515
+ at("e-scrollbar")
516
+ ], Kt);
517
+ const ye = Vt({
518
+ button: {
519
+ all: "inherit"
520
+ }
521
+ });
522
+ class ee extends Ht {
523
+ constructor() {
524
+ super(), this.openShadow(ye), Dt && Tt(this, {
525
+ children: [
526
+ ue({
527
+ onClick: () => {
528
+ this.handleClick();
529
+ },
530
+ children: [St()]
531
+ })
532
+ ]
533
+ });
534
+ }
535
+ }
536
+ var Ce = Object.defineProperty, We = Object.getOwnPropertyDescriptor, ke = (e, s, i, r) => {
537
+ for (var n = r > 1 ? void 0 : r ? We(s, i) : s, a = e.length - 1, u; a >= 0; a--)
538
+ (u = e[a]) && (n = (r ? u(s, i, n) : u(n)) || n);
539
+ return r && n && Ce(s, i, n), n;
540
+ };
541
+ let Ut = class extends ee {
542
+ handleClick() {
543
+ const e = this.getAttribute("index"), s = this.getAttribute("behaviour");
544
+ this.scrollElement.scrollToSection(parseInt(e || "0"), s);
545
+ }
546
+ };
547
+ Ut = ke([
548
+ at("e-scroll-set-button")
549
+ ], Ut);
550
+ var Pe = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, Le = (e, s, i, r) => {
551
+ for (var n = r > 1 ? void 0 : r ? Me(s, i) : s, a = e.length - 1, u; a >= 0; a--)
552
+ (u = e[a]) && (n = (r ? u(s, i, n) : u(n)) || n);
553
+ return r && n && Pe(s, i, n), n;
554
+ };
555
+ let Zt = class extends ee {
556
+ handleClick() {
557
+ const e = this.getAttribute("step"), s = this.getAttribute("behaviour");
558
+ this.scrollElement.shiftSections(parseInt(e || "1"), s);
559
+ }
560
+ };
561
+ Zt = Le([
562
+ at("e-scroll-step-button")
563
+ ], Zt);
564
+ var $e = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, ze = (e, s, i, r) => {
565
+ for (var n = r > 1 ? void 0 : r ? Oe(s, i) : s, a = e.length - 1, u; a >= 0; a--)
566
+ (u = e[a]) && (n = (r ? u(s, i, n) : u(n)) || n);
567
+ return r && n && $e(s, i, n), n;
568
+ }, se = (e, s, i) => {
569
+ if (!s.has(e))
570
+ throw TypeError("Cannot " + i);
571
+ }, U = (e, s, i) => (se(e, s, "read from private field"), i ? i.call(e) : s.get(e)), qt = (e, s, i) => {
572
+ if (s.has(e))
573
+ throw TypeError("Cannot add the same private member more than once");
574
+ s instanceof WeakSet ? s.add(e) : s.set(e, i);
575
+ }, Jt = (e, s, i, r) => (se(e, s, "write to private field"), r ? r.call(e, i) : s.set(e, i), i), F, it, $, R, X, ot, lt, Y;
576
+ class Ae {
577
+ constructor(s, i, r) {
578
+ S(this, $, void 0);
579
+ S(this, R, void 0);
580
+ S(this, X, void 0);
581
+ S(this, ot, void 0);
582
+ S(this, lt, () => {
583
+ h(this, R).scrollToSection(h(this, X), h(this, ot));
584
+ });
585
+ S(this, Y, () => {
586
+ h(this, $).classList.toggle(
587
+ "current",
588
+ h(this, R).counter.current === h(this, X)
589
+ );
590
+ });
591
+ y(this, $, document.createElement("button")), y(this, R, s), y(this, ot, r), y(this, X, i), h(this, $).addEventListener("click", h(this, lt)), h(this, R).counter.subscribe(h(this, Y)), h(this, Y).call(this);
592
+ }
593
+ get element() {
594
+ return h(this, $);
595
+ }
596
+ destroy() {
597
+ h(this, $).removeEventListener("click", h(this, lt)), h(this, R).counter.unsubscribe(h(this, Y)), h(this, $).remove();
598
+ }
599
+ }
600
+ $ = new WeakMap(), R = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), Y = new WeakMap();
601
+ let Nt = class extends Ht {
602
+ constructor() {
603
+ super(...arguments), qt(this, F, []), qt(this, it, de(() => {
604
+ U(this, F).forEach((e) => e.destroy()), Jt(this, F, []);
605
+ for (let e = 0; e < this.scrollElement.sections.length; e++) {
606
+ const s = new Ae(
607
+ this.scrollElement,
608
+ e,
609
+ this.getAttribute("behaviour") || "smooth"
610
+ );
611
+ this.appendChild(s.element), U(this, F).push(s);
612
+ }
613
+ }, 0));
614
+ }
615
+ connectedCallback() {
616
+ super.connectedCallback(), this.scrollElement.addEventListener(
617
+ "sectionsChange",
618
+ U(this, it)
619
+ ), U(this, it).call(this);
620
+ }
621
+ disconnectedCallback() {
622
+ this.scrollElement.removeEventListener(
623
+ "sectionsChange",
624
+ U(this, it)
625
+ ), U(this, F).forEach((e) => e.destroy()), Jt(this, F, []);
626
+ }
627
+ };
628
+ F = /* @__PURE__ */ new WeakMap();
629
+ it = /* @__PURE__ */ new WeakMap();
630
+ Nt = ze([
631
+ at("e-scroll-bullet-buttons")
632
+ ], Nt);
500
633
  export {
501
- mt as ScrollElement,
502
- Lt as ScrollbarElement
634
+ Nt as ScrollBulletButtonsElement,
635
+ Wt as ScrollElement,
636
+ Ut as ScrollSetButtonElement,
637
+ Zt as ScrollStepButtonElement,
638
+ Kt as ScrollbarElement
503
639
  };