aptechka 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Re=Object.defineProperty;var me=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var ye=u=>{throw TypeError(u)};var ge=(u,h,e)=>h in u?Re(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Ce=(u,h)=>{for(var e in h||(h={}))Me.call(h,e)&&ge(u,e,h[e]);if(me)for(var e of me(h))Ae.call(h,e)&&ge(u,e,h[e]);return u};var le=(u,h,e)=>h.has(u)||ye("Cannot "+e);var t=(u,h,e)=>(le(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?ye("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(le(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),d=(u,h,e)=>(le(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("../../Store-CDb6RMce.cjs"),oe=require("../../browser-CpzFX2xg.cjs"),Ve=require("../../easings-GegIwET5.cjs"),ie=require("../../events-KVanG9sR.cjs"),Pe=require("../../jss-GJLvaNfT.cjs"),xt=require("../../layout-8ryRAMGJ.cjs"),Ee=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const ce=require("../../order/index.cjs"),Be=require("../../Damped-CTsV8tl_.cjs"),_e=require("../../Tweened-lT5myPAZ.cjs"),se=require("../../controls/index.cjs"),he=require("../../window-resizer/vanilla/index.cjs"),dt=require("../../scroll-entries/index.cjs"),ve=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),He=require("../../device/index.cjs"),Nt=require("../../element-resizer/vanilla/index.cjs"),We=require("../../gestures-DHLrn6Q8.cjs"),we=require("../../dom-JBOkFLTh.cjs"),Fe=require("../../function-MthRj-GJ.cjs"),Ue=require("../../scroll-segment/index.cjs");var f,Gt,g,St,O,K;class $e{constructor(h,e,i){s(this,f);s(this,Gt);s(this,g);s(this,St,0);s(this,O,0);s(this,K,null);n(this,f,h),n(this,Gt,e),n(this,g,i),dt.scrollEntries.register(t(this,f))}get index(){return t(this,Gt)}get size(){return t(this,St)}get position(){return t(this,O)}destroy(){dt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,St,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,O,t(this,g).vertical?xt.getCumulativeOffsetTop(t(this,f)):xt.getCumulativeOffsetLeft(t(this,f))),n(this,O,t(this,O)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,O)+t(this,St)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),dt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,O)-t(this,g).viewportSize-e,c=t(this,O)+t(this,St)+e,b=Ee.clamp(i,r,c);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,K)!==h&&(t(this,K)&&t(this,f).classList.remove(t(this,K)),h&&t(this,f).classList.add(h),n(this,K,h),ie.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,K)},custom:!0}))}}f=new WeakMap,Gt=new WeakMap,g=new WeakMap,St=new WeakMap,O=new WeakMap,K=new WeakMap;const Ne=Pe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,pt,w,V,B,_,T,Z,J,H,Q,ft,q,C,bt,mt,gt,yt,Lt,k,Ct,X,D,Y,W,tt,vt,Pt,et,st,p,zt,l,jt,Kt,y,m,x,I,it,R,v,P,kt,rt,F,nt,Et,Tt,ht,U,Zt,M,o,$t,wt,re,ne,ue,ae,L,qt,xe,Dt,Jt,de,Se,at,pe;class Ut extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,pt,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,V,new S.CSSProperty(this,"--direction",0));s(this,B,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,_,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Z,new S.CSSProperty(this,"--tween-easing",!1));s(this,J,new S.CSSProperty(this,"--tween-duration",!1));s(this,H,new S.CSSProperty(this,"--auto-size",!1));s(this,Q,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,ft,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,bt,new S.CSSProperty(this,"--damping",20));s(this,mt,new S.CSSProperty(this,"--mass",0));s(this,gt,new S.CSSProperty(this,"--stiffness",0));s(this,yt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Lt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,Ct,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,X,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,Y,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,W,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,tt,new S.CSSProperty(this,"--focus-delay",0));s(this,vt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,Pt,new S.CSSProperty(this,"--disabled",!1));s(this,et,new S.CSSProperty(this,"--hibernated",!1));s(this,st,null);s(this,p,null);s(this,zt,null);s(this,l,[]);s(this,jt,0);s(this,Kt,0);s(this,y,0);s(this,m,0);s(this,x,0);s(this,I,null);s(this,it,null);s(this,R,null);s(this,v,null);s(this,P,new Oe.Store(0));s(this,kt,0);s(this,rt,0);s(this,F,!1);s(this,nt,!0);s(this,Et,!0);s(this,Tt);s(this,ht);s(this,U,new _e.Tweened);s(this,Zt,!1);s(this,M,null);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,jt,this.vertical?xt.getCumulativeOffsetTop(this):xt.getCumulativeOffsetLeft(this)),n(this,Kt,this.vertical?xt.getCumulativeOffsetTop(t(this,p)):xt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,x,ve.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,x,ve.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,H).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,y)-t(this,x)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,B).current){n(this,m,t(this,y)*t(this,B).current);const r=t(this,m)+t(this,y);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",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+c),t(this,a).max=t(this,m)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,y),b=t(this,m)-c;n(this,rt,r.position+r.size+b)}else n(this,rt,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,F,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,F)),t(this,F)?d(this,o,ne).call(this):d(this,o,re).call(this),t(this,qt).call(this)});s(this,qt,()=>{if(!t(this,F))return;const e=this.currentScrollValue;if(n(this,kt,Math.max(0,e-t(this,m))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,P).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)`;dt.scrollEntries.update(this,t(this,w).current,e)});s(this,Dt,(e,i)=>{t(this,pt).current&&(d(this,o,de).call(this,Math.sign(i)||1),t(this,Jt).call(this,e,i))});s(this,Jt,(e,i)=>{if(t(this,V).current){if(t(this,V).current<0&&i>0)return;if(t(this,V).current>0&&i<0)return}if(t(this,ht)||t(this,U).unlistenAnimationFrame(),!t(this,k).current&&t(this,tt).current&&(clearInterval(t(this,Tt)),n(this,Tt,setTimeout(()=>{const r=d(this,o,pe).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,vt).current,easing:Ve.easeInOutExpo}})},t(this,tt).current))),!(e.includes("drag")&&!He.device.isMobile&&!t(this,yt).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const c={tween:t(this,Z).current||t(this,J).current?{easing:t(this,Z).current||"easeInOutCubic",duration:t(this,J).current||500}:void 0};t(this,Zt)?this.scrollToSection(t(this,P).current,c):this.shiftSections(r,c)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Zt,e==="drag")}});if(oe.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ne];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,st,document.createElement("div")),t(this,st).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,zt,document.createElement("slot")),t(this,p).appendChild(t(this,zt)),t(this,st).appendChild(t(this,p)),e.appendChild(t(this,st))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,pt)}get axisCSSProperty(){return t(this,w)}get directionCSSProperty(){return t(this,V)}get pagesCSSProperty(){return t(this,B)}get splitCSSProperty(){return t(this,_)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Z)}get durationCSSProperty(){return t(this,J)}get autoSizeCSSProperty(){return t(this,H)}get wheelMaxDeltaCSSProperty(){return t(this,Q)}get dragInertionCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,bt)}get massCSSProperty(){return t(this,mt)}get stiffnessCSSProperty(){return t(this,gt)}get mouseDragCSSProperty(){return t(this,yt)}get sectionDistanceScaleCSSProperty(){return t(this,Lt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,Ct)}get autoplayUserDirectionCSSProperty(){return t(this,X)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,Y)}get currentIndexEndOffsetCSSProperty(){return t(this,W)}get focusDelayCSSProperty(){return t(this,tt)}get focusDurationCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Pt)}get hibernatedCSSProperty(){return t(this,et)}get currentScrollValue(){return d(this,o,Se).call(this,"current")}get targetScrollValue(){return d(this,o,Se).call(this,"target")}get contentWrapperElement(){return t(this,st)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,jt)}get contentPosition(){return t(this,Kt)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,x)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,rt)}get loopDistance(){return t(this,C).current?t(this,rt)+t(this,x):t(this,rt)}get hasOverflow(){return t(this,F)}get overscroll(){return t(this,kt)}get scrollLine(){return t(this,M)}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,l).length)return;const r=t(this,P).current,c=d(this,o,xe).call(this,e),b=t(this,l)[r],z=t(this,l)[c];if(b&&z){let A=0;const be=d(this,o,pe).call(this),Ie=be?this.targetScrollValue-be.position:0;t(this,C).current?c===0&&r===t(this,l).length-1?A=t(this,m)+t(this,y)-b.position+t(this,x):c===t(this,l).length-1&&r===0?A=z.position-(t(this,m)+t(this,y)+t(this,x)):A=z.position-b.position:A=z.position-b.position,this.shiftPosition(A-Ie,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){d(this,o,de).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,ht)||(t(this,U).set(t(this,a).current,{equalize:!0}),t(this,U).set(e,Ce({},i.tween)),n(this,ht,setTimeout(()=>{n(this,ht,void 0)},i.tween.duration||0))):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(){dt.scrollEntries.register(this),n(this,a,new Be.Damped(0,{damping:.01,min:0,order:ce.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,I,new se.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Dt)),n(this,it,new se.KeyboardControls({element:this})),t(this,it).changeEvent.subscribe(t(this,Dt)),n(this,R,new se.DragControls({element:t(this,p)})),t(this,R).changeEvent.subscribe(t(this,Dt)),n(this,v,new se.AutoplayControls({culling:this})),t(this,v).changeEvent.subscribe(t(this,Jt)),t(this,w).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,Q).current?"max":e,t(this,it).dimension=e==="x"?"width":"height",t(this,R).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,Q).subscribe(e=>{t(this,I).axis=e.current?"max":t(this,w).current}),t(this,ft).subscribe(e=>{t(this,R).inertion=typeof e.current=="number"?e.current:1}),t(this,B).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,_).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,$t).call(this):d(this,o,wt).call(this))}),t(this,T).subscribe(e=>{t(this,I).debounce=e.current,t(this,R).swipe=e.current,t(this,v).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,$t).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,wt).call(this))}),t(this,H).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,$t).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,wt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,at).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,_).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(n(this,kt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,bt).subscribe(e=>{t(this,a).damping=e.current}),t(this,mt).subscribe(e=>{t(this,a).mass=e.current}),t(this,gt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,v).speed=e.current,!t(this,nt)&&e.current&&!e.previous?t(this,v).connect():!e.current&&e.previous&&t(this,v).disconnect()}),t(this,X).subscribe(e=>{e.current||(t(this,v).direction=1)}),t(this,D).subscribe(e=>{this.isConnected&&d(this,o,at).call(this)}),t(this,Y).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,at).call(this)}),t(this,W).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,at).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&d(this,o,at).call(this)}),t(this,U).subscribe(e=>{t(this,U).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,Pt).subscribe(e=>{e.current&&!e.previous?d(this,o,re).call(this):!e.current&&e.previous&&d(this,o,ne).call(this)}),t(this,et).subscribe(e=>{e.current&&!e.previous?d(this,o,ue).call(this):!e.current&&e.previous&&d(this,o,ae).call(this)}),t(this,pt).observe(),t(this,w).observe(),t(this,V).observe(),t(this,B).observe(),t(this,_).observe(),t(this,T).observe(),t(this,Z).observe(),t(this,J).observe(),t(this,H).observe(),t(this,Q).observe(),t(this,ft).observe(),t(this,q).observe(),t(this,C).observe(),t(this,bt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,yt).observe(),t(this,Lt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,Ct).observe(),t(this,X).observe(),t(this,D).observe(),t(this,Y).observe(),t(this,W).observe(),t(this,tt).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,et).observe(),t(this,et).current||d(this,o,ae).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,pt).unobserve(),t(this,w).unobserve(),t(this,V).unobserve(),t(this,B).unobserve(),t(this,_).unobserve(),t(this,T).unobserve(),t(this,Z).unobserve(),t(this,J).unobserve(),t(this,H).unobserve(),t(this,Q).unobserve(),t(this,ft).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,bt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,yt).unobserve(),t(this,Lt).unobserve(),t(this,k).unobserve(),t(this,Ct).unobserve(),t(this,X).unobserve(),t(this,D).unobserve(),t(this,Y).unobserve(),t(this,W).unobserve(),t(this,tt).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,et).unobserve(),d(this,o,ue).call(this)}}a=new WeakMap,pt=new WeakMap,w=new WeakMap,V=new WeakMap,B=new WeakMap,_=new WeakMap,T=new WeakMap,Z=new WeakMap,J=new WeakMap,H=new WeakMap,Q=new WeakMap,ft=new WeakMap,q=new WeakMap,C=new WeakMap,bt=new WeakMap,mt=new WeakMap,gt=new WeakMap,yt=new WeakMap,Lt=new WeakMap,k=new WeakMap,Ct=new WeakMap,X=new WeakMap,D=new WeakMap,Y=new WeakMap,W=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakMap,et=new WeakMap,st=new WeakMap,p=new WeakMap,zt=new WeakMap,l=new WeakMap,jt=new WeakMap,Kt=new WeakMap,y=new WeakMap,m=new WeakMap,x=new WeakMap,I=new WeakMap,it=new WeakMap,R=new WeakMap,v=new WeakMap,P=new WeakMap,kt=new WeakMap,rt=new WeakMap,F=new WeakMap,nt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,ht=new WeakMap,U=new WeakMap,Zt=new WeakMap,M=new WeakMap,o=new WeakSet,$t=function(){d(this,o,wt).call(this),t(this,zt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new $e(e,i,this))}),t(this,p).style.transform="",ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,at).call(this)},wt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},re=function(){t(this,nt)||(n(this,nt,!0),t(this,a).unsubscribe(t(this,qt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Tt)),clearInterval(t(this,ht)),t(this,U).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,it).disconnect(),t(this,R).disconnect(),t(this,v).disconnect(),t(this,F)||this.sections.forEach(e=>{e.unsetTransform()}))},ne=function(){t(this,nt)&&(n(this,nt,!1),t(this,a).subscribe(t(this,qt)),t(this,I).connect(),t(this,it).connect(),t(this,R).connect(),t(this,k).current&&t(this,v).connect())},ue=function(){t(this,Et)||(n(this,Et,!0),he.windowResizer.unsubscribe(t(this,L)),Nt.elementResizer.unsubscribe(t(this,L)),d(this,o,re).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,wt).call(this):(t(this,P).reset(),t(this,a).reset()),dt.scrollEntries.unregister(this))},ae=function(){t(this,Et)&&(n(this,Et,!1),dt.scrollEntries.register(this),(t(this,C).current||t(this,_).current||t(this,C).current||t(this,H).current||t(this,T).current)&&d(this,o,$t).call(this),d(this,o,ne).call(this),he.windowResizer.subscribe(t(this,L),ce.RESIZE_ORDER.SCROLL),Nt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,qt=new WeakMap,xe=function(e){let i=t(this,P).current;return t(this,C).current?(i=e%t(this,l).length,i=i<0?t(this,l).length+i:i):i=Ee.clamp(e,0,this.limit),i},Dt=new WeakMap,Jt=new WeakMap,de=function(e=1){t(this,X).current&&(t(this,v).direction=e),t(this,k).current&&t(this,v).pauseAndContinue(t(this,Ct).current,this.sectionalCSSProperty.current)},Se=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,x));return i<0?t(this,m)+i+t(this,y)+t(this,x):i}else return t(this,a)[e]},at=function(){if(t(this,l).length){const e=t(this,P).current+t(this,Y).current;if(e===0?n(this,M,"start"):e===this.limit?n(this,M,"end"):n(this,M,null),ie.dispatchEvent(this,"scrollLine",{detail:{line:t(this,M)}}),t(this,D).current){this.classList.remove("end","start"),t(this,M)&&this.classList.add(t(this,M));const i=t(this,q).current+t(this,W).current;t(this,l).forEach((r,c)=>{const b=e-this.limit-1+t(this,W).current,z=e+i,A=this.sections.length-z;c>=e&&c<z||c<=b?r.mark("current"):c>=z&&c<z+A/2||c<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(e=this.targetScrollValue){let i=null,r=1/0;for(let c=0;c<t(this,l).length;c++){const b=Math.abs(t(this,l)[c].position-e);b<r&&(r=b,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ut);var Qt;class fe extends HTMLElement{constructor(){super(...arguments);s(this,Qt,null)}get scrollElement(){return t(this,Qt)}connectedCallback(){const e=we.findParentElement(this,Ut);e instanceof Ut?n(this,Qt,e):console.error(this,"e-scroll not found")}}Qt=new WeakMap;var ot,E,$,N,It,Rt,lt,Mt,Xt,Yt;class Le extends fe{constructor(){super();s(this,ot,null);s(this,E,null);s(this,$,!1);s(this,N,0);s(this,It,0);s(this,Rt,0);s(this,lt,()=>{n(this,$,this.offsetWidth>this.offsetHeight);const e=t(this,$)?this.offsetWidth:this.offsetHeight;n(this,N,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,N,Math.max(t(this,N),30)),t(this,$)?(t(this,E).style.width=t(this,N)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,N)+"px"),n(this,It,e-t(this,N)),this.scrollElement.scrollSize?this.style.display="":this.style.display="none",t(this,Mt).call(this)});s(this,Mt,()=>{n(this,Rt,this.scrollElement.currentProgress*t(this,It)),t(this,$)?t(this,E).style.transform=`translate3d(${t(this,Rt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,Rt)}px, 0px)`});s(this,Xt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Yt,e=>{document.documentElement.classList.add("grabbing"),We.setupDrag(c=>{const b=t(this,$)?c.x:c.y,z=this.scrollElement.distance/t(this,It),A=(b-r)*z;this.scrollElement.setPosition(i+A)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,$)?e.x:e.y});if(oe.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Pe.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],n(this,ot,document.createElement("slot")),t(this,ot).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,ot))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,ot).assignedElements()[0]||t(this,ot).firstElementChild;n(this,E,e),t(this,E).addEventListener("pointerdown",t(this,Yt)),he.windowResizer.subscribe(t(this,lt),ce.RESIZE_ORDER.SCROLL),Nt.elementResizer.subscribe(this,t(this,lt)),Nt.elementResizer.subscribe(this.scrollElement,t(this,lt)),this.scrollElement.onScroll(t(this,Mt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Xt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,E).removeEventListener("pointerdown",t(this,Yt)),he.windowResizer.unsubscribe(t(this,lt)),Nt.elementResizer.unsubscribe(t(this,lt)),this.scrollElement.offScroll(t(this,Mt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Xt))}}ot=new WeakMap,E=new WeakMap,$=new WeakMap,N=new WeakMap,It=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Le);var At,Ot,Vt;class ze extends fe{constructor(){super();s(this,At,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ot,new S.CSSProperty(this,"--tween-easing",!1));s(this,Vt,new S.CSSProperty(this,"--tween-duration",0));oe.isBrowser&&this.addEventListener("click",()=>{const e=t(this,At).current,i=t(this,Ot).current,r=t(this,Vt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,At).observe(),t(this,Ot).observe(),t(this,Vt).observe()}disconnectedCallback(){t(this,At).close(),t(this,Ot).close(),t(this,Vt).close()}}At=new WeakMap,Ot=new WeakMap,Vt=new WeakMap;var Bt;class ke extends ze{constructor(){super(...arguments);s(this,Bt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Bt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Bt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Bt).close()}}Bt=new WeakMap;customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ke);var G,_t;class Te extends ze{constructor(){super(...arguments);s(this,G,new S.CSSProperty(this,"--step",1));s(this,_t,()=>{this.scrollElement.loopCSSProperty.current||(t(this,G).current>0&&this.scrollElement.scrollLine==="end"||t(this,G).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled"))})}handleClick(e){this.scrollElement.shiftSections(t(this,G).current,e)}connectedCallback(){super.connectedCallback(),t(this,G).subscribe(()=>{t(this,_t).call(this)}),t(this,G).observe(),this.scrollElement.addEventListener("scrollLine",t(this,_t)),t(this,_t).call(this)}disconnectedCallback(){super.disconnectedCallback(),t(this,G).close()}}G=new WeakMap,_t=new WeakMap;customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Te);var j,ct,Ht,te,ee,Wt;class Ge{constructor(h,e,i){s(this,j,null);s(this,ct,null);s(this,Ht,null);s(this,te,null);s(this,ee,()=>{t(this,ct).scrollToSection(t(this,Ht),{behaviour:t(this,te)})});s(this,Wt,()=>{t(this,j).classList.toggle("current",t(this,ct).counter.current===t(this,Ht))});oe.isBrowser&&(n(this,j,document.createElement("button")),n(this,ct,h),n(this,te,i),n(this,Ht,e),t(this,j).addEventListener("click",t(this,ee)),t(this,ct).counter.subscribe(t(this,Wt)),t(this,Wt).call(this))}get element(){return t(this,j)}destroy(){t(this,j).removeEventListener("click",t(this,ee)),t(this,ct).counter.unsubscribe(t(this,Wt)),t(this,j).remove()}}j=new WeakMap,ct=new WeakMap,Ht=new WeakMap,te=new WeakMap,ee=new WeakMap,Wt=new WeakMap;var ut,Ft;class qe extends fe{constructor(){super(...arguments);s(this,ut,[]);s(this,Ft,Fe.debounce(()=>{t(this,ut).forEach(e=>e.destroy()),n(this,ut,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ge(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ut).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Ft)),t(this,Ft).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Ft)),t(this,ut).forEach(e=>e.destroy()),n(this,ut,[])}}ut=new WeakMap,Ft=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",qe);class De extends Ue.ScrollSegmentElement{connectedCallback(){const h=we.findParentElement(this,Ut);h instanceof Ut?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",De);exports.ScrollBulletButtonsElement=qe;exports.ScrollElement=Ut;exports.ScrollSegmentElement=De;exports.ScrollSetButtonElement=ke;exports.ScrollStepButtonElement=Te;exports.ScrollbarElement=Le;
|
|
1
|
+
"use strict";var Re=Object.defineProperty;var me=Object.getOwnPropertySymbols;var Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var ye=u=>{throw TypeError(u)};var ge=(u,h,e)=>h in u?Re(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Ce=(u,h)=>{for(var e in h||(h={}))Ae.call(h,e)&&ge(u,e,h[e]);if(me)for(var e of me(h))Me.call(h,e)&&ge(u,e,h[e]);return u};var le=(u,h,e)=>h.has(u)||ye("Cannot "+e);var t=(u,h,e)=>(le(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?ye("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(le(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),d=(u,h,e)=>(le(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("../../Store-CDb6RMce.cjs"),oe=require("../../browser-CpzFX2xg.cjs"),Ve=require("../../easings-GegIwET5.cjs"),ie=require("../../events-KVanG9sR.cjs"),Pe=require("../../jss-GJLvaNfT.cjs"),xt=require("../../layout-8ryRAMGJ.cjs"),Ee=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const ce=require("../../order/index.cjs"),Be=require("../../Damped-CTsV8tl_.cjs"),_e=require("../../Tweened-lT5myPAZ.cjs"),se=require("../../controls/index.cjs"),he=require("../../window-resizer/vanilla/index.cjs"),dt=require("../../scroll-entries/index.cjs"),ve=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),He=require("../../device/index.cjs"),Nt=require("../../element-resizer/vanilla/index.cjs"),We=require("../../gestures-DHLrn6Q8.cjs"),we=require("../../dom-JBOkFLTh.cjs"),Fe=require("../../function-MthRj-GJ.cjs"),Ue=require("../../scroll-segment/index.cjs");var f,Gt,g,St,O,K;class $e{constructor(h,e,i){s(this,f);s(this,Gt);s(this,g);s(this,St,0);s(this,O,0);s(this,K,null);n(this,f,h),n(this,Gt,e),n(this,g,i),dt.scrollEntries.register(t(this,f))}get index(){return t(this,Gt)}get size(){return t(this,St)}get position(){return t(this,O)}destroy(){dt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,St,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,O,t(this,g).vertical?xt.getCumulativeOffsetTop(t(this,f)):xt.getCumulativeOffsetLeft(t(this,f))),n(this,O,t(this,O)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,O)+t(this,St)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),dt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,O)-t(this,g).viewportSize-e,c=t(this,O)+t(this,St)+e,b=Ee.clamp(i,r,c);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,K)!==h&&(t(this,K)&&t(this,f).classList.remove(t(this,K)),h&&t(this,f).classList.add(h),n(this,K,h),ie.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,K)},custom:!0}))}}f=new WeakMap,Gt=new WeakMap,g=new WeakMap,St=new WeakMap,O=new WeakMap,K=new WeakMap;const Ne=Pe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,pt,w,V,B,_,T,Z,J,H,Q,ft,q,C,bt,mt,gt,yt,Lt,k,Ct,X,D,Y,W,tt,vt,Pt,et,st,p,zt,l,jt,Kt,y,m,x,I,it,R,v,P,kt,rt,F,nt,Et,Tt,ht,U,Zt,A,o,$t,wt,re,ne,ue,ae,L,qt,xe,Dt,Jt,de,Se,at,pe;class Ut extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,pt,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,V,new S.CSSProperty(this,"--direction",0));s(this,B,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,_,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Z,new S.CSSProperty(this,"--tween-easing",!1));s(this,J,new S.CSSProperty(this,"--tween-duration",!1));s(this,H,new S.CSSProperty(this,"--auto-size",!1));s(this,Q,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,ft,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,bt,new S.CSSProperty(this,"--damping",20));s(this,mt,new S.CSSProperty(this,"--mass",0));s(this,gt,new S.CSSProperty(this,"--stiffness",0));s(this,yt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Lt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,Ct,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,X,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,Y,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,W,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,tt,new S.CSSProperty(this,"--focus-delay",0));s(this,vt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,Pt,new S.CSSProperty(this,"--disabled",!1));s(this,et,new S.CSSProperty(this,"--hibernated",!1));s(this,st,null);s(this,p,null);s(this,zt,null);s(this,l,[]);s(this,jt,0);s(this,Kt,0);s(this,y,0);s(this,m,0);s(this,x,0);s(this,I,null);s(this,it,null);s(this,R,null);s(this,v,null);s(this,P,new Oe.Store(0));s(this,kt,0);s(this,rt,0);s(this,F,!1);s(this,nt,!0);s(this,Et,!0);s(this,Tt);s(this,ht);s(this,U,new _e.Tweened);s(this,Zt,!1);s(this,A,null);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,jt,this.vertical?xt.getCumulativeOffsetTop(this):xt.getCumulativeOffsetLeft(this)),n(this,Kt,this.vertical?xt.getCumulativeOffsetTop(t(this,p)):xt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,x,ve.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,x,ve.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,H).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,y)-t(this,x)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,B).current){n(this,m,t(this,y)*t(this,B).current);const r=t(this,m)+t(this,y);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",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+c),t(this,a).max=t(this,m)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,y),b=t(this,m)-c;n(this,rt,r.position+r.size+b)}else n(this,rt,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,F,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,F)),t(this,F)?d(this,o,ne).call(this):d(this,o,re).call(this),t(this,qt).call(this)});s(this,qt,()=>{if(!t(this,F))return;const e=this.currentScrollValue;if(n(this,kt,Math.max(0,e-t(this,m))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,P).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)`;dt.scrollEntries.update(this,t(this,w).current,e)});s(this,Dt,(e,i)=>{t(this,pt).current&&(d(this,o,de).call(this,Math.sign(i)||1),t(this,Jt).call(this,e,i))});s(this,Jt,(e,i)=>{if(t(this,V).current){if(t(this,V).current<0&&i>0)return;if(t(this,V).current>0&&i<0)return}if(t(this,ht)||t(this,U).unlistenAnimationFrame(),!t(this,k).current&&t(this,tt).current&&(clearInterval(t(this,Tt)),n(this,Tt,setTimeout(()=>{const r=d(this,o,pe).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,vt).current,easing:Ve.easeInOutExpo}})},t(this,tt).current))),!(e.includes("drag")&&!He.device.isMobile&&!t(this,yt).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const c={tween:t(this,Z).current||t(this,J).current?{easing:t(this,Z).current||"easeInOutCubic",duration:t(this,J).current||500}:void 0};t(this,Zt)?this.scrollToSection(t(this,P).current,c):this.shiftSections(r,c)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Zt,e==="drag")}});if(oe.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ne];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,st,document.createElement("div")),t(this,st).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,zt,document.createElement("slot")),t(this,p).appendChild(t(this,zt)),t(this,st).appendChild(t(this,p)),e.appendChild(t(this,st))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,pt)}get axisCSSProperty(){return t(this,w)}get directionCSSProperty(){return t(this,V)}get pagesCSSProperty(){return t(this,B)}get splitCSSProperty(){return t(this,_)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Z)}get durationCSSProperty(){return t(this,J)}get autoSizeCSSProperty(){return t(this,H)}get wheelMaxDeltaCSSProperty(){return t(this,Q)}get dragInertionCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,bt)}get massCSSProperty(){return t(this,mt)}get stiffnessCSSProperty(){return t(this,gt)}get mouseDragCSSProperty(){return t(this,yt)}get sectionDistanceScaleCSSProperty(){return t(this,Lt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,Ct)}get autoplayUserDirectionCSSProperty(){return t(this,X)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,Y)}get currentIndexEndOffsetCSSProperty(){return t(this,W)}get focusDelayCSSProperty(){return t(this,tt)}get focusDurationCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Pt)}get hibernatedCSSProperty(){return t(this,et)}get currentScrollValue(){return d(this,o,Se).call(this,"current")}get targetScrollValue(){return d(this,o,Se).call(this,"target")}get contentWrapperElement(){return t(this,st)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,jt)}get contentPosition(){return t(this,Kt)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,x)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,rt)}get loopDistance(){return t(this,C).current?t(this,rt)+t(this,x):t(this,rt)}get hasOverflow(){return t(this,F)}get overscroll(){return t(this,kt)}get scrollLine(){return t(this,A)}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,l).length)return;const r=t(this,P).current,c=d(this,o,xe).call(this,e),b=t(this,l)[r],z=t(this,l)[c];if(b&&z){let M=0;const be=d(this,o,pe).call(this),Ie=be?this.targetScrollValue-be.position:0;t(this,C).current?c===0&&r===t(this,l).length-1?M=t(this,m)+t(this,y)-b.position+t(this,x):c===t(this,l).length-1&&r===0?M=z.position-(t(this,m)+t(this,y)+t(this,x)):M=z.position-b.position:M=z.position-b.position,this.shiftPosition(M-Ie,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){d(this,o,de).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,ht)||(t(this,U).set(t(this,a).current,{equalize:!0}),t(this,U).set(e,Ce({},i.tween)),n(this,ht,setTimeout(()=>{n(this,ht,void 0)},i.tween.duration||0))):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(){dt.scrollEntries.register(this),n(this,a,new Be.Damped(0,{damping:.01,min:0,order:ce.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,I,new se.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Dt)),n(this,it,new se.KeyboardControls({element:this})),t(this,it).changeEvent.subscribe(t(this,Dt)),n(this,R,new se.DragControls({element:t(this,p)})),t(this,R).changeEvent.subscribe(t(this,Dt)),n(this,v,new se.AutoplayControls({culling:this})),t(this,v).changeEvent.subscribe(t(this,Jt)),t(this,w).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,Q).current?"max":e,t(this,it).dimension=e==="x"?"width":"height",t(this,R).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,Q).subscribe(e=>{t(this,I).axis=e.current?"max":t(this,w).current}),t(this,ft).subscribe(e=>{t(this,R).inertion=typeof e.current=="number"?e.current:1}),t(this,B).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,_).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,$t).call(this):d(this,o,wt).call(this))}),t(this,T).subscribe(e=>{t(this,I).debounce=e.current,t(this,R).swipe=e.current,t(this,v).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,$t).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,wt).call(this))}),t(this,H).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,$t).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,wt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,at).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,_).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(n(this,kt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,bt).subscribe(e=>{t(this,a).damping=e.current}),t(this,mt).subscribe(e=>{t(this,a).mass=e.current}),t(this,gt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,v).speed=e.current,!t(this,nt)&&e.current&&!e.previous?t(this,v).connect():!e.current&&e.previous&&t(this,v).disconnect()}),t(this,X).subscribe(e=>{e.current||(t(this,v).direction=1)}),t(this,D).subscribe(e=>{this.isConnected&&d(this,o,at).call(this)}),t(this,Y).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,at).call(this)}),t(this,W).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,at).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&d(this,o,at).call(this)}),t(this,U).subscribe(e=>{t(this,U).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,Pt).subscribe(e=>{e.current&&!e.previous?d(this,o,re).call(this):!e.current&&e.previous&&d(this,o,ne).call(this)}),t(this,et).subscribe(e=>{e.current&&!e.previous?d(this,o,ue).call(this):!e.current&&e.previous&&d(this,o,ae).call(this)}),t(this,pt).observe(),t(this,w).observe(),t(this,V).observe(),t(this,B).observe(),t(this,_).observe(),t(this,T).observe(),t(this,Z).observe(),t(this,J).observe(),t(this,H).observe(),t(this,Q).observe(),t(this,ft).observe(),t(this,q).observe(),t(this,C).observe(),t(this,bt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,yt).observe(),t(this,Lt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,Ct).observe(),t(this,X).observe(),t(this,D).observe(),t(this,Y).observe(),t(this,W).observe(),t(this,tt).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,et).observe(),t(this,et).current||d(this,o,ae).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,pt).unobserve(),t(this,w).unobserve(),t(this,V).unobserve(),t(this,B).unobserve(),t(this,_).unobserve(),t(this,T).unobserve(),t(this,Z).unobserve(),t(this,J).unobserve(),t(this,H).unobserve(),t(this,Q).unobserve(),t(this,ft).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,bt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,yt).unobserve(),t(this,Lt).unobserve(),t(this,k).unobserve(),t(this,Ct).unobserve(),t(this,X).unobserve(),t(this,D).unobserve(),t(this,Y).unobserve(),t(this,W).unobserve(),t(this,tt).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,et).unobserve(),d(this,o,ue).call(this)}}a=new WeakMap,pt=new WeakMap,w=new WeakMap,V=new WeakMap,B=new WeakMap,_=new WeakMap,T=new WeakMap,Z=new WeakMap,J=new WeakMap,H=new WeakMap,Q=new WeakMap,ft=new WeakMap,q=new WeakMap,C=new WeakMap,bt=new WeakMap,mt=new WeakMap,gt=new WeakMap,yt=new WeakMap,Lt=new WeakMap,k=new WeakMap,Ct=new WeakMap,X=new WeakMap,D=new WeakMap,Y=new WeakMap,W=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakMap,et=new WeakMap,st=new WeakMap,p=new WeakMap,zt=new WeakMap,l=new WeakMap,jt=new WeakMap,Kt=new WeakMap,y=new WeakMap,m=new WeakMap,x=new WeakMap,I=new WeakMap,it=new WeakMap,R=new WeakMap,v=new WeakMap,P=new WeakMap,kt=new WeakMap,rt=new WeakMap,F=new WeakMap,nt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,ht=new WeakMap,U=new WeakMap,Zt=new WeakMap,A=new WeakMap,o=new WeakSet,$t=function(){d(this,o,wt).call(this),t(this,zt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new $e(e,i,this))}),t(this,p).style.transform="",ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,at).call(this)},wt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},re=function(){t(this,nt)||(n(this,nt,!0),t(this,a).unsubscribe(t(this,qt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Tt)),clearInterval(t(this,ht)),t(this,U).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,it).disconnect(),t(this,R).disconnect(),t(this,v).disconnect(),t(this,F)||this.sections.forEach(e=>{e.unsetTransform()}))},ne=function(){t(this,nt)&&(n(this,nt,!1),t(this,a).subscribe(t(this,qt)),t(this,I).connect(),t(this,it).connect(),t(this,R).connect(),t(this,k).current&&t(this,v).connect())},ue=function(){t(this,Et)||(n(this,Et,!0),he.windowResizer.unsubscribe(t(this,L)),Nt.elementResizer.unsubscribe(t(this,L)),d(this,o,re).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,wt).call(this):(t(this,P).reset(),t(this,a).reset()),dt.scrollEntries.unregister(this))},ae=function(){t(this,Et)&&(n(this,Et,!1),dt.scrollEntries.register(this),(t(this,C).current||t(this,_).current||t(this,C).current||t(this,H).current||t(this,T).current)&&d(this,o,$t).call(this),d(this,o,ne).call(this),he.windowResizer.subscribe(t(this,L),ce.RESIZE_ORDER.SCROLL),Nt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,qt=new WeakMap,xe=function(e){let i=t(this,P).current;return t(this,C).current?(i=e%t(this,l).length,i=i<0?t(this,l).length+i:i):i=Ee.clamp(e,0,this.limit),i},Dt=new WeakMap,Jt=new WeakMap,de=function(e=1){t(this,X).current&&(t(this,v).direction=e),t(this,k).current&&t(this,v).pauseAndContinue(t(this,Ct).current,this.sectionalCSSProperty.current)},Se=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,x));return i<0?t(this,m)+i+t(this,y)+t(this,x):i}else return t(this,a)[e]},at=function(){if(t(this,l).length){const e=t(this,P).current+t(this,Y).current;if(e===0?n(this,A,"start"):e===this.limit?n(this,A,"end"):n(this,A,null),ie.dispatchEvent(this,"scrollLine",{detail:{line:t(this,A)}}),t(this,D).current){this.classList.remove("end","start"),t(this,A)&&this.classList.add(t(this,A));const i=t(this,q).current+t(this,W).current;t(this,l).forEach((r,c)=>{const b=e-this.limit-1+t(this,W).current,z=e+i,M=this.sections.length-z;c>=e&&c<z||c<=b?r.mark("current"):c>=z&&c<z+M/2||c<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(e=this.targetScrollValue){let i=null,r=1/0;for(let c=0;c<t(this,l).length;c++){const b=Math.abs(t(this,l)[c].position-e);b<r&&(r=b,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ut);var Qt;class fe extends HTMLElement{constructor(){super(...arguments);s(this,Qt,null)}get scrollElement(){return t(this,Qt)}connectedCallback(){const e=we.findParentElement(this,Ut);e instanceof Ut?n(this,Qt,e):console.error(this,"e-scroll not found")}}Qt=new WeakMap;var ot,E,$,N,It,Rt,lt,At,Xt,Yt;class Le extends fe{constructor(){super();s(this,ot,null);s(this,E,null);s(this,$,!1);s(this,N,0);s(this,It,0);s(this,Rt,0);s(this,lt,()=>{n(this,$,this.offsetWidth>this.offsetHeight);const e=t(this,$)?this.offsetWidth:this.offsetHeight;n(this,N,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,N,Math.max(t(this,N),30)),t(this,$)?(t(this,E).style.width=t(this,N)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,N)+"px"),n(this,It,e-t(this,N)),this.scrollElement.scrollSize?this.style.display="":this.style.display="none",t(this,At).call(this)});s(this,At,()=>{n(this,Rt,this.scrollElement.currentProgress*t(this,It)),t(this,$)?t(this,E).style.transform=`translate3d(${t(this,Rt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,Rt)}px, 0px)`});s(this,Xt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Yt,e=>{document.documentElement.classList.add("grabbing"),We.setupDrag(c=>{const b=t(this,$)?c.x:c.y,z=this.scrollElement.distance/t(this,It),M=(b-r)*z;this.scrollElement.setPosition(i+M)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,$)?e.x:e.y});if(oe.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Pe.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],n(this,ot,document.createElement("slot")),t(this,ot).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,ot))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,ot).assignedElements()[0]||t(this,ot).firstElementChild;n(this,E,e),t(this,E).addEventListener("pointerdown",t(this,Yt)),he.windowResizer.subscribe(t(this,lt),ce.RESIZE_ORDER.SCROLL),Nt.elementResizer.subscribe(this,t(this,lt)),Nt.elementResizer.subscribe(this.scrollElement,t(this,lt)),this.scrollElement.onScroll(t(this,At)),this.scrollElement.axisCSSProperty.subscribe(t(this,Xt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,E).removeEventListener("pointerdown",t(this,Yt)),he.windowResizer.unsubscribe(t(this,lt)),Nt.elementResizer.unsubscribe(t(this,lt)),this.scrollElement.offScroll(t(this,At)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Xt))}}ot=new WeakMap,E=new WeakMap,$=new WeakMap,N=new WeakMap,It=new WeakMap,Rt=new WeakMap,lt=new WeakMap,At=new WeakMap,Xt=new WeakMap,Yt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Le);var Mt,Ot,Vt;class ze extends fe{constructor(){super();s(this,Mt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ot,new S.CSSProperty(this,"--tween-easing",!1));s(this,Vt,new S.CSSProperty(this,"--tween-duration",0));oe.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Mt).current,i=t(this,Ot).current,r=t(this,Vt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Mt).observe(),t(this,Ot).observe(),t(this,Vt).observe()}disconnectedCallback(){t(this,Mt).close(),t(this,Ot).close(),t(this,Vt).close()}}Mt=new WeakMap,Ot=new WeakMap,Vt=new WeakMap;var Bt;class ke extends ze{constructor(){super(...arguments);s(this,Bt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Bt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Bt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Bt).close()}}Bt=new WeakMap;customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ke);var G,_t;class Te extends ze{constructor(){super(...arguments);s(this,G,new S.CSSProperty(this,"--step",1));s(this,_t,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,G).current>0&&this.scrollElement.scrollLine==="end"||t(this,G).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,G).current,e)}connectedCallback(){super.connectedCallback(),t(this,G).subscribe(()=>{t(this,_t).call(this)}),t(this,G).observe(),this.scrollElement.addEventListener("scrollLine",t(this,_t)),t(this,_t).call(this)}disconnectedCallback(){super.disconnectedCallback(),t(this,G).close(),this.removeAttribute("disabled")}}G=new WeakMap,_t=new WeakMap;customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Te);var j,ct,Ht,te,ee,Wt;class Ge{constructor(h,e,i){s(this,j,null);s(this,ct,null);s(this,Ht,null);s(this,te,null);s(this,ee,()=>{t(this,ct).scrollToSection(t(this,Ht),{behaviour:t(this,te)})});s(this,Wt,()=>{t(this,j).classList.toggle("current",t(this,ct).counter.current===t(this,Ht))});oe.isBrowser&&(n(this,j,document.createElement("button")),n(this,ct,h),n(this,te,i),n(this,Ht,e),t(this,j).addEventListener("click",t(this,ee)),t(this,ct).counter.subscribe(t(this,Wt)),t(this,Wt).call(this))}get element(){return t(this,j)}destroy(){t(this,j).removeEventListener("click",t(this,ee)),t(this,ct).counter.unsubscribe(t(this,Wt)),t(this,j).remove()}}j=new WeakMap,ct=new WeakMap,Ht=new WeakMap,te=new WeakMap,ee=new WeakMap,Wt=new WeakMap;var ut,Ft;class qe extends fe{constructor(){super(...arguments);s(this,ut,[]);s(this,Ft,Fe.debounce(()=>{t(this,ut).forEach(e=>e.destroy()),n(this,ut,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ge(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ut).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Ft)),t(this,Ft).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Ft)),t(this,ut).forEach(e=>e.destroy()),n(this,ut,[])}}ut=new WeakMap,Ft=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",qe);class De extends Ue.ScrollSegmentElement{connectedCallback(){const h=we.findParentElement(this,Ut);h instanceof Ut?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",De);exports.ScrollBulletButtonsElement=qe;exports.ScrollElement=Ut;exports.ScrollSegmentElement=De;exports.ScrollSetButtonElement=ke;exports.ScrollStepButtonElement=Te;exports.ScrollbarElement=Le;
|
|
@@ -16,13 +16,13 @@ var he = (a, h, e) => h.has(a) || ge("Cannot " + e);
|
|
|
16
16
|
var t = (a, h, e) => (he(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? ge("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (he(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), d = (a, h, e) => (he(a, h, "access private method"), e);
|
|
17
17
|
import { S as Te } from "../../Store-OTdcl6SX.js";
|
|
18
18
|
import { i as ne } from "../../browser-0zX67oeU.js";
|
|
19
|
-
import { q as
|
|
19
|
+
import { q as Ae } from "../../easings-BEmRlrDd.js";
|
|
20
20
|
import { d as ee } from "../../events-CsVF98U6.js";
|
|
21
21
|
import { c as Ce } from "../../jss-CjccJC-K.js";
|
|
22
22
|
import { a as oe, g as le } from "../../layout-HoBT_Da2.js";
|
|
23
23
|
import { c as we } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
|
-
import { TICK_ORDER as
|
|
25
|
+
import { TICK_ORDER as Me, RESIZE_ORDER as Ee } from "../../order/index.js";
|
|
26
26
|
import { D as Ve } from "../../Damped-Chu29wn-.js";
|
|
27
27
|
import { T as Oe } from "../../Tweened-DJzAFsVZ.js";
|
|
28
28
|
import { WheelControls as Re, KeyboardControls as He, DragControls as Be, AutoplayControls as We } from "../../controls/index.js";
|
|
@@ -128,7 +128,7 @@ const Ge = Ce({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u, pt, x, H, B, W, D, j, J, F, Q, mt, I, y, bt, St, gt, vt, Pt, z, yt, X, T, Y, $, tt, Ct, wt, et, st, p, Lt, l, Kt, _t, v, S, P,
|
|
131
|
+
var u, pt, x, H, B, W, D, j, J, F, Q, mt, I, y, bt, St, gt, vt, Pt, z, yt, X, T, Y, $, tt, Ct, wt, et, st, p, Lt, l, Kt, _t, v, S, P, A, it, M, C, w, kt, rt, q, nt, Et, zt, ht, N, Zt, V, o, qt, xt, se, ie, ce, ae, L, Dt, Pe, It, jt, ue, de, ut, fe;
|
|
132
132
|
class Ut extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
@@ -213,9 +213,9 @@ class Ut extends HTMLElement {
|
|
|
213
213
|
s(this, v, 0);
|
|
214
214
|
s(this, S, 0);
|
|
215
215
|
s(this, P, 0);
|
|
216
|
-
s(this, M, null);
|
|
217
|
-
s(this, it, null);
|
|
218
216
|
s(this, A, null);
|
|
217
|
+
s(this, it, null);
|
|
218
|
+
s(this, M, null);
|
|
219
219
|
s(this, C, null);
|
|
220
220
|
s(this, w, new Te(0));
|
|
221
221
|
s(this, kt, 0);
|
|
@@ -306,7 +306,7 @@ class Ut extends HTMLElement {
|
|
|
306
306
|
r && this.scrollToSection(r.index, {
|
|
307
307
|
tween: {
|
|
308
308
|
duration: t(this, Ct).current,
|
|
309
|
-
easing:
|
|
309
|
+
easing: Ae
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
}, t(this, tt).current))), !(e.includes("drag") && !Fe.isMobile && !t(this, vt).current)) {
|
|
@@ -534,25 +534,25 @@ class Ut extends HTMLElement {
|
|
|
534
534
|
dt.register(this), n(this, u, new Ve(0, {
|
|
535
535
|
damping: 0.01,
|
|
536
536
|
min: 0,
|
|
537
|
-
order:
|
|
538
|
-
})), this.setAttribute("tabindex", "0"), n(this,
|
|
537
|
+
order: Me.SCROLL
|
|
538
|
+
})), this.setAttribute("tabindex", "0"), n(this, A, new Re({ element: t(this, p) })), t(this, A).changeEvent.subscribe(t(this, It)), n(this, it, new He({
|
|
539
539
|
element: this
|
|
540
540
|
})), t(this, it).changeEvent.subscribe(
|
|
541
541
|
t(this, It)
|
|
542
|
-
), n(this,
|
|
542
|
+
), n(this, M, new Be({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, It)), n(this, C, new We({
|
|
543
543
|
culling: this
|
|
544
544
|
})), t(this, C).changeEvent.subscribe(t(this, jt)), t(this, x).subscribe(({ current: e }) => {
|
|
545
|
-
t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this,
|
|
545
|
+
t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, A).axis = t(this, Q).current ? "max" : e, t(this, it).dimension = e === "x" ? "width" : "height", t(this, M).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, L).call(this);
|
|
546
546
|
}), t(this, Q).subscribe((e) => {
|
|
547
|
-
t(this,
|
|
547
|
+
t(this, A).axis = e.current ? "max" : t(this, x).current;
|
|
548
548
|
}), t(this, mt).subscribe((e) => {
|
|
549
|
-
t(this,
|
|
549
|
+
t(this, M).inertion = typeof e.current == "number" ? e.current : 1;
|
|
550
550
|
}), t(this, B).subscribe(() => {
|
|
551
551
|
this.isConnected && t(this, L).call(this);
|
|
552
552
|
}), t(this, W).subscribe(({ current: e }) => {
|
|
553
553
|
this.isConnected && (e ? d(this, o, qt).call(this) : d(this, o, xt).call(this));
|
|
554
554
|
}), t(this, D).subscribe((e) => {
|
|
555
|
-
t(this,
|
|
555
|
+
t(this, A).debounce = e.current, t(this, M).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
556
556
|
}), t(this, F).subscribe((e) => {
|
|
557
557
|
this.isConnected && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
558
558
|
}), t(this, I).subscribe((e) => {
|
|
@@ -591,7 +591,7 @@ class Ut extends HTMLElement {
|
|
|
591
591
|
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, pt).unobserve(), t(this, x).unobserve(), t(this, H).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, D).unobserve(), t(this, j).unobserve(), t(this, J).unobserve(), t(this, F).unobserve(), t(this, Q).unobserve(), t(this, mt).unobserve(), t(this, I).unobserve(), t(this, y).unobserve(), t(this, bt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, vt).unobserve(), t(this, Pt).unobserve(), t(this, z).unobserve(), t(this, yt).unobserve(), t(this, X).unobserve(), t(this, T).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, tt).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, et).unobserve(), d(this, o, ce).call(this);
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
u = new WeakMap(), pt = new WeakMap(), x = new WeakMap(), H = new WeakMap(), B = new WeakMap(), W = new WeakMap(), D = new WeakMap(), j = new WeakMap(), J = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), mt = new WeakMap(), I = new WeakMap(), y = new WeakMap(), bt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), vt = new WeakMap(), Pt = new WeakMap(), z = new WeakMap(), yt = new WeakMap(), X = new WeakMap(), T = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), p = new WeakMap(), Lt = new WeakMap(), l = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap(), v = new WeakMap(), S = new WeakMap(), P = new WeakMap(),
|
|
594
|
+
u = new WeakMap(), pt = new WeakMap(), x = new WeakMap(), H = new WeakMap(), B = new WeakMap(), W = new WeakMap(), D = new WeakMap(), j = new WeakMap(), J = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), mt = new WeakMap(), I = new WeakMap(), y = new WeakMap(), bt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), vt = new WeakMap(), Pt = new WeakMap(), z = new WeakMap(), yt = new WeakMap(), X = new WeakMap(), T = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), p = new WeakMap(), Lt = new WeakMap(), l = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap(), v = new WeakMap(), S = new WeakMap(), P = new WeakMap(), A = new WeakMap(), it = new WeakMap(), M = new WeakMap(), C = new WeakMap(), w = new WeakMap(), kt = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), ht = new WeakMap(), N = new WeakMap(), Zt = new WeakMap(), V = new WeakMap(), o = new WeakSet(), qt = function() {
|
|
595
595
|
d(this, o, xt).call(this), t(this, Lt).assignedElements().forEach((e, i) => {
|
|
596
596
|
e instanceof HTMLElement && t(this, l).push(new Ue(e, i, this));
|
|
597
597
|
}), t(this, p).style.transform = "", ee(this, "scrollSectionsChange", {
|
|
@@ -606,11 +606,11 @@ u = new WeakMap(), pt = new WeakMap(), x = new WeakMap(), H = new WeakMap(), B =
|
|
|
606
606
|
composed: !0
|
|
607
607
|
});
|
|
608
608
|
}, se = function() {
|
|
609
|
-
t(this, nt) || (n(this, nt, !0), t(this, u).unsubscribe(t(this, Dt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, zt)), clearInterval(t(this, ht)), t(this, N).unlistenAnimationFrame(), t(this,
|
|
609
|
+
t(this, nt) || (n(this, nt, !0), t(this, u).unsubscribe(t(this, Dt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, zt)), clearInterval(t(this, ht)), t(this, N).unlistenAnimationFrame(), t(this, A).disconnect(), t(this, it).disconnect(), t(this, M).disconnect(), t(this, C).disconnect(), t(this, q) || this.sections.forEach((e) => {
|
|
610
610
|
e.unsetTransform();
|
|
611
611
|
}));
|
|
612
612
|
}, ie = function() {
|
|
613
|
-
t(this, nt) && (n(this, nt, !1), t(this, u).subscribe(t(this, Dt)), t(this,
|
|
613
|
+
t(this, nt) && (n(this, nt, !1), t(this, u).subscribe(t(this, Dt)), t(this, A).connect(), t(this, it).connect(), t(this, M).connect(), t(this, z).current && t(this, C).connect());
|
|
614
614
|
}, ce = function() {
|
|
615
615
|
t(this, Et) || (n(this, Et, !0), re.unsubscribe(t(this, L)), Nt.unsubscribe(t(this, L)), d(this, o, se).call(this), t(this, p).style.transform = "", t(this, l).length ? d(this, o, xt).call(this) : (t(this, w).reset(), t(this, u).reset()), dt.unregister(this));
|
|
616
616
|
}, ae = function() {
|
|
@@ -667,7 +667,7 @@ class pe extends HTMLElement {
|
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
Jt = new WeakMap();
|
|
670
|
-
var ot, E, U, G, Tt,
|
|
670
|
+
var ot, E, U, G, Tt, At, lt, Mt, Qt, Xt;
|
|
671
671
|
class Ke extends pe {
|
|
672
672
|
constructor() {
|
|
673
673
|
super();
|
|
@@ -676,14 +676,14 @@ class Ke extends pe {
|
|
|
676
676
|
s(this, U, !1);
|
|
677
677
|
s(this, G, 0);
|
|
678
678
|
s(this, Tt, 0);
|
|
679
|
-
s(this,
|
|
679
|
+
s(this, At, 0);
|
|
680
680
|
s(this, lt, () => {
|
|
681
681
|
n(this, U, this.offsetWidth > this.offsetHeight);
|
|
682
682
|
const e = t(this, U) ? this.offsetWidth : this.offsetHeight;
|
|
683
|
-
n(this, G, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, G, Math.max(t(this, G), 30)), t(this, U) ? (t(this, E).style.width = t(this, G) + "px", t(this, E).style.height = "100%") : (t(this, E).style.width = "100%", t(this, E).style.height = t(this, G) + "px"), n(this, Tt, e - t(this, G)), this.scrollElement.scrollSize ? this.style.display = "" : this.style.display = "none", t(this,
|
|
683
|
+
n(this, G, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, G, Math.max(t(this, G), 30)), t(this, U) ? (t(this, E).style.width = t(this, G) + "px", t(this, E).style.height = "100%") : (t(this, E).style.width = "100%", t(this, E).style.height = t(this, G) + "px"), n(this, Tt, e - t(this, G)), this.scrollElement.scrollSize ? this.style.display = "" : this.style.display = "none", t(this, Mt).call(this);
|
|
684
684
|
});
|
|
685
|
-
s(this,
|
|
686
|
-
n(this,
|
|
685
|
+
s(this, Mt, () => {
|
|
686
|
+
n(this, At, this.scrollElement.currentProgress * t(this, Tt)), t(this, U) ? t(this, E).style.transform = `translate3d(${t(this, At)}px, 0px, 0px)` : t(this, E).style.transform = `translate3d(0px, ${t(this, At)}px, 0px)`;
|
|
687
687
|
});
|
|
688
688
|
s(this, Qt, () => {
|
|
689
689
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
@@ -741,13 +741,13 @@ class Ke extends pe {
|
|
|
741
741
|
connectedCallback() {
|
|
742
742
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
743
743
|
const e = t(this, ot).assignedElements()[0] || t(this, ot).firstElementChild;
|
|
744
|
-
n(this, E, e), t(this, E).addEventListener("pointerdown", t(this, Xt)), re.subscribe(t(this, lt), Ee.SCROLL), Nt.subscribe(this, t(this, lt)), Nt.subscribe(this.scrollElement, t(this, lt)), this.scrollElement.onScroll(t(this,
|
|
744
|
+
n(this, E, e), t(this, E).addEventListener("pointerdown", t(this, Xt)), re.subscribe(t(this, lt), Ee.SCROLL), Nt.subscribe(this, t(this, lt)), Nt.subscribe(this.scrollElement, t(this, lt)), this.scrollElement.onScroll(t(this, Mt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Qt));
|
|
745
745
|
}
|
|
746
746
|
disconnectedCallback() {
|
|
747
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, E).removeEventListener("pointerdown", t(this, Xt)), re.unsubscribe(t(this, lt)), Nt.unsubscribe(t(this, lt)), this.scrollElement.offScroll(t(this,
|
|
747
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, E).removeEventListener("pointerdown", t(this, Xt)), re.unsubscribe(t(this, lt)), Nt.unsubscribe(t(this, lt)), this.scrollElement.offScroll(t(this, Mt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Qt));
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
ot = new WeakMap(), E = new WeakMap(), U = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(),
|
|
750
|
+
ot = new WeakMap(), E = new WeakMap(), U = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap();
|
|
751
751
|
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ke);
|
|
752
752
|
var Vt, Ot, Rt;
|
|
753
753
|
class Le extends pe {
|
|
@@ -800,7 +800,7 @@ class Ze extends Le {
|
|
|
800
800
|
super(...arguments);
|
|
801
801
|
s(this, K, new f(this, "--step", 1));
|
|
802
802
|
s(this, Bt, () => {
|
|
803
|
-
this.scrollElement.loopCSSProperty.current
|
|
803
|
+
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, K).current > 0 && this.scrollElement.scrollLine === "end" || t(this, K).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
806
|
handleClick(e) {
|
|
@@ -812,7 +812,7 @@ class Ze extends Le {
|
|
|
812
812
|
}), t(this, K).observe(), this.scrollElement.addEventListener("scrollLine", t(this, Bt)), t(this, Bt).call(this);
|
|
813
813
|
}
|
|
814
814
|
disconnectedCallback() {
|
|
815
|
-
super.disconnectedCallback(), t(this, K).close();
|
|
815
|
+
super.disconnectedCallback(), t(this, K).close(), this.removeAttribute("disabled");
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
K = new WeakMap(), Bt = new WeakMap();
|