aptechka 0.4.9 → 0.4.10

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.
@@ -0,0 +1 @@
1
+ "use strict";var P=(h,n,e)=>{if(!n.has(h))throw TypeError("Cannot "+e)};var t=(h,n,e)=>(P(h,n,"read from private field"),e?e.call(h):n.get(h)),r=(h,n,e)=>{if(n.has(h))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(h):n.set(h,e)},i=(h,n,e,a)=>(P(h,n,"write to private field"),a?a.call(h,e):n.set(h,e),e);const f=require("./browser-CpzFX2xg.cjs"),A=require("./dom-JBOkFLTh.cjs"),T=require("./gestures-DHLrn6Q8.cjs"),W=require("./number-yVpzMdbQ.cjs"),X=require("./notifier/index.cjs"),B=require("./ticker/index.cjs"),Y=require("./order/index.cjs");var q;class v{constructor(){r(this,q,new X.Notifier)}get changeEvent(){return t(this,q)}}q=new WeakMap;var u,l,c,L;class K extends v{constructor(e){super();r(this,u,null);r(this,l,null);r(this,c,"offsetHeight");r(this,L,e=>{const a=e.shiftKey?-1:1;let s;e.code==="Space"?s=a*t(this,l)[t(this,c)]*.4:e.code==="ArrowLeft"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowRight"?s=1*t(this,l)[t(this,c)]*.2:e.code==="ArrowUp"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowDown"?s=1*t(this,l)[t(this,c)]*.2:e.code==="PageUp"?s=-1*t(this,l)[t(this,c)]:e.code==="PageDown"?s=1*t(this,l)[t(this,c)]:e.code==="Home"?s=0:e.code==="End"&&(s=t(this,c)==="offsetWidth"?t(this,l).scrollWidth:t(this,l).scrollHeight),s&&(e.stopPropagation(),this.changeEvent.notify("keyboard",s))});f.isBrowser&&(i(this,u,e!=null&&e.element&&A.getElement(e.element)||window),i(this,l,t(this,u)instanceof HTMLElement?t(this,u):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,c,e==="width"?"offsetWidth":"offsetHeight")}connect(){f.isBrowser&&t(this,u).addEventListener("keydown",t(this,L))}disconnect(){f.isBrowser&&t(this,u).removeEventListener("keydown",t(this,L))}}u=new WeakMap,l=new WeakMap,c=new WeakMap,L=new WeakMap;var g,o,E,M;class R extends v{constructor(e){super();r(this,g,null);r(this,o,void 0);r(this,E,void 0);r(this,M,e=>{let a=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(a=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const s=Date.now();if(s-t(this,E)>40&&(a=100*Math.sign(a)),i(this,E,s),Math.abs(a)<100||t(this,o))return;this.changeEvent.notify("wheel",a),i(this,o,setTimeout(()=>{i(this,o,void 0)},80))}else this.changeEvent.notify("wheel",a)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,E,Date.now()),f.isBrowser&&i(this,g,e!=null&&e.element&&A.getElement(e.element)||window)}connect(){f.isBrowser&&t(this,g).addEventListener("wheel",t(this,M),{passive:!1})}disconnect(){f.isBrowser&&(t(this,g).removeEventListener("wheel",t(this,M)),clearTimeout(t(this,o)))}}g=new WeakMap,o=new WeakMap,E=new WeakMap,M=new WeakMap;var b,w,y,d,k,x;const m=class m extends v{constructor(e){super();r(this,w,null);r(this,y,!1);r(this,d,0);r(this,k,e=>{if(e.composedPath().find(s=>s instanceof HTMLElement&&s.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,x));let a=e;i(this,d,0),T.setupDrag(s=>{if(t(this,y)||t(m,b)&&t(m,b)!==t(this,w))return;this.swipe&&i(this,y,!0);const C=a.x-s.x,D=a.y-s.y;this.axis==="x"?i(this,d,C):i(this,d,D),a=s,this.changeEvent.notify("drag",t(this,d)),(this.axis==="x"&&Math.abs(C)>Math.abs(D)||this.axis==="y"&&Math.abs(C)<Math.abs(D))&&i(m,b,t(this,w))},()=>{i(m,b,null),this.swipe||(i(this,d,t(this,d)*3),B.ticker.subscribe(t(this,x),{order:Y.TICK_ORDER.SCROLL-1})),i(this,y,!1)})});r(this,x,()=>{t(this,d)||B.ticker.unsubscribe(t(this,x)),i(this,d,t(this,d)*.95),i(this,d,W.preciseNumber(t(this,d),3)),this.changeEvent.notify("drag",t(this,d))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,f.isBrowser&&i(this,w,e!=null&&e.element&&A.getElement(e.element)||document.documentElement)}connect(){f.isBrowser&&t(this,w).addEventListener("pointerdown",t(this,k))}disconnect(){f.isBrowser&&(t(this,w).removeEventListener("pointerdown",t(this,k)),B.ticker.unsubscribe(t(this,x)))}};b=new WeakMap,w=new WeakMap,y=new WeakMap,d=new WeakMap,k=new WeakMap,x=new WeakMap,r(m,b,null);let H=m;exports.Controls=v;exports.DragControls=H;exports.KeyboardControls=K;exports.WheelControls=R;
@@ -0,0 +1,146 @@
1
+ var W = (h, r, e) => {
2
+ if (!r.has(h))
3
+ throw TypeError("Cannot " + e);
4
+ };
5
+ var t = (h, r, e) => (W(h, r, "read from private field"), e ? e.call(h) : r.get(h)), a = (h, r, e) => {
6
+ if (r.has(h))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ r instanceof WeakSet ? r.add(h) : r.set(h, e);
9
+ }, i = (h, r, e, n) => (W(h, r, "write to private field"), n ? n.call(h, e) : r.set(h, e), e);
10
+ import { i as f } from "./browser-0zX67oeU.js";
11
+ import { g as P } from "./dom-0S_WDL4g.js";
12
+ import { s as Y } from "./gestures-D2Fdra_G.js";
13
+ import { p as C } from "./number-Bo5RdrA1.js";
14
+ import { Notifier as K } from "./notifier/index.js";
15
+ import { ticker as D } from "./ticker/index.js";
16
+ import { TICK_ORDER as R } from "./order/index.js";
17
+ var k;
18
+ class T {
19
+ constructor() {
20
+ a(this, k, new K());
21
+ }
22
+ get changeEvent() {
23
+ return t(this, k);
24
+ }
25
+ }
26
+ k = new WeakMap();
27
+ var m, l, c, L;
28
+ class q extends T {
29
+ constructor(e) {
30
+ super();
31
+ a(this, m, null);
32
+ a(this, l, null);
33
+ a(this, c, "offsetHeight");
34
+ a(this, L, (e) => {
35
+ const n = e.shiftKey ? -1 : 1;
36
+ let s;
37
+ e.code === "Space" ? s = n * t(this, l)[t(this, c)] * 0.4 : e.code === "ArrowLeft" ? s = -1 * t(this, l)[t(this, c)] * 0.2 : e.code === "ArrowRight" ? s = 1 * t(this, l)[t(this, c)] * 0.2 : e.code === "ArrowUp" ? s = -1 * t(this, l)[t(this, c)] * 0.2 : e.code === "ArrowDown" ? s = 1 * t(this, l)[t(this, c)] * 0.2 : e.code === "PageUp" ? s = -1 * t(this, l)[t(this, c)] : e.code === "PageDown" ? s = 1 * t(this, l)[t(this, c)] : e.code === "Home" ? s = 0 : e.code === "End" && (s = t(this, c) === "offsetWidth" ? t(this, l).scrollWidth : t(this, l).scrollHeight), s && (e.stopPropagation(), this.changeEvent.notify("keyboard", s));
38
+ });
39
+ f && (i(this, m, e != null && e.element && P(e.element) || window), i(this, l, t(this, m) instanceof HTMLElement ? t(this, m) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
40
+ }
41
+ set dimension(e) {
42
+ i(this, c, e === "width" ? "offsetWidth" : "offsetHeight");
43
+ }
44
+ connect() {
45
+ f && t(this, m).addEventListener(
46
+ "keydown",
47
+ t(this, L)
48
+ );
49
+ }
50
+ disconnect() {
51
+ f && t(this, m).removeEventListener(
52
+ "keydown",
53
+ t(this, L)
54
+ );
55
+ }
56
+ }
57
+ m = new WeakMap(), l = new WeakMap(), c = new WeakMap(), L = new WeakMap();
58
+ var E, b, g, M;
59
+ class F extends T {
60
+ constructor(e) {
61
+ super();
62
+ a(this, E, null);
63
+ a(this, b, void 0);
64
+ a(this, g, void 0);
65
+ a(this, M, (e) => {
66
+ let n = 0;
67
+ if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
68
+ if (n = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
69
+ const s = Date.now();
70
+ if (s - t(this, g) > 40 && (n = 100 * Math.sign(n)), i(this, g, s), Math.abs(n) < 100 || t(this, b))
71
+ return;
72
+ this.changeEvent.notify("wheel", n), i(this, b, setTimeout(() => {
73
+ i(this, b, void 0);
74
+ }, 80));
75
+ } else
76
+ this.changeEvent.notify("wheel", n);
77
+ });
78
+ this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, g, Date.now()), f && i(this, E, e != null && e.element && P(e.element) || window);
79
+ }
80
+ connect() {
81
+ f && t(this, E).addEventListener(
82
+ "wheel",
83
+ t(this, M),
84
+ {
85
+ passive: !1
86
+ }
87
+ );
88
+ }
89
+ disconnect() {
90
+ f && (t(this, E).removeEventListener(
91
+ "wheel",
92
+ t(this, M)
93
+ ), clearTimeout(t(this, b)));
94
+ }
95
+ }
96
+ E = new WeakMap(), b = new WeakMap(), g = new WeakMap(), M = new WeakMap();
97
+ var x, u, y, d, v, o;
98
+ const w = class w extends T {
99
+ constructor(e) {
100
+ super();
101
+ a(this, u, null);
102
+ a(this, y, !1);
103
+ a(this, d, 0);
104
+ a(this, v, (e) => {
105
+ if (e.composedPath().find(
106
+ (s) => s instanceof HTMLElement && s.hasAttribute("drag-dead-zone")
107
+ ))
108
+ return;
109
+ this.swipe || D.unsubscribe(t(this, o));
110
+ let n = e;
111
+ i(this, d, 0), Y(
112
+ (s) => {
113
+ if (t(this, y) || t(w, x) && t(w, x) !== t(this, u))
114
+ return;
115
+ this.swipe && i(this, y, !0);
116
+ const H = n.x - s.x, A = n.y - s.y;
117
+ this.axis === "x" ? i(this, d, H) : i(this, d, A), n = s, this.changeEvent.notify("drag", t(this, d)), (this.axis === "x" && Math.abs(H) > Math.abs(A) || this.axis === "y" && Math.abs(H) < Math.abs(A)) && i(w, x, t(this, u));
118
+ },
119
+ () => {
120
+ i(w, x, null), this.swipe || (i(this, d, t(this, d) * 3), D.subscribe(t(this, o), { order: R.SCROLL - 1 })), i(this, y, !1);
121
+ }
122
+ );
123
+ });
124
+ a(this, o, () => {
125
+ t(this, d) || D.unsubscribe(t(this, o)), i(this, d, t(this, d) * 0.95), i(this, d, C(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
126
+ });
127
+ this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, f && i(this, u, e != null && e.element && P(e.element) || document.documentElement);
128
+ }
129
+ connect() {
130
+ f && t(this, u).addEventListener("pointerdown", t(this, v));
131
+ }
132
+ disconnect() {
133
+ f && (t(this, u).removeEventListener(
134
+ "pointerdown",
135
+ t(this, v)
136
+ ), D.unsubscribe(t(this, o)));
137
+ }
138
+ };
139
+ x = new WeakMap(), u = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), o = new WeakMap(), a(w, x, null);
140
+ let X = w;
141
+ export {
142
+ T as C,
143
+ X as D,
144
+ q as K,
145
+ F as W
146
+ };
@@ -1 +1 @@
1
- "use strict";var a=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-Dfbbq8Wb.cjs"),i=require("../ticker/index.cjs");var s;class c extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify("linear",e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){i.ticker.subscribe(n(this,s))}disconnect(){i.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=c;
1
+ "use strict";var a=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-C7P6P5HO.cjs"),i=require("../ticker/index.cjs");var s;class c extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify("linear",e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){i.ticker.subscribe(n(this,s))}disconnect(){i.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=c;
@@ -7,8 +7,8 @@ var a = (s, r, e) => (c(s, r, "read from private field"), e ? e.call(s) : r.get(
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  r instanceof WeakSet ? r.add(s) : r.set(s, e);
9
9
  };
10
- import { C as i } from "../DragControls-CuGSxr1d.js";
11
- import { D as p, K as u, W as f } from "../DragControls-CuGSxr1d.js";
10
+ import { C as i } from "../DragControls-CZhJHO0_.js";
11
+ import { D as p, K as u, W as f } from "../DragControls-CZhJHO0_.js";
12
12
  import { ticker as n } from "../ticker/index.js";
13
13
  var t;
14
14
  class m extends i {
@@ -1 +1 @@
1
- "use strict";var je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var l=(r,e,i)=>(je(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},R=(r,e,i,n)=>(je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const gs=require("../Damped-9h4qaGcS.cjs"),gt=require("../Store-C-1ruEIm.cjs"),ws=require("../Derived-B-g8dYgh.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),St=require("../layout-8ryRAMGJ.cjs"),qt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Ve=require("../DragControls-Dfbbq8Wb.cjs"),vt=require("../custom-element/index.cjs"),Me=require("../order/index.cjs"),Ut=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),B=require("../tags-CK7mk_EP.cjs"),Ue=require("../createStylesheet-W0b965g0.cjs"),ts=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),_s=require("../Viewport-DAjFJF5V.cjs"),bs=require("../gestures-DHLrn6Q8.cjs"),Cs=require("../dom-JBOkFLTh.cjs"),es=require("../theme/index.cjs"),rs=require("../function-MthRj-GJ.cjs");var ys=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(r,e,i,n)=>{for(var h=n>1?void 0:n?Es(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&ys(e,i,h),h},Ze=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ze(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},g=(r,e,i,n)=>(Ze(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ze(r,e,"access private method"),i),d,z,tt,N,et,$t,D,wt,zt,Ft,Dt,w,Ee,v,ae,ce,L,_,U,J,Mt,lt,P,Nt,_t,Zt,Kt,ie,Pe,It,re,ke,Ke,We,Ne,ue,Oe,pe,$e,Vt,xe,ze,ns,Jt,fe,Fe,V,E,ft,Y;class ks{constructor(e,i){$(this,V,void 0);$(this,E,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,E,i),Lt.scrollEntries.register(l(this,V))}get size(){return l(this,ft)}get position(){return l(this,Y)}destroy(){Lt.scrollEntries.unregister(l(this,V)),l(this,V).style.transform=""}resize(){R(this,ft,l(this,E).vertical?l(this,V).offsetHeight:l(this,V).offsetWidth),R(this,Y,l(this,E).vertical?St.getCumulativeOffsetTop(l(this,V)):St.getCumulativeOffsetLeft(l(this,V))),R(this,Y,l(this,Y)-l(this,E).contentPosition)}transform(){let e=0;const i=l(this,E).viewportSize-l(this,ft);l(this,E).infiniteCSSProperty.current&&l(this,E).overscroll&&l(this,Y)+l(this,ft)<l(this,E).currentScrollValue&&(e=l(this,E).distance*-1-l(this,E).gap),Lt.scrollEntries.update(l(this,V),l(this,E).axisAttibute.current,e);const n=l(this,E).currentScrollValue+e,h=l(this,Y)-l(this,E).viewportSize-i,c=l(this,Y)+l(this,ft)+i,u=qt.clamp(n,h,c);l(this,E).vertical?l(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:l(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,E=new WeakMap,ft=new WeakMap,Y=new WeakMap;const Ws=Ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),a(this,ie),a(this,It),a(this,ke),a(this,We),a(this,ue),a(this,pe),a(this,ze),a(this,fe),a(this,d,null),a(this,z,new S.CSSProperty(this,"--axis","y")),a(this,tt,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,N,new S.CSSProperty(this,"--split",!1)),a(this,et,new S.CSSProperty(this,"--sectional",!1)),a(this,$t,new S.CSSProperty(this,"--wheel-max-delta",!1)),a(this,D,new S.CSSProperty(this,"--infinite",!1)),a(this,wt,new S.CSSProperty(this,"--damping",.03)),a(this,zt,new S.CSSProperty(this,"--mouse-drag",!1)),a(this,Ft,new S.CSSProperty(this,"--disabled",!1)),a(this,Dt,new S.CSSProperty(this,"--hibernated",!1)),a(this,w,null),a(this,Ee,null),a(this,v,[]),a(this,ae,0),a(this,ce,0),a(this,L,0),a(this,_,0),a(this,U,0),a(this,J,null),a(this,Mt,null),a(this,lt,null),a(this,P,new gt.Store(0)),a(this,Nt,0),a(this,_t,0),a(this,Zt,!0),a(this,Kt,!0),a(this,Vt,()=>{const e=this.currentScrollValue/s(this,_)||0;if(g(this,ae,this.vertical?St.getCumulativeOffsetTop(this):St.getCumulativeOffsetLeft(this)),g(this,ce,this.vertical?St.getCumulativeOffsetTop(s(this,w)):St.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,_,s(this,L)*s(this,tt).current);const i=s(this,_)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,_,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,_,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,_,s(this,_)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,d).max=s(this,_)}if(s(this,v).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,v).length){const i=s(this,v)[s(this,v).length-1],n=i.position+i.size-s(this,L),h=s(this,_)-n;g(this,_t,i.position+i.size+h)}else g(this,_t,s(this,_));if(s(this,et).current&&s(this,v).length){const i=s(this,v)[s(this,P).current];s(this,d).set(i.position,!0)}else s(this,d).set(e*s(this,_),!0)}),a(this,xe,()=>{const e=this.currentScrollValue;if(g(this,Nt,Math.max(0,e-s(this,_))),s(this,v).length){let i=0;for(let n=0;n<s(this,v).length;n++){const h=s(this,v)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,P).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),a(this,Jt,(e,i)=>{if(!(e==="drag"&&!_s.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,v).length?this.shiftSections(n):s(this,d).shift(n*s(this,L))}else s(this,d).shift(i)}),Ge.isBrowser&&(g(this,d,new gs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(Ws),B.element(this,{tabIndex:0,children:[B.div({class:"static",children:[B.slot({name:"static"})]}),B.div({class:"content",children:[B.slot({ref:e=>g(this,Ee,e)})],style:{flexDirection:new ws.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new Ve.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Jt)),g(this,Mt,new Ve.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Jt)),g(this,lt,new Ve.DragControls({element:this})),s(this,lt).changeEvent.subscribe(s(this,Jt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,lt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ie,Pe).call(this):C(this,It,re).call(this))}),s(this,et).subscribe(e=>{s(this,P).current=0,s(this,J).debounce=e.current,s(this,lt).swipe=e.current,s(this,d).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ie,Pe).call(this):!e.current&&e.previous&&C(this,It,re).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,v).length||(s(this,N).current=!0)),s(this,v).length&&(s(this,d).max=1/0,s(this,d).min=-1/0)):(g(this,Nt,0),s(this,d).max=s(this,_),s(this,d).min=0)}),s(this,wt).subscribe(e=>{s(this,d).damping=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,ke,Ke).call(this):!e.current&&e.previous&&C(this,We,Ne).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,ue,Oe).call(this):!e.current&&e.previous&&C(this,pe,$e).call(this)}))}get dampingCSSProperty(){return s(this,wt)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,fe,Fe).call(this,"current")}get targetScrollValue(){return C(this,fe,Fe).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,v)}get position(){return s(this,ae)}get contentPosition(){return s(this,ce)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,_)}get gap(){return s(this,U)}get counter(){return s(this,P)}get distance(){return s(this,_t)}get infiniteDistance(){return s(this,D).current?s(this,_t)+s(this,U):s(this,_t)}get overscroll(){return s(this,Nt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,d).speed}get direction(){return s(this,d).direction}get isRunning(){return s(this,d).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,d).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,d).length}onScroll(...e){return s(this,d).subscribe(...e)}offScroll(...e){s(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,v).length)return;const n=s(this,P).current;C(this,ze,ns).call(this,e);const h=s(this,v)[n],c=s(this,v)[s(this,P).current];if(h&&c){let u=0;const le=s(this,v).length-1;s(this,D).current?s(this,P).current===0&&n===le?u=s(this,_)+s(this,L)-h.position+s(this,U):s(this,P).current===le&&n===0?u=c.position-(s(this,_)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,d).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,v).length&&this.scrollToSection(s(this,P).current+e,i)}setPosition(e,i="smooth"){s(this,d).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,pe,$e).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,ue,Oe).call(this)}};d=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;Ee=new WeakMap;v=new WeakMap;ae=new WeakMap;ce=new WeakMap;L=new WeakMap;_=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;lt=new WeakMap;P=new WeakMap;Nt=new WeakMap;_t=new WeakMap;Zt=new WeakMap;Kt=new WeakMap;ie=new WeakSet;Pe=function(){C(this,It,re).call(this),s(this,Ee).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,v).push(new ks(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};It=new WeakSet;re=function(){s(this,v).forEach(r=>{r.destroy()}),g(this,v,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};ke=new WeakSet;Ke=function(){s(this,Zt)||(g(this,Zt,!0),s(this,d).unsubscribe(s(this,xe)),s(this,d).stopAnimation(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,lt).disconnect())};We=new WeakSet;Ne=function(){s(this,Zt)&&(g(this,Zt,!1),s(this,d).subscribe(s(this,xe)),s(this,J).connect(),s(this,Mt).connect(),s(this,lt).connect())};ue=new WeakSet;Oe=function(){s(this,Kt)||(g(this,Kt,!0),Ut.windowResizer.unsubscribe(s(this,Vt)),s(this,d).reset(),C(this,ke,Ke).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,It,re).call(this),Lt.scrollEntries.unregister(this))};pe=new WeakSet;$e=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,N).current&&C(this,ie,Pe).call(this),Lt.scrollEntries.register(this),Ut.windowResizer.subscribe(s(this,Vt),Me.RESIZE_ORDER.SCROLL),C(this,We,Ne).call(this))};Vt=new WeakMap;xe=new WeakMap;ze=new WeakSet;ns=function(r){s(this,D).current?(s(this,P).current=r%s(this,v).length,s(this,P).current=s(this,P).current<0?s(this,v).length+s(this,P).current:s(this,P).current):s(this,P).current=qt.clamp(r,0,s(this,v).length-1)};Jt=new WeakMap;fe=new WeakSet;Fe=function(r="current"){if(s(this,D).current&&s(this,v).length){const e=s(this,d)[r]%(s(this,_)+s(this,L)+s(this,U));return e<0?s(this,_)+e+s(this,L)+s(this,U):e}else return s(this,d)[r]};exports.ScrollElement=Ps([vt.define("e-scroll")],exports.ScrollElement);var ne;class Le extends vt.CustomElement{constructor(){super(...arguments);$(this,ne,null)}get scrollElement(){return l(this,ne)}connectedCallback(){const i=Cs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ne,i):console.error(this,"e-scroll not found")}}ne=new WeakMap;var Ms=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ls=(r,e,i,n)=>{for(var h=n>1?void 0:n?xs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ms(e,i,h),h},hs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(hs(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},mt=(r,e,i,n)=>(hs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Qt,F,st,it,Xt,Yt,de,Se,ve,me;const Vs=Ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:es.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:es.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Le{constructor(){super(),G(this,Qt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Xt,0),G(this,Yt,0),G(this,de,()=>{mt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;mt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),mt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),mt(this,Xt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,Se,()=>{mt(this,Yt,this.scrollElement.currentProgress*p(this,Xt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,Yt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,Yt)}px, 0px)`}),G(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,me,e=>{bs.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Xt),le=(c-n)*u;this.scrollElement.setPosition(i+le)});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ge.isBrowser&&(this.openShadow(Vs),B.element(this,{slot:"static",children:[B.slot({ref:e=>mt(this,Qt,e),children:B.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Qt).assignedElements()[0]||p(this,Qt).firstElementChild;mt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,me)),Ut.windowResizer.subscribe(p(this,de),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(p(this,Se)),this.scrollElement.axisAttibute.subscribe(p(this,ve))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,me)),Ut.windowResizer.unsubscribe(p(this,de)),this.scrollElement.offScroll(p(this,Se)),this.scrollElement.axisAttibute.unsubscribe(p(this,ve))}};Qt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;de=new WeakMap;Se=new WeakMap;ve=new WeakMap;me=new WeakMap;exports.ScrollbarElement=Ls([vt.define("e-scrollbar")],exports.ScrollbarElement);const Os=Ue.createStylesheet({button:{all:"inherit"}});class os extends Le{constructor(){super(),this.openShadow(Os),Ge.isBrowser&&B.element(this,{children:[B.button({onClick:()=>{this.handleClick()},children:[B.slot()]})]})}}var $s=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Fs=(r,e,i,n)=>{for(var h=n>1?void 0:n?zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&$s(e,i,h),h};exports.ScrollSetButtonElement=class extends os{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Fs([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Ds=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,As=(r,e,i,n)=>{for(var h=n>1?void 0:n?Rs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ds(e,i,h),h};exports.ScrollStepButtonElement=class extends os{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=As([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Ts=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,qs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Bs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ts(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),ss=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},is=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),bt,jt,j,dt,Ht,he,oe,Gt;class Is{constructor(e,i,n){$(this,j,void 0);$(this,dt,void 0);$(this,Ht,void 0);$(this,he,void 0);$(this,oe,()=>{l(this,dt).scrollToSection(l(this,Ht),l(this,he))});$(this,Gt,()=>{l(this,j).classList.toggle("current",l(this,dt).counter.current===l(this,Ht))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,he,n),R(this,Ht,i),l(this,j).addEventListener("click",l(this,oe)),l(this,dt).counter.subscribe(l(this,Gt)),l(this,Gt).call(this)}get element(){return l(this,j)}destroy(){l(this,j).removeEventListener("click",l(this,oe)),l(this,dt).counter.unsubscribe(l(this,Gt)),l(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Ht=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;exports.ScrollBulletButtonsElement=class extends Le{constructor(){super(...arguments),ss(this,bt,[]),ss(this,jt,rs.debounce(()=>{Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Is(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,jt)),Ot(this,jt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,jt)),Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[])}};bt=new WeakMap;jt=new WeakMap;exports.ScrollBulletButtonsElement=qs([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Hs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Us=(r,e,i,n)=>{for(var h=n>1?void 0:n?Gs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Hs(e,i,h),h},Je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Je(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},f=(r,e,i,n)=>(Je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),b=(r,e,i)=>(Je(r,e,"access private method"),i),Rt,Ct,yt,Et,Pt,O,q,I,H,Wt,M,at,ct,nt,ht,ot,At,te,W,K,Z,ut,pt,Q,ge,m,Tt,Bt,we,T,X,x,k,A,ee,xt,y,_e,De,Qe,as,Re,cs,Ae,us,Te,ps,Be,fs,qe,ds,Ie,Ss,be,se,rt,kt,Xe,vs,Ye,ms,Ce,He,ye;exports.ScrollSegmentElement=class extends Le{constructor(){super(...arguments),o(this,_e),o(this,Qe),o(this,Re),o(this,Ae),o(this,Te),o(this,Be),o(this,qe),o(this,Ie),o(this,rt),o(this,Xe),o(this,Ye),o(this,Ce),o(this,Rt,new S.CSSProperty(this,"--target","")),o(this,Ct,new S.CSSProperty(this,"--disabled",!1)),o(this,yt,new S.CSSProperty(this,"--distance-offset",0)),o(this,Et,new S.CSSProperty(this,"--start-offset",0)),o(this,Pt,new S.CSSProperty(this,"--capture-once",!1)),o(this,O,new S.CSSProperty(this,"--captured","")),o(this,q,new S.CSSProperty(this,"--released","")),o(this,I,new S.CSSProperty(this,"--captured-from-start","")),o(this,H,new S.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new S.CSSProperty(this,"--released-from-start","")),o(this,M,new S.CSSProperty(this,"--released-from-finish","")),o(this,at,new S.CSSProperty(this,"--passed-var","")),o(this,ct,new S.CSSProperty(this,"--progress-var","")),o(this,nt,new S.CSSProperty(this,"--distance-var","")),o(this,ht,new S.CSSProperty(this,"--start-var","")),o(this,ot,new S.CSSProperty(this,"--finish-var","")),o(this,At,new S.CSSProperty(this,"--smoothstep",!1)),o(this,te,new S.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,ge,[]),o(this,m,this),o(this,Tt,0),o(this,Bt,0),o(this,we,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,ee,!1),o(this,xt,!1),o(this,y,!0),o(this,be,()=>{t(this,y)||(this.resize(),t(this,se).call(this))}),o(this,se,()=>{!t(this,y)&&t(this,ee)&&this.tick()}),o(this,ye,rs.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),f(this,ge,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Et)}get captureOnceCSSProperty(){return t(this,Pt)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,at)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,At)}get smootherstepCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,Rt)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,Bt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){f(this,Bt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),f(this,Tt,this.scrollElement.vertical?St.getCumulativeOffsetTop(this,this.scrollElement):St.getCumulativeOffsetLeft(this,this.scrollElement)),f(this,x,this.getStart()),f(this,k,this.getDistance()),f(this,x,t(this,x)+t(this,Et).current),f(this,k,t(this,k)+t(this,yt).current),f(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),f(this,ee,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ge).forEach(n=>{e+=n.value}),f(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),f(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||b(this,Te,ps).call(this):t(this,Z).current&&!t(this,ut).current&&b(this,qe,ds).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&b(this,Be,fs).call(this):t(this,Z).current&&!t(this,Q).current&&b(this,Ie,Ss).call(this)),i>t(this,x)&&i<t(this,A)?(b(this,_e,De).call(this),t(this,W).current||b(this,Re,cs).call(this)):t(this,W).current&&(f(this,T,qt.step(t(this,k)/2,t(this,T),0,t(this,k))),f(this,X,t(this,T)/t(this,k)),b(this,_e,De).call(this),b(this,Ae,us).call(this)),t(this,xt)&&t(this,Pt).current&&(t(this,O).current&&t(this,m).classList.add(t(this,O).current),f(this,y,!0))}disable(){this.style.cssText="",f(this,Tt,0),f(this,Bt,0),f(this,T,0),f(this,X,0),f(this,x,0),f(this,k,0),f(this,A,0),f(this,ee,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,f(this,xt,!1),f(this,y,!0),b(this,Ce,He).call(this)}enable(){f(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,Rt).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Et).observe(),t(this,Pt).observe(),t(this,O).observe(),t(this,q).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,at).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,At).observe(),t(this,te).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,ye)),t(this,ye).call(this),t(this,Ct).current||this.enable(),t(this,Rt).subscribe(i=>{i.previous&&b(this,Ce,He).call(this),i.current?i.current==="parent"?f(this,m,this.parentElement||this):f(this,m,document.querySelector(i.current)||this):f(this,m,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Et).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,q).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Pt).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,at).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Ut.windowResizer.subscribe(t(this,be),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,se)),e=!0}disconnectedCallback(){Ut.windowResizer.unsubscribe(t(this,be)),this.scrollElement.offScroll(t(this,se)),t(this,Rt).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Et).close(),t(this,Pt).close(),t(this,O).close(),t(this,q).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,at).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,At).close(),t(this,te).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,m).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?qt.smootherstep(e,i,n)*n:t(this,At).current?qt.smoothstep(e,i,n)*n:qt.clamp(e,i,n)}getDistance(){return t(this,Bt)+t(this,we)}getStart(){return t(this,Tt)-t(this,we)}};Rt=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Et=new WeakMap;Pt=new WeakMap;O=new WeakMap;q=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;at=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;At=new WeakMap;te=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;ge=new WeakMap;m=new WeakMap;Tt=new WeakMap;Bt=new WeakMap;we=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;ee=new WeakMap;xt=new WeakMap;y=new WeakMap;_e=new WeakSet;De=function(){b(this,Qe,as).call(this),this.setVar(t(this,at).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Qe=new WeakSet;as=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Re=new WeakSet;cs=function(){t(this,W).current=!0,t(this,K).current=!1,f(this,xt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,O).current&&t(this,m).classList.add(t(this,O).current)};Ae=new WeakSet;us=function(){t(this,K).current=!0,t(this,W).current=!1,f(this,xt,!0),t(this,O).current&&t(this,m).classList.remove(t(this,O).current),t(this,I).current&&t(this,m).classList.remove(t(this,I).current),t(this,H).current&&t(this,m).classList.remove(t(this,H).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)};Te=new WeakSet;ps=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,m).classList.add(t(this,I).current)};Be=new WeakSet;fs=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,m).classList.add(t(this,H).current)};qe=new WeakSet;ds=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};Ie=new WeakSet;Ss=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};be=new WeakMap;se=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,m).classList.remove(r.previous),r.current&&t(this,m).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,m).classList.remove(r.previous),t(this,m).classList.add(r.current)):!r.current&&r.previous&&t(this,m).classList.remove(r.previous)};Xe=new WeakSet;vs=function(...r){r.forEach(e=>{e&&t(this,m).classList.remove(e)})};Ye=new WeakSet;ms=function(...r){r.forEach(e=>{e&&t(this,m).style.removeProperty(`--${e}`)})};Ce=new WeakSet;He=function(){b(this,Xe,vs).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,q).current,t(this,Wt).current,t(this,M).current),b(this,Ye,ms).call(this,t(this,at).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};ye=new WeakMap;exports.ScrollSegmentElement=Us([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
1
+ "use strict";var je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var l=(r,e,i)=>(je(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},R=(r,e,i,n)=>(je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const gs=require("../Damped-9h4qaGcS.cjs"),gt=require("../Store-C-1ruEIm.cjs"),ws=require("../Derived-B-g8dYgh.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),St=require("../layout-8ryRAMGJ.cjs"),qt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Ve=require("../DragControls-C7P6P5HO.cjs"),vt=require("../custom-element/index.cjs"),Me=require("../order/index.cjs"),Ut=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),B=require("../tags-CK7mk_EP.cjs"),Ue=require("../createStylesheet-W0b965g0.cjs"),ts=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),_s=require("../Viewport-DAjFJF5V.cjs"),bs=require("../gestures-DHLrn6Q8.cjs"),Cs=require("../dom-JBOkFLTh.cjs"),es=require("../theme/index.cjs"),rs=require("../function-MthRj-GJ.cjs");var ys=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(r,e,i,n)=>{for(var h=n>1?void 0:n?Es(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&ys(e,i,h),h},Ze=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ze(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},g=(r,e,i,n)=>(Ze(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ze(r,e,"access private method"),i),d,z,tt,N,et,$t,D,wt,zt,Ft,Dt,w,Ee,v,ae,ce,L,_,U,J,Mt,lt,P,Nt,_t,Zt,Kt,ie,Pe,It,re,ke,Ke,We,Ne,ue,Oe,pe,$e,Vt,xe,ze,ns,Jt,fe,Fe,V,E,ft,Y;class ks{constructor(e,i){$(this,V,void 0);$(this,E,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,E,i),Lt.scrollEntries.register(l(this,V))}get size(){return l(this,ft)}get position(){return l(this,Y)}destroy(){Lt.scrollEntries.unregister(l(this,V)),l(this,V).style.transform=""}resize(){R(this,ft,l(this,E).vertical?l(this,V).offsetHeight:l(this,V).offsetWidth),R(this,Y,l(this,E).vertical?St.getCumulativeOffsetTop(l(this,V)):St.getCumulativeOffsetLeft(l(this,V))),R(this,Y,l(this,Y)-l(this,E).contentPosition)}transform(){let e=0;const i=l(this,E).viewportSize-l(this,ft);l(this,E).infiniteCSSProperty.current&&l(this,E).overscroll&&l(this,Y)+l(this,ft)<l(this,E).currentScrollValue&&(e=l(this,E).distance*-1-l(this,E).gap),Lt.scrollEntries.update(l(this,V),l(this,E).axisAttibute.current,e);const n=l(this,E).currentScrollValue+e,h=l(this,Y)-l(this,E).viewportSize-i,c=l(this,Y)+l(this,ft)+i,u=qt.clamp(n,h,c);l(this,E).vertical?l(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:l(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,E=new WeakMap,ft=new WeakMap,Y=new WeakMap;const Ws=Ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),a(this,ie),a(this,It),a(this,ke),a(this,We),a(this,ue),a(this,pe),a(this,ze),a(this,fe),a(this,d,null),a(this,z,new S.CSSProperty(this,"--axis","y")),a(this,tt,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,N,new S.CSSProperty(this,"--split",!1)),a(this,et,new S.CSSProperty(this,"--sectional",!1)),a(this,$t,new S.CSSProperty(this,"--wheel-max-delta",!1)),a(this,D,new S.CSSProperty(this,"--infinite",!1)),a(this,wt,new S.CSSProperty(this,"--damping",.03)),a(this,zt,new S.CSSProperty(this,"--mouse-drag",!1)),a(this,Ft,new S.CSSProperty(this,"--disabled",!1)),a(this,Dt,new S.CSSProperty(this,"--hibernated",!1)),a(this,w,null),a(this,Ee,null),a(this,v,[]),a(this,ae,0),a(this,ce,0),a(this,L,0),a(this,_,0),a(this,U,0),a(this,J,null),a(this,Mt,null),a(this,lt,null),a(this,P,new gt.Store(0)),a(this,Nt,0),a(this,_t,0),a(this,Zt,!0),a(this,Kt,!0),a(this,Vt,()=>{const e=this.currentScrollValue/s(this,_)||0;if(g(this,ae,this.vertical?St.getCumulativeOffsetTop(this):St.getCumulativeOffsetLeft(this)),g(this,ce,this.vertical?St.getCumulativeOffsetTop(s(this,w)):St.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,_,s(this,L)*s(this,tt).current);const i=s(this,_)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,_,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,_,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,_,s(this,_)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,d).max=s(this,_)}if(s(this,v).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,v).length){const i=s(this,v)[s(this,v).length-1],n=i.position+i.size-s(this,L),h=s(this,_)-n;g(this,_t,i.position+i.size+h)}else g(this,_t,s(this,_));if(s(this,et).current&&s(this,v).length){const i=s(this,v)[s(this,P).current];s(this,d).set(i.position,!0)}else s(this,d).set(e*s(this,_),!0)}),a(this,xe,()=>{const e=this.currentScrollValue;if(g(this,Nt,Math.max(0,e-s(this,_))),s(this,v).length){let i=0;for(let n=0;n<s(this,v).length;n++){const h=s(this,v)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,P).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),a(this,Jt,(e,i)=>{if(!(e==="drag"&&!_s.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,v).length?this.shiftSections(n):s(this,d).shift(n*s(this,L))}else s(this,d).shift(i)}),Ge.isBrowser&&(g(this,d,new gs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(Ws),B.element(this,{tabIndex:0,children:[B.div({class:"static",children:[B.slot({name:"static"})]}),B.div({class:"content",children:[B.slot({ref:e=>g(this,Ee,e)})],style:{flexDirection:new ws.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new Ve.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Jt)),g(this,Mt,new Ve.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Jt)),g(this,lt,new Ve.DragControls({element:this})),s(this,lt).changeEvent.subscribe(s(this,Jt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,lt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ie,Pe).call(this):C(this,It,re).call(this))}),s(this,et).subscribe(e=>{s(this,P).current=0,s(this,J).debounce=e.current,s(this,lt).swipe=e.current,s(this,d).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ie,Pe).call(this):!e.current&&e.previous&&C(this,It,re).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,v).length||(s(this,N).current=!0)),s(this,v).length&&(s(this,d).max=1/0,s(this,d).min=-1/0)):(g(this,Nt,0),s(this,d).max=s(this,_),s(this,d).min=0)}),s(this,wt).subscribe(e=>{s(this,d).damping=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,ke,Ke).call(this):!e.current&&e.previous&&C(this,We,Ne).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,ue,Oe).call(this):!e.current&&e.previous&&C(this,pe,$e).call(this)}))}get dampingCSSProperty(){return s(this,wt)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,fe,Fe).call(this,"current")}get targetScrollValue(){return C(this,fe,Fe).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,v)}get position(){return s(this,ae)}get contentPosition(){return s(this,ce)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,_)}get gap(){return s(this,U)}get counter(){return s(this,P)}get distance(){return s(this,_t)}get infiniteDistance(){return s(this,D).current?s(this,_t)+s(this,U):s(this,_t)}get overscroll(){return s(this,Nt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,d).speed}get direction(){return s(this,d).direction}get isRunning(){return s(this,d).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,d).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,d).length}onScroll(...e){return s(this,d).subscribe(...e)}offScroll(...e){s(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,v).length)return;const n=s(this,P).current;C(this,ze,ns).call(this,e);const h=s(this,v)[n],c=s(this,v)[s(this,P).current];if(h&&c){let u=0;const le=s(this,v).length-1;s(this,D).current?s(this,P).current===0&&n===le?u=s(this,_)+s(this,L)-h.position+s(this,U):s(this,P).current===le&&n===0?u=c.position-(s(this,_)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,d).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,v).length&&this.scrollToSection(s(this,P).current+e,i)}setPosition(e,i="smooth"){s(this,d).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,pe,$e).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,ue,Oe).call(this)}};d=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;Ee=new WeakMap;v=new WeakMap;ae=new WeakMap;ce=new WeakMap;L=new WeakMap;_=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;lt=new WeakMap;P=new WeakMap;Nt=new WeakMap;_t=new WeakMap;Zt=new WeakMap;Kt=new WeakMap;ie=new WeakSet;Pe=function(){C(this,It,re).call(this),s(this,Ee).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,v).push(new ks(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};It=new WeakSet;re=function(){s(this,v).forEach(r=>{r.destroy()}),g(this,v,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};ke=new WeakSet;Ke=function(){s(this,Zt)||(g(this,Zt,!0),s(this,d).unsubscribe(s(this,xe)),s(this,d).stopAnimation(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,lt).disconnect())};We=new WeakSet;Ne=function(){s(this,Zt)&&(g(this,Zt,!1),s(this,d).subscribe(s(this,xe)),s(this,J).connect(),s(this,Mt).connect(),s(this,lt).connect())};ue=new WeakSet;Oe=function(){s(this,Kt)||(g(this,Kt,!0),Ut.windowResizer.unsubscribe(s(this,Vt)),s(this,d).reset(),C(this,ke,Ke).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,It,re).call(this),Lt.scrollEntries.unregister(this))};pe=new WeakSet;$e=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,N).current&&C(this,ie,Pe).call(this),Lt.scrollEntries.register(this),Ut.windowResizer.subscribe(s(this,Vt),Me.RESIZE_ORDER.SCROLL),C(this,We,Ne).call(this))};Vt=new WeakMap;xe=new WeakMap;ze=new WeakSet;ns=function(r){s(this,D).current?(s(this,P).current=r%s(this,v).length,s(this,P).current=s(this,P).current<0?s(this,v).length+s(this,P).current:s(this,P).current):s(this,P).current=qt.clamp(r,0,s(this,v).length-1)};Jt=new WeakMap;fe=new WeakSet;Fe=function(r="current"){if(s(this,D).current&&s(this,v).length){const e=s(this,d)[r]%(s(this,_)+s(this,L)+s(this,U));return e<0?s(this,_)+e+s(this,L)+s(this,U):e}else return s(this,d)[r]};exports.ScrollElement=Ps([vt.define("e-scroll")],exports.ScrollElement);var ne;class Le extends vt.CustomElement{constructor(){super(...arguments);$(this,ne,null)}get scrollElement(){return l(this,ne)}connectedCallback(){const i=Cs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ne,i):console.error(this,"e-scroll not found")}}ne=new WeakMap;var Ms=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ls=(r,e,i,n)=>{for(var h=n>1?void 0:n?xs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ms(e,i,h),h},hs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(hs(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},mt=(r,e,i,n)=>(hs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Qt,F,st,it,Xt,Yt,de,Se,ve,me;const Vs=Ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:es.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:es.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Le{constructor(){super(),G(this,Qt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Xt,0),G(this,Yt,0),G(this,de,()=>{mt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;mt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),mt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),mt(this,Xt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,Se,()=>{mt(this,Yt,this.scrollElement.currentProgress*p(this,Xt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,Yt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,Yt)}px, 0px)`}),G(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,me,e=>{bs.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Xt),le=(c-n)*u;this.scrollElement.setPosition(i+le)});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ge.isBrowser&&(this.openShadow(Vs),B.element(this,{slot:"static","drag-dead-zone":"",children:[B.slot({ref:e=>mt(this,Qt,e),children:B.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Qt).assignedElements()[0]||p(this,Qt).firstElementChild;mt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,me)),Ut.windowResizer.subscribe(p(this,de),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(p(this,Se)),this.scrollElement.axisAttibute.subscribe(p(this,ve))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,me)),Ut.windowResizer.unsubscribe(p(this,de)),this.scrollElement.offScroll(p(this,Se)),this.scrollElement.axisAttibute.unsubscribe(p(this,ve))}};Qt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;de=new WeakMap;Se=new WeakMap;ve=new WeakMap;me=new WeakMap;exports.ScrollbarElement=Ls([vt.define("e-scrollbar")],exports.ScrollbarElement);const Os=Ue.createStylesheet({button:{all:"inherit"}});class os extends Le{constructor(){super(),this.openShadow(Os),Ge.isBrowser&&B.element(this,{children:[B.button({onClick:()=>{this.handleClick()},children:[B.slot()]})]})}}var $s=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Fs=(r,e,i,n)=>{for(var h=n>1?void 0:n?zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&$s(e,i,h),h};exports.ScrollSetButtonElement=class extends os{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Fs([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Ds=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,As=(r,e,i,n)=>{for(var h=n>1?void 0:n?Rs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ds(e,i,h),h};exports.ScrollStepButtonElement=class extends os{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=As([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Ts=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,qs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Bs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ts(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),ss=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},is=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),bt,jt,j,dt,Ht,he,oe,Gt;class Is{constructor(e,i,n){$(this,j,void 0);$(this,dt,void 0);$(this,Ht,void 0);$(this,he,void 0);$(this,oe,()=>{l(this,dt).scrollToSection(l(this,Ht),l(this,he))});$(this,Gt,()=>{l(this,j).classList.toggle("current",l(this,dt).counter.current===l(this,Ht))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,he,n),R(this,Ht,i),l(this,j).addEventListener("click",l(this,oe)),l(this,dt).counter.subscribe(l(this,Gt)),l(this,Gt).call(this)}get element(){return l(this,j)}destroy(){l(this,j).removeEventListener("click",l(this,oe)),l(this,dt).counter.unsubscribe(l(this,Gt)),l(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Ht=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;exports.ScrollBulletButtonsElement=class extends Le{constructor(){super(...arguments),ss(this,bt,[]),ss(this,jt,rs.debounce(()=>{Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Is(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,jt)),Ot(this,jt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,jt)),Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[])}};bt=new WeakMap;jt=new WeakMap;exports.ScrollBulletButtonsElement=qs([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Hs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Us=(r,e,i,n)=>{for(var h=n>1?void 0:n?Gs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Hs(e,i,h),h},Je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Je(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},f=(r,e,i,n)=>(Je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),b=(r,e,i)=>(Je(r,e,"access private method"),i),Rt,Ct,yt,Et,Pt,O,q,I,H,Wt,M,at,ct,nt,ht,ot,At,te,W,K,Z,ut,pt,Q,ge,m,Tt,Bt,we,T,X,x,k,A,ee,xt,y,_e,De,Qe,as,Re,cs,Ae,us,Te,ps,Be,fs,qe,ds,Ie,Ss,be,se,rt,kt,Xe,vs,Ye,ms,Ce,He,ye;exports.ScrollSegmentElement=class extends Le{constructor(){super(...arguments),o(this,_e),o(this,Qe),o(this,Re),o(this,Ae),o(this,Te),o(this,Be),o(this,qe),o(this,Ie),o(this,rt),o(this,Xe),o(this,Ye),o(this,Ce),o(this,Rt,new S.CSSProperty(this,"--target","")),o(this,Ct,new S.CSSProperty(this,"--disabled",!1)),o(this,yt,new S.CSSProperty(this,"--distance-offset",0)),o(this,Et,new S.CSSProperty(this,"--start-offset",0)),o(this,Pt,new S.CSSProperty(this,"--capture-once",!1)),o(this,O,new S.CSSProperty(this,"--captured","")),o(this,q,new S.CSSProperty(this,"--released","")),o(this,I,new S.CSSProperty(this,"--captured-from-start","")),o(this,H,new S.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new S.CSSProperty(this,"--released-from-start","")),o(this,M,new S.CSSProperty(this,"--released-from-finish","")),o(this,at,new S.CSSProperty(this,"--passed-var","")),o(this,ct,new S.CSSProperty(this,"--progress-var","")),o(this,nt,new S.CSSProperty(this,"--distance-var","")),o(this,ht,new S.CSSProperty(this,"--start-var","")),o(this,ot,new S.CSSProperty(this,"--finish-var","")),o(this,At,new S.CSSProperty(this,"--smoothstep",!1)),o(this,te,new S.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,ge,[]),o(this,m,this),o(this,Tt,0),o(this,Bt,0),o(this,we,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,ee,!1),o(this,xt,!1),o(this,y,!0),o(this,be,()=>{t(this,y)||(this.resize(),t(this,se).call(this))}),o(this,se,()=>{!t(this,y)&&t(this,ee)&&this.tick()}),o(this,ye,rs.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),f(this,ge,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Et)}get captureOnceCSSProperty(){return t(this,Pt)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,at)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,At)}get smootherstepCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,Rt)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,Bt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){f(this,Bt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),f(this,Tt,this.scrollElement.vertical?St.getCumulativeOffsetTop(this,this.scrollElement):St.getCumulativeOffsetLeft(this,this.scrollElement)),f(this,x,this.getStart()),f(this,k,this.getDistance()),f(this,x,t(this,x)+t(this,Et).current),f(this,k,t(this,k)+t(this,yt).current),f(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),f(this,ee,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ge).forEach(n=>{e+=n.value}),f(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),f(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||b(this,Te,ps).call(this):t(this,Z).current&&!t(this,ut).current&&b(this,qe,ds).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&b(this,Be,fs).call(this):t(this,Z).current&&!t(this,Q).current&&b(this,Ie,Ss).call(this)),i>t(this,x)&&i<t(this,A)?(b(this,_e,De).call(this),t(this,W).current||b(this,Re,cs).call(this)):t(this,W).current&&(f(this,T,qt.step(t(this,k)/2,t(this,T),0,t(this,k))),f(this,X,t(this,T)/t(this,k)),b(this,_e,De).call(this),b(this,Ae,us).call(this)),t(this,xt)&&t(this,Pt).current&&(t(this,O).current&&t(this,m).classList.add(t(this,O).current),f(this,y,!0))}disable(){this.style.cssText="",f(this,Tt,0),f(this,Bt,0),f(this,T,0),f(this,X,0),f(this,x,0),f(this,k,0),f(this,A,0),f(this,ee,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,f(this,xt,!1),f(this,y,!0),b(this,Ce,He).call(this)}enable(){f(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,Rt).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Et).observe(),t(this,Pt).observe(),t(this,O).observe(),t(this,q).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,at).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,At).observe(),t(this,te).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,ye)),t(this,ye).call(this),t(this,Ct).current||this.enable(),t(this,Rt).subscribe(i=>{i.previous&&b(this,Ce,He).call(this),i.current?i.current==="parent"?f(this,m,this.parentElement||this):f(this,m,document.querySelector(i.current)||this):f(this,m,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Et).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,q).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Pt).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,at).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Ut.windowResizer.subscribe(t(this,be),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,se)),e=!0}disconnectedCallback(){Ut.windowResizer.unsubscribe(t(this,be)),this.scrollElement.offScroll(t(this,se)),t(this,Rt).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Et).close(),t(this,Pt).close(),t(this,O).close(),t(this,q).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,at).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,At).close(),t(this,te).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,m).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?qt.smootherstep(e,i,n)*n:t(this,At).current?qt.smoothstep(e,i,n)*n:qt.clamp(e,i,n)}getDistance(){return t(this,Bt)+t(this,we)}getStart(){return t(this,Tt)-t(this,we)}};Rt=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Et=new WeakMap;Pt=new WeakMap;O=new WeakMap;q=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;at=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;At=new WeakMap;te=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;ge=new WeakMap;m=new WeakMap;Tt=new WeakMap;Bt=new WeakMap;we=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;ee=new WeakMap;xt=new WeakMap;y=new WeakMap;_e=new WeakSet;De=function(){b(this,Qe,as).call(this),this.setVar(t(this,at).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Qe=new WeakSet;as=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Re=new WeakSet;cs=function(){t(this,W).current=!0,t(this,K).current=!1,f(this,xt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,O).current&&t(this,m).classList.add(t(this,O).current)};Ae=new WeakSet;us=function(){t(this,K).current=!0,t(this,W).current=!1,f(this,xt,!0),t(this,O).current&&t(this,m).classList.remove(t(this,O).current),t(this,I).current&&t(this,m).classList.remove(t(this,I).current),t(this,H).current&&t(this,m).classList.remove(t(this,H).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)};Te=new WeakSet;ps=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,m).classList.add(t(this,I).current)};Be=new WeakSet;fs=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,m).classList.add(t(this,H).current)};qe=new WeakSet;ds=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};Ie=new WeakSet;Ss=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};be=new WeakMap;se=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,m).classList.remove(r.previous),r.current&&t(this,m).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,m).classList.remove(r.previous),t(this,m).classList.add(r.current)):!r.current&&r.previous&&t(this,m).classList.remove(r.previous)};Xe=new WeakSet;vs=function(...r){r.forEach(e=>{e&&t(this,m).classList.remove(e)})};Ye=new WeakSet;ms=function(...r){r.forEach(e=>{e&&t(this,m).style.removeProperty(`--${e}`)})};Ce=new WeakSet;He=function(){b(this,Xe,vs).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,q).current,t(this,Wt).current,t(this,M).current),b(this,Ye,ms).call(this,t(this,at).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};ye=new WeakMap;exports.ScrollSegmentElement=Us([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
@@ -14,16 +14,16 @@ import { i as Ge } from "../browser-0zX67oeU.js";
14
14
  import { a as _e, g as be } from "../layout-HoBT_Da2.js";
15
15
  import { c as Ke, s as Ms, b as xs, a as Ls } from "../math-BOBiC4TN.js";
16
16
  import "../ticker/index.js";
17
- import { W as Vs, K as $s, D as Fs } from "../DragControls-CuGSxr1d.js";
17
+ import { W as Vs, K as $s, D as Fs } from "../DragControls-CZhJHO0_.js";
18
18
  import { CustomElement as us, define as Kt } from "../custom-element/index.js";
19
19
  import { TICK_ORDER as Os, RESIZE_ORDER as Ue } from "../order/index.js";
20
20
  import { windowResizer as Bt } from "../window-resizer/index.js";
21
21
  import { scrollEntries as Et } from "../scroll-entries/index.js";
22
- import { e as qe, D as Le, ay as Ce, p as Ds } from "../tags-D0zt3vue.js";
22
+ import { e as qe, D as Le, ay as Ce, p as zs } from "../tags-D0zt3vue.js";
23
23
  import { c as Ne } from "../createStylesheet-D6C3BPkl.js";
24
24
  import { cssUnitParser as ss } from "../css-unit-parser/index.js";
25
25
  import { CSSProperty as S } from "../css-property/index.js";
26
- import { d as zs } from "../Viewport-wlgZaIn7.js";
26
+ import { d as Ds } from "../Viewport-wlgZaIn7.js";
27
27
  import { s as As } from "../gestures-D2Fdra_G.js";
28
28
  import { f as Ts } from "../dom-0S_WDL4g.js";
29
29
  import { aptechkaTheme as is } from "../theme/index.js";
@@ -39,7 +39,7 @@ var Rs = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Bs = (e, s
39
39
  if (s.has(e))
40
40
  throw TypeError("Cannot add the same private member more than once");
41
41
  s instanceof WeakSet ? s.add(e) : s.set(e, r);
42
- }, g = (e, s, r, h) => (Ze(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), C = (e, s, r) => (Ze(e, s, "access private method"), r), d, O, j, N, tt, Lt, z, mt, Vt, $t, Ft, w, ye, m, he, ne, L, _, K, Z, Wt, at, W, Ut, vt, Ht, Gt, te, ke, Tt, ee, We, Je, Pe, Qe, ae, Ve, oe, $e, Mt, Me, Fe, fs, qt, le, Oe, V, k, pt, X;
42
+ }, g = (e, s, r, h) => (Ze(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), C = (e, s, r) => (Ze(e, s, "access private method"), r), d, O, j, N, tt, Lt, D, mt, Vt, $t, Ft, w, ye, m, he, ne, L, _, K, Z, Wt, at, W, Ut, vt, Ht, Gt, te, ke, Tt, ee, We, Je, Pe, Qe, ae, Ve, oe, $e, Mt, Me, Fe, fs, qt, le, Oe, V, k, pt, X;
43
43
  class Hs {
44
44
  constructor(s, r) {
45
45
  F(this, V, void 0);
@@ -113,7 +113,7 @@ let Ee = class extends us {
113
113
  this,
114
114
  "--wheel-max-delta",
115
115
  !1
116
- )), l(this, z, new S(this, "--infinite", !1)), l(this, mt, new S(this, "--damping", 0.03)), l(this, Vt, new S(this, "--mouse-drag", !1)), l(this, $t, new S(this, "--disabled", !1)), l(this, Ft, new S(this, "--hibernated", !1)), l(this, w, null), l(this, ye, null), l(this, m, []), l(this, he, 0), l(this, ne, 0), l(this, L, 0), l(this, _, 0), l(this, K, 0), l(this, Z, null), l(this, Wt, null), l(this, at, null), l(this, W, new St(0)), l(this, Ut, 0), l(this, vt, 0), l(this, Ht, !0), l(this, Gt, !0), l(this, Mt, () => {
116
+ )), l(this, D, new S(this, "--infinite", !1)), l(this, mt, new S(this, "--damping", 0.03)), l(this, Vt, new S(this, "--mouse-drag", !1)), l(this, $t, new S(this, "--disabled", !1)), l(this, Ft, new S(this, "--hibernated", !1)), l(this, w, null), l(this, ye, null), l(this, m, []), l(this, he, 0), l(this, ne, 0), l(this, L, 0), l(this, _, 0), l(this, K, 0), l(this, Z, null), l(this, Wt, null), l(this, at, null), l(this, W, new St(0)), l(this, Ut, 0), l(this, vt, 0), l(this, Ht, !0), l(this, Gt, !0), l(this, Mt, () => {
117
117
  const e = this.currentScrollValue / i(this, _) || 0;
118
118
  if (g(this, he, this.vertical ? _e(this) : be(this)), g(this, ne, this.vertical ? _e(i(this, w)) : be(i(this, w))), g(this, L, this.vertical ? this.offsetHeight : this.offsetWidth), i(this, j).current) {
119
119
  g(this, _, i(this, L) * i(this, j).current);
@@ -125,13 +125,13 @@ let Ee = class extends us {
125
125
  getComputedStyle(i(this, w)).rowGap
126
126
  )) : g(this, K, ss.parse(
127
127
  getComputedStyle(i(this, w)).columnGap
128
- )), !i(this, z).current) {
128
+ )), !i(this, D).current) {
129
129
  const s = getComputedStyle(this);
130
130
  g(this, _, i(this, _) + (this.vertical ? parseFloat(s.paddingBlockStart) + parseFloat(s.paddingBlockEnd) : parseFloat(s.paddingInlineStart) + parseFloat(s.paddingInlineEnd))), i(this, d).max = i(this, _);
131
131
  }
132
132
  if (i(this, m).forEach((s) => {
133
133
  s.resize(), s.transform();
134
- }), i(this, z).current && i(this, m).length) {
134
+ }), i(this, D).current && i(this, m).length) {
135
135
  const s = i(this, m)[i(this, m).length - 1], r = s.position + s.size - i(this, L), h = i(this, _) - r;
136
136
  g(this, vt, s.position + s.size + h);
137
137
  } else
@@ -158,7 +158,7 @@ let Ee = class extends us {
158
158
  e
159
159
  );
160
160
  }), l(this, qt, (e, s) => {
161
- if (!(e === "drag" && !zs.isMobile && !i(this, Vt).current))
161
+ if (!(e === "drag" && !Ds.isMobile && !i(this, Vt).current))
162
162
  if (i(this, tt).current) {
163
163
  const r = Math.sign(s);
164
164
  i(this, m).length ? this.shiftSections(r) : i(this, d).shift(r * i(this, L));
@@ -197,7 +197,7 @@ let Ee = class extends us {
197
197
  this.isConnected && (e ? C(this, te, ke).call(this) : C(this, Tt, ee).call(this));
198
198
  }), i(this, tt).subscribe((e) => {
199
199
  i(this, W).current = 0, i(this, Z).debounce = e.current, i(this, at).swipe = e.current, i(this, d).reset(), this.isConnected && (e.current && !e.previous ? C(this, te, ke).call(this) : !e.current && e.previous && C(this, Tt, ee).call(this));
200
- }), i(this, z).subscribe((e) => {
200
+ }), i(this, D).subscribe((e) => {
201
201
  e.current ? (this.isConnected && (i(this, m).length || (i(this, N).current = !0)), i(this, m).length && (i(this, d).max = 1 / 0, i(this, d).min = -1 / 0)) : (g(this, Ut, 0), i(this, d).max = i(this, _), i(this, d).min = 0);
202
202
  }), i(this, mt).subscribe((e) => {
203
203
  i(this, d).damping = e.current;
@@ -226,7 +226,7 @@ let Ee = class extends us {
226
226
  return i(this, tt);
227
227
  }
228
228
  get infiniteCSSProperty() {
229
- return i(this, z);
229
+ return i(this, D);
230
230
  }
231
231
  get dampingAttibute() {
232
232
  return i(this, mt);
@@ -271,7 +271,7 @@ let Ee = class extends us {
271
271
  return i(this, vt);
272
272
  }
273
273
  get infiniteDistance() {
274
- return i(this, z).current ? i(this, vt) + i(this, K) : i(this, vt);
274
+ return i(this, D).current ? i(this, vt) + i(this, K) : i(this, vt);
275
275
  }
276
276
  get overscroll() {
277
277
  return i(this, Ut);
@@ -328,7 +328,7 @@ let Ee = class extends us {
328
328
  if (h && n) {
329
329
  let c = 0;
330
330
  const p = i(this, m).length - 1;
331
- i(this, z).current ? i(this, W).current === 0 && r === p ? c = i(this, _) + i(this, L) - h.position + i(this, K) : i(this, W).current === p && r === 0 ? c = n.position - (i(this, _) + i(this, L) + i(this, K)) : c = n.position - h.position : c = n.position - h.position, i(this, d).shift(c, s === "instant");
331
+ i(this, D).current ? i(this, W).current === 0 && r === p ? c = i(this, _) + i(this, L) - h.position + i(this, K) : i(this, W).current === p && r === 0 ? c = n.position - (i(this, _) + i(this, L) + i(this, K)) : c = n.position - h.position : c = n.position - h.position, i(this, d).shift(c, s === "instant");
332
332
  }
333
333
  }
334
334
  shiftSections(e, s = "smooth") {
@@ -338,10 +338,10 @@ let Ee = class extends us {
338
338
  i(this, d).set(e, s === "instant");
339
339
  }
340
340
  connectedCallback() {
341
- i(this, O).observe(), i(this, j).observe(), i(this, N).observe(), i(this, tt).observe(), i(this, Lt).observe(), i(this, z).observe(), i(this, mt).observe(), i(this, Vt).observe(), i(this, $t).observe(), i(this, Ft).observe(), C(this, oe, $e).call(this);
341
+ i(this, O).observe(), i(this, j).observe(), i(this, N).observe(), i(this, tt).observe(), i(this, Lt).observe(), i(this, D).observe(), i(this, mt).observe(), i(this, Vt).observe(), i(this, $t).observe(), i(this, Ft).observe(), C(this, oe, $e).call(this);
342
342
  }
343
343
  disconnectedCallback() {
344
- i(this, O).unobserve(), i(this, j).unobserve(), i(this, N).unobserve(), i(this, tt).unobserve(), i(this, Lt).unobserve(), i(this, z).unobserve(), i(this, mt).unobserve(), i(this, Vt).unobserve(), i(this, $t).unobserve(), i(this, Ft).unobserve(), C(this, ae, Ve).call(this);
344
+ i(this, O).unobserve(), i(this, j).unobserve(), i(this, N).unobserve(), i(this, tt).unobserve(), i(this, Lt).unobserve(), i(this, D).unobserve(), i(this, mt).unobserve(), i(this, Vt).unobserve(), i(this, $t).unobserve(), i(this, Ft).unobserve(), C(this, ae, Ve).call(this);
345
345
  }
346
346
  };
347
347
  d = /* @__PURE__ */ new WeakMap();
@@ -350,7 +350,7 @@ j = /* @__PURE__ */ new WeakMap();
350
350
  N = /* @__PURE__ */ new WeakMap();
351
351
  tt = /* @__PURE__ */ new WeakMap();
352
352
  Lt = /* @__PURE__ */ new WeakMap();
353
- z = /* @__PURE__ */ new WeakMap();
353
+ D = /* @__PURE__ */ new WeakMap();
354
354
  mt = /* @__PURE__ */ new WeakMap();
355
355
  Vt = /* @__PURE__ */ new WeakMap();
356
356
  $t = /* @__PURE__ */ new WeakMap();
@@ -411,12 +411,12 @@ Mt = /* @__PURE__ */ new WeakMap();
411
411
  Me = /* @__PURE__ */ new WeakMap();
412
412
  Fe = /* @__PURE__ */ new WeakSet();
413
413
  fs = function(e) {
414
- i(this, z).current ? (i(this, W).current = e % i(this, m).length, i(this, W).current = i(this, W).current < 0 ? i(this, m).length + i(this, W).current : i(this, W).current) : i(this, W).current = Ke(e, 0, i(this, m).length - 1);
414
+ i(this, D).current ? (i(this, W).current = e % i(this, m).length, i(this, W).current = i(this, W).current < 0 ? i(this, m).length + i(this, W).current : i(this, W).current) : i(this, W).current = Ke(e, 0, i(this, m).length - 1);
415
415
  };
416
416
  qt = /* @__PURE__ */ new WeakMap();
417
417
  le = /* @__PURE__ */ new WeakSet();
418
418
  Oe = function(e = "current") {
419
- if (i(this, z).current && i(this, m).length) {
419
+ if (i(this, D).current && i(this, m).length) {
420
420
  const s = i(this, d)[e] % (i(this, _) + i(this, L) + i(this, K));
421
421
  return s < 0 ? i(this, _) + s + i(this, L) + i(this, K) : s;
422
422
  } else
@@ -451,7 +451,7 @@ var Ks = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, qs = (e, s
451
451
  if (s.has(e))
452
452
  throw TypeError("Cannot add the same private member more than once");
453
453
  s instanceof WeakSet ? s.add(e) : s.set(e, r);
454
- }, dt = (e, s, r, h) => (ds(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), Nt, D, et, st, Zt, Jt, ce, ue, pe, fe;
454
+ }, dt = (e, s, r, h) => (ds(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), Nt, z, et, st, Zt, Jt, ce, ue, pe, fe;
455
455
  const Ns = Ne({
456
456
  ":host": {
457
457
  display: "inline-block",
@@ -483,12 +483,12 @@ const Ns = Ne({
483
483
  });
484
484
  let rs = class extends xe {
485
485
  constructor() {
486
- super(), G(this, Nt, null), G(this, D, null), G(this, et, !1), G(this, st, 0), G(this, Zt, 0), G(this, Jt, 0), G(this, ce, () => {
486
+ super(), G(this, Nt, null), G(this, z, null), G(this, et, !1), G(this, st, 0), G(this, Zt, 0), G(this, Jt, 0), G(this, ce, () => {
487
487
  dt(this, et, this.offsetWidth > this.offsetHeight);
488
488
  const e = u(this, et) ? this.offsetWidth : this.offsetHeight;
489
- dt(this, st, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), dt(this, st, Math.max(u(this, st), 30)), u(this, et) ? (u(this, D).style.width = u(this, st) + "px", u(this, D).style.height = "100%") : (u(this, D).style.width = "100%", u(this, D).style.height = u(this, st) + "px"), dt(this, Zt, e - u(this, st)), this.scrollElement.scrollSize || (this.style.display = "none");
489
+ dt(this, st, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), dt(this, st, Math.max(u(this, st), 30)), u(this, et) ? (u(this, z).style.width = u(this, st) + "px", u(this, z).style.height = "100%") : (u(this, z).style.width = "100%", u(this, z).style.height = u(this, st) + "px"), dt(this, Zt, e - u(this, st)), this.scrollElement.scrollSize || (this.style.display = "none");
490
490
  }), G(this, ue, () => {
491
- dt(this, Jt, this.scrollElement.currentProgress * u(this, Zt)), u(this, et) ? u(this, D).style.transform = `translate3d(${u(this, Jt)}px, 0px, 0px)` : u(this, D).style.transform = `translate3d(0px, ${u(this, Jt)}px, 0px)`;
491
+ dt(this, Jt, this.scrollElement.currentProgress * u(this, Zt)), u(this, et) ? u(this, z).style.transform = `translate3d(${u(this, Jt)}px, 0px, 0px)` : u(this, z).style.transform = `translate3d(0px, ${u(this, Jt)}px, 0px)`;
492
492
  }), G(this, pe, () => {
493
493
  this.setAttribute("axis", this.scrollElement.axisAttibute.current);
494
494
  }), G(this, fe, (e) => {
@@ -499,6 +499,7 @@ let rs = class extends xe {
499
499
  const s = this.scrollElement.targetScrollValue, r = u(this, et) ? e.x : e.y;
500
500
  }), Ge && (this.openShadow(Ns), qe(this, {
501
501
  slot: "static",
502
+ "drag-dead-zone": "",
502
503
  children: [
503
504
  Ce({
504
505
  ref: (e) => dt(this, Nt, e),
@@ -508,19 +509,19 @@ let rs = class extends xe {
508
509
  }));
509
510
  }
510
511
  get thumbElement() {
511
- return u(this, D);
512
+ return u(this, z);
512
513
  }
513
514
  connectedCallback() {
514
515
  super.connectedCallback();
515
516
  const e = u(this, Nt).assignedElements()[0] || u(this, Nt).firstElementChild;
516
- dt(this, D, e), u(this, D).addEventListener("pointerdown", u(this, fe)), Bt.subscribe(u(this, ce), Ue.SCROLL + 1), this.scrollElement.onScroll(u(this, ue)), this.scrollElement.axisAttibute.subscribe(u(this, pe));
517
+ dt(this, z, e), u(this, z).addEventListener("pointerdown", u(this, fe)), Bt.subscribe(u(this, ce), Ue.SCROLL + 1), this.scrollElement.onScroll(u(this, ue)), this.scrollElement.axisAttibute.subscribe(u(this, pe));
517
518
  }
518
519
  disconnectedCallback() {
519
- u(this, D).removeEventListener("pointerdown", u(this, fe)), Bt.unsubscribe(u(this, ce)), this.scrollElement.offScroll(u(this, ue)), this.scrollElement.axisAttibute.unsubscribe(u(this, pe));
520
+ u(this, z).removeEventListener("pointerdown", u(this, fe)), Bt.unsubscribe(u(this, ce)), this.scrollElement.offScroll(u(this, ue)), this.scrollElement.axisAttibute.unsubscribe(u(this, pe));
520
521
  }
521
522
  };
522
523
  Nt = /* @__PURE__ */ new WeakMap();
523
- D = /* @__PURE__ */ new WeakMap();
524
+ z = /* @__PURE__ */ new WeakMap();
524
525
  et = /* @__PURE__ */ new WeakMap();
525
526
  st = /* @__PURE__ */ new WeakMap();
526
527
  Zt = /* @__PURE__ */ new WeakMap();
@@ -541,7 +542,7 @@ class Ss extends xe {
541
542
  constructor() {
542
543
  super(), this.openShadow(Zs), Ge && qe(this, {
543
544
  children: [
544
- Ds({
545
+ zs({
545
546
  onClick: () => {
546
547
  this.handleClick();
547
548
  },
@@ -659,10 +660,10 @@ var hi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ai = (e, s
659
660
  if (s.has(e))
660
661
  throw TypeError("Cannot add the same private member more than once");
661
662
  s instanceof WeakSet ? s.add(e) : s.set(e, r);
662
- }, f = (e, s, r, h) => (Xe(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), b = (e, s, r) => (Xe(e, s, "access private method"), r), Ot, wt, _t, bt, Ct, $, I, B, H, kt, M, ot, lt, rt, ht, nt, Dt, Xt, E, q, U, ct, ut, J, de, v, zt, At, Se, R, Q, x, P, T, Yt, Pt, y, me, De, Ye, vs, ze, gs, Ae, ws, Te, _s, Re, bs, Ie, Cs, Be, ys, ve, jt, it, yt, je, ks, ts, Ws, ge, He, we;
663
+ }, f = (e, s, r, h) => (Xe(e, s, "write to private field"), h ? h.call(e, r) : s.set(e, r), r), b = (e, s, r) => (Xe(e, s, "access private method"), r), Ot, wt, _t, bt, Ct, $, I, B, H, kt, M, ot, lt, rt, ht, nt, zt, Xt, E, q, U, ct, ut, J, de, v, Dt, At, Se, R, Q, x, P, T, Yt, Pt, y, me, ze, Ye, vs, De, gs, Ae, ws, Te, _s, Re, bs, Ie, Cs, Be, ys, ve, jt, it, yt, je, ks, ts, Ws, ge, He, we;
663
664
  let cs = class extends xe {
664
665
  constructor() {
665
- super(...arguments), a(this, me), a(this, Ye), a(this, ze), a(this, Ae), a(this, Te), a(this, Re), a(this, Ie), a(this, Be), a(this, it), a(this, je), a(this, ts), a(this, ge), a(this, Ot, new S(this, "--target", "")), a(this, wt, new S(this, "--disabled", !1)), a(this, _t, new S(
666
+ super(...arguments), a(this, me), a(this, Ye), a(this, De), a(this, Ae), a(this, Te), a(this, Re), a(this, Ie), a(this, Be), a(this, it), a(this, je), a(this, ts), a(this, ge), a(this, Ot, new S(this, "--target", "")), a(this, wt, new S(this, "--disabled", !1)), a(this, _t, new S(
666
667
  this,
667
668
  "--distance-offset",
668
669
  0
@@ -686,11 +687,11 @@ let cs = class extends xe {
686
687
  this,
687
688
  "--released-from-finish",
688
689
  ""
689
- )), a(this, ot, new S(this, "--passed-var", "")), a(this, lt, new S(this, "--progress-var", "")), a(this, rt, new S(this, "--distance-var", "")), a(this, ht, new S(this, "--start-var", "")), a(this, nt, new S(this, "--finish-var", "")), a(this, Dt, new S(this, "--smoothstep", !1)), a(this, Xt, new S(
690
+ )), a(this, ot, new S(this, "--passed-var", "")), a(this, lt, new S(this, "--progress-var", "")), a(this, rt, new S(this, "--distance-var", "")), a(this, ht, new S(this, "--start-var", "")), a(this, nt, new S(this, "--finish-var", "")), a(this, zt, new S(this, "--smoothstep", !1)), a(this, Xt, new S(
690
691
  this,
691
692
  "--smootherstep",
692
693
  !1
693
- )), a(this, E, new St(!1)), a(this, q, new St(!1)), a(this, U, new St(!1)), a(this, ct, new St(!1)), a(this, ut, new St(!1)), a(this, J, new St(!1)), a(this, de, []), a(this, v, this), a(this, zt, 0), a(this, At, 0), a(this, Se, 0), a(this, R, 0), a(this, Q, 0), a(this, x, 0), a(this, P, 0), a(this, T, 0), a(this, Yt, !1), a(this, Pt, !1), a(this, y, !0), a(this, ve, () => {
694
+ )), a(this, E, new St(!1)), a(this, q, new St(!1)), a(this, U, new St(!1)), a(this, ct, new St(!1)), a(this, ut, new St(!1)), a(this, J, new St(!1)), a(this, de, []), a(this, v, this), a(this, Dt, 0), a(this, At, 0), a(this, Se, 0), a(this, R, 0), a(this, Q, 0), a(this, x, 0), a(this, P, 0), a(this, T, 0), a(this, Yt, !1), a(this, Pt, !1), a(this, y, !0), a(this, ve, () => {
694
695
  t(this, y) || (this.resize(), t(this, jt).call(this));
695
696
  }), a(this, jt, () => {
696
697
  !t(this, y) && t(this, Yt) && this.tick();
@@ -745,7 +746,7 @@ let cs = class extends xe {
745
746
  return t(this, nt);
746
747
  }
747
748
  get smoothstepCSSProperty() {
748
- return t(this, Dt);
749
+ return t(this, zt);
749
750
  }
750
751
  get smootherstepCSSProperty() {
751
752
  return t(this, Xt);
@@ -775,7 +776,7 @@ let cs = class extends xe {
775
776
  return t(this, J);
776
777
  }
777
778
  get directionPosition() {
778
- return t(this, zt);
779
+ return t(this, Dt);
779
780
  }
780
781
  get directionSize() {
781
782
  return t(this, At);
@@ -802,7 +803,7 @@ let cs = class extends xe {
802
803
  return t(this, y);
803
804
  }
804
805
  resize() {
805
- f(this, At, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), f(this, zt, this.scrollElement.vertical ? _e(this, this.scrollElement) : be(this, this.scrollElement)), f(this, x, this.getStart()), f(this, P, this.getDistance()), f(this, x, t(this, x) + t(this, bt).current), f(this, P, t(this, P) + t(this, _t).current), f(this, T, t(this, x) + t(this, P)), this.scrollElement.currentScrollValue > t(this, T) && !t(this, E).current && !t(this, q).current && (t(this, E).current = !0), this.setVar(t(this, ht).current, t(this, x)), this.setVar(t(this, nt).current, t(this, T)), this.setVar(t(this, rt).current, t(this, P)), f(this, Yt, !0);
806
+ f(this, At, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), f(this, Dt, this.scrollElement.vertical ? _e(this, this.scrollElement) : be(this, this.scrollElement)), f(this, x, this.getStart()), f(this, P, this.getDistance()), f(this, x, t(this, x) + t(this, bt).current), f(this, P, t(this, P) + t(this, _t).current), f(this, T, t(this, x) + t(this, P)), this.scrollElement.currentScrollValue > t(this, T) && !t(this, E).current && !t(this, q).current && (t(this, E).current = !0), this.setVar(t(this, ht).current, t(this, x)), this.setVar(t(this, nt).current, t(this, T)), this.setVar(t(this, rt).current, t(this, P)), f(this, Yt, !0);
806
807
  }
807
808
  tick() {
808
809
  let e = this.scrollElement.currentScrollValue;
@@ -810,16 +811,16 @@ let cs = class extends xe {
810
811
  e += r.value;
811
812
  }), f(this, R, this.updateValue(e - t(this, x), 0, t(this, P)) || 0), f(this, Q, t(this, R) / t(this, P) || 0);
812
813
  const s = Math.round(e);
813
- t(this, E).current && (s > t(this, x) ? t(this, U).current || b(this, Te, _s).call(this) : t(this, U).current && !t(this, ct).current && b(this, Ie, Cs).call(this), s < t(this, T) ? t(this, J).current && !t(this, ut).current && b(this, Re, bs).call(this) : t(this, U).current && !t(this, J).current && b(this, Be, ys).call(this)), s > t(this, x) && s < t(this, T) ? (b(this, me, De).call(this), t(this, E).current || b(this, ze, gs).call(this)) : t(this, E).current && (f(this, R, Ms(t(this, P) / 2, t(this, R), 0, t(this, P))), f(this, Q, t(this, R) / t(this, P)), b(this, me, De).call(this), b(this, Ae, ws).call(this)), t(this, Pt) && t(this, Ct).current && (t(this, $).current && t(this, v).classList.add(t(this, $).current), f(this, y, !0));
814
+ t(this, E).current && (s > t(this, x) ? t(this, U).current || b(this, Te, _s).call(this) : t(this, U).current && !t(this, ct).current && b(this, Ie, Cs).call(this), s < t(this, T) ? t(this, J).current && !t(this, ut).current && b(this, Re, bs).call(this) : t(this, U).current && !t(this, J).current && b(this, Be, ys).call(this)), s > t(this, x) && s < t(this, T) ? (b(this, me, ze).call(this), t(this, E).current || b(this, De, gs).call(this)) : t(this, E).current && (f(this, R, Ms(t(this, P) / 2, t(this, R), 0, t(this, P))), f(this, Q, t(this, R) / t(this, P)), b(this, me, ze).call(this), b(this, Ae, ws).call(this)), t(this, Pt) && t(this, Ct).current && (t(this, $).current && t(this, v).classList.add(t(this, $).current), f(this, y, !0));
814
815
  }
815
816
  disable() {
816
- this.style.cssText = "", f(this, zt, 0), f(this, At, 0), f(this, R, 0), f(this, Q, 0), f(this, x, 0), f(this, P, 0), f(this, T, 0), f(this, Yt, !1), t(this, E).current = !1, t(this, q).current = !1, t(this, U).current = !1, t(this, ct).current = !1, t(this, ut).current = !1, t(this, J).current = !1, f(this, Pt, !1), f(this, y, !0), b(this, ge, He).call(this);
817
+ this.style.cssText = "", f(this, Dt, 0), f(this, At, 0), f(this, R, 0), f(this, Q, 0), f(this, x, 0), f(this, P, 0), f(this, T, 0), f(this, Yt, !1), t(this, E).current = !1, t(this, q).current = !1, t(this, U).current = !1, t(this, ct).current = !1, t(this, ut).current = !1, t(this, J).current = !1, f(this, Pt, !1), f(this, y, !0), b(this, ge, He).call(this);
817
818
  }
818
819
  enable() {
819
820
  f(this, y, !1);
820
821
  }
821
822
  connectedCallback() {
822
- super.connectedCallback(), t(this, Ot).observe(), t(this, wt).observe(), t(this, _t).observe(), t(this, bt).observe(), t(this, Ct).observe(), t(this, $).observe(), t(this, I).observe(), t(this, B).observe(), t(this, H).observe(), t(this, kt).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, rt).observe(), t(this, ht).observe(), t(this, nt).observe(), t(this, Dt).observe(), t(this, Xt).observe();
823
+ super.connectedCallback(), t(this, Ot).observe(), t(this, wt).observe(), t(this, _t).observe(), t(this, bt).observe(), t(this, Ct).observe(), t(this, $).observe(), t(this, I).observe(), t(this, B).observe(), t(this, H).observe(), t(this, kt).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, rt).observe(), t(this, ht).observe(), t(this, nt).observe(), t(this, zt).observe(), t(this, Xt).observe();
823
824
  let e = !1;
824
825
  this.scrollElement.addEventListener(
825
826
  "sectionsChange",
@@ -859,7 +860,7 @@ let cs = class extends xe {
859
860
  }), Bt.subscribe(t(this, ve), Ue.SEGMENT), this.scrollElement.onScroll(t(this, jt)), e = !0;
860
861
  }
861
862
  disconnectedCallback() {
862
- Bt.unsubscribe(t(this, ve)), this.scrollElement.offScroll(t(this, jt)), t(this, Ot).close(), t(this, wt).close(), t(this, _t).close(), t(this, bt).close(), t(this, Ct).close(), t(this, $).close(), t(this, I).close(), t(this, B).close(), t(this, H).close(), t(this, kt).close(), t(this, M).close(), t(this, ot).close(), t(this, lt).close(), t(this, rt).close(), t(this, ht).close(), t(this, nt).close(), t(this, Dt).close(), t(this, Xt).close(), t(this, E).close(), t(this, q).close(), t(this, U).close(), t(this, ct).close(), t(this, ut).close(), t(this, J).close(), this.disable();
863
+ Bt.unsubscribe(t(this, ve)), this.scrollElement.offScroll(t(this, jt)), t(this, Ot).close(), t(this, wt).close(), t(this, _t).close(), t(this, bt).close(), t(this, Ct).close(), t(this, $).close(), t(this, I).close(), t(this, B).close(), t(this, H).close(), t(this, kt).close(), t(this, M).close(), t(this, ot).close(), t(this, lt).close(), t(this, rt).close(), t(this, ht).close(), t(this, nt).close(), t(this, zt).close(), t(this, Xt).close(), t(this, E).close(), t(this, q).close(), t(this, U).close(), t(this, ct).close(), t(this, ut).close(), t(this, J).close(), this.disable();
863
864
  }
864
865
  removeVar(e) {
865
866
  e && t(this, v).style.removeProperty(`--${e}`);
@@ -868,13 +869,13 @@ let cs = class extends xe {
868
869
  e && t(this, v).style.setProperty(`--${e}`, s.toString());
869
870
  }
870
871
  updateValue(e, s = 0, r = 1) {
871
- return this.smootherstepCSSProperty.current ? xs(e, s, r) * r : t(this, Dt).current ? Ls(e, s, r) * r : Ke(e, s, r);
872
+ return this.smootherstepCSSProperty.current ? xs(e, s, r) * r : t(this, zt).current ? Ls(e, s, r) * r : Ke(e, s, r);
872
873
  }
873
874
  getDistance() {
874
875
  return t(this, At) + t(this, Se);
875
876
  }
876
877
  getStart() {
877
- return t(this, zt) - t(this, Se);
878
+ return t(this, Dt) - t(this, Se);
878
879
  }
879
880
  };
880
881
  Ot = /* @__PURE__ */ new WeakMap();
@@ -893,7 +894,7 @@ lt = /* @__PURE__ */ new WeakMap();
893
894
  rt = /* @__PURE__ */ new WeakMap();
894
895
  ht = /* @__PURE__ */ new WeakMap();
895
896
  nt = /* @__PURE__ */ new WeakMap();
896
- Dt = /* @__PURE__ */ new WeakMap();
897
+ zt = /* @__PURE__ */ new WeakMap();
897
898
  Xt = /* @__PURE__ */ new WeakMap();
898
899
  E = /* @__PURE__ */ new WeakMap();
899
900
  q = /* @__PURE__ */ new WeakMap();
@@ -903,7 +904,7 @@ ut = /* @__PURE__ */ new WeakMap();
903
904
  J = /* @__PURE__ */ new WeakMap();
904
905
  de = /* @__PURE__ */ new WeakMap();
905
906
  v = /* @__PURE__ */ new WeakMap();
906
- zt = /* @__PURE__ */ new WeakMap();
907
+ Dt = /* @__PURE__ */ new WeakMap();
907
908
  At = /* @__PURE__ */ new WeakMap();
908
909
  Se = /* @__PURE__ */ new WeakMap();
909
910
  R = /* @__PURE__ */ new WeakMap();
@@ -915,7 +916,7 @@ Yt = /* @__PURE__ */ new WeakMap();
915
916
  Pt = /* @__PURE__ */ new WeakMap();
916
917
  y = /* @__PURE__ */ new WeakMap();
917
918
  me = /* @__PURE__ */ new WeakSet();
918
- De = function() {
919
+ ze = function() {
919
920
  b(this, Ye, vs).call(this), this.setVar(t(this, ot).current, t(this, R)), this.setVar(t(this, lt).current, t(this, Q));
920
921
  };
921
922
  Ye = /* @__PURE__ */ new WeakSet();
@@ -932,7 +933,7 @@ vs = function() {
932
933
  })
933
934
  );
934
935
  };
935
- ze = /* @__PURE__ */ new WeakSet();
936
+ De = /* @__PURE__ */ new WeakSet();
936
937
  gs = function() {
937
938
  t(this, E).current = !0, t(this, q).current = !1, f(this, Pt, !0), t(this, I).current && t(this, v).classList.remove(t(this, I).current), t(this, M).current && t(this, v).classList.remove(
938
939
  t(this, M).current
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,137 +0,0 @@
1
- var k = (h, r, e) => {
2
- if (!r.has(h))
3
- throw TypeError("Cannot " + e);
4
- };
5
- var t = (h, r, e) => (k(h, r, "read from private field"), e ? e.call(h) : r.get(h)), d = (h, r, e) => {
6
- if (r.has(h))
7
- throw TypeError("Cannot add the same private member more than once");
8
- r instanceof WeakSet ? r.add(h) : r.set(h, e);
9
- }, s = (h, r, e, a) => (k(h, r, "write to private field"), a ? a.call(h, e) : r.set(h, e), e);
10
- import { i as f } from "./browser-0zX67oeU.js";
11
- import { g as v } from "./dom-0S_WDL4g.js";
12
- import { s as H } from "./gestures-D2Fdra_G.js";
13
- import { p as W } from "./number-Bo5RdrA1.js";
14
- import { Notifier as X } from "./notifier/index.js";
15
- import { ticker as D } from "./ticker/index.js";
16
- import { TICK_ORDER as Y } from "./order/index.js";
17
- var M;
18
- class C {
19
- constructor() {
20
- d(this, M, new X());
21
- }
22
- get changeEvent() {
23
- return t(this, M);
24
- }
25
- }
26
- M = new WeakMap();
27
- var m, n, c, x;
28
- class S extends C {
29
- constructor(e) {
30
- super();
31
- d(this, m, null);
32
- d(this, n, null);
33
- d(this, c, "offsetHeight");
34
- d(this, x, (e) => {
35
- const a = e.shiftKey ? -1 : 1;
36
- let i;
37
- e.code === "Space" ? i = a * t(this, n)[t(this, c)] * 0.4 : e.code === "ArrowLeft" ? i = -1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowRight" ? i = 1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowUp" ? i = -1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowDown" ? i = 1 * t(this, n)[t(this, c)] * 0.2 : e.code === "PageUp" ? i = -1 * t(this, n)[t(this, c)] : e.code === "PageDown" ? i = 1 * t(this, n)[t(this, c)] : e.code === "Home" ? i = 0 : e.code === "End" && (i = t(this, c) === "offsetWidth" ? t(this, n).scrollWidth : t(this, n).scrollHeight), i && (e.stopPropagation(), this.changeEvent.notify("keyboard", i));
38
- });
39
- f && (s(this, m, e != null && e.element && v(e.element) || window), s(this, n, t(this, m) instanceof HTMLElement ? t(this, m) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
40
- }
41
- set dimension(e) {
42
- s(this, c, e === "width" ? "offsetWidth" : "offsetHeight");
43
- }
44
- connect() {
45
- f && t(this, m).addEventListener(
46
- "keydown",
47
- t(this, x)
48
- );
49
- }
50
- disconnect() {
51
- f && t(this, m).removeEventListener(
52
- "keydown",
53
- t(this, x)
54
- );
55
- }
56
- }
57
- m = new WeakMap(), n = new WeakMap(), c = new WeakMap(), x = new WeakMap();
58
- var g, u, b, y;
59
- class U extends C {
60
- constructor(e) {
61
- super();
62
- d(this, g, null);
63
- d(this, u, void 0);
64
- d(this, b, void 0);
65
- d(this, y, (e) => {
66
- let a = 0;
67
- if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
68
- if (a = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
69
- const i = Date.now();
70
- if (i - t(this, b) > 40 && (a = 100 * Math.sign(a)), s(this, b, i), Math.abs(a) < 100 || t(this, u))
71
- return;
72
- this.changeEvent.notify("wheel", a), s(this, u, setTimeout(() => {
73
- s(this, u, void 0);
74
- }, 80));
75
- } else
76
- this.changeEvent.notify("wheel", a);
77
- });
78
- this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, s(this, b, Date.now()), f && s(this, g, e != null && e.element && v(e.element) || window);
79
- }
80
- connect() {
81
- f && t(this, g).addEventListener(
82
- "wheel",
83
- t(this, y),
84
- {
85
- passive: !1
86
- }
87
- );
88
- }
89
- disconnect() {
90
- f && (t(this, g).removeEventListener(
91
- "wheel",
92
- t(this, y)
93
- ), clearTimeout(t(this, u)));
94
- }
95
- }
96
- g = new WeakMap(), u = new WeakMap(), b = new WeakMap(), y = new WeakMap();
97
- var o, E, l, L, w;
98
- class B extends C {
99
- constructor(e) {
100
- super();
101
- d(this, o, null);
102
- d(this, E, !1);
103
- d(this, l, 0);
104
- d(this, L, (e) => {
105
- this.swipe || D.unsubscribe(t(this, w));
106
- let a = e;
107
- s(this, l, 0), H(
108
- (i) => {
109
- t(this, E) || (this.swipe && s(this, E, !0), this.axis === "x" ? s(this, l, a.x - i.x) : s(this, l, a.y - i.y), a = i, this.changeEvent.notify("drag", t(this, l)));
110
- },
111
- () => {
112
- s(this, l, t(this, l) * 3), this.swipe || D.subscribe(t(this, w), { order: Y.SCROLL - 1 }), s(this, E, !1);
113
- }
114
- );
115
- });
116
- d(this, w, () => {
117
- t(this, l) || D.unsubscribe(t(this, w)), s(this, l, t(this, l) * 0.95), s(this, l, W(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
118
- });
119
- this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, f && s(this, o, e != null && e.element && v(e.element) || document.documentElement);
120
- }
121
- connect() {
122
- f && t(this, o).addEventListener("pointerdown", t(this, L));
123
- }
124
- disconnect() {
125
- f && (t(this, o).removeEventListener(
126
- "pointerdown",
127
- t(this, L)
128
- ), D.unsubscribe(t(this, w)));
129
- }
130
- }
131
- o = new WeakMap(), E = new WeakMap(), l = new WeakMap(), L = new WeakMap(), w = new WeakMap();
132
- export {
133
- C,
134
- B as D,
135
- S as K,
136
- U as W
137
- };
@@ -1 +0,0 @@
1
- "use strict";var M=(r,h,e)=>{if(!h.has(r))throw TypeError("Cannot "+e)};var t=(r,h,e)=>(M(r,h,"read from private field"),e?e.call(r):h.get(r)),l=(r,h,e)=>{if(h.has(r))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(r):h.set(r,e)},i=(r,h,e,n)=>(M(r,h,"write to private field"),n?n.call(r,e):h.set(r,e),e);const f=require("./browser-CpzFX2xg.cjs"),B=require("./dom-JBOkFLTh.cjs"),v=require("./gestures-DHLrn6Q8.cjs"),q=require("./number-yVpzMdbQ.cjs"),H=require("./notifier/index.cjs"),k=require("./ticker/index.cjs"),W=require("./order/index.cjs");var C;class D{constructor(){l(this,C,new H.Notifier)}get changeEvent(){return t(this,C)}}C=new WeakMap;var u,a,c,x;class X extends D{constructor(e){super();l(this,u,null);l(this,a,null);l(this,c,"offsetHeight");l(this,x,e=>{const n=e.shiftKey?-1:1;let s;e.code==="Space"?s=n*t(this,a)[t(this,c)]*.4:e.code==="ArrowLeft"?s=-1*t(this,a)[t(this,c)]*.2:e.code==="ArrowRight"?s=1*t(this,a)[t(this,c)]*.2:e.code==="ArrowUp"?s=-1*t(this,a)[t(this,c)]*.2:e.code==="ArrowDown"?s=1*t(this,a)[t(this,c)]*.2:e.code==="PageUp"?s=-1*t(this,a)[t(this,c)]:e.code==="PageDown"?s=1*t(this,a)[t(this,c)]:e.code==="Home"?s=0:e.code==="End"&&(s=t(this,c)==="offsetWidth"?t(this,a).scrollWidth:t(this,a).scrollHeight),s&&(e.stopPropagation(),this.changeEvent.notify("keyboard",s))});f.isBrowser&&(i(this,u,e!=null&&e.element&&B.getElement(e.element)||window),i(this,a,t(this,u)instanceof HTMLElement?t(this,u):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,c,e==="width"?"offsetWidth":"offsetHeight")}connect(){f.isBrowser&&t(this,u).addEventListener("keydown",t(this,x))}disconnect(){f.isBrowser&&t(this,u).removeEventListener("keydown",t(this,x))}}u=new WeakMap,a=new WeakMap,c=new WeakMap,x=new WeakMap;var o,w,g,y;class Y extends D{constructor(e){super();l(this,o,null);l(this,w,void 0);l(this,g,void 0);l(this,y,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const s=Date.now();if(s-t(this,g)>40&&(n=100*Math.sign(n)),i(this,g,s),Math.abs(n)<100||t(this,w))return;this.changeEvent.notify("wheel",n),i(this,w,setTimeout(()=>{i(this,w,void 0)},80))}else this.changeEvent.notify("wheel",n)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,g,Date.now()),f.isBrowser&&i(this,o,e!=null&&e.element&&B.getElement(e.element)||window)}connect(){f.isBrowser&&t(this,o).addEventListener("wheel",t(this,y),{passive:!1})}disconnect(){f.isBrowser&&(t(this,o).removeEventListener("wheel",t(this,y)),clearTimeout(t(this,w)))}}o=new WeakMap,w=new WeakMap,g=new WeakMap,y=new WeakMap;var b,E,d,L,m;class A extends D{constructor(e){super();l(this,b,null);l(this,E,!1);l(this,d,0);l(this,L,e=>{this.swipe||k.ticker.unsubscribe(t(this,m));let n=e;i(this,d,0),v.setupDrag(s=>{t(this,E)||(this.swipe&&i(this,E,!0),this.axis==="x"?i(this,d,n.x-s.x):i(this,d,n.y-s.y),n=s,this.changeEvent.notify("drag",t(this,d)))},()=>{i(this,d,t(this,d)*3),this.swipe||k.ticker.subscribe(t(this,m),{order:W.TICK_ORDER.SCROLL-1}),i(this,E,!1)})});l(this,m,()=>{t(this,d)||k.ticker.unsubscribe(t(this,m)),i(this,d,t(this,d)*.95),i(this,d,q.preciseNumber(t(this,d),3)),this.changeEvent.notify("drag",t(this,d))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,f.isBrowser&&i(this,b,e!=null&&e.element&&B.getElement(e.element)||document.documentElement)}connect(){f.isBrowser&&t(this,b).addEventListener("pointerdown",t(this,L))}disconnect(){f.isBrowser&&(t(this,b).removeEventListener("pointerdown",t(this,L)),k.ticker.unsubscribe(t(this,m)))}}b=new WeakMap,E=new WeakMap,d=new WeakMap,L=new WeakMap,m=new WeakMap;exports.Controls=D;exports.DragControls=A;exports.KeyboardControls=X;exports.WheelControls=Y;