aptechka 0.50.19 → 0.50.20
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.
|
@@ -33,6 +33,7 @@ export declare class ScrollSegmentElement extends HTMLElement {
|
|
|
33
33
|
get releasedFromFinishCSSProperty(): CSSProperty<string>;
|
|
34
34
|
get passedVarCSSProperty(): CSSProperty<string>;
|
|
35
35
|
get progressVarCSSProperty(): CSSProperty<string>;
|
|
36
|
+
get progressArcVarCSSProperty(): CSSProperty<string>;
|
|
36
37
|
get animationVarTypeCSSProperty(): CSSProperty<"target" | "current">;
|
|
37
38
|
get distanceVarCSSProperty(): CSSProperty<string>;
|
|
38
39
|
get startVarCSSProperty(): CSSProperty<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var St=a=>{throw TypeError(a)};var ct=(a,c,r)=>c.has(a)||St("Cannot "+r);var t=(a,c,r)=>(ct(a,c,"read from private field"),r?r.call(a):c.get(a)),i=(a,c,r)=>c.has(a)?St("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(a):c.set(a,r),s=(a,c,r,e)=>(ct(a,c,"write to private field"),e?e.call(a,r):c.set(a,r),r),o=(a,c,r)=>(ct(a,c,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Lt=require("../dom-JBOkFLTh.cjs"),Rt=require("../index-Cqw2NKev.cjs"),ft=require("../element-resizer/index.cjs"),nt=require("../window-resizer/index.cjs"),u=require("../css-property/index.cjs"),pt=require("../order/index.cjs"),Y=require("../events-KVanG9sR.cjs"),zt=require("../function-MthRj-GJ.cjs"),ot=require("../layout-Ctc2p3uz.cjs"),Ot=require("../math-GDWEqu7y.cjs"),tt=require("../Store-DRp_K37w.cjs"),qt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const xt=require("../Damped-B1lXa9nb.cjs");var V,ht,et,W;class ut{constructor(c){i(this,V,null);i(this,ht);i(this,et,!1);i(this,W,()=>{s(this,et,!(t(this,V).scrollWidth>t(this,V).clientWidth))});s(this,ht,c),s(this,V,Lt.findScrollParentElement(t(this,ht))),ft.elementResizer.subscribe(t(this,V),t(this,W)),nt.windowResizer.subscribe(t(this,W)),t(this,W).call(this)}get element(){return t(this,V)}get currentScrollValue(){return t(this,et)?t(this,V).scrollTop:t(this,V).scrollLeft}get vertical(){return t(this,et)}destroy(){ft.elementResizer.unsubscribe(t(this,W)),nt.windowResizer.unsubscribe(t(this,W))}onScroll(c){t(this,V).addEventListener("scroll",c)}offScroll(c){t(this,V).removeEventListener("scroll",c)}}V=new WeakMap,ht=new WeakMap,et=new WeakMap,W=new WeakMap;var l,j,B,G,K,k,T,_,M,d,g,y,v,A,p,z,O,J,q,x,D,f,P,w,L,R,F,st,n,$,N,rt,m,H,C,b,E,Q,I,S,h,bt,at,Ct,gt,yt,vt,Pt,wt,it,U,Z,Vt,Ft,lt,dt;let mt=(dt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,l);i(this,j);i(this,B);i(this,G);i(this,K);i(this,k);i(this,T);i(this,_);i(this,M);i(this,d);i(this,g);i(this,y);i(this,v);i(this,A);i(this,p);i(this,z);i(this,O);i(this,J);i(this,q);i(this,x);i(this,D);i(this,f);i(this,P);i(this,w);i(this,L);i(this,R);i(this,F);i(this,st);i(this,n);i(this,$);i(this,N);i(this,rt);i(this,m);i(this,H);i(this,C);i(this,b);i(this,E);i(this,Q);i(this,I);i(this,S);i(this,it);i(this,U);s(this,l,null),s(this,j,new u.CSSProperty(this,"--damping",20)),s(this,B,new u.CSSProperty(this,"--mass",0)),s(this,G,new u.CSSProperty(this,"--stiffness",0)),s(this,K,new u.CSSProperty(this,"--target","")),s(this,k,new u.CSSProperty(this,"--disabled",!1)),s(this,T,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),s(this,_,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),s(this,M,new u.CSSProperty(this,"--capture-once",!1)),s(this,d,new u.CSSProperty(this,"--captured","")),s(this,g,new u.CSSProperty(this,"--released","")),s(this,y,new u.CSSProperty(this,"--captured-from-start","")),s(this,v,new u.CSSProperty(this,"--captured-from-finish","")),s(this,A,new u.CSSProperty(this,"--released-from-start","")),s(this,p,new u.CSSProperty(this,"--released-from-finish","")),s(this,z,new u.CSSProperty(this,"--passed-var","")),s(this,O,new u.CSSProperty(this,"--progress-var","")),s(this,J,new u.CSSProperty(this,"--animation-var-type","current")),s(this,q,new u.CSSProperty(this,"--distance-var","")),s(this,x,new u.CSSProperty(this,"--start-var","")),s(this,D,new u.CSSProperty(this,"--finish-var","")),s(this,f,new tt.Store(!1)),s(this,P,new tt.Store(!1)),s(this,w,new tt.Store(!1)),s(this,L,new tt.Store(!1)),s(this,R,new tt.Store(!1)),s(this,F,new tt.Store(!1)),s(this,st,[]),s(this,n,this),s(this,$,0),s(this,N,0),s(this,rt,0),s(this,m,new xt.Damped(0,{order:pt.TICK_ORDER.SEGMENT,min:0,max:1})),s(this,H,0),s(this,C,0),s(this,b,0),s(this,E,0),s(this,Q,!1),s(this,I,!1),s(this,S,!0),this.findAnotherScrollEntries=zt.debounce(()=>{const r=qt.scrollEntries.getAll(this).reverse();let e=0;r.forEach((X,Et)=>{X.element===t(this,l)&&(e=Et)}),s(this,st,r.slice(e+1))},0),s(this,it,()=>{t(this,S)||(this.resize(),t(this,U).call(this))}),s(this,U,()=>{!t(this,S)&&t(this,Q)&&this.tick()})}get scrollContainer(){return t(this,l)}set scrollContainer(r){o(this,h,at).call(this),s(this,l,r),o(this,h,bt).call(this)}get distanceOffsetCSSProperty(){return t(this,T)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,M)}get capturedCSSProperty(){return t(this,d)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,y)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,A)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,z)}get progressVarCSSProperty(){return t(this,O)}get animationVarTypeCSSProperty(){return t(this,J)}get distanceVarCSSProperty(){return t(this,q)}get startVarCSSProperty(){return t(this,x)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,k)}get dampingCSSProperty(){return t(this,j)}get massCSSProperty(){return t(this,B)}get stiffnessCSSProperty(){return t(this,G)}get targetCSSProperty(){return t(this,K)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,w)}get isReleasedFromStart(){return t(this,L)}get isCapturedFromFinish(){return t(this,R)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,$)}get directionSize(){return t(this,N)}get passed(){return t(this,m)}get progress(){return t(this,H)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,I)}get isDisabled(){return t(this,S)}resize(){s(this,N,t(this,l).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,l)instanceof HTMLElement?t(this,l):t(this,l).element;s(this,$,t(this,l).vertical?ot.getCumulativeOffsetTop(this,r):ot.getCumulativeOffsetLeft(this,r));const e=ot.getStickyOffset(this,t(this,l).vertical?"top":"left");s(this,$,t(this,$)-e),s(this,C,this.getStart()),s(this,b,this.getDistance()),s(this,C,t(this,C)+t(this,_).current),s(this,b,t(this,b)+t(this,T).current),s(this,E,t(this,C)+t(this,b)),t(this,l).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,x).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,q).current,t(this,b)),t(this,m).max=t(this,b),s(this,Q,!0)}tick(){let r=t(this,l).currentScrollValue;t(this,st).forEach(X=>{r+=X.value}),t(this,m).set(r-t(this,C));const e=Math.round(r);t(this,f).current&&(e>=t(this,C)?t(this,w).current||o(this,h,yt).call(this):t(this,w).current&&!t(this,L).current&&o(this,h,Pt).call(this),e<t(this,E)?t(this,F).current&&!t(this,R).current&&o(this,h,vt).call(this):t(this,w).current&&!t(this,F).current&&o(this,h,wt).call(this)),e>=t(this,C)&&e<t(this,E)?t(this,f).current||o(this,h,Ct).call(this):t(this,f).current&&(t(this,m).set(Ot.step(t(this,b)/2,t(this,m).target,0,t(this,b))),o(this,h,gt).call(this)),t(this,I)&&t(this,M).current&&(t(this,d).current&&t(this,n).classList.add(t(this,d).current),s(this,S,!0))}disable(){this.style.cssText="",s(this,$,0),s(this,N,0),t(this,m).reset(),s(this,H,0),s(this,C,0),s(this,b,0),s(this,E,0),s(this,Q,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,w).current=!1,t(this,L).current=!1,t(this,R).current=!1,t(this,F).current=!1,s(this,I,!1),s(this,S,!0),o(this,h,lt).call(this)}enable(){s(this,S,!1)}connectedCallback(){this.scrollContainer=new ut(this)}disconnectedCallback(){t(this,l)instanceof ut&&t(this,l).destroy(),o(this,h,at).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,e){r&&t(this,n).style.setProperty(`--${r}`,e.toString())}getDistance(){return t(this,N)+t(this,rt)}getStart(){return t(this,$)-t(this,rt)}},l=new WeakMap,j=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,k=new WeakMap,T=new WeakMap,_=new WeakMap,M=new WeakMap,d=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,A=new WeakMap,p=new WeakMap,z=new WeakMap,O=new WeakMap,J=new WeakMap,q=new WeakMap,x=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,w=new WeakMap,L=new WeakMap,R=new WeakMap,F=new WeakMap,st=new WeakMap,n=new WeakMap,$=new WeakMap,N=new WeakMap,rt=new WeakMap,m=new WeakMap,H=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,Q=new WeakMap,I=new WeakMap,S=new WeakMap,h=new WeakSet,bt=function(){if(!t(this,l))return;t(this,f).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,w).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,R).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,L).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(e=>{e.current&&Y.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,j).observe(),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,k).observe(),t(this,T).observe(),t(this,_).observe(),t(this,M).observe(),t(this,d).observe(),t(this,g).observe(),t(this,y).observe(),t(this,v).observe(),t(this,A).observe(),t(this,p).observe(),t(this,z).observe(),t(this,O).observe(),t(this,J).observe(),t(this,q).observe(),t(this,x).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,k).current||this.enable(),t(this,j).subscribe(e=>{t(this,m).damping=e.current}),t(this,B).subscribe(e=>{t(this,m).mass=e.current}),t(this,G).subscribe(e=>{t(this,m).stiffness=e.current}),t(this,K).subscribe(e=>{e.previous&&o(this,h,lt).call(this),e.current?e.current==="parent"?s(this,n,this.parentElement||this):s(this,n,document.querySelector(e.current)||this):s(this,n,this)}),t(this,k).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,S)&&this.resize()}),t(this,T).subscribe(()=>{r&&!t(this,S)&&this.resize()}),t(this,d).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,y).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,v).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,g).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,A).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,p).subscribe(e=>{o(this,h,Z).call(this,e)}),t(this,M).subscribe(e=>{t(this,S)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,z).subscribe(e=>{t(this,S)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,O).subscribe(e=>{t(this,S)||(this.removeVar(e.previous),this.setVar(e.current,t(this,H)))}),t(this,x).subscribe(e=>{t(this,S)||(this.removeVar(e.previous),this.setVar(e.current,t(this,C)))}),t(this,D).subscribe(e=>{t(this,S)||(this.removeVar(e.previous),this.setVar(e.current,t(this,E)))}),t(this,q).subscribe(e=>{t(this,S)||(this.removeVar(e.previous),this.setVar(e.current,t(this,b)))}),t(this,m).subscribe(e=>{const X=t(this,m)[t(this,J).current];s(this,H,X/t(this,b)||0),this.setVar(t(this,z).current,X.toFixed(6)),this.setVar(t(this,O).current,t(this,H).toFixed(6))}),nt.windowResizer.subscribe(t(this,it),pt.RESIZE_ORDER.SCROLL),this.scrollContainer.onScroll(t(this,U)),r=!0},at=function(){t(this,l)&&(nt.windowResizer.unsubscribe(t(this,it)),this.scrollContainer.offScroll(t(this,U)),t(this,j).close(),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,k).close(),t(this,T).close(),t(this,_).close(),t(this,M).close(),t(this,d).close(),t(this,g).close(),t(this,y).close(),t(this,v).close(),t(this,A).close(),t(this,p).close(),t(this,z).close(),t(this,O).close(),t(this,q).close(),t(this,x).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,w).close(),t(this,L).close(),t(this,R).close(),t(this,F).close(),this.disable())},Ct=function(){t(this,f).current=!0,t(this,P).current=!1,s(this,I,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,d).current&&t(this,n).classList.add(t(this,d).current)},gt=function(){t(this,P).current=!0,t(this,f).current=!1,s(this,I,!0),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},yt=function(){t(this,f).current=!0,t(this,w).current=!0,t(this,L).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},vt=function(){t(this,f).current=!0,t(this,R).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Pt=function(){t(this,P).current=!0,t(this,L).current=!0,t(this,w).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},wt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,R).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},it=new WeakMap,U=new WeakMap,Z=function(r){if(t(this,S)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Vt=function(...r){r.forEach(e=>{e&&t(this,n).classList.remove(e)})},Ft=function(...r){r.forEach(e=>{e&&t(this,n).style.removeProperty(`--${e}`)})},lt=function(){o(this,h,Vt).call(this,t(this,d).current,t(this,y).current,t(this,v).current,t(this,g).current,t(this,A).current,t(this,p).current),o(this,h,Ft).call(this,t(this,z).current,t(this,O).current,t(this,q).current,t(this,x).current,t(this,D).current)},dt);Rt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",mt);exports.ScrollSegmentDefaultContainer=ut;exports.ScrollSegmentElement=mt;
|
|
1
|
+
"use strict";var mt=l=>{throw TypeError(l)};var lt=(l,c,r)=>c.has(l)||mt("Cannot "+r);var t=(l,c,r)=>(lt(l,c,"read from private field"),r?r.call(l):c.get(l)),i=(l,c,r)=>c.has(l)?mt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(l):c.set(l,r),e=(l,c,r,s)=>(lt(l,c,"write to private field"),s?s.call(l,r):c.set(l,r),r),u=(l,c,r)=>(lt(l,c,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zt=require("../dom-JBOkFLTh.cjs"),Ot=require("../index-Cqw2NKev.cjs"),ot=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),o=require("../css-property/index.cjs"),bt=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),qt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),xt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-DRp_K37w.cjs"),kt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Dt=require("../Damped-B1lXa9nb.cjs");var w,ct,it,j;class ft{constructor(c){i(this,w,null);i(this,ct);i(this,it,!1);i(this,j,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,c),e(this,w,zt.findScrollParentElement(t(this,ct))),ot.elementResizer.subscribe(t(this,w),t(this,j)),ut.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){ot.elementResizer.unsubscribe(t(this,j)),ut.windowResizer.unsubscribe(t(this,j))}onScroll(c){t(this,w).addEventListener("scroll",c)}offScroll(c){t(this,w).removeEventListener("scroll",c)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,j=new WeakMap;var S,B,G,K,Z,T,_,A,I,m,g,v,y,$,p,O,q,H,Y,x,k,D,f,P,V,L,R,F,ht,n,W,J,nt,d,z,C,b,E,tt,N,a,Q,h,vt,pt,yt,Pt,Vt,wt,Ft,Et,U,st,X,Lt,Rt,dt,Ct;let gt=(Ct=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,T);i(this,_);i(this,A);i(this,I);i(this,m);i(this,g);i(this,v);i(this,y);i(this,$);i(this,p);i(this,O);i(this,q);i(this,H);i(this,Y);i(this,x);i(this,k);i(this,D);i(this,f);i(this,P);i(this,V);i(this,L);i(this,R);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,J);i(this,nt);i(this,d);i(this,z);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,Q);i(this,U);i(this,st);e(this,S,null),e(this,B,new o.CSSProperty(this,"--damping",20)),e(this,G,new o.CSSProperty(this,"--mass",0)),e(this,K,new o.CSSProperty(this,"--stiffness",0)),e(this,Z,new o.CSSProperty(this,"--target","")),e(this,T,new o.CSSProperty(this,"--disabled",!1)),e(this,_,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,A,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,I,new o.CSSProperty(this,"--capture-once",!1)),e(this,m,new o.CSSProperty(this,"--captured","")),e(this,g,new o.CSSProperty(this,"--released","")),e(this,v,new o.CSSProperty(this,"--captured-from-start","")),e(this,y,new o.CSSProperty(this,"--captured-from-finish","")),e(this,$,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,O,new o.CSSProperty(this,"--passed-var","")),e(this,q,new o.CSSProperty(this,"--progress-var","")),e(this,H,new o.CSSProperty(this,"--progress-arc-var","")),e(this,Y,new o.CSSProperty(this,"--animation-var-type","target")),e(this,x,new o.CSSProperty(this,"--distance-var","")),e(this,k,new o.CSSProperty(this,"--start-var","")),e(this,D,new o.CSSProperty(this,"--finish-var","")),e(this,f,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,L,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,nt,0),e(this,d,new Dt.Damped(0,{order:bt.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,z,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.findAnotherScrollEntries=qt.debounce(()=>{const r=kt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((M,at)=>{M.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1))},0),e(this,U,()=>{t(this,a)||(this.resize(),t(this,st).call(this))}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){u(this,h,pt).call(this),e(this,S,r),u(this,h,vt).call(this)}get distanceOffsetCSSProperty(){return t(this,_)}get startOffsetCSSProperty(){return t(this,A)}get captureOnceCSSProperty(){return t(this,I)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,$)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,H)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,x)}get startVarCSSProperty(){return t(this,k)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,L)}get isCapturedFromFinish(){return t(this,R)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,z)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}resize(){e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,A).current),e(this,b,t(this,b)+t(this,_).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,k).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,x).current,t(this,b)),t(this,d).max=t(this,b),e(this,tt,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const M=Math.round(r);t(this,f).current&&(M>=t(this,C)?t(this,V).current||u(this,h,Vt).call(this):t(this,V).current&&!t(this,L).current&&u(this,h,Ft).call(this),M<t(this,E)?t(this,F).current&&!t(this,R).current&&u(this,h,wt).call(this):t(this,V).current&&!t(this,F).current&&u(this,h,Et).call(this)),M>=t(this,C)&&M<t(this,E)?t(this,f).current||u(this,h,yt).call(this):t(this,f).current&&(t(this,d).set(xt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),u(this,h,Pt).call(this)),t(this,N)&&t(this,I).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,z,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,L).current=!1,t(this,R).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),u(this,h,dt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new ft(this)}disconnectedCallback(){t(this,S)instanceof ft&&t(this,S).destroy(),u(this,h,pt).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,T=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,$=new WeakMap,p=new WeakMap,O=new WeakMap,q=new WeakMap,H=new WeakMap,Y=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,L=new WeakMap,R=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,nt=new WeakMap,d=new WeakMap,z=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,vt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,L).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,T).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,$).observe(),t(this,p).observe(),t(this,O).observe(),t(this,q).observe(),t(this,H).observe(),t(this,Y).observe(),t(this,x).observe(),t(this,k).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,T).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&u(this,h,dt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,T).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,_).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,p).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,I).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,z)))}),t(this,H).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,z)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const M=t(this,d)[t(this,Y).current];e(this,z,M/t(this,b)||0),this.setVar(t(this,O).current,M.toFixed(6)),this.setVar(t(this,q).current,t(this,z).toFixed(6)),t(this,H).current&&this.setVar(t(this,H).current,Math.abs(Math.cos(t(this,z)*Math.PI)).toFixed(6))}),ut.windowResizer.subscribe(t(this,U),bt.RESIZE_ORDER.SCROLL+1),ot.elementResizer.subscribe(this,t(this,U)),this.scrollContainer.onScroll(t(this,st)),r=!0},pt=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,U)),ot.elementResizer.unsubscribe(t(this,U)),this.scrollContainer.offScroll(t(this,st)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,T).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,$).close(),t(this,p).close(),t(this,O).close(),t(this,q).close(),t(this,x).close(),t(this,k).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,L).close(),t(this,R).close(),t(this,F).close(),this.disable())},yt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Pt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Vt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,L).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},wt=function(){t(this,f).current=!0,t(this,R).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Ft=function(){t(this,P).current=!0,t(this,L).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Et=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,R).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},U=new WeakMap,st=new WeakMap,X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Lt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Rt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},dt=function(){u(this,h,Lt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,$).current,t(this,p).current),u(this,h,Rt).call(this,t(this,O).current,t(this,q).current,t(this,x).current,t(this,k).current,t(this,D).current)},Ct);Ot.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",gt);exports.ScrollSegmentDefaultContainer=ft;exports.ScrollSegmentElement=gt;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var mt = (l) => {
|
|
2
|
+
throw TypeError(l);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var t = (
|
|
6
|
-
import { f as
|
|
7
|
-
import { i as
|
|
8
|
-
import { elementResizer as
|
|
9
|
-
import { windowResizer as
|
|
10
|
-
import { CSSProperty as
|
|
11
|
-
import { TICK_ORDER as
|
|
12
|
-
import { d as
|
|
13
|
-
import { d as
|
|
14
|
-
import { a as
|
|
15
|
-
import { s as
|
|
16
|
-
import { S as
|
|
4
|
+
var lt = (l, c, r) => c.has(l) || mt("Cannot " + r);
|
|
5
|
+
var t = (l, c, r) => (lt(l, c, "read from private field"), r ? r.call(l) : c.get(l)), i = (l, c, r) => c.has(l) ? mt("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(l) : c.set(l, r), e = (l, c, r, s) => (lt(l, c, "write to private field"), s ? s.call(l, r) : c.set(l, r), r), u = (l, c, r) => (lt(l, c, "access private method"), r);
|
|
6
|
+
import { f as wt } from "../dom-CVWzyXPH.js";
|
|
7
|
+
import { i as Et } from "../index-euf5anj6.js";
|
|
8
|
+
import { elementResizer as ot } from "../element-resizer/index.js";
|
|
9
|
+
import { windowResizer as ut } from "../window-resizer/index.js";
|
|
10
|
+
import { CSSProperty as o } from "../css-property/index.js";
|
|
11
|
+
import { TICK_ORDER as Rt, RESIZE_ORDER as Ot } from "../order/index.js";
|
|
12
|
+
import { d as et } from "../events-CsVF98U6.js";
|
|
13
|
+
import { d as zt } from "../function-C10DGppn.js";
|
|
14
|
+
import { a as kt, g as Dt, c as xt } from "../layout-DpZo-I0y.js";
|
|
15
|
+
import { s as Mt } from "../math-BOBiC4TN.js";
|
|
16
|
+
import { S as rt } from "../Store-D2xCXENW.js";
|
|
17
17
|
import { scrollEntries as Tt } from "../scroll-entries/index.js";
|
|
18
18
|
import "../ticker/index.js";
|
|
19
|
-
import { D as
|
|
20
|
-
var F,
|
|
21
|
-
class
|
|
19
|
+
import { D as At } from "../Damped-BXsGpI-B.js";
|
|
20
|
+
var F, ct, it, B;
|
|
21
|
+
class St {
|
|
22
22
|
constructor(c) {
|
|
23
23
|
i(this, F, null);
|
|
24
|
-
i(this,
|
|
25
|
-
i(this,
|
|
26
|
-
i(this,
|
|
27
|
-
e(this,
|
|
24
|
+
i(this, ct);
|
|
25
|
+
i(this, it, !1);
|
|
26
|
+
i(this, B, () => {
|
|
27
|
+
e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
|
|
28
28
|
});
|
|
29
|
-
e(this,
|
|
29
|
+
e(this, ct, c), e(this, F, wt(t(this, ct))), ot.subscribe(t(this, F), t(this, B)), ut.subscribe(t(this, B)), t(this, B).call(this);
|
|
30
30
|
}
|
|
31
31
|
get element() {
|
|
32
32
|
return t(this, F);
|
|
33
33
|
}
|
|
34
34
|
get currentScrollValue() {
|
|
35
|
-
return t(this,
|
|
35
|
+
return t(this, it) ? t(this, F).scrollTop : t(this, F).scrollLeft;
|
|
36
36
|
}
|
|
37
37
|
get vertical() {
|
|
38
|
-
return t(this,
|
|
38
|
+
return t(this, it);
|
|
39
39
|
}
|
|
40
40
|
destroy() {
|
|
41
|
-
|
|
41
|
+
ot.unsubscribe(t(this, B)), ut.unsubscribe(t(this, B));
|
|
42
42
|
}
|
|
43
43
|
onScroll(c) {
|
|
44
44
|
t(this, F).addEventListener("scroll", c);
|
|
@@ -47,165 +47,174 @@ class ft {
|
|
|
47
47
|
t(this, F).removeEventListener("scroll", c);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
F = new WeakMap(),
|
|
51
|
-
var
|
|
52
|
-
let
|
|
50
|
+
F = new WeakMap(), ct = new WeakMap(), it = new WeakMap(), B = new WeakMap();
|
|
51
|
+
var f, G, K, Z, j, A, I, $, H, d, v, C, y, W, m, z, k, N, Y, D, x, M, p, P, V, E, R, L, ht, n, _, J, nt, S, O, g, b, w, tt, q, a, Q, h, bt, ft, gt, vt, Ct, yt, Pt, Vt, U, st, X, Ft, Lt, pt, dt;
|
|
52
|
+
let It = (dt = class extends HTMLElement {
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments);
|
|
55
55
|
i(this, h);
|
|
56
|
-
i(this,
|
|
57
|
-
i(this, B);
|
|
56
|
+
i(this, f);
|
|
58
57
|
i(this, G);
|
|
59
58
|
i(this, K);
|
|
60
|
-
i(this,
|
|
61
|
-
i(this,
|
|
62
|
-
i(this, M);
|
|
59
|
+
i(this, Z);
|
|
60
|
+
i(this, j);
|
|
63
61
|
i(this, A);
|
|
62
|
+
i(this, I);
|
|
64
63
|
i(this, $);
|
|
65
|
-
i(this,
|
|
66
|
-
i(this,
|
|
64
|
+
i(this, H);
|
|
65
|
+
i(this, d);
|
|
67
66
|
i(this, v);
|
|
67
|
+
i(this, C);
|
|
68
68
|
i(this, y);
|
|
69
|
-
i(this,
|
|
70
|
-
i(this,
|
|
71
|
-
i(this, O);
|
|
69
|
+
i(this, W);
|
|
70
|
+
i(this, m);
|
|
72
71
|
i(this, z);
|
|
73
|
-
i(this, J);
|
|
74
72
|
i(this, k);
|
|
73
|
+
i(this, N);
|
|
74
|
+
i(this, Y);
|
|
75
75
|
i(this, D);
|
|
76
|
-
i(this,
|
|
77
|
-
i(this,
|
|
76
|
+
i(this, x);
|
|
77
|
+
i(this, M);
|
|
78
|
+
i(this, p);
|
|
78
79
|
i(this, P);
|
|
79
80
|
i(this, V);
|
|
80
81
|
i(this, E);
|
|
81
82
|
i(this, R);
|
|
82
83
|
i(this, L);
|
|
83
|
-
i(this,
|
|
84
|
+
i(this, ht);
|
|
84
85
|
i(this, n);
|
|
85
|
-
i(this,
|
|
86
|
-
i(this,
|
|
87
|
-
i(this,
|
|
88
|
-
i(this,
|
|
89
|
-
i(this,
|
|
86
|
+
i(this, _);
|
|
87
|
+
i(this, J);
|
|
88
|
+
i(this, nt);
|
|
89
|
+
i(this, S);
|
|
90
|
+
i(this, O);
|
|
90
91
|
i(this, g);
|
|
91
92
|
i(this, b);
|
|
92
93
|
i(this, w);
|
|
94
|
+
i(this, tt);
|
|
95
|
+
i(this, q);
|
|
96
|
+
i(this, a);
|
|
93
97
|
i(this, Q);
|
|
94
|
-
i(this, _);
|
|
95
|
-
i(this, f);
|
|
96
|
-
i(this, it);
|
|
97
98
|
i(this, U);
|
|
98
|
-
|
|
99
|
+
i(this, st);
|
|
100
|
+
e(this, f, null), e(this, G, new o(this, "--damping", 20)), e(this, K, new o(this, "--mass", 0)), e(this, Z, new o(this, "--stiffness", 0)), e(this, j, new o(this, "--target", "")), e(this, A, new o(this, "--disabled", !1)), e(this, I, new o(
|
|
99
101
|
this,
|
|
100
102
|
"--distance-offset",
|
|
101
103
|
0,
|
|
102
104
|
{ rawValueCheck: !1 }
|
|
103
|
-
)), e(this,
|
|
105
|
+
)), e(this, $, new o(this, "--start-offset", 0, {
|
|
104
106
|
rawValueCheck: !1
|
|
105
|
-
})), e(this,
|
|
107
|
+
})), e(this, H, new o(
|
|
106
108
|
this,
|
|
107
109
|
"--capture-once",
|
|
108
110
|
!1
|
|
109
|
-
)), e(this,
|
|
111
|
+
)), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
|
|
110
112
|
this,
|
|
111
113
|
"--captured-from-start",
|
|
112
114
|
""
|
|
113
|
-
)), e(this, y, new
|
|
115
|
+
)), e(this, y, new o(
|
|
114
116
|
this,
|
|
115
117
|
"--captured-from-finish",
|
|
116
118
|
""
|
|
117
|
-
)), e(this,
|
|
119
|
+
)), e(this, W, new o(
|
|
118
120
|
this,
|
|
119
121
|
"--released-from-start",
|
|
120
122
|
""
|
|
121
|
-
)), e(this,
|
|
123
|
+
)), e(this, m, new o(
|
|
122
124
|
this,
|
|
123
125
|
"--released-from-finish",
|
|
124
126
|
""
|
|
125
|
-
)), e(this,
|
|
127
|
+
)), e(this, z, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, N, new o(
|
|
128
|
+
this,
|
|
129
|
+
"--progress-arc-var",
|
|
130
|
+
""
|
|
131
|
+
)), e(this, Y, new o(
|
|
126
132
|
this,
|
|
127
133
|
"--animation-var-type",
|
|
128
|
-
"
|
|
129
|
-
)), e(this,
|
|
134
|
+
"target"
|
|
135
|
+
)), e(this, D, new o(this, "--distance-var", "")), e(this, x, new o(this, "--start-var", "")), e(this, M, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, E, new rt(!1)), e(this, R, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, J, 0), e(this, nt, 0), e(this, S, new At(0, { order: Rt.SEGMENT, min: 0, max: 1 })), e(this, O, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, Q, !1), this.findAnotherScrollEntries = zt(() => {
|
|
130
136
|
const r = Tt.getAll(this).reverse();
|
|
131
137
|
let s = 0;
|
|
132
|
-
r.forEach((
|
|
133
|
-
|
|
134
|
-
}), e(this,
|
|
135
|
-
}, 0), e(this,
|
|
136
|
-
t(this,
|
|
137
|
-
}), e(this,
|
|
138
|
-
!t(this,
|
|
138
|
+
r.forEach((T, at) => {
|
|
139
|
+
T.element === t(this, f) && (s = at);
|
|
140
|
+
}), e(this, ht, r.slice(s + 1));
|
|
141
|
+
}, 0), e(this, U, () => {
|
|
142
|
+
t(this, a) || (this.resize(), t(this, st).call(this));
|
|
143
|
+
}), e(this, st, () => {
|
|
144
|
+
!t(this, a) && t(this, tt) && this.tick();
|
|
139
145
|
});
|
|
140
146
|
}
|
|
141
147
|
get scrollContainer() {
|
|
142
|
-
return t(this,
|
|
148
|
+
return t(this, f);
|
|
143
149
|
}
|
|
144
150
|
set scrollContainer(r) {
|
|
145
|
-
|
|
151
|
+
u(this, h, ft).call(this), e(this, f, r), u(this, h, bt).call(this);
|
|
146
152
|
}
|
|
147
153
|
get distanceOffsetCSSProperty() {
|
|
148
|
-
return t(this,
|
|
154
|
+
return t(this, I);
|
|
149
155
|
}
|
|
150
156
|
get startOffsetCSSProperty() {
|
|
151
|
-
return t(this,
|
|
157
|
+
return t(this, $);
|
|
152
158
|
}
|
|
153
159
|
get captureOnceCSSProperty() {
|
|
154
|
-
return t(this,
|
|
160
|
+
return t(this, H);
|
|
155
161
|
}
|
|
156
162
|
get capturedCSSProperty() {
|
|
157
|
-
return t(this,
|
|
163
|
+
return t(this, d);
|
|
158
164
|
}
|
|
159
165
|
get releasedCSSProperty() {
|
|
160
|
-
return t(this,
|
|
166
|
+
return t(this, v);
|
|
161
167
|
}
|
|
162
168
|
get capturedFromStartCSSProperty() {
|
|
163
|
-
return t(this,
|
|
169
|
+
return t(this, C);
|
|
164
170
|
}
|
|
165
171
|
get capturedFromFinishCSSProperty() {
|
|
166
172
|
return t(this, y);
|
|
167
173
|
}
|
|
168
174
|
get releasedFromStartCSSProperty() {
|
|
169
|
-
return t(this,
|
|
175
|
+
return t(this, W);
|
|
170
176
|
}
|
|
171
177
|
get releasedFromFinishCSSProperty() {
|
|
172
|
-
return t(this,
|
|
178
|
+
return t(this, m);
|
|
173
179
|
}
|
|
174
180
|
get passedVarCSSProperty() {
|
|
175
|
-
return t(this,
|
|
181
|
+
return t(this, z);
|
|
176
182
|
}
|
|
177
183
|
get progressVarCSSProperty() {
|
|
178
|
-
return t(this,
|
|
184
|
+
return t(this, k);
|
|
185
|
+
}
|
|
186
|
+
get progressArcVarCSSProperty() {
|
|
187
|
+
return t(this, N);
|
|
179
188
|
}
|
|
180
189
|
get animationVarTypeCSSProperty() {
|
|
181
|
-
return t(this,
|
|
190
|
+
return t(this, Y);
|
|
182
191
|
}
|
|
183
192
|
get distanceVarCSSProperty() {
|
|
184
|
-
return t(this,
|
|
193
|
+
return t(this, D);
|
|
185
194
|
}
|
|
186
195
|
get startVarCSSProperty() {
|
|
187
|
-
return t(this,
|
|
196
|
+
return t(this, x);
|
|
188
197
|
}
|
|
189
198
|
get finishVarCSSProperty() {
|
|
190
|
-
return t(this,
|
|
199
|
+
return t(this, M);
|
|
191
200
|
}
|
|
192
201
|
get disabledCSSProperty() {
|
|
193
|
-
return t(this,
|
|
202
|
+
return t(this, A);
|
|
194
203
|
}
|
|
195
204
|
get dampingCSSProperty() {
|
|
196
|
-
return t(this,
|
|
205
|
+
return t(this, G);
|
|
197
206
|
}
|
|
198
207
|
get massCSSProperty() {
|
|
199
|
-
return t(this,
|
|
208
|
+
return t(this, K);
|
|
200
209
|
}
|
|
201
210
|
get stiffnessCSSProperty() {
|
|
202
|
-
return t(this,
|
|
211
|
+
return t(this, Z);
|
|
203
212
|
}
|
|
204
213
|
get targetCSSProperty() {
|
|
205
|
-
return t(this,
|
|
214
|
+
return t(this, j);
|
|
206
215
|
}
|
|
207
216
|
get isCaptured() {
|
|
208
|
-
return t(this,
|
|
217
|
+
return t(this, p);
|
|
209
218
|
}
|
|
210
219
|
get isReleased() {
|
|
211
220
|
return t(this, P);
|
|
@@ -223,16 +232,16 @@ let Mt = (mt = class extends HTMLElement {
|
|
|
223
232
|
return t(this, L);
|
|
224
233
|
}
|
|
225
234
|
get directionPosition() {
|
|
226
|
-
return t(this,
|
|
235
|
+
return t(this, _);
|
|
227
236
|
}
|
|
228
237
|
get directionSize() {
|
|
229
|
-
return t(this,
|
|
238
|
+
return t(this, J);
|
|
230
239
|
}
|
|
231
240
|
get passed() {
|
|
232
|
-
return t(this,
|
|
241
|
+
return t(this, S);
|
|
233
242
|
}
|
|
234
243
|
get progress() {
|
|
235
|
-
return t(this,
|
|
244
|
+
return t(this, O);
|
|
236
245
|
}
|
|
237
246
|
get start() {
|
|
238
247
|
return t(this, g);
|
|
@@ -244,42 +253,44 @@ let Mt = (mt = class extends HTMLElement {
|
|
|
244
253
|
return t(this, b);
|
|
245
254
|
}
|
|
246
255
|
get isCapturedOnce() {
|
|
247
|
-
return t(this,
|
|
256
|
+
return t(this, q);
|
|
248
257
|
}
|
|
249
258
|
get isDisabled() {
|
|
250
|
-
return t(this,
|
|
259
|
+
return t(this, a);
|
|
251
260
|
}
|
|
252
261
|
resize() {
|
|
253
|
-
e(this,
|
|
254
|
-
const r = t(this,
|
|
255
|
-
e(this,
|
|
256
|
-
const s =
|
|
262
|
+
e(this, J, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
|
|
263
|
+
const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
|
|
264
|
+
e(this, _, t(this, f).vertical ? kt(this, r) : Dt(this, r));
|
|
265
|
+
const s = xt(
|
|
257
266
|
this,
|
|
258
|
-
t(this,
|
|
267
|
+
t(this, f).vertical ? "top" : "left"
|
|
259
268
|
);
|
|
260
|
-
e(this,
|
|
269
|
+
e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, $).current), e(this, b, t(this, b) + t(this, I).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, x).current, t(this, g)), this.setVar(t(this, M).current, t(this, w)), this.setVar(t(this, D).current, t(this, b)), t(this, S).max = t(this, b), e(this, tt, !0);
|
|
261
270
|
}
|
|
262
271
|
tick() {
|
|
263
|
-
let r = t(this,
|
|
264
|
-
t(this,
|
|
265
|
-
r +=
|
|
266
|
-
})
|
|
267
|
-
const s =
|
|
268
|
-
t(this,
|
|
269
|
-
|
|
270
|
-
),
|
|
272
|
+
let r = t(this, f).currentScrollValue;
|
|
273
|
+
t(this, ht).forEach((at) => {
|
|
274
|
+
r += at.value;
|
|
275
|
+
});
|
|
276
|
+
const s = r - t(this, g);
|
|
277
|
+
t(this, Q) || e(this, Q, t(this, S).previous ? Math.abs(t(this, S).previous - s) > 1e3 : !1), t(this, S).set(s);
|
|
278
|
+
const T = Math.round(r);
|
|
279
|
+
t(this, p).current && (T >= t(this, g) ? t(this, V).current || u(this, h, Ct).call(this) : t(this, V).current && !t(this, E).current && u(this, h, Pt).call(this), T < t(this, w) ? t(this, L).current && !t(this, R).current && u(this, h, yt).call(this) : t(this, V).current && !t(this, L).current && u(this, h, Vt).call(this)), T >= t(this, g) && T < t(this, w) ? t(this, p).current || u(this, h, gt).call(this) : t(this, p).current && (t(this, S).set(
|
|
280
|
+
Mt(t(this, b) / 2, t(this, S).target, 0, t(this, b))
|
|
281
|
+
), u(this, h, vt).call(this)), t(this, q) && t(this, H).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
|
|
271
282
|
}
|
|
272
283
|
disable() {
|
|
273
|
-
this.style.cssText = "", e(this,
|
|
284
|
+
this.style.cssText = "", e(this, _, 0), e(this, J, 0), t(this, S).reset(), e(this, O, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, E).current = !1, t(this, R).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), u(this, h, pt).call(this);
|
|
274
285
|
}
|
|
275
286
|
enable() {
|
|
276
|
-
e(this,
|
|
287
|
+
e(this, a, !1);
|
|
277
288
|
}
|
|
278
289
|
connectedCallback() {
|
|
279
|
-
this.scrollContainer = new
|
|
290
|
+
this.scrollContainer = new St(this);
|
|
280
291
|
}
|
|
281
292
|
disconnectedCallback() {
|
|
282
|
-
t(this,
|
|
293
|
+
t(this, f) instanceof St && t(this, f).destroy(), u(this, h, ft).call(this);
|
|
283
294
|
}
|
|
284
295
|
removeVar(r) {
|
|
285
296
|
r && t(this, n).style.removeProperty(`--${r}`);
|
|
@@ -288,140 +299,149 @@ let Mt = (mt = class extends HTMLElement {
|
|
|
288
299
|
r && t(this, n).style.setProperty(`--${r}`, s.toString());
|
|
289
300
|
}
|
|
290
301
|
getDistance() {
|
|
291
|
-
return t(this,
|
|
302
|
+
return t(this, J) + t(this, nt);
|
|
292
303
|
}
|
|
293
304
|
getStart() {
|
|
294
|
-
return t(this,
|
|
305
|
+
return t(this, _) - t(this, nt);
|
|
295
306
|
}
|
|
296
|
-
},
|
|
297
|
-
if (!t(this,
|
|
307
|
+
}, f = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), A = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), W = new WeakMap(), m = new WeakMap(), z = new WeakMap(), k = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), D = new WeakMap(), x = new WeakMap(), M = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), E = new WeakMap(), R = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), J = new WeakMap(), nt = new WeakMap(), S = new WeakMap(), O = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), Q = new WeakMap(), h = new WeakSet(), bt = function() {
|
|
308
|
+
if (!t(this, f))
|
|
298
309
|
return;
|
|
299
|
-
t(this,
|
|
300
|
-
s.current &&
|
|
310
|
+
t(this, p).subscribe((s) => {
|
|
311
|
+
s.current && et(this, "scrollSegmentCapture", {
|
|
301
312
|
composed: !0,
|
|
302
313
|
custom: !0
|
|
303
314
|
});
|
|
304
315
|
}), t(this, V).subscribe((s) => {
|
|
305
|
-
s.current &&
|
|
316
|
+
s.current && et(this, "scrollSegmentCaptureFromStart", {
|
|
306
317
|
composed: !0,
|
|
307
318
|
custom: !0
|
|
308
319
|
});
|
|
309
320
|
}), t(this, R).subscribe((s) => {
|
|
310
|
-
s.current &&
|
|
321
|
+
s.current && et(this, "scrollSegmentCaptureFromFinish", {
|
|
311
322
|
composed: !0,
|
|
312
323
|
custom: !0
|
|
313
324
|
});
|
|
314
325
|
}), t(this, P).subscribe((s) => {
|
|
315
|
-
s.current &&
|
|
326
|
+
s.current && et(this, "scrollSegmentRelease", {
|
|
316
327
|
composed: !0,
|
|
317
328
|
custom: !0
|
|
318
329
|
});
|
|
319
330
|
}), t(this, E).subscribe((s) => {
|
|
320
|
-
s.current &&
|
|
331
|
+
s.current && et(this, "scrollSegmentReleaseFromStart", {
|
|
321
332
|
composed: !0,
|
|
322
333
|
custom: !0
|
|
323
334
|
});
|
|
324
335
|
}), t(this, L).subscribe((s) => {
|
|
325
|
-
s.current &&
|
|
336
|
+
s.current && et(this, "scrollSegmentReleaseFromFinish", {
|
|
326
337
|
composed: !0,
|
|
327
338
|
custom: !0
|
|
328
339
|
});
|
|
329
|
-
}), t(this,
|
|
340
|
+
}), t(this, G).observe(), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, A).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, W).observe(), t(this, m).observe(), t(this, z).observe(), t(this, k).observe(), t(this, N).observe(), t(this, Y).observe(), t(this, D).observe(), t(this, x).observe(), t(this, M).observe();
|
|
330
341
|
let r = !1;
|
|
331
|
-
this.findAnotherScrollEntries(), t(this,
|
|
332
|
-
t(this,
|
|
333
|
-
}), t(this, G).subscribe((s) => {
|
|
334
|
-
t(this, d).mass = s.current;
|
|
342
|
+
this.findAnotherScrollEntries(), t(this, A).current || this.enable(), t(this, G).subscribe((s) => {
|
|
343
|
+
t(this, S).damping = s.current;
|
|
335
344
|
}), t(this, K).subscribe((s) => {
|
|
336
|
-
t(this,
|
|
337
|
-
}), t(this,
|
|
338
|
-
|
|
339
|
-
}), t(this,
|
|
345
|
+
t(this, S).mass = s.current;
|
|
346
|
+
}), t(this, Z).subscribe((s) => {
|
|
347
|
+
t(this, S).stiffness = s.current;
|
|
348
|
+
}), t(this, j).subscribe((s) => {
|
|
349
|
+
s.previous && u(this, h, pt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
|
|
350
|
+
}), t(this, A).subscribe((s) => {
|
|
340
351
|
s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
|
|
341
|
-
}), t(this,
|
|
342
|
-
r && !t(this,
|
|
343
|
-
}), t(this,
|
|
344
|
-
r && !t(this,
|
|
345
|
-
}), t(this,
|
|
346
|
-
|
|
347
|
-
}), t(this, v).subscribe((s) => {
|
|
348
|
-
o(this, h, j).call(this, s);
|
|
349
|
-
}), t(this, y).subscribe((s) => {
|
|
350
|
-
o(this, h, j).call(this, s);
|
|
352
|
+
}), t(this, $).subscribe(() => {
|
|
353
|
+
r && !t(this, a) && this.resize();
|
|
354
|
+
}), t(this, I).subscribe(() => {
|
|
355
|
+
r && !t(this, a) && this.resize();
|
|
356
|
+
}), t(this, d).subscribe((s) => {
|
|
357
|
+
u(this, h, X).call(this, s);
|
|
351
358
|
}), t(this, C).subscribe((s) => {
|
|
352
|
-
|
|
359
|
+
u(this, h, X).call(this, s);
|
|
360
|
+
}), t(this, y).subscribe((s) => {
|
|
361
|
+
u(this, h, X).call(this, s);
|
|
362
|
+
}), t(this, v).subscribe((s) => {
|
|
363
|
+
u(this, h, X).call(this, s);
|
|
364
|
+
}), t(this, W).subscribe((s) => {
|
|
365
|
+
u(this, h, X).call(this, s);
|
|
366
|
+
}), t(this, m).subscribe((s) => {
|
|
367
|
+
u(this, h, X).call(this, s);
|
|
353
368
|
}), t(this, H).subscribe((s) => {
|
|
354
|
-
|
|
355
|
-
}), t(this, p).subscribe((s) => {
|
|
356
|
-
o(this, h, j).call(this, s);
|
|
357
|
-
}), t(this, $).subscribe((s) => {
|
|
358
|
-
t(this, f) || !s.current && s.previous && (this.resize(), this.enable());
|
|
359
|
-
}), t(this, O).subscribe((s) => {
|
|
360
|
-
t(this, f) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
369
|
+
t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
|
|
361
370
|
}), t(this, z).subscribe((s) => {
|
|
362
|
-
t(this,
|
|
363
|
-
}), t(this, D).subscribe((s) => {
|
|
364
|
-
t(this, f) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
|
|
365
|
-
}), t(this, T).subscribe((s) => {
|
|
366
|
-
t(this, f) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
|
|
371
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
367
372
|
}), t(this, k).subscribe((s) => {
|
|
368
|
-
t(this,
|
|
369
|
-
}), t(this,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
373
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, O)));
|
|
374
|
+
}), t(this, N).subscribe((s) => {
|
|
375
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, O)));
|
|
376
|
+
}), t(this, x).subscribe((s) => {
|
|
377
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
|
|
378
|
+
}), t(this, M).subscribe((s) => {
|
|
379
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
|
|
380
|
+
}), t(this, D).subscribe((s) => {
|
|
381
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
|
|
382
|
+
}), t(this, S).subscribe((s) => {
|
|
383
|
+
if (t(this, Q)) {
|
|
384
|
+
e(this, Q, !1);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const T = t(this, S)[t(this, Y).current];
|
|
388
|
+
e(this, O, T / t(this, b) || 0), this.setVar(t(this, z).current, T.toFixed(6)), this.setVar(
|
|
389
|
+
t(this, k).current,
|
|
390
|
+
t(this, O).toFixed(6)
|
|
391
|
+
), t(this, N).current && this.setVar(
|
|
392
|
+
t(this, N).current,
|
|
393
|
+
Math.abs(Math.cos(t(this, O) * Math.PI)).toFixed(6)
|
|
374
394
|
);
|
|
375
|
-
}),
|
|
376
|
-
},
|
|
377
|
-
t(this,
|
|
378
|
-
},
|
|
379
|
-
t(this,
|
|
380
|
-
t(this,
|
|
381
|
-
), t(this,
|
|
382
|
-
t(this,
|
|
383
|
-
), t(this,
|
|
384
|
-
},
|
|
385
|
-
t(this, P).current = !0, t(this,
|
|
386
|
-
t(this,
|
|
395
|
+
}), ut.subscribe(t(this, U), Ot.SCROLL + 1), ot.subscribe(this, t(this, U)), this.scrollContainer.onScroll(t(this, st)), r = !0;
|
|
396
|
+
}, ft = function() {
|
|
397
|
+
t(this, f) && (ut.unsubscribe(t(this, U)), ot.unsubscribe(t(this, U)), this.scrollContainer.offScroll(t(this, st)), t(this, G).close(), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, A).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, W).close(), t(this, m).close(), t(this, z).close(), t(this, k).close(), t(this, D).close(), t(this, x).close(), t(this, M).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, E).close(), t(this, R).close(), t(this, L).close(), this.disable());
|
|
398
|
+
}, gt = function() {
|
|
399
|
+
t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, m).current && t(this, n).classList.remove(
|
|
400
|
+
t(this, m).current
|
|
401
|
+
), t(this, m).current && t(this, n).classList.remove(
|
|
402
|
+
t(this, m).current
|
|
403
|
+
), t(this, d).current && t(this, n).classList.add(t(this, d).current);
|
|
404
|
+
}, vt = function() {
|
|
405
|
+
t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
|
|
406
|
+
t(this, C).current
|
|
387
407
|
), t(this, y).current && t(this, n).classList.remove(
|
|
388
408
|
t(this, y).current
|
|
389
|
-
), t(this,
|
|
390
|
-
},
|
|
391
|
-
t(this,
|
|
392
|
-
t(this,
|
|
409
|
+
), t(this, v).current && t(this, n).classList.add(t(this, v).current);
|
|
410
|
+
}, Ct = function() {
|
|
411
|
+
t(this, p).current = !0, t(this, V).current = !0, t(this, E).current = !1, t(this, C).current && t(this, n).classList.add(
|
|
412
|
+
t(this, C).current
|
|
393
413
|
);
|
|
394
|
-
},
|
|
395
|
-
t(this,
|
|
414
|
+
}, yt = function() {
|
|
415
|
+
t(this, p).current = !0, t(this, R).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
|
|
396
416
|
t(this, y).current
|
|
397
417
|
);
|
|
398
|
-
},
|
|
399
|
-
t(this, P).current = !0, t(this, E).current = !0, t(this, V).current = !1, t(this,
|
|
400
|
-
t(this,
|
|
418
|
+
}, Pt = function() {
|
|
419
|
+
t(this, P).current = !0, t(this, E).current = !0, t(this, V).current = !1, t(this, m).current && t(this, n).classList.add(
|
|
420
|
+
t(this, m).current
|
|
401
421
|
);
|
|
402
|
-
},
|
|
403
|
-
t(this, P).current = !0, t(this, L).current = !0, t(this, R).current = !1, t(this,
|
|
404
|
-
t(this,
|
|
422
|
+
}, Vt = function() {
|
|
423
|
+
t(this, P).current = !0, t(this, L).current = !0, t(this, R).current = !1, t(this, m).current && t(this, n).classList.add(
|
|
424
|
+
t(this, m).current
|
|
405
425
|
);
|
|
406
|
-
},
|
|
407
|
-
if (t(this,
|
|
426
|
+
}, U = new WeakMap(), st = new WeakMap(), X = function(r) {
|
|
427
|
+
if (t(this, a)) {
|
|
408
428
|
r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
|
|
409
429
|
return;
|
|
410
430
|
}
|
|
411
|
-
r.current && t(this,
|
|
412
|
-
},
|
|
431
|
+
r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
|
|
432
|
+
}, Ft = function(...r) {
|
|
413
433
|
r.forEach((s) => {
|
|
414
434
|
s && t(this, n).classList.remove(s);
|
|
415
435
|
});
|
|
416
|
-
},
|
|
436
|
+
}, Lt = function(...r) {
|
|
417
437
|
r.forEach((s) => {
|
|
418
438
|
s && t(this, n).style.removeProperty(`--${s}`);
|
|
419
439
|
});
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
},
|
|
423
|
-
|
|
440
|
+
}, pt = function() {
|
|
441
|
+
u(this, h, Ft).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, W).current, t(this, m).current), u(this, h, Lt).call(this, t(this, z).current, t(this, k).current, t(this, D).current, t(this, x).current, t(this, M).current);
|
|
442
|
+
}, dt);
|
|
443
|
+
Et && !customElements.get("scroll-segment") && customElements.define("scroll-segment", It);
|
|
424
444
|
export {
|
|
425
|
-
|
|
426
|
-
|
|
445
|
+
St as ScrollSegmentDefaultContainer,
|
|
446
|
+
It as ScrollSegmentElement
|
|
427
447
|
};
|