aptechka 0.82.4 → 0.82.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{Animation-DxtCzFP3.js → Animation-BzTjZIE-.js} +2 -2
- package/lib/{Animation-jmvFcNfM.cjs → Animation-C39Ah-LM.cjs} +1 -1
- package/lib/{Composed-DtS09lSU.js → Composed-C-mnUGX6.js} +2 -2
- package/lib/{Composed-CSeUTRCg.cjs → Composed-RFcm2x5c.cjs} +1 -1
- package/lib/{Damped-DMnIOXpC.js → Damped-CRusiRIV.js} +2 -2
- package/lib/{Damped-77Urmi3q.cjs → Damped-Prr0iKu1.cjs} +1 -1
- package/lib/{DerivedArray-B8A0-8uT.cjs → DerivedArray-DdCR-Oy7.cjs} +1 -1
- package/lib/{DerivedArray-DG9iR0mf.js → DerivedArray-opbeygTL.js} +1 -1
- package/lib/{DragControls-BlL26P1V.cjs → DragControls-8rNZwQrs.cjs} +1 -1
- package/lib/{DragControls-DCC8iEOR.js → DragControls-DBNdMBA4.js} +4 -4
- package/lib/{LocalLinks-Bua7BGRF.cjs → LocalLinks-Baf0xWZ3.cjs} +1 -1
- package/lib/{LocalLinks-TQkTpAMx.js → LocalLinks-Z9pxKguG.js} +2 -2
- package/lib/{PageAnnouncerElement-sfh0_4vl.js → PageAnnouncerElement-0LxZjtVH.js} +1 -1
- package/lib/{PageAnnouncerElement-C4k2kDJ5.cjs → PageAnnouncerElement-AQ0Ja6HM.cjs} +1 -1
- package/lib/{PageScroll-cQ3B5-6N.js → PageScroll-0LxFblry.js} +1 -1
- package/lib/{PageScroll-C7QBpx0G.cjs → PageScroll-BXJUQwG7.cjs} +1 -1
- package/lib/{SourceElement-TzgPNQOd.cjs → SourceElement-BHqPFbna.cjs} +1 -1
- package/lib/{SourceElement-BQ7g2KWK.js → SourceElement-DjbHjynf.js} +2 -2
- package/lib/{Store-1JrMCgdX.cjs → Store-Blf4msDz.cjs} +1 -1
- package/lib/{Store-CgQ3ReoB.js → Store-ZThXYBQd.js} +1 -1
- package/lib/{Tweened-lT68VACv.js → Tweened-Bw1Cn1PJ.js} +2 -2
- package/lib/{Tweened-CXQrFQth.cjs → Tweened-DWtk9E-O.cjs} +1 -1
- package/lib/{Viewport-Cx50Hufs.cjs → Viewport-BxCr0GlB.cjs} +1 -1
- package/lib/{Viewport-DGnJ31b4.js → Viewport-Dt-d9DPi.js} +2 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +3 -3
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +3 -3
- package/lib/css-value-parser/index.cjs +1 -1
- package/lib/css-value-parser/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +2 -2
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/dom-BETkVSSZ.js +82 -0
- package/lib/dom-CBLlqORw.cjs +1 -0
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +2 -2
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +2 -2
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +2 -2
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +3 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +4 -4
- package/lib/{index-CKTweR3M.cjs → index-OE2INULi.cjs} +1 -1
- package/lib/{index-LReFyN6i.js → index-e9eDuagL.js} +1 -1
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.js +6 -6
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +2 -2
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/local-links/index.cjs +1 -1
- package/lib/local-links/index.js +1 -1
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +2 -2
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +293 -300
- package/lib/{morph-BQErz7qP.js → morph-D_ybmXWR.js} +8 -8
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +3 -3
- package/lib/page-announcer/index.cjs +1 -1
- package/lib/page-announcer/index.js +1 -1
- package/lib/page-scroll/index.cjs +1 -1
- package/lib/page-scroll/index.js +1 -1
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +3 -3
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +4 -4
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/render-1u700s93.js +212 -0
- package/lib/render-BIOfUddT.cjs +1 -0
- package/lib/router/Route.d.ts +9 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +154 -139
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +8 -8
- package/lib/{scroll-DxcPU0vk.cjs → scroll-BA2WnUrb.cjs} +1 -1
- package/lib/{scroll-jcbHDexr.js → scroll-DY5senkF.js} +2 -2
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.js +1 -1
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +4 -4
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +3 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +1 -1
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/spa/index.cjs +1 -1
- package/lib/spa/index.js +5 -5
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +3 -3
- package/lib/{stylesheet-BcwbfhBp.cjs → stylesheet-5_o7PFzM.cjs} +1 -1
- package/lib/{stylesheet-DbHOxtjw.js → stylesheet-DdBzowZY.js} +1 -1
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/utils/dom.d.ts +3 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +129 -126
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +3 -3
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +3 -3
- package/package.json +1 -1
- package/lib/dom-BIeVMHfK.js +0 -57
- package/lib/dom-hTEdqeoj.cjs +0 -1
- package/lib/render-B3Hf-O7M.js +0 -205
- package/lib/render-BWjKu0M_.cjs +0 -1
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=S=>{throw TypeError(S)};var Us=(S,h,e)=>h in S?pi(S,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[h]=e,Zs=(S,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(S,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(S,e,h[e]);return S};var Is=(S,h,e)=>h.has(S)||Gs("Cannot "+e);var t=(S,h,e)=>(Is(S,h,"read from private field"),e?e.call(S):h.get(S)),i=(S,h,e)=>h.has(S)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(S):h.set(S,e),r=(S,h,e,s)=>(Is(S,h,"write to private field"),s?s.call(S,e):h.set(S,e),e),o=(S,h,e)=>(Is(S,h,"access private method"),e);var Rs=(S,h,e)=>gi(fi(S),e,h);var As=(S,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(S,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Se=require("../Store-1JrMCgdX.cjs"),_=require("../index-CKTweR3M.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-BcwbfhBp.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-77Urmi3q.cjs"),vi=require("../Tweened-CXQrFQth.cjs"),Es=require("../DragControls-BlL26P1V.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-Cx50Hufs.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-hTEdqeoj.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,Ss,ds,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,de,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,d,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,Ss,0);i(this,ds,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new Se.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,d).shift(n*t(this,L))}else t(this,d).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,Ss)}get contentPosition(){return t(this,ds)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,d).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,d).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,d).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,Ss,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,ds,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,d).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,d,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,de).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(r(this,$e,0),t(this,d).max=t(this,P),t(this,d).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,d).damping=e.current}),t(this,ye).subscribe(e=>{t(this,d).mass=e.current}),t(this,ve).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,de).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,de).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}d=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,Ss=new WeakMap,ds=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,de).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,d).unsubscribe(t(this,ps)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,d).subscribe(t(this,ps),-1e4),t(this,d).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,d).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,d)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,d)[e]},de=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,d).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,St,dt,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,Si,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,St);i(this,dt);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,St,new l.CSSProperty(this,"--start-var","")),r(this,dt,new l.CSSProperty(this,"--finish-var","")),r(this,w,new Se.Store(!1)),r(this,H,new Se.Store(!1)),r(this,W,new Se.Store(!1)),r(this,tt,new Se.Store(!1)),r(this,et,new Se.Store(!1)),r(this,Z,new Se.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,St).current,t(this,O)),this.setVar(t(this,dt).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,St)}get finishVarCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,St).observe(),t(this,dt).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,St).close(),t(this,dt).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,St=new WeakMap,dt=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},Si=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,Si).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,St).current,t(this,dt).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class di extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",di);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ti;exports.ScrollSectionButtonElement=di;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;
|
|
1
|
+
"use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=S=>{throw TypeError(S)};var Us=(S,h,e)=>h in S?pi(S,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[h]=e,Zs=(S,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(S,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(S,e,h[e]);return S};var Is=(S,h,e)=>h.has(S)||Gs("Cannot "+e);var t=(S,h,e)=>(Is(S,h,"read from private field"),e?e.call(S):h.get(S)),i=(S,h,e)=>h.has(S)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(S):h.set(S,e),r=(S,h,e,s)=>(Is(S,h,"write to private field"),s?s.call(S,e):h.set(S,e),e),o=(S,h,e)=>(Is(S,h,"access private method"),e);var Rs=(S,h,e)=>gi(fi(S),e,h);var As=(S,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(S,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Se=require("../Store-Blf4msDz.cjs"),_=require("../index-OE2INULi.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-5_o7PFzM.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-Prr0iKu1.cjs"),vi=require("../Tweened-DWtk9E-O.cjs"),Es=require("../DragControls-8rNZwQrs.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-BxCr0GlB.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-CBLlqORw.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,Ss,ds,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,de,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,d,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,Ss,0);i(this,ds,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new Se.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,d).shift(n*t(this,L))}else t(this,d).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,Ss)}get contentPosition(){return t(this,ds)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,d).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,d).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,d).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,Ss,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,ds,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,d).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,d,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,de).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(r(this,$e,0),t(this,d).max=t(this,P),t(this,d).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,d).damping=e.current}),t(this,ye).subscribe(e=>{t(this,d).mass=e.current}),t(this,ve).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,de).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,de).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}d=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,Ss=new WeakMap,ds=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,de).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,d).unsubscribe(t(this,ps)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,d).subscribe(t(this,ps),-1e4),t(this,d).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,d).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,d)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,d)[e]},de=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,d).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,St,dt,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,Si,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,St);i(this,dt);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,St,new l.CSSProperty(this,"--start-var","")),r(this,dt,new l.CSSProperty(this,"--finish-var","")),r(this,w,new Se.Store(!1)),r(this,H,new Se.Store(!1)),r(this,W,new Se.Store(!1)),r(this,tt,new Se.Store(!1)),r(this,et,new Se.Store(!1)),r(this,Z,new Se.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,St).current,t(this,O)),this.setVar(t(this,dt).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,St)}get finishVarCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,St).observe(),t(this,dt).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,St).close(),t(this,dt).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,St=new WeakMap,dt=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},Si=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,Si).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,St).current,t(this,dt).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class di extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",di);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ti;exports.ScrollSectionButtonElement=di;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;
|
package/lib/scroll/index.js
CHANGED
|
@@ -30,8 +30,8 @@ var zs = (d, n, e) => new Promise((s, h) => {
|
|
|
30
30
|
}, v = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(u, g);
|
|
31
31
|
v((e = e.apply(d, n)).next());
|
|
32
32
|
});
|
|
33
|
-
import { S as ae } from "../Store-
|
|
34
|
-
import { i as q } from "../index-
|
|
33
|
+
import { S as ae } from "../Store-ZThXYBQd.js";
|
|
34
|
+
import { i as q } from "../index-e9eDuagL.js";
|
|
35
35
|
import { q as fi } from "../easings-BEmRlrDd.js";
|
|
36
36
|
import { i as pi } from "../element-CGVl1jA-.js";
|
|
37
37
|
import { d as st } from "../events-CsVF98U6.js";
|
|
@@ -39,21 +39,21 @@ import { d as xs } from "../function-C10DGppn.js";
|
|
|
39
39
|
import { a as ls, g as cs, b as bi } from "../layout-BSMtwCga.js";
|
|
40
40
|
import { c as js, s as mi } from "../math-BOBiC4TN.js";
|
|
41
41
|
import { p as Si, l as gi } from "../number-CumqY64S.js";
|
|
42
|
-
import { c as Js } from "../stylesheet-
|
|
42
|
+
import { c as Js } from "../stylesheet-DdBzowZY.js";
|
|
43
43
|
import "../ticker/index.js";
|
|
44
44
|
import { TICK_ORDER as Qs, RESIZE_ORDER as Ls } from "../order/index.js";
|
|
45
|
-
import { D as Xs } from "../Damped-
|
|
46
|
-
import { T as vi } from "../Tweened-
|
|
47
|
-
import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-
|
|
45
|
+
import { D as Xs } from "../Damped-CRusiRIV.js";
|
|
46
|
+
import { T as vi } from "../Tweened-Bw1Cn1PJ.js";
|
|
47
|
+
import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-DBNdMBA4.js";
|
|
48
48
|
import { windowResizer as pt } from "../window-resizer/index.js";
|
|
49
49
|
import { scrollEntries as ce } from "../scroll-entries/index.js";
|
|
50
50
|
import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
|
|
51
51
|
import { CSSProperty as l } from "../css-property/index.js";
|
|
52
|
-
import { d as wi } from "../Viewport-
|
|
52
|
+
import { d as wi } from "../Viewport-Dt-d9DPi.js";
|
|
53
53
|
import "construct-style-sheets-polyfill";
|
|
54
54
|
import { elementResizer as os } from "../element-resizer/index.js";
|
|
55
55
|
import { s as xi } from "../gestures-CcXV6fCp.js";
|
|
56
|
-
import { b as Li } from "../dom-
|
|
56
|
+
import { b as Li } from "../dom-BETkVSSZ.js";
|
|
57
57
|
var p, Re, E, us, as, pe, bt, $t, be, Bt, Fe;
|
|
58
58
|
class ki {
|
|
59
59
|
constructor(n, e, s) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./dom-
|
|
1
|
+
"use strict";const f=require("./dom-CBLlqORw.cjs"),g=require("./layout-Ctc2p3uz.cjs");require("construct-style-sheets-polyfill");require("./index-OE2INULi.cjs");function h(t){return new Promise(o=>{setTimeout(()=>{o()},t)})}function E(t,{behavior:o="instant",offset:s=0,center:c=!1,scrollElement:l}={}){var u;let n,i=l,r=l;if(typeof t=="number")n=t;else{const e=f.getElement(t);e&&(i=e,r=l||f.findScrollParentElement(e),n=g.getCumulativeOffsetTop(e))}if(i&&r&&typeof n=="number"){const e=(typeof s=="number"?s:((u=f.getElement(s))==null?void 0:u.offsetHeight)||0)*-1,a=i instanceof HTMLElement?i.offsetHeight:innerHeight,m=c?innerHeight/2*-1+a/2:0;r.scroll({top:n+e+m,behavior:o})}}exports.scrollToElement=E;exports.wait=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as l, f as u } from "./dom-
|
|
1
|
+
import { g as l, f as u } from "./dom-BETkVSSZ.js";
|
|
2
2
|
import { a as g } from "./layout-BSMtwCga.js";
|
|
3
3
|
import "construct-style-sheets-polyfill";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-e9eDuagL.js";
|
|
5
5
|
function w(e) {
|
|
6
6
|
return new Promise((o) => {
|
|
7
7
|
setTimeout(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var u=i=>{throw TypeError(i)};var c=(i,t,r)=>t.has(i)||u("Cannot "+r);var s=(i,t,r)=>(c(i,t,"read from private field"),r?r.call(i):t.get(i)),l=(i,t,r)=>t.has(i)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../notifier/index.cjs"),g=require("../dom-
|
|
1
|
+
"use strict";var u=i=>{throw TypeError(i)};var c=(i,t,r)=>t.has(i)||u("Cannot "+r);var s=(i,t,r)=>(c(i,t,"read from private field"),r?r.call(i):t.get(i)),l=(i,t,r)=>t.has(i)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../notifier/index.cjs"),g=require("../dom-CBLlqORw.cjs");var h,e,o;class d{constructor(){l(this,h,new Set);l(this,e,new WeakMap);l(this,o,new f.Notifier)}get notifier(){return s(this,o)}register(t){s(this,e).has(t)||(s(this,e).set(t,{axis:"y",value:0,element:t}),s(this,h).add(t),s(this,o).notify())}unregister(t){s(this,e).has(t)&&s(this,h).has(t)&&(s(this,e).delete(t),s(this,h).delete(t),s(this,o).notify())}update(t,r,a){const n=s(this,e).get(t);n&&(n.axis=r,n.value=a)}hasEntry(t){return s(this,e).has(t)}getEntry(t){return s(this,e).get(t)}getAll(t){const r=g.getAllParentElements(t).filter(n=>s(this,h).has(n)),a=[];return r.forEach(n=>{s(this,e).has(n)&&a.push(s(this,e).get(n))}),a}}h=new WeakMap,e=new WeakMap,o=new WeakMap;const y=new d;exports.scrollEntries=y;
|
|
@@ -4,7 +4,7 @@ var l = (i) => {
|
|
|
4
4
|
var u = (i, t, e) => t.has(i) || l("Cannot " + e);
|
|
5
5
|
var s = (i, t, e) => (u(i, t, "read from private field"), e ? e.call(i) : t.get(i)), f = (i, t, e) => t.has(i) ? l("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e);
|
|
6
6
|
import { Notifier as g } from "../notifier/index.js";
|
|
7
|
-
import { a as c } from "../dom-
|
|
7
|
+
import { a as c } from "../dom-BETkVSSZ.js";
|
|
8
8
|
var n, r, a;
|
|
9
9
|
class p {
|
|
10
10
|
constructor() {
|
package/lib/scroll-kit/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var pt=n=>{throw TypeError(n)};var lt=(n,c,e)=>c.has(n)||pt("Cannot "+e);var t=(n,c,e)=>(lt(n,c,"read from private field"),e?e.call(n):c.get(n)),s=(n,c,e)=>c.has(n)?pt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,e),r=(n,c,e,i)=>(lt(n,c,"write to private field"),i?i.call(n,e):c.set(n,e),e),u=(n,c,e)=>(lt(n,c,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../index-CKTweR3M.cjs"),K=require("../ticker/index.cjs"),Ht=require("../dom-hTEdqeoj.cjs"),qt=require("../gestures-C7gbKx11.cjs");require("construct-style-sheets-polyfill");const ct=require("../scroll-entries/index.cjs");require("../Store-1JrMCgdX.cjs");const Mt=require("../Damped-77Urmi3q.cjs"),f=require("../css-property/index.cjs"),Vt=require("../element-linked-store/index.cjs"),gt=require("../element-resizer/index.cjs"),at=require("../events-KVanG9sR.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Tt=require("../math-GDWEqu7y.cjs"),yt=require("../window-resizer/index.cjs");var o,b,O,x,a,D,y,dt,vt,wt,J,ht,N,k,Q;class Et extends HTMLElement{constructor(){super(...arguments);s(this,y);s(this,o,null);s(this,b,null);s(this,O,0);s(this,x,0);s(this,a,!1);s(this,D);s(this,J,()=>{this.classList.add("active"),clearTimeout(t(this,D));const i=t(this,y,dt)/t(this,x)*t(this,O);t(this,a)?t(this,b).style.transform=`translate3d(${i}px, 0px, 0px)`:t(this,b).style.transform=`translate3d(0px, ${i}px, 0px)`,r(this,D,setTimeout(()=>{this.classList.remove("active")},1e3))});s(this,ht,()=>{const e=t(this,a)?this.offsetWidth:this.offsetHeight,i=t(this,y,vt),p=t(this,y,wt);r(this,x,i-p);let E=e*e/(t(this,x)+e);E=Math.max(E,30),t(this,a)?(t(this,b).style.width=E+"px",t(this,b).style.height="100%"):(t(this,b).style.width="100%",t(this,b).style.height=E+"px"),r(this,O,e-E),i<=p?this.style.display="none":this.style.display="block"});s(this,N,e=>{const i=t(this,y,dt),p=t(this,a)?e.x:e.y;qt.setupDrag(E=>{const zt=t(this,x)/t(this,O),bt=(t(this,a)?E.x-p:E.y-p)*zt;t(this,a)?t(this,o).scroll({left:i+bt,behavior:"instant"}):t(this,o).scroll({top:i+bt,behavior:"instant"})})});s(this,k,()=>{t(this,ht).call(this)});s(this,Q,e=>{e.isIntersecting?(K.ticker.subscribe(t(this,k),{maxFPS:5}),t(this,k).call(this)):K.ticker.unsubscribe(t(this,k))})}connectedCallback(){const e=this.getAttribute("data-scroll");let i=null;e&&(e==="parent"?i=this.parentElement:i=document.querySelector(e)),i||(i=Ht.findScrollParentElement(this),i===document.body&&(i=window)),r(this,a,this.hasAttribute("horisontal"));const p=this.querySelector("[data-thumb]");i&&p&&(r(this,o,i),r(this,b,p),t(this,o).addEventListener("scroll",t(this,J)),t(this,b).addEventListener("pointerdown",t(this,N)),ut.intersector.subscribe(this.parentElement===document.body?this:this.parentElement,t(this,Q)))}disconnectedCallback(){var e,i;(e=t(this,o))==null||e.removeEventListener("scroll",t(this,J)),(i=t(this,b))==null||i.removeEventListener("pointerdown",t(this,N)),clearTimeout(t(this,D)),ut.intersector.unsubscribe(t(this,Q)),K.ticker.unsubscribe(t(this,k))}}o=new WeakMap,b=new WeakMap,O=new WeakMap,x=new WeakMap,a=new WeakMap,D=new WeakMap,y=new WeakSet,dt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollLeft:t(this,o).scrollTop:t(this,a)?t(this,o).scrollX:t(this,o).scrollY},vt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollWidth:t(this,o).scrollHeight:t(this,a)?Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth):Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},wt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).offsetWidth:t(this,o).offsetHeight:t(this,a)?innerWidth:innerHeight},J=new WeakMap,ht=new WeakMap,N=new WeakMap,k=new WeakMap,Q=new WeakMap;ut.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Et);const At=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","Space"]);var _,Y,h,Z,F,z,B,tt,et,st,it,rt;class Lt extends HTMLElement{constructor(){super(...arguments);s(this,z);s(this,_,new f.CSSProperty(this,"--smooth-scroll-disabled",!1));s(this,Y,new f.CSSProperty(this,"--smooth-scroll-damping",10));s(this,h,new Mt.Damped(0));s(this,Z,0);s(this,F,!1);s(this,tt,e=>{if(!u(this,z,B).call(this)){if(Math.sign(e.deltaY)<0&&t(this,h).target===0&&t(this,h).direction<0||Math.sign(e.deltaY)>0&&t(this,h).target===t(this,h).max&&t(this,h).direction>0||e.stopPropagation(),e.target instanceof Element){const i=e.target.closest("[data-prevent-smooth-scroll]");if(i){const p=i.getAttribute("data-prevent-smooth-scroll");if(p){if(matchMedia(p).matches)return}else return}}Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),this.shiftPosition(e.deltaY))}});s(this,et,()=>{u(this,z,B).call(this)||this.stop()});s(this,st,e=>{u(this,z,B).call(this)||e.target instanceof Element&&e.target.closest("a")&&this.stop()});s(this,it,()=>{this.resize()});s(this,rt,e=>{u(this,z,B).call(this)||At.has(e.code)&&this.stop()})}resize(){t(this,h).min=0,t(this,h).max=this.scrollHeight-this.offsetHeight}stop(){t(this,h).unlistenAnimationFrame(),r(this,F,!0)}sync(){const e=this.scrollTop;(t(this,F)||Math.abs(e-t(this,h).current)>100)&&(r(this,F,!1),t(this,h).set(e,{equalize:!0}))}shiftPosition(e){this.resize(),this.sync(),t(this,h).shift(e)}setPosition(e,i){this.resize(),this.sync(),t(this,h).set(e,i)}connectedCallback(){window.addEventListener("resize",t(this,it)),this.addEventListener("keydown",t(this,rt)),this.addEventListener("pointerdown",t(this,st)),this.addEventListener("touchstart",t(this,et)),this.addEventListener("wheel",t(this,tt),{passive:!1}),t(this,h).subscribe(e=>{const i=Math.round(e.current);ct.scrollEntries.update(this,"y",e.current),i!==t(this,Z)&&this.scroll({top:i,behavior:"instant"}),r(this,Z,i)}),t(this,Y).observe(),t(this,_).observe(),t(this,Y).subscribe(e=>{t(this,h).damping=e.current}),ct.scrollEntries.register(this),this.resize()}disconnectedCallback(){t(this,h).close(),t(this,Y).close(),t(this,_).close(),ct.scrollEntries.unregister(this),window.removeEventListener("resize",t(this,it)),this.removeEventListener("keydown",t(this,rt)),this.removeEventListener("pointerdown",t(this,st)),this.removeEventListener("touchstart",t(this,et)),this.removeEventListener("wheel",t(this,tt))}}_=new WeakMap,Y=new WeakMap,h=new WeakMap,Z=new WeakMap,F=new WeakMap,z=new WeakSet,B=function(){return t(this,_).current||getComputedStyle(this).getPropertyValue("overflow")==="hidden"},tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap;customElements.get("e-smooth-scroll")||customElements.define("e-smooth-scroll",Lt);var H,v,q,$,G,w,M,V,I,L,U,S,T,d,nt,m,g,A,R,P,X,l,Ct,mt,xt,C,W,ft,kt,ot,j;class Pt extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,H,this);s(this,v,this);s(this,q,null);s(this,$,new f.CSSProperty(this,"--scroll-region-status-holder",!1));s(this,G,new f.CSSProperty(this,"--scroll-region-progress-holder",!1));s(this,w,new f.CSSProperty(this,"--scroll-region-disabled",!1));s(this,M,new f.CSSProperty(this,"--scroll-region-start-offset",0,{rawValueCheck:!1}));s(this,V,new f.CSSProperty(this,"--scroll-region-start-offset-min",!1,{rawValueCheck:!1}));s(this,I,new f.CSSProperty(this,"--scroll-region-start-extra-offset",0,{rawValueCheck:!1}));s(this,L,new f.CSSProperty(this,"--scroll-region-distance",0,{rawValueCheck:!1}));s(this,U,new f.CSSProperty(this,"--scroll-region-distance-offset",0,{rawValueCheck:!1}));s(this,S,new f.CSSProperty(this,"--scroll-region-progress-var",""));s(this,T,new f.CSSProperty(this,"--scroll-region-enter-once",!1));s(this,d,new Vt.ElementLinkedStore(this,{enabled:!1,entered:!1,enteredOnLoad:!1,activated:!1}));s(this,nt,0);s(this,m,0);s(this,g,0);s(this,A,0);s(this,R,0);s(this,P,0);s(this,X,!1);s(this,C,()=>{this.resize()});s(this,W,()=>{this.tick()});s(this,j,()=>{document.readyState==="complete"&&u(this,l,xt).call(this)})}get start(){return t(this,m)}get finish(){return t(this,g)}get distance(){return t(this,A)}get scrolled(){return t(this,R)}get progress(){return t(this,P)}get status(){return t(this,d)}get scrollValue(){return t(this,q)instanceof HTMLElement?t(this,q).scrollTop:t(this,q).scrollY}resize(){t(this,w).current||(r(this,nt,St.getCumulativeOffsetTop(this)),r(this,m,t(this,nt)),typeof t(this,V).current=="number"?r(this,m,t(this,m)+Math.max(t(this,M).current,t(this,V).current)):r(this,m,t(this,m)+t(this,M).current),r(this,m,t(this,m)+t(this,I).current),r(this,m,t(this,m)-St.getStickyOffset(this,"top")),r(this,g,t(this,m)),t(this,L).current?r(this,g,t(this,g)+t(this,L).current):r(this,g,t(this,g)+this.offsetHeight),r(this,g,t(this,g)+t(this,U).current),r(this,A,t(this,g)-t(this,m)),r(this,X,this.offsetWidth!==0&&this.offsetHeight!==0),this.tick())}tick(){if(t(this,w).current)return;const e=this.scrollValue;r(this,R,Tt.clamp(e-t(this,m),0,t(this,A))),r(this,P,t(this,R)/t(this,A)||0),t(this,S).current&&t(this,v).style.setProperty(u(this,l,ot).call(this,t(this,S).current),t(this,P).toFixed(6)),t(this,d).set("activated",e>=t(this,m)),t(this,X)&&t(this,d).isFalse("entered")&&e>=t(this,m)&&e<=t(this,g)?u(this,l,ft).call(this):t(this,X)&&!t(this,T).current&&t(this,d).isTrue("entered")&&(e<t(this,m)||e>t(this,g))&&u(this,l,kt).call(this),t(this,T).current&&t(this,P)===1&&(t(this,d).current.entered||u(this,l,ft).call(this),this.destroy()),at.dispatchEvent(this,"scrollRegionProgress",{detail:{progress:t(this,P),scrolled:t(this,R)}})}destroy(){document.removeEventListener("readystatechange",t(this,j)),this.disable(!1),t(this,$).close(),t(this,G).close(),t(this,w).close(),t(this,M).close(),t(this,V).close(),t(this,I).close(),t(this,L).close(),t(this,U).close(),t(this,S).close(),t(this,T).close()}enable(){K.ticker.subscribe(t(this,W),{culling:this}),gt.elementResizer.subscribe(this,t(this,C)),yt.windowResizer.subscribe(t(this,C)),t(this,W).call(this),t(this,d).set("enabled",!0)}disable(e=!0){K.ticker.unsubscribe(t(this,W)),gt.elementResizer.unsubscribe(t(this,C)),yt.windowResizer.unsubscribe(t(this,C)),e&&t(this,d).reset(),u(this,l,mt).call(this)}connectedCallback(){const e=this.getAttribute("data-scroll")||".page-scroll";r(this,q,document.querySelector(e)),document.readyState==="complete"?t(this,j).call(this):document.addEventListener("readystatechange",t(this,j))}disconnectedCallback(){this.destroy()}}H=new WeakMap,v=new WeakMap,q=new WeakMap,$=new WeakMap,G=new WeakMap,w=new WeakMap,M=new WeakMap,V=new WeakMap,I=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,T=new WeakMap,d=new WeakMap,nt=new WeakMap,m=new WeakMap,g=new WeakMap,A=new WeakMap,R=new WeakMap,P=new WeakMap,X=new WeakMap,l=new WeakSet,Ct=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.add(this.getAttribute("data-global-class"))},mt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.remove(this.getAttribute("data-global-class"))},xt=function(){t(this,$).subscribe(e=>{t(this,H)&&t(this,d).removeElement(t(this,H)),r(this,H,e.current?document.querySelector(e.current)||this:this),t(this,d).addElement(t(this,H))}),t(this,G).subscribe(e=>{t(this,v)&&t(this,v).style.removeProperty(u(this,l,ot).call(this,t(this,S).current)),r(this,v,e.current?document.querySelector(e.current)||this:this)}),t(this,w).subscribe(e=>{e.current&&!e.previous?this.disable():this.enable()}),t(this,S).subscribe(e=>{e.current?t(this,W).call(this):e.previous&&t(this,v).style.removeProperty(u(this,l,ot).call(this,e.previous))}),t(this,L).subscribe(()=>{t(this,C).call(this)}),t(this,$).observe(),t(this,G).observe(),t(this,w).observe(),t(this,M).observe(),t(this,V).observe(),t(this,I).observe(),t(this,L).observe(),t(this,U).observe(),t(this,S).observe(),t(this,T).observe()},C=new WeakMap,W=new WeakMap,ft=function(){const e=this.scrollValue;t(this,d).set("entered",!0),e===0&&t(this,d).set("enteredOnLoad",!0),u(this,l,Ct).call(this),at.dispatchEvent(this,"scrollRegionEnter")},kt=function(){t(this,d).set("entered",!1),u(this,l,mt).call(this),at.dispatchEvent(this,"scrollRegionExit")},ot=function(e){return`--${e}`},j=new WeakMap;customElements.get("e-scroll-region")||customElements.define("e-scroll-region",Pt);exports.ScrollRegionElement=Pt;exports.ScrollbarElement=Et;exports.SmoothScrollElement=Lt;
|
|
1
|
+
"use strict";var pt=n=>{throw TypeError(n)};var lt=(n,c,e)=>c.has(n)||pt("Cannot "+e);var t=(n,c,e)=>(lt(n,c,"read from private field"),e?e.call(n):c.get(n)),s=(n,c,e)=>c.has(n)?pt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,e),r=(n,c,e,i)=>(lt(n,c,"write to private field"),i?i.call(n,e):c.set(n,e),e),u=(n,c,e)=>(lt(n,c,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../index-OE2INULi.cjs"),K=require("../ticker/index.cjs"),Ht=require("../dom-CBLlqORw.cjs"),qt=require("../gestures-C7gbKx11.cjs");require("construct-style-sheets-polyfill");const ct=require("../scroll-entries/index.cjs");require("../Store-Blf4msDz.cjs");const Mt=require("../Damped-Prr0iKu1.cjs"),f=require("../css-property/index.cjs"),Vt=require("../element-linked-store/index.cjs"),gt=require("../element-resizer/index.cjs"),at=require("../events-KVanG9sR.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Tt=require("../math-GDWEqu7y.cjs"),yt=require("../window-resizer/index.cjs");var o,b,O,x,a,D,y,dt,vt,wt,J,ht,N,k,Q;class Et extends HTMLElement{constructor(){super(...arguments);s(this,y);s(this,o,null);s(this,b,null);s(this,O,0);s(this,x,0);s(this,a,!1);s(this,D);s(this,J,()=>{this.classList.add("active"),clearTimeout(t(this,D));const i=t(this,y,dt)/t(this,x)*t(this,O);t(this,a)?t(this,b).style.transform=`translate3d(${i}px, 0px, 0px)`:t(this,b).style.transform=`translate3d(0px, ${i}px, 0px)`,r(this,D,setTimeout(()=>{this.classList.remove("active")},1e3))});s(this,ht,()=>{const e=t(this,a)?this.offsetWidth:this.offsetHeight,i=t(this,y,vt),p=t(this,y,wt);r(this,x,i-p);let E=e*e/(t(this,x)+e);E=Math.max(E,30),t(this,a)?(t(this,b).style.width=E+"px",t(this,b).style.height="100%"):(t(this,b).style.width="100%",t(this,b).style.height=E+"px"),r(this,O,e-E),i<=p?this.style.display="none":this.style.display="block"});s(this,N,e=>{const i=t(this,y,dt),p=t(this,a)?e.x:e.y;qt.setupDrag(E=>{const zt=t(this,x)/t(this,O),bt=(t(this,a)?E.x-p:E.y-p)*zt;t(this,a)?t(this,o).scroll({left:i+bt,behavior:"instant"}):t(this,o).scroll({top:i+bt,behavior:"instant"})})});s(this,k,()=>{t(this,ht).call(this)});s(this,Q,e=>{e.isIntersecting?(K.ticker.subscribe(t(this,k),{maxFPS:5}),t(this,k).call(this)):K.ticker.unsubscribe(t(this,k))})}connectedCallback(){const e=this.getAttribute("data-scroll");let i=null;e&&(e==="parent"?i=this.parentElement:i=document.querySelector(e)),i||(i=Ht.findScrollParentElement(this),i===document.body&&(i=window)),r(this,a,this.hasAttribute("horisontal"));const p=this.querySelector("[data-thumb]");i&&p&&(r(this,o,i),r(this,b,p),t(this,o).addEventListener("scroll",t(this,J)),t(this,b).addEventListener("pointerdown",t(this,N)),ut.intersector.subscribe(this.parentElement===document.body?this:this.parentElement,t(this,Q)))}disconnectedCallback(){var e,i;(e=t(this,o))==null||e.removeEventListener("scroll",t(this,J)),(i=t(this,b))==null||i.removeEventListener("pointerdown",t(this,N)),clearTimeout(t(this,D)),ut.intersector.unsubscribe(t(this,Q)),K.ticker.unsubscribe(t(this,k))}}o=new WeakMap,b=new WeakMap,O=new WeakMap,x=new WeakMap,a=new WeakMap,D=new WeakMap,y=new WeakSet,dt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollLeft:t(this,o).scrollTop:t(this,a)?t(this,o).scrollX:t(this,o).scrollY},vt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollWidth:t(this,o).scrollHeight:t(this,a)?Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth):Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},wt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).offsetWidth:t(this,o).offsetHeight:t(this,a)?innerWidth:innerHeight},J=new WeakMap,ht=new WeakMap,N=new WeakMap,k=new WeakMap,Q=new WeakMap;ut.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Et);const At=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","Space"]);var _,Y,h,Z,F,z,B,tt,et,st,it,rt;class Lt extends HTMLElement{constructor(){super(...arguments);s(this,z);s(this,_,new f.CSSProperty(this,"--smooth-scroll-disabled",!1));s(this,Y,new f.CSSProperty(this,"--smooth-scroll-damping",10));s(this,h,new Mt.Damped(0));s(this,Z,0);s(this,F,!1);s(this,tt,e=>{if(!u(this,z,B).call(this)){if(Math.sign(e.deltaY)<0&&t(this,h).target===0&&t(this,h).direction<0||Math.sign(e.deltaY)>0&&t(this,h).target===t(this,h).max&&t(this,h).direction>0||e.stopPropagation(),e.target instanceof Element){const i=e.target.closest("[data-prevent-smooth-scroll]");if(i){const p=i.getAttribute("data-prevent-smooth-scroll");if(p){if(matchMedia(p).matches)return}else return}}Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),this.shiftPosition(e.deltaY))}});s(this,et,()=>{u(this,z,B).call(this)||this.stop()});s(this,st,e=>{u(this,z,B).call(this)||e.target instanceof Element&&e.target.closest("a")&&this.stop()});s(this,it,()=>{this.resize()});s(this,rt,e=>{u(this,z,B).call(this)||At.has(e.code)&&this.stop()})}resize(){t(this,h).min=0,t(this,h).max=this.scrollHeight-this.offsetHeight}stop(){t(this,h).unlistenAnimationFrame(),r(this,F,!0)}sync(){const e=this.scrollTop;(t(this,F)||Math.abs(e-t(this,h).current)>100)&&(r(this,F,!1),t(this,h).set(e,{equalize:!0}))}shiftPosition(e){this.resize(),this.sync(),t(this,h).shift(e)}setPosition(e,i){this.resize(),this.sync(),t(this,h).set(e,i)}connectedCallback(){window.addEventListener("resize",t(this,it)),this.addEventListener("keydown",t(this,rt)),this.addEventListener("pointerdown",t(this,st)),this.addEventListener("touchstart",t(this,et)),this.addEventListener("wheel",t(this,tt),{passive:!1}),t(this,h).subscribe(e=>{const i=Math.round(e.current);ct.scrollEntries.update(this,"y",e.current),i!==t(this,Z)&&this.scroll({top:i,behavior:"instant"}),r(this,Z,i)}),t(this,Y).observe(),t(this,_).observe(),t(this,Y).subscribe(e=>{t(this,h).damping=e.current}),ct.scrollEntries.register(this),this.resize()}disconnectedCallback(){t(this,h).close(),t(this,Y).close(),t(this,_).close(),ct.scrollEntries.unregister(this),window.removeEventListener("resize",t(this,it)),this.removeEventListener("keydown",t(this,rt)),this.removeEventListener("pointerdown",t(this,st)),this.removeEventListener("touchstart",t(this,et)),this.removeEventListener("wheel",t(this,tt))}}_=new WeakMap,Y=new WeakMap,h=new WeakMap,Z=new WeakMap,F=new WeakMap,z=new WeakSet,B=function(){return t(this,_).current||getComputedStyle(this).getPropertyValue("overflow")==="hidden"},tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap;customElements.get("e-smooth-scroll")||customElements.define("e-smooth-scroll",Lt);var H,v,q,$,G,w,M,V,I,L,U,S,T,d,nt,m,g,A,R,P,X,l,Ct,mt,xt,C,W,ft,kt,ot,j;class Pt extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,H,this);s(this,v,this);s(this,q,null);s(this,$,new f.CSSProperty(this,"--scroll-region-status-holder",!1));s(this,G,new f.CSSProperty(this,"--scroll-region-progress-holder",!1));s(this,w,new f.CSSProperty(this,"--scroll-region-disabled",!1));s(this,M,new f.CSSProperty(this,"--scroll-region-start-offset",0,{rawValueCheck:!1}));s(this,V,new f.CSSProperty(this,"--scroll-region-start-offset-min",!1,{rawValueCheck:!1}));s(this,I,new f.CSSProperty(this,"--scroll-region-start-extra-offset",0,{rawValueCheck:!1}));s(this,L,new f.CSSProperty(this,"--scroll-region-distance",0,{rawValueCheck:!1}));s(this,U,new f.CSSProperty(this,"--scroll-region-distance-offset",0,{rawValueCheck:!1}));s(this,S,new f.CSSProperty(this,"--scroll-region-progress-var",""));s(this,T,new f.CSSProperty(this,"--scroll-region-enter-once",!1));s(this,d,new Vt.ElementLinkedStore(this,{enabled:!1,entered:!1,enteredOnLoad:!1,activated:!1}));s(this,nt,0);s(this,m,0);s(this,g,0);s(this,A,0);s(this,R,0);s(this,P,0);s(this,X,!1);s(this,C,()=>{this.resize()});s(this,W,()=>{this.tick()});s(this,j,()=>{document.readyState==="complete"&&u(this,l,xt).call(this)})}get start(){return t(this,m)}get finish(){return t(this,g)}get distance(){return t(this,A)}get scrolled(){return t(this,R)}get progress(){return t(this,P)}get status(){return t(this,d)}get scrollValue(){return t(this,q)instanceof HTMLElement?t(this,q).scrollTop:t(this,q).scrollY}resize(){t(this,w).current||(r(this,nt,St.getCumulativeOffsetTop(this)),r(this,m,t(this,nt)),typeof t(this,V).current=="number"?r(this,m,t(this,m)+Math.max(t(this,M).current,t(this,V).current)):r(this,m,t(this,m)+t(this,M).current),r(this,m,t(this,m)+t(this,I).current),r(this,m,t(this,m)-St.getStickyOffset(this,"top")),r(this,g,t(this,m)),t(this,L).current?r(this,g,t(this,g)+t(this,L).current):r(this,g,t(this,g)+this.offsetHeight),r(this,g,t(this,g)+t(this,U).current),r(this,A,t(this,g)-t(this,m)),r(this,X,this.offsetWidth!==0&&this.offsetHeight!==0),this.tick())}tick(){if(t(this,w).current)return;const e=this.scrollValue;r(this,R,Tt.clamp(e-t(this,m),0,t(this,A))),r(this,P,t(this,R)/t(this,A)||0),t(this,S).current&&t(this,v).style.setProperty(u(this,l,ot).call(this,t(this,S).current),t(this,P).toFixed(6)),t(this,d).set("activated",e>=t(this,m)),t(this,X)&&t(this,d).isFalse("entered")&&e>=t(this,m)&&e<=t(this,g)?u(this,l,ft).call(this):t(this,X)&&!t(this,T).current&&t(this,d).isTrue("entered")&&(e<t(this,m)||e>t(this,g))&&u(this,l,kt).call(this),t(this,T).current&&t(this,P)===1&&(t(this,d).current.entered||u(this,l,ft).call(this),this.destroy()),at.dispatchEvent(this,"scrollRegionProgress",{detail:{progress:t(this,P),scrolled:t(this,R)}})}destroy(){document.removeEventListener("readystatechange",t(this,j)),this.disable(!1),t(this,$).close(),t(this,G).close(),t(this,w).close(),t(this,M).close(),t(this,V).close(),t(this,I).close(),t(this,L).close(),t(this,U).close(),t(this,S).close(),t(this,T).close()}enable(){K.ticker.subscribe(t(this,W),{culling:this}),gt.elementResizer.subscribe(this,t(this,C)),yt.windowResizer.subscribe(t(this,C)),t(this,W).call(this),t(this,d).set("enabled",!0)}disable(e=!0){K.ticker.unsubscribe(t(this,W)),gt.elementResizer.unsubscribe(t(this,C)),yt.windowResizer.unsubscribe(t(this,C)),e&&t(this,d).reset(),u(this,l,mt).call(this)}connectedCallback(){const e=this.getAttribute("data-scroll")||".page-scroll";r(this,q,document.querySelector(e)),document.readyState==="complete"?t(this,j).call(this):document.addEventListener("readystatechange",t(this,j))}disconnectedCallback(){this.destroy()}}H=new WeakMap,v=new WeakMap,q=new WeakMap,$=new WeakMap,G=new WeakMap,w=new WeakMap,M=new WeakMap,V=new WeakMap,I=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,T=new WeakMap,d=new WeakMap,nt=new WeakMap,m=new WeakMap,g=new WeakMap,A=new WeakMap,R=new WeakMap,P=new WeakMap,X=new WeakMap,l=new WeakSet,Ct=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.add(this.getAttribute("data-global-class"))},mt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.remove(this.getAttribute("data-global-class"))},xt=function(){t(this,$).subscribe(e=>{t(this,H)&&t(this,d).removeElement(t(this,H)),r(this,H,e.current?document.querySelector(e.current)||this:this),t(this,d).addElement(t(this,H))}),t(this,G).subscribe(e=>{t(this,v)&&t(this,v).style.removeProperty(u(this,l,ot).call(this,t(this,S).current)),r(this,v,e.current?document.querySelector(e.current)||this:this)}),t(this,w).subscribe(e=>{e.current&&!e.previous?this.disable():this.enable()}),t(this,S).subscribe(e=>{e.current?t(this,W).call(this):e.previous&&t(this,v).style.removeProperty(u(this,l,ot).call(this,e.previous))}),t(this,L).subscribe(()=>{t(this,C).call(this)}),t(this,$).observe(),t(this,G).observe(),t(this,w).observe(),t(this,M).observe(),t(this,V).observe(),t(this,I).observe(),t(this,L).observe(),t(this,U).observe(),t(this,S).observe(),t(this,T).observe()},C=new WeakMap,W=new WeakMap,ft=function(){const e=this.scrollValue;t(this,d).set("entered",!0),e===0&&t(this,d).set("enteredOnLoad",!0),u(this,l,Ct).call(this),at.dispatchEvent(this,"scrollRegionEnter")},kt=function(){t(this,d).set("entered",!1),u(this,l,mt).call(this),at.dispatchEvent(this,"scrollRegionExit")},ot=function(e){return`--${e}`},j=new WeakMap;customElements.get("e-scroll-region")||customElements.define("e-scroll-region",Pt);exports.ScrollRegionElement=Pt;exports.ScrollbarElement=Et;exports.SmoothScrollElement=Lt;
|
package/lib/scroll-kit/index.js
CHANGED
|
@@ -3,14 +3,14 @@ var bt = (o) => {
|
|
|
3
3
|
};
|
|
4
4
|
var lt = (o, c, e) => c.has(o) || bt("Cannot " + e);
|
|
5
5
|
var t = (o, c, e) => (lt(o, c, "read from private field"), e ? e.call(o) : c.get(o)), s = (o, c, e) => c.has(o) ? bt("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(o) : c.set(o, e), r = (o, c, e, i) => (lt(o, c, "write to private field"), i ? i.call(o, e) : c.set(o, e), e), d = (o, c, e) => (lt(o, c, "access private method"), e);
|
|
6
|
-
import { i as Pt, a as pt } from "../index-
|
|
6
|
+
import { i as Pt, a as pt } from "../index-e9eDuagL.js";
|
|
7
7
|
import { ticker as J } from "../ticker/index.js";
|
|
8
|
-
import { f as Ht } from "../dom-
|
|
8
|
+
import { f as Ht } from "../dom-BETkVSSZ.js";
|
|
9
9
|
import { s as xt } from "../gestures-CcXV6fCp.js";
|
|
10
10
|
import "construct-style-sheets-polyfill";
|
|
11
11
|
import { scrollEntries as ct } from "../scroll-entries/index.js";
|
|
12
|
-
import "../Store-
|
|
13
|
-
import { D as kt } from "../Damped-
|
|
12
|
+
import "../Store-ZThXYBQd.js";
|
|
13
|
+
import { D as kt } from "../Damped-CRusiRIV.js";
|
|
14
14
|
import { CSSProperty as f } from "../css-property/index.js";
|
|
15
15
|
import { ElementLinkedStore as zt } from "../element-linked-store/index.js";
|
|
16
16
|
import { elementResizer as gt } from "../element-resizer/index.js";
|
package/lib/sequence/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-
|
|
1
|
+
"use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-OE2INULi.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-BHqPFbna.cjs");require("../window-resizer/index.cjs");require("../Store-Blf4msDz.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
|
package/lib/sequence/index.js
CHANGED
|
@@ -21,12 +21,12 @@ var R = (s, n, e) => new Promise((i, p) => {
|
|
|
21
21
|
});
|
|
22
22
|
import { CSSProperty as I } from "../css-property/index.js";
|
|
23
23
|
import { elementResizer as k } from "../element-resizer/index.js";
|
|
24
|
-
import { i as q } from "../index-
|
|
24
|
+
import { i as q } from "../index-e9eDuagL.js";
|
|
25
25
|
import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
|
|
26
26
|
import "construct-style-sheets-polyfill";
|
|
27
|
-
import { a as W } from "../SourceElement-
|
|
27
|
+
import { a as W } from "../SourceElement-DjbHjynf.js";
|
|
28
28
|
import "../window-resizer/index.js";
|
|
29
|
-
import "../Store-
|
|
29
|
+
import "../Store-ZThXYBQd.js";
|
|
30
30
|
import { CanvasElement as A } from "../canvas/index.js";
|
|
31
31
|
function D(s) {
|
|
32
32
|
const n = s.match(/\{([\d-]+)\}/);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=t=>{throw TypeError(t)};var d=(t,i,e)=>i.has(t)||f("Cannot "+e);var h=(t,i,e)=>(d(t,i,"read from private field"),e?e.call(t):i.get(t)),m=(t,i,e)=>i.has(t)?f("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),u=(t,i,e,s)=>(d(t,i,"write to private field"),s?s.call(t,e):i.set(t,e),e),o=(t,i,e)=>(d(t,i,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../element-resizer/index.cjs"),y=require("../index-
|
|
1
|
+
"use strict";var f=t=>{throw TypeError(t)};var d=(t,i,e)=>i.has(t)||f("Cannot "+e);var h=(t,i,e)=>(d(t,i,"read from private field"),e?e.call(t):i.get(t)),m=(t,i,e)=>i.has(t)?f("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),u=(t,i,e,s)=>(d(t,i,"write to private field"),s?s.call(t,e):i.set(t,e),e),o=(t,i,e)=>(d(t,i,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../element-resizer/index.cjs"),y=require("../index-OE2INULi.cjs");require("construct-style-sheets-polyfill");var r,n,l,c;class p extends HTMLElement{constructor(){super(...arguments);m(this,n);m(this,r,this);m(this,c,()=>{h(this,r).style.removeProperty("--width"),h(this,r).style.removeProperty("--height"),o(this,n,l).call(this,"width"),o(this,n,l).call(this,"height"),setTimeout(()=>{const e=this.offsetWidth,s=this.offsetHeight;o(this,n,l).call(this,"width",e+"px"),o(this,n,l).call(this,"height",s+"px")},0)})}connectedCallback(){var s;const e=(s=this.getAttribute("target"))==null?void 0:s.trim();e&&(e==="parent"?u(this,r,this.parentElement||this):u(this,r,document.querySelector(e)||this)),g.elementResizer.subscribe(this,h(this,c))}disconnectedCallback(){g.elementResizer.unsubscribe(h(this,c))}}r=new WeakMap,n=new WeakSet,l=function(e,s){const a=this.dataset.prefix||"";s?h(this,r).style.setProperty(`--${a}${e}`,s):h(this,r).style.removeProperty(`--${a}${e}`)},c=new WeakMap;y.isBrowser&&!customElements.get("e-size-element")&&customElements.define("e-size-element",p);exports.SizeElement=p;
|
|
@@ -4,7 +4,7 @@ var d = (t) => {
|
|
|
4
4
|
var p = (t, s, e) => s.has(t) || d("Cannot " + e);
|
|
5
5
|
var r = (t, s, e) => (p(t, s, "read from private field"), e ? e.call(t) : s.get(t)), c = (t, s, e) => s.has(t) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), f = (t, s, e, i) => (p(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), n = (t, s, e) => (p(t, s, "access private method"), e);
|
|
6
6
|
import { elementResizer as g } from "../element-resizer/index.js";
|
|
7
|
-
import { i as y } from "../index-
|
|
7
|
+
import { i as y } from "../index-e9eDuagL.js";
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
9
9
|
var h, o, m, l;
|
|
10
10
|
class u extends HTMLElement {
|
package/lib/slicer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=i=>{throw TypeError(i)};var H=(i,e,s)=>e.has(i)||P("Cannot "+s);var t=(i,e,s)=>(H(i,e,"read from private field"),s?s.call(i):e.get(i)),c=(i,e,s)=>e.has(i)?P("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),o=(i,e,s,g)=>(H(i,e,"write to private field"),g?g.call(i,s):e.set(i,s),s),L=(i,e,s)=>(H(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../media/index.cjs"),q=require("../index-
|
|
1
|
+
"use strict";var P=i=>{throw TypeError(i)};var H=(i,e,s)=>e.has(i)||P("Cannot "+s);var t=(i,e,s)=>(H(i,e,"read from private field"),s?s.call(i):e.get(i)),c=(i,e,s)=>e.has(i)?P("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),o=(i,e,s,g)=>(H(i,e,"write to private field"),g?g.call(i,s):e.set(i,s),s),L=(i,e,s)=>(H(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../media/index.cjs"),q=require("../index-OE2INULi.cjs");require("construct-style-sheets-polyfill");var A,u;class D{constructor(e){c(this,A);c(this,u);o(this,A,e.index),o(this,u,document.createElement("span")),t(this,u).classList.add("letter"),e.clone?t(this,u).innerHTML=`<span class="original"><span class="value">${e.text}</span></span><span class="clone" aria-hidden><span class="value">${e.text}</span></span>`:t(this,u).innerHTML=`<span class="original"><span class="value">${e.text}</span></span>`}get index(){return t(this,A)}get element(){return t(this,u)}}A=new WeakMap,u=new WeakMap;var M,h,p,x;class S{constructor(e){c(this,M);c(this,h);c(this,p);c(this,x);if(o(this,M,e.index),o(this,h,document.createElement("span")),o(this,p,[]),o(this,x,e.text.endsWith("\\n")),t(this,x)&&(e.text=e.text.replace("\\n","")),e.letters&&e.lettersAcc!==void 0){let s=0;const g=/([\s\u00A0\u1680\u2000-\u200F\u2028\u2029\u202F\u205F\u3000\uFEFF\-–—])/,T=e.text.split(g).filter(y=>y.trim()!=="");T.length>1&&t(this,h).classList.add("words-inside"),T.forEach((y,w,n)=>{const l=y.split("").map(r=>{if(r!==" ")return new D({index:e.lettersAcc+s++,text:r,clone:e.clone})});if(o(this,p,l.filter(r=>r instanceof D)),n.length>1){const r=document.createElement("span");r.append(...t(this,p).map(a=>a.element)),t(this,h).append(r),w!==n.length-1&&t(this,h).append(r)}else t(this,h).append(...t(this,p).map(r=>r.element))})}else e.clone?t(this,h).innerHTML=`<span class="original"><span class="value">${e.text}</span></span><span class="clone" aria-hidden><span class="value">${e.text}</span></span>`:t(this,h).innerHTML=`<span class="original"><span class="value">${e.text}</span></span>`;t(this,h).classList.add("word")}get index(){return t(this,M)}get element(){return t(this,h)}get letters(){return t(this,p)}get hasNewLine(){return t(this,x)}}M=new WeakMap,h=new WeakMap,p=new WeakMap,x=new WeakMap;var m,d,E,N,f,_,O;class $ extends HTMLElement{constructor(){super(...arguments);c(this,f);c(this,m,"");c(this,d,[]);c(this,E,[]);c(this,N,null)}get wordsArray(){return t(this,d)}get lettersArray(){return t(this,E)}get originalHTML(){return t(this,m)}connectedCallback(){this.classList.contains("splitted")||(o(this,m,this.innerHTML.trim()),this.hasAttribute("media")?(o(this,N,new k.Media(this.getAttribute("media"))),t(this,N).subscribe(s=>{s.current?L(this,f,_).call(this):!s.current&&s.previous&&L(this,f,O).call(this)})):L(this,f,_).call(this),this.classList.add("splitted"))}disconnectedCallback(){var s;L(this,f,O).call(this),(s=t(this,N))==null||s.close()}}m=new WeakMap,d=new WeakMap,E=new WeakMap,N=new WeakMap,f=new WeakSet,_=function(){const s=[];o(this,d,[]);let g=0,T=0;const y=n=>{var a;const l=(a=n.textContent)==null?void 0:a.trim();if(!l)return document.createDocumentFragment();const r=document.createDocumentFragment();return l.replace(/[\s\u00A0\u1680\u2000-\u200F\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ").split(" ").forEach((F,v,C)=>{if(!F)return;const b=new S({index:g,text:F+(v<C.length-1?" ":""),letters:this.hasAttribute("letters"),lettersAcc:T,clone:this.hasAttribute("clone")});T+=b.letters.length,g+=1,t(this,E).push(...b.letters),t(this,d).push(b),r.appendChild(b.element)}),r},w=n=>{if(n.nodeType===Node.TEXT_NODE)return y(n);if(n.nodeType===Node.ELEMENT_NODE){const l=n.cloneNode(!1);return Array.from(n.childNodes).forEach(r=>{const a=w(r);a&&(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(a.childNodes).forEach((F,v,C)=>{l.append(F),v!==C.length-1&&l.append(new Text(" "))}):l.appendChild(a))}),l}return n.cloneNode()};Array.from(this.childNodes).forEach(n=>{const l=w(n);l.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s.push(...Array.from(l.childNodes)):s.push(l)}),this.hasAttribute("index")&&(t(this,d).forEach(n=>{n.element.style.setProperty("--word-index",n.index.toString())}),t(this,E).forEach(n=>{n.element.style.setProperty("--letter-index",n.index.toString())})),this.innerHTML="",s.forEach((n,l)=>{this.appendChild(n),l<s.length-1&&n.nodeType===Node.ELEMENT_NODE&&this.appendChild(new Text(" "))}),this.style.setProperty("--words-length",t(this,d).length.toString()),this.style.setProperty("--letters-length",t(this,E).length.toString())},O=function(){o(this,d,[]),this.innerHTML=t(this,m),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")};q.isBrowser&&!customElements.get("e-slicer")&&customElements.define("e-slicer",$);exports.Letter=D;exports.SlicerElement=$;exports.Word=S;
|
package/lib/slicer/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var P = (i) => {
|
|
|
4
4
|
var b = (i, e, s) => e.has(i) || P("Cannot " + s);
|
|
5
5
|
var t = (i, e, s) => (b(i, e, "read from private field"), s ? s.call(i) : e.get(i)), h = (i, e, s) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, s), o = (i, e, s, g) => (b(i, e, "write to private field"), g ? g.call(i, s) : e.set(i, s), s), L = (i, e, s) => (b(i, e, "access private method"), s);
|
|
6
6
|
import { Media as $ } from "../media/index.js";
|
|
7
|
-
import { i as S } from "../index-
|
|
7
|
+
import { i as S } from "../index-e9eDuagL.js";
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
9
9
|
var A, u;
|
|
10
10
|
class _ {
|
package/lib/source/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-BHqPFbna.cjs");exports.Source=e.Source;exports.SourceElement=e.SourceElement;exports.SourceManager=e.SourceManager;exports.SourceSet=e.SourceSet;
|
package/lib/source/index.js
CHANGED
package/lib/spa/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=Object.defineProperty,$=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var D=i=>{throw TypeError(i)};var z=(i,t,e)=>t in i?X(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,R=(i,t)=>{for(var e in t||(t={}))J.call(t,e)&&z(i,e,t[e]);if(M)for(var e of M(t))K.call(t,e)&&z(i,e,t[e]);return i},I=(i,t)=>$(i,G(t));var O=(i,t,e)=>t.has(i)||D("Cannot "+e);var r=(i,t,e)=>(O(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>t.has(i)?D("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),f=(i,t,e,c)=>(O(i,t,"write to private field"),c?c.call(i,e):t.set(i,e),e);var V=(i,t,e,c)=>({set _(o){f(i,t,o,e)},get _(){return r(i,t,c)}});var j=(i,t,e)=>new Promise((c,o)=>{var s=a=>{try{l(e.next(a))}catch(w){o(w)}},m=a=>{try{l(e.throw(a))}catch(w){o(w)}},l=a=>a.done?c(a.value):Promise.resolve(a.value).then(s,m);l((e=e.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../cache/index.cjs"),Q=require("../history/index.cjs"),W=require("../LocalLinks-
|
|
1
|
+
"use strict";var X=Object.defineProperty,$=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var D=i=>{throw TypeError(i)};var z=(i,t,e)=>t in i?X(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,R=(i,t)=>{for(var e in t||(t={}))J.call(t,e)&&z(i,e,t[e]);if(M)for(var e of M(t))K.call(t,e)&&z(i,e,t[e]);return i},I=(i,t)=>$(i,G(t));var O=(i,t,e)=>t.has(i)||D("Cannot "+e);var r=(i,t,e)=>(O(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>t.has(i)?D("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),f=(i,t,e,c)=>(O(i,t,"write to private field"),c?c.call(i,e):t.set(i,e),e);var V=(i,t,e,c)=>({set _(o){f(i,t,o,e)},get _(){return r(i,t,c)}});var j=(i,t,e)=>new Promise((c,o)=>{var s=a=>{try{l(e.next(a))}catch(w){o(w)}},m=a=>{try{l(e.throw(a))}catch(w){o(w)}},l=a=>a.done?c(a.value):Promise.resolve(a.value).then(s,m);l((e=e.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../cache/index.cjs"),Q=require("../history/index.cjs"),W=require("../LocalLinks-Baf0xWZ3.cjs"),Y=require("../PageAnnouncerElement-AQ0Ja6HM.cjs"),Z=require("../PageScroll-BXJUQwG7.cjs"),F=require("../events-KVanG9sR.cjs"),H=require("../morph-B6sGhLCi.cjs");require("construct-style-sheets-polyfill");require("../index-OE2INULi.cjs");const k=require("../url-CPgw9bd5.cjs");var y,P,n,d,S,g,v,q;const b=class b{constructor(t){u(this,y,new N.Cache);u(this,P,new DOMParser);u(this,n,null);u(this,d,null);u(this,S,null);u(this,g,null);u(this,v,null);u(this,q,0);b.instance||(b.instance=this,f(this,n,I(R({},t),{base:k.normalizeBase(t==null?void 0:t.base)})),f(this,v,new Y.PageAnnouncerElement),f(this,d,new Z.PageScroll(r(this,n).scrollSelector)),r(this,d).update(),f(this,S,new W.LocalLinks({base:r(this,n).base,trailingSlash:r(this,n).trailingSlash,includeAnchor:t==null?void 0:t.includeAnchor,onClick:(e,c)=>{try{this.navigate(e,c)}catch(o){window.location.assign(e)}}})),r(this,S).update(),f(this,g,new Q.History({onPop:e=>{this.navigate(e)}})))}history(){return r(this,g)}get scroll(){return r(this,d)}navigate(t,e){return j(this,null,function*(){var w,L,T,A,E,U,B,C;const c=r(this,g).isBack,o=++V(this,q)._;let s=k.normalizeURL(t,{base:r(this,n).base,trailingSlash:r(this,n).trailingSlash});r(this,n).urlModifier&&(s=r(this,n).urlModifier(s));let m=r(this,y).get(s.toString());if((!m||e!=null&&e.revalidate)&&(m=yield fetch(`${s}`,{headers:{"X-SPA":"true"}}).then(h=>h.text()).catch(()=>{window.location.assign(s)})),!m||(e!=null&&e.cache&&r(this,y).set(s.toString(),m),r(this,q)!==o))return;c||(r(this,g).push(s),((w=e==null?void 0:e.keepScrollPosition)==null||w)&&r(this,d).element.scrollTo({top:0,behavior:"instant"}));const l=r(this,P).parseFromString(m,"text/html");if(k.normalizeRelativeURLs(l,s),yield(T=(L=r(this,n)).beforeDiff)==null?void 0:T.call(L,l),r(this,q)!==o)return;F.dispatchEvent(document,"spaBeforeUpdate",{custom:!0});let a=(A=l.querySelector("title"))==null?void 0:A.textContent;if(a)document.title=a;else{const h=document.querySelector("h1");a=(U=(E=h==null?void 0:h.innerText)!=null?E:h==null?void 0:h.textContent)!=null?U:s.pathname}r(this,v).create(l,a),r(this,n).viewTransition&&document.startViewTransition?yield document.startViewTransition(()=>H.morph(document,l)).finished:yield H.morph(document,l),r(this,d).update(),r(this,S).update(),r(this,v).done(),yield(C=(B=r(this,n)).afterDiff)==null?void 0:C.call(B),F.dispatchEvent(document,"spaAfterUpdate",{custom:!0})})}};y=new WeakMap,P=new WeakMap,n=new WeakMap,d=new WeakMap,S=new WeakMap,g=new WeakMap,v=new WeakMap,q=new WeakMap,b.instance=null;let x=b;exports.SPA=x;
|
package/lib/spa/index.js
CHANGED
|
@@ -41,13 +41,13 @@ var I = (i, e, t) => new Promise((l, m) => {
|
|
|
41
41
|
});
|
|
42
42
|
import { Cache as J } from "../cache/index.js";
|
|
43
43
|
import { History as K } from "../history/index.js";
|
|
44
|
-
import { L as N } from "../LocalLinks-
|
|
45
|
-
import { P as Q } from "../PageAnnouncerElement-
|
|
46
|
-
import { P as W } from "../PageScroll-
|
|
44
|
+
import { L as N } from "../LocalLinks-Z9pxKguG.js";
|
|
45
|
+
import { P as Q } from "../PageAnnouncerElement-0LxZjtVH.js";
|
|
46
|
+
import { P as W } from "../PageScroll-0LxFblry.js";
|
|
47
47
|
import { d as V } from "../events-CsVF98U6.js";
|
|
48
|
-
import { m as F } from "../morph-
|
|
48
|
+
import { m as F } from "../morph-D_ybmXWR.js";
|
|
49
49
|
import "construct-style-sheets-polyfill";
|
|
50
|
-
import "../index-
|
|
50
|
+
import "../index-e9eDuagL.js";
|
|
51
51
|
import { a as Y, n as Z, b as _ } from "../url-DAl-mgbC.js";
|
|
52
52
|
var P, k, r, o, S, w, v, b;
|
|
53
53
|
const y = class y {
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Store-Blf4msDz.cjs"),r=require("../Composed-RFcm2x5c.cjs"),o=require("../DerivedArray-DdCR-Oy7.cjs");exports.Store=e.Store;exports.activeStores=e.activeStores;exports.storeRegistry=e.storeRegistry;exports.Composed=r.Composed;exports.Derived=r.Derived;exports.Resource=r.Resource;exports.DerivedArray=o.DerivedArray;
|