aptechka 0.30.11 → 0.30.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,void 0)},80))}else this.changeEvent.notify("wheel",n)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(t(this,l))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
1
+ "use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){t(this,f)&&e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,void 0)},80))}else this.changeEvent.notify("wheel",n)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(t(this,l))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
@@ -96,7 +96,7 @@ class fe extends N {
96
96
  t(this, u) && (i(this, u, !1), M(this, o, S).call(this));
97
97
  }
98
98
  pauseAndContinue(e, n) {
99
- e && (clearTimeout(t(this, k)), t(this, c).set(1, {
99
+ t(this, u) && e && (clearTimeout(t(this, k)), t(this, c).set(1, {
100
100
  duration: Math.min(e, 1e3),
101
101
  equalize: n
102
102
  }), i(this, k, setTimeout(() => {
@@ -1 +1 @@
1
- "use strict";var ye=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var ne=u=>{throw TypeError(u)};var re=(u,n,e)=>n in u?ye(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,he=(u,n)=>{for(var e in n||(n={}))Ce.call(n,e)&&re(u,e,n[e]);if(ie)for(var e of ie(n))ve.call(n,e)&&re(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||ne("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?ne("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ee=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Pe=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),le=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),ce=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),we=require("../../Damped-CTsV8tl_.cjs"),xe=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),oe=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ze=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),Le=require("../../gestures-DHLrn6Q8.cjs"),ue=require("../../dom-JBOkFLTh.cjs"),ke=require("../../function-MthRj-GJ.cjs"),De=require("../../scroll-segment/index.cjs");var f,Rt,y,it,I,$;class qe{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,it,0);s(this,I,0);s(this,$,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,it)}get position(){return t(this,I)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,it,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,I,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,I,t(this,I)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,I)+t(this,it)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,I)-t(this,y).viewportSize-e,c=t(this,I)+t(this,it)+e,m=ce.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,$)!==n&&(t(this,$)&&t(this,f).classList.remove(t(this,$)),n&&t(this,f).classList.add(n),h(this,$,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,it=new WeakMap,I=new WeakMap,$=new WeakMap;const Re=le.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,rt,x,M,T,O,D,V,N,q,v,nt,ht,ot,lt,yt,k,ct,j,R,G,B,K,ut,at,dt,Z,p,Ct,o,At,It,C,g,z,A,J,_,E,b,vt,Q,pt,X,Et,H,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ae,Pt,Tt,Yt,te,st,ee;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,rt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,M,new S.CSSProperty(this,"--direction",0));s(this,T,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,nt,new S.CSSProperty(this,"--damping",20));s(this,ht,new S.CSSProperty(this,"--mass",0));s(this,ot,new S.CSSProperty(this,"--stiffness",0));s(this,lt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,ct,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ut,new S.CSSProperty(this,"--focus-duration",3e3));s(this,at,new S.CSSProperty(this,"--disabled",!1));s(this,dt,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,Ct,null);s(this,o,[]);s(this,At,0);s(this,It,0);s(this,C,0);s(this,g,0);s(this,z,0);s(this,A,null);s(this,J,null);s(this,_,null);s(this,E,null);s(this,b,new Ee.Store(0));s(this,vt,0);s(this,Q,0);s(this,pt,!0);s(this,X,!0);s(this,Et);s(this,H,new xe.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,At,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,It,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,o).length){const r=t(this,q).current,c=(t(this,C)-t(this,z)*(r-1))/r;t(this,o).forEach(m=>{m.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,g,t(this,C)*t(this,T).current);const r=t(this,g)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,v).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,C),m=t(this,g)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,g));if(t(this,D).current&&t(this,o).length){const r=t(this,o)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,vt,Math.max(0,e-t(this,g))),t(this,o).length){let i=0;for(let r=0;r<t(this,o).length;r++){const c=t(this,o)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,rt).current&&(d(this,l,Yt).call(this,Math.sign(i)||1),t(this,Tt).call(this,e,i))});s(this,Tt,(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,H).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,ee).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ut).current,easing:Pe.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!ze.device.isMobile&&!t(this,lt).current))if(t(this,D).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,C))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Re);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Z,document.createElement("div")),t(this,Z).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,rt)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,nt)}get massCSSProperty(){return t(this,ht)}get stiffnessCSSProperty(){return t(this,ot)}get mouseDragCSSProperty(){return t(this,lt)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,ct)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ut)}get disabledCSSProperty(){return t(this,at)}get hibernatedCSSProperty(){return t(this,dt)}get currentScrollValue(){return d(this,l,te).call(this,"current")}get targetScrollValue(){return d(this,l,te).call(this,"target")}get contentWrapperElement(){return t(this,Z)}get contentElement(){return t(this,p)}get sections(){return t(this,o)}get position(){return t(this,At)}get contentPosition(){return t(this,It)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,o).length-t(this,q).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,v).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,vt)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,b).current;d(this,l,ae).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,b).current];if(c&&m){let w=0;const ft=d(this,l,ee).call(this),ge=ft?this.targetScrollValue-ft.position:0;t(this,v).current?t(this,b).current===0&&r===t(this,o).length-1?w=t(this,g)+t(this,C)-c.position+t(this,z):t(this,b).current===t(this,o).length-1&&r===0?w=m.position-(t(this,g)+t(this,C)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ge,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,l,Yt).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,H).set(t(this,a).current,{equalize:!0}),t(this,H).set(e,he({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new we.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,A,new Wt.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,_,new Wt.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,Pt)),h(this,E,new Wt.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,A).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,D).subscribe(e=>{t(this,A).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,st).call(this))}),t(this,v).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,O).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,vt,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,nt).subscribe(e=>{t(this,a).damping=e.current}),t(this,ht).subscribe(e=>{t(this,a).mass=e.current}),t(this,ot).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,dt).subscribe(e=>{e.current&&!e.previous?d(this,l,Qt).call(this):!e.current&&e.previous&&d(this,l,Xt).call(this)}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,st).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,st).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,st).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,o).length&&d(this,l,st).call(this)}),t(this,H).subscribe(e=>{t(this,H).isRunning.current&&t(this,a).set(e.current)}),t(this,rt).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,N).observe(),t(this,q).observe(),t(this,v).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,lt).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,ct).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,B).observe(),t(this,K).observe(),t(this,ut).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,X)||d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,rt).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,ct).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),t(this,dt).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,rt=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,N=new WeakMap,q=new WeakMap,v=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,yt=new WeakMap,k=new WeakMap,ct=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakMap,K=new WeakMap,ut=new WeakMap,at=new WeakMap,dt=new WeakMap,Z=new WeakMap,p=new WeakMap,Ct=new WeakMap,o=new WeakMap,At=new WeakMap,It=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,A=new WeakMap,J=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,vt=new WeakMap,Q=new WeakMap,pt=new WeakMap,X=new WeakMap,Et=new WeakMap,H=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new qe(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,st).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,b).reset(),t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,pt)||(h(this,pt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,J).disconnect(),t(this,_).disconnect(),t(this,E).disconnect(),clearInterval(t(this,Et)),t(this,H).unlistenAnimationFrame())},Jt=function(){t(this,pt)&&(h(this,pt,!1),t(this,a).subscribe(t(this,Mt)),t(this,A).connect(),t(this,J).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Qt=function(){t(this,X)||(h(this,X,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,o).length?d(this,l,mt).call(this):(t(this,b).reset(),t(this,a).reset()),gt.scrollEntries.unregister(this))},Xt=function(){t(this,X)&&(h(this,X,!1),(t(this,v).current||t(this,O).current||t(this,v).current||t(this,V).current||t(this,D).current)&&d(this,l,qt).call(this),gt.scrollEntries.register(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)),d(this,l,Jt).call(this))},L=new WeakMap,Mt=new WeakMap,ae=function(e){t(this,v).current?(t(this,b).current=e%t(this,o).length,t(this,b).current=t(this,b).current<0?t(this,o).length+t(this,b).current:t(this,b).current):t(this,b).current=ce.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e=1){t(this,j).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,ct).current,this.sectionalCSSProperty.current)},te=function(e="current"){if(t(this,v).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,g)+t(this,C)+t(this,z));return i<0?t(this,g)+i+t(this,C)+t(this,z):i}else return t(this,a)[e]},st=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,b).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},ee=function(){let e=null,i=1/0;for(let r=0;r<t(this,o).length;r++){const c=Math.abs(t(this,o)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,o)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class se extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ue.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var Y,P,F,W,wt,xt,St,Vt,Bt,_t;class de extends se{constructor(){super();s(this,Y,null);s(this,P,null);s(this,F,!1);s(this,W,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,F,this.offsetWidth>this.offsetHeight);const e=t(this,F)?this.offsetWidth:this.offsetHeight;h(this,W,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,W,Math.max(t(this,W),30)),t(this,F)?(t(this,P).style.width=t(this,W)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,W)+"px"),h(this,wt,e-t(this,W)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,F)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),Le.setupDrag(c=>{const m=t(this,F)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,F)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(le.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,Y,document.createElement("slot")),t(this,Y).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Y))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Y).assignedElements()[0]||t(this,Y).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}Y=new WeakMap,P=new WeakMap,F=new WeakMap,W=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",de);class pe extends se{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class Se extends pe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Se);class fe extends pe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",fe);var U,tt,zt,Ht,Ft,Lt;class Ae{constructor(n,e,i){s(this,U,null);s(this,tt,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,tt).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,U).classList.toggle("current",t(this,tt).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,U,document.createElement("button")),h(this,tt,n),h(this,Ht,i),h(this,zt,e),t(this,U).addEventListener("click",t(this,Ft)),t(this,tt).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,U)}destroy(){t(this,U).removeEventListener("click",t(this,Ft)),t(this,tt).counter.unsubscribe(t(this,Lt)),t(this,U).remove()}}U=new WeakMap,tt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var et,kt;class me extends se{constructor(){super(...arguments);s(this,et,[]);s(this,kt,ke.debounce(()=>{t(this,et).forEach(e=>e.destroy()),h(this,et,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ae(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,et).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,et).forEach(e=>e.destroy()),h(this,et,[])}}et=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",me);class be extends De.ScrollSegmentElement{connectedCallback(){const n=ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",be);exports.ScrollBulletButtonsElement=me;exports.ScrollElement=Dt;exports.ScrollSegmentElement=be;exports.ScrollSetButtonElement=Se;exports.ScrollStepButtonElement=fe;exports.ScrollbarElement=de;
1
+ "use strict";var ye=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var ne=u=>{throw TypeError(u)};var re=(u,n,e)=>n in u?ye(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,he=(u,n)=>{for(var e in n||(n={}))Ce.call(n,e)&&re(u,e,n[e]);if(ie)for(var e of ie(n))ve.call(n,e)&&re(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||ne("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?ne("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ee=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Pe=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),le=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),ce=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),we=require("../../Damped-CTsV8tl_.cjs"),xe=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),oe=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ze=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),Le=require("../../gestures-DHLrn6Q8.cjs"),ue=require("../../dom-JBOkFLTh.cjs"),ke=require("../../function-MthRj-GJ.cjs"),De=require("../../scroll-segment/index.cjs");var f,Rt,y,it,I,$;class qe{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,it,0);s(this,I,0);s(this,$,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,it)}get position(){return t(this,I)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,it,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,I,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,I,t(this,I)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,I)+t(this,it)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,I)-t(this,y).viewportSize-e,c=t(this,I)+t(this,it)+e,m=ce.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,$)!==n&&(t(this,$)&&t(this,f).classList.remove(t(this,$)),n&&t(this,f).classList.add(n),h(this,$,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,it=new WeakMap,I=new WeakMap,$=new WeakMap;const Re=le.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,rt,x,M,T,O,D,V,N,q,v,nt,ht,ot,lt,yt,k,ct,j,R,G,B,K,ut,at,Z,J,p,Ct,o,At,It,C,g,z,A,Q,_,E,b,vt,X,dt,pt,Et,H,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ae,Pt,Tt,Yt,te,st,ee;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,rt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,M,new S.CSSProperty(this,"--direction",0));s(this,T,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,nt,new S.CSSProperty(this,"--damping",20));s(this,ht,new S.CSSProperty(this,"--mass",0));s(this,ot,new S.CSSProperty(this,"--stiffness",0));s(this,lt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,ct,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ut,new S.CSSProperty(this,"--focus-duration",3e3));s(this,at,new S.CSSProperty(this,"--disabled",!1));s(this,Z,new S.CSSProperty(this,"--hibernated",!1));s(this,J,null);s(this,p,null);s(this,Ct,null);s(this,o,[]);s(this,At,0);s(this,It,0);s(this,C,0);s(this,g,0);s(this,z,0);s(this,A,null);s(this,Q,null);s(this,_,null);s(this,E,null);s(this,b,new Ee.Store(0));s(this,vt,0);s(this,X,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,H,new xe.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,At,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,It,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,o).length){const r=t(this,q).current,c=(t(this,C)-t(this,z)*(r-1))/r;t(this,o).forEach(m=>{m.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,g,t(this,C)*t(this,T).current);const r=t(this,g)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,v).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,C),m=t(this,g)-c;h(this,X,r.position+r.size+m)}else h(this,X,t(this,g));if(t(this,D).current&&t(this,o).length){const r=t(this,o)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,vt,Math.max(0,e-t(this,g))),t(this,o).length){let i=0;for(let r=0;r<t(this,o).length;r++){const c=t(this,o)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,rt).current&&(d(this,l,Yt).call(this,Math.sign(i)||1),t(this,Tt).call(this,e,i))});s(this,Tt,(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,H).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,ee).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ut).current,easing:Pe.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!ze.device.isMobile&&!t(this,lt).current))if(t(this,D).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,C))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Re);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,J,document.createElement("div")),t(this,J).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,J).appendChild(t(this,p)),e.appendChild(t(this,J))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,rt)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,nt)}get massCSSProperty(){return t(this,ht)}get stiffnessCSSProperty(){return t(this,ot)}get mouseDragCSSProperty(){return t(this,lt)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,ct)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ut)}get disabledCSSProperty(){return t(this,at)}get hibernatedCSSProperty(){return t(this,Z)}get currentScrollValue(){return d(this,l,te).call(this,"current")}get targetScrollValue(){return d(this,l,te).call(this,"target")}get contentWrapperElement(){return t(this,J)}get contentElement(){return t(this,p)}get sections(){return t(this,o)}get position(){return t(this,At)}get contentPosition(){return t(this,It)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,o).length-t(this,q).current}get distance(){return t(this,X)}get loopDistance(){return t(this,v).current?t(this,X)+t(this,z):t(this,X)}get overscroll(){return t(this,vt)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,b).current;d(this,l,ae).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,b).current];if(c&&m){let w=0;const ft=d(this,l,ee).call(this),ge=ft?this.targetScrollValue-ft.position:0;t(this,v).current?t(this,b).current===0&&r===t(this,o).length-1?w=t(this,g)+t(this,C)-c.position+t(this,z):t(this,b).current===t(this,o).length-1&&r===0?w=m.position-(t(this,g)+t(this,C)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ge,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,l,Yt).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,H).set(t(this,a).current,{equalize:!0}),t(this,H).set(e,he({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new we.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,A,new Wt.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Pt)),h(this,Q,new Wt.KeyboardControls({element:this})),t(this,Q).changeEvent.subscribe(t(this,Pt)),h(this,_,new Wt.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,Pt)),h(this,E,new Wt.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,A).axis=t(this,N).current?"max":e,t(this,Q).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,D).subscribe(e=>{t(this,A).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,st).call(this))}),t(this,v).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,O).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,vt,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,nt).subscribe(e=>{t(this,a).damping=e.current}),t(this,ht).subscribe(e=>{t(this,a).mass=e.current}),t(this,ot).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,st).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,st).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,st).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,o).length&&d(this,l,st).call(this)}),t(this,H).subscribe(e=>{t(this,H).isRunning.current&&t(this,a).set(e.current)}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,Z).subscribe(e=>{e.current&&!e.previous?d(this,l,Qt).call(this):!e.current&&e.previous&&d(this,l,Xt).call(this)}),t(this,rt).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,N).observe(),t(this,q).observe(),t(this,v).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,lt).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,ct).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,B).observe(),t(this,K).observe(),t(this,ut).observe(),t(this,at).observe(),t(this,Z).observe(),t(this,Z).current||d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,rt).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,ct).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),t(this,Z).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,rt=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,N=new WeakMap,q=new WeakMap,v=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,yt=new WeakMap,k=new WeakMap,ct=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakMap,K=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,J=new WeakMap,p=new WeakMap,Ct=new WeakMap,o=new WeakMap,At=new WeakMap,It=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,A=new WeakMap,Q=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,vt=new WeakMap,X=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,H=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new qe(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,st).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,b).reset(),t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,dt)||(h(this,dt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Et)),t(this,H).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,Q).disconnect(),t(this,_).disconnect(),t(this,E).disconnect())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Mt)),t(this,A).connect(),t(this,Q).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,o).length?d(this,l,mt).call(this):(t(this,b).reset(),t(this,a).reset()),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),(t(this,v).current||t(this,O).current||t(this,v).current||t(this,V).current||t(this,D).current)&&d(this,l,qt).call(this),gt.scrollEntries.register(this),d(this,l,Jt).call(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Mt=new WeakMap,ae=function(e){t(this,v).current?(t(this,b).current=e%t(this,o).length,t(this,b).current=t(this,b).current<0?t(this,o).length+t(this,b).current:t(this,b).current):t(this,b).current=ce.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e=1){t(this,j).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,ct).current,this.sectionalCSSProperty.current)},te=function(e="current"){if(t(this,v).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,g)+t(this,C)+t(this,z));return i<0?t(this,g)+i+t(this,C)+t(this,z):i}else return t(this,a)[e]},st=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,b).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},ee=function(){let e=null,i=1/0;for(let r=0;r<t(this,o).length;r++){const c=Math.abs(t(this,o)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,o)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class se extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ue.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var Y,P,F,W,wt,xt,St,Vt,Bt,_t;class de extends se{constructor(){super();s(this,Y,null);s(this,P,null);s(this,F,!1);s(this,W,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,F,this.offsetWidth>this.offsetHeight);const e=t(this,F)?this.offsetWidth:this.offsetHeight;h(this,W,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,W,Math.max(t(this,W),30)),t(this,F)?(t(this,P).style.width=t(this,W)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,W)+"px"),h(this,wt,e-t(this,W)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,F)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),Le.setupDrag(c=>{const m=t(this,F)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,F)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(le.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,Y,document.createElement("slot")),t(this,Y).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Y))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Y).assignedElements()[0]||t(this,Y).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}Y=new WeakMap,P=new WeakMap,F=new WeakMap,W=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",de);class pe extends se{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class Se extends pe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Se);class fe extends pe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",fe);var U,tt,zt,Ht,Ft,Lt;class Ae{constructor(n,e,i){s(this,U,null);s(this,tt,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,tt).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,U).classList.toggle("current",t(this,tt).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,U,document.createElement("button")),h(this,tt,n),h(this,Ht,i),h(this,zt,e),t(this,U).addEventListener("click",t(this,Ft)),t(this,tt).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,U)}destroy(){t(this,U).removeEventListener("click",t(this,Ft)),t(this,tt).counter.unsubscribe(t(this,Lt)),t(this,U).remove()}}U=new WeakMap,tt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var et,kt;class me extends se{constructor(){super(...arguments);s(this,et,[]);s(this,kt,ke.debounce(()=>{t(this,et).forEach(e=>e.destroy()),h(this,et,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ae(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,et).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,et).forEach(e=>e.destroy()),h(this,et,[])}}et=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",me);class be extends De.ScrollSegmentElement{connectedCallback(){const n=ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",be);exports.ScrollBulletButtonsElement=me;exports.ScrollElement=Dt;exports.ScrollSegmentElement=be;exports.ScrollSetButtonElement=Se;exports.ScrollStepButtonElement=fe;exports.ScrollbarElement=de;
@@ -1,19 +1,19 @@
1
1
  var me = Object.defineProperty;
2
2
  var se = Object.getOwnPropertySymbols;
3
3
  var fe = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
4
- var re = (a) => {
5
- throw TypeError(a);
4
+ var re = (u) => {
5
+ throw TypeError(u);
6
6
  };
7
- var ie = (a, n, e) => n in a ? me(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, ne = (a, n) => {
7
+ var ie = (u, n, e) => n in u ? me(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, ne = (u, n) => {
8
8
  for (var e in n || (n = {}))
9
- fe.call(n, e) && ie(a, e, n[e]);
9
+ fe.call(n, e) && ie(u, e, n[e]);
10
10
  if (se)
11
11
  for (var e of se(n))
12
- be.call(n, e) && ie(a, e, n[e]);
13
- return a;
12
+ be.call(n, e) && ie(u, e, n[e]);
13
+ return u;
14
14
  };
15
- var Ut = (a, n, e) => n.has(a) || re("Cannot " + e);
16
- var t = (a, n, e) => (Ut(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ? re("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, e), h = (a, n, e, i) => (Ut(a, n, "write to private field"), i ? i.call(a, e) : n.set(a, e), e), d = (a, n, e) => (Ut(a, n, "access private method"), e);
15
+ var Ut = (u, n, e) => n.has(u) || re("Cannot " + e);
16
+ var t = (u, n, e) => (Ut(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? re("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Ut(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), d = (u, n, e) => (Ut(u, n, "access private method"), e);
17
17
  import { S as Se } from "../../Store-OTdcl6SX.js";
18
18
  import { i as qt } from "../../browser-0zX67oeU.js";
19
19
  import { p as ge } from "../../easings-BKi40vHz.js";
@@ -33,7 +33,7 @@ import { CSSProperty as m } from "../../css-property/index.js";
33
33
  import { device as Le } from "../../device/index.js";
34
34
  import { elementResizer as Nt } from "../../element-resizer/vanilla/index.js";
35
35
  import { s as ze } from "../../gestures-D2Fdra_G.js";
36
- import { f as ae } from "../../dom-0S_WDL4g.js";
36
+ import { f as ue } from "../../dom-0S_WDL4g.js";
37
37
  import { d as ke } from "../../function-C10DGppn.js";
38
38
  import { ScrollSegmentElement as De } from "../../scroll-segment/index.js";
39
39
  var f, At, v, it, T, U;
@@ -125,12 +125,12 @@ const Ie = oe({
125
125
  flexShrink: "0"
126
126
  }
127
127
  });
128
- var u, rt, P, V, R, H, D, O, G, A, C, nt, ht, ot, lt, gt, k, ct, K, I, _, B, Z, at, ut, dt, j, p, vt, o, It, Mt, y, g, L, M, J, F, E, S, yt, Q, pt, X, Ct, W, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ue, Et, Vt, Xt, Yt, st, te;
128
+ var a, rt, P, V, R, H, D, O, G, A, C, nt, ht, ot, lt, gt, k, ct, K, I, _, B, Z, ut, at, j, J, p, vt, o, It, Mt, y, g, L, M, Q, F, E, S, yt, X, dt, pt, Ct, W, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ae, Et, Vt, Xt, Yt, st, te;
129
129
  class Dt extends HTMLElement {
130
130
  constructor() {
131
131
  super();
132
132
  s(this, l);
133
- s(this, u, null);
133
+ s(this, a, null);
134
134
  s(this, rt, new m(this, "--controls", !0));
135
135
  s(this, P, new m(this, "--axis", "y"));
136
136
  s(this, V, new m(this, "--direction", 0));
@@ -183,14 +183,14 @@ class Dt extends HTMLElement {
183
183
  0
184
184
  ));
185
185
  s(this, Z, new m(this, "--focus-delay", 0));
186
- s(this, at, new m(
186
+ s(this, ut, new m(
187
187
  this,
188
188
  "--focus-duration",
189
189
  3e3
190
190
  ));
191
- s(this, ut, new m(this, "--disabled", !1));
192
- s(this, dt, new m(this, "--hibernated", !1));
193
- s(this, j, null);
191
+ s(this, at, new m(this, "--disabled", !1));
192
+ s(this, j, new m(this, "--hibernated", !1));
193
+ s(this, J, null);
194
194
  s(this, p, null);
195
195
  s(this, vt, null);
196
196
  s(this, o, []);
@@ -200,18 +200,18 @@ class Dt extends HTMLElement {
200
200
  s(this, g, 0);
201
201
  s(this, L, 0);
202
202
  s(this, M, null);
203
- s(this, J, null);
203
+ s(this, Q, null);
204
204
  s(this, F, null);
205
205
  s(this, E, null);
206
206
  s(this, S, new Se(0));
207
207
  s(this, yt, 0);
208
- s(this, Q, 0);
208
+ s(this, X, 0);
209
+ s(this, dt, !0);
209
210
  s(this, pt, !0);
210
- s(this, X, !0);
211
211
  s(this, Ct);
212
212
  s(this, W, new Ce());
213
213
  s(this, z, () => {
214
- t(this, u).unlistenAnimationFrame();
214
+ t(this, a).unlistenAnimationFrame();
215
215
  const e = this.currentScrollValue / t(this, g) || 0, i = t(this, S).current;
216
216
  if (h(this, It, this.vertical ? Kt(this) : _t(this)), h(this, Mt, this.vertical ? Kt(t(this, p)) : _t(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, he.parse(
217
217
  getComputedStyle(t(this, p)).rowGap
@@ -236,20 +236,20 @@ class Dt extends HTMLElement {
236
236
  this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, g, t(this, p).offsetHeight - t(this, y))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, g, t(this, p).offsetWidth - t(this, y)));
237
237
  if (!t(this, C).current) {
238
238
  const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
239
- h(this, g, t(this, g) + c), t(this, u).max = t(this, g);
239
+ h(this, g, t(this, g) + c), t(this, a).max = t(this, g);
240
240
  }
241
241
  if (t(this, C).current && t(this, o).length) {
242
242
  const r = t(this, o)[t(this, o).length - 1], c = r.position + r.size - t(this, y), b = t(this, g) - c;
243
- h(this, Q, r.position + r.size + b);
243
+ h(this, X, r.position + r.size + b);
244
244
  } else
245
- h(this, Q, t(this, g));
245
+ h(this, X, t(this, g));
246
246
  if (t(this, D).current && t(this, o).length) {
247
247
  const r = t(this, o)[i];
248
- t(this, u).set(r.position, {
248
+ t(this, a).set(r.position, {
249
249
  equalize: !0
250
250
  });
251
251
  } else
252
- t(this, u).set(e * t(this, g), {
252
+ t(this, a).set(e * t(this, g), {
253
253
  equalize: !0
254
254
  });
255
255
  });
@@ -284,26 +284,26 @@ class Dt extends HTMLElement {
284
284
  const r = d(this, l, te).call(this);
285
285
  r && this.scrollToSection(r.index, {
286
286
  tween: {
287
- duration: t(this, at).current,
287
+ duration: t(this, ut).current,
288
288
  easing: ge
289
289
  }
290
290
  });
291
291
  }, t(this, Z).current))), !(e === "drag" && !Le.isMobile && !t(this, lt).current))
292
292
  if (t(this, D).current) {
293
293
  const r = Math.sign(i);
294
- t(this, o).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
294
+ t(this, o).length ? this.shiftSections(r) : t(this, a).shift(r * t(this, y));
295
295
  } else
296
- t(this, u).shift(i);
296
+ t(this, a).shift(i);
297
297
  });
298
298
  if (qt) {
299
299
  const e = this.attachShadow({ mode: "open" });
300
300
  e.adoptedStyleSheets.push(Ie);
301
301
  const i = document.createElement("div");
302
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, j, document.createElement("div")), t(this, j).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, vt, document.createElement("slot")), t(this, p).appendChild(t(this, vt)), t(this, j).appendChild(t(this, p)), e.appendChild(t(this, j));
302
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, J, document.createElement("div")), t(this, J).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, vt, document.createElement("slot")), t(this, p).appendChild(t(this, vt)), t(this, J).appendChild(t(this, p)), e.appendChild(t(this, J));
303
303
  }
304
304
  }
305
305
  get damped() {
306
- return t(this, u);
306
+ return t(this, a);
307
307
  }
308
308
  get controlsCSSProperty() {
309
309
  return t(this, rt);
@@ -372,13 +372,13 @@ class Dt extends HTMLElement {
372
372
  return t(this, Z);
373
373
  }
374
374
  get focusDurationCSSProperty() {
375
- return t(this, at);
375
+ return t(this, ut);
376
376
  }
377
377
  get disabledCSSProperty() {
378
- return t(this, ut);
378
+ return t(this, at);
379
379
  }
380
380
  get hibernatedCSSProperty() {
381
- return t(this, dt);
381
+ return t(this, j);
382
382
  }
383
383
  get currentScrollValue() {
384
384
  return d(this, l, Yt).call(this, "current");
@@ -387,7 +387,7 @@ class Dt extends HTMLElement {
387
387
  return d(this, l, Yt).call(this, "target");
388
388
  }
389
389
  get contentWrapperElement() {
390
- return t(this, j);
390
+ return t(this, J);
391
391
  }
392
392
  get contentElement() {
393
393
  return t(this, p);
@@ -417,10 +417,10 @@ class Dt extends HTMLElement {
417
417
  return t(this, o).length - t(this, A).current;
418
418
  }
419
419
  get distance() {
420
- return t(this, Q);
420
+ return t(this, X);
421
421
  }
422
422
  get loopDistance() {
423
- return t(this, C).current ? t(this, Q) + t(this, L) : t(this, Q);
423
+ return t(this, C).current ? t(this, X) + t(this, L) : t(this, X);
424
424
  }
425
425
  get overscroll() {
426
426
  return t(this, yt);
@@ -435,16 +435,16 @@ class Dt extends HTMLElement {
435
435
  return this.targetScrollValue / this.loopDistance || 0;
436
436
  }
437
437
  get scrollWidth() {
438
- return t(this, P).current === "y" ? 0 : t(this, u).distance;
438
+ return t(this, P).current === "y" ? 0 : t(this, a).distance;
439
439
  }
440
440
  get scrollHeight() {
441
- return t(this, P).current === "x" ? 0 : t(this, u).distance;
441
+ return t(this, P).current === "x" ? 0 : t(this, a).distance;
442
442
  }
443
443
  onScroll(...e) {
444
- return t(this, u).subscribe(...e);
444
+ return t(this, a).subscribe(...e);
445
445
  }
446
446
  offScroll(...e) {
447
- t(this, u).unsubscribe(...e);
447
+ t(this, a).unsubscribe(...e);
448
448
  }
449
449
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
450
450
  range(e, i, r = 0) {
@@ -462,7 +462,7 @@ class Dt extends HTMLElement {
462
462
  if (!t(this, o).length)
463
463
  return;
464
464
  const r = t(this, S).current;
465
- d(this, l, ue).call(this, e);
465
+ d(this, l, ae).call(this, e);
466
466
  const c = t(this, o)[r], b = t(this, o)[t(this, S).current];
467
467
  if (c && b) {
468
468
  let w = 0;
@@ -474,26 +474,26 @@ class Dt extends HTMLElement {
474
474
  t(this, o).length && this.scrollToSection(t(this, S).current + e, i);
475
475
  }
476
476
  setPosition(e, i) {
477
- d(this, l, Xt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this, W).set(t(this, u).current, { equalize: !0 }), t(this, W).set(e, ne({}, i.tween))) : t(this, u).set(e, {
477
+ d(this, l, Xt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this, W).set(t(this, a).current, { equalize: !0 }), t(this, W).set(e, ne({}, i.tween))) : t(this, a).set(e, {
478
478
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
479
479
  });
480
480
  }
481
481
  shiftPosition(e, i) {
482
- this.setPosition(t(this, u).target + e, i);
482
+ this.setPosition(t(this, a).target + e, i);
483
483
  }
484
484
  connectedCallback() {
485
- h(this, u, new ye(0, {
485
+ h(this, a, new ye(0, {
486
486
  damping: 0.01,
487
487
  min: 0,
488
488
  order: ve.SCROLL
489
- })), this.setAttribute("tabindex", "0"), h(this, M, new Ee({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Et)), h(this, J, new xe({
489
+ })), this.setAttribute("tabindex", "0"), h(this, M, new Ee({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Et)), h(this, Q, new xe({
490
490
  element: this
491
- })), t(this, J).changeEvent.subscribe(
491
+ })), t(this, Q).changeEvent.subscribe(
492
492
  t(this, Et)
493
493
  ), h(this, F, new we({ element: t(this, p) })), t(this, F).changeEvent.subscribe(t(this, Et)), h(this, E, new Pe({
494
494
  culling: this
495
495
  })), t(this, E).changeEvent.subscribe(t(this, Vt)), t(this, P).subscribe(({ current: e }) => {
496
- t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, G).current ? "max" : e, t(this, J).dimension = e === "x" ? "width" : "height", t(this, F).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
496
+ t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, G).current ? "max" : e, t(this, Q).dimension = e === "x" ? "width" : "height", t(this, F).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
497
497
  }), t(this, G).subscribe((e) => {
498
498
  t(this, M).axis = e.current ? "max" : t(this, P).current;
499
499
  }), t(this, R).subscribe(() => {
@@ -507,17 +507,13 @@ class Dt extends HTMLElement {
507
507
  }), t(this, A).subscribe((e) => {
508
508
  this.isConnected && (t(this, z).call(this), d(this, l, st).call(this));
509
509
  }), t(this, C).subscribe((e) => {
510
- e.current ? (this.isConnected && (t(this, o).length || (t(this, H).current = !0)), t(this, o).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, yt, 0), t(this, u).max = t(this, g), t(this, u).min = 0);
510
+ e.current ? (this.isConnected && (t(this, o).length || (t(this, H).current = !0)), t(this, o).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (h(this, yt, 0), t(this, a).max = t(this, g), t(this, a).min = 0);
511
511
  }), t(this, nt).subscribe((e) => {
512
- t(this, u).damping = e.current;
512
+ t(this, a).damping = e.current;
513
513
  }), t(this, ht).subscribe((e) => {
514
- t(this, u).mass = e.current;
514
+ t(this, a).mass = e.current;
515
515
  }), t(this, ot).subscribe((e) => {
516
- t(this, u).stiffness = e.current;
517
- }), t(this, ut).subscribe((e) => {
518
- e.current && !e.previous ? d(this, l, Zt).call(this) : !e.current && e.previous && d(this, l, jt).call(this);
519
- }), t(this, dt).subscribe((e) => {
520
- e.current && !e.previous ? d(this, l, Jt).call(this) : !e.current && e.previous && d(this, l, Qt).call(this);
516
+ t(this, a).stiffness = e.current;
521
517
  }), t(this, k).subscribe((e) => {
522
518
  t(this, E).speed = e.current, e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
523
519
  }), t(this, K).subscribe((e) => {
@@ -528,19 +524,23 @@ class Dt extends HTMLElement {
528
524
  this.isConnected && t(this, I).current && d(this, l, st).call(this);
529
525
  }), t(this, B).subscribe((e) => {
530
526
  this.isConnected && t(this, I).current && d(this, l, st).call(this);
531
- }), t(this, u).isRunning.subscribe((e) => {
527
+ }), t(this, a).isRunning.subscribe((e) => {
532
528
  this.classList.toggle("active", e.current);
533
529
  }), t(this, S).subscribe((e) => {
534
530
  t(this, o).length && d(this, l, st).call(this);
535
531
  }), t(this, W).subscribe((e) => {
536
- t(this, W).isRunning.current && t(this, u).set(e.current);
537
- }), t(this, rt).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, H).observe(), t(this, D).observe(), t(this, O).observe(), t(this, G).observe(), t(this, A).observe(), t(this, C).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, ct).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, at).observe(), t(this, ut).observe(), t(this, dt).observe(), t(this, X) || d(this, l, Qt).call(this);
532
+ t(this, W).isRunning.current && t(this, a).set(e.current);
533
+ }), t(this, at).subscribe((e) => {
534
+ e.current && !e.previous ? d(this, l, Zt).call(this) : !e.current && e.previous && d(this, l, jt).call(this);
535
+ }), t(this, j).subscribe((e) => {
536
+ e.current && !e.previous ? d(this, l, Jt).call(this) : !e.current && e.previous && d(this, l, Qt).call(this);
537
+ }), t(this, rt).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, H).observe(), t(this, D).observe(), t(this, O).observe(), t(this, G).observe(), t(this, A).observe(), t(this, C).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, ct).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, j).observe(), t(this, j).current || d(this, l, Qt).call(this);
538
538
  }
539
539
  disconnectedCallback() {
540
- this.setAttribute("tabindex", ""), t(this, rt).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, D).unobserve(), t(this, O).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, C).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, lt).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, ct).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), t(this, dt).unobserve(), d(this, l, Jt).call(this);
540
+ this.setAttribute("tabindex", ""), t(this, rt).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, D).unobserve(), t(this, O).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, C).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, lt).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, ct).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, ut).unobserve(), t(this, at).unobserve(), t(this, j).unobserve(), d(this, l, Jt).call(this);
541
541
  }
542
542
  }
543
- u = new WeakMap(), rt = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), H = new WeakMap(), D = new WeakMap(), O = new WeakMap(), G = new WeakMap(), A = new WeakMap(), C = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), ct = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), dt = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), g = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), F = new WeakMap(), E = new WeakMap(), S = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), pt = new WeakMap(), X = new WeakMap(), Ct = new WeakMap(), W = new WeakMap(), l = new WeakSet(), kt = function() {
543
+ a = new WeakMap(), rt = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), H = new WeakMap(), D = new WeakMap(), O = new WeakMap(), G = new WeakMap(), A = new WeakMap(), C = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), ct = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), j = new WeakMap(), J = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), g = new WeakMap(), L = new WeakMap(), M = new WeakMap(), Q = new WeakMap(), F = new WeakMap(), E = new WeakMap(), S = new WeakMap(), yt = new WeakMap(), X = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), W = new WeakMap(), l = new WeakSet(), kt = function() {
544
544
  d(this, l, bt).call(this), t(this, vt).assignedElements().forEach((e, i) => {
545
545
  e instanceof HTMLElement && t(this, o).push(new Ae(e, i, this));
546
546
  }), t(this, p).style.transform = "", Gt(this, "scrollSectionsChange", {
@@ -550,19 +550,19 @@ u = new WeakMap(), rt = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
550
550
  }, bt = function() {
551
551
  t(this, o).forEach((e) => {
552
552
  e.destroy();
553
- }), h(this, o, []), t(this, S).reset(), t(this, u).reset(), Gt(this, "scrollSectionsChange", {
553
+ }), h(this, o, []), t(this, S).reset(), t(this, a).reset(), Gt(this, "scrollSectionsChange", {
554
554
  custom: !0,
555
555
  composed: !0
556
556
  });
557
557
  }, Zt = function() {
558
- t(this, pt) || (h(this, pt, !0), t(this, u).unsubscribe(t(this, Tt)), t(this, u).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, J).disconnect(), t(this, F).disconnect(), t(this, E).disconnect(), clearInterval(t(this, Ct)), t(this, W).unlistenAnimationFrame());
558
+ t(this, dt) || (h(this, dt, !0), t(this, a).unsubscribe(t(this, Tt)), t(this, a).unlistenAnimationFrame(), clearInterval(t(this, Ct)), t(this, W).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, Q).disconnect(), t(this, F).disconnect(), t(this, E).disconnect());
559
559
  }, jt = function() {
560
- t(this, pt) && (h(this, pt, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, J).connect(), t(this, F).connect(), t(this, k).current && t(this, E).connect());
560
+ t(this, dt) && (h(this, dt, !1), t(this, a).subscribe(t(this, Tt)), t(this, M).connect(), t(this, Q).connect(), t(this, F).connect(), t(this, k).current && t(this, E).connect());
561
561
  }, Jt = function() {
562
- t(this, X) || (h(this, X, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, o).length ? d(this, l, bt).call(this) : (t(this, S).reset(), t(this, u).reset()), St.unregister(this));
562
+ t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, o).length ? d(this, l, bt).call(this) : (t(this, S).reset(), t(this, a).reset()), St.unregister(this));
563
563
  }, Qt = function() {
564
- t(this, X) && (h(this, X, !1), (t(this, C).current || t(this, H).current || t(this, C).current || t(this, O).current || t(this, D).current) && d(this, l, kt).call(this), St.register(this), $t.subscribe(t(this, z), ce.SCROLL), Nt.subscribe(this, t(this, z)), d(this, l, jt).call(this));
565
- }, z = new WeakMap(), Tt = new WeakMap(), ue = function(e) {
564
+ t(this, pt) && (h(this, pt, !1), (t(this, C).current || t(this, H).current || t(this, C).current || t(this, O).current || t(this, D).current) && d(this, l, kt).call(this), St.register(this), d(this, l, jt).call(this), $t.subscribe(t(this, z), ce.SCROLL), Nt.subscribe(this, t(this, z)));
565
+ }, z = new WeakMap(), Tt = new WeakMap(), ae = function(e) {
566
566
  t(this, C).current ? (t(this, S).current = e % t(this, o).length, t(this, S).current = t(this, S).current < 0 ? t(this, o).length + t(this, S).current : t(this, S).current) : t(this, S).current = le(e, 0, this.limit);
567
567
  }, Et = new WeakMap(), Vt = new WeakMap(), Xt = function(e = 1) {
568
568
  t(this, K).current && (t(this, E).direction = e), t(this, k).current && t(this, E).pauseAndContinue(
@@ -571,10 +571,10 @@ u = new WeakMap(), rt = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
571
571
  );
572
572
  }, Yt = function(e = "current") {
573
573
  if (t(this, C).current && t(this, o).length) {
574
- const i = t(this, u)[e] % (t(this, g) + t(this, y) + t(this, L));
574
+ const i = t(this, a)[e] % (t(this, g) + t(this, y) + t(this, L));
575
575
  return i < 0 ? t(this, g) + i + t(this, y) + t(this, L) : i;
576
576
  } else
577
- return t(this, u)[e];
577
+ return t(this, a)[e];
578
578
  }, st = function() {
579
579
  if (t(this, I).current && t(this, o).length) {
580
580
  const e = t(this, S).current + t(this, _).current;
@@ -604,7 +604,7 @@ class ee extends HTMLElement {
604
604
  return t(this, Rt);
605
605
  }
606
606
  connectedCallback() {
607
- const e = ae(this, Dt);
607
+ const e = ue(this, Dt);
608
608
  e instanceof Dt ? h(this, Rt, e) : console.error(this, "e-scroll not found");
609
609
  }
610
610
  }
@@ -774,7 +774,7 @@ et = new WeakMap(), zt = new WeakMap();
774
774
  customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", He);
775
775
  class Oe extends De {
776
776
  connectedCallback() {
777
- const n = ae(this, Dt);
777
+ const n = ue(this, Dt);
778
778
  n instanceof Dt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
779
779
  "scrollSectionsChange",
780
780
  this.findAnotherScrollEntries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.30.11",
3
+ "version": "0.30.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"