aptechka 0.33.6 → 0.33.8
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/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +106 -105
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +61 -61
- package/package.json +1 -1
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),a=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),C=require("../element-resizer/vanilla/index.cjs"),w=require("../ticker/vanilla/index.cjs"),z=require("../browser-CpzFX2xg.cjs"),_=require("../jss-GJLvaNfT.cjs"),B=require("../math-GDWEqu7y.cjs");var c,r,m,l,u,p,b,g,h,E,k,x,v,S,P;class y extends HTMLElement{constructor(){super();n(this,h);n(this,c,new q.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,g,1);n(this,x,e=>{a(this,p,B.clamp(devicePixelRatio,1,2)),a(this,l,e.contentRect.width),a(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,P).call(this),o(this,h,S).call(this)});n(this,v,e=>{a(this,b,e.timestamp),a(this,g,e.timeBetweenFrames),o(this,h,S).call(this)});if(z.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets
|
|
1
|
+
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),a=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),C=require("../element-resizer/vanilla/index.cjs"),w=require("../ticker/vanilla/index.cjs"),z=require("../browser-CpzFX2xg.cjs"),_=require("../jss-GJLvaNfT.cjs"),B=require("../math-GDWEqu7y.cjs");var c,r,m,l,u,p,b,g,h,E,k,x,v,S,P;class y extends HTMLElement{constructor(){super();n(this,h);n(this,c,new q.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,g,1);n(this,x,e=>{a(this,p,B.clamp(devicePixelRatio,1,2)),a(this,l,e.contentRect.width),a(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,P).call(this),o(this,h,S).call(this)});n(this,v,e=>{a(this,b,e.timestamp),a(this,g,e.timeBetweenFrames),o(this,h,S).call(this)});if(z.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[_.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],a(this,r,document.createElement("canvas")),a(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,c).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,c)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,g)}}connectedCallback(){t(this,c).observe(),C.elementResizer.subscribe(this,t(this,x)),o(this,h,E).call(this)}disconnectedCallback(){t(this,c).unobserve(),C.elementResizer.unsubscribe(t(this,x)),o(this,h,k).call(this)}}c=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,g=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,c).current})},k=function(){w.ticker.unsubscribe(t(this,v))},x=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},P=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};customElements.get("e-canvas")||customElements.define("e-canvas",y);exports.CanvasElement=y;
|
package/lib/canvas/index.js
CHANGED
|
@@ -30,7 +30,7 @@ class L extends HTMLElement {
|
|
|
30
30
|
});
|
|
31
31
|
if (z) {
|
|
32
32
|
const e = this.attachShadow({ mode: "open" });
|
|
33
|
-
e.adoptedStyleSheets
|
|
33
|
+
e.adoptedStyleSheets = [
|
|
34
34
|
B({
|
|
35
35
|
" :host, canvas": {
|
|
36
36
|
display: "block",
|
|
@@ -38,7 +38,7 @@ class L extends HTMLElement {
|
|
|
38
38
|
height: "100%"
|
|
39
39
|
}
|
|
40
40
|
})
|
|
41
|
-
|
|
41
|
+
], a(this, r, document.createElement("canvas")), a(this, d, t(this, r).getContext("2d")), e.appendChild(t(this, r)), t(this, o).subscribe((p) => {
|
|
42
42
|
typeof p.previous != "undefined" && p.current !== p.previous && c(this, n, R).call(this);
|
|
43
43
|
});
|
|
44
44
|
}
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var W=n=>{throw TypeError(n)};var B=(n,h,t)=>h.has(n)||W("Cannot "+t);var e=(n,h,t)=>(B(n,h,"read from private field"),t?t.call(n):h.get(n)),s=(n,h,t)=>h.has(n)?W("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(n):h.set(n,t),i=(n,h,t,c)=>(B(n,h,"write to private field"),c?c.call(n,t):h.set(n,t),t),_=(n,h,t)=>(B(n,h,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../css-property/index.cjs"),K=require("../Store-CDb6RMce.cjs"),$=require("../events-KVanG9sR.cjs"),Q=require("../function-MthRj-GJ.cjs"),V=require("../style-At6aDoqG.cjs"),F=require("../window-resizer/vanilla/index.cjs"),X=require("../browser-CpzFX2xg.cjs");var A,l,x,b,d,v,p,g,m,f,L,u,G,E,N,w,j,T,C,q,P;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,A);s(this,l);s(this,x);s(this,b);s(this,d);s(this,v);s(this,p);s(this,g);s(this,m);s(this,f);s(this,L);s(this,E);s(this,w);s(this,T);s(this,C);s(this,q);s(this,P);i(this,A,-1),i(this,l,new K.Store(!1)),i(this,d,new k.CSSProperty(this,"--history",!1)),i(this,v,new k.CSSProperty(this,"--restore",!1)),i(this,p,new k.CSSProperty(this,"--dominance",0)),i(this,g,new k.CSSProperty(this,"--click-outside",!1)),i(this,m,new k.CSSProperty(this,"--escape",!1)),i(this,f,!1),this.open=t=>{if(e(this,l).current)return;i(this,L,t==null?void 0:t.trigger),e(this,l).current=!0,e(this,p).current&&(a.__opened=a.__opened.filter(o=>o!==this&&this.dominance.current>=o.dominance.current?(o.close(),!1):!0)),a.__opened.push(this),i(this,A,a.__opened.length-1),e(this,d).current&&e(this,f)&&history.pushState("","",e(this,u,G)),clearTimeout(e(this,x)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",$.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,L)}});const c=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,w)),e(this,P).call(this),this.style.opacity="1",this.classList.add("opened"),$.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,L)}}),i(this,b,void 0)};t!=null&&t.skipTransition?c():i(this,b,setTimeout(c,10))},this.close=()=>{e(this,l).current&&(removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,w)),e(this,l).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:e(t,p).current<this.dominance.current&&!e(t,b)?(t.close(),!1):!0),_(this,u,N).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",$.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",$.dispatchEvent(this,"popoverClosed",{custom:!0})},V.getElementTransitionDurationMS(this)+10))},i(this,E,t=>{e(this,g).current&&_(this,u,j).call(this,()=>{var D;const c=t.composedPath();if(c.find(U=>U instanceof HTMLElement&&U.hasAttribute("data-popover-content")))return;const o=c[0],z=o instanceof HTMLElement&&(this.contains(o)||((D=this.shadowRoot)==null?void 0:D.contains(o))),S=o instanceof HTMLElement&&o.hasAttribute("data-outside");(!z||S)&&this.close()})}),i(this,w,t=>{e(this,m).current&&_(this,u,j).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,T,()=>{i(this,f,!1),e(this,l).current&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,d).current&&location.search.includes(this.id)&&this.open(),i(this,f,!0)}),i(this,C,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,q).call(this)}),i(this,q,Q.debounce(()=>{e(this,P).call(this)},10)),i(this,P,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,d)}get restore(){return e(this,v)}get dominance(){return e(this,p)}get clickOutside(){return e(this,g)}get escape(){return e(this,m)}get opened(){return e(this,l)}get lastTrigger(){return e(this,L)}connectedCallback(){e(this,d).observe(),e(this,v).observe(),e(this,p).observe(),e(this,g).observe(),e(this,m).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,T)),setTimeout(()=>{e(this,v).current?e(this,T).call(this):(_(this,u,N).call(this),i(this,f,!0))},0),F.windowResizer.subscribe(e(this,C))}disconnectedCallback(){F.windowResizer.unsubscribe(e(this,C)),e(this,d).unobserve(),e(this,v).unobserve(),e(this,p).unobserve(),e(this,g).unobserve(),e(this,m).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,x)),clearTimeout(e(this,b)),removeEventListener("popstate",e(this,T)),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,w)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};A=new WeakMap,l=new WeakMap,x=new WeakMap,b=new WeakMap,d=new WeakMap,v=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,f=new WeakMap,L=new WeakMap,u=new WeakSet,G=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,N=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},w=new WeakMap,j=function(t){(a.__opened[e(this,A)-1]||a.__opened.length===1||a.__opened.filter(c=>c!==this).every(c=>e(this,p).current>c.dominance.current))&&t()},T=new WeakMap,C=new WeakMap,q=new WeakMap,P=new WeakMap,a.__opened=[];let I=a;customElements.get("e-popover")||customElements.define("e-popover",I);var r,y,M,O,R,H;class J extends HTMLElement{constructor(){super();s(this,r);s(this,y,new k.CSSProperty(this,"--type","open"));s(this,M,()=>{this.classList.add("triggered")});s(this,O,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,R,()=>{this.classList.remove("opened")});s(this,H,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});X.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,y).current;t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,y)}get popoverElement(){return e(this,r)}connectedCallback(){var c;e(this,y).subscribe(o=>{e(this,r)&&(o.current!=="close"?(this.setAttribute("aria-has-popup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let o=null;if(t==="parent"){const z=this.closest("[popover-target]");if(z)o=z;else{const S=this.getRootNode();S instanceof ShadowRoot?o=S.host.closest("[popover-target]"):S instanceof HTMLElement&&(o=S.closest("[popover-target]"))}}else t==="sibling"?o=(c=this.parentElement)==null?void 0:c.querySelector("[popover-target]"):o=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);o instanceof HTMLElement?(i(this,r,o),e(this,r).addEventListener("popoverTriggered",e(this,M)),e(this,r).addEventListener("popoverOpened",e(this,O)),e(this,r).addEventListener("popoverClosing",e(this,R)),e(this,r).addEventListener("popoverClosed",e(this,H))):console.warn(this,`target ${t} not found`)}e(this,y).observe()}disconnectedCallback(){e(this,y).unobserve(),this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,M)),e(this,r).removeEventListener("popoverOpened",e(this,O)),e(this,r).removeEventListener("popoverClosing",e(this,R)),e(this,r).removeEventListener("popoverClosed",e(this,H)))}}r=new WeakMap,y=new WeakMap,M=new WeakMap,O=new WeakMap,R=new WeakMap,H=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",J);exports.PopoverButtonElement=J;exports.PopoverElement=I;
|
package/lib/popover/index.js
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var j = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (
|
|
6
|
-
import { CSSProperty as
|
|
7
|
-
import { S as
|
|
4
|
+
var q = (n, h, t) => h.has(n) || j("Cannot " + t);
|
|
5
|
+
var e = (n, h, t) => (q(n, h, "read from private field"), t ? t.call(n) : h.get(n)), s = (n, h, t) => h.has(n) ? j("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(n) : h.set(n, t), i = (n, h, t, a) => (q(n, h, "write to private field"), a ? a.call(n, t) : h.set(n, t), t), _ = (n, h, t) => (q(n, h, "access private method"), t);
|
|
6
|
+
import { CSSProperty as A } from "../css-property/index.js";
|
|
7
|
+
import { S as J } from "../Store-OTdcl6SX.js";
|
|
8
8
|
import { d as z } from "../events-CsVF98U6.js";
|
|
9
|
-
import { d as
|
|
10
|
-
import { g as
|
|
11
|
-
import { windowResizer as
|
|
12
|
-
import { i as
|
|
13
|
-
var
|
|
9
|
+
import { d as K } from "../function-C10DGppn.js";
|
|
10
|
+
import { g as Q } from "../style-j2TwriJ_.js";
|
|
11
|
+
import { windowResizer as F } from "../window-resizer/vanilla/index.js";
|
|
12
|
+
import { i as V } from "../browser-0zX67oeU.js";
|
|
13
|
+
var S, l, P, y, d, v, p, m, g, f, b, u, G, E, B, T, D, w, x, H, C;
|
|
14
14
|
const c = class c extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
17
|
s(this, u);
|
|
18
|
-
s(this,
|
|
18
|
+
s(this, S);
|
|
19
19
|
s(this, l);
|
|
20
|
-
s(this,
|
|
20
|
+
s(this, P);
|
|
21
|
+
s(this, y);
|
|
21
22
|
s(this, d);
|
|
22
23
|
s(this, v);
|
|
23
24
|
s(this, p);
|
|
24
|
-
s(this, g);
|
|
25
25
|
s(this, m);
|
|
26
|
+
s(this, g);
|
|
26
27
|
s(this, f);
|
|
27
|
-
s(this,
|
|
28
|
-
s(this,
|
|
29
|
-
s(this,
|
|
30
|
-
s(this,
|
|
31
|
-
s(this, S);
|
|
32
|
-
s(this, P);
|
|
28
|
+
s(this, b);
|
|
29
|
+
s(this, E);
|
|
30
|
+
s(this, T);
|
|
31
|
+
s(this, w);
|
|
33
32
|
s(this, x);
|
|
34
|
-
|
|
33
|
+
s(this, H);
|
|
34
|
+
s(this, C);
|
|
35
|
+
i(this, S, -1), i(this, l, new J(!1)), i(this, d, new A(this, "--history", !1)), i(this, v, new A(this, "--restore", !1)), i(this, p, new A(this, "--dominance", 0)), i(this, m, new A(this, "--click-outside", !1)), i(this, g, new A(this, "--escape", !1)), i(this, f, !1), this.open = (t) => {
|
|
35
36
|
if (e(this, l).current)
|
|
36
37
|
return;
|
|
37
|
-
|
|
38
|
+
i(this, b, t == null ? void 0 : t.trigger), e(this, l).current = !0, e(this, p).current && (c.__opened = c.__opened.filter((o) => o !== this && this.dominance.current >= o.dominance.current ? (o.close(), !1) : !0)), c.__opened.push(this), i(this, S, c.__opened.length - 1), e(this, d).current && e(this, f) && history.pushState("", "", e(this, u, G)), clearTimeout(e(this, P)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", z(this, "popoverTriggered", {
|
|
38
39
|
custom: !0,
|
|
39
40
|
detail: {
|
|
40
|
-
trigger: e(this,
|
|
41
|
+
trigger: e(this, b)
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
const a = () => {
|
|
44
|
-
addEventListener("click", e(this,
|
|
45
|
+
addEventListener("click", e(this, E)), addEventListener("keydown", e(this, T)), e(this, C).call(this), this.style.opacity = "1", this.classList.add("opened"), z(this, "popoverOpened", {
|
|
45
46
|
custom: !0,
|
|
46
47
|
detail: {
|
|
47
|
-
trigger: e(this,
|
|
48
|
+
trigger: e(this, b)
|
|
48
49
|
}
|
|
49
|
-
});
|
|
50
|
+
}), i(this, y, void 0);
|
|
50
51
|
};
|
|
51
|
-
t != null && t.skipTransition ? a() : setTimeout(a, 10);
|
|
52
|
+
t != null && t.skipTransition ? a() : i(this, y, setTimeout(a, 10));
|
|
52
53
|
}, this.close = () => {
|
|
53
|
-
e(this, l).current && (e(this, l).current = !1, c.__opened = c.__opened.filter((t) => t === this ? !1 : e(t, p).current < this.dominance.current ? (t.close(), !1) : !0),
|
|
54
|
+
e(this, l).current && (removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, T)), e(this, l).current = !1, c.__opened = c.__opened.filter((t) => t === this ? !1 : e(t, p).current < this.dominance.current && !e(t, y) ? (t.close(), !1) : !0), _(this, u, B).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", z(this, "popoverClosing", {
|
|
54
55
|
custom: !0
|
|
55
|
-
}),
|
|
56
|
+
}), setTimeout(() => {
|
|
56
57
|
this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", z(this, "popoverClosed", {
|
|
57
58
|
custom: !0
|
|
58
59
|
});
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
e(this,
|
|
62
|
-
var
|
|
60
|
+
}, Q(this) + 10));
|
|
61
|
+
}, i(this, E, (t) => {
|
|
62
|
+
e(this, m).current && _(this, u, D).call(this, () => {
|
|
63
|
+
var U;
|
|
63
64
|
const a = t.composedPath();
|
|
64
65
|
if (a.find(
|
|
65
|
-
(
|
|
66
|
+
(W) => W instanceof HTMLElement && W.hasAttribute("data-popover-content")
|
|
66
67
|
))
|
|
67
68
|
return;
|
|
68
|
-
const
|
|
69
|
-
(
|
|
69
|
+
const o = a[0], I = o instanceof HTMLElement && (this.contains(o) || ((U = this.shadowRoot) == null ? void 0 : U.contains(o))), k = o instanceof HTMLElement && o.hasAttribute("data-outside");
|
|
70
|
+
(!I || k) && this.close();
|
|
70
71
|
});
|
|
71
|
-
}),
|
|
72
|
-
e(this,
|
|
72
|
+
}), i(this, T, (t) => {
|
|
73
|
+
e(this, g).current && _(this, u, D).call(this, () => {
|
|
73
74
|
t.code === "Escape" && this.close();
|
|
74
75
|
});
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
}),
|
|
78
|
-
this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this,
|
|
79
|
-
}),
|
|
80
|
-
e(this,
|
|
81
|
-
}, 10)),
|
|
76
|
+
}), i(this, w, () => {
|
|
77
|
+
i(this, f, !1), e(this, l).current && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, l).current && e(this, d).current && location.search.includes(this.id) && this.open(), i(this, f, !0);
|
|
78
|
+
}), i(this, x, () => {
|
|
79
|
+
this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, H).call(this);
|
|
80
|
+
}), i(this, H, K(() => {
|
|
81
|
+
e(this, C).call(this);
|
|
82
|
+
}, 10)), i(this, C, () => {
|
|
82
83
|
this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
|
|
83
84
|
});
|
|
84
85
|
}
|
|
@@ -92,126 +93,126 @@ const c = class c extends HTMLElement {
|
|
|
92
93
|
return e(this, p);
|
|
93
94
|
}
|
|
94
95
|
get clickOutside() {
|
|
95
|
-
return e(this,
|
|
96
|
+
return e(this, m);
|
|
96
97
|
}
|
|
97
98
|
get escape() {
|
|
98
|
-
return e(this,
|
|
99
|
+
return e(this, g);
|
|
99
100
|
}
|
|
100
101
|
get opened() {
|
|
101
102
|
return e(this, l);
|
|
102
103
|
}
|
|
103
104
|
get lastTrigger() {
|
|
104
|
-
return e(this,
|
|
105
|
+
return e(this, b);
|
|
105
106
|
}
|
|
106
107
|
connectedCallback() {
|
|
107
|
-
e(this, d).observe(), e(this, v).observe(), e(this, p).observe(), e(this,
|
|
108
|
-
e(this, v).current ? e(this,
|
|
109
|
-
}, 0),
|
|
108
|
+
e(this, d).observe(), e(this, v).observe(), e(this, p).observe(), e(this, m).observe(), e(this, g).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, w)), setTimeout(() => {
|
|
109
|
+
e(this, v).current ? e(this, w).call(this) : (_(this, u, B).call(this), i(this, f, !0));
|
|
110
|
+
}, 0), F.subscribe(e(this, x));
|
|
110
111
|
}
|
|
111
112
|
disconnectedCallback() {
|
|
112
|
-
|
|
113
|
+
F.unsubscribe(e(this, x)), e(this, d).unobserve(), e(this, v).unobserve(), e(this, p).unobserve(), e(this, m).unobserve(), e(this, g).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, P)), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, w)), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, T)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
|
-
|
|
116
|
+
S = new WeakMap(), l = new WeakMap(), P = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), p = new WeakMap(), m = new WeakMap(), g = new WeakMap(), f = new WeakMap(), b = new WeakMap(), u = new WeakSet(), G = function() {
|
|
116
117
|
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
117
|
-
},
|
|
118
|
+
}, E = new WeakMap(), B = function() {
|
|
118
119
|
if (e(this, d).current) {
|
|
119
120
|
const t = new URL(location.href);
|
|
120
121
|
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
121
122
|
}
|
|
122
|
-
},
|
|
123
|
-
(c.__opened[e(this,
|
|
124
|
-
},
|
|
125
|
-
let
|
|
126
|
-
customElements.get("e-popover") || customElements.define("e-popover",
|
|
127
|
-
var
|
|
128
|
-
class
|
|
123
|
+
}, T = new WeakMap(), D = function(t) {
|
|
124
|
+
(c.__opened[e(this, S) - 1] || c.__opened.length === 1 || c.__opened.filter((a) => a !== this).every((a) => e(this, p).current > a.dominance.current)) && t();
|
|
125
|
+
}, w = new WeakMap(), x = new WeakMap(), H = new WeakMap(), C = new WeakMap(), c.__opened = [];
|
|
126
|
+
let N = c;
|
|
127
|
+
customElements.get("e-popover") || customElements.define("e-popover", N);
|
|
128
|
+
var r, L, M, O, R, $;
|
|
129
|
+
class X extends HTMLElement {
|
|
129
130
|
constructor() {
|
|
130
131
|
super();
|
|
131
|
-
s(this,
|
|
132
|
-
s(this,
|
|
133
|
-
s(this,
|
|
132
|
+
s(this, r);
|
|
133
|
+
s(this, L, new A(this, "--type", "open"));
|
|
134
|
+
s(this, M, () => {
|
|
134
135
|
this.classList.add("triggered");
|
|
135
136
|
});
|
|
136
|
-
s(this,
|
|
137
|
+
s(this, O, () => {
|
|
137
138
|
this.classList.add("opened"), this.setAttribute("aria-expanded", "true");
|
|
138
139
|
});
|
|
139
|
-
s(this,
|
|
140
|
+
s(this, R, () => {
|
|
140
141
|
this.classList.remove("opened");
|
|
141
142
|
});
|
|
142
|
-
s(this,
|
|
143
|
+
s(this, $, () => {
|
|
143
144
|
this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false");
|
|
144
145
|
});
|
|
145
|
-
|
|
146
|
-
if (e(this,
|
|
147
|
-
const t = e(this,
|
|
148
|
-
t === "open" || t === "toggle" && !e(this,
|
|
146
|
+
V && (this.addEventListener("click", () => {
|
|
147
|
+
if (e(this, r)) {
|
|
148
|
+
const t = e(this, L).current;
|
|
149
|
+
t === "open" || t === "toggle" && !e(this, r).opened.current ? e(this, r).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, r).opened.current) && e(this, r).close();
|
|
149
150
|
}
|
|
150
151
|
}), this.addEventListener("keydown", (t) => {
|
|
151
152
|
t.code === "Space" && t.currentTarget.click();
|
|
152
153
|
}));
|
|
153
154
|
}
|
|
154
155
|
get type() {
|
|
155
|
-
return e(this,
|
|
156
|
+
return e(this, L);
|
|
156
157
|
}
|
|
157
158
|
get popoverElement() {
|
|
158
|
-
return e(this,
|
|
159
|
+
return e(this, r);
|
|
159
160
|
}
|
|
160
161
|
connectedCallback() {
|
|
161
162
|
var a;
|
|
162
|
-
e(this,
|
|
163
|
-
e(this,
|
|
163
|
+
e(this, L).subscribe((o) => {
|
|
164
|
+
e(this, r) && (o.current !== "close" ? (this.setAttribute("aria-has-popup", "true"), this.setAttribute(
|
|
164
165
|
"aria-expanded",
|
|
165
|
-
e(this,
|
|
166
|
-
), this.setAttribute("aria-controls", e(this,
|
|
166
|
+
e(this, r).opened.current ? "true" : "false"
|
|
167
|
+
), this.setAttribute("aria-controls", e(this, r).id || "")) : (this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
|
|
167
168
|
}), this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
168
169
|
const t = this.getAttribute("target");
|
|
169
170
|
if (t) {
|
|
170
|
-
let
|
|
171
|
+
let o = null;
|
|
171
172
|
if (t === "parent") {
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
|
|
173
|
+
const I = this.closest("[popover-target]");
|
|
174
|
+
if (I)
|
|
175
|
+
o = I;
|
|
175
176
|
else {
|
|
176
|
-
const
|
|
177
|
-
|
|
177
|
+
const k = this.getRootNode();
|
|
178
|
+
k instanceof ShadowRoot ? o = k.host.closest("[popover-target]") : k instanceof HTMLElement && (o = k.closest("[popover-target]"));
|
|
178
179
|
}
|
|
179
|
-
} else t === "sibling" ?
|
|
180
|
-
|
|
180
|
+
} else t === "sibling" ? o = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : o = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
181
|
+
o instanceof HTMLElement ? (i(this, r, o), e(this, r).addEventListener(
|
|
181
182
|
"popoverTriggered",
|
|
182
|
-
e(this, H)
|
|
183
|
-
), e(this, i).addEventListener(
|
|
184
|
-
"popoverOpened",
|
|
185
183
|
e(this, M)
|
|
186
|
-
), e(this,
|
|
187
|
-
"
|
|
184
|
+
), e(this, r).addEventListener(
|
|
185
|
+
"popoverOpened",
|
|
188
186
|
e(this, O)
|
|
189
|
-
), e(this,
|
|
190
|
-
"
|
|
187
|
+
), e(this, r).addEventListener(
|
|
188
|
+
"popoverClosing",
|
|
191
189
|
e(this, R)
|
|
190
|
+
), e(this, r).addEventListener(
|
|
191
|
+
"popoverClosed",
|
|
192
|
+
e(this, $)
|
|
192
193
|
)) : console.warn(this, `target ${t} not found`);
|
|
193
194
|
}
|
|
194
|
-
e(this,
|
|
195
|
+
e(this, L).observe();
|
|
195
196
|
}
|
|
196
197
|
disconnectedCallback() {
|
|
197
|
-
e(this,
|
|
198
|
+
e(this, L).unobserve(), this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), e(this, r) && (e(this, r).removeEventListener(
|
|
198
199
|
"popoverTriggered",
|
|
199
|
-
e(this, H)
|
|
200
|
-
), e(this, i).removeEventListener(
|
|
201
|
-
"popoverOpened",
|
|
202
200
|
e(this, M)
|
|
203
|
-
), e(this,
|
|
204
|
-
"
|
|
201
|
+
), e(this, r).removeEventListener(
|
|
202
|
+
"popoverOpened",
|
|
205
203
|
e(this, O)
|
|
206
|
-
), e(this,
|
|
207
|
-
"
|
|
204
|
+
), e(this, r).removeEventListener(
|
|
205
|
+
"popoverClosing",
|
|
208
206
|
e(this, R)
|
|
207
|
+
), e(this, r).removeEventListener(
|
|
208
|
+
"popoverClosed",
|
|
209
|
+
e(this, $)
|
|
209
210
|
));
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
|
-
|
|
213
|
-
customElements.get("e-popover-button") || customElements.define("e-popover-button",
|
|
213
|
+
r = new WeakMap(), L = new WeakMap(), M = new WeakMap(), O = new WeakMap(), R = new WeakMap(), $ = new WeakMap();
|
|
214
|
+
customElements.get("e-popover-button") || customElements.define("e-popover-button", X);
|
|
214
215
|
export {
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
X as PopoverButtonElement,
|
|
217
|
+
N as PopoverElement
|
|
217
218
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var xe=Object.defineProperty;var ce=Object.getOwnPropertySymbols;var ze=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var ae=u=>{throw TypeError(u)};var ue=(u,r,e)=>r in u?xe(u,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[r]=e,de=(u,r)=>{for(var e in r||(r={}))ze.call(r,e)&&ue(u,e,r[e]);if(ce)for(var e of ce(r))Le.call(r,e)&&ue(u,e,r[e]);return u};var te=(u,r,e)=>r.has(u)||ae("Cannot "+e);var t=(u,r,e)=>(te(u,r,"read from private field"),e?e.call(u):r.get(u)),s=(u,r,e)=>r.has(u)?ae("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(u):r.set(u,e),h=(u,r,e,i)=>(te(u,r,"write to private field"),i?i.call(u,e):r.set(u,e),e),d=(u,r,e)=>(te(u,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("../../Store-CDb6RMce.cjs"),Yt=require("../../browser-CpzFX2xg.cjs"),Ie=require("../../easings-GegIwET5.cjs"),ee=require("../../events-KVanG9sR.cjs"),pe=require("../../jss-GJLvaNfT.cjs"),Et=require("../../layout-8ryRAMGJ.cjs"),fe=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const se=require("../../order/index.cjs"),Te=require("../../Damped-CTsV8tl_.cjs"),qe=require("../../Tweened-C0-UzxN-.cjs"),Zt=require("../../controls/index.cjs"),Xt=require("../../window-resizer/vanilla/index.cjs"),ct=require("../../scroll-entries/index.cjs"),Se=require("../../css-unit-parser/index.cjs"),p=require("../../css-property/index.cjs"),De=require("../../device/index.cjs"),Bt=require("../../element-resizer/vanilla/index.cjs"),Re=require("../../gestures-DHLrn6Q8.cjs"),me=require("../../dom-JBOkFLTh.cjs"),Ae=require("../../function-MthRj-GJ.cjs"),Me=require("../../scroll-segment/index.cjs");var f,_t,y,ut,A,N;class Oe{constructor(r,e,i){s(this,f);s(this,_t);s(this,y);s(this,ut,0);s(this,A,0);s(this,N,null);h(this,f,r),h(this,_t,e),h(this,y,i),ct.scrollEntries.register(t(this,f))}get index(){return t(this,_t)}get size(){return t(this,ut)}get position(){return t(this,A)}destroy(){ct.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(r){r?(t(this,f).style.setProperty("--size",r+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=r+"px",t(this,f).style.height=""):(t(this,f).style.height=r+"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,ut,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?Et.getCumulativeOffsetTop(t(this,f)):Et.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let r=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,ut)<t(this,y).currentScrollValue&&(r=t(this,y).distance*-1-t(this,y).gap),ct.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,r);const i=t(this,y).currentScrollValue+r,n=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,ut)+e,m=fe.clamp(i,n,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(r){t(this,N)!==r&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),r&&t(this,f).classList.add(r),h(this,N,r),ee.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,_t=new WeakMap,y=new WeakMap,ut=new WeakMap,A=new WeakMap,N=new WeakMap;const Ve=pe.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,at,x,M,O,V,I,G,j,B,K,dt,T,C,St,pt,ft,mt,wt,k,bt,Z,q,J,_,Q,gt,yt,X,Y,S,xt,l,Ht,Ft,v,g,z,D,tt,R,P,b,zt,et,H,st,vt,Lt,it,F,Wt,o,Vt,Pt,Jt,Qt,ie,re,L,kt,be,It,Ut,ne,he,lt,oe;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,at,new p.CSSProperty(this,"--controls",!0));s(this,x,new p.CSSProperty(this,"--axis","y"));s(this,M,new p.CSSProperty(this,"--direction",0));s(this,O,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,V,new p.CSSProperty(this,"--split",!1));s(this,I,new p.CSSProperty(this,"--sectional",!1));s(this,G,new p.CSSProperty(this,"--easing",!1));s(this,j,new p.CSSProperty(this,"--duration",!1));s(this,B,new p.CSSProperty(this,"--auto-size",!1));s(this,K,new p.CSSProperty(this,"--wheel-max-delta",!1));s(this,dt,new p.CSSProperty(this,"--drag-inertion",1));s(this,T,new p.CSSProperty(this,"--sections-in-view",1));s(this,C,new p.CSSProperty(this,"--loop",!1));s(this,St,new p.CSSProperty(this,"--damping",20));s(this,pt,new p.CSSProperty(this,"--mass",0));s(this,ft,new p.CSSProperty(this,"--stiffness",0));s(this,mt,new p.CSSProperty(this,"--mouse-drag",!1));s(this,wt,new p.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new p.CSSProperty(this,"--autoplay",0));s(this,bt,new p.CSSProperty(this,"--autoplay-pause-duration",0));s(this,Z,new p.CSSProperty(this,"--autoplay-user-direction",!1));s(this,q,new p.CSSProperty(this,"--classes",!1));s(this,J,new p.CSSProperty(this,"--current-index-start-offset",0));s(this,_,new p.CSSProperty(this,"--current-index-end-offset",0));s(this,Q,new p.CSSProperty(this,"--focus-delay",0));s(this,gt,new p.CSSProperty(this,"--focus-duration",3e3));s(this,yt,new p.CSSProperty(this,"--disabled",!1));s(this,X,new p.CSSProperty(this,"--hibernated",!1));s(this,Y,null);s(this,S,null);s(this,xt,null);s(this,l,[]);s(this,Ht,0);s(this,Ft,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,D,null);s(this,tt,null);s(this,R,null);s(this,P,null);s(this,b,new ke.Store(0));s(this,zt,0);s(this,et,0);s(this,H,!1);s(this,st,!0);s(this,vt,!0);s(this,Lt);s(this,it);s(this,F,new qe.Tweened);s(this,Wt,!1);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,Ht,this.vertical?Et.getCumulativeOffsetTop(this):Et.getCumulativeOffsetLeft(this)),h(this,Ft,this.vertical?Et.getCumulativeOffsetTop(t(this,S)):Et.getCumulativeOffsetLeft(t(this,S))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).rowGap)):h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).columnGap)),t(this,B).current&&t(this,l).length){const n=t(this,T).current,c=(t(this,v)-t(this,z)*(n-1))/n;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,O).current){h(this,g,t(this,v)*t(this,O).current);const n=t(this,g)+t(this,v);this.vertical?(t(this,S).style.width=n+"px",t(this,S).style.height="100%"):(t(this,S).style.height=n+"px",t(this,S).style.width="100%")}else this.vertical?(t(this,S).style.width="100%",t(this,S).style.height="max-content",h(this,g,t(this,S).offsetHeight-t(this,v))):(t(this,S).style.width="max-content",t(this,S).style.height="100%",h(this,g,t(this,S).offsetWidth-t(this,v)));if(!t(this,C).current){const n=getComputedStyle(this),c=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.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 n=t(this,l)[t(this,l).length-1],c=n.position+n.size-t(this,v),m=t(this,g)-c;h(this,et,n.position+n.size+m)}else h(this,et,t(this,g));if(t(this,I).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,H,(this.vertical?t(this,S).offsetHeight:t(this,S).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Qt).call(this):d(this,o,Jt).call(this),t(this,kt).call(this)});s(this,kt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,zt,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let n=0;n<t(this,l).length;n++){const c=t(this,l)[n];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=n)}t(this,b).current=i}else this.vertical?t(this,S).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,S).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;ct.scrollEntries.update(this,t(this,x).current,e)});s(this,It,(e,i)=>{t(this,at).current&&(d(this,o,ne).call(this,Math.sign(i)||1),t(this,Ut).call(this,e,i))});s(this,Ut,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,it)||t(this,F).unlistenAnimationFrame(),!t(this,k).current&&t(this,Q).current&&(clearInterval(t(this,Lt)),h(this,Lt,setTimeout(()=>{const n=d(this,o,oe).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,gt).current,easing:Ie.easeInOutExpo}})},t(this,Q).current))),!(e.includes("drag")&&!De.device.isMobile&&!t(this,mt).current)){if(t(this,I).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const c={tween:t(this,G).current||t(this,j).current?{easing:t(this,G).current||"easeInOutCubic",duration:t(this,j).current||500}:void 0};t(this,Wt)?this.scrollToSection(t(this,b).current,c):this.shiftSections(n,c)}else t(this,a).shift(n*t(this,v))}else t(this,a).shift(i);h(this,Wt,e==="drag")}});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Ve);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Y,document.createElement("div")),t(this,Y).className="content-wrapper",h(this,S,document.createElement("div")),t(this,S).className="content",h(this,xt,document.createElement("slot")),t(this,S).appendChild(t(this,xt)),t(this,Y).appendChild(t(this,S)),e.appendChild(t(this,Y))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,at)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,O)}get splitCSSProperty(){return t(this,V)}get sectionalCSSProperty(){return t(this,I)}get easingCSSProperty(){return t(this,G)}get durationCSSProperty(){return t(this,j)}get autoSizeCSSProperty(){return t(this,B)}get wheelMaxDeltaCSSProperty(){return t(this,K)}get dragInertionCSSProperty(){return t(this,dt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,St)}get massCSSProperty(){return t(this,pt)}get stiffnessCSSProperty(){return t(this,ft)}get mouseDragCSSProperty(){return t(this,mt)}get sectionDistanceScaleCSSProperty(){return t(this,wt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,bt)}get autoplayUserDirectionCSSProperty(){return t(this,Z)}get classesCSSProperty(){return t(this,q)}get currentIndexStartOffsetCSSProperty(){return t(this,J)}get currentIndexEndOffsetCSSProperty(){return t(this,_)}get focusDelayCSSProperty(){return t(this,Q)}get focusDurationCSSProperty(){return t(this,gt)}get disabledCSSProperty(){return t(this,yt)}get hibernatedCSSProperty(){return t(this,X)}get currentScrollValue(){return d(this,o,he).call(this,"current")}get targetScrollValue(){return d(this,o,he).call(this,"target")}get contentWrapperElement(){return t(this,Y)}get contentElement(){return t(this,S)}get sections(){return t(this,l)}get position(){return t(this,Ht)}get contentPosition(){return t(this,Ft)}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 Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,et)}get loopDistance(){return t(this,C).current?t(this,et)+t(this,z):t(this,et)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,zt)}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,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,b).current;d(this,o,be).call(this,e);const c=t(this,l)[n],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const Ct=d(this,o,oe).call(this),we=Ct?this.targetScrollValue-Ct.position:0;t(this,C).current?t(this,b).current===0&&n===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&&n===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-we,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,ne).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,it)||(t(this,F).set(t(this,a).current,{equalize:!0}),t(this,F).set(e,de({},i.tween)),h(this,it,setTimeout(()=>{h(this,it,void 0)},i.tween.duration))):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(){ct.scrollEntries.register(this),h(this,a,new Te.Damped(0,{damping:.01,min:0,order:se.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new Zt.WheelControls({element:t(this,S)})),t(this,D).changeEvent.subscribe(t(this,It)),h(this,tt,new Zt.KeyboardControls({element:this})),t(this,tt).changeEvent.subscribe(t(this,It)),h(this,R,new Zt.DragControls({element:t(this,S)})),t(this,R).changeEvent.subscribe(t(this,It)),h(this,P,new Zt.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,Ut)),t(this,x).subscribe(({current:e})=>{t(this,S).style.flexDirection=e==="x"?"row":"column",t(this,D).axis=t(this,K).current?"max":e,t(this,tt).dimension=e==="x"?"width":"height",t(this,R).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,K).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,dt).subscribe(e=>{t(this,R).inertion=typeof e.current=="number"?e.current:1}),t(this,O).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,V).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Vt).call(this):d(this,o,Pt).call(this))}),t(this,I).subscribe(e=>{t(this,D).debounce=e.current,t(this,R).swipe=e.current,t(this,P).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Vt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,B).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Vt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,T).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,lt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,V).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,zt,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,St).subscribe(e=>{t(this,a).damping=e.current}),t(this,pt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ft).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,P).speed=e.current,!t(this,st)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,Z).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,q).subscribe(e=>{this.isConnected&&d(this,o,lt).call(this)}),t(this,J).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,lt).call(this)}),t(this,_).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,lt).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,lt).call(this)}),t(this,F).subscribe(e=>{t(this,F).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,yt).subscribe(e=>{e.current&&!e.previous?d(this,o,Jt).call(this):!e.current&&e.previous&&d(this,o,Qt).call(this)}),t(this,X).subscribe(e=>{e.current&&!e.previous?d(this,o,ie).call(this):!e.current&&e.previous&&d(this,o,re).call(this)}),t(this,at).observe(),t(this,x).observe(),t(this,M).observe(),t(this,O).observe(),t(this,V).observe(),t(this,I).observe(),t(this,G).observe(),t(this,j).observe(),t(this,B).observe(),t(this,K).observe(),t(this,dt).observe(),t(this,T).observe(),t(this,C).observe(),t(this,St).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,mt).observe(),t(this,wt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,bt).observe(),t(this,Z).observe(),t(this,q).observe(),t(this,J).observe(),t(this,_).observe(),t(this,Q).observe(),t(this,gt).observe(),t(this,yt).observe(),t(this,X).observe(),t(this,X).current||d(this,o,re).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,at).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,V).unobserve(),t(this,I).unobserve(),t(this,G).unobserve(),t(this,j).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,dt).unobserve(),t(this,T).unobserve(),t(this,C).unobserve(),t(this,St).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,mt).unobserve(),t(this,wt).unobserve(),t(this,k).unobserve(),t(this,bt).unobserve(),t(this,Z).unobserve(),t(this,q).unobserve(),t(this,J).unobserve(),t(this,_).unobserve(),t(this,Q).unobserve(),t(this,gt).unobserve(),t(this,yt).unobserve(),t(this,X).unobserve(),d(this,o,ie).call(this)}}a=new WeakMap,at=new WeakMap,x=new WeakMap,M=new WeakMap,O=new WeakMap,V=new WeakMap,I=new WeakMap,G=new WeakMap,j=new WeakMap,B=new WeakMap,K=new WeakMap,dt=new WeakMap,T=new WeakMap,C=new WeakMap,St=new WeakMap,pt=new WeakMap,ft=new WeakMap,mt=new WeakMap,wt=new WeakMap,k=new WeakMap,bt=new WeakMap,Z=new WeakMap,q=new WeakMap,J=new WeakMap,_=new WeakMap,Q=new WeakMap,gt=new WeakMap,yt=new WeakMap,X=new WeakMap,Y=new WeakMap,S=new WeakMap,xt=new WeakMap,l=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,D=new WeakMap,tt=new WeakMap,R=new WeakMap,P=new WeakMap,b=new WeakMap,zt=new WeakMap,et=new WeakMap,H=new WeakMap,st=new WeakMap,vt=new WeakMap,Lt=new WeakMap,it=new WeakMap,F=new WeakMap,Wt=new WeakMap,o=new WeakSet,Vt=function(){d(this,o,Pt).call(this),t(this,xt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Oe(e,i,this))}),t(this,S).style.transform="",ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,lt).call(this)},Pt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Jt=function(){t(this,st)||(h(this,st,!0),t(this,a).unsubscribe(t(this,kt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Lt)),clearInterval(t(this,it)),t(this,F).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,tt).disconnect(),t(this,R).disconnect(),t(this,P).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Qt=function(){t(this,st)&&(h(this,st,!1),t(this,a).subscribe(t(this,kt)),t(this,D).connect(),t(this,tt).connect(),t(this,R).connect(),t(this,k).current&&t(this,P).connect())},ie=function(){t(this,vt)||(h(this,vt,!0),Xt.windowResizer.unsubscribe(t(this,L)),Bt.elementResizer.unsubscribe(t(this,L)),d(this,o,Jt).call(this),t(this,S).style.transform="",t(this,l).length?d(this,o,Pt).call(this):(t(this,b).reset(),t(this,a).reset()),ct.scrollEntries.unregister(this))},re=function(){t(this,vt)&&(h(this,vt,!1),ct.scrollEntries.register(this),(t(this,C).current||t(this,V).current||t(this,C).current||t(this,B).current||t(this,I).current)&&d(this,o,Vt).call(this),d(this,o,Qt).call(this),Xt.windowResizer.subscribe(t(this,L),se.RESIZE_ORDER.SCROLL),Bt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,kt=new WeakMap,be=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=fe.clamp(e,0,this.limit)},It=new WeakMap,Ut=new WeakMap,ne=function(e=1){t(this,Z).current&&(t(this,P).direction=e),t(this,k).current&&t(this,P).pauseAndContinue(t(this,bt).current,this.sectionalCSSProperty.current)},he=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]},lt=function(){if(t(this,q).current&&t(this,l).length){const e=t(this,b).current+t(this,J).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,T).current+t(this,_).current;t(this,l).forEach((n,c)=>{const m=e-this.limit-1+t(this,_).current,w=e+i,Ct=this.sections.length-w;c>=e&&c<w||c<=m?n.mark("current"):c>=w&&c<w+Ct/2||c<=m+i?n.mark("next"):n.mark("previous")})}},oe=function(e=this.targetScrollValue){let i=null,n=1/0;for(let c=0;c<t(this,l).length;c++){const m=Math.abs(t(this,l)[c].position-e);m<n&&(n=m,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ot);var $t;class le extends HTMLElement{constructor(){super(...arguments);s(this,$t,null)}get scrollElement(){return t(this,$t)}connectedCallback(){const e=me.findParentElement(this,Ot);e instanceof Ot?h(this,$t,e):console.error(this,"e-scroll not found")}}$t=new WeakMap;var rt,E,W,U,Tt,qt,nt,Dt,Nt,Gt;class ge extends le{constructor(){super();s(this,rt,null);s(this,E,null);s(this,W,!1);s(this,U,0);s(this,Tt,0);s(this,qt,0);s(this,nt,()=>{h(this,W,this.offsetWidth>this.offsetHeight);const e=t(this,W)?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,W)?(t(this,E).style.width=t(this,U)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,U)+"px"),h(this,Tt,e-t(this,U)),this.scrollElement.scrollSize?this.style.display="":this.style.display="none",t(this,Dt).call(this)});s(this,Dt,()=>{h(this,qt,this.scrollElement.currentProgress*t(this,Tt)),t(this,W)?t(this,E).style.transform=`translate3d(${t(this,qt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,qt)}px, 0px)`});s(this,Nt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Gt,e=>{document.documentElement.classList.add("grabbing"),Re.setupDrag(c=>{const m=t(this,W)?c.x:c.y,w=this.scrollElement.distance/t(this,Tt),Ct=(m-n)*w;this.scrollElement.setPosition(i+Ct)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,W)?e.x:e.y});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(pe.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,rt,document.createElement("slot")),t(this,rt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,rt))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,rt).assignedElements()[0]||t(this,rt).firstElementChild;h(this,E,e),t(this,E).addEventListener("pointerdown",t(this,Gt)),Xt.windowResizer.subscribe(t(this,nt),se.RESIZE_ORDER.SCROLL),Bt.elementResizer.subscribe(this,t(this,nt)),Bt.elementResizer.subscribe(this.scrollElement,t(this,nt)),this.scrollElement.onScroll(t(this,Dt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Nt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,E).removeEventListener("pointerdown",t(this,Gt)),Xt.windowResizer.unsubscribe(t(this,nt)),Bt.elementResizer.unsubscribe(t(this,nt)),this.scrollElement.offScroll(t(this,Dt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Nt))}}rt=new WeakMap,E=new WeakMap,W=new WeakMap,U=new WeakMap,Tt=new WeakMap,qt=new WeakMap,nt=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Gt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ge);class ye extends le{constructor(){super(),Yt.isBrowser&&this.addEventListener("click",()=>{const r=this.getAttribute("behaviour"),e=this.getAttribute("easing")||void 0,i=e?parseFloat(this.getAttribute("duration")||"0"):void 0;this.handleClick({behaviour:r,tween:e?{easing:e,duration:i}:void 0})})}}class ve extends ye{handleClick(r){const e=this.getAttribute("index");this.scrollElement.scrollToSection(parseInt(e||"0"),r)}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ve);class Ce extends ye{handleClick(r){const e=this.getAttribute("step");this.scrollElement.shiftSections(parseInt(e||"1"),r)}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Ce);var $,ht,Rt,jt,Kt,At;class Be{constructor(r,e,i){s(this,$,null);s(this,ht,null);s(this,Rt,null);s(this,jt,null);s(this,Kt,()=>{t(this,ht).scrollToSection(t(this,Rt),{behaviour:t(this,jt)})});s(this,At,()=>{t(this,$).classList.toggle("current",t(this,ht).counter.current===t(this,Rt))});Yt.isBrowser&&(h(this,$,document.createElement("button")),h(this,ht,r),h(this,jt,i),h(this,Rt,e),t(this,$).addEventListener("click",t(this,Kt)),t(this,ht).counter.subscribe(t(this,At)),t(this,At).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,Kt)),t(this,ht).counter.unsubscribe(t(this,At)),t(this,$).remove()}}$=new WeakMap,ht=new WeakMap,Rt=new WeakMap,jt=new WeakMap,Kt=new WeakMap,At=new WeakMap;var ot,Mt;class Pe extends le{constructor(){super(...arguments);s(this,ot,[]);s(this,Mt,Ae.debounce(()=>{t(this,ot).forEach(e=>e.destroy()),h(this,ot,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Be(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ot).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Mt)),t(this,Mt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Mt)),t(this,ot).forEach(e=>e.destroy()),h(this,ot,[])}}ot=new WeakMap,Mt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Pe);class Ee extends Me.ScrollSegmentElement{connectedCallback(){const r=me.findParentElement(this,Ot);r instanceof Ot?(this.scrollContainer=r,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Ee);exports.ScrollBulletButtonsElement=Pe;exports.ScrollElement=Ot;exports.ScrollSegmentElement=Ee;exports.ScrollSetButtonElement=ve;exports.ScrollStepButtonElement=Ce;exports.ScrollbarElement=ge;
|
|
1
|
+
"use strict";var xe=Object.defineProperty;var ce=Object.getOwnPropertySymbols;var ze=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var ae=u=>{throw TypeError(u)};var ue=(u,r,e)=>r in u?xe(u,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[r]=e,de=(u,r)=>{for(var e in r||(r={}))ze.call(r,e)&&ue(u,e,r[e]);if(ce)for(var e of ce(r))Le.call(r,e)&&ue(u,e,r[e]);return u};var te=(u,r,e)=>r.has(u)||ae("Cannot "+e);var t=(u,r,e)=>(te(u,r,"read from private field"),e?e.call(u):r.get(u)),s=(u,r,e)=>r.has(u)?ae("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(u):r.set(u,e),h=(u,r,e,i)=>(te(u,r,"write to private field"),i?i.call(u,e):r.set(u,e),e),d=(u,r,e)=>(te(u,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("../../Store-CDb6RMce.cjs"),Yt=require("../../browser-CpzFX2xg.cjs"),Ie=require("../../easings-GegIwET5.cjs"),ee=require("../../events-KVanG9sR.cjs"),pe=require("../../jss-GJLvaNfT.cjs"),Et=require("../../layout-8ryRAMGJ.cjs"),fe=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const se=require("../../order/index.cjs"),Te=require("../../Damped-CTsV8tl_.cjs"),qe=require("../../Tweened-C0-UzxN-.cjs"),Zt=require("../../controls/index.cjs"),Xt=require("../../window-resizer/vanilla/index.cjs"),ct=require("../../scroll-entries/index.cjs"),Se=require("../../css-unit-parser/index.cjs"),p=require("../../css-property/index.cjs"),De=require("../../device/index.cjs"),Bt=require("../../element-resizer/vanilla/index.cjs"),Re=require("../../gestures-DHLrn6Q8.cjs"),me=require("../../dom-JBOkFLTh.cjs"),Ae=require("../../function-MthRj-GJ.cjs"),Me=require("../../scroll-segment/index.cjs");var f,_t,y,ut,A,N;class Oe{constructor(r,e,i){s(this,f);s(this,_t);s(this,y);s(this,ut,0);s(this,A,0);s(this,N,null);h(this,f,r),h(this,_t,e),h(this,y,i),ct.scrollEntries.register(t(this,f))}get index(){return t(this,_t)}get size(){return t(this,ut)}get position(){return t(this,A)}destroy(){ct.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(r){r?(t(this,f).style.setProperty("--size",r+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=r+"px",t(this,f).style.height=""):(t(this,f).style.height=r+"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,ut,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?Et.getCumulativeOffsetTop(t(this,f)):Et.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let r=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,ut)<t(this,y).currentScrollValue&&(r=t(this,y).distance*-1-t(this,y).gap),ct.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,r);const i=t(this,y).currentScrollValue+r,n=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,ut)+e,m=fe.clamp(i,n,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(r){t(this,N)!==r&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),r&&t(this,f).classList.add(r),h(this,N,r),ee.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,_t=new WeakMap,y=new WeakMap,ut=new WeakMap,A=new WeakMap,N=new WeakMap;const Ve=pe.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,at,x,M,O,V,I,G,j,B,K,dt,T,C,St,pt,ft,mt,wt,k,bt,Z,q,J,_,Q,gt,yt,X,Y,S,xt,l,Ht,Ft,v,g,z,D,tt,R,P,b,zt,et,H,st,vt,Lt,it,F,Wt,o,Vt,Pt,Jt,Qt,ie,re,L,kt,be,It,Ut,ne,he,lt,oe;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,at,new p.CSSProperty(this,"--controls",!0));s(this,x,new p.CSSProperty(this,"--axis","y"));s(this,M,new p.CSSProperty(this,"--direction",0));s(this,O,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,V,new p.CSSProperty(this,"--split",!1));s(this,I,new p.CSSProperty(this,"--sectional",!1));s(this,G,new p.CSSProperty(this,"--easing",!1));s(this,j,new p.CSSProperty(this,"--duration",!1));s(this,B,new p.CSSProperty(this,"--auto-size",!1));s(this,K,new p.CSSProperty(this,"--wheel-max-delta",!1));s(this,dt,new p.CSSProperty(this,"--drag-inertion",1));s(this,T,new p.CSSProperty(this,"--sections-in-view",1));s(this,C,new p.CSSProperty(this,"--loop",!1));s(this,St,new p.CSSProperty(this,"--damping",20));s(this,pt,new p.CSSProperty(this,"--mass",0));s(this,ft,new p.CSSProperty(this,"--stiffness",0));s(this,mt,new p.CSSProperty(this,"--mouse-drag",!1));s(this,wt,new p.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new p.CSSProperty(this,"--autoplay",0));s(this,bt,new p.CSSProperty(this,"--autoplay-pause-duration",0));s(this,Z,new p.CSSProperty(this,"--autoplay-user-direction",!1));s(this,q,new p.CSSProperty(this,"--classes",!1));s(this,J,new p.CSSProperty(this,"--current-index-start-offset",0));s(this,_,new p.CSSProperty(this,"--current-index-end-offset",0));s(this,Q,new p.CSSProperty(this,"--focus-delay",0));s(this,gt,new p.CSSProperty(this,"--focus-duration",3e3));s(this,yt,new p.CSSProperty(this,"--disabled",!1));s(this,X,new p.CSSProperty(this,"--hibernated",!1));s(this,Y,null);s(this,S,null);s(this,xt,null);s(this,l,[]);s(this,Ht,0);s(this,Ft,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,D,null);s(this,tt,null);s(this,R,null);s(this,P,null);s(this,b,new ke.Store(0));s(this,zt,0);s(this,et,0);s(this,H,!1);s(this,st,!0);s(this,vt,!0);s(this,Lt);s(this,it);s(this,F,new qe.Tweened);s(this,Wt,!1);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,Ht,this.vertical?Et.getCumulativeOffsetTop(this):Et.getCumulativeOffsetLeft(this)),h(this,Ft,this.vertical?Et.getCumulativeOffsetTop(t(this,S)):Et.getCumulativeOffsetLeft(t(this,S))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).rowGap)):h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).columnGap)),t(this,B).current&&t(this,l).length){const n=t(this,T).current,c=(t(this,v)-t(this,z)*(n-1))/n;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,O).current){h(this,g,t(this,v)*t(this,O).current);const n=t(this,g)+t(this,v);this.vertical?(t(this,S).style.width=n+"px",t(this,S).style.height="100%"):(t(this,S).style.height=n+"px",t(this,S).style.width="100%")}else this.vertical?(t(this,S).style.width="100%",t(this,S).style.height="max-content",h(this,g,t(this,S).offsetHeight-t(this,v))):(t(this,S).style.width="max-content",t(this,S).style.height="100%",h(this,g,t(this,S).offsetWidth-t(this,v)));if(!t(this,C).current){const n=getComputedStyle(this),c=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.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 n=t(this,l)[t(this,l).length-1],c=n.position+n.size-t(this,v),m=t(this,g)-c;h(this,et,n.position+n.size+m)}else h(this,et,t(this,g));if(t(this,I).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,H,(this.vertical?t(this,S).offsetHeight:t(this,S).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Qt).call(this):d(this,o,Jt).call(this),t(this,kt).call(this)});s(this,kt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,zt,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let n=0;n<t(this,l).length;n++){const c=t(this,l)[n];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=n)}t(this,b).current=i}else this.vertical?t(this,S).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,S).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;ct.scrollEntries.update(this,t(this,x).current,e)});s(this,It,(e,i)=>{t(this,at).current&&(d(this,o,ne).call(this,Math.sign(i)||1),t(this,Ut).call(this,e,i))});s(this,Ut,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,it)||t(this,F).unlistenAnimationFrame(),!t(this,k).current&&t(this,Q).current&&(clearInterval(t(this,Lt)),h(this,Lt,setTimeout(()=>{const n=d(this,o,oe).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,gt).current,easing:Ie.easeInOutExpo}})},t(this,Q).current))),!(e.includes("drag")&&!De.device.isMobile&&!t(this,mt).current)){if(t(this,I).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const c={tween:t(this,G).current||t(this,j).current?{easing:t(this,G).current||"easeInOutCubic",duration:t(this,j).current||500}:void 0};t(this,Wt)?this.scrollToSection(t(this,b).current,c):this.shiftSections(n,c)}else t(this,a).shift(n*t(this,v))}else t(this,a).shift(i);h(this,Wt,e==="drag")}});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ve];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Y,document.createElement("div")),t(this,Y).className="content-wrapper",h(this,S,document.createElement("div")),t(this,S).className="content",h(this,xt,document.createElement("slot")),t(this,S).appendChild(t(this,xt)),t(this,Y).appendChild(t(this,S)),e.appendChild(t(this,Y))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,at)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,O)}get splitCSSProperty(){return t(this,V)}get sectionalCSSProperty(){return t(this,I)}get easingCSSProperty(){return t(this,G)}get durationCSSProperty(){return t(this,j)}get autoSizeCSSProperty(){return t(this,B)}get wheelMaxDeltaCSSProperty(){return t(this,K)}get dragInertionCSSProperty(){return t(this,dt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,St)}get massCSSProperty(){return t(this,pt)}get stiffnessCSSProperty(){return t(this,ft)}get mouseDragCSSProperty(){return t(this,mt)}get sectionDistanceScaleCSSProperty(){return t(this,wt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,bt)}get autoplayUserDirectionCSSProperty(){return t(this,Z)}get classesCSSProperty(){return t(this,q)}get currentIndexStartOffsetCSSProperty(){return t(this,J)}get currentIndexEndOffsetCSSProperty(){return t(this,_)}get focusDelayCSSProperty(){return t(this,Q)}get focusDurationCSSProperty(){return t(this,gt)}get disabledCSSProperty(){return t(this,yt)}get hibernatedCSSProperty(){return t(this,X)}get currentScrollValue(){return d(this,o,he).call(this,"current")}get targetScrollValue(){return d(this,o,he).call(this,"target")}get contentWrapperElement(){return t(this,Y)}get contentElement(){return t(this,S)}get sections(){return t(this,l)}get position(){return t(this,Ht)}get contentPosition(){return t(this,Ft)}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 Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,et)}get loopDistance(){return t(this,C).current?t(this,et)+t(this,z):t(this,et)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,zt)}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,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,b).current;d(this,o,be).call(this,e);const c=t(this,l)[n],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const Ct=d(this,o,oe).call(this),we=Ct?this.targetScrollValue-Ct.position:0;t(this,C).current?t(this,b).current===0&&n===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&&n===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-we,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,ne).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,it)||(t(this,F).set(t(this,a).current,{equalize:!0}),t(this,F).set(e,de({},i.tween)),h(this,it,setTimeout(()=>{h(this,it,void 0)},i.tween.duration))):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(){ct.scrollEntries.register(this),h(this,a,new Te.Damped(0,{damping:.01,min:0,order:se.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new Zt.WheelControls({element:t(this,S)})),t(this,D).changeEvent.subscribe(t(this,It)),h(this,tt,new Zt.KeyboardControls({element:this})),t(this,tt).changeEvent.subscribe(t(this,It)),h(this,R,new Zt.DragControls({element:t(this,S)})),t(this,R).changeEvent.subscribe(t(this,It)),h(this,P,new Zt.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,Ut)),t(this,x).subscribe(({current:e})=>{t(this,S).style.flexDirection=e==="x"?"row":"column",t(this,D).axis=t(this,K).current?"max":e,t(this,tt).dimension=e==="x"?"width":"height",t(this,R).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,K).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,dt).subscribe(e=>{t(this,R).inertion=typeof e.current=="number"?e.current:1}),t(this,O).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,V).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Vt).call(this):d(this,o,Pt).call(this))}),t(this,I).subscribe(e=>{t(this,D).debounce=e.current,t(this,R).swipe=e.current,t(this,P).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Vt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,B).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Vt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,T).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,lt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,V).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,zt,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,St).subscribe(e=>{t(this,a).damping=e.current}),t(this,pt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ft).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,P).speed=e.current,!t(this,st)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,Z).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,q).subscribe(e=>{this.isConnected&&d(this,o,lt).call(this)}),t(this,J).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,lt).call(this)}),t(this,_).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,lt).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,lt).call(this)}),t(this,F).subscribe(e=>{t(this,F).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,yt).subscribe(e=>{e.current&&!e.previous?d(this,o,Jt).call(this):!e.current&&e.previous&&d(this,o,Qt).call(this)}),t(this,X).subscribe(e=>{e.current&&!e.previous?d(this,o,ie).call(this):!e.current&&e.previous&&d(this,o,re).call(this)}),t(this,at).observe(),t(this,x).observe(),t(this,M).observe(),t(this,O).observe(),t(this,V).observe(),t(this,I).observe(),t(this,G).observe(),t(this,j).observe(),t(this,B).observe(),t(this,K).observe(),t(this,dt).observe(),t(this,T).observe(),t(this,C).observe(),t(this,St).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,mt).observe(),t(this,wt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,bt).observe(),t(this,Z).observe(),t(this,q).observe(),t(this,J).observe(),t(this,_).observe(),t(this,Q).observe(),t(this,gt).observe(),t(this,yt).observe(),t(this,X).observe(),t(this,X).current||d(this,o,re).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,at).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,V).unobserve(),t(this,I).unobserve(),t(this,G).unobserve(),t(this,j).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,dt).unobserve(),t(this,T).unobserve(),t(this,C).unobserve(),t(this,St).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,mt).unobserve(),t(this,wt).unobserve(),t(this,k).unobserve(),t(this,bt).unobserve(),t(this,Z).unobserve(),t(this,q).unobserve(),t(this,J).unobserve(),t(this,_).unobserve(),t(this,Q).unobserve(),t(this,gt).unobserve(),t(this,yt).unobserve(),t(this,X).unobserve(),d(this,o,ie).call(this)}}a=new WeakMap,at=new WeakMap,x=new WeakMap,M=new WeakMap,O=new WeakMap,V=new WeakMap,I=new WeakMap,G=new WeakMap,j=new WeakMap,B=new WeakMap,K=new WeakMap,dt=new WeakMap,T=new WeakMap,C=new WeakMap,St=new WeakMap,pt=new WeakMap,ft=new WeakMap,mt=new WeakMap,wt=new WeakMap,k=new WeakMap,bt=new WeakMap,Z=new WeakMap,q=new WeakMap,J=new WeakMap,_=new WeakMap,Q=new WeakMap,gt=new WeakMap,yt=new WeakMap,X=new WeakMap,Y=new WeakMap,S=new WeakMap,xt=new WeakMap,l=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,D=new WeakMap,tt=new WeakMap,R=new WeakMap,P=new WeakMap,b=new WeakMap,zt=new WeakMap,et=new WeakMap,H=new WeakMap,st=new WeakMap,vt=new WeakMap,Lt=new WeakMap,it=new WeakMap,F=new WeakMap,Wt=new WeakMap,o=new WeakSet,Vt=function(){d(this,o,Pt).call(this),t(this,xt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Oe(e,i,this))}),t(this,S).style.transform="",ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,lt).call(this)},Pt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Jt=function(){t(this,st)||(h(this,st,!0),t(this,a).unsubscribe(t(this,kt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Lt)),clearInterval(t(this,it)),t(this,F).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,tt).disconnect(),t(this,R).disconnect(),t(this,P).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Qt=function(){t(this,st)&&(h(this,st,!1),t(this,a).subscribe(t(this,kt)),t(this,D).connect(),t(this,tt).connect(),t(this,R).connect(),t(this,k).current&&t(this,P).connect())},ie=function(){t(this,vt)||(h(this,vt,!0),Xt.windowResizer.unsubscribe(t(this,L)),Bt.elementResizer.unsubscribe(t(this,L)),d(this,o,Jt).call(this),t(this,S).style.transform="",t(this,l).length?d(this,o,Pt).call(this):(t(this,b).reset(),t(this,a).reset()),ct.scrollEntries.unregister(this))},re=function(){t(this,vt)&&(h(this,vt,!1),ct.scrollEntries.register(this),(t(this,C).current||t(this,V).current||t(this,C).current||t(this,B).current||t(this,I).current)&&d(this,o,Vt).call(this),d(this,o,Qt).call(this),Xt.windowResizer.subscribe(t(this,L),se.RESIZE_ORDER.SCROLL),Bt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,kt=new WeakMap,be=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=fe.clamp(e,0,this.limit)},It=new WeakMap,Ut=new WeakMap,ne=function(e=1){t(this,Z).current&&(t(this,P).direction=e),t(this,k).current&&t(this,P).pauseAndContinue(t(this,bt).current,this.sectionalCSSProperty.current)},he=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]},lt=function(){if(t(this,q).current&&t(this,l).length){const e=t(this,b).current+t(this,J).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,T).current+t(this,_).current;t(this,l).forEach((n,c)=>{const m=e-this.limit-1+t(this,_).current,w=e+i,Ct=this.sections.length-w;c>=e&&c<w||c<=m?n.mark("current"):c>=w&&c<w+Ct/2||c<=m+i?n.mark("next"):n.mark("previous")})}},oe=function(e=this.targetScrollValue){let i=null,n=1/0;for(let c=0;c<t(this,l).length;c++){const m=Math.abs(t(this,l)[c].position-e);m<n&&(n=m,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ot);var $t;class le extends HTMLElement{constructor(){super(...arguments);s(this,$t,null)}get scrollElement(){return t(this,$t)}connectedCallback(){const e=me.findParentElement(this,Ot);e instanceof Ot?h(this,$t,e):console.error(this,"e-scroll not found")}}$t=new WeakMap;var rt,E,W,U,Tt,qt,nt,Dt,Nt,Gt;class ge extends le{constructor(){super();s(this,rt,null);s(this,E,null);s(this,W,!1);s(this,U,0);s(this,Tt,0);s(this,qt,0);s(this,nt,()=>{h(this,W,this.offsetWidth>this.offsetHeight);const e=t(this,W)?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,W)?(t(this,E).style.width=t(this,U)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,U)+"px"),h(this,Tt,e-t(this,U)),this.scrollElement.scrollSize?this.style.display="":this.style.display="none",t(this,Dt).call(this)});s(this,Dt,()=>{h(this,qt,this.scrollElement.currentProgress*t(this,Tt)),t(this,W)?t(this,E).style.transform=`translate3d(${t(this,qt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,qt)}px, 0px)`});s(this,Nt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Gt,e=>{document.documentElement.classList.add("grabbing"),Re.setupDrag(c=>{const m=t(this,W)?c.x:c.y,w=this.scrollElement.distance/t(this,Tt),Ct=(m-n)*w;this.scrollElement.setPosition(i+Ct)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,W)?e.x:e.y});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[pe.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,rt,document.createElement("slot")),t(this,rt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,rt))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,rt).assignedElements()[0]||t(this,rt).firstElementChild;h(this,E,e),t(this,E).addEventListener("pointerdown",t(this,Gt)),Xt.windowResizer.subscribe(t(this,nt),se.RESIZE_ORDER.SCROLL),Bt.elementResizer.subscribe(this,t(this,nt)),Bt.elementResizer.subscribe(this.scrollElement,t(this,nt)),this.scrollElement.onScroll(t(this,Dt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Nt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,E).removeEventListener("pointerdown",t(this,Gt)),Xt.windowResizer.unsubscribe(t(this,nt)),Bt.elementResizer.unsubscribe(t(this,nt)),this.scrollElement.offScroll(t(this,Dt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Nt))}}rt=new WeakMap,E=new WeakMap,W=new WeakMap,U=new WeakMap,Tt=new WeakMap,qt=new WeakMap,nt=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Gt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ge);class ye extends le{constructor(){super(),Yt.isBrowser&&this.addEventListener("click",()=>{const r=this.getAttribute("behaviour"),e=this.getAttribute("easing")||void 0,i=e?parseFloat(this.getAttribute("duration")||"0"):void 0;this.handleClick({behaviour:r,tween:e?{easing:e,duration:i}:void 0})})}}class ve extends ye{handleClick(r){const e=this.getAttribute("index");this.scrollElement.scrollToSection(parseInt(e||"0"),r)}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ve);class Ce extends ye{handleClick(r){const e=this.getAttribute("step");this.scrollElement.shiftSections(parseInt(e||"1"),r)}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Ce);var $,ht,Rt,jt,Kt,At;class Be{constructor(r,e,i){s(this,$,null);s(this,ht,null);s(this,Rt,null);s(this,jt,null);s(this,Kt,()=>{t(this,ht).scrollToSection(t(this,Rt),{behaviour:t(this,jt)})});s(this,At,()=>{t(this,$).classList.toggle("current",t(this,ht).counter.current===t(this,Rt))});Yt.isBrowser&&(h(this,$,document.createElement("button")),h(this,ht,r),h(this,jt,i),h(this,Rt,e),t(this,$).addEventListener("click",t(this,Kt)),t(this,ht).counter.subscribe(t(this,At)),t(this,At).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,Kt)),t(this,ht).counter.unsubscribe(t(this,At)),t(this,$).remove()}}$=new WeakMap,ht=new WeakMap,Rt=new WeakMap,jt=new WeakMap,Kt=new WeakMap,At=new WeakMap;var ot,Mt;class Pe extends le{constructor(){super(...arguments);s(this,ot,[]);s(this,Mt,Ae.debounce(()=>{t(this,ot).forEach(e=>e.destroy()),h(this,ot,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Be(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ot).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Mt)),t(this,Mt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Mt)),t(this,ot).forEach(e=>e.destroy()),h(this,ot,[])}}ot=new WeakMap,Mt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Pe);class Ee extends Me.ScrollSegmentElement{connectedCallback(){const r=me.findParentElement(this,Ot);r instanceof Ot?(this.scrollContainer=r,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Ee);exports.ScrollBulletButtonsElement=Pe;exports.ScrollElement=Ot;exports.ScrollSegmentElement=Ee;exports.ScrollSetButtonElement=ve;exports.ScrollStepButtonElement=Ce;exports.ScrollbarElement=ge;
|
|
@@ -18,9 +18,9 @@ import { S as we } from "../../Store-OTdcl6SX.js";
|
|
|
18
18
|
import { i as Qt } from "../../browser-0zX67oeU.js";
|
|
19
19
|
import { q as xe } from "../../easings-BEmRlrDd.js";
|
|
20
20
|
import { d as Yt } from "../../events-CsVF98U6.js";
|
|
21
|
-
import { c as
|
|
21
|
+
import { c as fe } from "../../jss-CjccJC-K.js";
|
|
22
22
|
import { a as te, g as ee } from "../../layout-HoBT_Da2.js";
|
|
23
|
-
import { c as
|
|
23
|
+
import { c as pe } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
25
|
import { TICK_ORDER as Pe, RESIZE_ORDER as me } from "../../order/index.js";
|
|
26
26
|
import { D as Le } from "../../Damped-Chu29wn-.js";
|
|
@@ -29,7 +29,7 @@ import { WheelControls as ke, KeyboardControls as Ie, DragControls as De, Autopl
|
|
|
29
29
|
import { windowResizer as Jt } from "../../window-resizer/vanilla/index.js";
|
|
30
30
|
import { scrollEntries as ct } from "../../scroll-entries/index.js";
|
|
31
31
|
import { cssUnitParser as de } from "../../css-unit-parser/index.js";
|
|
32
|
-
import { CSSProperty as
|
|
32
|
+
import { CSSProperty as p } from "../../css-property/index.js";
|
|
33
33
|
import { device as Te } from "../../device/index.js";
|
|
34
34
|
import { elementResizer as Rt } from "../../element-resizer/vanilla/index.js";
|
|
35
35
|
import { s as Me } from "../../gestures-D2Fdra_G.js";
|
|
@@ -76,7 +76,7 @@ class Re {
|
|
|
76
76
|
t(this, v).axisCSSProperty.current,
|
|
77
77
|
r
|
|
78
78
|
);
|
|
79
|
-
const i = t(this, v).currentScrollValue + r, n = t(this, V) - t(this, v).viewportSize - e, c = t(this, V) + t(this, at) + e, b =
|
|
79
|
+
const i = t(this, v).currentScrollValue + r, n = t(this, V) - t(this, v).viewportSize - e, c = t(this, V) + t(this, at) + e, b = pe(i, n, c);
|
|
80
80
|
t(this, v).vertical ? t(this, m).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
|
|
81
81
|
}
|
|
82
82
|
mark(r) {
|
|
@@ -90,7 +90,7 @@ class Re {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
m = new WeakMap(), Bt = new WeakMap(), v = new WeakMap(), at = new WeakMap(), V = new WeakMap(), G = new WeakMap();
|
|
93
|
-
const He =
|
|
93
|
+
const He = fe({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
96
96
|
width: "100%",
|
|
@@ -128,84 +128,84 @@ const He = pe({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u, ut, P, O, R, H, I, K, _, B, Z, dt, D, C,
|
|
131
|
+
var u, ut, P, O, R, H, I, K, _, B, Z, dt, D, C, ft, pt, mt, bt, wt, k, gt, j, A, J, F, Q, St, vt, X, Y, f, xt, l, Ft, Wt, y, S, L, T, tt, M, E, g, Pt, et, W, st, yt, Lt, it, $, $t, o, Ot, Et, Zt, jt, se, ie, z, zt, ge, kt, qt, re, ne, lt, he;
|
|
132
132
|
class Ht extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this, ut, new
|
|
138
|
-
s(this, P, new
|
|
139
|
-
s(this, O, new
|
|
140
|
-
s(this, R, new
|
|
137
|
+
s(this, ut, new p(this, "--controls", !0));
|
|
138
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
139
|
+
s(this, O, new p(this, "--direction", 0));
|
|
140
|
+
s(this, R, new p(this, "--pages", 0, {
|
|
141
141
|
validate: (e) => Math.max(0, e - 1)
|
|
142
142
|
}));
|
|
143
|
-
s(this, H, new
|
|
144
|
-
s(this, I, new
|
|
145
|
-
s(this, K, new
|
|
143
|
+
s(this, H, new p(this, "--split", !1));
|
|
144
|
+
s(this, I, new p(this, "--sectional", !1));
|
|
145
|
+
s(this, K, new p(
|
|
146
146
|
this,
|
|
147
147
|
"--easing",
|
|
148
148
|
!1
|
|
149
149
|
));
|
|
150
|
-
s(this, _, new
|
|
150
|
+
s(this, _, new p(
|
|
151
151
|
this,
|
|
152
152
|
"--duration",
|
|
153
153
|
!1
|
|
154
154
|
));
|
|
155
|
-
s(this, B, new
|
|
156
|
-
s(this, Z, new
|
|
155
|
+
s(this, B, new p(this, "--auto-size", !1));
|
|
156
|
+
s(this, Z, new p(
|
|
157
157
|
this,
|
|
158
158
|
"--wheel-max-delta",
|
|
159
159
|
!1
|
|
160
160
|
));
|
|
161
|
-
s(this, dt, new
|
|
162
|
-
s(this, D, new
|
|
161
|
+
s(this, dt, new p(this, "--drag-inertion", 1));
|
|
162
|
+
s(this, D, new p(
|
|
163
163
|
this,
|
|
164
164
|
"--sections-in-view",
|
|
165
165
|
1
|
|
166
166
|
));
|
|
167
|
-
s(this, C, new
|
|
168
|
-
s(this,
|
|
169
|
-
s(this,
|
|
170
|
-
s(this, mt, new
|
|
171
|
-
s(this, bt, new
|
|
172
|
-
s(this, wt, new
|
|
167
|
+
s(this, C, new p(this, "--loop", !1));
|
|
168
|
+
s(this, ft, new p(this, "--damping", 20));
|
|
169
|
+
s(this, pt, new p(this, "--mass", 0));
|
|
170
|
+
s(this, mt, new p(this, "--stiffness", 0));
|
|
171
|
+
s(this, bt, new p(this, "--mouse-drag", !1));
|
|
172
|
+
s(this, wt, new p(
|
|
173
173
|
this,
|
|
174
174
|
"--section-distance-scale",
|
|
175
175
|
0.5
|
|
176
176
|
));
|
|
177
|
-
s(this, k, new
|
|
178
|
-
s(this, gt, new
|
|
177
|
+
s(this, k, new p(this, "--autoplay", 0));
|
|
178
|
+
s(this, gt, new p(
|
|
179
179
|
this,
|
|
180
180
|
"--autoplay-pause-duration",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this, j, new
|
|
183
|
+
s(this, j, new p(
|
|
184
184
|
this,
|
|
185
185
|
"--autoplay-user-direction",
|
|
186
186
|
!1
|
|
187
187
|
));
|
|
188
|
-
s(this, A, new
|
|
189
|
-
s(this, J, new
|
|
188
|
+
s(this, A, new p(this, "--classes", !1));
|
|
189
|
+
s(this, J, new p(
|
|
190
190
|
this,
|
|
191
191
|
"--current-index-start-offset",
|
|
192
192
|
0
|
|
193
193
|
));
|
|
194
|
-
s(this, F, new
|
|
194
|
+
s(this, F, new p(
|
|
195
195
|
this,
|
|
196
196
|
"--current-index-end-offset",
|
|
197
197
|
0
|
|
198
198
|
));
|
|
199
|
-
s(this, Q, new
|
|
200
|
-
s(this, St, new
|
|
199
|
+
s(this, Q, new p(this, "--focus-delay", 0));
|
|
200
|
+
s(this, St, new p(
|
|
201
201
|
this,
|
|
202
202
|
"--focus-duration",
|
|
203
203
|
3e3
|
|
204
204
|
));
|
|
205
|
-
s(this, vt, new
|
|
206
|
-
s(this, X, new
|
|
205
|
+
s(this, vt, new p(this, "--disabled", !1));
|
|
206
|
+
s(this, X, new p(this, "--hibernated", !1));
|
|
207
207
|
s(this, Y, null);
|
|
208
|
-
s(this,
|
|
208
|
+
s(this, f, null);
|
|
209
209
|
s(this, xt, null);
|
|
210
210
|
s(this, l, []);
|
|
211
211
|
s(this, Ft, 0);
|
|
@@ -230,10 +230,10 @@ class Ht extends HTMLElement {
|
|
|
230
230
|
s(this, z, () => {
|
|
231
231
|
t(this, u).unlistenAnimationFrame();
|
|
232
232
|
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
|
|
233
|
-
if (h(this, Ft, this.vertical ? te(this) : ee(this)), h(this, Wt, this.vertical ? te(t(this,
|
|
234
|
-
getComputedStyle(t(this,
|
|
233
|
+
if (h(this, Ft, this.vertical ? te(this) : ee(this)), h(this, Wt, this.vertical ? te(t(this, f)) : ee(t(this, f))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, de.parse(
|
|
234
|
+
getComputedStyle(t(this, f)).rowGap
|
|
235
235
|
)) : h(this, L, de.parse(
|
|
236
|
-
getComputedStyle(t(this,
|
|
236
|
+
getComputedStyle(t(this, f)).columnGap
|
|
237
237
|
)), t(this, B).current && t(this, l).length) {
|
|
238
238
|
const n = t(this, D).current, c = (t(this, y) - t(this, L) * (n - 1)) / n;
|
|
239
239
|
t(this, l).forEach((b) => {
|
|
@@ -248,9 +248,9 @@ class Ht extends HTMLElement {
|
|
|
248
248
|
}), t(this, R).current) {
|
|
249
249
|
h(this, S, t(this, y) * t(this, R).current);
|
|
250
250
|
const n = t(this, S) + t(this, y);
|
|
251
|
-
this.vertical ? (t(this,
|
|
251
|
+
this.vertical ? (t(this, f).style.width = n + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = n + "px", t(this, f).style.width = "100%");
|
|
252
252
|
} else
|
|
253
|
-
this.vertical ? (t(this,
|
|
253
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, S, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, S, t(this, f).offsetWidth - t(this, y)));
|
|
254
254
|
if (!t(this, C).current) {
|
|
255
255
|
const n = getComputedStyle(this), c = this.vertical ? parseFloat(n.paddingBlockStart) + parseFloat(n.paddingBlockEnd) : parseFloat(n.paddingInlineStart) + parseFloat(n.paddingInlineEnd);
|
|
256
256
|
h(this, S, t(this, S) + c), t(this, u).max = t(this, S);
|
|
@@ -269,7 +269,7 @@ class Ht extends HTMLElement {
|
|
|
269
269
|
t(this, u).set(e * t(this, S), {
|
|
270
270
|
equalize: !0
|
|
271
271
|
});
|
|
272
|
-
h(this, W, (this.vertical ? t(this,
|
|
272
|
+
h(this, W, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, W)), t(this, W) ? d(this, o, jt).call(this) : d(this, o, Zt).call(this), t(this, zt).call(this);
|
|
273
273
|
});
|
|
274
274
|
s(this, zt, () => {
|
|
275
275
|
if (!t(this, W))
|
|
@@ -283,7 +283,7 @@ class Ht extends HTMLElement {
|
|
|
283
283
|
}
|
|
284
284
|
t(this, g).current = i;
|
|
285
285
|
} else
|
|
286
|
-
this.vertical ? t(this,
|
|
286
|
+
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
287
287
|
ct.update(
|
|
288
288
|
this,
|
|
289
289
|
t(this, P).current,
|
|
@@ -328,9 +328,9 @@ class Ht extends HTMLElement {
|
|
|
328
328
|
});
|
|
329
329
|
if (Qt) {
|
|
330
330
|
const e = this.attachShadow({ mode: "open" });
|
|
331
|
-
e.adoptedStyleSheets
|
|
331
|
+
e.adoptedStyleSheets = [He];
|
|
332
332
|
const i = document.createElement("div");
|
|
333
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Y, document.createElement("div")), t(this, Y).className = "content-wrapper", h(this,
|
|
333
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Y, document.createElement("div")), t(this, Y).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, xt, document.createElement("slot")), t(this, f).appendChild(t(this, xt)), t(this, Y).appendChild(t(this, f)), e.appendChild(t(this, Y));
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
get damped() {
|
|
@@ -376,10 +376,10 @@ class Ht extends HTMLElement {
|
|
|
376
376
|
return t(this, C);
|
|
377
377
|
}
|
|
378
378
|
get dampingCSSProperty() {
|
|
379
|
-
return t(this,
|
|
379
|
+
return t(this, ft);
|
|
380
380
|
}
|
|
381
381
|
get massCSSProperty() {
|
|
382
|
-
return t(this,
|
|
382
|
+
return t(this, pt);
|
|
383
383
|
}
|
|
384
384
|
get stiffnessCSSProperty() {
|
|
385
385
|
return t(this, mt);
|
|
@@ -430,7 +430,7 @@ class Ht extends HTMLElement {
|
|
|
430
430
|
return t(this, Y);
|
|
431
431
|
}
|
|
432
432
|
get contentElement() {
|
|
433
|
-
return t(this,
|
|
433
|
+
return t(this, f);
|
|
434
434
|
}
|
|
435
435
|
get sections() {
|
|
436
436
|
return t(this, l);
|
|
@@ -533,14 +533,14 @@ class Ht extends HTMLElement {
|
|
|
533
533
|
damping: 0.01,
|
|
534
534
|
min: 0,
|
|
535
535
|
order: Pe.SCROLL
|
|
536
|
-
})), this.setAttribute("tabindex", "0"), h(this, T, new ke({ element: t(this,
|
|
536
|
+
})), this.setAttribute("tabindex", "0"), h(this, T, new ke({ element: t(this, f) })), t(this, T).changeEvent.subscribe(t(this, kt)), h(this, tt, new Ie({
|
|
537
537
|
element: this
|
|
538
538
|
})), t(this, tt).changeEvent.subscribe(
|
|
539
539
|
t(this, kt)
|
|
540
|
-
), h(this, M, new De({ element: t(this,
|
|
540
|
+
), h(this, M, new De({ element: t(this, f) })), t(this, M).changeEvent.subscribe(t(this, kt)), h(this, E, new Ae({
|
|
541
541
|
culling: this
|
|
542
542
|
})), t(this, E).changeEvent.subscribe(t(this, qt)), t(this, P).subscribe(({ current: e }) => {
|
|
543
|
-
t(this,
|
|
543
|
+
t(this, f).style.flexDirection = e === "x" ? "row" : "column", t(this, T).axis = t(this, Z).current ? "max" : e, t(this, tt).dimension = e === "x" ? "width" : "height", t(this, M).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
|
|
544
544
|
}), t(this, Z).subscribe((e) => {
|
|
545
545
|
t(this, T).axis = e.current ? "max" : t(this, P).current;
|
|
546
546
|
}), t(this, dt).subscribe((e) => {
|
|
@@ -557,9 +557,9 @@ class Ht extends HTMLElement {
|
|
|
557
557
|
this.isConnected && (t(this, z).call(this), d(this, o, lt).call(this));
|
|
558
558
|
}), t(this, C).subscribe((e) => {
|
|
559
559
|
e.current ? (this.isConnected && (t(this, l).length || (t(this, H).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, Pt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
560
|
-
}), t(this, pt).subscribe((e) => {
|
|
561
|
-
t(this, u).damping = e.current;
|
|
562
560
|
}), t(this, ft).subscribe((e) => {
|
|
561
|
+
t(this, u).damping = e.current;
|
|
562
|
+
}), t(this, pt).subscribe((e) => {
|
|
563
563
|
t(this, u).mass = e.current;
|
|
564
564
|
}), t(this, mt).subscribe((e) => {
|
|
565
565
|
t(this, u).stiffness = e.current;
|
|
@@ -583,16 +583,16 @@ class Ht extends HTMLElement {
|
|
|
583
583
|
e.current && !e.previous ? d(this, o, Zt).call(this) : !e.current && e.previous && d(this, o, jt).call(this);
|
|
584
584
|
}), t(this, X).subscribe((e) => {
|
|
585
585
|
e.current && !e.previous ? d(this, o, se).call(this) : !e.current && e.previous && d(this, o, ie).call(this);
|
|
586
|
-
}), t(this, ut).observe(), t(this, P).observe(), t(this, O).observe(), t(this, R).observe(), t(this, H).observe(), t(this, I).observe(), t(this, K).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, dt).observe(), t(this, D).observe(), t(this, C).observe(), t(this,
|
|
586
|
+
}), t(this, ut).observe(), t(this, P).observe(), t(this, O).observe(), t(this, R).observe(), t(this, H).observe(), t(this, I).observe(), t(this, K).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, dt).observe(), t(this, D).observe(), t(this, C).observe(), t(this, ft).observe(), t(this, pt).observe(), t(this, mt).observe(), t(this, bt).observe(), t(this, wt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, gt).observe(), t(this, j).observe(), t(this, A).observe(), t(this, J).observe(), t(this, F).observe(), t(this, Q).observe(), t(this, St).observe(), t(this, vt).observe(), t(this, X).observe(), t(this, X).current || d(this, o, ie).call(this);
|
|
587
587
|
}
|
|
588
588
|
disconnectedCallback() {
|
|
589
|
-
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, ut).unobserve(), t(this, P).unobserve(), t(this, O).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, I).unobserve(), t(this, K).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, dt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this,
|
|
589
|
+
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, ut).unobserve(), t(this, P).unobserve(), t(this, O).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, I).unobserve(), t(this, K).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, dt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, ft).unobserve(), t(this, pt).unobserve(), t(this, mt).unobserve(), t(this, bt).unobserve(), t(this, wt).unobserve(), t(this, k).unobserve(), t(this, gt).unobserve(), t(this, j).unobserve(), t(this, A).unobserve(), t(this, J).unobserve(), t(this, F).unobserve(), t(this, Q).unobserve(), t(this, St).unobserve(), t(this, vt).unobserve(), t(this, X).unobserve(), d(this, o, se).call(this);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
u = new WeakMap(), ut = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R = new WeakMap(), H = new WeakMap(), I = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), dt = new WeakMap(), D = new WeakMap(), C = new WeakMap(),
|
|
592
|
+
u = new WeakMap(), ut = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R = new WeakMap(), H = new WeakMap(), I = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), dt = new WeakMap(), D = new WeakMap(), C = new WeakMap(), ft = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), k = new WeakMap(), gt = new WeakMap(), j = new WeakMap(), A = new WeakMap(), J = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), St = new WeakMap(), vt = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), f = new WeakMap(), xt = new WeakMap(), l = new WeakMap(), Ft = new WeakMap(), Wt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), M = new WeakMap(), E = new WeakMap(), g = new WeakMap(), Pt = new WeakMap(), et = new WeakMap(), W = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), Lt = new WeakMap(), it = new WeakMap(), $ = new WeakMap(), $t = new WeakMap(), o = new WeakSet(), Ot = function() {
|
|
593
593
|
d(this, o, Et).call(this), t(this, xt).assignedElements().forEach((e, i) => {
|
|
594
594
|
e instanceof HTMLElement && t(this, l).push(new Re(e, i, this));
|
|
595
|
-
}), t(this,
|
|
595
|
+
}), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
|
|
596
596
|
custom: !0,
|
|
597
597
|
composed: !0
|
|
598
598
|
}), t(this, z).call(this), d(this, o, lt).call(this);
|
|
@@ -610,11 +610,11 @@ u = new WeakMap(), ut = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R =
|
|
|
610
610
|
}, jt = function() {
|
|
611
611
|
t(this, st) && (h(this, st, !1), t(this, u).subscribe(t(this, zt)), t(this, T).connect(), t(this, tt).connect(), t(this, M).connect(), t(this, k).current && t(this, E).connect());
|
|
612
612
|
}, se = function() {
|
|
613
|
-
t(this, yt) || (h(this, yt, !0), Jt.unsubscribe(t(this, z)), Rt.unsubscribe(t(this, z)), d(this, o, Zt).call(this), t(this,
|
|
613
|
+
t(this, yt) || (h(this, yt, !0), Jt.unsubscribe(t(this, z)), Rt.unsubscribe(t(this, z)), d(this, o, Zt).call(this), t(this, f).style.transform = "", t(this, l).length ? d(this, o, Et).call(this) : (t(this, g).reset(), t(this, u).reset()), ct.unregister(this));
|
|
614
614
|
}, ie = function() {
|
|
615
615
|
t(this, yt) && (h(this, yt, !1), ct.register(this), (t(this, C).current || t(this, H).current || t(this, C).current || t(this, B).current || t(this, I).current) && d(this, o, Ot).call(this), d(this, o, jt).call(this), Jt.subscribe(t(this, z), me.SCROLL), Rt.subscribe(this, t(this, z)));
|
|
616
616
|
}, z = new WeakMap(), zt = new WeakMap(), ge = function(e) {
|
|
617
|
-
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 =
|
|
617
|
+
t(this, C).current ? (t(this, g).current = e % t(this, l).length, t(this, g).current = t(this, g).current < 0 ? t(this, l).length + t(this, g).current : t(this, g).current) : t(this, g).current = pe(e, 0, this.limit);
|
|
618
618
|
}, kt = new WeakMap(), qt = new WeakMap(), re = function(e = 1) {
|
|
619
619
|
t(this, j).current && (t(this, E).direction = e), t(this, k).current && t(this, E).pauseAndContinue(
|
|
620
620
|
t(this, gt).current,
|
|
@@ -695,8 +695,8 @@ class Be extends oe {
|
|
|
695
695
|
});
|
|
696
696
|
if (Qt) {
|
|
697
697
|
const e = this.attachShadow({ mode: "open" });
|
|
698
|
-
e.adoptedStyleSheets
|
|
699
|
-
|
|
698
|
+
e.adoptedStyleSheets = [
|
|
699
|
+
fe({
|
|
700
700
|
":host": {
|
|
701
701
|
display: "inline-block",
|
|
702
702
|
zIndex: "1",
|
|
@@ -725,7 +725,7 @@ class Be extends oe {
|
|
|
725
725
|
touchAction: "none"
|
|
726
726
|
}
|
|
727
727
|
})
|
|
728
|
-
|
|
728
|
+
], h(this, rt, document.createElement("slot")), t(this, rt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, rt));
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
get thumbElement() {
|