aptechka 0.62.3 → 0.63.0
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/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +25 -25
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +20 -20
- package/lib/morph/Morph.d.ts +2 -0
- package/lib/morph/MorphRoute.d.ts +4 -1
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +217 -201
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +15 -15
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +165 -165
- package/package.json +1 -1
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),m=require("../css-property/index.cjs"),N=require("../index-Cqw2NKev.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs"),ie=require("../url-D1CgmwZ_.cjs"),re=require("../window-resizer/index.cjs"),F=require("../device/index.cjs");var u,y,J,K;class le{constructor(){r(this,u,new Map);r(this,y,[]);r(this,J,o=>{var s;const t=[...e(this,y)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,y)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,y)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,y).push(t),s.push(t)}remove(o,t){if(n(this,y,e(this,y).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,y=new WeakMap,J=new WeakMap,K=new WeakMap;var f,M,V,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,$,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,V);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,$);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new m.CSSProperty(this,"--history",!1)),n(this,w,new m.CSSProperty(this,"--restore",!1)),n(this,x,new m.CSSProperty(this,"--close-rest",!1)),n(this,A,new m.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new m.CSSProperty(this,"--group","")),n(this,R,new m.CSSProperty(this,"--click-outside",!1)),n(this,q,new m.CSSProperty(this,"--escape",!1)),n(this,L,new m.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,$,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,V)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,V,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,$)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,$).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,V)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,$)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,M=new WeakMap,V=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},$=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;N.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,_;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new m.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});N.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,_).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,_).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,_=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};N.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
|
|
1
|
+
"use strict";var te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),m=require("../css-property/index.cjs"),N=require("../index-Cqw2NKev.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs"),ie=require("../url-D1CgmwZ_.cjs"),re=require("../window-resizer/index.cjs"),F=require("../device/index.cjs");var u,y,J,K;class le{constructor(){r(this,u,new Map);r(this,y,[]);r(this,J,o=>{var s;const t=[...e(this,y)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,y)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,y)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,y).push(t),s.push(t)}remove(o,t){if(n(this,y,e(this,y).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,y=new WeakMap,J=new WeakMap,K=new WeakMap;var f,M,V,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,$,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,V);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,$);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new m.CSSProperty(this,"--history",!1)),n(this,w,new m.CSSProperty(this,"--restore",!1)),n(this,x,new m.CSSProperty(this,"--close-rest",!1)),n(this,A,new m.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new m.CSSProperty(this,"--group","")),n(this,R,new m.CSSProperty(this,"--click-outside",!1)),n(this,q,new m.CSSProperty(this,"--escape",!1)),n(this,L,new m.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,$,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,V)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,V,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,$)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,$).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,V)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,$)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,M=new WeakMap,V=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},$=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;N.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,_;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new m.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});N.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{console.log(this.hasAttribute("keydown-disabled")),t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,_).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,_).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,_=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};N.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
|
package/lib/popover/index.js
CHANGED
|
@@ -81,7 +81,7 @@ class lt {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
u = new WeakMap(), b = new WeakMap(), J = new WeakMap(), K = new WeakMap();
|
|
84
|
-
var f, M, H,
|
|
84
|
+
var f, M, H, x, W, m, w, S, C, g, R, $, L, T, O, a, P, rt, F, V, k, q, z;
|
|
85
85
|
const E = class E extends HTMLElement {
|
|
86
86
|
constructor() {
|
|
87
87
|
super();
|
|
@@ -89,7 +89,7 @@ const E = class E extends HTMLElement {
|
|
|
89
89
|
r(this, f);
|
|
90
90
|
r(this, M);
|
|
91
91
|
r(this, H);
|
|
92
|
-
r(this,
|
|
92
|
+
r(this, x);
|
|
93
93
|
r(this, W);
|
|
94
94
|
r(this, m);
|
|
95
95
|
r(this, w);
|
|
@@ -195,14 +195,14 @@ const E = class E extends HTMLElement {
|
|
|
195
195
|
detail: {
|
|
196
196
|
trigger: t(this, O)
|
|
197
197
|
}
|
|
198
|
-
}), h(this,
|
|
198
|
+
}), h(this, x, void 0), h(this, W, setTimeout(() => {
|
|
199
199
|
t(this, a).set("transitionend", !0);
|
|
200
200
|
}, st(this) + 10));
|
|
201
201
|
};
|
|
202
|
-
e != null && e.skipTransition ? s() : h(this,
|
|
202
|
+
e != null && e.skipTransition ? s() : h(this, x, setTimeout(s, 10));
|
|
203
203
|
}
|
|
204
204
|
close() {
|
|
205
|
-
t(this, f) && (clearTimeout(t(this,
|
|
205
|
+
t(this, f) && (clearTimeout(t(this, x)), clearTimeout(t(this, W)), E.stack.remove(t(this, g).current, this), h(this, f, !1), y(this, P, F).call(this), t(this, a).set("transitionend", !1), h(this, M, setTimeout(() => {
|
|
206
206
|
t(this, a).set("opened", !1), t(this, a).set("closing", !0), Y(this, "popoverClosing", {
|
|
207
207
|
custom: !0
|
|
208
208
|
}), h(this, H, setTimeout(() => {
|
|
@@ -220,10 +220,10 @@ const E = class E extends HTMLElement {
|
|
|
220
220
|
}), it.subscribe(t(this, k));
|
|
221
221
|
}
|
|
222
222
|
disconnectedCallback() {
|
|
223
|
-
E.stack.remove(t(this, g).current, this), it.unsubscribe(t(this, k)), t(this, a).close(), t(this, m).close(), t(this, w).close(), t(this, S).close(), t(this, C).close(), t(this, g).close(), t(this, R).close(), t(this, $).close(), t(this, L).close(), this.removeAttribute("role"), clearTimeout(t(this, M)), clearTimeout(t(this, H)), clearTimeout(t(this,
|
|
223
|
+
E.stack.remove(t(this, g).current, this), it.unsubscribe(t(this, k)), t(this, a).close(), t(this, m).close(), t(this, w).close(), t(this, S).close(), t(this, C).close(), t(this, g).close(), t(this, R).close(), t(this, $).close(), t(this, L).close(), this.removeAttribute("role"), clearTimeout(t(this, M)), clearTimeout(t(this, H)), clearTimeout(t(this, x)), clearTimeout(t(this, W)), removeEventListener("popstate", t(this, V)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), this.style.removeProperty("--viewport-offset-x"), this.style.removeProperty("--viewport-offset-y"), y(this, P, F).call(this);
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
f = new WeakMap(), M = new WeakMap(), H = new WeakMap(),
|
|
226
|
+
f = new WeakMap(), M = new WeakMap(), H = new WeakMap(), x = new WeakMap(), W = new WeakMap(), m = new WeakMap(), w = new WeakMap(), S = new WeakMap(), C = new WeakMap(), g = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), L = new WeakMap(), T = new WeakMap(), O = new WeakMap(), a = new WeakMap(), P = new WeakSet(), rt = function() {
|
|
227
227
|
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
|
|
228
228
|
}, F = function() {
|
|
229
229
|
if (t(this, m).current) {
|
|
@@ -233,11 +233,11 @@ f = new WeakMap(), M = new WeakMap(), H = new WeakMap(), A = new WeakMap(), W =
|
|
|
233
233
|
}, V = new WeakMap(), k = new WeakMap(), q = new WeakMap(), z = new WeakMap(), E.stack = new lt();
|
|
234
234
|
let I = E;
|
|
235
235
|
_ && !customElements.get("e-popover") && customElements.define("e-popover", I);
|
|
236
|
-
var n, d,
|
|
236
|
+
var n, d, A, Z, B, D, U, X, N;
|
|
237
237
|
class at extends HTMLElement {
|
|
238
238
|
constructor() {
|
|
239
239
|
super();
|
|
240
|
-
r(this,
|
|
240
|
+
r(this, A);
|
|
241
241
|
r(this, n);
|
|
242
242
|
r(this, d, new v(this, "--type", "open"));
|
|
243
243
|
r(this, B, () => {
|
|
@@ -258,7 +258,7 @@ class at extends HTMLElement {
|
|
|
258
258
|
e === "open" || e === "toggle" && !t(this, n).opened ? t(this, n).open({ trigger: this }) : (e === "close" || e === "toggle" && t(this, n).opened) && t(this, n).close();
|
|
259
259
|
}
|
|
260
260
|
}), this.addEventListener("keydown", (e) => {
|
|
261
|
-
e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
|
|
261
|
+
console.log(this.hasAttribute("keydown-disabled")), e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
|
|
262
262
|
}));
|
|
263
263
|
}
|
|
264
264
|
get type() {
|
|
@@ -269,7 +269,7 @@ class at extends HTMLElement {
|
|
|
269
269
|
}
|
|
270
270
|
changePopover(e) {
|
|
271
271
|
var s;
|
|
272
|
-
if (y(this,
|
|
272
|
+
if (y(this, A, Z).call(this), e) {
|
|
273
273
|
let i = null;
|
|
274
274
|
if (e === "parent") {
|
|
275
275
|
const l = this.closest("[data-popover]");
|
|
@@ -305,20 +305,20 @@ class at extends HTMLElement {
|
|
|
305
305
|
t(this, X)
|
|
306
306
|
)) : console.warn(this, `target ${e} not found`);
|
|
307
307
|
}
|
|
308
|
-
y(this,
|
|
308
|
+
y(this, A, N).call(this, t(this, d).current);
|
|
309
309
|
}
|
|
310
310
|
connectedCallback() {
|
|
311
311
|
t(this, d).subscribe((s) => {
|
|
312
|
-
y(this,
|
|
312
|
+
y(this, A, N).call(this, s.current);
|
|
313
313
|
}), this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
314
314
|
const e = this.getAttribute("target");
|
|
315
315
|
e && this.changePopover(e), this.isConnected && t(this, d).observe();
|
|
316
316
|
}
|
|
317
317
|
disconnectedCallback() {
|
|
318
|
-
t(this, d).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), y(this,
|
|
318
|
+
t(this, d).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), y(this, A, Z).call(this);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
n = new WeakMap(), d = new WeakMap(),
|
|
321
|
+
n = new WeakMap(), d = new WeakMap(), A = new WeakSet(), Z = function() {
|
|
322
322
|
t(this, n) && (t(this, n).removeEventListener(
|
|
323
323
|
"popoverTriggered",
|
|
324
324
|
t(this, B)
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ns=Object.defineProperty;var _e=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,os=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,cs=Reflect.get;var We=a=>{throw TypeError(a)};var $e=(a,n,e)=>n in a?ns(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Fe=(a,n)=>{for(var e in n||(n={}))os.call(n,e)&&$e(a,e,n[e]);if(_e)for(var e of _e(n))ls.call(n,e)&&$e(a,e,n[e]);return a};var Me=(a,n,e)=>n.has(a)||We("Cannot "+e);var t=(a,n,e)=>(Me(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?We("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Me(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),u=(a,n,e)=>(Me(a,n,"access private method"),e);var Ne=(a,n,e)=>cs(hs(a),e,n);var Ue=(a,n,e)=>new Promise((i,r)=>{var l=g=>{try{m(e.next(g))}catch(gt){r(gt)}},f=g=>{try{m(e.throw(g))}catch(gt){r(gt)}},m=g=>g.done?i(g.value):Promise.resolve(g.value).then(l,f);m((e=e.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const us=require("../Store-GokLe_g-.cjs"),M=require("../index-Cqw2NKev.cjs"),as=require("../easings-GegIwET5.cjs"),oe=require("../events-KVanG9sR.cjs"),Te=require("../function-MthRj-GJ.cjs"),Ze=require("../jss-CRBgdvJ3.cjs"),_t=require("../layout-Ctc2p3uz.cjs"),je=require("../math-GDWEqu7y.cjs"),Ke=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const Le=require("../order/index.cjs"),ds=require("../Damped-B8bmTxAr.cjs"),Ss=require("../Tweened-BsL9FamJ.cjs"),ze=require("../controls/index.cjs"),$t=require("../window-resizer/index.cjs"),Ct=require("../scroll-entries/index.cjs"),Ge=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ps=require("../device/index.cjs"),ae=require("../element-resizer/index.cjs"),bs=require("../gestures-C7gbKx11.cjs"),Je=require("../dom-JBOkFLTh.cjs"),fs=require("../scroll-segment/index.cjs");var p,Wt,C,de,Se,vt,V,et,Pt,Et,le;class ms{constructor(n,e,i){s(this,Et);s(this,p);s(this,Wt);s(this,C);s(this,de,0);s(this,Se,0);s(this,vt,0);s(this,V,0);s(this,et,null);s(this,Pt,0);h(this,p,n),h(this,Wt,e),h(this,C,i),Ct.scrollEntries.register(t(this,p)),this.setIndex(t(this,Wt))}get element(){return t(this,p)}get index(){return t(this,Wt)}get size(){return t(this,vt)}get width(){return t(this,de)}get height(){return t(this,Se)}get position(){return t(this,V)}get transformPosition(){return t(this,Pt)}destroy(){Ct.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.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,C).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,de,t(this,p).offsetWidth),h(this,Se,t(this,p).offsetHeight),h(this,vt,t(this,C).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,C).vertical?_t.getCumulativeOffsetTop(t(this,p)):_t.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,C).contentPosition)}transform(){const n=t(this,C).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,C).viewportSize*t(this,C).sectionDistanceScaleCSSProperty.current;t(this,C).loopCSSProperty.current&&t(this,V)+t(this,vt)<=t(this,C).currentScrollValue-n/2&&(e=(t(this,C).distance-n)*-1-t(this,C).gap),Ct.scrollEntries.update(t(this,p),t(this,C).axisCSSProperty.current,e);const r=t(this,C).currentScrollValue+e,l=t(this,V)-t(this,C).viewportSize-i,f=t(this,V)+t(this,vt)+i,m=Ke.preciseNumber(je.clamp(r,l,f),3);h(this,Pt,m*-1),t(this,C).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Pt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Pt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),oe.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){u(this,Et,le).call(this,"index",n)}setCurrentIndex(n){u(this,Et,le).call(this,"current-index",n)}setCurrentIndexArc(n){u(this,Et,le).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){u(this,Et,le).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Wt=new WeakMap,C=new WeakMap,de=new WeakMap,Se=new WeakMap,vt=new WeakMap,V=new WeakMap,et=new WeakMap,Pt=new WeakMap,Et=new WeakSet,le=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const gs=Ze.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,wt,x,st,H,_,$,T,it,rt,W,nt,xt,q,P,zt,Lt,It,kt,Ft,Rt,R,At,ht,A,ot,F,Mt,lt,Tt,ct,ut,at,b,Nt,c,pe,be,v,y,k,D,dt,B,w,z,Ut,N,U,G,Z,Gt,St,j,qt,O,E,Zt,K,Dt,jt,o,qe,ce,Ht,Ie,ke,De,Be,L,fe,Qe,Kt,me,Oe,Ve,yt,Xe,ge,ue,ye;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,st,new S.CSSProperty(this,"--reverse",!1));s(this,H,new S.CSSProperty(this,"--direction",0));s(this,_,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,it,new S.CSSProperty(this,"--tween-easing",!1));s(this,rt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,nt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,xt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,P,new S.CSSProperty(this,"--loop",!1));s(this,zt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,It,new S.CSSProperty(this,"--stiffness",0));s(this,kt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ft,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,Rt,new S.CSSProperty(this,"--start-section",0));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,At,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,A,new S.CSSProperty(this,"--classes",!1));s(this,ot,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Mt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new S.CSSProperty(this,"--focus-delay",0));s(this,Tt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new S.CSSProperty(this,"--disabled",!1));s(this,ut,new S.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,b,null);s(this,Nt,null);s(this,c,[]);s(this,pe,0);s(this,be,0);s(this,v,0);s(this,y,0);s(this,k,0);s(this,D,null);s(this,dt,null);s(this,B,null);s(this,w,null);s(this,z,new us.Store(0));s(this,Ut,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Gt);s(this,St);s(this,j,new Ss.Tweened);s(this,qt,!1);s(this,O,null);s(this,E,!1);s(this,Zt,null);s(this,K,[]);s(this,Dt,!1);s(this,jt);s(this,L,e=>{if(e&&t(this,Dt)){h(this,Dt,!1);return}this.resize()});s(this,fe,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ut,Math.max(0,e-t(this,y))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,z).current=u(this,o,ue).call(this)}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;u(this,o,Xe).call(this),Ct.scrollEntries.update(this,t(this,x).current,e)});s(this,Kt,(e,i)=>{t(this,wt).current&&(u(this,o,Oe).call(this,Math.sign(i)||1),t(this,me).call(this,e,i))});s(this,me,(e,i)=>{if(t(this,H).current){if(t(this,H).current<0&&i>0)return;if(t(this,H).current>0&&i<0)return}if(t(this,St)||t(this,j).unlistenAnimationFrame(),!t(this,R).current&&t(this,lt).current&&(clearInterval(t(this,Gt)),h(this,Gt,setTimeout(()=>{const r=t(this,c)[u(this,o,ue).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Tt).current,easing:as.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!ps.device.isTouch&&!t(this,kt).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const l={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,qt)?this.scrollToSection(u(this,o,ue).call(this,!0),l):this.shiftSections(r,l)}else t(this,d).shift(r*t(this,v))}else t(this,d).shift(i);h(this,qt,e==="drag")}});s(this,ge,Te.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const l=this.vertical?r.width:r.height;return l>i?l:i},0);clearTimeout(t(this,jt)),h(this,Dt,!0),this.style.setProperty("--max-section-size",""),h(this,jt,setTimeout(()=>{h(this,Dt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ye,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||u(this,o,Be).call(this)});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[gs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,b,document.createElement("div")),t(this,b).className="content",h(this,Nt,document.createElement("slot")),t(this,b).appendChild(t(this,Nt)),t(this,at).appendChild(t(this,b)),e.appendChild(t(this,at)),h(this,Zt,new MutationObserver(Te.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,H)}get pagesCSSProperty(){return t(this,_)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,xt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,P)}get dampingCSSProperty(){return t(this,zt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,It)}get mouseDragCSSProperty(){return t(this,kt)}get sectionDistanceScaleCSSProperty(){return t(this,Ft)}get startSectionCSSProperty(){return t(this,Rt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,A)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Mt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Tt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return u(this,o,Ve).call(this,"current")}get targetScrollValue(){return u(this,o,Ve).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,b)}get sections(){return t(this,c)}get position(){return t(this,pe)}get contentPosition(){return t(this,be)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,y)}get gap(){return t(this,k)}get counter(){return t(this,z)}get limit(){return Math.ceil(t(this,c).length-t(this,q).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,P).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ut)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,Z)&&(t(this,P).current||t(this,$).current||t(this,P).current||t(this,W).current||t(this,T).current)&&u(this,o,ce).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress<l?0:this.currentProgress>f?1:(this.currentProgress-l)/(f-l)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress>=l&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,z).current,l=u(this,o,Qe).call(this,e),f=t(this,c)[r],m=t(this,c)[l];if(f&&m){let g=0;const gt=u(this,o,ue).call(this),Vt=t(this,c)[gt];let he=Vt?this.targetScrollValue-Vt.position:0;t(this,P).current?l===0&&r===t(this,c).length-1?(g=t(this,y)+t(this,v)-f.position+t(this,k),t(this,qt)||(he=0)):l===t(this,c).length-1&&r===0?g=m.position-(t(this,y)+t(this,v)+t(this,k)):g=m.position-f.position:g=m.position-f.position,this.shiftPosition(g-he,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,z).current+e,i)}setPosition(e,i){u(this,o,Oe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,d).current,{equalize:!0}),t(this,j).set(e,Fe({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}resize(){if(t(this,ut).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,z).current;if(h(this,pe,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),h(this,be,this.vertical?_t.getCumulativeOffsetTop(t(this,b)):_t.getCumulativeOffsetLeft(t(this,b))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):h(this,k,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,q).current,l=(t(this,v)-t(this,k)*(r-1))/r;t(this,c).forEach(f=>{f.setSize(l)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,_).current){h(this,y,t(this,v)*t(this,_).current);const r=t(this,y)+t(this,v);this.vertical?(t(this,b).style.width=r+"px",t(this,b).style.height="100%"):(t(this,b).style.height=r+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",h(this,y,t(this,b).offsetHeight-t(this,v))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",h(this,y,t(this,b).offsetWidth-t(this,v)));if(!t(this,P).current){const r=getComputedStyle(this),l=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,y,t(this,y)+l),t(this,d).max=t(this,y)}if(t(this,P).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],l=r.position+r.size-t(this,v),f=t(this,y)-l;h(this,N,r.position+r.size+f)}else h(this,N,t(this,y));if(t(this,T).current&&t(this,c).length){const r=t(this,c)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0});h(this,U,(this.vertical?t(this,b).offsetHeight:t(this,b).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||u(this,o,ke).call(this):u(this,o,Ie).call(this),t(this,ge).call(this),oe.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){Ct.scrollEntries.register(this),h(this,d,new ds.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new ze.WheelControls({element:t(this,b)})),t(this,D).changeEvent.subscribe(t(this,Kt)),h(this,dt,new ze.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,Kt)),h(this,B,new ze.DragControls({element:t(this,b),rootElement:this})),t(this,B).changeEvent.subscribe(t(this,Kt)),h(this,w,new ze.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,me)),t(this,x).subscribe(()=>{u(this,o,qe).call(this)}),t(this,st).subscribe(()=>{u(this,o,qe).call(this)}),t(this,nt).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,xt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,E)&&(e?u(this,o,ce).call(this):u(this,o,Ht).call(this))}),t(this,T).subscribe(e=>{t(this,D).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),u(this,o,yt).call(this))}),t(this,P).subscribe(e=>{e.current?(t(this,E)&&(t(this,c).length||(t(this,$).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Ut,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,zt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,d).mass=e.current}),t(this,It).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,A).subscribe(e=>{t(this,E)&&u(this,o,yt).call(this)}),t(this,ot).subscribe(e=>{t(this,E)&&t(this,A).current&&u(this,o,yt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,A).current&&u(this,o,yt).call(this)}),t(this,Mt).subscribe(e=>{t(this,E)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,z).subscribe(e=>{t(this,c).length&&u(this,o,yt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),u(this,o,Ie).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),u(this,o,ke).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),u(this,o,De).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),u(this,o,Be).call(this))}),t(this,wt).observe(),t(this,x).observe(),t(this,st).observe(),t(this,H).observe(),t(this,_).observe(),t(this,$).observe(),t(this,T).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,xt).observe(),t(this,q).observe(),t(this,P).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,kt).observe(),t(this,Ft).observe(),t(this,Rt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,A).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,lt).observe(),t(this,Tt).observe(),t(this,ct).observe(),t(this,ut).observe(),$t.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.LAST),ae.elementResizer.subscribe(this,t(this,L)),t(this,Zt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,x).unobserve(),t(this,st).unobserve(),t(this,H).unobserve(),t(this,_).unobserve(),t(this,$).unobserve(),t(this,T).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,xt).unobserve(),t(this,q).unobserve(),t(this,P).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,kt).unobserve(),t(this,Ft).unobserve(),t(this,Rt).unobserve(),t(this,R).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,A).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,lt).unobserve(),t(this,Tt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),$t.windowResizer.unsubscribe(t(this,ye)),ae.elementResizer.unsubscribe(t(this,L)),u(this,o,De).call(this),t(this,Zt).disconnect()}}d=new WeakMap,wt=new WeakMap,x=new WeakMap,st=new WeakMap,H=new WeakMap,_=new WeakMap,$=new WeakMap,T=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,xt=new WeakMap,q=new WeakMap,P=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,kt=new WeakMap,Ft=new WeakMap,Rt=new WeakMap,R=new WeakMap,At=new WeakMap,ht=new WeakMap,A=new WeakMap,ot=new WeakMap,F=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Tt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,b=new WeakMap,Nt=new WeakMap,c=new WeakMap,pe=new WeakMap,be=new WeakMap,v=new WeakMap,y=new WeakMap,k=new WeakMap,D=new WeakMap,dt=new WeakMap,B=new WeakMap,w=new WeakMap,z=new WeakMap,Ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Gt=new WeakMap,St=new WeakMap,j=new WeakMap,qt=new WeakMap,O=new WeakMap,E=new WeakMap,Zt=new WeakMap,K=new WeakMap,Dt=new WeakMap,jt=new WeakMap,o=new WeakSet,qe=function(){const e=t(this,x).current,i=t(this,st).current?"-reverse":"";t(this,b).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,D).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},ce=function(){u(this,o,Ht).call(this),t(this,Nt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,c).push(new ms(e,i,this))}),t(this,b).style.transform="",this.style.setProperty("--sections",t(this,c).length.toString()),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),u(this,o,yt).call(this)},Ht=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,z).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ie=function(){t(this,G)||(h(this,G,!0),t(this,d).unsubscribe(t(this,fe)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Gt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,dt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ke=function(){t(this,G)&&(h(this,G,!1),t(this,d).subscribe(t(this,fe),-1e4),t(this,d).notify(),t(this,D).connect(),t(this,dt).connect(),t(this,B).connect(),t(this,R).current&&t(this,w).connect())},De=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,jt)),$t.windowResizer.unsubscribe(t(this,L)),u(this,o,Ie).call(this),t(this,b).style.transform="",t(this,b).style.height="",t(this,b).style.width="",this.classList.remove("has-overflow","start","end"),t(this,c).length?u(this,o,Ht).call(this):(t(this,z).reset(),t(this,d).reset()),Ct.scrollEntries.unregister(this))},Be=function(){t(this,Z)&&(h(this,Z,!1),Ct.scrollEntries.register(this),this.tryResplit(),u(this,o,ke).call(this),this.scrollToSection(t(this,Rt).current,{behaviour:"instant"}),$t.windowResizer.subscribe(t(this,L),Le.RESIZE_ORDER.SCROLL))},L=new WeakMap,fe=new WeakMap,Qe=function(e){let i=t(this,z).current;return t(this,P).current?i=Ke.loopNumber(e,t(this,c).length):i=je.clamp(e,0,this.limit),i},Kt=new WeakMap,me=new WeakMap,Oe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},Ve=function(e="current"){if(t(this,P).current&&t(this,c).length){const i=t(this,d)[e]%Math.round(t(this,y)+t(this,v)+t(this,k));return i<0?t(this,y)+i+t(this,v)+t(this,k):i}else return t(this,d)[e]},yt=function(){if(t(this,c).length){const e=t(this,z).current+t(this,ot).current;if(e===0?h(this,O,"start"):e===this.limit?h(this,O,"end"):h(this,O,null),oe.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,A).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,F).current;h(this,K,[]),t(this,c).forEach((r,l)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,m=e+i,g=this.sections.length-m;l>=e&&l<m||l<=f?(r.setMark("current"),t(this,K).push(r)):l>=m&&l<m+g/2||l<=f+i?r.setMark("next"):r.setMark("previous")}),t(this,ge).call(this)}}},Xe=function(){if(t(this,A).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const l=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(l),i.setCurrentIndexArcAbs(Math.abs(l)),i.setMiddle(r===e)})}},ge=new WeakMap,ue=function(e=!1){let i=this.targetScrollValue,r=1/0,l=0;const f=t(this,d).direction;for(let m=0;m<t(this,c).length;m++){const g=t(this,c)[m];let gt=t(this,qt)?g.size*f*-1*.4:0,Vt=g.position;this.overscroll&&Vt===0&&e&&(Vt=t(this,N));let he=Math.abs(Vt+gt-i);he<=r&&(r=he,l=m)}return l},ye=new WeakMap;M.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Ot);var Ce;class Ae extends HTMLElement{constructor(){super(...arguments);s(this,Ce,null)}get scrollElement(){return t(this,Ce)}connectedCallback(){const e=Je.findParentElement(this,Ot);e instanceof Ot?h(this,Ce,e):console.error(this,"e-scroll not found")}}Ce=new WeakMap;var pt,I,J,Q,Jt,Qt,bt,Xt,ve,Pe;class Ye extends Ae{constructor(){super();s(this,pt,null);s(this,I,null);s(this,J,!1);s(this,Q,0);s(this,Jt,0);s(this,Qt,0);s(this,bt,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,I).style.width=t(this,Q)+"px",t(this,I).style.height="100%"):(t(this,I).style.width="100%",t(this,I).style.height=t(this,Q)+"px"),h(this,Jt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Xt).call(this)});s(this,Xt,()=>{h(this,Qt,this.scrollElement.currentProgress*t(this,Jt)),t(this,J)?t(this,I).style.transform=`translate3d(${t(this,Qt)}px, 0px, 0px)`:t(this,I).style.transform=`translate3d(0px, ${t(this,Qt)}px, 0px)`});s(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Pe,e=>{document.documentElement.classList.add("grabbing"),bs.setupDrag(l=>{const f=t(this,J)?l.x:l.y,m=this.scrollElement.distance/t(this,Jt),g=(f-r)*m;this.scrollElement.setPosition(i+g)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ze.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"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,I)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,I,e),t(this,I).addEventListener("pointerdown",t(this,Pe)),$t.windowResizer.subscribe(t(this,bt),Le.RESIZE_ORDER.SCROLL),ae.elementResizer.subscribe(this,t(this,bt)),ae.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ve))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,I).removeEventListener("pointerdown",t(this,Pe)),$t.windowResizer.unsubscribe(t(this,bt)),ae.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ve))}}pt=new WeakMap,I=new WeakMap,J=new WeakMap,Q=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,bt=new WeakMap,Xt=new WeakMap,ve=new WeakMap,Pe=new WeakMap;M.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ye);var Yt,te,ee;class ts extends Ae{constructor(){super();s(this,Yt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,te,new S.CSSProperty(this,"--tween-easing",!1));s(this,ee,new S.CSSProperty(this,"--tween-duration",0));M.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Yt).current,i=t(this,te).current,r=t(this,ee).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Yt).observe(),t(this,te).observe(),t(this,ee).observe()}disconnectedCallback(){t(this,Yt).close(),t(this,te).close(),t(this,ee).close()}}Yt=new WeakMap,te=new WeakMap,ee=new WeakMap;var se;class es extends ts{constructor(){super(...arguments);s(this,se,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,se).current,e)}connectedCallback(){super.connectedCallback(),t(this,se).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,se).close()}}se=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",es);var X,ie;class ss extends ts{constructor(){super(...arguments);s(this,X,new S.CSSProperty(this,"--step",1));s(this,ie,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,ie).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,ie)),t(this,ie).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,ie=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ss);var Y,ft,re,Ee,we,ne;class ys{constructor(n,e,i){s(this,Y,null);s(this,ft,null);s(this,re,null);s(this,Ee,null);s(this,we,()=>{t(this,ft).scrollToSection(t(this,re),{behaviour:t(this,Ee)})});s(this,ne,()=>{t(this,Y).classList.toggle("current",t(this,ft).counter.current===t(this,re))});M.isBrowser&&(h(this,Y,document.createElement("button")),h(this,ft,n),h(this,Ee,i),h(this,re,e),t(this,Y).addEventListener("click",t(this,we)),t(this,ft).counter.subscribe(t(this,ne)),t(this,ne).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,we)),t(this,ft).counter.unsubscribe(t(this,ne)),t(this,Y).remove()}}Y=new WeakMap,ft=new WeakMap,re=new WeakMap,Ee=new WeakMap,we=new WeakMap,ne=new WeakMap;var Bt,mt,tt;class is extends Ae{constructor(){super(...arguments);s(this,Bt,null);s(this,mt,[]);s(this,tt,Te.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ys(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Bt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,Bt,document.createElement("div")),this.appendChild(t(this,Bt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Bt).remove()}}Bt=new WeakMap,mt=new WeakMap,tt=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",is);class rs extends fs.ScrollSegmentElement{connectedCallback(){const n=Je.findParentElement(this,Ot);n instanceof Ot?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Ot&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}M.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",rs);var xe;const He=class He extends Ae{constructor(){super(...arguments);s(this,xe,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ue(this,null,function*(){Ne(He.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,xe))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,xe))}};xe=new WeakMap;let Re=He;M.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Re);exports.ScrollBulletButtonsElement=is;exports.ScrollCounterElement=Re;exports.ScrollElement=Ot;exports.ScrollSegmentElement=rs;exports.ScrollSetButtonElement=es;exports.ScrollStepButtonElement=ss;exports.ScrollbarElement=Ye;
|
|
1
|
+
"use strict";var ns=Object.defineProperty;var _e=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,os=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,cs=Reflect.get;var We=a=>{throw TypeError(a)};var $e=(a,n,e)=>n in a?ns(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Fe=(a,n)=>{for(var e in n||(n={}))os.call(n,e)&&$e(a,e,n[e]);if(_e)for(var e of _e(n))ls.call(n,e)&&$e(a,e,n[e]);return a};var Me=(a,n,e)=>n.has(a)||We("Cannot "+e);var t=(a,n,e)=>(Me(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?We("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Me(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),u=(a,n,e)=>(Me(a,n,"access private method"),e);var Ne=(a,n,e)=>cs(hs(a),e,n);var Ue=(a,n,e)=>new Promise((i,r)=>{var l=g=>{try{m(e.next(g))}catch(gt){r(gt)}},f=g=>{try{m(e.throw(g))}catch(gt){r(gt)}},m=g=>g.done?i(g.value):Promise.resolve(g.value).then(l,f);m((e=e.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const us=require("../Store-GokLe_g-.cjs"),M=require("../index-Cqw2NKev.cjs"),as=require("../easings-GegIwET5.cjs"),oe=require("../events-KVanG9sR.cjs"),Te=require("../function-MthRj-GJ.cjs"),Ze=require("../jss-CRBgdvJ3.cjs"),_t=require("../layout-Ctc2p3uz.cjs"),je=require("../math-GDWEqu7y.cjs"),Ke=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const Le=require("../order/index.cjs"),ds=require("../Damped-B8bmTxAr.cjs"),Ss=require("../Tweened-BsL9FamJ.cjs"),ze=require("../controls/index.cjs"),$t=require("../window-resizer/index.cjs"),Ct=require("../scroll-entries/index.cjs"),Ge=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ps=require("../device/index.cjs"),ae=require("../element-resizer/index.cjs"),bs=require("../gestures-C7gbKx11.cjs"),Je=require("../dom-JBOkFLTh.cjs"),fs=require("../scroll-segment/index.cjs");var p,Wt,C,de,Se,vt,H,et,Pt,Et,le;class ms{constructor(n,e,i){s(this,Et);s(this,p);s(this,Wt);s(this,C);s(this,de,0);s(this,Se,0);s(this,vt,0);s(this,H,0);s(this,et,null);s(this,Pt,0);h(this,p,n),h(this,Wt,e),h(this,C,i),Ct.scrollEntries.register(t(this,p)),this.setIndex(t(this,Wt))}get element(){return t(this,p)}get index(){return t(this,Wt)}get size(){return t(this,vt)}get width(){return t(this,de)}get height(){return t(this,Se)}get position(){return t(this,H)}get transformPosition(){return t(this,Pt)}destroy(){Ct.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.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,C).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,de,t(this,p).offsetWidth),h(this,Se,t(this,p).offsetHeight),h(this,vt,t(this,C).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,H,t(this,C).vertical?_t.getCumulativeOffsetTop(t(this,p)):_t.getCumulativeOffsetLeft(t(this,p))),h(this,H,t(this,H)-t(this,C).contentPosition)}transform(){const n=t(this,C).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,C).viewportSize*t(this,C).sectionDistanceScaleCSSProperty.current;t(this,C).loopCSSProperty.current&&t(this,H)+t(this,vt)<=t(this,C).currentScrollValue-n/2&&(e=(t(this,C).distance-n)*-1-t(this,C).gap),Ct.scrollEntries.update(t(this,p),t(this,C).axisCSSProperty.current,e);const r=t(this,C).currentScrollValue+e,l=t(this,H)-t(this,C).viewportSize-i,f=t(this,H)+t(this,vt)+i,m=Ke.preciseNumber(je.clamp(r,l,f),3);h(this,Pt,m*-1),t(this,C).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Pt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Pt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),oe.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){u(this,Et,le).call(this,"index",n)}setCurrentIndex(n){u(this,Et,le).call(this,"current-index",n)}setCurrentIndexArc(n){u(this,Et,le).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){u(this,Et,le).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Wt=new WeakMap,C=new WeakMap,de=new WeakMap,Se=new WeakMap,vt=new WeakMap,H=new WeakMap,et=new WeakMap,Pt=new WeakMap,Et=new WeakSet,le=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const gs=Ze.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,wt,x,st,_,$,W,T,it,rt,F,nt,xt,q,P,zt,Lt,It,kt,Ft,At,A,Rt,ht,R,ot,N,Mt,lt,Tt,ct,ut,at,b,Nt,c,pe,be,v,y,k,D,dt,B,w,z,Ut,U,G,Z,j,Gt,St,K,qt,O,E,Zt,J,Dt,jt,o,qe,ce,Ht,Ie,ke,De,Be,L,fe,Qe,Kt,me,Oe,Ve,yt,Xe,ge,ue,ye;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,st,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,$,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,it,new S.CSSProperty(this,"--tween-easing",!1));s(this,rt,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,nt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,xt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,P,new S.CSSProperty(this,"--loop",!1));s(this,zt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,It,new S.CSSProperty(this,"--stiffness",0));s(this,kt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ft,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,At,new S.CSSProperty(this,"--start-section",0));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,Rt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ot,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,N,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Mt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new S.CSSProperty(this,"--focus-delay",0));s(this,Tt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new S.CSSProperty(this,"--disabled",!1));s(this,ut,new S.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,b,null);s(this,Nt,null);s(this,c,[]);s(this,pe,0);s(this,be,0);s(this,v,0);s(this,y,0);s(this,k,0);s(this,D,null);s(this,dt,null);s(this,B,null);s(this,w,null);s(this,z,new us.Store(0));s(this,Ut,0);s(this,U,0);s(this,G,!1);s(this,Z,!0);s(this,j,!0);s(this,Gt);s(this,St);s(this,K,new Ss.Tweened);s(this,qt,!1);s(this,O,null);s(this,E,!1);s(this,Zt,null);s(this,J,[]);s(this,Dt,!1);s(this,jt);s(this,L,e=>{if(e&&t(this,Dt)){h(this,Dt,!1);return}this.resize()});s(this,fe,()=>{if(!t(this,G)||t(this,j)||t(this,Z))return;const e=this.currentScrollValue;if(h(this,Ut,Math.max(0,e-t(this,y))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,z).current=u(this,o,ue).call(this)}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;u(this,o,Xe).call(this),Ct.scrollEntries.update(this,t(this,x).current,e)});s(this,Kt,(e,i)=>{t(this,wt).current&&(u(this,o,Oe).call(this,Math.sign(i)||1),t(this,me).call(this,e,i))});s(this,me,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,St)||t(this,K).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Gt)),h(this,Gt,setTimeout(()=>{const r=t(this,c)[u(this,o,ue).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Tt).current,easing:as.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!ps.device.isTouch&&!t(this,kt).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const l={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,qt)?this.scrollToSection(u(this,o,ue).call(this,!0),l):this.shiftSections(r,l)}else t(this,d).shift(r*t(this,v))}else t(this,d).shift(i);h(this,qt,e==="drag")}});s(this,ge,Te.debounce(()=>{const e=t(this,J).reduce((i,r)=>{const l=this.vertical?r.width:r.height;return l>i?l:i},0);clearTimeout(t(this,jt)),h(this,Dt,!0),this.style.setProperty("--max-section-size",""),h(this,jt,setTimeout(()=>{h(this,Dt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ye,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||u(this,o,Be).call(this)});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[gs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,b,document.createElement("div")),t(this,b).className="content",h(this,Nt,document.createElement("slot")),t(this,b).appendChild(t(this,Nt)),t(this,at).appendChild(t(this,b)),e.appendChild(t(this,at)),h(this,Zt,new MutationObserver(Te.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,$)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,xt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,P)}get dampingCSSProperty(){return t(this,zt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,It)}get mouseDragCSSProperty(){return t(this,kt)}get sectionDistanceScaleCSSProperty(){return t(this,Ft)}get startSectionCSSProperty(){return t(this,At)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,Rt)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,N)}get shiftSectionPositionCSSProperty(){return t(this,Mt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Tt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return u(this,o,Ve).call(this,"current")}get targetScrollValue(){return u(this,o,Ve).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,b)}get sections(){return t(this,c)}get position(){return t(this,pe)}get contentPosition(){return t(this,be)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,y)}get gap(){return t(this,k)}get counter(){return t(this,z)}get limit(){return Math.ceil(t(this,c).length-t(this,q).current)}get distance(){return t(this,U)}get loopDistance(){return t(this,P).current?t(this,U)+t(this,k):t(this,U)}get hasOverflow(){return t(this,G)}get overscroll(){return t(this,Ut)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,j)&&(t(this,P).current||t(this,W).current||t(this,P).current||t(this,F).current||t(this,T).current)&&u(this,o,ce).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress<l?0:this.currentProgress>f?1:(this.currentProgress-l)/(f-l)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress>=l&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,z).current,l=u(this,o,Qe).call(this,e),f=t(this,c)[r],m=t(this,c)[l];if(f&&m){let g=0;const gt=u(this,o,ue).call(this),Vt=t(this,c)[gt];let he=Vt?this.targetScrollValue-Vt.position:0;t(this,P).current?l===0&&r===t(this,c).length-1?(g=t(this,y)+t(this,v)-f.position+t(this,k),t(this,qt)||(he=0)):l===t(this,c).length-1&&r===0?g=m.position-(t(this,y)+t(this,v)+t(this,k)):g=m.position-f.position:g=m.position-f.position,this.shiftPosition(g-he,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,z).current+e,i)}setPosition(e,i){u(this,o,Oe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,K).set(t(this,d).current,{equalize:!0}),t(this,K).set(e,Fe({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}resize(){if(t(this,ut).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,z).current;if(h(this,pe,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),h(this,be,this.vertical?_t.getCumulativeOffsetTop(t(this,b)):_t.getCumulativeOffsetLeft(t(this,b))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):h(this,k,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,F).current&&t(this,c).length){const r=t(this,q).current,l=(t(this,v)-t(this,k)*(r-1))/r;t(this,c).forEach(f=>{f.setSize(l)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,$).current){h(this,y,t(this,v)*t(this,$).current);const r=t(this,y)+t(this,v);this.vertical?(t(this,b).style.width=r+"px",t(this,b).style.height="100%"):(t(this,b).style.height=r+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",h(this,y,t(this,b).offsetHeight-t(this,v))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",h(this,y,t(this,b).offsetWidth-t(this,v)));if(!t(this,P).current){const r=getComputedStyle(this),l=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,y,t(this,y)+l),t(this,d).max=t(this,y)}if(t(this,P).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],l=r.position+r.size-t(this,v),f=t(this,y)-l;h(this,U,r.position+r.size+f)}else h(this,U,t(this,y));if(t(this,T).current&&t(this,c).length){const r=t(this,c)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0});h(this,G,(this.vertical?t(this,b).offsetHeight:t(this,b).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,G)),t(this,G)?t(this,ct).current||u(this,o,ke).call(this):u(this,o,Ie).call(this),t(this,ge).call(this),oe.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){Ct.scrollEntries.register(this),h(this,d,new ds.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new ze.WheelControls({element:t(this,b)})),t(this,D).changeEvent.subscribe(t(this,Kt)),h(this,dt,new ze.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,Kt)),h(this,B,new ze.DragControls({element:t(this,b),rootElement:this})),t(this,B).changeEvent.subscribe(t(this,Kt)),h(this,w,new ze.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,me)),t(this,x).subscribe(()=>{u(this,o,qe).call(this)}),t(this,st).subscribe(()=>{u(this,o,qe).call(this)}),t(this,nt).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,xt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,$).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?u(this,o,ce).call(this):u(this,o,Ht).call(this))}),t(this,T).subscribe(e=>{t(this,D).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),u(this,o,yt).call(this))}),t(this,P).subscribe(e=>{e.current?(t(this,E)&&(t(this,c).length||(t(this,W).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Ut,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,zt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,d).mass=e.current}),t(this,It).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,Z)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,E)&&u(this,o,yt).call(this)}),t(this,ot).subscribe(e=>{t(this,E)&&t(this,R).current&&u(this,o,yt).call(this)}),t(this,N).subscribe(e=>{t(this,E)&&t(this,R).current&&u(this,o,yt).call(this)}),t(this,Mt).subscribe(e=>{t(this,E)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,z).subscribe(e=>{t(this,c).length&&u(this,o,yt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,K).subscribe(e=>{t(this,K).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),u(this,o,Ie).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),u(this,o,ke).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),u(this,o,De).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),u(this,o,Be).call(this))}),t(this,wt).observe(),t(this,x).observe(),t(this,st).observe(),t(this,_).observe(),t(this,$).observe(),t(this,W).observe(),t(this,T).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,F).observe(),t(this,nt).observe(),t(this,xt).observe(),t(this,q).observe(),t(this,P).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,kt).observe(),t(this,Ft).observe(),t(this,At).observe(),t(this,A).observe(),t(this,A).observe(),t(this,Rt).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,N).observe(),t(this,Mt).observe(),t(this,lt).observe(),t(this,Tt).observe(),t(this,ct).observe(),t(this,ut).observe(),$t.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.LAST),ae.elementResizer.subscribe(this,t(this,L)),t(this,Zt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,x).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,$).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,F).unobserve(),t(this,nt).unobserve(),t(this,xt).unobserve(),t(this,q).unobserve(),t(this,P).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,kt).unobserve(),t(this,Ft).unobserve(),t(this,At).unobserve(),t(this,A).unobserve(),t(this,Rt).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,N).unobserve(),t(this,Mt).unobserve(),t(this,lt).unobserve(),t(this,Tt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),$t.windowResizer.unsubscribe(t(this,ye)),ae.elementResizer.unsubscribe(t(this,L)),u(this,o,De).call(this),t(this,Zt).disconnect()}}d=new WeakMap,wt=new WeakMap,x=new WeakMap,st=new WeakMap,_=new WeakMap,$=new WeakMap,W=new WeakMap,T=new WeakMap,it=new WeakMap,rt=new WeakMap,F=new WeakMap,nt=new WeakMap,xt=new WeakMap,q=new WeakMap,P=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,kt=new WeakMap,Ft=new WeakMap,At=new WeakMap,A=new WeakMap,Rt=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,N=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Tt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,b=new WeakMap,Nt=new WeakMap,c=new WeakMap,pe=new WeakMap,be=new WeakMap,v=new WeakMap,y=new WeakMap,k=new WeakMap,D=new WeakMap,dt=new WeakMap,B=new WeakMap,w=new WeakMap,z=new WeakMap,Ut=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,j=new WeakMap,Gt=new WeakMap,St=new WeakMap,K=new WeakMap,qt=new WeakMap,O=new WeakMap,E=new WeakMap,Zt=new WeakMap,J=new WeakMap,Dt=new WeakMap,jt=new WeakMap,o=new WeakSet,qe=function(){const e=t(this,x).current,i=t(this,st).current?"-reverse":"";t(this,b).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,D).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},ce=function(){u(this,o,Ht).call(this),t(this,Nt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,c).push(new ms(e,i,this))}),t(this,b).style.transform="",this.style.setProperty("--sections",t(this,c).length.toString()),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),u(this,o,yt).call(this)},Ht=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,z).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ie=function(){t(this,Z)||(h(this,Z,!0),t(this,d).unsubscribe(t(this,fe)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Gt)),clearInterval(t(this,St)),t(this,K).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,dt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,G)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ke=function(){t(this,Z)&&(h(this,Z,!1),t(this,d).subscribe(t(this,fe),-1e4),t(this,d).notify(),t(this,D).connect(),t(this,dt).connect(),t(this,B).connect(),t(this,A).current&&t(this,w).connect())},De=function(){t(this,j)||(h(this,j,!0),clearTimeout(t(this,jt)),$t.windowResizer.unsubscribe(t(this,L)),u(this,o,Ie).call(this),t(this,b).style.transform="",t(this,b).style.height="",t(this,b).style.width="",this.classList.remove("has-overflow","start","end"),t(this,c).length?u(this,o,Ht).call(this):(t(this,z).reset(),t(this,d).reset()),Ct.scrollEntries.unregister(this))},Be=function(){t(this,j)&&(h(this,j,!1),Ct.scrollEntries.register(this),this.tryResplit(),u(this,o,ke).call(this),this.scrollToSection(t(this,At).current,{behaviour:"instant"}),$t.windowResizer.subscribe(t(this,L),Le.RESIZE_ORDER.SCROLL))},L=new WeakMap,fe=new WeakMap,Qe=function(e){let i=t(this,z).current;return t(this,P).current?i=Ke.loopNumber(e,t(this,c).length):i=je.clamp(e,0,this.limit),i},Kt=new WeakMap,me=new WeakMap,Oe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,Rt).current,this.sectionalCSSProperty.current)},Ve=function(e="current"){if(t(this,P).current&&t(this,c).length){const i=t(this,d)[e]%Math.round(t(this,y)+t(this,v)+t(this,k));return i<0?t(this,y)+i+t(this,v)+t(this,k):i}else return t(this,d)[e]},yt=function(){if(t(this,c).length){const e=t(this,z).current+t(this,ot).current;if(e===0?h(this,O,"start"):e===this.limit?h(this,O,"end"):h(this,O,null),oe.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,R).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,N).current;h(this,J,[]),t(this,c).forEach((r,l)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,N).current,m=e+i,g=this.sections.length-m;l>=e&&l<m||l<=f?(r.setMark("current"),t(this,J).push(r)):l>=m&&l<m+g/2||l<=f+i?r.setMark("next"):r.setMark("previous")}),t(this,ge).call(this)}}},Xe=function(){if(t(this,R).current){const e=Math.floor(t(this,J).length/2);t(this,J).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,J).forEach((i,r)=>{const l=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(l),i.setCurrentIndexArcAbs(Math.abs(l)),i.setMiddle(r===e)})}},ge=new WeakMap,ue=function(e=!1){let i=this.targetScrollValue,r=1/0,l=0;const f=t(this,d).direction;for(let m=0;m<t(this,c).length;m++){const g=t(this,c)[m];let gt=t(this,qt)?g.size*f*-1*.4:0,Vt=g.position;this.overscroll&&Vt===0&&e&&(Vt=t(this,U));let he=Math.abs(Vt+gt-i);he<=r&&(r=he,l=m)}return l},ye=new WeakMap;M.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Ot);var Ce;class Re extends HTMLElement{constructor(){super(...arguments);s(this,Ce,null)}get scrollElement(){return t(this,Ce)}connectedCallback(){const e=Je.findParentElement(this,Ot);e instanceof Ot?h(this,Ce,e):console.error(this,"e-scroll not found")}}Ce=new WeakMap;var pt,I,Q,X,Jt,Qt,bt,Xt,ve,Pe;class Ye extends Re{constructor(){super();s(this,pt,null);s(this,I,null);s(this,Q,!1);s(this,X,0);s(this,Jt,0);s(this,Qt,0);s(this,bt,()=>{h(this,Q,this.offsetWidth>this.offsetHeight);const e=t(this,Q)?this.offsetWidth:this.offsetHeight;h(this,X,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,X,Math.max(t(this,X),30)),t(this,Q)?(t(this,I).style.width=t(this,X)+"px",t(this,I).style.height="100%"):(t(this,I).style.width="100%",t(this,I).style.height=t(this,X)+"px"),h(this,Jt,e-t(this,X)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Xt).call(this)});s(this,Xt,()=>{h(this,Qt,this.scrollElement.currentProgress*t(this,Jt)),t(this,Q)?t(this,I).style.transform=`translate3d(${t(this,Qt)}px, 0px, 0px)`:t(this,I).style.transform=`translate3d(0px, ${t(this,Qt)}px, 0px)`});s(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Pe,e=>{document.documentElement.classList.add("grabbing"),bs.setupDrag(l=>{const f=t(this,Q)?l.x:l.y,m=this.scrollElement.distance/t(this,Jt),g=(f-r)*m;this.scrollElement.setPosition(i+g)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,Q)?e.x:e.y});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ze.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"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,I)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,I,e),t(this,I).addEventListener("pointerdown",t(this,Pe)),$t.windowResizer.subscribe(t(this,bt),Le.RESIZE_ORDER.SCROLL),ae.elementResizer.subscribe(this,t(this,bt)),ae.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ve))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,I).removeEventListener("pointerdown",t(this,Pe)),$t.windowResizer.unsubscribe(t(this,bt)),ae.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ve))}}pt=new WeakMap,I=new WeakMap,Q=new WeakMap,X=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,bt=new WeakMap,Xt=new WeakMap,ve=new WeakMap,Pe=new WeakMap;M.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ye);var Yt,te,ee;class ts extends Re{constructor(){super();s(this,Yt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,te,new S.CSSProperty(this,"--tween-easing",!1));s(this,ee,new S.CSSProperty(this,"--tween-duration",0));M.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Yt).current,i=t(this,te).current,r=t(this,ee).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Yt).observe(),t(this,te).observe(),t(this,ee).observe()}disconnectedCallback(){t(this,Yt).close(),t(this,te).close(),t(this,ee).close()}}Yt=new WeakMap,te=new WeakMap,ee=new WeakMap;var se;class es extends ts{constructor(){super(...arguments);s(this,se,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,se).current,e)}connectedCallback(){super.connectedCallback(),t(this,se).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,se).close()}}se=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",es);var Y,ie;class ss extends ts{constructor(){super(...arguments);s(this,Y,new S.CSSProperty(this,"--step",1));s(this,ie,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Y).current>0&&this.scrollElement.scrollLine==="end"||t(this,Y).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Y).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Y).subscribe(()=>{t(this,ie).call(this)}),t(this,Y).observe(),this.scrollElement.addEventListener("scrollLine",t(this,ie)),t(this,ie).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Y).close(),this.removeAttribute("disabled")}}Y=new WeakMap,ie=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ss);var V,ft,re,Ee,we,ne;class ys{constructor(n,e,i){s(this,V,null);s(this,ft,null);s(this,re,null);s(this,Ee,null);s(this,we,()=>{t(this,ft).scrollToSection(t(this,re),{behaviour:t(this,Ee)})});s(this,ne,()=>{t(this,V).classList.toggle("current",t(this,ft).counter.current===t(this,re))});M.isBrowser&&(h(this,V,document.createElement("button")),t(this,V).setAttribute("aria-label",`Go to section ${e+1}`),h(this,ft,n),h(this,Ee,i),h(this,re,e),t(this,V).addEventListener("click",t(this,we)),t(this,ft).counter.subscribe(t(this,ne)),t(this,ne).call(this))}get element(){return t(this,V)}destroy(){t(this,V).removeEventListener("click",t(this,we)),t(this,ft).counter.unsubscribe(t(this,ne)),t(this,V).remove()}}V=new WeakMap,ft=new WeakMap,re=new WeakMap,Ee=new WeakMap,we=new WeakMap,ne=new WeakMap;var Bt,mt,tt;class is extends Re{constructor(){super(...arguments);s(this,Bt,null);s(this,mt,[]);s(this,tt,Te.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ys(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Bt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,Bt,document.createElement("div")),this.appendChild(t(this,Bt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Bt).remove()}}Bt=new WeakMap,mt=new WeakMap,tt=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",is);class rs extends fs.ScrollSegmentElement{connectedCallback(){const n=Je.findParentElement(this,Ot);n instanceof Ot?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Ot&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}M.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",rs);var xe;const He=class He extends Re{constructor(){super(...arguments);s(this,xe,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ue(this,null,function*(){Ne(He.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,xe))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,xe))}};xe=new WeakMap;let Ae=He;M.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Ae);exports.ScrollBulletButtonsElement=is;exports.ScrollCounterElement=Ae;exports.ScrollElement=Ot;exports.ScrollSegmentElement=rs;exports.ScrollSetButtonElement=es;exports.ScrollStepButtonElement=ss;exports.ScrollbarElement=Ye;
|