aptechka 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +26 -26
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +177 -178
- package/package.json +1 -1
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){t(this,f)&&e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),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(),this.debounce){const r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,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,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(t(this,l))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
|
|
1
|
+
"use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){t(this,f)&&e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),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(),this.debounce){const r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,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,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(Math.abs(t(this,l)))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
|
package/lib/controls/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var Q = (h) => {
|
|
|
2
2
|
throw TypeError(h);
|
|
3
3
|
};
|
|
4
4
|
var F = (h, r, e) => r.has(h) || Q("Cannot " + e);
|
|
5
|
-
var t = (h, r, e) => (F(h, r, "read from private field"), e ? e.call(h) : r.get(h)), s = (h, r, e) => r.has(h) ? Q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, n) => (F(h, r, "write to private field"), n ? n.call(h, e) : r.set(h, e), e),
|
|
5
|
+
var t = (h, r, e) => (F(h, r, "read from private field"), e ? e.call(h) : r.get(h)), s = (h, r, e) => r.has(h) ? Q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, n) => (F(h, r, "write to private field"), n ? n.call(h, e) : r.set(h, e), e), L = (h, r, e) => (F(h, r, "access private method"), e);
|
|
6
6
|
import { Notifier as j } from "../notifier/index.js";
|
|
7
7
|
import { i as m } from "../browser-0zX67oeU.js";
|
|
8
8
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
@@ -23,11 +23,11 @@ class N {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
K = new WeakMap();
|
|
26
|
-
var
|
|
26
|
+
var b, d, f, z;
|
|
27
27
|
class ce extends N {
|
|
28
28
|
constructor(e) {
|
|
29
29
|
super();
|
|
30
|
-
s(this,
|
|
30
|
+
s(this, b, null);
|
|
31
31
|
s(this, d, null);
|
|
32
32
|
s(this, f, "offsetHeight");
|
|
33
33
|
s(this, z, (e) => {
|
|
@@ -35,31 +35,31 @@ class ce extends N {
|
|
|
35
35
|
let a;
|
|
36
36
|
e.code === "Space" ? a = n * t(this, d)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, d)[t(this, f)] : e.code === "PageDown" ? a = 1 * t(this, d)[t(this, f)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, f) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a));
|
|
37
37
|
});
|
|
38
|
-
m && (i(this,
|
|
38
|
+
m && (i(this, b, e != null && e.element && U(e.element) || window), i(this, d, t(this, b) instanceof HTMLElement ? t(this, b) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
39
39
|
}
|
|
40
40
|
set dimension(e) {
|
|
41
41
|
i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
42
42
|
}
|
|
43
43
|
connect() {
|
|
44
|
-
m && t(this,
|
|
44
|
+
m && t(this, b).addEventListener(
|
|
45
45
|
"keydown",
|
|
46
46
|
t(this, z)
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
disconnect() {
|
|
50
|
-
m && t(this,
|
|
50
|
+
m && t(this, b).removeEventListener(
|
|
51
51
|
"keydown",
|
|
52
52
|
t(this, z)
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
var
|
|
56
|
+
b = new WeakMap(), d = new WeakMap(), f = new WeakMap(), z = new WeakMap();
|
|
57
|
+
var w, y, P, X, c, k, u, o, W, S, C, Y, A;
|
|
58
58
|
class fe extends N {
|
|
59
59
|
constructor(e) {
|
|
60
60
|
super();
|
|
61
61
|
s(this, o);
|
|
62
|
-
s(this,
|
|
62
|
+
s(this, w);
|
|
63
63
|
s(this, y);
|
|
64
64
|
s(this, P);
|
|
65
65
|
s(this, X);
|
|
@@ -72,28 +72,28 @@ class fe extends N {
|
|
|
72
72
|
this.direction = 1, i(this, c, new J(0, { easing: G })), i(this, u, !1), i(this, C, (n) => {
|
|
73
73
|
t(this, c).current !== 1 && this.changeEvent.notify(
|
|
74
74
|
"autoplay",
|
|
75
|
-
n.timeBetweenFrames * t(this,
|
|
75
|
+
n.timeBetweenFrames * t(this, w) * this.direction * (1 - t(this, c).current)
|
|
76
76
|
);
|
|
77
77
|
}), i(this, Y, () => {
|
|
78
78
|
t(this, c).current !== 1 && this.changeEvent.notify(
|
|
79
79
|
"autoplay",
|
|
80
|
-
Math.sign(t(this,
|
|
80
|
+
Math.sign(t(this, w)) * this.direction * (1 - t(this, c).current)
|
|
81
81
|
);
|
|
82
82
|
}), i(this, A, () => {
|
|
83
83
|
t(this, y) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
|
|
84
|
-
}), i(this,
|
|
84
|
+
}), i(this, w, (e == null ? void 0 : e.speed) || 1), i(this, y, (e == null ? void 0 : e.interval) || !1), i(this, P, e);
|
|
85
85
|
}
|
|
86
86
|
set interval(e) {
|
|
87
|
-
i(this, y, e), t(this, u) &&
|
|
87
|
+
i(this, y, e), t(this, u) && L(this, o, W).call(this);
|
|
88
88
|
}
|
|
89
89
|
set speed(e) {
|
|
90
|
-
i(this,
|
|
90
|
+
i(this, w, e), t(this, u) && L(this, o, W).call(this);
|
|
91
91
|
}
|
|
92
92
|
connect() {
|
|
93
|
-
t(this, u) || (i(this, u, !0),
|
|
93
|
+
t(this, u) || (i(this, u, !0), L(this, o, W).call(this));
|
|
94
94
|
}
|
|
95
95
|
disconnect() {
|
|
96
|
-
t(this, u) && (i(this, u, !1),
|
|
96
|
+
t(this, u) && (i(this, u, !1), L(this, o, S).call(this));
|
|
97
97
|
}
|
|
98
98
|
pauseAndContinue(e, n) {
|
|
99
99
|
t(this, u) && e && (clearTimeout(t(this, k)), t(this, c).set(1, {
|
|
@@ -107,10 +107,10 @@ class fe extends N {
|
|
|
107
107
|
}, e)));
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
w = new WeakMap(), y = new WeakMap(), P = new WeakMap(), X = new WeakMap(), c = new WeakMap(), k = new WeakMap(), u = new WeakMap(), o = new WeakSet(), W = function() {
|
|
111
|
+
L(this, o, S).call(this), t(this, y) ? i(this, X, setInterval(
|
|
112
112
|
t(this, Y),
|
|
113
|
-
Math.abs(t(this,
|
|
113
|
+
Math.abs(t(this, w))
|
|
114
114
|
)) : T.subscribe(t(this, C), t(this, P)), document.addEventListener(
|
|
115
115
|
"visibilitychange",
|
|
116
116
|
t(this, A)
|
|
@@ -160,7 +160,7 @@ class ue extends N {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
I = new WeakMap(), x = new WeakMap(), D = new WeakMap(), q = new WeakMap();
|
|
163
|
-
var v, g, H, l, R,
|
|
163
|
+
var v, g, H, l, R, M;
|
|
164
164
|
const E = class E extends N {
|
|
165
165
|
constructor(e) {
|
|
166
166
|
super();
|
|
@@ -172,7 +172,7 @@ const E = class E extends N {
|
|
|
172
172
|
(a) => a instanceof HTMLElement && a.hasAttribute("drag-dead-zone")
|
|
173
173
|
))
|
|
174
174
|
return;
|
|
175
|
-
this.swipe || T.unsubscribe(t(this,
|
|
175
|
+
this.swipe || T.unsubscribe(t(this, M));
|
|
176
176
|
let n = e;
|
|
177
177
|
i(this, l, 0), document.documentElement.classList.add("grabbing"), Z(
|
|
178
178
|
(a) => {
|
|
@@ -183,14 +183,14 @@ const E = class E extends N {
|
|
|
183
183
|
this.axis === "x" ? i(this, l, O) : i(this, l, B), n = a, (this.axis === "x" && Math.abs(O) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(O)) && (i(E, v, t(this, g)), this.changeEvent.notify("drag", t(this, l)));
|
|
184
184
|
},
|
|
185
185
|
() => {
|
|
186
|
-
i(E, v, null), this.swipe || (i(this, l, t(this, l) * 3), T.subscribe(t(this,
|
|
186
|
+
i(E, v, null), this.swipe || (i(this, l, t(this, l) * 3), T.subscribe(t(this, M), {
|
|
187
187
|
order: p.CONTROLS - 1
|
|
188
188
|
})), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
});
|
|
192
|
-
s(this,
|
|
193
|
-
Math.floor(t(this, l)) || T.unsubscribe(t(this,
|
|
192
|
+
s(this, M, () => {
|
|
193
|
+
Math.floor(Math.abs(t(this, l))) || T.unsubscribe(t(this, M)), i(this, l, t(this, l) * 0.95), i(this, l, $(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
|
|
194
194
|
});
|
|
195
195
|
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, g, e != null && e.element && U(e.element) || document.documentElement);
|
|
196
196
|
}
|
|
@@ -201,10 +201,10 @@ const E = class E extends N {
|
|
|
201
201
|
m && (t(this, g).removeEventListener(
|
|
202
202
|
"pointerdown",
|
|
203
203
|
t(this, R)
|
|
204
|
-
), T.unsubscribe(t(this,
|
|
204
|
+
), T.unsubscribe(t(this, M)));
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
v = new WeakMap(), g = new WeakMap(), H = new WeakMap(), l = new WeakMap(), R = new WeakMap(),
|
|
207
|
+
v = new WeakMap(), g = new WeakMap(), H = new WeakMap(), l = new WeakMap(), R = new WeakMap(), M = new WeakMap(), s(E, v, null);
|
|
208
208
|
let V = E;
|
|
209
209
|
export {
|
|
210
210
|
fe as AutoplayControls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ce=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var oe=u=>{throw TypeError(u)};var he=(u,n,e)=>n in u?Ce(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,le=(u,n)=>{for(var e in n||(n={}))Ee.call(n,e)&&he(u,e,n[e]);if(ne)for(var e of ne(n))Pe.call(n,e)&&he(u,e,n[e]);return u};var Zt=(u,n,e)=>n.has(u)||oe("Cannot "+e);var t=(u,n,e)=>(Zt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?oe("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(Zt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(Zt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../../Store-CDb6RMce.cjs"),Kt=require("../../browser-CpzFX2xg.cjs"),xe=require("../../easings-DsS5-Kqc.cjs"),Jt=require("../../events-KVanG9sR.cjs"),ue=require("../../jss-GJLvaNfT.cjs"),gt=require("../../layout-8ryRAMGJ.cjs"),ae=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Qt=require("../../order/index.cjs"),ze=require("../../Damped-CTsV8tl_.cjs"),Le=require("../../Tweened-BttGiyB0.cjs"),Ut=require("../../controls/index.cjs"),jt=require("../../window-resizer/vanilla/index.cjs"),yt=require("../../scroll-entries/index.cjs"),ce=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ke=require("../../device/index.cjs"),Gt=require("../../element-resizer/vanilla/index.cjs"),De=require("../../gestures-DHLrn6Q8.cjs"),de=require("../../dom-JBOkFLTh.cjs"),qe=require("../../function-MthRj-GJ.cjs"),Re=require("../../scroll-segment/index.cjs");var f,At,y,nt,A,N;class Te{constructor(n,e,i){s(this,f);s(this,At);s(this,y);s(this,nt,0);s(this,A,0);s(this,N,null);h(this,f,n),h(this,At,e),h(this,y,i),yt.scrollEntries.register(t(this,f))}get index(){return t(this,At)}get size(){return t(this,nt)}get position(){return t(this,A)}destroy(){yt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,nt,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?gt.getCumulativeOffsetTop(t(this,f)):gt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,nt)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),yt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,nt)+e,m=ae.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,N)!==n&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),n&&t(this,f).classList.add(n),h(this,N,n),Jt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,At=new WeakMap,y=new WeakMap,nt=new WeakMap,A=new WeakMap,N=new WeakMap;const Ae=ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,ht,x,I,M,O,D,V,j,q,C,ot,lt,ct,ut,vt,k,at,G,R,K,B,Z,dt,pt,J,Q,p,Ct,l,It,Mt,v,g,z,T,X,_,E,b,Et,Y,ie,H,tt,St,Pt,W,o,Tt,bt,$t,Nt,Xt,Yt,L,wt,pe,xt,Ot,te,ee,rt,se;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ht,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,I,new S.CSSProperty(this,"--direction",0));s(this,M,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,j,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,ot,new S.CSSProperty(this,"--damping",20));s(this,lt,new S.CSSProperty(this,"--mass",0));s(this,ct,new S.CSSProperty(this,"--stiffness",0));s(this,ut,new S.CSSProperty(this,"--mouse-drag",!1));s(this,vt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,at,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,G,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,K,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Z,new S.CSSProperty(this,"--focus-delay",0));s(this,dt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,pt,new S.CSSProperty(this,"--disabled",!1));s(this,J,new S.CSSProperty(this,"--hibernated",!1));s(this,Q,null);s(this,p,null);s(this,Ct,null);s(this,l,[]);s(this,It,0);s(this,Mt,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,T,null);s(this,X,null);s(this,_,null);s(this,E,null);s(this,b,new we.Store(0));s(this,Et,0);s(this,Y,0);s(this,ie,!1);s(this,H,!1);s(this,tt,!0);s(this,St,!0);s(this,Pt);s(this,W,new Le.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,It,this.vertical?gt.getCumulativeOffsetTop(this):gt.getCumulativeOffsetLeft(this)),h(this,Mt,this.vertical?gt.getCumulativeOffsetTop(t(this,p)):gt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,M).current){h(this,g,t(this,v)*t(this,M).current);const r=t(this,g)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,v)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,v),m=t(this,g)-c;h(this,Y,r.position+r.size+m)}else h(this,Y,t(this,g));if(t(this,D).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,H,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Nt).call(this):d(this,o,$t).call(this),t(this,wt).call(this)});s(this,wt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,Et,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;yt.scrollEntries.update(this,t(this,x).current,e)});s(this,xt,(e,i)=>{t(this,ht).current&&(d(this,o,te).call(this,Math.sign(i)||1),t(this,Ot).call(this,e,i))});s(this,Ot,(e,i)=>{if(t(this,I).current){if(t(this,I).current<0&&i>0)return;if(t(this,I).current>0&&i<0)return}if(t(this,W).unlistenAnimationFrame(),!t(this,k).current&&t(this,Z).current&&(clearInterval(t(this,Pt)),h(this,Pt,setTimeout(()=>{const r=d(this,o,se).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,dt).current,easing:xe.easeInOutExpo}})},t(this,Z).current))),!(e==="drag"&&!ke.device.isMobile&&!t(this,ut).current))if(t(this,D).current){const r=Math.sign(i);t(this,l).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Ae);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Q,document.createElement("div")),t(this,Q).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,Q).appendChild(t(this,p)),e.appendChild(t(this,Q))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ht)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,I)}get pagesCSSProperty(){return t(this,M)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,j)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,ot)}get massCSSProperty(){return t(this,lt)}get stiffnessCSSProperty(){return t(this,ct)}get mouseDragCSSProperty(){return t(this,ut)}get sectionDistanceScaleCSSProperty(){return t(this,vt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,at)}get autoplayUserDirectionCSSProperty(){return t(this,G)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,K)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,Z)}get focusDurationCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,pt)}get hibernatedCSSProperty(){return t(this,J)}get currentScrollValue(){return d(this,o,ee).call(this,"current")}get targetScrollValue(){return d(this,o,ee).call(this,"target")}get contentWrapperElement(){return t(this,Q)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,It)}get contentPosition(){return t(this,Mt)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,Y)}get loopDistance(){return t(this,C).current?t(this,Y)+t(this,z):t(this,Y)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,Et)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,b).current;d(this,o,pe).call(this,e);const c=t(this,l)[r],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const mt=d(this,o,se).call(this),ve=mt?this.targetScrollValue-mt.position:0;t(this,C).current?t(this,b).current===0&&r===t(this,l).length-1?w=t(this,g)+t(this,v)-c.position+t(this,z)+1:t(this,b).current===t(this,l).length-1&&r===0?w=m.position-(t(this,g)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,te).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,W).set(t(this,a).current,{equalize:!0}),t(this,W).set(e,le({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new ze.Damped(0,{damping:.01,min:0,order:Qt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,T,new Ut.WheelControls({element:t(this,p)})),t(this,T).changeEvent.subscribe(t(this,xt)),h(this,X,new Ut.KeyboardControls({element:this})),t(this,X).changeEvent.subscribe(t(this,xt)),h(this,_,new Ut.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,xt)),h(this,E,new Ut.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Ot)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,T).axis=t(this,j).current?"max":e,t(this,X).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,j).subscribe(e=>{t(this,T).axis=e.current?"max":t(this,x).current}),t(this,M).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Tt).call(this):d(this,o,bt).call(this))}),t(this,D).subscribe(e=>{t(this,T).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,rt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,O).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Et,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,ot).subscribe(e=>{t(this,a).damping=e.current}),t(this,lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ct).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,!t(this,tt)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,G).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,o,rt).call(this)}),t(this,K).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,l).length&&d(this,o,rt).call(this)}),t(this,W).subscribe(e=>{t(this,W).isRunning.current&&t(this,a).set(e.current)}),t(this,pt).subscribe(e=>{e.current&&!e.previous?d(this,o,$t).call(this):!e.current&&e.previous&&d(this,o,Nt).call(this)}),t(this,J).subscribe(e=>{e.current&&!e.previous?d(this,o,Xt).call(this):!e.current&&e.previous&&d(this,o,Yt).call(this)}),t(this,ht).observe(),t(this,x).observe(),t(this,I).observe(),t(this,M).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,j).observe(),t(this,q).observe(),t(this,C).observe(),t(this,ot).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,vt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,at).observe(),t(this,G).observe(),t(this,R).observe(),t(this,K).observe(),t(this,B).observe(),t(this,Z).observe(),t(this,dt).observe(),t(this,pt).observe(),t(this,J).observe(),t(this,J).current||d(this,o,Yt).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,ht).unobserve(),t(this,x).unobserve(),t(this,I).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,vt).unobserve(),t(this,k).unobserve(),t(this,at).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,K).unobserve(),t(this,B).unobserve(),t(this,Z).unobserve(),t(this,dt).unobserve(),t(this,pt).unobserve(),t(this,J).unobserve(),d(this,o,Xt).call(this)}}a=new WeakMap,ht=new WeakMap,x=new WeakMap,I=new WeakMap,M=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,j=new WeakMap,q=new WeakMap,C=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,vt=new WeakMap,k=new WeakMap,at=new WeakMap,G=new WeakMap,R=new WeakMap,K=new WeakMap,B=new WeakMap,Z=new WeakMap,dt=new WeakMap,pt=new WeakMap,J=new WeakMap,Q=new WeakMap,p=new WeakMap,Ct=new WeakMap,l=new WeakMap,It=new WeakMap,Mt=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,X=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,Et=new WeakMap,Y=new WeakMap,ie=new WeakMap,H=new WeakMap,tt=new WeakMap,St=new WeakMap,Pt=new WeakMap,W=new WeakMap,o=new WeakSet,Tt=function(){d(this,o,bt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Te(e,i,this))}),t(this,p).style.transform="",Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,rt).call(this)},bt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},$t=function(){t(this,tt)||(h(this,tt,!0),t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Pt)),t(this,W).unlistenAnimationFrame(),t(this,T).disconnect(),t(this,X).disconnect(),t(this,_).disconnect(),t(this,E).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Nt=function(){t(this,tt)&&(h(this,tt,!1),t(this,a).subscribe(t(this,wt)),t(this,T).connect(),t(this,X).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Xt=function(){t(this,St)||(h(this,St,!0),jt.windowResizer.unsubscribe(t(this,L)),Gt.elementResizer.unsubscribe(t(this,L)),d(this,o,$t).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,bt).call(this):(t(this,b).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Yt=function(){t(this,St)&&(h(this,St,!1),(t(this,C).current||t(this,O).current||t(this,C).current||t(this,V).current||t(this,D).current)&&d(this,o,Tt).call(this),yt.scrollEntries.register(this),d(this,o,Nt).call(this),jt.windowResizer.subscribe(t(this,L),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,wt=new WeakMap,pe=function(e){t(this,C).current?(t(this,b).current=e%t(this,l).length,t(this,b).current=t(this,b).current<0?t(this,l).length+t(this,b).current:t(this,b).current):t(this,b).current=ae.clamp(e,0,this.limit)},xt=new WeakMap,Ot=new WeakMap,te=function(e=1){t(this,G).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,at).current,this.sectionalCSSProperty.current)},ee=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,g)+t(this,v)+t(this,z));return i<0?t(this,g)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},rt=function(){if(t(this,R).current&&t(this,l).length){const e=t(this,b).current+t(this,K).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,l).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,mt=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+mt/2||c<=m+i?r.mark("next"):r.mark("previous")})}},se=function(){let e=null,i=1/0;for(let r=0;r<t(this,l).length;r++){const c=Math.abs(t(this,l)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Rt);var Vt;class re extends HTMLElement{constructor(){super(...arguments);s(this,Vt,null)}get scrollElement(){return t(this,Vt)}connectedCallback(){const e=de.findParentElement(this,Rt);e instanceof Rt?h(this,Vt,e):console.error(this,"e-scroll not found")}}Vt=new WeakMap;var et,P,F,U,zt,Lt,ft,Bt,_t,Ht;class Se extends re{constructor(){super();s(this,et,null);s(this,P,null);s(this,F,!1);s(this,U,0);s(this,zt,0);s(this,Lt,0);s(this,ft,()=>{h(this,F,this.offsetWidth>this.offsetHeight);const e=t(this,F)?this.offsetWidth:this.offsetHeight;h(this,U,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,U,Math.max(t(this,U),30)),t(this,F)?(t(this,P).style.width=t(this,U)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,U)+"px"),h(this,zt,e-t(this,U)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Bt,()=>{h(this,Lt,this.scrollElement.currentProgress*t(this,zt)),t(this,F)?t(this,P).style.transform=`translate3d(${t(this,Lt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,Lt)}px, 0px)`});s(this,_t,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ht,e=>{document.documentElement.classList.add("grabbing"),De.setupDrag(c=>{const m=t(this,F)?c.x:c.y,w=this.scrollElement.distance/t(this,zt),mt=(m-r)*w;this.scrollElement.setPosition(i+mt)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,F)?e.x:e.y});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,et,document.createElement("slot")),t(this,et).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,et))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,et).assignedElements()[0]||t(this,et).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,Ht)),jt.windowResizer.subscribe(t(this,ft),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,ft)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,_t))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,Ht)),jt.windowResizer.unsubscribe(t(this,ft)),Gt.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,_t))}}et=new WeakMap,P=new WeakMap,F=new WeakMap,U=new WeakMap,zt=new WeakMap,Lt=new WeakMap,ft=new WeakMap,Bt=new WeakMap,_t=new WeakMap,Ht=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Se);class fe extends re{constructor(){super(),Kt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class me extends fe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",me);class be extends fe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",be);var $,st,kt,Wt,Ft,Dt;class Ie{constructor(n,e,i){s(this,$,null);s(this,st,null);s(this,kt,null);s(this,Wt,null);s(this,Ft,()=>{t(this,st).scrollToSection(t(this,kt),{behaviour:t(this,Wt)})});s(this,Dt,()=>{t(this,$).classList.toggle("current",t(this,st).counter.current===t(this,kt))});Kt.isBrowser&&(h(this,$,document.createElement("button")),h(this,st,n),h(this,Wt,i),h(this,kt,e),t(this,$).addEventListener("click",t(this,Ft)),t(this,st).counter.subscribe(t(this,Dt)),t(this,Dt).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,Ft)),t(this,st).counter.unsubscribe(t(this,Dt)),t(this,$).remove()}}$=new WeakMap,st=new WeakMap,kt=new WeakMap,Wt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap;var it,qt;class ge extends re{constructor(){super(...arguments);s(this,it,[]);s(this,qt,qe.debounce(()=>{t(this,it).forEach(e=>e.destroy()),h(this,it,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ie(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,it).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,qt)),t(this,qt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,qt)),t(this,it).forEach(e=>e.destroy()),h(this,it,[])}}it=new WeakMap,qt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ge);class ye extends Re.ScrollSegmentElement{connectedCallback(){const n=de.findParentElement(this,Rt);n instanceof Rt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",ye);exports.ScrollBulletButtonsElement=ge;exports.ScrollElement=Rt;exports.ScrollSegmentElement=ye;exports.ScrollSetButtonElement=me;exports.ScrollStepButtonElement=be;exports.ScrollbarElement=Se;
|
|
1
|
+
"use strict";var ve=Object.defineProperty;var re=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var he=u=>{throw TypeError(u)};var ne=(u,n,e)=>n in u?ve(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,oe=(u,n)=>{for(var e in n||(n={}))Ce.call(n,e)&&ne(u,e,n[e]);if(re)for(var e of re(n))Ee.call(n,e)&&ne(u,e,n[e]);return u};var Zt=(u,n,e)=>n.has(u)||he("Cannot "+e);var t=(u,n,e)=>(Zt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(Zt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(Zt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("../../Store-CDb6RMce.cjs"),Kt=require("../../browser-CpzFX2xg.cjs"),we=require("../../easings-DsS5-Kqc.cjs"),Jt=require("../../events-KVanG9sR.cjs"),ce=require("../../jss-GJLvaNfT.cjs"),yt=require("../../layout-8ryRAMGJ.cjs"),ue=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Qt=require("../../order/index.cjs"),xe=require("../../Damped-CTsV8tl_.cjs"),ze=require("../../Tweened-BttGiyB0.cjs"),Ut=require("../../controls/index.cjs"),jt=require("../../window-resizer/vanilla/index.cjs"),nt=require("../../scroll-entries/index.cjs"),le=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),Le=require("../../device/index.cjs"),Gt=require("../../element-resizer/vanilla/index.cjs"),ke=require("../../gestures-DHLrn6Q8.cjs"),ae=require("../../dom-JBOkFLTh.cjs"),De=require("../../function-MthRj-GJ.cjs"),qe=require("../../scroll-segment/index.cjs");var f,At,y,ht,A,N;class Re{constructor(n,e,i){s(this,f);s(this,At);s(this,y);s(this,ht,0);s(this,A,0);s(this,N,null);h(this,f,n),h(this,At,e),h(this,y,i),nt.scrollEntries.register(t(this,f))}get index(){return t(this,At)}get size(){return t(this,ht)}get position(){return t(this,A)}destroy(){nt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,ht,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?yt.getCumulativeOffsetTop(t(this,f)):yt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,ht)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),nt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,ht)+e,m=ue.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,N)!==n&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),n&&t(this,f).classList.add(n),h(this,N,n),Jt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,At=new WeakMap,y=new WeakMap,ht=new WeakMap,A=new WeakMap,N=new WeakMap;const Te=ce.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,ot,x,I,M,O,D,V,j,q,C,lt,ct,ut,at,vt,k,dt,G,R,K,B,Z,pt,St,J,Q,p,Ct,l,It,Mt,v,g,z,T,X,_,E,b,Et,Y,H,tt,ft,Pt,W,o,Tt,gt,$t,Nt,Xt,Yt,L,wt,de,xt,Ot,te,ee,rt,se;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ot,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,I,new S.CSSProperty(this,"--direction",0));s(this,M,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,j,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,lt,new S.CSSProperty(this,"--damping",20));s(this,ct,new S.CSSProperty(this,"--mass",0));s(this,ut,new S.CSSProperty(this,"--stiffness",0));s(this,at,new S.CSSProperty(this,"--mouse-drag",!1));s(this,vt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,dt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,G,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,K,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Z,new S.CSSProperty(this,"--focus-delay",0));s(this,pt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,St,new S.CSSProperty(this,"--disabled",!1));s(this,J,new S.CSSProperty(this,"--hibernated",!1));s(this,Q,null);s(this,p,null);s(this,Ct,null);s(this,l,[]);s(this,It,0);s(this,Mt,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,T,null);s(this,X,null);s(this,_,null);s(this,E,null);s(this,b,new Pe.Store(0));s(this,Et,0);s(this,Y,0);s(this,H,!1);s(this,tt,!0);s(this,ft,!0);s(this,Pt);s(this,W,new ze.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,It,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),h(this,Mt,this.vertical?yt.getCumulativeOffsetTop(t(this,p)):yt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,M).current){h(this,g,t(this,v)*t(this,M).current);const r=t(this,g)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,v)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,v),m=t(this,g)-c;h(this,Y,r.position+r.size+m)}else h(this,Y,t(this,g));if(t(this,D).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,H,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Nt).call(this):d(this,o,$t).call(this),t(this,wt).call(this)});s(this,wt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,Et,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;nt.scrollEntries.update(this,t(this,x).current,e)});s(this,xt,(e,i)=>{t(this,ot).current&&(d(this,o,te).call(this,Math.sign(i)||1),t(this,Ot).call(this,e,i))});s(this,Ot,(e,i)=>{if(t(this,I).current){if(t(this,I).current<0&&i>0)return;if(t(this,I).current>0&&i<0)return}if(t(this,W).unlistenAnimationFrame(),!t(this,k).current&&t(this,Z).current&&(clearInterval(t(this,Pt)),h(this,Pt,setTimeout(()=>{const r=d(this,o,se).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,pt).current,easing:we.easeInOutExpo}})},t(this,Z).current))),!(e==="drag"&&!Le.device.isMobile&&!t(this,at).current))if(t(this,D).current){const r=Math.sign(i);t(this,l).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Te);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Q,document.createElement("div")),t(this,Q).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,Q).appendChild(t(this,p)),e.appendChild(t(this,Q))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ot)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,I)}get pagesCSSProperty(){return t(this,M)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,j)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,lt)}get massCSSProperty(){return t(this,ct)}get stiffnessCSSProperty(){return t(this,ut)}get mouseDragCSSProperty(){return t(this,at)}get sectionDistanceScaleCSSProperty(){return t(this,vt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,dt)}get autoplayUserDirectionCSSProperty(){return t(this,G)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,K)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,Z)}get focusDurationCSSProperty(){return t(this,pt)}get disabledCSSProperty(){return t(this,St)}get hibernatedCSSProperty(){return t(this,J)}get currentScrollValue(){return d(this,o,ee).call(this,"current")}get targetScrollValue(){return d(this,o,ee).call(this,"target")}get contentWrapperElement(){return t(this,Q)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,It)}get contentPosition(){return t(this,Mt)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,Y)}get loopDistance(){return t(this,C).current?t(this,Y)+t(this,z):t(this,Y)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,Et)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,b).current;d(this,o,de).call(this,e);const c=t(this,l)[r],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const bt=d(this,o,se).call(this),ye=bt?this.targetScrollValue-bt.position:0;t(this,C).current?t(this,b).current===0&&r===t(this,l).length-1?w=t(this,g)+t(this,v)-c.position+t(this,z):t(this,b).current===t(this,l).length-1&&r===0?w=m.position-(t(this,g)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ye,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,te).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,W).set(t(this,a).current,{equalize:!0}),t(this,W).set(e,oe({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){nt.scrollEntries.register(this),h(this,a,new xe.Damped(0,{damping:.01,min:0,order:Qt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,T,new Ut.WheelControls({element:t(this,p)})),t(this,T).changeEvent.subscribe(t(this,xt)),h(this,X,new Ut.KeyboardControls({element:this})),t(this,X).changeEvent.subscribe(t(this,xt)),h(this,_,new Ut.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,xt)),h(this,E,new Ut.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Ot)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,T).axis=t(this,j).current?"max":e,t(this,X).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,j).subscribe(e=>{t(this,T).axis=e.current?"max":t(this,x).current}),t(this,M).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Tt).call(this):d(this,o,gt).call(this))}),t(this,D).subscribe(e=>{t(this,T).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,gt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,gt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,rt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,O).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Et,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,lt).subscribe(e=>{t(this,a).damping=e.current}),t(this,ct).subscribe(e=>{t(this,a).mass=e.current}),t(this,ut).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,!t(this,tt)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,G).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,o,rt).call(this)}),t(this,K).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,l).length&&d(this,o,rt).call(this)}),t(this,W).subscribe(e=>{t(this,W).isRunning.current&&t(this,a).set(e.current)}),t(this,St).subscribe(e=>{e.current&&!e.previous?d(this,o,$t).call(this):!e.current&&e.previous&&d(this,o,Nt).call(this)}),t(this,J).subscribe(e=>{e.current&&!e.previous?d(this,o,Xt).call(this):!e.current&&e.previous&&d(this,o,Yt).call(this)}),t(this,ot).observe(),t(this,x).observe(),t(this,I).observe(),t(this,M).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,j).observe(),t(this,q).observe(),t(this,C).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),t(this,vt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,dt).observe(),t(this,G).observe(),t(this,R).observe(),t(this,K).observe(),t(this,B).observe(),t(this,Z).observe(),t(this,pt).observe(),t(this,St).observe(),t(this,J).observe(),t(this,J).current||d(this,o,Yt).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,ot).unobserve(),t(this,x).unobserve(),t(this,I).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),t(this,vt).unobserve(),t(this,k).unobserve(),t(this,dt).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,K).unobserve(),t(this,B).unobserve(),t(this,Z).unobserve(),t(this,pt).unobserve(),t(this,St).unobserve(),t(this,J).unobserve(),d(this,o,Xt).call(this)}}a=new WeakMap,ot=new WeakMap,x=new WeakMap,I=new WeakMap,M=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,j=new WeakMap,q=new WeakMap,C=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,vt=new WeakMap,k=new WeakMap,dt=new WeakMap,G=new WeakMap,R=new WeakMap,K=new WeakMap,B=new WeakMap,Z=new WeakMap,pt=new WeakMap,St=new WeakMap,J=new WeakMap,Q=new WeakMap,p=new WeakMap,Ct=new WeakMap,l=new WeakMap,It=new WeakMap,Mt=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,X=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,Et=new WeakMap,Y=new WeakMap,H=new WeakMap,tt=new WeakMap,ft=new WeakMap,Pt=new WeakMap,W=new WeakMap,o=new WeakSet,Tt=function(){d(this,o,gt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Re(e,i,this))}),t(this,p).style.transform="",Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,rt).call(this)},gt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},$t=function(){t(this,tt)||(h(this,tt,!0),t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Pt)),t(this,W).unlistenAnimationFrame(),t(this,T).disconnect(),t(this,X).disconnect(),t(this,_).disconnect(),t(this,E).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Nt=function(){t(this,tt)&&(h(this,tt,!1),t(this,a).subscribe(t(this,wt)),t(this,T).connect(),t(this,X).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Xt=function(){t(this,ft)||(h(this,ft,!0),jt.windowResizer.unsubscribe(t(this,L)),Gt.elementResizer.unsubscribe(t(this,L)),d(this,o,$t).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,gt).call(this):(t(this,b).reset(),t(this,a).reset()),nt.scrollEntries.unregister(this))},Yt=function(){t(this,ft)&&(h(this,ft,!1),nt.scrollEntries.register(this),(t(this,C).current||t(this,O).current||t(this,C).current||t(this,V).current||t(this,D).current)&&d(this,o,Tt).call(this),d(this,o,Nt).call(this),jt.windowResizer.subscribe(t(this,L),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,wt=new WeakMap,de=function(e){t(this,C).current?(t(this,b).current=e%t(this,l).length,t(this,b).current=t(this,b).current<0?t(this,l).length+t(this,b).current:t(this,b).current):t(this,b).current=ue.clamp(e,0,this.limit)},xt=new WeakMap,Ot=new WeakMap,te=function(e=1){t(this,G).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,dt).current,this.sectionalCSSProperty.current)},ee=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,g)+t(this,v)+t(this,z));return i<0?t(this,g)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},rt=function(){if(t(this,R).current&&t(this,l).length){const e=t(this,b).current+t(this,K).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,l).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,bt=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+bt/2||c<=m+i?r.mark("next"):r.mark("previous")})}},se=function(){let e=null,i=1/0;for(let r=0;r<t(this,l).length;r++){const c=Math.abs(t(this,l)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Rt);var Vt;class ie extends HTMLElement{constructor(){super(...arguments);s(this,Vt,null)}get scrollElement(){return t(this,Vt)}connectedCallback(){const e=ae.findParentElement(this,Rt);e instanceof Rt?h(this,Vt,e):console.error(this,"e-scroll not found")}}Vt=new WeakMap;var et,P,F,U,zt,Lt,mt,Bt,_t,Ht;class pe extends ie{constructor(){super();s(this,et,null);s(this,P,null);s(this,F,!1);s(this,U,0);s(this,zt,0);s(this,Lt,0);s(this,mt,()=>{h(this,F,this.offsetWidth>this.offsetHeight);const e=t(this,F)?this.offsetWidth:this.offsetHeight;h(this,U,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,U,Math.max(t(this,U),30)),t(this,F)?(t(this,P).style.width=t(this,U)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,U)+"px"),h(this,zt,e-t(this,U)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Bt,()=>{h(this,Lt,this.scrollElement.currentProgress*t(this,zt)),t(this,F)?t(this,P).style.transform=`translate3d(${t(this,Lt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,Lt)}px, 0px)`});s(this,_t,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ht,e=>{document.documentElement.classList.add("grabbing"),ke.setupDrag(c=>{const m=t(this,F)?c.x:c.y,w=this.scrollElement.distance/t(this,zt),bt=(m-r)*w;this.scrollElement.setPosition(i+bt)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,F)?e.x:e.y});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(ce.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,et,document.createElement("slot")),t(this,et).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,et))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,et).assignedElements()[0]||t(this,et).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,Ht)),jt.windowResizer.subscribe(t(this,mt),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,mt)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,_t))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,Ht)),jt.windowResizer.unsubscribe(t(this,mt)),Gt.elementResizer.unsubscribe(t(this,mt)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,_t))}}et=new WeakMap,P=new WeakMap,F=new WeakMap,U=new WeakMap,zt=new WeakMap,Lt=new WeakMap,mt=new WeakMap,Bt=new WeakMap,_t=new WeakMap,Ht=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",pe);class Se extends ie{constructor(){super(),Kt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class fe extends Se{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",fe);class me extends Se{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",me);var $,st,kt,Wt,Ft,Dt;class Ae{constructor(n,e,i){s(this,$,null);s(this,st,null);s(this,kt,null);s(this,Wt,null);s(this,Ft,()=>{t(this,st).scrollToSection(t(this,kt),{behaviour:t(this,Wt)})});s(this,Dt,()=>{t(this,$).classList.toggle("current",t(this,st).counter.current===t(this,kt))});Kt.isBrowser&&(h(this,$,document.createElement("button")),h(this,st,n),h(this,Wt,i),h(this,kt,e),t(this,$).addEventListener("click",t(this,Ft)),t(this,st).counter.subscribe(t(this,Dt)),t(this,Dt).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,Ft)),t(this,st).counter.unsubscribe(t(this,Dt)),t(this,$).remove()}}$=new WeakMap,st=new WeakMap,kt=new WeakMap,Wt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap;var it,qt;class be extends ie{constructor(){super(...arguments);s(this,it,[]);s(this,qt,De.debounce(()=>{t(this,it).forEach(e=>e.destroy()),h(this,it,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ae(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,it).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,qt)),t(this,qt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,qt)),t(this,it).forEach(e=>e.destroy()),h(this,it,[])}}it=new WeakMap,qt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",be);class ge extends qe.ScrollSegmentElement{connectedCallback(){const n=ae.findParentElement(this,Rt);n instanceof Rt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",ge);exports.ScrollBulletButtonsElement=be;exports.ScrollElement=Rt;exports.ScrollSegmentElement=ge;exports.ScrollSetButtonElement=fe;exports.ScrollStepButtonElement=me;exports.ScrollbarElement=pe;
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var me = Object.defineProperty;
|
|
2
|
+
var ie = Object.getOwnPropertySymbols;
|
|
3
|
+
var be = Object.prototype.hasOwnProperty, ge = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ne = (a) => {
|
|
5
5
|
throw TypeError(a);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var re = (a, n, e) => n in a ? me(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, he = (a, n) => {
|
|
8
8
|
for (var e in n || (n = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
ge.call(n, e) &&
|
|
9
|
+
be.call(n, e) && re(a, e, n[e]);
|
|
10
|
+
if (ie)
|
|
11
|
+
for (var e of ie(n))
|
|
12
|
+
ge.call(n, e) && re(a, e, n[e]);
|
|
13
13
|
return a;
|
|
14
14
|
};
|
|
15
|
-
var _t = (a, n, e) => n.has(a) ||
|
|
16
|
-
var t = (a, n, e) => (_t(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ?
|
|
17
|
-
import { S as
|
|
15
|
+
var _t = (a, n, e) => n.has(a) || ne("Cannot " + e);
|
|
16
|
+
var t = (a, n, e) => (_t(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ? ne("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, e), h = (a, n, e, i) => (_t(a, n, "write to private field"), i ? i.call(a, e) : n.set(a, e), e), d = (a, n, e) => (_t(a, n, "access private method"), e);
|
|
17
|
+
import { S as Se } from "../../Store-OTdcl6SX.js";
|
|
18
18
|
import { i as Kt } from "../../browser-0zX67oeU.js";
|
|
19
|
-
import { p as
|
|
19
|
+
import { p as ve } from "../../easings-BKi40vHz.js";
|
|
20
20
|
import { d as Zt } from "../../events-CsVF98U6.js";
|
|
21
|
-
import { c as
|
|
21
|
+
import { c as le } from "../../jss-CjccJC-K.js";
|
|
22
22
|
import { a as jt, g as Jt } from "../../layout-HoBT_Da2.js";
|
|
23
|
-
import { c as
|
|
23
|
+
import { c as ce } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
|
-
import { TICK_ORDER as
|
|
26
|
-
import { D as
|
|
27
|
-
import { T as
|
|
28
|
-
import { WheelControls as
|
|
25
|
+
import { TICK_ORDER as ye, RESIZE_ORDER as ae } from "../../order/index.js";
|
|
26
|
+
import { D as Ce } from "../../Damped-Chu29wn-.js";
|
|
27
|
+
import { T as Ee } from "../../Tweened-BUuSLSF7.js";
|
|
28
|
+
import { WheelControls as we, KeyboardControls as xe, DragControls as Pe, AutoplayControls as Le } from "../../controls/index.js";
|
|
29
29
|
import { windowResizer as Ut } from "../../window-resizer/vanilla/index.js";
|
|
30
|
-
import { scrollEntries as
|
|
31
|
-
import { cssUnitParser as
|
|
32
|
-
import { CSSProperty as
|
|
33
|
-
import { device as
|
|
30
|
+
import { scrollEntries as nt } from "../../scroll-entries/index.js";
|
|
31
|
+
import { cssUnitParser as oe } from "../../css-unit-parser/index.js";
|
|
32
|
+
import { CSSProperty as f } from "../../css-property/index.js";
|
|
33
|
+
import { device as ze } from "../../device/index.js";
|
|
34
34
|
import { elementResizer as Gt } from "../../element-resizer/vanilla/index.js";
|
|
35
|
-
import { s as
|
|
36
|
-
import { f as
|
|
37
|
-
import { d as
|
|
38
|
-
import { ScrollSegmentElement as
|
|
39
|
-
var m, Mt, v,
|
|
40
|
-
class
|
|
35
|
+
import { s as ke } from "../../gestures-D2Fdra_G.js";
|
|
36
|
+
import { f as ue } from "../../dom-0S_WDL4g.js";
|
|
37
|
+
import { d as De } from "../../function-C10DGppn.js";
|
|
38
|
+
import { ScrollSegmentElement as Ae } from "../../scroll-segment/index.js";
|
|
39
|
+
var m, Mt, v, ht, T, G;
|
|
40
|
+
class Ie {
|
|
41
41
|
constructor(n, e, i) {
|
|
42
42
|
s(this, m);
|
|
43
43
|
s(this, Mt);
|
|
44
44
|
s(this, v);
|
|
45
|
-
s(this,
|
|
45
|
+
s(this, ht, 0);
|
|
46
46
|
s(this, T, 0);
|
|
47
47
|
s(this, G, null);
|
|
48
|
-
h(this, m, n), h(this, Mt, e), h(this, v, i),
|
|
48
|
+
h(this, m, n), h(this, Mt, e), h(this, v, i), nt.register(t(this, m));
|
|
49
49
|
}
|
|
50
50
|
get index() {
|
|
51
51
|
return t(this, Mt);
|
|
52
52
|
}
|
|
53
53
|
get size() {
|
|
54
|
-
return t(this,
|
|
54
|
+
return t(this, ht);
|
|
55
55
|
}
|
|
56
56
|
get position() {
|
|
57
57
|
return t(this, T);
|
|
58
58
|
}
|
|
59
59
|
destroy() {
|
|
60
|
-
|
|
60
|
+
nt.unregister(t(this, m)), this.unsetTransform();
|
|
61
61
|
}
|
|
62
62
|
unsetTransform() {
|
|
63
63
|
t(this, m).style.transform = "", this.mark(null);
|
|
@@ -66,17 +66,17 @@ class Me {
|
|
|
66
66
|
n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, v).axisCSSProperty.current === "x" ? (t(this, m).style.width = n + "px", t(this, m).style.height = "") : (t(this, m).style.height = n + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
|
|
67
67
|
}
|
|
68
68
|
resize() {
|
|
69
|
-
h(this,
|
|
69
|
+
h(this, ht, t(this, v).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, T, t(this, v).vertical ? jt(t(this, m)) : Jt(t(this, m))), h(this, T, t(this, T) - t(this, v).contentPosition);
|
|
70
70
|
}
|
|
71
71
|
transform() {
|
|
72
72
|
let n = 0;
|
|
73
73
|
const e = t(this, v).viewportSize * t(this, v).sectionDistanceScaleCSSProperty.current;
|
|
74
|
-
t(this, v).loopCSSProperty.current && t(this, v).overscroll && t(this, T) + t(this,
|
|
74
|
+
t(this, v).loopCSSProperty.current && t(this, v).overscroll && t(this, T) + t(this, ht) < t(this, v).currentScrollValue && (n = t(this, v).distance * -1 - t(this, v).gap), nt.update(
|
|
75
75
|
t(this, m),
|
|
76
76
|
t(this, v).axisCSSProperty.current,
|
|
77
77
|
n
|
|
78
78
|
);
|
|
79
|
-
const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this,
|
|
79
|
+
const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, ht) + e, b = ce(i, r, c);
|
|
80
80
|
t(this, v).vertical ? t(this, m).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
|
|
81
81
|
}
|
|
82
82
|
mark(n) {
|
|
@@ -89,8 +89,8 @@ class Me {
|
|
|
89
89
|
}));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
m = new WeakMap(), Mt = new WeakMap(), v = new WeakMap(),
|
|
93
|
-
const
|
|
92
|
+
m = new WeakMap(), Mt = new WeakMap(), v = new WeakMap(), ht = new WeakMap(), T = new WeakMap(), G = new WeakMap();
|
|
93
|
+
const Me = le({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
96
96
|
width: "100%",
|
|
@@ -128,100 +128,99 @@ const Te = ce({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u,
|
|
131
|
+
var u, ot, P, V, O, R, D, H, K, A, C, lt, ct, at, ut, vt, k, dt, _, I, Z, B, j, pt, ft, J, Q, p, yt, l, Tt, Vt, y, S, L, M, X, W, E, g, Ct, Y, F, tt, mt, Et, $, o, At, St, Nt, qt, Qt, Xt, z, wt, de, xt, Ot, Yt, te, rt, ee;
|
|
132
132
|
class It extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this,
|
|
138
|
-
s(this, P, new
|
|
139
|
-
s(this, V, new
|
|
140
|
-
s(this,
|
|
137
|
+
s(this, ot, new f(this, "--controls", !0));
|
|
138
|
+
s(this, P, new f(this, "--axis", "y"));
|
|
139
|
+
s(this, V, new f(this, "--direction", 0));
|
|
140
|
+
s(this, O, new f(this, "--pages", 0, {
|
|
141
141
|
validate: (e) => Math.max(0, e - 1)
|
|
142
142
|
}));
|
|
143
|
-
s(this,
|
|
144
|
-
s(this, D, new
|
|
145
|
-
s(this, H, new
|
|
146
|
-
s(this, K, new
|
|
143
|
+
s(this, R, new f(this, "--split", !1));
|
|
144
|
+
s(this, D, new f(this, "--sectional", !1));
|
|
145
|
+
s(this, H, new f(this, "--auto-size", !1));
|
|
146
|
+
s(this, K, new f(
|
|
147
147
|
this,
|
|
148
148
|
"--wheel-max-delta",
|
|
149
149
|
!1
|
|
150
150
|
));
|
|
151
|
-
s(this, A, new
|
|
151
|
+
s(this, A, new f(
|
|
152
152
|
this,
|
|
153
153
|
"--sections-in-view",
|
|
154
154
|
1
|
|
155
155
|
));
|
|
156
|
-
s(this, C, new
|
|
157
|
-
s(this,
|
|
158
|
-
s(this,
|
|
159
|
-
s(this,
|
|
160
|
-
s(this,
|
|
161
|
-
s(this, vt, new
|
|
156
|
+
s(this, C, new f(this, "--loop", !1));
|
|
157
|
+
s(this, lt, new f(this, "--damping", 20));
|
|
158
|
+
s(this, ct, new f(this, "--mass", 0));
|
|
159
|
+
s(this, at, new f(this, "--stiffness", 0));
|
|
160
|
+
s(this, ut, new f(this, "--mouse-drag", !1));
|
|
161
|
+
s(this, vt, new f(
|
|
162
162
|
this,
|
|
163
163
|
"--section-distance-scale",
|
|
164
164
|
0.5
|
|
165
165
|
));
|
|
166
|
-
s(this, k, new
|
|
167
|
-
s(this,
|
|
166
|
+
s(this, k, new f(this, "--autoplay", 0));
|
|
167
|
+
s(this, dt, new f(
|
|
168
168
|
this,
|
|
169
169
|
"--autoplay-pause-duration",
|
|
170
170
|
0
|
|
171
171
|
));
|
|
172
|
-
s(this, _, new
|
|
172
|
+
s(this, _, new f(
|
|
173
173
|
this,
|
|
174
174
|
"--autoplay-user-direction",
|
|
175
175
|
!1
|
|
176
176
|
));
|
|
177
|
-
s(this, I, new
|
|
178
|
-
s(this, Z, new
|
|
177
|
+
s(this, I, new f(this, "--classes", !1));
|
|
178
|
+
s(this, Z, new f(
|
|
179
179
|
this,
|
|
180
180
|
"--current-index-start-offset",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this, B, new
|
|
183
|
+
s(this, B, new f(
|
|
184
184
|
this,
|
|
185
185
|
"--current-index-end-offset",
|
|
186
186
|
0
|
|
187
187
|
));
|
|
188
|
-
s(this, j, new
|
|
189
|
-
s(this,
|
|
188
|
+
s(this, j, new f(this, "--focus-delay", 0));
|
|
189
|
+
s(this, pt, new f(
|
|
190
190
|
this,
|
|
191
191
|
"--focus-duration",
|
|
192
192
|
3e3
|
|
193
193
|
));
|
|
194
|
-
s(this, ft, new
|
|
195
|
-
s(this, J, new
|
|
194
|
+
s(this, ft, new f(this, "--disabled", !1));
|
|
195
|
+
s(this, J, new f(this, "--hibernated", !1));
|
|
196
196
|
s(this, Q, null);
|
|
197
|
-
s(this,
|
|
197
|
+
s(this, p, null);
|
|
198
198
|
s(this, yt, null);
|
|
199
199
|
s(this, l, []);
|
|
200
200
|
s(this, Tt, 0);
|
|
201
201
|
s(this, Vt, 0);
|
|
202
202
|
s(this, y, 0);
|
|
203
|
-
s(this,
|
|
203
|
+
s(this, S, 0);
|
|
204
204
|
s(this, L, 0);
|
|
205
205
|
s(this, M, null);
|
|
206
206
|
s(this, X, null);
|
|
207
207
|
s(this, W, null);
|
|
208
208
|
s(this, E, null);
|
|
209
|
-
s(this,
|
|
209
|
+
s(this, g, new Se(0));
|
|
210
210
|
s(this, Ct, 0);
|
|
211
211
|
s(this, Y, 0);
|
|
212
|
-
s(this, se, !1);
|
|
213
212
|
s(this, F, !1);
|
|
214
213
|
s(this, tt, !0);
|
|
215
|
-
s(this,
|
|
214
|
+
s(this, mt, !0);
|
|
216
215
|
s(this, Et);
|
|
217
|
-
s(this, $, new
|
|
216
|
+
s(this, $, new Ee());
|
|
218
217
|
s(this, z, () => {
|
|
219
218
|
t(this, u).unlistenAnimationFrame();
|
|
220
|
-
const e = this.currentScrollValue / t(this,
|
|
221
|
-
if (h(this, Tt, this.vertical ? jt(this) : Jt(this)), h(this, Vt, this.vertical ? jt(t(this,
|
|
222
|
-
getComputedStyle(t(this,
|
|
223
|
-
)) : h(this, L,
|
|
224
|
-
getComputedStyle(t(this,
|
|
219
|
+
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
|
|
220
|
+
if (h(this, Tt, this.vertical ? jt(this) : Jt(this)), h(this, Vt, this.vertical ? jt(t(this, p)) : Jt(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, oe.parse(
|
|
221
|
+
getComputedStyle(t(this, p)).rowGap
|
|
222
|
+
)) : h(this, L, oe.parse(
|
|
223
|
+
getComputedStyle(t(this, p)).columnGap
|
|
225
224
|
)), t(this, H).current && t(this, l).length) {
|
|
226
225
|
const r = t(this, A).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
|
|
227
226
|
t(this, l).forEach((b) => {
|
|
@@ -233,55 +232,55 @@ class It extends HTMLElement {
|
|
|
233
232
|
});
|
|
234
233
|
if (t(this, l).forEach((r) => {
|
|
235
234
|
r.resize();
|
|
236
|
-
}), t(this,
|
|
237
|
-
h(this,
|
|
238
|
-
const r = t(this,
|
|
239
|
-
this.vertical ? (t(this,
|
|
235
|
+
}), t(this, O).current) {
|
|
236
|
+
h(this, S, t(this, y) * t(this, O).current);
|
|
237
|
+
const r = t(this, S) + t(this, y);
|
|
238
|
+
this.vertical ? (t(this, p).style.width = r + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = r + "px", t(this, p).style.width = "100%");
|
|
240
239
|
} else
|
|
241
|
-
this.vertical ? (t(this,
|
|
240
|
+
this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, S, t(this, p).offsetHeight - t(this, y))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, S, t(this, p).offsetWidth - t(this, y)));
|
|
242
241
|
if (!t(this, C).current) {
|
|
243
242
|
const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
244
|
-
h(this,
|
|
243
|
+
h(this, S, t(this, S) + c), t(this, u).max = t(this, S);
|
|
245
244
|
}
|
|
246
245
|
if (t(this, C).current && t(this, l).length) {
|
|
247
|
-
const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, y), b = t(this,
|
|
246
|
+
const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, y), b = t(this, S) - c;
|
|
248
247
|
h(this, Y, r.position + r.size + b);
|
|
249
248
|
} else
|
|
250
|
-
h(this, Y, t(this,
|
|
249
|
+
h(this, Y, t(this, S));
|
|
251
250
|
if (t(this, D).current && t(this, l).length) {
|
|
252
251
|
const r = t(this, l)[i];
|
|
253
252
|
t(this, u).set(r.position, {
|
|
254
253
|
equalize: !0
|
|
255
254
|
});
|
|
256
255
|
} else
|
|
257
|
-
t(this, u).set(e * t(this,
|
|
256
|
+
t(this, u).set(e * t(this, S), {
|
|
258
257
|
equalize: !0
|
|
259
258
|
});
|
|
260
|
-
h(this, F, (this.vertical ? t(this,
|
|
259
|
+
h(this, F, (this.vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, F)), t(this, F) ? d(this, o, qt).call(this) : d(this, o, Nt).call(this), t(this, wt).call(this);
|
|
261
260
|
});
|
|
262
261
|
s(this, wt, () => {
|
|
263
262
|
if (!t(this, F))
|
|
264
263
|
return;
|
|
265
264
|
const e = this.currentScrollValue;
|
|
266
|
-
if (h(this, Ct, Math.max(0, e - t(this,
|
|
265
|
+
if (h(this, Ct, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
267
266
|
let i = 0;
|
|
268
267
|
for (let r = 0; r < t(this, l).length; r++) {
|
|
269
268
|
const c = t(this, l)[r];
|
|
270
269
|
c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i = r);
|
|
271
270
|
}
|
|
272
|
-
t(this,
|
|
271
|
+
t(this, g).current = i;
|
|
273
272
|
} else
|
|
274
|
-
this.vertical ? t(this,
|
|
275
|
-
|
|
273
|
+
this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
274
|
+
nt.update(
|
|
276
275
|
this,
|
|
277
276
|
t(this, P).current,
|
|
278
277
|
e
|
|
279
278
|
);
|
|
280
279
|
});
|
|
281
280
|
s(this, xt, (e, i) => {
|
|
282
|
-
t(this,
|
|
281
|
+
t(this, ot).current && (d(this, o, Yt).call(this, Math.sign(i) || 1), t(this, Ot).call(this, e, i));
|
|
283
282
|
});
|
|
284
|
-
s(this,
|
|
283
|
+
s(this, Ot, (e, i) => {
|
|
285
284
|
if (t(this, V).current) {
|
|
286
285
|
if (t(this, V).current < 0 && i > 0)
|
|
287
286
|
return;
|
|
@@ -292,11 +291,11 @@ class It extends HTMLElement {
|
|
|
292
291
|
const r = d(this, o, ee).call(this);
|
|
293
292
|
r && this.scrollToSection(r.index, {
|
|
294
293
|
tween: {
|
|
295
|
-
duration: t(this,
|
|
296
|
-
easing:
|
|
294
|
+
duration: t(this, pt).current,
|
|
295
|
+
easing: ve
|
|
297
296
|
}
|
|
298
297
|
});
|
|
299
|
-
}, t(this, j).current))), !(e === "drag" && !
|
|
298
|
+
}, t(this, j).current))), !(e === "drag" && !ze.isMobile && !t(this, ut).current))
|
|
300
299
|
if (t(this, D).current) {
|
|
301
300
|
const r = Math.sign(i);
|
|
302
301
|
t(this, l).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
|
|
@@ -305,16 +304,16 @@ class It extends HTMLElement {
|
|
|
305
304
|
});
|
|
306
305
|
if (Kt) {
|
|
307
306
|
const e = this.attachShadow({ mode: "open" });
|
|
308
|
-
e.adoptedStyleSheets.push(
|
|
307
|
+
e.adoptedStyleSheets.push(Me);
|
|
309
308
|
const i = document.createElement("div");
|
|
310
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Q, document.createElement("div")), t(this, Q).className = "content-wrapper", h(this,
|
|
309
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Q, document.createElement("div")), t(this, Q).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, yt, document.createElement("slot")), t(this, p).appendChild(t(this, yt)), t(this, Q).appendChild(t(this, p)), e.appendChild(t(this, Q));
|
|
311
310
|
}
|
|
312
311
|
}
|
|
313
312
|
get damped() {
|
|
314
313
|
return t(this, u);
|
|
315
314
|
}
|
|
316
315
|
get controlsCSSProperty() {
|
|
317
|
-
return t(this,
|
|
316
|
+
return t(this, ot);
|
|
318
317
|
}
|
|
319
318
|
get axisCSSProperty() {
|
|
320
319
|
return t(this, P);
|
|
@@ -323,10 +322,10 @@ class It extends HTMLElement {
|
|
|
323
322
|
return t(this, V);
|
|
324
323
|
}
|
|
325
324
|
get pagesCSSProperty() {
|
|
326
|
-
return t(this,
|
|
325
|
+
return t(this, O);
|
|
327
326
|
}
|
|
328
327
|
get splitCSSProperty() {
|
|
329
|
-
return t(this,
|
|
328
|
+
return t(this, R);
|
|
330
329
|
}
|
|
331
330
|
get sectionalCSSProperty() {
|
|
332
331
|
return t(this, D);
|
|
@@ -344,16 +343,16 @@ class It extends HTMLElement {
|
|
|
344
343
|
return t(this, C);
|
|
345
344
|
}
|
|
346
345
|
get dampingCSSProperty() {
|
|
347
|
-
return t(this,
|
|
346
|
+
return t(this, lt);
|
|
348
347
|
}
|
|
349
348
|
get massCSSProperty() {
|
|
350
|
-
return t(this,
|
|
349
|
+
return t(this, ct);
|
|
351
350
|
}
|
|
352
351
|
get stiffnessCSSProperty() {
|
|
353
|
-
return t(this,
|
|
352
|
+
return t(this, at);
|
|
354
353
|
}
|
|
355
354
|
get mouseDragCSSProperty() {
|
|
356
|
-
return t(this,
|
|
355
|
+
return t(this, ut);
|
|
357
356
|
}
|
|
358
357
|
get sectionDistanceScaleCSSProperty() {
|
|
359
358
|
return t(this, vt);
|
|
@@ -362,7 +361,7 @@ class It extends HTMLElement {
|
|
|
362
361
|
return t(this, k);
|
|
363
362
|
}
|
|
364
363
|
get autoplayPauseDurationCSSProperty() {
|
|
365
|
-
return t(this,
|
|
364
|
+
return t(this, dt);
|
|
366
365
|
}
|
|
367
366
|
get autoplayUserDirectionCSSProperty() {
|
|
368
367
|
return t(this, _);
|
|
@@ -380,7 +379,7 @@ class It extends HTMLElement {
|
|
|
380
379
|
return t(this, j);
|
|
381
380
|
}
|
|
382
381
|
get focusDurationCSSProperty() {
|
|
383
|
-
return t(this,
|
|
382
|
+
return t(this, pt);
|
|
384
383
|
}
|
|
385
384
|
get disabledCSSProperty() {
|
|
386
385
|
return t(this, ft);
|
|
@@ -398,7 +397,7 @@ class It extends HTMLElement {
|
|
|
398
397
|
return t(this, Q);
|
|
399
398
|
}
|
|
400
399
|
get contentElement() {
|
|
401
|
-
return t(this,
|
|
400
|
+
return t(this, p);
|
|
402
401
|
}
|
|
403
402
|
get sections() {
|
|
404
403
|
return t(this, l);
|
|
@@ -413,13 +412,13 @@ class It extends HTMLElement {
|
|
|
413
412
|
return t(this, y);
|
|
414
413
|
}
|
|
415
414
|
get scrollSize() {
|
|
416
|
-
return t(this,
|
|
415
|
+
return t(this, S);
|
|
417
416
|
}
|
|
418
417
|
get gap() {
|
|
419
418
|
return t(this, L);
|
|
420
419
|
}
|
|
421
420
|
get counter() {
|
|
422
|
-
return t(this,
|
|
421
|
+
return t(this, g);
|
|
423
422
|
}
|
|
424
423
|
get limit() {
|
|
425
424
|
return t(this, l).length - t(this, A).current;
|
|
@@ -472,20 +471,20 @@ class It extends HTMLElement {
|
|
|
472
471
|
scrollToSection(e, i) {
|
|
473
472
|
if (!t(this, l).length)
|
|
474
473
|
return;
|
|
475
|
-
const r = t(this,
|
|
476
|
-
d(this, o,
|
|
477
|
-
const c = t(this, l)[r], b = t(this, l)[t(this,
|
|
474
|
+
const r = t(this, g).current;
|
|
475
|
+
d(this, o, de).call(this, e);
|
|
476
|
+
const c = t(this, l)[r], b = t(this, l)[t(this, g).current];
|
|
478
477
|
if (c && b) {
|
|
479
478
|
let x = 0;
|
|
480
|
-
const
|
|
481
|
-
t(this, C).current ? t(this,
|
|
479
|
+
const gt = d(this, o, ee).call(this), fe = gt ? this.targetScrollValue - gt.position : 0;
|
|
480
|
+
t(this, C).current ? t(this, g).current === 0 && r === t(this, l).length - 1 ? x = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, l).length - 1 && r === 0 ? x = b.position - (t(this, S) + t(this, y) + t(this, L)) : x = b.position - c.position : x = b.position - c.position, this.shiftPosition(x - fe, i);
|
|
482
481
|
}
|
|
483
482
|
}
|
|
484
483
|
shiftSections(e, i) {
|
|
485
|
-
t(this, l).length && this.scrollToSection(t(this,
|
|
484
|
+
t(this, l).length && this.scrollToSection(t(this, g).current + e, i);
|
|
486
485
|
}
|
|
487
486
|
setPosition(e, i) {
|
|
488
|
-
d(this, o, Yt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this, $).set(t(this, u).current, { equalize: !0 }), t(this, $).set(e,
|
|
487
|
+
d(this, o, Yt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this, $).set(t(this, u).current, { equalize: !0 }), t(this, $).set(e, he({}, i.tween))) : t(this, u).set(e, {
|
|
489
488
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
490
489
|
});
|
|
491
490
|
}
|
|
@@ -493,23 +492,23 @@ class It extends HTMLElement {
|
|
|
493
492
|
this.setPosition(t(this, u).target + e, i);
|
|
494
493
|
}
|
|
495
494
|
connectedCallback() {
|
|
496
|
-
h(this, u, new
|
|
495
|
+
nt.register(this), h(this, u, new Ce(0, {
|
|
497
496
|
damping: 0.01,
|
|
498
497
|
min: 0,
|
|
499
|
-
order:
|
|
500
|
-
})), this.setAttribute("tabindex", "0"), h(this, M, new
|
|
498
|
+
order: ye.SCROLL
|
|
499
|
+
})), this.setAttribute("tabindex", "0"), h(this, M, new we({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, xt)), h(this, X, new xe({
|
|
501
500
|
element: this
|
|
502
501
|
})), t(this, X).changeEvent.subscribe(
|
|
503
502
|
t(this, xt)
|
|
504
|
-
), h(this, W, new
|
|
503
|
+
), h(this, W, new Pe({ element: t(this, p) })), t(this, W).changeEvent.subscribe(t(this, xt)), h(this, E, new Le({
|
|
505
504
|
culling: this
|
|
506
|
-
})), t(this, E).changeEvent.subscribe(t(this,
|
|
507
|
-
t(this,
|
|
505
|
+
})), t(this, E).changeEvent.subscribe(t(this, Ot)), t(this, P).subscribe(({ current: e }) => {
|
|
506
|
+
t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, K).current ? "max" : e, t(this, X).dimension = e === "x" ? "width" : "height", t(this, W).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
|
|
508
507
|
}), t(this, K).subscribe((e) => {
|
|
509
508
|
t(this, M).axis = e.current ? "max" : t(this, P).current;
|
|
510
|
-
}), t(this,
|
|
509
|
+
}), t(this, O).subscribe(() => {
|
|
511
510
|
this.isConnected && t(this, z).call(this);
|
|
512
|
-
}), t(this,
|
|
511
|
+
}), t(this, R).subscribe(({ current: e }) => {
|
|
513
512
|
this.isConnected && (e ? d(this, o, At).call(this) : d(this, o, St).call(this));
|
|
514
513
|
}), t(this, D).subscribe((e) => {
|
|
515
514
|
t(this, M).debounce = e.current, t(this, W).swipe = e.current, t(this, E).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, At).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, St).call(this));
|
|
@@ -518,12 +517,12 @@ class It extends HTMLElement {
|
|
|
518
517
|
}), t(this, A).subscribe((e) => {
|
|
519
518
|
this.isConnected && (t(this, z).call(this), d(this, o, rt).call(this));
|
|
520
519
|
}), t(this, C).subscribe((e) => {
|
|
521
|
-
e.current ? (this.isConnected && (t(this, l).length || (t(this,
|
|
522
|
-
}), t(this, ot).subscribe((e) => {
|
|
523
|
-
t(this, u).damping = e.current;
|
|
520
|
+
e.current ? (this.isConnected && (t(this, l).length || (t(this, R).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, Ct, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
524
521
|
}), t(this, lt).subscribe((e) => {
|
|
525
|
-
t(this, u).
|
|
522
|
+
t(this, u).damping = e.current;
|
|
526
523
|
}), t(this, ct).subscribe((e) => {
|
|
524
|
+
t(this, u).mass = e.current;
|
|
525
|
+
}), t(this, at).subscribe((e) => {
|
|
527
526
|
t(this, u).stiffness = e.current;
|
|
528
527
|
}), t(this, k).subscribe((e) => {
|
|
529
528
|
t(this, E).speed = e.current, !t(this, tt) && e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
|
|
@@ -537,7 +536,7 @@ class It extends HTMLElement {
|
|
|
537
536
|
this.isConnected && t(this, I).current && d(this, o, rt).call(this);
|
|
538
537
|
}), t(this, u).isRunning.subscribe((e) => {
|
|
539
538
|
this.classList.toggle("active", e.current);
|
|
540
|
-
}), t(this,
|
|
539
|
+
}), t(this, g).subscribe((e) => {
|
|
541
540
|
t(this, l).length && d(this, o, rt).call(this);
|
|
542
541
|
}), t(this, $).subscribe((e) => {
|
|
543
542
|
t(this, $).isRunning.current && t(this, u).set(e.current);
|
|
@@ -545,23 +544,23 @@ class It extends HTMLElement {
|
|
|
545
544
|
e.current && !e.previous ? d(this, o, Nt).call(this) : !e.current && e.previous && d(this, o, qt).call(this);
|
|
546
545
|
}), t(this, J).subscribe((e) => {
|
|
547
546
|
e.current && !e.previous ? d(this, o, Qt).call(this) : !e.current && e.previous && d(this, o, Xt).call(this);
|
|
548
|
-
}), t(this,
|
|
547
|
+
}), t(this, ot).observe(), t(this, P).observe(), t(this, V).observe(), t(this, O).observe(), t(this, R).observe(), t(this, D).observe(), t(this, H).observe(), t(this, K).observe(), t(this, A).observe(), t(this, C).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), t(this, vt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, dt).observe(), t(this, _).observe(), t(this, I).observe(), t(this, Z).observe(), t(this, B).observe(), t(this, j).observe(), t(this, pt).observe(), t(this, ft).observe(), t(this, J).observe(), t(this, J).current || d(this, o, Xt).call(this);
|
|
549
548
|
}
|
|
550
549
|
disconnectedCallback() {
|
|
551
|
-
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this,
|
|
550
|
+
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, ot).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, O).unobserve(), t(this, R).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, K).unobserve(), t(this, A).unobserve(), t(this, C).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), t(this, vt).unobserve(), t(this, k).unobserve(), t(this, dt).unobserve(), t(this, _).unobserve(), t(this, I).unobserve(), t(this, Z).unobserve(), t(this, B).unobserve(), t(this, j).unobserve(), t(this, pt).unobserve(), t(this, ft).unobserve(), t(this, J).unobserve(), d(this, o, Qt).call(this);
|
|
552
551
|
}
|
|
553
552
|
}
|
|
554
|
-
u = new WeakMap(),
|
|
553
|
+
u = new WeakMap(), ot = new WeakMap(), P = new WeakMap(), V = new WeakMap(), O = new WeakMap(), R = new WeakMap(), D = new WeakMap(), H = new WeakMap(), K = new WeakMap(), A = new WeakMap(), C = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), vt = new WeakMap(), k = new WeakMap(), dt = new WeakMap(), _ = new WeakMap(), I = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), j = new WeakMap(), pt = new WeakMap(), ft = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), p = new WeakMap(), yt = new WeakMap(), l = new WeakMap(), Tt = new WeakMap(), Vt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), X = new WeakMap(), W = new WeakMap(), E = new WeakMap(), g = new WeakMap(), Ct = new WeakMap(), Y = new WeakMap(), F = new WeakMap(), tt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), $ = new WeakMap(), o = new WeakSet(), At = function() {
|
|
555
554
|
d(this, o, St).call(this), t(this, yt).assignedElements().forEach((e, i) => {
|
|
556
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
557
|
-
}), t(this,
|
|
555
|
+
e instanceof HTMLElement && t(this, l).push(new Ie(e, i, this));
|
|
556
|
+
}), t(this, p).style.transform = "", Zt(this, "scrollSectionsChange", {
|
|
558
557
|
custom: !0,
|
|
559
558
|
composed: !0
|
|
560
559
|
}), t(this, z).call(this), d(this, o, rt).call(this);
|
|
561
560
|
}, St = function() {
|
|
562
561
|
t(this, l).forEach((e) => {
|
|
563
562
|
e.destroy();
|
|
564
|
-
}), h(this, l, []), t(this,
|
|
563
|
+
}), h(this, l, []), t(this, g).reset(), t(this, u).reset(), Zt(this, "scrollSectionsChange", {
|
|
565
564
|
custom: !0,
|
|
566
565
|
composed: !0
|
|
567
566
|
});
|
|
@@ -572,30 +571,30 @@ u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
|
|
|
572
571
|
}, qt = function() {
|
|
573
572
|
t(this, tt) && (h(this, tt, !1), t(this, u).subscribe(t(this, wt)), t(this, M).connect(), t(this, X).connect(), t(this, W).connect(), t(this, k).current && t(this, E).connect());
|
|
574
573
|
}, Qt = function() {
|
|
575
|
-
t(this,
|
|
574
|
+
t(this, mt) || (h(this, mt, !0), Ut.unsubscribe(t(this, z)), Gt.unsubscribe(t(this, z)), d(this, o, Nt).call(this), t(this, p).style.transform = "", t(this, l).length ? d(this, o, St).call(this) : (t(this, g).reset(), t(this, u).reset()), nt.unregister(this));
|
|
576
575
|
}, Xt = function() {
|
|
577
|
-
t(this,
|
|
578
|
-
}, z = new WeakMap(), wt = new WeakMap(),
|
|
579
|
-
t(this, C).current ? (t(this,
|
|
580
|
-
}, xt = new WeakMap(),
|
|
576
|
+
t(this, mt) && (h(this, mt, !1), nt.register(this), (t(this, C).current || t(this, R).current || t(this, C).current || t(this, H).current || t(this, D).current) && d(this, o, At).call(this), d(this, o, qt).call(this), Ut.subscribe(t(this, z), ae.SCROLL), Gt.subscribe(this, t(this, z)));
|
|
577
|
+
}, z = new WeakMap(), wt = new WeakMap(), de = function(e) {
|
|
578
|
+
t(this, C).current ? (t(this, g).current = e % t(this, l).length, t(this, g).current = t(this, g).current < 0 ? t(this, l).length + t(this, g).current : t(this, g).current) : t(this, g).current = ce(e, 0, this.limit);
|
|
579
|
+
}, xt = new WeakMap(), Ot = new WeakMap(), Yt = function(e = 1) {
|
|
581
580
|
t(this, _).current && (t(this, E).direction = e), t(this, k).current && t(this, E).pauseAndContinue(
|
|
582
|
-
t(this,
|
|
581
|
+
t(this, dt).current,
|
|
583
582
|
this.sectionalCSSProperty.current
|
|
584
583
|
);
|
|
585
584
|
}, te = function(e = "current") {
|
|
586
585
|
if (t(this, C).current && t(this, l).length) {
|
|
587
|
-
const i = t(this, u)[e] % (t(this,
|
|
588
|
-
return i < 0 ? t(this,
|
|
586
|
+
const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, L));
|
|
587
|
+
return i < 0 ? t(this, S) + i + t(this, y) + t(this, L) : i;
|
|
589
588
|
} else
|
|
590
589
|
return t(this, u)[e];
|
|
591
590
|
}, rt = function() {
|
|
592
591
|
if (t(this, I).current && t(this, l).length) {
|
|
593
|
-
const e = t(this,
|
|
592
|
+
const e = t(this, g).current + t(this, Z).current;
|
|
594
593
|
e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
|
|
595
594
|
const i = t(this, A).current + t(this, B).current;
|
|
596
595
|
t(this, l).forEach((r, c) => {
|
|
597
|
-
const b = e - this.limit - 1 + t(this, B).current, x = e + i,
|
|
598
|
-
c >= e && c < x || c <= b ? r.mark("current") : c >= x && c < x +
|
|
596
|
+
const b = e - this.limit - 1 + t(this, B).current, x = e + i, gt = this.sections.length - x;
|
|
597
|
+
c >= e && c < x || c <= b ? r.mark("current") : c >= x && c < x + gt / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
|
|
599
598
|
});
|
|
600
599
|
}
|
|
601
600
|
}, ee = function() {
|
|
@@ -607,23 +606,23 @@ u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
|
|
|
607
606
|
return e !== null ? t(this, l)[e] : null;
|
|
608
607
|
};
|
|
609
608
|
customElements.get("e-scroll") || customElements.define("e-scroll", It);
|
|
610
|
-
var
|
|
611
|
-
class
|
|
609
|
+
var Rt;
|
|
610
|
+
class se extends HTMLElement {
|
|
612
611
|
constructor() {
|
|
613
612
|
super(...arguments);
|
|
614
|
-
s(this,
|
|
613
|
+
s(this, Rt, null);
|
|
615
614
|
}
|
|
616
615
|
get scrollElement() {
|
|
617
|
-
return t(this,
|
|
616
|
+
return t(this, Rt);
|
|
618
617
|
}
|
|
619
618
|
connectedCallback() {
|
|
620
|
-
const e =
|
|
621
|
-
e instanceof It ? h(this,
|
|
619
|
+
const e = ue(this, It);
|
|
620
|
+
e instanceof It ? h(this, Rt, e) : console.error(this, "e-scroll not found");
|
|
622
621
|
}
|
|
623
622
|
}
|
|
624
|
-
|
|
625
|
-
var et, w, N, q, Pt, Lt,
|
|
626
|
-
class
|
|
623
|
+
Rt = new WeakMap();
|
|
624
|
+
var et, w, N, q, Pt, Lt, bt, Ht, Bt, Wt;
|
|
625
|
+
class Te extends se {
|
|
627
626
|
constructor() {
|
|
628
627
|
super();
|
|
629
628
|
s(this, et, null);
|
|
@@ -632,7 +631,7 @@ class Ve extends ie {
|
|
|
632
631
|
s(this, q, 0);
|
|
633
632
|
s(this, Pt, 0);
|
|
634
633
|
s(this, Lt, 0);
|
|
635
|
-
s(this,
|
|
634
|
+
s(this, bt, () => {
|
|
636
635
|
h(this, N, this.offsetWidth > this.offsetHeight);
|
|
637
636
|
const e = t(this, N) ? this.offsetWidth : this.offsetHeight;
|
|
638
637
|
h(this, q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, q, Math.max(t(this, q), 30)), t(this, N) ? (t(this, w).style.width = t(this, q) + "px", t(this, w).style.height = "100%") : (t(this, w).style.width = "100%", t(this, w).style.height = t(this, q) + "px"), h(this, Pt, e - t(this, q)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
@@ -644,10 +643,10 @@ class Ve extends ie {
|
|
|
644
643
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
645
644
|
});
|
|
646
645
|
s(this, Wt, (e) => {
|
|
647
|
-
document.documentElement.classList.add("grabbing"),
|
|
646
|
+
document.documentElement.classList.add("grabbing"), ke(
|
|
648
647
|
(c) => {
|
|
649
|
-
const b = t(this, N) ? c.x : c.y, x = this.scrollElement.distance / t(this, Pt),
|
|
650
|
-
this.scrollElement.setPosition(i +
|
|
648
|
+
const b = t(this, N) ? c.x : c.y, x = this.scrollElement.distance / t(this, Pt), gt = (b - r) * x;
|
|
649
|
+
this.scrollElement.setPosition(i + gt);
|
|
651
650
|
},
|
|
652
651
|
() => {
|
|
653
652
|
document.documentElement.classList.remove("grabbing");
|
|
@@ -658,7 +657,7 @@ class Ve extends ie {
|
|
|
658
657
|
if (Kt) {
|
|
659
658
|
const e = this.attachShadow({ mode: "open" });
|
|
660
659
|
e.adoptedStyleSheets.push(
|
|
661
|
-
|
|
660
|
+
le({
|
|
662
661
|
":host": {
|
|
663
662
|
display: "inline-block",
|
|
664
663
|
zIndex: "1",
|
|
@@ -696,28 +695,28 @@ class Ve extends ie {
|
|
|
696
695
|
connectedCallback() {
|
|
697
696
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
698
697
|
const e = t(this, et).assignedElements()[0] || t(this, et).firstElementChild;
|
|
699
|
-
h(this, w, e), t(this, w).addEventListener("pointerdown", t(this, Wt)), Ut.subscribe(t(this,
|
|
698
|
+
h(this, w, e), t(this, w).addEventListener("pointerdown", t(this, Wt)), Ut.subscribe(t(this, bt), ae.SCROLL), Gt.subscribe(this, t(this, bt)), this.scrollElement.onScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.subscribe(t(this, Bt));
|
|
700
699
|
}
|
|
701
700
|
disconnectedCallback() {
|
|
702
|
-
this.removeAttribute("drag-dead-zone"), t(this, w).removeEventListener("pointerdown", t(this, Wt)), Ut.unsubscribe(t(this,
|
|
701
|
+
this.removeAttribute("drag-dead-zone"), t(this, w).removeEventListener("pointerdown", t(this, Wt)), Ut.unsubscribe(t(this, bt)), Gt.unsubscribe(t(this, bt)), this.scrollElement.offScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Bt));
|
|
703
702
|
}
|
|
704
703
|
}
|
|
705
|
-
et = new WeakMap(), w = new WeakMap(), N = new WeakMap(), q = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(),
|
|
706
|
-
customElements.get("e-scrollbar") || customElements.define("e-scrollbar",
|
|
707
|
-
class pe extends
|
|
704
|
+
et = new WeakMap(), w = new WeakMap(), N = new WeakMap(), q = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), Wt = new WeakMap();
|
|
705
|
+
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Te);
|
|
706
|
+
class pe extends se {
|
|
708
707
|
constructor() {
|
|
709
708
|
super(), Kt && this.addEventListener("click", () => {
|
|
710
709
|
this.handleClick();
|
|
711
710
|
});
|
|
712
711
|
}
|
|
713
712
|
}
|
|
714
|
-
class
|
|
713
|
+
class Ve extends pe {
|
|
715
714
|
handleClick() {
|
|
716
715
|
const n = this.getAttribute("index"), e = this.getAttribute("behaviour");
|
|
717
716
|
this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: e });
|
|
718
717
|
}
|
|
719
718
|
}
|
|
720
|
-
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button",
|
|
719
|
+
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Ve);
|
|
721
720
|
class Oe extends pe {
|
|
722
721
|
handleClick() {
|
|
723
722
|
const n = this.getAttribute("step"), e = this.getAttribute("behaviour");
|
|
@@ -726,7 +725,7 @@ class Oe extends pe {
|
|
|
726
725
|
}
|
|
727
726
|
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Oe);
|
|
728
727
|
var U, st, zt, Ft, $t, kt;
|
|
729
|
-
class
|
|
728
|
+
class Re {
|
|
730
729
|
constructor(n, e, i) {
|
|
731
730
|
s(this, U, null);
|
|
732
731
|
s(this, st, null);
|
|
@@ -754,14 +753,14 @@ class He {
|
|
|
754
753
|
}
|
|
755
754
|
U = new WeakMap(), st = new WeakMap(), zt = new WeakMap(), Ft = new WeakMap(), $t = new WeakMap(), kt = new WeakMap();
|
|
756
755
|
var it, Dt;
|
|
757
|
-
class
|
|
756
|
+
class He extends se {
|
|
758
757
|
constructor() {
|
|
759
758
|
super(...arguments);
|
|
760
759
|
s(this, it, []);
|
|
761
|
-
s(this, Dt,
|
|
760
|
+
s(this, Dt, De(() => {
|
|
762
761
|
t(this, it).forEach((e) => e.destroy()), h(this, it, []);
|
|
763
762
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
764
|
-
const i = new
|
|
763
|
+
const i = new Re(
|
|
765
764
|
this.scrollElement,
|
|
766
765
|
e,
|
|
767
766
|
this.getAttribute("behaviour") || "smooth"
|
|
@@ -784,22 +783,22 @@ class Be extends ie {
|
|
|
784
783
|
}
|
|
785
784
|
}
|
|
786
785
|
it = new WeakMap(), Dt = new WeakMap();
|
|
787
|
-
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons",
|
|
788
|
-
class
|
|
786
|
+
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", He);
|
|
787
|
+
class Be extends Ae {
|
|
789
788
|
connectedCallback() {
|
|
790
|
-
const n =
|
|
789
|
+
const n = ue(this, It);
|
|
791
790
|
n instanceof It ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
792
791
|
"scrollSectionsChange",
|
|
793
792
|
this.findAnotherScrollEntries
|
|
794
793
|
)) : console.error(this, "e-scroll not found");
|
|
795
794
|
}
|
|
796
795
|
}
|
|
797
|
-
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment",
|
|
796
|
+
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Be);
|
|
798
797
|
export {
|
|
799
|
-
|
|
798
|
+
He as ScrollBulletButtonsElement,
|
|
800
799
|
It as ScrollElement,
|
|
801
|
-
|
|
802
|
-
|
|
800
|
+
Be as ScrollSegmentElement,
|
|
801
|
+
Ve as ScrollSetButtonElement,
|
|
803
802
|
Oe as ScrollStepButtonElement,
|
|
804
|
-
|
|
803
|
+
Te as ScrollbarElement
|
|
805
804
|
};
|