aptechka 0.30.4 → 0.30.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ export declare class ScrollElement extends HTMLElement {
46
46
  get hibernatedCSSProperty(): CSSProperty<boolean>;
47
47
  get currentScrollValue(): number;
48
48
  get targetScrollValue(): number;
49
+ get contentWrapperElement(): HTMLElement;
49
50
  get contentElement(): HTMLElement;
50
51
  get sections(): ScrollSection[];
51
52
  get position(): number;
@@ -1 +1 @@
1
- "use strict";var me=Object.defineProperty;var ee=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var ie=u=>{throw TypeError(u)};var se=(u,n,e)=>n in u?me(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,re=(u,n)=>{for(var e in n||(n={}))ge.call(n,e)&&se(u,e,n[e]);if(ee)for(var e of ee(n))ye.call(n,e)&&se(u,e,n[e]);return u};var Nt=(u,n,e)=>n.has(u)||ie("Cannot "+e);var t=(u,n,e)=>(Nt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?ie("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(Nt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(Nt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("../../Store-CDb6RMce.cjs"),$t=require("../../browser-CpzFX2xg.cjs"),ve=require("../../easings-DsS5-Kqc.cjs"),jt=require("../../events-KVanG9sR.cjs"),he=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),oe=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Gt=require("../../order/index.cjs"),Ee=require("../../Damped-CTsV8tl_.cjs"),Pe=require("../../Tweened-BttGiyB0.cjs"),Ft=require("../../controls/index.cjs"),Wt=require("../../window-resizer/vanilla/index.cjs"),mt=require("../../scroll-entries/index.cjs"),ne=require("../../css-unit-parser/index.cjs"),p=require("../../css-property/index.cjs"),xe=require("../../device/index.cjs"),Ut=require("../../element-resizer/vanilla/index.cjs"),we=require("../../gestures-DHLrn6Q8.cjs"),le=require("../../dom-JBOkFLTh.cjs"),ze=require("../../function-MthRj-GJ.cjs"),Le=require("../../scroll-segment/index.cjs");var f,qt,y,et,A,U;class ke{constructor(n,e,i){s(this,f);s(this,qt);s(this,y);s(this,et,0);s(this,A,0);s(this,U,null);h(this,f,n),h(this,qt,e),h(this,y,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,qt)}get size(){return t(this,et)}get position(){return t(this,A)}destroy(){mt.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,et,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,et)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),mt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,et)+e,b=oe.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),jt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,qt=new WeakMap,y=new WeakMap,et=new WeakMap,A=new WeakMap,U=new WeakMap;const De=he.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":{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,st,w,M,T,k,O,$,N,D,E,it,rt,nt,ht,gt,q,ot,j,R,G,V,K,lt,ct,ut,S,yt,o,Rt,It,C,m,z,I,Z,B,v,g,Ct,J,at,dt,vt,_,l,Dt,ft,Kt,Zt,Jt,Qt,L,At,ce,Et,Mt,Xt,tt,Yt;class kt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,st,new p.CSSProperty(this,"--controls",!0));s(this,w,new p.CSSProperty(this,"--axis","y"));s(this,M,new p.CSSProperty(this,"--direction",0));s(this,T,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,k,new p.CSSProperty(this,"--split",!1));s(this,O,new p.CSSProperty(this,"--sectional",!1));s(this,$,new p.CSSProperty(this,"--auto-size",!1));s(this,N,new p.CSSProperty(this,"--wheel-max-delta",!1));s(this,D,new p.CSSProperty(this,"--sections-in-view",1));s(this,E,new p.CSSProperty(this,"--loop",!1));s(this,it,new p.CSSProperty(this,"--damping",20));s(this,rt,new p.CSSProperty(this,"--mass",0));s(this,nt,new p.CSSProperty(this,"--stiffness",0));s(this,ht,new p.CSSProperty(this,"--mouse-drag",!1));s(this,gt,new p.CSSProperty(this,"--section-distance-scale",.5));s(this,q,new p.CSSProperty(this,"--autoplay",0));s(this,ot,new p.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new p.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new p.CSSProperty(this,"--classes",!1));s(this,G,new p.CSSProperty(this,"--current-index-start-offset",0));s(this,V,new p.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new p.CSSProperty(this,"--focus-delay",0));s(this,lt,new p.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new p.CSSProperty(this,"--disabled",!1));s(this,ut,new p.CSSProperty(this,"--hibernated",!1));s(this,S,null);s(this,yt,null);s(this,o,[]);s(this,Rt,0);s(this,It,0);s(this,C,0);s(this,m,0);s(this,z,0);s(this,I,null);s(this,Z,null);s(this,B,null);s(this,v,null);s(this,g,new Ce.Store(0));s(this,Ct,0);s(this,J,0);s(this,at,!0);s(this,dt,!0);s(this,vt);s(this,_,new Pe.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,g).current;if(h(this,Rt,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,It,this.vertical?bt.getCumulativeOffsetTop(t(this,S)):bt.getCumulativeOffsetLeft(t(this,S))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,ne.cssUnitParser.parse(getComputedStyle(t(this,S)).rowGap)):h(this,z,ne.cssUnitParser.parse(getComputedStyle(t(this,S)).columnGap)),t(this,$).current&&t(this,o).length){const r=t(this,D).current,c=(t(this,C)-t(this,z)*(r-1))/r;t(this,o).forEach(b=>{b.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,m,t(this,C)*t(this,T).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,S).style.width=r+"px",t(this,S).style.height="100%"):(t(this,S).style.height=r+"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,m,t(this,S).offsetHeight-t(this,C))):(t(this,S).style.width="max-content",t(this,S).style.height="100%",h(this,m,t(this,S).offsetWidth-t(this,C)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+c),t(this,a).max=t(this,m)}if(t(this,E).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,C),b=t(this,m)-c;h(this,J,r.position+r.size+b)}else h(this,J,t(this,m));if(t(this,O).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,m),{equalize:!0})});s(this,At,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,m))),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,g).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)`;mt.scrollEntries.update(this,t(this,w).current,e)});s(this,Et,(e,i)=>{t(this,st).current&&(t(this,j).current&&(t(this,v).pauseAndContinue(t(this,ot).current),t(this,v).direction=Math.sign(i)||1),t(this,Mt).call(this,e,i))});s(this,Mt,(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,_).unlistenAnimationFrame(),!t(this,q).current&&t(this,K).current&&(clearInterval(t(this,vt)),h(this,vt,setTimeout(()=>{const r=d(this,l,Yt).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,lt).current,easing:ve.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!xe.device.isMobile&&!t(this,ht).current))if(t(this,O).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($t.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(De);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,S,document.createElement("div")),t(this,S).className="content",h(this,yt,document.createElement("slot")),t(this,S).appendChild(t(this,yt)),e.appendChild(t(this,S))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,st)}get axisCSSProperty(){return t(this,w)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,k)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,it)}get massCSSProperty(){return t(this,rt)}get stiffnessCSSProperty(){return t(this,nt)}get mouseDragCSSProperty(){return t(this,ht)}get sectionDistanceScaleCSSProperty(){return t(this,gt)}get autoplayCSSProperty(){return t(this,q)}get autoplayPauseDurationCSSProperty(){return t(this,ot)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return d(this,l,Xt).call(this,"current")}get targetScrollValue(){return d(this,l,Xt).call(this,"target")}get contentElement(){return t(this,S)}get sections(){return t(this,o)}get position(){return t(this,Rt)}get contentPosition(){return t(this,It)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,o).length-t(this,D).current}get distance(){return t(this,J)}get loopDistance(){return t(this,E).current?t(this,J)+t(this,z):t(this,J)}get overscroll(){return t(this,Ct)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).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,b=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>b?1:(this.currentProgress-c)/(b-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,b=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,g).current;d(this,l,ce).call(this,e);const c=t(this,o)[r],b=t(this,o)[t(this,g).current];if(c&&b){let x=0;const pt=d(this,l,Yt).call(this),be=pt?this.targetScrollValue-pt.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,o).length-1?x=t(this,m)+t(this,C)-c.position+t(this,z):t(this,g).current===t(this,o).length-1&&r===0?x=b.position-(t(this,m)+t(this,C)+t(this,z)):x=b.position-c.position:x=b.position-c.position,this.shiftPosition(x-be,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,re({},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 Ee.Damped(0,{damping:.01,min:0,order:Gt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,I,new Ft.WheelControls({element:t(this,S)})),t(this,I).changeEvent.subscribe(t(this,Et)),h(this,Z,new Ft.KeyboardControls({element:this})),t(this,Z).changeEvent.subscribe(t(this,Et)),h(this,B,new Ft.DragControls({element:t(this,S)})),t(this,B).changeEvent.subscribe(t(this,Et)),h(this,v,new Ft.AutoplayControls({culling:this})),t(this,v).changeEvent.subscribe(t(this,Mt)),t(this,w).subscribe(({current:e})=>{t(this,S).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,N).current?"max":e,t(this,Z).dimension=e==="x"?"width":"height",t(this,B).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,I).axis=e.current?"max":t(this,w).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,k).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,Dt).call(this):d(this,l,ft).call(this))}),t(this,O).subscribe(e=>{t(this,I).debounce=e.current,t(this,B).swipe=e.current,t(this,v).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,Dt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,ft).call(this))}),t(this,$).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,Dt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,ft).call(this))}),t(this,D).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,tt).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,k).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,it).subscribe(e=>{t(this,a).damping=e.current}),t(this,rt).subscribe(e=>{t(this,a).mass=e.current}),t(this,nt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ct).subscribe(e=>{e.current&&!e.previous?d(this,l,Kt).call(this):!e.current&&e.previous&&d(this,l,Zt).call(this)}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,l,Jt).call(this):!e.current&&e.previous&&d(this,l,Qt).call(this)}),t(this,q).subscribe(e=>{t(this,v).speed=e.current,e.current&&!e.previous?t(this,v).connect():!e.current&&e.previous&&t(this,v).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,v).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,tt).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,tt).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,tt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,o).length&&d(this,l,tt).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,st).observe(),t(this,w).observe(),t(this,M).observe(),t(this,T).observe(),t(this,k).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,D).observe(),t(this,E).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,gt).observe(),t(this,q).observe(),t(this,q).observe(),t(this,ot).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,ut).observe(),d(this,l,Qt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,st).unobserve(),t(this,w).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,k).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,D).unobserve(),t(this,E).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,gt).unobserve(),t(this,q).unobserve(),t(this,ot).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),d(this,l,Jt).call(this)}}a=new WeakMap,st=new WeakMap,w=new WeakMap,M=new WeakMap,T=new WeakMap,k=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,D=new WeakMap,E=new WeakMap,it=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,gt=new WeakMap,q=new WeakMap,ot=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,S=new WeakMap,yt=new WeakMap,o=new WeakMap,Rt=new WeakMap,It=new WeakMap,C=new WeakMap,m=new WeakMap,z=new WeakMap,I=new WeakMap,Z=new WeakMap,B=new WeakMap,v=new WeakMap,g=new WeakMap,Ct=new WeakMap,J=new WeakMap,at=new WeakMap,dt=new WeakMap,vt=new WeakMap,_=new WeakMap,l=new WeakSet,Dt=function(){d(this,l,ft).call(this),t(this,yt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new ke(e,i,this))}),t(this,S).style.transform="",jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,tt).call(this)},ft=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,g).current=0,t(this,a).reset(),jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Kt=function(){t(this,at)||(h(this,at,!0),t(this,a).unsubscribe(t(this,At)),t(this,a).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,Z).disconnect(),t(this,B).disconnect(),t(this,v).disconnect(),clearInterval(t(this,vt)),t(this,_).unlistenAnimationFrame())},Zt=function(){t(this,at)&&(h(this,at,!1),t(this,a).subscribe(t(this,At)),t(this,I).connect(),t(this,Z).connect(),t(this,B).connect(),t(this,q).current&&t(this,v).connect())},Jt=function(){t(this,dt)||(h(this,dt,!0),Wt.windowResizer.unsubscribe(t(this,L)),Ut.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,l,Kt).call(this),t(this,S).style.transform="",t(this,k).current&&d(this,l,ft).call(this),mt.scrollEntries.unregister(this))},Qt=function(){t(this,dt)&&(h(this,dt,!1),t(this,k).current&&d(this,l,Dt).call(this),mt.scrollEntries.register(this),Wt.windowResizer.subscribe(t(this,L),Gt.RESIZE_ORDER.SCROLL),Ut.elementResizer.subscribe(this,t(this,L)),d(this,l,Zt).call(this))},L=new WeakMap,At=new WeakMap,ce=function(e){t(this,E).current?(t(this,g).current=e%t(this,o).length,t(this,g).current=t(this,g).current<0?t(this,o).length+t(this,g).current:t(this,g).current):t(this,g).current=oe.clamp(e,0,this.limit)},Et=new WeakMap,Mt=new WeakMap,Xt=function(e="current"){if(t(this,E).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,m)+t(this,C)+t(this,z));return i<0?t(this,m)+i+t(this,C)+t(this,z):i}else return t(this,a)[e]},tt=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,g).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,D).current+t(this,V).current;t(this,o).forEach((r,c)=>{const b=e-this.limit-1+t(this,V).current,x=e+i,pt=this.sections.length-x;c>=e&&c<x||c<=b?r.mark("current"):c>=x&&c<x+pt/2||c<=b+i?r.mark("next"):r.mark("previous")})}},Yt=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",kt);var Tt;class te extends HTMLElement{constructor(){super(...arguments);s(this,Tt,null)}get scrollElement(){return t(this,Tt)}connectedCallback(){const e=le.findParentElement(this,kt);e instanceof kt?h(this,Tt,e):console.error(this,"e-scroll not found")}}Tt=new WeakMap;var Q,P,H,F,Pt,xt,St,Ot,Vt,Bt;class ue extends te{constructor(){super();s(this,Q,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,Pt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,Pt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Ot,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,Pt)),t(this,H)?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,Vt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Bt,e=>{document.documentElement.classList.add("grabbing"),we.setupDrag(c=>{const b=t(this,H)?c.x:c.y,x=this.scrollElement.distance/t(this,Pt),pt=(b-r)*x;this.scrollElement.setPosition(i+pt)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,H)?e.x:e.y});if($t.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(he.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,Q,document.createElement("slot")),t(this,Q).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Q))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Q).assignedElements()[0]||t(this,Q).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,Bt)),Wt.windowResizer.subscribe(t(this,St),Gt.RESIZE_ORDER.SCROLL),Ut.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Ot)),this.scrollElement.axisCSSProperty.subscribe(t(this,Vt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,Bt)),Wt.windowResizer.unsubscribe(t(this,St)),Ut.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ot)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Vt))}}Q=new WeakMap,P=new WeakMap,H=new WeakMap,F=new WeakMap,Pt=new WeakMap,xt=new WeakMap,St=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,Bt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ue);class ae extends te{constructor(){super(),$t.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class de extends ae{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",de);class Se extends ae{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",Se);var W,X,wt,_t,Ht,zt;class qe{constructor(n,e,i){s(this,W,null);s(this,X,null);s(this,wt,null);s(this,_t,null);s(this,Ht,()=>{t(this,X).scrollToSection(t(this,wt),{behaviour:t(this,_t)})});s(this,zt,()=>{t(this,W).classList.toggle("current",t(this,X).counter.current===t(this,wt))});$t.isBrowser&&(h(this,W,document.createElement("button")),h(this,X,n),h(this,_t,i),h(this,wt,e),t(this,W).addEventListener("click",t(this,Ht)),t(this,X).counter.subscribe(t(this,zt)),t(this,zt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ht)),t(this,X).counter.unsubscribe(t(this,zt)),t(this,W).remove()}}W=new WeakMap,X=new WeakMap,wt=new WeakMap,_t=new WeakMap,Ht=new WeakMap,zt=new WeakMap;var Y,Lt;class pe extends te{constructor(){super(...arguments);s(this,Y,[]);s(this,Lt,ze.debounce(()=>{t(this,Y).forEach(e=>e.destroy()),h(this,Y,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new qe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,Y).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Lt)),t(this,Lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Lt)),t(this,Y).forEach(e=>e.destroy()),h(this,Y,[])}}Y=new WeakMap,Lt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",pe);class fe extends Le.ScrollSegmentElement{connectedCallback(){const n=le.findParentElement(this,kt);n instanceof kt?(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",fe);exports.ScrollBulletButtonsElement=pe;exports.ScrollElement=kt;exports.ScrollSegmentElement=fe;exports.ScrollSetButtonElement=de;exports.ScrollStepButtonElement=Se;exports.ScrollbarElement=ue;
1
+ "use strict";var ge=Object.defineProperty;var se=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var re=u=>{throw TypeError(u)};var ie=(u,n,e)=>n in u?ge(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,ne=(u,n)=>{for(var e in n||(n={}))ye.call(n,e)&&ie(u,e,n[e]);if(se)for(var e of se(n))ve.call(n,e)&&ie(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||re("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)?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)=>(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 Ce=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Ee=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),oe=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),le=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),Pe=require("../../Damped-CTsV8tl_.cjs"),we=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),he=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),xe=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),ze=require("../../gestures-DHLrn6Q8.cjs"),ce=require("../../dom-JBOkFLTh.cjs"),Le=require("../../function-MthRj-GJ.cjs"),ke=require("../../scroll-segment/index.cjs");var f,Rt,y,st,A,U;class De{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,st,0);s(this,A,0);s(this,U,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,st)}get position(){return t(this,A)}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,st,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,st)<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,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,st)+e,m=le.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,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,st=new WeakMap,A=new WeakMap,U=new WeakMap;const qe=oe.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,it,x,M,T,D,O,$,N,q,E,rt,nt,ht,ot,yt,k,lt,j,R,G,V,K,ct,ut,at,Z,p,vt,o,It,At,v,b,z,I,J,B,C,g,Ct,Q,dt,pt,Et,_,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ue,Pt,Tt,Yt,et,te;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,it,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,D,new S.CSSProperty(this,"--split",!1));s(this,O,new S.CSSProperty(this,"--sectional",!1));s(this,$,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,E,new S.CSSProperty(this,"--loop",!1));s(this,rt,new S.CSSProperty(this,"--damping",20));s(this,nt,new S.CSSProperty(this,"--mass",0));s(this,ht,new S.CSSProperty(this,"--stiffness",0));s(this,ot,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,lt,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,V,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ct,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,vt,null);s(this,o,[]);s(this,It,0);s(this,At,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,I,null);s(this,J,null);s(this,B,null);s(this,C,null);s(this,g,new Ce.Store(0));s(this,Ct,0);s(this,Q,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,_,new we.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,It,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,At,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,$).current&&t(this,o).length){const r=t(this,q).current,c=(t(this,v)-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,b,t(this,v)*t(this,T).current);const r=t(this,b)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,b,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,b,t(this,p).offsetWidth-t(this,v)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,E).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,v),m=t(this,b)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,b));if(t(this,O).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,b),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,b))),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,g).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,it).current&&(t(this,j).current&&(t(this,C).direction=Math.sign(i)||1),t(this,k).current&&t(this,C).pauseAndContinue(t(this,lt).current),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,_).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,te).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ct).current,easing:Ee.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!xe.device.isMobile&&!t(this,ot).current))if(t(this,O).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(qe);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,vt,document.createElement("slot")),t(this,p).appendChild(t(this,vt)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,it)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,D)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,rt)}get massCSSProperty(){return t(this,nt)}get stiffnessCSSProperty(){return t(this,ht)}get mouseDragCSSProperty(){return t(this,ot)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,lt)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ct)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return d(this,l,Yt).call(this,"current")}get targetScrollValue(){return d(this,l,Yt).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,It)}get contentPosition(){return t(this,At)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,o).length-t(this,q).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,E).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,Ct)}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,g).current;d(this,l,ue).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,g).current];if(c&&m){let w=0;const ft=d(this,l,te).call(this),be=ft?this.targetScrollValue-ft.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,o).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,o).length-1&&r===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-be,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,ne({},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 Pe.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,I,new Wt.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,B,new Wt.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Pt)),h(this,C,new Wt.AutoplayControls({culling:this})),t(this,C).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,B).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,I).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,D).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,O).subscribe(e=>{t(this,I).debounce=e.current,t(this,B).swipe=e.current,t(this,C).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,$).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,et).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,D).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,rt).subscribe(e=>{t(this,a).damping=e.current}),t(this,nt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ht).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,at).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,C).speed=e.current,e.current&&!e.previous?t(this,C).connect():!e.current&&e.previous&&t(this,C).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,C).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,et).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,o).length&&d(this,l,et).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,it).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,D).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,q).observe(),t(this,E).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,lt).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,it).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,D).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,E).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,lt).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,it=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,D=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,q=new WeakMap,E=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,yt=new WeakMap,k=new WeakMap,lt=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,p=new WeakMap,vt=new WeakMap,o=new WeakMap,It=new WeakMap,At=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,I=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,g=new WeakMap,Ct=new WeakMap,Q=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,_=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new De(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,et).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,g).current=0,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(),t(this,I).disconnect(),t(this,J).disconnect(),t(this,B).disconnect(),t(this,C).disconnect(),clearInterval(t(this,Et)),t(this,_).unlistenAnimationFrame())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Mt)),t(this,I).connect(),t(this,J).connect(),t(this,B).connect(),t(this,k).current&&t(this,C).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,D).current&&d(this,l,mt).call(this),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),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,ue=function(e){t(this,E).current?(t(this,g).current=e%t(this,o).length,t(this,g).current=t(this,g).current<0?t(this,o).length+t(this,g).current:t(this,g).current):t(this,g).current=le.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e="current"){if(t(this,E).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},et=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,g).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,V).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,V).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")})}},te=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 ee extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ce.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var X,P,H,F,wt,xt,St,Vt,Bt,_t;class ae extends ee{constructor(){super();s(this,X,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,wt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,H)?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"),ze.setupDrag(c=>{const m=t(this,H)?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,H)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(oe.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,X,document.createElement("slot")),t(this,X).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,X))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,X).assignedElements()[0]||t(this,X).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))}}X=new WeakMap,P=new WeakMap,H=new WeakMap,F=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",ae);class de extends ee{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class pe extends de{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",pe);class Se extends de{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",Se);var W,Y,zt,Ht,Ft,Lt;class Re{constructor(n,e,i){s(this,W,null);s(this,Y,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,Y).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,W).classList.toggle("current",t(this,Y).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,W,document.createElement("button")),h(this,Y,n),h(this,Ht,i),h(this,zt,e),t(this,W).addEventListener("click",t(this,Ft)),t(this,Y).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ft)),t(this,Y).counter.unsubscribe(t(this,Lt)),t(this,W).remove()}}W=new WeakMap,Y=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var tt,kt;class fe extends ee{constructor(){super(...arguments);s(this,tt,[]);s(this,kt,Le.debounce(()=>{t(this,tt).forEach(e=>e.destroy()),h(this,tt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Re(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,tt).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,tt).forEach(e=>e.destroy()),h(this,tt,[])}}tt=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",fe);class me extends ke.ScrollSegmentElement{connectedCallback(){const n=ce.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",me);exports.ScrollBulletButtonsElement=fe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=me;exports.ScrollSetButtonElement=pe;exports.ScrollStepButtonElement=Se;exports.ScrollbarElement=ae;
@@ -1,93 +1,93 @@
1
- var de = Object.defineProperty;
2
- var te = Object.getOwnPropertySymbols;
3
- var pe = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
4
- var se = (u) => {
5
- throw TypeError(u);
1
+ var pe = Object.defineProperty;
2
+ var ee = Object.getOwnPropertySymbols;
3
+ var me = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
4
+ var ie = (a) => {
5
+ throw TypeError(a);
6
6
  };
7
- var ee = (u, n, e) => n in u ? de(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, ie = (u, n) => {
7
+ var se = (a, n, e) => n in a ? pe(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, re = (a, n) => {
8
8
  for (var e in n || (n = {}))
9
- pe.call(n, e) && ee(u, e, n[e]);
10
- if (te)
11
- for (var e of te(n))
12
- fe.call(n, e) && ee(u, e, n[e]);
13
- return u;
9
+ me.call(n, e) && se(a, e, n[e]);
10
+ if (ee)
11
+ for (var e of ee(n))
12
+ fe.call(n, e) && se(a, e, n[e]);
13
+ return a;
14
14
  };
15
- var Nt = (u, n, e) => n.has(u) || se("Cannot " + e);
16
- var t = (u, n, e) => (Nt(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? se("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Nt(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), d = (u, n, e) => (Nt(u, n, "access private method"), e);
17
- import { S as me } from "../../Store-OTdcl6SX.js";
15
+ var Ut = (a, n, e) => n.has(a) || ie("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) ? ie("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);
17
+ import { S as be } from "../../Store-OTdcl6SX.js";
18
18
  import { i as qt } from "../../browser-0zX67oeU.js";
19
- import { p as be } from "../../easings-BKi40vHz.js";
20
- import { d as Ut } from "../../events-CsVF98U6.js";
21
- import { c as ne } from "../../jss-CjccJC-K.js";
22
- import { a as Gt, g as Kt } from "../../layout-HoBT_Da2.js";
23
- import { c as he } from "../../math-BOBiC4TN.js";
19
+ import { p as Se } from "../../easings-BKi40vHz.js";
20
+ import { d as Gt } from "../../events-CsVF98U6.js";
21
+ import { c as he } from "../../jss-CjccJC-K.js";
22
+ import { a as Kt, g as _t } from "../../layout-HoBT_Da2.js";
23
+ import { c as oe } from "../../math-BOBiC4TN.js";
24
24
  import "../../ticker/vanilla/index.js";
25
- import { TICK_ORDER as Se, RESIZE_ORDER as oe } from "../../order/index.js";
26
- import { D as ge } from "../../Damped-Chu29wn-.js";
27
- import { T as ve } from "../../Tweened-BUuSLSF7.js";
28
- import { WheelControls as ye, KeyboardControls as Ce, DragControls as Ee, AutoplayControls as xe } from "../../controls/index.js";
29
- import { windowResizer as Wt } from "../../window-resizer/vanilla/index.js";
30
- import { scrollEntries as bt } from "../../scroll-entries/index.js";
31
- import { cssUnitParser as re } from "../../css-unit-parser/index.js";
32
- import { CSSProperty as f } from "../../css-property/index.js";
33
- import { device as we } from "../../device/index.js";
34
- import { elementResizer as $t } from "../../element-resizer/vanilla/index.js";
35
- import { s as Pe } from "../../gestures-D2Fdra_G.js";
36
- import { f as le } from "../../dom-0S_WDL4g.js";
37
- import { d as Le } from "../../function-C10DGppn.js";
38
- import { ScrollSegmentElement as ze } from "../../scroll-segment/index.js";
39
- var m, Dt, v, et, T, N;
40
- class ke {
25
+ import { TICK_ORDER as ge, RESIZE_ORDER as le } from "../../order/index.js";
26
+ import { D as ve } from "../../Damped-Chu29wn-.js";
27
+ import { T as ye } from "../../Tweened-BUuSLSF7.js";
28
+ import { WheelControls as Ce, KeyboardControls as Ee, DragControls as xe, AutoplayControls as we } from "../../controls/index.js";
29
+ import { windowResizer as $t } from "../../window-resizer/vanilla/index.js";
30
+ import { scrollEntries as St } from "../../scroll-entries/index.js";
31
+ import { cssUnitParser as ne } from "../../css-unit-parser/index.js";
32
+ import { CSSProperty as m } from "../../css-property/index.js";
33
+ import { device as Pe } from "../../device/index.js";
34
+ import { elementResizer as Nt } from "../../element-resizer/vanilla/index.js";
35
+ import { s as Le } from "../../gestures-D2Fdra_G.js";
36
+ import { f as ce } from "../../dom-0S_WDL4g.js";
37
+ import { d as ze } from "../../function-C10DGppn.js";
38
+ import { ScrollSegmentElement as ke } from "../../scroll-segment/index.js";
39
+ var f, At, v, st, T, q;
40
+ class De {
41
41
  constructor(n, e, i) {
42
- s(this, m);
43
- s(this, Dt);
42
+ s(this, f);
43
+ s(this, At);
44
44
  s(this, v);
45
- s(this, et, 0);
45
+ s(this, st, 0);
46
46
  s(this, T, 0);
47
- s(this, N, null);
48
- h(this, m, n), h(this, Dt, e), h(this, v, i), bt.register(t(this, m));
47
+ s(this, q, null);
48
+ h(this, f, n), h(this, At, e), h(this, v, i), St.register(t(this, f));
49
49
  }
50
50
  get index() {
51
- return t(this, Dt);
51
+ return t(this, At);
52
52
  }
53
53
  get size() {
54
- return t(this, et);
54
+ return t(this, st);
55
55
  }
56
56
  get position() {
57
57
  return t(this, T);
58
58
  }
59
59
  destroy() {
60
- bt.unregister(t(this, m)), t(this, m).style.transform = "", this.mark(null);
60
+ St.unregister(t(this, f)), t(this, f).style.transform = "", this.mark(null);
61
61
  }
62
62
  setSize(n) {
63
- n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, v).axisCSSProperty.current === "x" ? (t(this, m).style.width = n + "px", t(this, m).style.height = "") : (t(this, m).style.height = n + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
63
+ n ? (t(this, f).style.setProperty("--size", n + "px"), t(this, v).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"));
64
64
  }
65
65
  resize() {
66
- h(this, et, t(this, v).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, T, t(this, v).vertical ? Gt(t(this, m)) : Kt(t(this, m))), h(this, T, t(this, T) - t(this, v).contentPosition);
66
+ h(this, st, t(this, v).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this, T, t(this, v).vertical ? Kt(t(this, f)) : _t(t(this, f))), h(this, T, t(this, T) - t(this, v).contentPosition);
67
67
  }
68
68
  transform() {
69
69
  let n = 0;
70
70
  const e = t(this, v).viewportSize * t(this, v).sectionDistanceScaleCSSProperty.current;
71
- t(this, v).loopCSSProperty.current && t(this, v).overscroll && t(this, T) + t(this, et) < t(this, v).currentScrollValue && (n = t(this, v).distance * -1 - t(this, v).gap), bt.update(
72
- t(this, m),
71
+ t(this, v).loopCSSProperty.current && t(this, v).overscroll && t(this, T) + t(this, st) < t(this, v).currentScrollValue && (n = t(this, v).distance * -1 - t(this, v).gap), St.update(
72
+ t(this, f),
73
73
  t(this, v).axisCSSProperty.current,
74
74
  n
75
75
  );
76
- const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, et) + e, b = he(i, r, c);
77
- 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)`;
76
+ const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, st) + e, b = oe(i, r, c);
77
+ t(this, v).vertical ? t(this, f).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
78
78
  }
79
79
  mark(n) {
80
- t(this, N) !== n && (t(this, N) && t(this, m).classList.remove(t(this, N)), n && t(this, m).classList.add(n), h(this, N, n), Ut(t(this, m), "scrollSectionMarkChange", {
80
+ t(this, q) !== n && (t(this, q) && t(this, f).classList.remove(t(this, q)), n && t(this, f).classList.add(n), h(this, q, n), Gt(t(this, f), "scrollSectionMarkChange", {
81
81
  composed: !0,
82
82
  detail: {
83
- mark: t(this, N)
83
+ mark: t(this, q)
84
84
  },
85
85
  custom: !0
86
86
  }));
87
87
  }
88
88
  }
89
- m = new WeakMap(), Dt = new WeakMap(), v = new WeakMap(), et = new WeakMap(), T = new WeakMap(), N = new WeakMap();
90
- const De = ne({
89
+ f = new WeakMap(), At = new WeakMap(), v = new WeakMap(), st = new WeakMap(), T = new WeakMap(), q = new WeakMap();
90
+ const Ae = he({
91
91
  ":host": {
92
92
  position: "relative",
93
93
  width: "100%",
@@ -105,6 +105,11 @@ const De = ne({
105
105
  width: "var(--static-width, 100%)",
106
106
  height: "var(--static-height, 100%)"
107
107
  },
108
+ ".content-wrapper": {
109
+ width: "100%",
110
+ height: "100%",
111
+ overflow: "var(--overflow, initial)"
112
+ },
108
113
  ".content": {
109
114
  position: "relative",
110
115
  display: "flex",
@@ -120,99 +125,100 @@ const De = ne({
120
125
  flexShrink: "0"
121
126
  }
122
127
  });
123
- var a, st, P, V, R, k, H, U, G, D, E, it, rt, nt, ht, St, A, ot, K, I, _, O, Z, lt, ct, ut, p, gt, o, At, It, y, S, L, M, j, B, C, g, vt, J, at, dt, yt, F, l, zt, mt, _t, Zt, jt, Jt, z, Mt, ce, Ct, Tt, Qt, tt, Xt;
124
- class kt extends HTMLElement {
128
+ var u, it, P, V, R, D, H, U, G, A, E, rt, nt, ht, ot, gt, k, lt, K, I, _, O, Z, ct, at, ut, j, p, vt, o, It, Mt, y, S, L, M, J, B, C, g, yt, Q, dt, pt, Ct, F, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ae, Et, Vt, Xt, et, Yt;
129
+ class Dt extends HTMLElement {
125
130
  constructor() {
126
131
  super();
127
132
  s(this, l);
128
- s(this, a, null);
129
- s(this, st, new f(this, "--controls", !0));
130
- s(this, P, new f(this, "--axis", "y"));
131
- s(this, V, new f(this, "--direction", 0));
132
- s(this, R, new f(this, "--pages", 0, {
133
+ s(this, u, null);
134
+ s(this, it, new m(this, "--controls", !0));
135
+ s(this, P, new m(this, "--axis", "y"));
136
+ s(this, V, new m(this, "--direction", 0));
137
+ s(this, R, new m(this, "--pages", 0, {
133
138
  validate: (e) => Math.max(0, e - 1)
134
139
  }));
135
- s(this, k, new f(this, "--split", !1));
136
- s(this, H, new f(this, "--sectional", !1));
137
- s(this, U, new f(this, "--auto-size", !1));
138
- s(this, G, new f(
140
+ s(this, D, new m(this, "--split", !1));
141
+ s(this, H, new m(this, "--sectional", !1));
142
+ s(this, U, new m(this, "--auto-size", !1));
143
+ s(this, G, new m(
139
144
  this,
140
145
  "--wheel-max-delta",
141
146
  !1
142
147
  ));
143
- s(this, D, new f(
148
+ s(this, A, new m(
144
149
  this,
145
150
  "--sections-in-view",
146
151
  1
147
152
  ));
148
- s(this, E, new f(this, "--loop", !1));
149
- s(this, it, new f(this, "--damping", 20));
150
- s(this, rt, new f(this, "--mass", 0));
151
- s(this, nt, new f(this, "--stiffness", 0));
152
- s(this, ht, new f(this, "--mouse-drag", !1));
153
- s(this, St, new f(
153
+ s(this, E, new m(this, "--loop", !1));
154
+ s(this, rt, new m(this, "--damping", 20));
155
+ s(this, nt, new m(this, "--mass", 0));
156
+ s(this, ht, new m(this, "--stiffness", 0));
157
+ s(this, ot, new m(this, "--mouse-drag", !1));
158
+ s(this, gt, new m(
154
159
  this,
155
160
  "--section-distance-scale",
156
161
  0.5
157
162
  ));
158
- s(this, A, new f(this, "--autoplay", 0));
159
- s(this, ot, new f(
163
+ s(this, k, new m(this, "--autoplay", 0));
164
+ s(this, lt, new m(
160
165
  this,
161
166
  "--autoplay-pause-duration",
162
167
  0
163
168
  ));
164
- s(this, K, new f(
169
+ s(this, K, new m(
165
170
  this,
166
171
  "--autoplay-user-direction",
167
172
  !1
168
173
  ));
169
- s(this, I, new f(this, "--classes", !1));
170
- s(this, _, new f(
174
+ s(this, I, new m(this, "--classes", !1));
175
+ s(this, _, new m(
171
176
  this,
172
177
  "--current-index-start-offset",
173
178
  0
174
179
  ));
175
- s(this, O, new f(
180
+ s(this, O, new m(
176
181
  this,
177
182
  "--current-index-end-offset",
178
183
  0
179
184
  ));
180
- s(this, Z, new f(this, "--focus-delay", 0));
181
- s(this, lt, new f(
185
+ s(this, Z, new m(this, "--focus-delay", 0));
186
+ s(this, ct, new m(
182
187
  this,
183
188
  "--focus-duration",
184
189
  3e3
185
190
  ));
186
- s(this, ct, new f(this, "--disabled", !1));
187
- s(this, ut, new f(this, "--hibernated", !1));
191
+ s(this, at, new m(this, "--disabled", !1));
192
+ s(this, ut, new m(this, "--hibernated", !1));
193
+ s(this, j, null);
188
194
  s(this, p, null);
189
- s(this, gt, null);
195
+ s(this, vt, null);
190
196
  s(this, o, []);
191
- s(this, At, 0);
192
197
  s(this, It, 0);
198
+ s(this, Mt, 0);
193
199
  s(this, y, 0);
194
200
  s(this, S, 0);
195
201
  s(this, L, 0);
196
202
  s(this, M, null);
197
- s(this, j, null);
203
+ s(this, J, null);
198
204
  s(this, B, null);
199
205
  s(this, C, null);
200
- s(this, g, new me(0));
201
- s(this, vt, 0);
202
- s(this, J, 0);
203
- s(this, at, !0);
206
+ s(this, g, new be(0));
207
+ s(this, yt, 0);
208
+ s(this, Q, 0);
204
209
  s(this, dt, !0);
205
- s(this, yt);
206
- s(this, F, new ve());
210
+ s(this, pt, !0);
211
+ s(this, Ct);
212
+ s(this, F, new ye());
207
213
  s(this, z, () => {
208
- t(this, a).unlistenAnimationFrame();
214
+ t(this, u).unlistenAnimationFrame();
209
215
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
210
- if (h(this, At, this.vertical ? Gt(this) : Kt(this)), h(this, It, this.vertical ? Gt(t(this, p)) : Kt(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, re.parse(
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, ne.parse(
211
217
  getComputedStyle(t(this, p)).rowGap
212
- )) : h(this, L, re.parse(
218
+ )) : h(this, L, ne.parse(
213
219
  getComputedStyle(t(this, p)).columnGap
214
220
  )), t(this, U).current && t(this, o).length) {
215
- const r = t(this, D).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
221
+ const r = t(this, A).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
216
222
  t(this, o).forEach((b) => {
217
223
  b.setSize(c);
218
224
  });
@@ -230,26 +236,26 @@ class kt extends HTMLElement {
230
236
  this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, S, t(this, p).offsetHeight - t(this, y))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, S, t(this, p).offsetWidth - t(this, y)));
231
237
  if (!t(this, E).current) {
232
238
  const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
233
- h(this, S, t(this, S) + c), t(this, a).max = t(this, S);
239
+ h(this, S, t(this, S) + c), t(this, u).max = t(this, S);
234
240
  }
235
241
  if (t(this, E).current && t(this, o).length) {
236
242
  const r = t(this, o)[t(this, o).length - 1], c = r.position + r.size - t(this, y), b = t(this, S) - c;
237
- h(this, J, r.position + r.size + b);
243
+ h(this, Q, r.position + r.size + b);
238
244
  } else
239
- h(this, J, t(this, S));
245
+ h(this, Q, t(this, S));
240
246
  if (t(this, H).current && t(this, o).length) {
241
247
  const r = t(this, o)[i];
242
- t(this, a).set(r.position, {
248
+ t(this, u).set(r.position, {
243
249
  equalize: !0
244
250
  });
245
251
  } else
246
- t(this, a).set(e * t(this, S), {
252
+ t(this, u).set(e * t(this, S), {
247
253
  equalize: !0
248
254
  });
249
255
  });
250
- s(this, Mt, () => {
256
+ s(this, Tt, () => {
251
257
  const e = this.currentScrollValue;
252
- if (h(this, vt, Math.max(0, e - t(this, S))), t(this, o).length) {
258
+ if (h(this, yt, Math.max(0, e - t(this, S))), t(this, o).length) {
253
259
  let i = 0;
254
260
  for (let r = 0; r < t(this, o).length; r++) {
255
261
  const c = t(this, o)[r];
@@ -258,51 +264,51 @@ class kt extends HTMLElement {
258
264
  t(this, g).current = i;
259
265
  } else
260
266
  this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
261
- bt.update(
267
+ St.update(
262
268
  this,
263
269
  t(this, P).current,
264
270
  e
265
271
  );
266
272
  });
267
- s(this, Ct, (e, i) => {
268
- t(this, st).current && (t(this, K).current && (t(this, C).pauseAndContinue(
269
- t(this, ot).current
270
- ), t(this, C).direction = Math.sign(i) || 1), t(this, Tt).call(this, e, i));
273
+ s(this, Et, (e, i) => {
274
+ t(this, it).current && (t(this, K).current && (t(this, C).direction = Math.sign(i) || 1), t(this, k).current && t(this, C).pauseAndContinue(
275
+ t(this, lt).current
276
+ ), t(this, Vt).call(this, e, i));
271
277
  });
272
- s(this, Tt, (e, i) => {
278
+ s(this, Vt, (e, i) => {
273
279
  if (t(this, V).current) {
274
280
  if (t(this, V).current < 0 && i > 0)
275
281
  return;
276
282
  if (t(this, V).current > 0 && i < 0)
277
283
  return;
278
284
  }
279
- if (t(this, F).unlistenAnimationFrame(), !t(this, A).current && t(this, Z).current && (clearInterval(t(this, yt)), h(this, yt, setTimeout(() => {
280
- const r = d(this, l, Xt).call(this);
285
+ if (t(this, F).unlistenAnimationFrame(), !t(this, k).current && t(this, Z).current && (clearInterval(t(this, Ct)), h(this, Ct, setTimeout(() => {
286
+ const r = d(this, l, Yt).call(this);
281
287
  r && this.scrollToSection(r.index, {
282
288
  tween: {
283
- duration: t(this, lt).current,
284
- easing: be
289
+ duration: t(this, ct).current,
290
+ easing: Se
285
291
  }
286
292
  });
287
- }, t(this, Z).current))), !(e === "drag" && !we.isMobile && !t(this, ht).current))
293
+ }, t(this, Z).current))), !(e === "drag" && !Pe.isMobile && !t(this, ot).current))
288
294
  if (t(this, H).current) {
289
295
  const r = Math.sign(i);
290
- t(this, o).length ? this.shiftSections(r) : t(this, a).shift(r * t(this, y));
296
+ t(this, o).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
291
297
  } else
292
- t(this, a).shift(i);
298
+ t(this, u).shift(i);
293
299
  });
294
300
  if (qt) {
295
301
  const e = this.attachShadow({ mode: "open" });
296
- e.adoptedStyleSheets.push(De);
302
+ e.adoptedStyleSheets.push(Ae);
297
303
  const i = document.createElement("div");
298
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, gt, document.createElement("slot")), t(this, p).appendChild(t(this, gt)), e.appendChild(t(this, p));
304
+ 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));
299
305
  }
300
306
  }
301
307
  get damped() {
302
- return t(this, a);
308
+ return t(this, u);
303
309
  }
304
310
  get controlsCSSProperty() {
305
- return t(this, st);
311
+ return t(this, it);
306
312
  }
307
313
  get axisCSSProperty() {
308
314
  return t(this, P);
@@ -314,7 +320,7 @@ class kt extends HTMLElement {
314
320
  return t(this, R);
315
321
  }
316
322
  get splitCSSProperty() {
317
- return t(this, k);
323
+ return t(this, D);
318
324
  }
319
325
  get sectionalCSSProperty() {
320
326
  return t(this, H);
@@ -326,31 +332,31 @@ class kt extends HTMLElement {
326
332
  return t(this, G);
327
333
  }
328
334
  get sectionsInViewCSSProperty() {
329
- return t(this, D);
335
+ return t(this, A);
330
336
  }
331
337
  get loopCSSProperty() {
332
338
  return t(this, E);
333
339
  }
334
340
  get dampingCSSProperty() {
335
- return t(this, it);
341
+ return t(this, rt);
336
342
  }
337
343
  get massCSSProperty() {
338
- return t(this, rt);
344
+ return t(this, nt);
339
345
  }
340
346
  get stiffnessCSSProperty() {
341
- return t(this, nt);
347
+ return t(this, ht);
342
348
  }
343
349
  get mouseDragCSSProperty() {
344
- return t(this, ht);
350
+ return t(this, ot);
345
351
  }
346
352
  get sectionDistanceScaleCSSProperty() {
347
- return t(this, St);
353
+ return t(this, gt);
348
354
  }
349
355
  get autoplayCSSProperty() {
350
- return t(this, A);
356
+ return t(this, k);
351
357
  }
352
358
  get autoplayPauseDurationCSSProperty() {
353
- return t(this, ot);
359
+ return t(this, lt);
354
360
  }
355
361
  get autoplayUserDirectionCSSProperty() {
356
362
  return t(this, K);
@@ -368,19 +374,22 @@ class kt extends HTMLElement {
368
374
  return t(this, Z);
369
375
  }
370
376
  get focusDurationCSSProperty() {
371
- return t(this, lt);
377
+ return t(this, ct);
372
378
  }
373
379
  get disabledCSSProperty() {
374
- return t(this, ct);
380
+ return t(this, at);
375
381
  }
376
382
  get hibernatedCSSProperty() {
377
383
  return t(this, ut);
378
384
  }
379
385
  get currentScrollValue() {
380
- return d(this, l, Qt).call(this, "current");
386
+ return d(this, l, Xt).call(this, "current");
381
387
  }
382
388
  get targetScrollValue() {
383
- return d(this, l, Qt).call(this, "target");
389
+ return d(this, l, Xt).call(this, "target");
390
+ }
391
+ get contentWrapperElement() {
392
+ return t(this, j);
384
393
  }
385
394
  get contentElement() {
386
395
  return t(this, p);
@@ -389,10 +398,10 @@ class kt extends HTMLElement {
389
398
  return t(this, o);
390
399
  }
391
400
  get position() {
392
- return t(this, At);
401
+ return t(this, It);
393
402
  }
394
403
  get contentPosition() {
395
- return t(this, It);
404
+ return t(this, Mt);
396
405
  }
397
406
  get viewportSize() {
398
407
  return t(this, y);
@@ -407,16 +416,16 @@ class kt extends HTMLElement {
407
416
  return t(this, g);
408
417
  }
409
418
  get limit() {
410
- return t(this, o).length - t(this, D).current;
419
+ return t(this, o).length - t(this, A).current;
411
420
  }
412
421
  get distance() {
413
- return t(this, J);
422
+ return t(this, Q);
414
423
  }
415
424
  get loopDistance() {
416
- return t(this, E).current ? t(this, J) + t(this, L) : t(this, J);
425
+ return t(this, E).current ? t(this, Q) + t(this, L) : t(this, Q);
417
426
  }
418
427
  get overscroll() {
419
- return t(this, vt);
428
+ return t(this, yt);
420
429
  }
421
430
  get vertical() {
422
431
  return t(this, P).current === "y";
@@ -428,16 +437,16 @@ class kt extends HTMLElement {
428
437
  return this.targetScrollValue / this.loopDistance || 0;
429
438
  }
430
439
  get scrollWidth() {
431
- return t(this, P).current === "y" ? 0 : t(this, a).distance;
440
+ return t(this, P).current === "y" ? 0 : t(this, u).distance;
432
441
  }
433
442
  get scrollHeight() {
434
- return t(this, P).current === "x" ? 0 : t(this, a).distance;
443
+ return t(this, P).current === "x" ? 0 : t(this, u).distance;
435
444
  }
436
445
  onScroll(...e) {
437
- return t(this, a).subscribe(...e);
446
+ return t(this, u).subscribe(...e);
438
447
  }
439
448
  offScroll(...e) {
440
- t(this, a).unsubscribe(...e);
449
+ t(this, u).unsubscribe(...e);
441
450
  }
442
451
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
443
452
  range(e, i, r = 0) {
@@ -455,125 +464,125 @@ class kt extends HTMLElement {
455
464
  if (!t(this, o).length)
456
465
  return;
457
466
  const r = t(this, g).current;
458
- d(this, l, ce).call(this, e);
467
+ d(this, l, ae).call(this, e);
459
468
  const c = t(this, o)[r], b = t(this, o)[t(this, g).current];
460
469
  if (c && b) {
461
470
  let w = 0;
462
- const ft = d(this, l, Xt).call(this), ae = ft ? this.targetScrollValue - ft.position : 0;
463
- t(this, E).current ? t(this, g).current === 0 && r === t(this, o).length - 1 ? w = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, o).length - 1 && r === 0 ? w = b.position - (t(this, S) + t(this, y) + t(this, L)) : w = b.position - c.position : w = b.position - c.position, this.shiftPosition(w - ae, i);
471
+ const ft = d(this, l, Yt).call(this), de = ft ? this.targetScrollValue - ft.position : 0;
472
+ t(this, E).current ? t(this, g).current === 0 && r === t(this, o).length - 1 ? w = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, o).length - 1 && r === 0 ? w = b.position - (t(this, S) + t(this, y) + t(this, L)) : w = b.position - c.position : w = b.position - c.position, this.shiftPosition(w - de, i);
464
473
  }
465
474
  }
466
475
  shiftSections(e, i) {
467
476
  t(this, o).length && this.scrollToSection(t(this, g).current + e, i);
468
477
  }
469
478
  setPosition(e, i) {
470
- i != null && i.tween ? (t(this, F).set(t(this, a).current, { equalize: !0 }), t(this, F).set(e, ie({}, i.tween))) : t(this, a).set(e, {
479
+ i != null && i.tween ? (t(this, F).set(t(this, u).current, { equalize: !0 }), t(this, F).set(e, re({}, i.tween))) : t(this, u).set(e, {
471
480
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
472
481
  });
473
482
  }
474
483
  shiftPosition(e, i) {
475
- this.setPosition(t(this, a).target + e, i);
484
+ this.setPosition(t(this, u).target + e, i);
476
485
  }
477
486
  connectedCallback() {
478
- h(this, a, new ge(0, {
487
+ h(this, u, new ve(0, {
479
488
  damping: 0.01,
480
489
  min: 0,
481
- order: Se.SCROLL
482
- })), this.setAttribute("tabindex", "0"), h(this, M, new ye({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Ct)), h(this, j, new Ce({
490
+ order: ge.SCROLL
491
+ })), this.setAttribute("tabindex", "0"), h(this, M, new Ce({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Et)), h(this, J, new Ee({
483
492
  element: this
484
- })), t(this, j).changeEvent.subscribe(
485
- t(this, Ct)
486
- ), h(this, B, new Ee({ element: t(this, p) })), t(this, B).changeEvent.subscribe(t(this, Ct)), h(this, C, new xe({
493
+ })), t(this, J).changeEvent.subscribe(
494
+ t(this, Et)
495
+ ), h(this, B, new xe({ element: t(this, p) })), t(this, B).changeEvent.subscribe(t(this, Et)), h(this, C, new we({
487
496
  culling: this
488
- })), t(this, C).changeEvent.subscribe(t(this, Tt)), t(this, P).subscribe(({ current: e }) => {
489
- 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, B).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
497
+ })), t(this, C).changeEvent.subscribe(t(this, Vt)), t(this, P).subscribe(({ current: e }) => {
498
+ 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, B).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
490
499
  }), t(this, G).subscribe((e) => {
491
500
  t(this, M).axis = e.current ? "max" : t(this, P).current;
492
501
  }), t(this, R).subscribe(() => {
493
502
  this.isConnected && t(this, z).call(this);
494
- }), t(this, k).subscribe(({ current: e }) => {
495
- this.isConnected && (e ? d(this, l, zt).call(this) : d(this, l, mt).call(this));
503
+ }), t(this, D).subscribe(({ current: e }) => {
504
+ this.isConnected && (e ? d(this, l, kt).call(this) : d(this, l, bt).call(this));
496
505
  }), t(this, H).subscribe((e) => {
497
- t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, o).length ? d(this, l, zt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, mt).call(this));
506
+ t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
498
507
  }), t(this, U).subscribe((e) => {
499
- this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, o).length ? d(this, l, zt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, mt).call(this));
500
- }), t(this, D).subscribe((e) => {
501
- this.isConnected && (t(this, z).call(this), d(this, l, tt).call(this));
508
+ this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
509
+ }), t(this, A).subscribe((e) => {
510
+ this.isConnected && (t(this, z).call(this), d(this, l, et).call(this));
502
511
  }), t(this, E).subscribe((e) => {
503
- e.current ? (this.isConnected && (t(this, o).length || (t(this, k).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, S), t(this, a).min = 0);
504
- }), t(this, it).subscribe((e) => {
505
- t(this, a).damping = e.current;
512
+ e.current ? (this.isConnected && (t(this, o).length || (t(this, D).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, S), t(this, u).min = 0);
506
513
  }), t(this, rt).subscribe((e) => {
507
- t(this, a).mass = e.current;
514
+ t(this, u).damping = e.current;
508
515
  }), t(this, nt).subscribe((e) => {
509
- t(this, a).stiffness = e.current;
510
- }), t(this, ct).subscribe((e) => {
511
- e.current && !e.previous ? d(this, l, _t).call(this) : !e.current && e.previous && d(this, l, Zt).call(this);
516
+ t(this, u).mass = e.current;
517
+ }), t(this, ht).subscribe((e) => {
518
+ t(this, u).stiffness = e.current;
519
+ }), t(this, at).subscribe((e) => {
520
+ e.current && !e.previous ? d(this, l, Zt).call(this) : !e.current && e.previous && d(this, l, jt).call(this);
512
521
  }), t(this, ut).subscribe((e) => {
513
- e.current && !e.previous ? d(this, l, jt).call(this) : !e.current && e.previous && d(this, l, Jt).call(this);
514
- }), t(this, A).subscribe((e) => {
522
+ e.current && !e.previous ? d(this, l, Jt).call(this) : !e.current && e.previous && d(this, l, Qt).call(this);
523
+ }), t(this, k).subscribe((e) => {
515
524
  t(this, C).speed = e.current, e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
516
525
  }), t(this, K).subscribe((e) => {
517
526
  e.current || (t(this, C).direction = 1);
518
527
  }), t(this, I).subscribe((e) => {
519
- this.isConnected && d(this, l, tt).call(this);
528
+ this.isConnected && d(this, l, et).call(this);
520
529
  }), t(this, _).subscribe((e) => {
521
- this.isConnected && t(this, I).current && d(this, l, tt).call(this);
530
+ this.isConnected && t(this, I).current && d(this, l, et).call(this);
522
531
  }), t(this, O).subscribe((e) => {
523
- this.isConnected && t(this, I).current && d(this, l, tt).call(this);
524
- }), t(this, a).isRunning.subscribe((e) => {
532
+ this.isConnected && t(this, I).current && d(this, l, et).call(this);
533
+ }), t(this, u).isRunning.subscribe((e) => {
525
534
  this.classList.toggle("active", e.current);
526
535
  }), t(this, g).subscribe((e) => {
527
- t(this, o).length && d(this, l, tt).call(this);
536
+ t(this, o).length && d(this, l, et).call(this);
528
537
  }), t(this, F).subscribe((e) => {
529
- t(this, F).isRunning.current && t(this, a).set(e.current);
530
- }), t(this, st).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, k).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, D).observe(), t(this, E).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, St).observe(), t(this, A).observe(), t(this, A).observe(), t(this, ot).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, ut).observe(), d(this, l, Jt).call(this);
538
+ t(this, F).isRunning.current && t(this, u).set(e.current);
539
+ }), t(this, it).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, D).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, A).observe(), t(this, E).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), d(this, l, Qt).call(this);
531
540
  }
532
541
  disconnectedCallback() {
533
- this.setAttribute("tabindex", ""), t(this, st).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, k).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, D).unobserve(), t(this, E).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, St).unobserve(), t(this, A).unobserve(), t(this, ot).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), t(this, ut).unobserve(), d(this, l, jt).call(this);
542
+ this.setAttribute("tabindex", ""), t(this, it).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, E).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, lt).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), d(this, l, Jt).call(this);
534
543
  }
535
544
  }
536
- a = new WeakMap(), st = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), k = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), D = new WeakMap(), E = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), St = new WeakMap(), A = new WeakMap(), ot = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), p = new WeakMap(), gt = new WeakMap(), o = new WeakMap(), At = new WeakMap(), It = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), j = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), J = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), yt = new WeakMap(), F = new WeakMap(), l = new WeakSet(), zt = function() {
537
- d(this, l, mt).call(this), t(this, gt).assignedElements().forEach((e, i) => {
538
- e instanceof HTMLElement && t(this, o).push(new ke(e, i, this));
539
- }), t(this, p).style.transform = "", Ut(this, "scrollSectionsChange", {
545
+ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), D = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), A = new WeakMap(), E = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), F = new WeakMap(), l = new WeakSet(), kt = function() {
546
+ d(this, l, bt).call(this), t(this, vt).assignedElements().forEach((e, i) => {
547
+ e instanceof HTMLElement && t(this, o).push(new De(e, i, this));
548
+ }), t(this, p).style.transform = "", Gt(this, "scrollSectionsChange", {
540
549
  custom: !0,
541
550
  composed: !0
542
- }), t(this, z).call(this), d(this, l, tt).call(this);
543
- }, mt = function() {
551
+ }), t(this, z).call(this), d(this, l, et).call(this);
552
+ }, bt = function() {
544
553
  t(this, o).forEach((e) => {
545
554
  e.destroy();
546
- }), h(this, o, []), t(this, g).current = 0, t(this, a).reset(), Ut(this, "scrollSectionsChange", {
555
+ }), h(this, o, []), t(this, g).current = 0, t(this, u).reset(), Gt(this, "scrollSectionsChange", {
547
556
  custom: !0,
548
557
  composed: !0
549
558
  });
550
- }, _t = function() {
551
- t(this, at) || (h(this, at, !0), t(this, a).unsubscribe(t(this, Mt)), t(this, a).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, j).disconnect(), t(this, B).disconnect(), t(this, C).disconnect(), clearInterval(t(this, yt)), t(this, F).unlistenAnimationFrame());
552
559
  }, Zt = function() {
553
- t(this, at) && (h(this, at, !1), t(this, a).subscribe(t(this, Mt)), t(this, M).connect(), t(this, j).connect(), t(this, B).connect(), t(this, A).current && t(this, C).connect());
560
+ t(this, dt) || (h(this, dt, !0), t(this, u).unsubscribe(t(this, Tt)), t(this, u).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, J).disconnect(), t(this, B).disconnect(), t(this, C).disconnect(), clearInterval(t(this, Ct)), t(this, F).unlistenAnimationFrame());
554
561
  }, jt = function() {
555
- t(this, dt) || (h(this, dt, !0), Wt.unsubscribe(t(this, z)), $t.unsubscribe(t(this, z)), t(this, a).reset(), d(this, l, _t).call(this), t(this, p).style.transform = "", t(this, k).current && d(this, l, mt).call(this), bt.unregister(this));
562
+ t(this, dt) && (h(this, dt, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, J).connect(), t(this, B).connect(), t(this, k).current && t(this, C).connect());
556
563
  }, Jt = function() {
557
- t(this, dt) && (h(this, dt, !1), t(this, k).current && d(this, l, zt).call(this), bt.register(this), Wt.subscribe(t(this, z), oe.SCROLL), $t.subscribe(this, t(this, z)), d(this, l, Zt).call(this));
558
- }, z = new WeakMap(), Mt = new WeakMap(), ce = function(e) {
559
- t(this, E).current ? (t(this, g).current = e % t(this, o).length, t(this, g).current = t(this, g).current < 0 ? t(this, o).length + t(this, g).current : t(this, g).current) : t(this, g).current = he(e, 0, this.limit);
560
- }, Ct = new WeakMap(), Tt = new WeakMap(), Qt = function(e = "current") {
564
+ t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), t(this, u).reset(), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, D).current && d(this, l, bt).call(this), St.unregister(this));
565
+ }, Qt = function() {
566
+ t(this, pt) && (h(this, pt, !1), t(this, D).current && d(this, l, kt).call(this), St.register(this), $t.subscribe(t(this, z), le.SCROLL), Nt.subscribe(this, t(this, z)), d(this, l, jt).call(this));
567
+ }, z = new WeakMap(), Tt = new WeakMap(), ae = function(e) {
568
+ t(this, E).current ? (t(this, g).current = e % t(this, o).length, t(this, g).current = t(this, g).current < 0 ? t(this, o).length + t(this, g).current : t(this, g).current) : t(this, g).current = oe(e, 0, this.limit);
569
+ }, Et = new WeakMap(), Vt = new WeakMap(), Xt = function(e = "current") {
561
570
  if (t(this, E).current && t(this, o).length) {
562
- const i = t(this, a)[e] % (t(this, S) + t(this, y) + t(this, L));
571
+ const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, L));
563
572
  return i < 0 ? t(this, S) + i + t(this, y) + t(this, L) : i;
564
573
  } else
565
- return t(this, a)[e];
566
- }, tt = function() {
574
+ return t(this, u)[e];
575
+ }, et = function() {
567
576
  if (t(this, I).current && t(this, o).length) {
568
577
  const e = t(this, g).current + t(this, _).current;
569
578
  e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
570
- const i = t(this, D).current + t(this, O).current;
579
+ const i = t(this, A).current + t(this, O).current;
571
580
  t(this, o).forEach((r, c) => {
572
581
  const b = e - this.limit - 1 + t(this, O).current, w = e + i, ft = this.sections.length - w;
573
582
  c >= e && c < w || c <= b ? r.mark("current") : c >= w && c < w + ft / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
574
583
  });
575
584
  }
576
- }, Xt = function() {
585
+ }, Yt = function() {
577
586
  let e = null, i = 1 / 0;
578
587
  for (let r = 0; r < t(this, o).length; r++) {
579
588
  const c = Math.abs(t(this, o)[r].position - this.targetScrollValue);
@@ -581,47 +590,47 @@ a = new WeakMap(), st = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
581
590
  }
582
591
  return e !== null ? t(this, o)[e] : null;
583
592
  };
584
- customElements.get("e-scroll") || customElements.define("e-scroll", kt);
585
- var Vt;
586
- class Yt extends HTMLElement {
593
+ customElements.get("e-scroll") || customElements.define("e-scroll", Dt);
594
+ var Rt;
595
+ class te extends HTMLElement {
587
596
  constructor() {
588
597
  super(...arguments);
589
- s(this, Vt, null);
598
+ s(this, Rt, null);
590
599
  }
591
600
  get scrollElement() {
592
- return t(this, Vt);
601
+ return t(this, Rt);
593
602
  }
594
603
  connectedCallback() {
595
- const e = le(this, kt);
596
- e instanceof kt ? h(this, Vt, e) : console.error(this, "e-scroll not found");
604
+ const e = ce(this, Dt);
605
+ e instanceof Dt ? h(this, Rt, e) : console.error(this, "e-scroll not found");
597
606
  }
598
607
  }
599
- Vt = new WeakMap();
600
- var Q, x, W, $, Et, xt, pt, Rt, Ht, Ot;
601
- class Ae extends Yt {
608
+ Rt = new WeakMap();
609
+ var X, x, W, $, xt, wt, mt, Ht, Ot, Bt;
610
+ class Ie extends te {
602
611
  constructor() {
603
612
  super();
604
- s(this, Q, null);
613
+ s(this, X, null);
605
614
  s(this, x, null);
606
615
  s(this, W, !1);
607
616
  s(this, $, 0);
608
- s(this, Et, 0);
609
617
  s(this, xt, 0);
610
- s(this, pt, () => {
618
+ s(this, wt, 0);
619
+ s(this, mt, () => {
611
620
  h(this, W, this.offsetWidth > this.offsetHeight);
612
621
  const e = t(this, W) ? this.offsetWidth : this.offsetHeight;
613
- h(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, $, Math.max(t(this, $), 30)), t(this, W) ? (t(this, x).style.width = t(this, $) + "px", t(this, x).style.height = "100%") : (t(this, x).style.width = "100%", t(this, x).style.height = t(this, $) + "px"), h(this, Et, e - t(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
614
- });
615
- s(this, Rt, () => {
616
- h(this, xt, this.scrollElement.currentProgress * t(this, Et)), t(this, W) ? t(this, x).style.transform = `translate3d(${t(this, xt)}px, 0px, 0px)` : t(this, x).style.transform = `translate3d(0px, ${t(this, xt)}px, 0px)`;
622
+ h(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, $, Math.max(t(this, $), 30)), t(this, W) ? (t(this, x).style.width = t(this, $) + "px", t(this, x).style.height = "100%") : (t(this, x).style.width = "100%", t(this, x).style.height = t(this, $) + "px"), h(this, xt, e - t(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
617
623
  });
618
624
  s(this, Ht, () => {
625
+ h(this, wt, this.scrollElement.currentProgress * t(this, xt)), t(this, W) ? t(this, x).style.transform = `translate3d(${t(this, wt)}px, 0px, 0px)` : t(this, x).style.transform = `translate3d(0px, ${t(this, wt)}px, 0px)`;
626
+ });
627
+ s(this, Ot, () => {
619
628
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
620
629
  });
621
- s(this, Ot, (e) => {
622
- document.documentElement.classList.add("grabbing"), Pe(
630
+ s(this, Bt, (e) => {
631
+ document.documentElement.classList.add("grabbing"), Le(
623
632
  (c) => {
624
- const b = t(this, W) ? c.x : c.y, w = this.scrollElement.distance / t(this, Et), ft = (b - r) * w;
633
+ const b = t(this, W) ? c.x : c.y, w = this.scrollElement.distance / t(this, xt), ft = (b - r) * w;
625
634
  this.scrollElement.setPosition(i + ft);
626
635
  },
627
636
  () => {
@@ -633,7 +642,7 @@ class Ae extends Yt {
633
642
  if (qt) {
634
643
  const e = this.attachShadow({ mode: "open" });
635
644
  e.adoptedStyleSheets.push(
636
- ne({
645
+ he({
637
646
  ":host": {
638
647
  display: "inline-block",
639
648
  zIndex: "1",
@@ -662,7 +671,7 @@ class Ae extends Yt {
662
671
  touchAction: "none"
663
672
  }
664
673
  })
665
- ), h(this, Q, document.createElement("slot")), t(this, Q).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, Q));
674
+ ), h(this, X, document.createElement("slot")), t(this, X).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, X));
666
675
  }
667
676
  }
668
677
  get thumbElement() {
@@ -670,111 +679,111 @@ class Ae extends Yt {
670
679
  }
671
680
  connectedCallback() {
672
681
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
673
- const e = t(this, Q).assignedElements()[0] || t(this, Q).firstElementChild;
674
- h(this, x, e), t(this, x).addEventListener("pointerdown", t(this, Ot)), Wt.subscribe(t(this, pt), oe.SCROLL), $t.subscribe(this, t(this, pt)), this.scrollElement.onScroll(t(this, Rt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ht));
682
+ const e = t(this, X).assignedElements()[0] || t(this, X).firstElementChild;
683
+ h(this, x, e), t(this, x).addEventListener("pointerdown", t(this, Bt)), $t.subscribe(t(this, mt), le.SCROLL), Nt.subscribe(this, t(this, mt)), this.scrollElement.onScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ot));
675
684
  }
676
685
  disconnectedCallback() {
677
- this.removeAttribute("drag-dead-zone"), t(this, x).removeEventListener("pointerdown", t(this, Ot)), Wt.unsubscribe(t(this, pt)), $t.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Rt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Ht));
686
+ this.removeAttribute("drag-dead-zone"), t(this, x).removeEventListener("pointerdown", t(this, Bt)), $t.unsubscribe(t(this, mt)), Nt.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Ot));
678
687
  }
679
688
  }
680
- Q = new WeakMap(), x = new WeakMap(), W = new WeakMap(), $ = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), pt = new WeakMap(), Rt = new WeakMap(), Ht = new WeakMap(), Ot = new WeakMap();
681
- customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ae);
682
- class ue extends Yt {
689
+ X = new WeakMap(), x = new WeakMap(), W = new WeakMap(), $ = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), mt = new WeakMap(), Ht = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap();
690
+ customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ie);
691
+ class ue extends te {
683
692
  constructor() {
684
693
  super(), qt && this.addEventListener("click", () => {
685
694
  this.handleClick();
686
695
  });
687
696
  }
688
697
  }
689
- class Ie extends ue {
698
+ class Me extends ue {
690
699
  handleClick() {
691
700
  const n = this.getAttribute("index"), e = this.getAttribute("behaviour");
692
701
  this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: e });
693
702
  }
694
703
  }
695
- customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Ie);
696
- class Me extends ue {
704
+ customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Me);
705
+ class Te extends ue {
697
706
  handleClick() {
698
707
  const n = this.getAttribute("step"), e = this.getAttribute("behaviour");
699
708
  this.scrollElement.shiftSections(parseInt(n || "1"), { behaviour: e });
700
709
  }
701
710
  }
702
- customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Me);
703
- var q, X, wt, Bt, Ft, Pt;
704
- class Te {
711
+ customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Te);
712
+ var N, Y, Pt, Ft, Wt, Lt;
713
+ class Ve {
705
714
  constructor(n, e, i) {
706
- s(this, q, null);
707
- s(this, X, null);
708
- s(this, wt, null);
709
- s(this, Bt, null);
710
- s(this, Ft, () => {
711
- t(this, X).scrollToSection(t(this, wt), {
712
- behaviour: t(this, Bt)
715
+ s(this, N, null);
716
+ s(this, Y, null);
717
+ s(this, Pt, null);
718
+ s(this, Ft, null);
719
+ s(this, Wt, () => {
720
+ t(this, Y).scrollToSection(t(this, Pt), {
721
+ behaviour: t(this, Ft)
713
722
  });
714
723
  });
715
- s(this, Pt, () => {
716
- t(this, q).classList.toggle(
724
+ s(this, Lt, () => {
725
+ t(this, N).classList.toggle(
717
726
  "current",
718
- t(this, X).counter.current === t(this, wt)
727
+ t(this, Y).counter.current === t(this, Pt)
719
728
  );
720
729
  });
721
- qt && (h(this, q, document.createElement("button")), h(this, X, n), h(this, Bt, i), h(this, wt, e), t(this, q).addEventListener("click", t(this, Ft)), t(this, X).counter.subscribe(t(this, Pt)), t(this, Pt).call(this));
730
+ qt && (h(this, N, document.createElement("button")), h(this, Y, n), h(this, Ft, i), h(this, Pt, e), t(this, N).addEventListener("click", t(this, Wt)), t(this, Y).counter.subscribe(t(this, Lt)), t(this, Lt).call(this));
722
731
  }
723
732
  get element() {
724
- return t(this, q);
733
+ return t(this, N);
725
734
  }
726
735
  destroy() {
727
- t(this, q).removeEventListener("click", t(this, Ft)), t(this, X).counter.unsubscribe(t(this, Pt)), t(this, q).remove();
736
+ t(this, N).removeEventListener("click", t(this, Wt)), t(this, Y).counter.unsubscribe(t(this, Lt)), t(this, N).remove();
728
737
  }
729
738
  }
730
- q = new WeakMap(), X = new WeakMap(), wt = new WeakMap(), Bt = new WeakMap(), Ft = new WeakMap(), Pt = new WeakMap();
731
- var Y, Lt;
732
- class Ve extends Yt {
739
+ N = new WeakMap(), Y = new WeakMap(), Pt = new WeakMap(), Ft = new WeakMap(), Wt = new WeakMap(), Lt = new WeakMap();
740
+ var tt, zt;
741
+ class Re extends te {
733
742
  constructor() {
734
743
  super(...arguments);
735
- s(this, Y, []);
736
- s(this, Lt, Le(() => {
737
- t(this, Y).forEach((e) => e.destroy()), h(this, Y, []);
744
+ s(this, tt, []);
745
+ s(this, zt, ze(() => {
746
+ t(this, tt).forEach((e) => e.destroy()), h(this, tt, []);
738
747
  for (let e = 0; e < this.scrollElement.sections.length; e++) {
739
- const i = new Te(
748
+ const i = new Ve(
740
749
  this.scrollElement,
741
750
  e,
742
751
  this.getAttribute("behaviour") || "smooth"
743
752
  );
744
- this.appendChild(i.element), t(this, Y).push(i);
753
+ this.appendChild(i.element), t(this, tt).push(i);
745
754
  }
746
755
  }, 0));
747
756
  }
748
757
  connectedCallback() {
749
758
  super.connectedCallback(), this.scrollElement.addEventListener(
750
759
  "sectionsChange",
751
- t(this, Lt)
752
- ), t(this, Lt).call(this);
760
+ t(this, zt)
761
+ ), t(this, zt).call(this);
753
762
  }
754
763
  disconnectedCallback() {
755
764
  this.scrollElement.removeEventListener(
756
765
  "sectionsChange",
757
- t(this, Lt)
758
- ), t(this, Y).forEach((e) => e.destroy()), h(this, Y, []);
766
+ t(this, zt)
767
+ ), t(this, tt).forEach((e) => e.destroy()), h(this, tt, []);
759
768
  }
760
769
  }
761
- Y = new WeakMap(), Lt = new WeakMap();
762
- customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Ve);
763
- class Re extends ze {
770
+ tt = new WeakMap(), zt = new WeakMap();
771
+ customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Re);
772
+ class He extends ke {
764
773
  connectedCallback() {
765
- const n = le(this, kt);
766
- n instanceof kt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
774
+ const n = ce(this, Dt);
775
+ n instanceof Dt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
767
776
  "scrollSectionsChange",
768
777
  this.findAnotherScrollEntries
769
778
  )) : console.error(this, "e-scroll not found");
770
779
  }
771
780
  }
772
- customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Re);
781
+ customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", He);
773
782
  export {
774
- Ve as ScrollBulletButtonsElement,
775
- kt as ScrollElement,
776
- Re as ScrollSegmentElement,
777
- Ie as ScrollSetButtonElement,
778
- Me as ScrollStepButtonElement,
779
- Ae as ScrollbarElement
783
+ Re as ScrollBulletButtonsElement,
784
+ Dt as ScrollElement,
785
+ He as ScrollSegmentElement,
786
+ Me as ScrollSetButtonElement,
787
+ Te as ScrollStepButtonElement,
788
+ Ie as ScrollbarElement
780
789
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.30.4",
3
+ "version": "0.30.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"