aptechka 0.5.30 → 0.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animation-AkD1vhRW.js +217 -0
- package/lib/Animation-BIRIzLIL.cjs +1 -0
- package/lib/Damped-3daHRLIW.cjs +1 -0
- package/lib/Damped-CH96byE8.js +67 -0
- package/lib/Tweened-Bv9mgPvl.cjs +1 -0
- package/lib/Tweened-DzckT3pw.js +52 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -53
- package/lib/en3/index.cjs +194 -7
- package/lib/en3/index.d.ts +1 -0
- package/lib/en3/index.js +2091 -1189
- package/lib/en3/objects/fluid/Advection.d.ts +30 -0
- package/lib/en3/objects/fluid/Divergence.d.ts +23 -0
- package/lib/en3/objects/fluid/En3Fluid.d.ts +16 -0
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +14 -0
- package/lib/en3/objects/fluid/En3FluidPointer.d.ts +13 -0
- package/lib/en3/objects/fluid/ExternalForce.d.ts +19 -0
- package/lib/en3/objects/fluid/Poisson.d.ts +24 -0
- package/lib/en3/objects/fluid/Pressure.d.ts +26 -0
- package/lib/en3/objects/fluid/ShaderPass.d.ts +24 -0
- package/lib/en3/objects/fluid/Simulation.d.ts +33 -0
- package/lib/en3/objects/fluid/Viscous.d.ts +30 -0
- package/lib/en3/objects/fluid/index.d.ts +6 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +29 -31
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +1 -1
- package/package.json +1 -1
- package/lib/Damped-DxwUBxOC.cjs +0 -1
- package/lib/Damped-QZAoXO5Z.js +0 -257
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-C-1ruEIm.cjs"),qs=require("../Derived-B-g8dYgh.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-DxwUBxOC.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-Djb6mb1o.cjs"),cs=require("../createStylesheet-CqHU9_qv.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.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"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.var},':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:bs.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-C-1ruEIm.cjs"),qs=require("../Derived-B-g8dYgh.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-3daHRLIW.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-Djb6mb1o.cjs"),cs=require("../createStylesheet-CqHU9_qv.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.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"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.var},':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:bs.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
package/lib/scroll/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { a as Re, g as Te } from "../layout-HoBT_Da2.js";
|
|
|
14
14
|
import { c as Es, s as Zs } from "../math-BOBiC4TN.js";
|
|
15
15
|
import "../ticker/index.js";
|
|
16
16
|
import { TICK_ORDER as xs, RESIZE_ORDER as ls } from "../order/index.js";
|
|
17
|
-
import { D as Ls } from "../Damped-
|
|
17
|
+
import { D as Ls } from "../Damped-CH96byE8.js";
|
|
18
18
|
import { WheelControls as Js, KeyboardControls as Qs, DragControls as Xs, AutoplayControls as Ys } from "../controls/index.js";
|
|
19
19
|
import { CustomElement as Vs, define as ue } from "../custom-element/index.js";
|
|
20
20
|
import { windowResizer as oe } from "../window-resizer/index.js";
|
package/package.json
CHANGED
package/lib/Damped-DxwUBxOC.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var tt=Object.defineProperty,st=Object.defineProperties;var it=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var J=(r,i,t)=>i in r?tt(r,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[i]=t,R=(r,i)=>{for(var t in i||(i={}))et.call(i,t)&&J(r,t,i[t]);if(H)for(var t of H(i))rt.call(i,t)&&J(r,t,i[t]);return r},B=(r,i)=>st(r,it(i));var j=(r,i,t)=>{if(!i.has(r))throw TypeError("Cannot "+t)};var s=(r,i,t)=>(j(r,i,"read from private field"),t?t.call(r):i.get(r)),e=(r,i,t)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,t)},h=(r,i,t,n)=>(j(r,i,"write to private field"),n?n.call(r,t):i.set(r,t),t);var x=(r,i,t)=>(j(r,i,"access private method"),t);const U=require("./math-GDWEqu7y.cjs"),E=require("./number-yVpzMdbQ.cjs"),g=require("./polyfills-CrcS4RcO.cjs"),_=require("./Store-C-1ruEIm.cjs"),Q=require("./ticker/index.cjs"),ht=require("./order/index.cjs");var u,d,F,w,y,C,O,S,v,W,V,X,T,G,K,Y,z;class nt{constructor(i,t,n,P,A){e(this,v);e(this,V);e(this,T);e(this,K);e(this,u,void 0);e(this,d,void 0);e(this,F,void 0);e(this,w,void 0);e(this,y,!1);e(this,C,!1);e(this,O,!1);e(this,S,void 0);e(this,z,i=>{!s(this,O)&&s(this,u).initial!==s(this,u).current&&h(this,O,!0),s(this,O)&&(i.direction>0&&i.progress>=s(this,F).current?x(this,v,W).call(this):i.direction<0&&i.progress<=s(this,F).current&&x(this,V,X).call(this))});h(this,u,i),h(this,d,t),h(this,F,new _.Store(n,{passport:t.passport?{name:t.passport+"-start",manager:{type:"number"}}:void 0})),h(this,w,new _.Store(P,{passport:t.passport?{name:t.passport+"-set",manager:{type:"number"}}:void 0})),h(this,S,A),s(this,u).subscribe(s(this,z)),s(this,u).linked.add(this)}get targetAnimation(){return s(this,d)}get triggerAnimation(){return s(this,u)}destroy(){s(this,w).close(),s(this,F).close(),s(this,u).unsubscribe(s(this,z)),s(this,u).linked.delete(this)}}u=new WeakMap,d=new WeakMap,F=new WeakMap,w=new WeakMap,y=new WeakMap,C=new WeakMap,O=new WeakMap,S=new WeakMap,v=new WeakSet,W=function(){s(this,y)||(h(this,C,!1),h(this,y,!0),x(this,T,G).call(this,s(this,w).current))},V=new WeakSet,X=function(){s(this,y)&&!s(this,C)&&(h(this,y,!1),h(this,C,!0),x(this,T,G).call(this,s(this,d).initial))},T=new WeakSet,G=function(i){x(this,K,Y).call(this),s(this,d).updateOptions(s(this,S)),s(this,d).set(i)},K=new WeakSet,Y=function(){var i;(i=s(this,S))!=null&&i.once&&this.destroy()},z=new WeakMap;var D,M,N,f,o,b,I,a,c,l,k,p,L;class Z extends _.Store{constructor(t,n){super(t||0,n);e(this,D,void 0);e(this,M,ht.TICK_ORDER.ANIMATION);e(this,N,void 0);e(this,f,new _.Store(!1));e(this,o,new Set);e(this,b,null);e(this,I,0);e(this,a,0);e(this,c,-1/0);e(this,l,1/0);e(this,k,0);e(this,p,1);e(this,L,t=>{this.handleAnimationFrame(t)})}get linked(){return s(this,o)}get animationLink(){return s(this,b)}get direction(){return s(this,I)}get target(){return s(this,a)}get min(){return s(this,c)}set min(t){h(this,c,t),this.set(s(this,a),{equalize:!0})}get max(){return s(this,l)}set max(t){h(this,l,t),this.set(s(this,a),{equalize:!0})}get from(){return s(this,k)}get to(){return s(this,p)}get isRunning(){return s(this,f)}get currentDistance(){return Math.abs(s(this,p)-s(this,k))}get distance(){return Math.abs(s(this,l)-s(this,c))}get currentProgress(){return this.currentDistance?E.preciseNumber(Math.abs(this.current-s(this,k))/this.currentDistance,6):0}get progress(){return this.distance?E.preciseNumber(Math.abs(this.current-s(this,c))/this.distance,6):0}get entry(){return B(R({},super.entry),{from:s(this,k),to:s(this,p),currentDistance:this.currentDistance,distance:this.distance,direction:this.direction,currentProgress:this.currentProgress,progress:this.progress})}setTarget(t){h(this,I,Math.sign(t-s(this,a))),h(this,a,U.clamp(t,s(this,c),s(this,l))),h(this,k,this.current),h(this,p,t)}set(t,n){s(this,a)!==t&&(this.setTarget(t),n&&this.updateOptions(n),s(this,a)!==this.current&&this.start())}shift(t,n){this.set(s(this,a)+t,n)}reset(){this.set(this.initial,{equalize:!0}),super.reset(),s(this,o).forEach(t=>{t.targetAnimation.reset()})}close(){super.close(),this.unlistenAnimationFrame(),this.unlink(),s(this,o).clear()}listenAnimationFrame(){s(this,f).current||(s(this,f).current=!0,Q.ticker.subscribe(s(this,L),{maxFPS:s(this,D),order:s(this,M),culling:s(this,N)}))}unlistenAnimationFrame(){s(this,f).current&&(s(this,f).current=!1,Q.ticker.unsubscribe(s(this,L)),s(this,o).forEach(t=>{t.targetAnimation.unlistenAnimationFrame()}))}updateOptions(t){h(this,D,g.nullishCoalescing(t==null?void 0:t.maxFPS,s(this,D))),h(this,M,g.nullishCoalescing(t==null?void 0:t.order,s(this,M))),h(this,N,g.nullishCoalescing(t==null?void 0:t.culling,s(this,N))),h(this,c,g.nullishCoalescing(t==null?void 0:t.min,s(this,c))),h(this,l,g.nullishCoalescing(t==null?void 0:t.max,s(this,l))),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=s(this,a))}linkTo(t,n,P,A){this.unlink(),h(this,b,new nt(t,this,n,P,A))}unlink(){s(this,b)&&(s(this,b).destroy(),h(this,b,null))}start(){this.listenAnimationFrame()}}D=new WeakMap,M=new WeakMap,N=new WeakMap,f=new WeakMap,o=new WeakMap,b=new WeakMap,I=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,k=new WeakMap,p=new WeakMap,L=new WeakMap;var m,q;class at extends Z{constructor(t,n){super(t,n);e(this,m,void 0);e(this,q,void 0);this.damping=20,this.stiffness=0,this.mass=0,h(this,m,0),h(this,q,0),this.updateOptions(B(R({},n),{equalize:!0}))}get velocity(){return s(this,m)}get speed(){return s(this,q)}get entry(){return B(R({},super.entry),{velocity:s(this,m),speed:s(this,q)})}updateOptions(t){this.damping=g.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=g.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=g.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness),super.updateOptions(t)}updateManually(t){this.setTarget(t),this.current=this.target}handleAnimationFrame(t){E.preciseNumber(this.current,4)===E.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const n=this.current,P=Math.abs(n-this.target);h(this,q,P/t.timeBetweenFrames);const A=t.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const $=(this.target-this.current)*this.stiffness-s(this,m)*this.damping;h(this,m,s(this,m)+$/this.mass*A),this.current+=s(this,m)*A}else this.current=U.damp(this.current,this.target,this.damping,A)}}m=new WeakMap,q=new WeakMap;exports.Animation=Z;exports.Damped=at;
|
package/lib/Damped-QZAoXO5Z.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
var Z = Object.defineProperty, $ = Object.defineProperties;
|
|
2
|
-
var tt = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var H = Object.getOwnPropertySymbols;
|
|
4
|
-
var st = Object.prototype.hasOwnProperty, it = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var J = (r, i, t) => i in r ? Z(r, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[i] = t, E = (r, i) => {
|
|
6
|
-
for (var t in i || (i = {}))
|
|
7
|
-
st.call(i, t) && J(r, t, i[t]);
|
|
8
|
-
if (H)
|
|
9
|
-
for (var t of H(i))
|
|
10
|
-
it.call(i, t) && J(r, t, i[t]);
|
|
11
|
-
return r;
|
|
12
|
-
}, N = (r, i) => $(r, tt(i));
|
|
13
|
-
var j = (r, i, t) => {
|
|
14
|
-
if (!i.has(r))
|
|
15
|
-
throw TypeError("Cannot " + t);
|
|
16
|
-
};
|
|
17
|
-
var s = (r, i, t) => (j(r, i, "read from private field"), t ? t.call(r) : i.get(r)), e = (r, i, t) => {
|
|
18
|
-
if (i.has(r))
|
|
19
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
i instanceof WeakSet ? i.add(r) : i.set(r, t);
|
|
21
|
-
}, h = (r, i, t, n) => (j(r, i, "write to private field"), n ? n.call(r, t) : i.set(r, t), t);
|
|
22
|
-
var O = (r, i, t) => (j(r, i, "access private method"), t);
|
|
23
|
-
import { c as et, d as rt } from "./math-BOBiC4TN.js";
|
|
24
|
-
import { p as v } from "./number-Bo5RdrA1.js";
|
|
25
|
-
import { n as g } from "./polyfills-DJUYczFm.js";
|
|
26
|
-
import { S as C } from "./Store-BQXXikps.js";
|
|
27
|
-
import { ticker as Q } from "./ticker/index.js";
|
|
28
|
-
import { TICK_ORDER as ht } from "./order/index.js";
|
|
29
|
-
var u, d, p, D, k, M, o, P, V, U, K, W, I, G, _, X, L;
|
|
30
|
-
class nt {
|
|
31
|
-
constructor(i, t, n, z, b) {
|
|
32
|
-
e(this, V);
|
|
33
|
-
e(this, K);
|
|
34
|
-
e(this, I);
|
|
35
|
-
e(this, _);
|
|
36
|
-
e(this, u, void 0);
|
|
37
|
-
e(this, d, void 0);
|
|
38
|
-
e(this, p, void 0);
|
|
39
|
-
e(this, D, void 0);
|
|
40
|
-
e(this, k, !1);
|
|
41
|
-
e(this, M, !1);
|
|
42
|
-
e(this, o, !1);
|
|
43
|
-
e(this, P, void 0);
|
|
44
|
-
e(this, L, (i) => {
|
|
45
|
-
!s(this, o) && s(this, u).initial !== s(this, u).current && h(this, o, !0), s(this, o) && (i.direction > 0 && i.progress >= s(this, p).current ? O(this, V, U).call(this) : i.direction < 0 && i.progress <= s(this, p).current && O(this, K, W).call(this));
|
|
46
|
-
});
|
|
47
|
-
h(this, u, i), h(this, d, t), h(this, p, new C(n, {
|
|
48
|
-
passport: t.passport ? {
|
|
49
|
-
name: t.passport + "-start",
|
|
50
|
-
manager: {
|
|
51
|
-
type: "number"
|
|
52
|
-
}
|
|
53
|
-
} : void 0
|
|
54
|
-
})), h(this, D, new C(z, {
|
|
55
|
-
passport: t.passport ? {
|
|
56
|
-
name: t.passport + "-set",
|
|
57
|
-
manager: {
|
|
58
|
-
type: "number"
|
|
59
|
-
}
|
|
60
|
-
} : void 0
|
|
61
|
-
})), h(this, P, b), s(this, u).subscribe(s(this, L)), s(this, u).linked.add(this);
|
|
62
|
-
}
|
|
63
|
-
get targetAnimation() {
|
|
64
|
-
return s(this, d);
|
|
65
|
-
}
|
|
66
|
-
get triggerAnimation() {
|
|
67
|
-
return s(this, u);
|
|
68
|
-
}
|
|
69
|
-
destroy() {
|
|
70
|
-
s(this, D).close(), s(this, p).close(), s(this, u).unsubscribe(s(this, L)), s(this, u).linked.delete(this);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
u = new WeakMap(), d = new WeakMap(), p = new WeakMap(), D = new WeakMap(), k = new WeakMap(), M = new WeakMap(), o = new WeakMap(), P = new WeakMap(), V = new WeakSet(), U = function() {
|
|
74
|
-
s(this, k) || (h(this, M, !1), h(this, k, !0), O(this, I, G).call(this, s(this, D).current));
|
|
75
|
-
}, K = new WeakSet(), W = function() {
|
|
76
|
-
s(this, k) && !s(this, M) && (h(this, k, !1), h(this, M, !0), O(this, I, G).call(this, s(this, d).initial));
|
|
77
|
-
}, I = new WeakSet(), G = function(i) {
|
|
78
|
-
O(this, _, X).call(this), s(this, d).updateOptions(s(this, P)), s(this, d).set(i);
|
|
79
|
-
}, _ = new WeakSet(), X = function() {
|
|
80
|
-
var i;
|
|
81
|
-
(i = s(this, P)) != null && i.once && this.destroy();
|
|
82
|
-
}, L = new WeakMap();
|
|
83
|
-
var S, T, q, f, y, A, R, a, c, m, F, x, B;
|
|
84
|
-
class at extends C {
|
|
85
|
-
constructor(t, n) {
|
|
86
|
-
super(t || 0, n);
|
|
87
|
-
e(this, S, void 0);
|
|
88
|
-
e(this, T, ht.ANIMATION);
|
|
89
|
-
e(this, q, void 0);
|
|
90
|
-
e(this, f, new C(!1));
|
|
91
|
-
e(this, y, /* @__PURE__ */ new Set());
|
|
92
|
-
e(this, A, null);
|
|
93
|
-
e(this, R, 0);
|
|
94
|
-
e(this, a, 0);
|
|
95
|
-
e(this, c, -1 / 0);
|
|
96
|
-
e(this, m, 1 / 0);
|
|
97
|
-
e(this, F, 0);
|
|
98
|
-
e(this, x, 1);
|
|
99
|
-
e(this, B, (t) => {
|
|
100
|
-
this.handleAnimationFrame(t);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
get linked() {
|
|
104
|
-
return s(this, y);
|
|
105
|
-
}
|
|
106
|
-
get animationLink() {
|
|
107
|
-
return s(this, A);
|
|
108
|
-
}
|
|
109
|
-
get direction() {
|
|
110
|
-
return s(this, R);
|
|
111
|
-
}
|
|
112
|
-
get target() {
|
|
113
|
-
return s(this, a);
|
|
114
|
-
}
|
|
115
|
-
get min() {
|
|
116
|
-
return s(this, c);
|
|
117
|
-
}
|
|
118
|
-
set min(t) {
|
|
119
|
-
h(this, c, t), this.set(s(this, a), {
|
|
120
|
-
equalize: !0
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
get max() {
|
|
124
|
-
return s(this, m);
|
|
125
|
-
}
|
|
126
|
-
set max(t) {
|
|
127
|
-
h(this, m, t), this.set(s(this, a), {
|
|
128
|
-
equalize: !0
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
get from() {
|
|
132
|
-
return s(this, F);
|
|
133
|
-
}
|
|
134
|
-
get to() {
|
|
135
|
-
return s(this, x);
|
|
136
|
-
}
|
|
137
|
-
get isRunning() {
|
|
138
|
-
return s(this, f);
|
|
139
|
-
}
|
|
140
|
-
get currentDistance() {
|
|
141
|
-
return Math.abs(s(this, x) - s(this, F));
|
|
142
|
-
}
|
|
143
|
-
get distance() {
|
|
144
|
-
return Math.abs(s(this, m) - s(this, c));
|
|
145
|
-
}
|
|
146
|
-
get currentProgress() {
|
|
147
|
-
return this.currentDistance ? v(
|
|
148
|
-
Math.abs(this.current - s(this, F)) / this.currentDistance,
|
|
149
|
-
6
|
|
150
|
-
) : 0;
|
|
151
|
-
}
|
|
152
|
-
get progress() {
|
|
153
|
-
return this.distance ? v(Math.abs(this.current - s(this, c)) / this.distance, 6) : 0;
|
|
154
|
-
}
|
|
155
|
-
get entry() {
|
|
156
|
-
return N(E({}, super.entry), {
|
|
157
|
-
from: s(this, F),
|
|
158
|
-
to: s(this, x),
|
|
159
|
-
currentDistance: this.currentDistance,
|
|
160
|
-
distance: this.distance,
|
|
161
|
-
direction: this.direction,
|
|
162
|
-
currentProgress: this.currentProgress,
|
|
163
|
-
progress: this.progress
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
setTarget(t) {
|
|
167
|
-
h(this, R, Math.sign(t - s(this, a))), h(this, a, et(t, s(this, c), s(this, m))), h(this, F, this.current), h(this, x, t);
|
|
168
|
-
}
|
|
169
|
-
set(t, n) {
|
|
170
|
-
s(this, a) !== t && (this.setTarget(t), n && this.updateOptions(n), s(this, a) !== this.current && this.start());
|
|
171
|
-
}
|
|
172
|
-
shift(t, n) {
|
|
173
|
-
this.set(s(this, a) + t, n);
|
|
174
|
-
}
|
|
175
|
-
reset() {
|
|
176
|
-
this.set(this.initial, { equalize: !0 }), super.reset(), s(this, y).forEach((t) => {
|
|
177
|
-
t.targetAnimation.reset();
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
close() {
|
|
181
|
-
super.close(), this.unlistenAnimationFrame(), this.unlink(), s(this, y).clear();
|
|
182
|
-
}
|
|
183
|
-
listenAnimationFrame() {
|
|
184
|
-
s(this, f).current || (s(this, f).current = !0, Q.subscribe(s(this, B), {
|
|
185
|
-
maxFPS: s(this, S),
|
|
186
|
-
order: s(this, T),
|
|
187
|
-
culling: s(this, q)
|
|
188
|
-
}));
|
|
189
|
-
}
|
|
190
|
-
unlistenAnimationFrame() {
|
|
191
|
-
s(this, f).current && (s(this, f).current = !1, Q.unsubscribe(s(this, B)), s(this, y).forEach((t) => {
|
|
192
|
-
t.targetAnimation.unlistenAnimationFrame();
|
|
193
|
-
}));
|
|
194
|
-
}
|
|
195
|
-
updateOptions(t) {
|
|
196
|
-
h(this, S, g(t == null ? void 0 : t.maxFPS, s(this, S))), h(this, T, g(t == null ? void 0 : t.order, s(this, T))), h(this, q, g(t == null ? void 0 : t.culling, s(this, q))), h(this, c, g(t == null ? void 0 : t.min, s(this, c))), h(this, m, g(t == null ? void 0 : t.max, s(this, m))), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = s(this, a));
|
|
197
|
-
}
|
|
198
|
-
linkTo(t, n, z, b) {
|
|
199
|
-
this.unlink(), h(this, A, new nt(
|
|
200
|
-
t,
|
|
201
|
-
this,
|
|
202
|
-
n,
|
|
203
|
-
z,
|
|
204
|
-
b
|
|
205
|
-
));
|
|
206
|
-
}
|
|
207
|
-
unlink() {
|
|
208
|
-
s(this, A) && (s(this, A).destroy(), h(this, A, null));
|
|
209
|
-
}
|
|
210
|
-
start() {
|
|
211
|
-
this.listenAnimationFrame();
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
S = new WeakMap(), T = new WeakMap(), q = new WeakMap(), f = new WeakMap(), y = new WeakMap(), A = new WeakMap(), R = new WeakMap(), a = new WeakMap(), c = new WeakMap(), m = new WeakMap(), F = new WeakMap(), x = new WeakMap(), B = new WeakMap();
|
|
215
|
-
var l, w;
|
|
216
|
-
class At extends at {
|
|
217
|
-
constructor(t, n) {
|
|
218
|
-
super(t, n);
|
|
219
|
-
e(this, l, void 0);
|
|
220
|
-
e(this, w, void 0);
|
|
221
|
-
this.damping = 20, this.stiffness = 0, this.mass = 0, h(this, l, 0), h(this, w, 0), this.updateOptions(N(E({}, n), { equalize: !0 }));
|
|
222
|
-
}
|
|
223
|
-
get velocity() {
|
|
224
|
-
return s(this, l);
|
|
225
|
-
}
|
|
226
|
-
get speed() {
|
|
227
|
-
return s(this, w);
|
|
228
|
-
}
|
|
229
|
-
get entry() {
|
|
230
|
-
return N(E({}, super.entry), {
|
|
231
|
-
velocity: s(this, l),
|
|
232
|
-
speed: s(this, w)
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
updateOptions(t) {
|
|
236
|
-
this.damping = g(t == null ? void 0 : t.damping, this.damping), this.mass = g(t == null ? void 0 : t.mass, this.mass), this.stiffness = g(t == null ? void 0 : t.stiffness, this.stiffness), super.updateOptions(t);
|
|
237
|
-
}
|
|
238
|
-
updateManually(t) {
|
|
239
|
-
this.setTarget(t), this.current = this.target;
|
|
240
|
-
}
|
|
241
|
-
handleAnimationFrame(t) {
|
|
242
|
-
v(this.current, 4) === v(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
243
|
-
const n = this.current, z = Math.abs(n - this.target);
|
|
244
|
-
h(this, w, z / t.timeBetweenFrames);
|
|
245
|
-
const b = t.timeBetweenFrames / 1e3;
|
|
246
|
-
if (this.mass || this.stiffness) {
|
|
247
|
-
const Y = (this.target - this.current) * this.stiffness - s(this, l) * this.damping;
|
|
248
|
-
h(this, l, s(this, l) + Y / this.mass * b), this.current += s(this, l) * b;
|
|
249
|
-
} else
|
|
250
|
-
this.current = rt(this.current, this.target, this.damping, b);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
l = new WeakMap(), w = new WeakMap();
|
|
254
|
-
export {
|
|
255
|
-
at as A,
|
|
256
|
-
At as D
|
|
257
|
-
};
|