aptechka 0.57.2 → 0.57.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var N=c=>{throw TypeError(c)};var K=(c,r,t)=>r.has(c)||N("Cannot "+t);var e=(c,r,t)=>(K(c,r,"read from private field"),t?t.call(c):r.get(c)),i=(c,r,t)=>r.has(c)?N("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(K(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),m=(c,r,t)=>(K(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("../element-linked-store/index.cjs"),b=require("../css-property/index.cjs"),Y=require("../index-Cqw2NKev.cjs"),j=require("../events-KVanG9sR.cjs"),ne=require("../function-MthRj-GJ.cjs"),_=require("../style-At6aDoqG.cjs"),ee=require("../url-D1CgmwZ_.cjs"),te=require("../window-resizer/index.cjs");var u,v,F,J;class he{constructor(){i(this,u,new Map);i(this,v,[]);i(this,F,r=>{var s;const t=[...e(this,v)].reverse().find(o=>o.clickOutside.current);if(t){const o=r.composedPath();if(o.find(Z=>Z instanceof HTMLElement&&Z.hasAttribute("data-popover-content")))return;const l=o[0],q=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),re=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!q||re)&&t.close()}});i(this,J,r=>{if(r.code==="Escape"){const t=[...e(this,v)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,F)),addEventListener("keydown",e(this,J))}get groups(){return e(this,u)}get stack(){return e(this,v)}add(r,t){if(t.closeRest.current)e(this,u).forEach(o=>{o.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let o=e(this,u).get(r);o==null||o.forEach(l=>{l.close()})}let s=e(this,u).get(r);s!=null&&s.length||(s=[],e(this,u).set(r,s)),e(this,v).push(t),s.push(t)}remove(r,t){if(n(this,v,e(this,v).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(o=>{o.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(o=>o.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(r);e(this,u).delete(r),s==null||s.forEach(o=>{o.close()})}else{let s=e(this,u).get(r);s&&(s=s.filter(o=>o!==t),e(this,u).set(r,s))}}}u=new WeakMap,v=new WeakMap,F=new WeakMap,J=new WeakMap;var d,$,M,w,O,f,y,P,k,g,C,A,L,R,a,T,se,I,x,V,W,H;const E=class E extends HTMLElement{constructor(){super();i(this,T);i(this,d);i(this,$);i(this,M);i(this,w);i(this,O);i(this,f);i(this,y);i(this,P);i(this,k);i(this,g);i(this,C);i(this,A);i(this,L);i(this,R);i(this,a);i(this,x);i(this,V);i(this,W);i(this,H);this.urlValue="",n(this,d,!1),n(this,f,new b.CSSProperty(this,"--history",!1)),n(this,y,new b.CSSProperty(this,"--restore",!1)),n(this,P,new b.CSSProperty(this,"--close-rest",!1)),n(this,k,new b.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new b.CSSProperty(this,"--group","")),n(this,C,new b.CSSProperty(this,"--click-outside",!1)),n(this,A,new b.CSSProperty(this,"--escape",!1)),n(this,L,!1),n(this,a,new oe.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,x,()=>{n(this,L,!1),e(this,d)&&e(this,f).current&&!location.search.includes(this.id)?this.close():!e(this,d)&&e(this,f).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,L,!0)}),n(this,V,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,W).call(this)}),n(this,W,ne.debounce(()=>{e(this,H).call(this)},10)),n(this,H,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"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),o=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!o)}})}get history(){return e(this,f)}get restore(){return e(this,y)}get closeRest(){return e(this,P)}get closeRestInGroup(){return e(this,k)}get group(){return e(this,g)}get clickOutside(){return e(this,C)}get escape(){return e(this,A)}get opened(){return e(this,d)}get lastTrigger(){return e(this,R)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d)&&ee.updateSearchParameter(this.id,t)}open(t){if(e(this,d))return;n(this,R,t==null?void 0:t.trigger),clearTimeout(e(this,$)),clearTimeout(e(this,M)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),j.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,R)}}),e(this,f).current&&e(this,L)&&history.pushState(history.state,"",e(this,T,se)),n(this,d,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,H).call(this),e(this,a).set("opened",!0),j.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,R)}}),n(this,w,void 0),n(this,O,setTimeout(()=>{e(this,a).set("transitionend",!0)},_.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,w,setTimeout(s,10))}close(){e(this,d)&&(clearTimeout(e(this,w)),clearTimeout(e(this,O)),E.stack.remove(e(this,g).current,this),n(this,d,!1),m(this,T,I).call(this),e(this,a).set("transitionend",!1),n(this,$,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),j.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,M,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),j.dispatchEvent(this,"popoverClosed",{custom:!0})},_.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,f).observe(),e(this,y).observe(),e(this,P).observe(),e(this,k).observe(),e(this,g).observe(),e(this,C).observe(),e(this,A).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,x)),setTimeout(()=>{e(this,y).current?(this.urlValue=ee.parseSearchParameters(location.search)[this.id],e(this,x).call(this)):(m(this,T,I).call(this),n(this,L,!0))},0),te.windowResizer.subscribe(e(this,V))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),te.windowResizer.unsubscribe(e(this,V)),e(this,a).close(),e(this,f).close(),e(this,y).close(),e(this,P).close(),e(this,k).close(),e(this,g).close(),e(this,C).close(),e(this,A).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,M)),clearTimeout(e(this,w)),clearTimeout(e(this,O)),removeEventListener("popstate",e(this,x)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),m(this,T,I).call(this)}};d=new WeakMap,$=new WeakMap,M=new WeakMap,w=new WeakMap,O=new WeakMap,f=new WeakMap,y=new WeakMap,P=new WeakMap,k=new WeakMap,g=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,R=new WeakMap,a=new WeakMap,T=new WeakSet,se=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,f).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},x=new WeakMap,V=new WeakMap,W=new WeakMap,H=new WeakMap,E.stack=new he;let z=E;Y.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,p,S,Q,B,G,D,U,X;class ie extends HTMLElement{constructor(){super();i(this,S);i(this,h);i(this,p,new b.CSSProperty(this,"--type","open"));i(this,B,()=>{e(this,p).current!=="close"&&this.classList.add("triggered")});i(this,G,()=>{e(this,p).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});i(this,D,()=>{e(this,p).current!=="close"&&this.classList.remove("opened")});i(this,U,()=>{e(this,p).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});Y.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,p).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"&&t.currentTarget.click()}))}get type(){return e(this,p)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(m(this,S,Q).call(this),t){let o=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)o=l;else{const q=this.getRootNode();q instanceof ShadowRoot?o=q.host.closest("[data-popover]"):q instanceof HTMLElement&&(o=q.closest("[data-popover]"))}}else t==="sibling"?o=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]"):(!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),o=document.querySelector(t)||this.getRootNode().querySelector(t));o instanceof HTMLElement?(n(this,h,o),e(this,h).addEventListener("popoverTriggered",e(this,B)),e(this,h).addEventListener("popoverOpened",e(this,G)),e(this,h).addEventListener("popoverClosing",e(this,D)),e(this,h).addEventListener("popoverClosed",e(this,U))):console.warn(this,`target ${t} not found`)}m(this,S,X).call(this,e(this,p).current)}connectedCallback(){e(this,p).subscribe(s=>{m(this,S,X).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,p).observe()}disconnectedCallback(){e(this,p).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),m(this,S,Q).call(this)}}h=new WeakMap,p=new WeakMap,S=new WeakSet,Q=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,B)),e(this,h).removeEventListener("popoverOpened",e(this,G)),e(this,h).removeEventListener("popoverClosing",e(this,D)),e(this,h).removeEventListener("popoverClosed",e(this,U)))},B=new WeakMap,G=new WeakMap,D=new WeakMap,U=new WeakMap,X=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")))};Y.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ie);exports.PopoverButtonElement=ie;exports.PopoverElement=z;
1
+ "use strict";var _=c=>{throw TypeError(c)};var Q=(c,r,t)=>r.has(c)||_("Cannot "+t);var e=(c,r,t)=>(Q(c,r,"read from private field"),t?t.call(c):r.get(c)),i=(c,r,t)=>r.has(c)?_("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(Q(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),E=(c,r,t)=>(Q(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("../element-linked-store/index.cjs"),b=require("../css-property/index.cjs"),Z=require("../index-Cqw2NKev.cjs"),F=require("../events-KVanG9sR.cjs"),ne=require("../function-MthRj-GJ.cjs"),ee=require("../style-At6aDoqG.cjs"),te=require("../url-D1CgmwZ_.cjs"),se=require("../window-resizer/index.cjs");var u,m,J,K;class he{constructor(){i(this,u,new Map);i(this,m,[]);i(this,J,r=>{var s;const t=[...e(this,m)].reverse().find(o=>o.clickOutside.current);if(t){const o=r.composedPath();if(o.find(N=>N instanceof HTMLElement&&N.hasAttribute("data-popover-content")))return;const a=o[0],p=a instanceof Node&&(t.contains(a)||((s=t.shadowRoot)==null?void 0:s.contains(a))),z=a instanceof HTMLElement&&a.hasAttribute("data-outside");(!p||z)&&t.close()}});i(this,K,r=>{if(r.code==="Escape"){const t=[...e(this,m)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,m)}add(r,t){if(t.closeRest.current)e(this,u).forEach(o=>{o.forEach(a=>{a.close()})});else if(t.closeRestInGroup.current){let o=e(this,u).get(r);o==null||o.forEach(a=>{a.close()})}let s=e(this,u).get(r);s!=null&&s.length||(s=[],e(this,u).set(r,s)),e(this,m).push(t),s.push(t)}remove(r,t){if(n(this,m,e(this,m).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(o=>{o.forEach(a=>s.push(a))}),e(this,u).clear(),s.forEach(o=>o.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(r);e(this,u).delete(r),s==null||s.forEach(o=>{o.close()})}else{let s=e(this,u).get(r);s&&(s=s.filter(o=>o!==t),e(this,u).set(r,s))}}}u=new WeakMap,m=new WeakMap,J=new WeakMap,K=new WeakMap;var f,$,M,P,O,g,L,k,C,v,A,R,T,x,l,S,ie,I,q,V,B,H;const y=class y extends HTMLElement{constructor(){super();i(this,S);i(this,f);i(this,$);i(this,M);i(this,P);i(this,O);i(this,g);i(this,L);i(this,k);i(this,C);i(this,v);i(this,A);i(this,R);i(this,T);i(this,x);i(this,l);i(this,q);i(this,V);i(this,B);i(this,H);this.urlValue="",n(this,f,!1),n(this,g,new b.CSSProperty(this,"--history",!1)),n(this,L,new b.CSSProperty(this,"--restore",!1)),n(this,k,new b.CSSProperty(this,"--close-rest",!1)),n(this,C,new b.CSSProperty(this,"--close-rest-in-group",!1)),n(this,v,new b.CSSProperty(this,"--group","")),n(this,A,new b.CSSProperty(this,"--click-outside",!1)),n(this,R,new b.CSSProperty(this,"--escape",!1)),n(this,T,!1),n(this,l,new oe.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,q,()=>{n(this,T,!1),e(this,f)&&e(this,g).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,g).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,V,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,B).call(this)}),n(this,B,ne.debounce(()=>{e(this,H).call(this)},10)),n(this,H,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")}),e(this,v).subscribe(t=>{t.previous&&(y.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,l).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=y.stack.groups.get(this.group.current),o=s==null?void 0:s.find(a=>a.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!o)}})}get history(){return e(this,g)}get restore(){return e(this,L)}get closeRest(){return e(this,k)}get closeRestInGroup(){return e(this,C)}get group(){return e(this,v)}get clickOutside(){return e(this,A)}get escape(){return e(this,R)}get opened(){return e(this,f)}get lastTrigger(){return e(this,x)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&te.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,x,t==null?void 0:t.trigger),clearTimeout(e(this,$)),clearTimeout(e(this,M)),e(this,l).set("closing",!1),e(this,l).set("triggered",!0),F.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,x)}}),e(this,g).current&&e(this,T)&&history.pushState(history.state,"",e(this,S,ie)),n(this,f,!0);const s=()=>{y.stack.add(e(this,v).current,this),e(this,H).call(this),e(this,l).set("opened",!0),F.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,x)}}),n(this,P,void 0),n(this,O,setTimeout(()=>{e(this,l).set("transitionend",!0)},ee.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,P,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,P)),clearTimeout(e(this,O)),y.stack.remove(e(this,v).current,this),n(this,f,!1),E(this,S,I).call(this),e(this,l).set("transitionend",!1),n(this,$,setTimeout(()=>{e(this,l).set("opened",!1),e(this,l).set("closing",!0),F.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,M,setTimeout(()=>{e(this,l).set("triggered",!1),e(this,l).set("closing",!1),F.dispatchEvent(this,"popoverClosed",{custom:!0})},ee.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,g).observe(),e(this,L).observe(),e(this,k).observe(),e(this,C).observe(),e(this,v).observe(),e(this,A).observe(),e(this,R).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,q)),setTimeout(()=>{e(this,L).current?(this.urlValue=te.parseSearchParameters(location.search)[this.id],e(this,q).call(this)):(E(this,S,I).call(this),n(this,T,!0))},0),se.windowResizer.subscribe(e(this,V))}disconnectedCallback(){y.stack.remove(e(this,v).current,this),se.windowResizer.unsubscribe(e(this,V)),e(this,l).close(),e(this,g).close(),e(this,L).close(),e(this,k).close(),e(this,C).close(),e(this,v).close(),e(this,A).close(),e(this,R).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,M)),clearTimeout(e(this,P)),clearTimeout(e(this,O)),removeEventListener("popstate",e(this,q)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),E(this,S,I).call(this)}};f=new WeakMap,$=new WeakMap,M=new WeakMap,P=new WeakMap,O=new WeakMap,g=new WeakMap,L=new WeakMap,k=new WeakMap,C=new WeakMap,v=new WeakMap,A=new WeakMap,R=new WeakMap,T=new WeakMap,x=new WeakMap,l=new WeakMap,S=new WeakSet,ie=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,g).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},q=new WeakMap,V=new WeakMap,B=new WeakMap,H=new WeakMap,y.stack=new he;let W=y;Z.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",W);var h,d,w,X,G,D,U,j,Y;class re extends HTMLElement{constructor(){super();i(this,w);i(this,h);i(this,d,new b.CSSProperty(this,"--type","open"));i(this,G,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});i(this,D,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});i(this,U,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});i(this,j,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});Z.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"&&t.currentTarget.click()}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(E(this,w,X).call(this),t){let o=null;if(t==="parent"){const a=this.closest("[data-popover]");if(a)o=a;else{const p=this.getRootNode();p instanceof ShadowRoot?o=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(o=p.closest("[data-popover]"))}}else if(t==="sibling")o=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const a=p=>{if(!p)return null;let z=p.querySelector("[data-popover]");return!z&&(p!=null&&p.parentElement)&&(z=a(p.parentElement)),z};o=a(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),o=document.querySelector(t)||this.getRootNode().querySelector(t);o instanceof HTMLElement?(n(this,h,o),e(this,h).addEventListener("popoverTriggered",e(this,G)),e(this,h).addEventListener("popoverOpened",e(this,D)),e(this,h).addEventListener("popoverClosing",e(this,U)),e(this,h).addEventListener("popoverClosed",e(this,j))):console.warn(this,`target ${t} not found`)}E(this,w,Y).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{E(this,w,Y).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"),E(this,w,X).call(this)}}h=new WeakMap,d=new WeakMap,w=new WeakSet,X=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,G)),e(this,h).removeEventListener("popoverOpened",e(this,D)),e(this,h).removeEventListener("popoverClosing",e(this,U)),e(this,h).removeEventListener("popoverClosed",e(this,j)))},G=new WeakMap,D=new WeakMap,U=new WeakMap,j=new WeakMap,Y=function(t){e(this,h)instanceof W&&(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")))};Z.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",re);exports.PopoverButtonElement=re;exports.PopoverElement=W;
@@ -1,47 +1,47 @@
1
- var N = (c) => {
1
+ var _ = (c) => {
2
2
  throw TypeError(c);
3
3
  };
4
- var K = (c, r, t) => r.has(c) || N("Cannot " + t);
5
- var e = (c, r, t) => (K(c, r, "read from private field"), t ? t.call(c) : r.get(c)), i = (c, r, t) => r.has(c) ? N("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (K(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), v = (c, r, t) => (K(c, r, "access private method"), t);
4
+ var Q = (c, r, t) => r.has(c) || _("Cannot " + t);
5
+ var e = (c, r, t) => (Q(c, r, "read from private field"), t ? t.call(c) : r.get(c)), i = (c, r, t) => r.has(c) ? _("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (Q(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), b = (c, r, t) => (Q(c, r, "access private method"), t);
6
6
  import { ElementLinkedStore as ie } from "../element-linked-store/index.js";
7
- import { CSSProperty as b } from "../css-property/index.js";
8
- import { i as Y } from "../index-euf5anj6.js";
9
- import { d as D } from "../events-CsVF98U6.js";
7
+ import { CSSProperty as E } from "../css-property/index.js";
8
+ import { i as Z } from "../index-euf5anj6.js";
9
+ import { d as j } from "../events-CsVF98U6.js";
10
10
  import { d as re } from "../function-C10DGppn.js";
11
- import { g as _ } from "../style-j2TwriJ_.js";
11
+ import { g as ee } from "../style-j2TwriJ_.js";
12
12
  import { u as oe, p as he } from "../url-B6BNcw6_.js";
13
- import { windowResizer as ee } from "../window-resizer/index.js";
14
- var u, m, F, J;
13
+ import { windowResizer as te } from "../window-resizer/index.js";
14
+ var u, v, J, K;
15
15
  class ne {
16
16
  constructor() {
17
17
  i(this, u, /* @__PURE__ */ new Map());
18
- i(this, m, []);
19
- i(this, F, (r) => {
18
+ i(this, v, []);
19
+ i(this, J, (r) => {
20
20
  var s;
21
- const t = [...e(this, m)].reverse().find((o) => o.clickOutside.current);
21
+ const t = [...e(this, v)].reverse().find((o) => o.clickOutside.current);
22
22
  if (t) {
23
23
  const o = r.composedPath();
24
24
  if (o.find(
25
- (Z) => Z instanceof HTMLElement && Z.hasAttribute("data-popover-content")
25
+ (N) => N instanceof HTMLElement && N.hasAttribute("data-popover-content")
26
26
  ))
27
27
  return;
28
- const a = o[0], $ = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), se = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
- (!$ || se) && t.close();
28
+ const a = o[0], p = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), G = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
+ (!p || G) && t.close();
30
30
  }
31
31
  });
32
- i(this, J, (r) => {
32
+ i(this, K, (r) => {
33
33
  if (r.code === "Escape") {
34
- const t = [...e(this, m)].reverse().find((s) => s.escape.current);
34
+ const t = [...e(this, v)].reverse().find((s) => s.escape.current);
35
35
  t && t.close();
36
36
  }
37
37
  });
38
- addEventListener("click", e(this, F)), addEventListener("keydown", e(this, J));
38
+ addEventListener("click", e(this, J)), addEventListener("keydown", e(this, K));
39
39
  }
40
40
  get groups() {
41
41
  return e(this, u);
42
42
  }
43
43
  get stack() {
44
- return e(this, m);
44
+ return e(this, v);
45
45
  }
46
46
  add(r, t) {
47
47
  if (t.closeRest.current)
@@ -57,10 +57,10 @@ class ne {
57
57
  });
58
58
  }
59
59
  let s = e(this, u).get(r);
60
- s != null && s.length || (s = [], e(this, u).set(r, s)), e(this, m).push(t), s.push(t);
60
+ s != null && s.length || (s = [], e(this, u).set(r, s)), e(this, v).push(t), s.push(t);
61
61
  }
62
62
  remove(r, t) {
63
- if (h(this, m, e(this, m).filter((s) => s !== t)), t.closeRest.current) {
63
+ if (h(this, v, e(this, v).filter((s) => s !== t)), t.closeRest.current) {
64
64
  let s = [];
65
65
  e(this, u).forEach((o) => {
66
66
  o.forEach((a) => s.push(a));
@@ -76,50 +76,50 @@ class ne {
76
76
  }
77
77
  }
78
78
  }
79
- u = new WeakMap(), m = new WeakMap(), F = new WeakMap(), J = new WeakMap();
80
- var d, V, M, w, O, f, L, A, P, g, S, C, T, R, l, y, te, I, x, H, G, W;
81
- const E = class E extends HTMLElement {
79
+ u = new WeakMap(), v = new WeakMap(), J = new WeakMap(), K = new WeakMap();
80
+ var f, V, M, A, O, g, T, P, S, m, C, R, y, x, l, k, se, F, $, H, q, W;
81
+ const L = class L extends HTMLElement {
82
82
  constructor() {
83
83
  super();
84
- i(this, y);
85
- i(this, d);
84
+ i(this, k);
85
+ i(this, f);
86
86
  i(this, V);
87
87
  i(this, M);
88
- i(this, w);
89
- i(this, O);
90
- i(this, f);
91
- i(this, L);
92
88
  i(this, A);
93
- i(this, P);
89
+ i(this, O);
94
90
  i(this, g);
91
+ i(this, T);
92
+ i(this, P);
95
93
  i(this, S);
94
+ i(this, m);
96
95
  i(this, C);
97
- i(this, T);
98
96
  i(this, R);
99
- i(this, l);
97
+ i(this, y);
100
98
  i(this, x);
99
+ i(this, l);
100
+ i(this, $);
101
101
  i(this, H);
102
- i(this, G);
102
+ i(this, q);
103
103
  i(this, W);
104
- this.urlValue = "", h(this, d, !1), h(this, f, new b(this, "--history", !1)), h(this, L, new b(this, "--restore", !1)), h(this, A, new b(this, "--close-rest", !1)), h(this, P, new b(
104
+ this.urlValue = "", h(this, f, !1), h(this, g, new E(this, "--history", !1)), h(this, T, new E(this, "--restore", !1)), h(this, P, new E(this, "--close-rest", !1)), h(this, S, new E(
105
105
  this,
106
106
  "--close-rest-in-group",
107
107
  !1
108
- )), h(this, g, new b(this, "--group", "")), h(this, S, new b(this, "--click-outside", !1)), h(this, C, new b(this, "--escape", !1)), h(this, T, !1), h(this, l, new ie(this, {
108
+ )), h(this, m, new E(this, "--group", "")), h(this, C, new E(this, "--click-outside", !1)), h(this, R, new E(this, "--escape", !1)), h(this, y, !1), h(this, l, new ie(this, {
109
109
  opened: !1,
110
110
  closing: !1,
111
111
  triggered: !1,
112
112
  transitionend: !1
113
- })), h(this, x, () => {
114
- h(this, T, !1), e(this, d) && e(this, f).current && !location.search.includes(this.id) ? this.close() : !e(this, d) && e(this, f).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, T, !0);
113
+ })), h(this, $, () => {
114
+ h(this, y, !1), e(this, f) && e(this, g).current && !location.search.includes(this.id) ? this.close() : !e(this, f) && e(this, g).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, y, !0);
115
115
  }), h(this, H, () => {
116
- this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, G).call(this);
117
- }), h(this, G, re(() => {
116
+ this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, q).call(this);
117
+ }), h(this, q, re(() => {
118
118
  e(this, W).call(this);
119
119
  }, 10)), h(this, W, () => {
120
120
  this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
121
- }), e(this, g).subscribe((t) => {
122
- t.previous && (E.stack.remove(t.previous, this), t.current || (document.documentElement.classList.remove(
121
+ }), e(this, m).subscribe((t) => {
122
+ t.previous && (L.stack.remove(t.previous, this), t.current || (document.documentElement.classList.remove(
123
123
  `${this.group.previous}-closing`
124
124
  ), document.documentElement.classList.remove(
125
125
  `${this.group.previous}-opened`
@@ -130,7 +130,7 @@ const E = class E extends HTMLElement {
130
130
  `${this.group.current}-closing`,
131
131
  t.current.closing
132
132
  );
133
- const s = E.stack.groups.get(this.group.current), o = s == null ? void 0 : s.find((a) => a.opened);
133
+ const s = L.stack.groups.get(this.group.current), o = s == null ? void 0 : s.find((a) => a.opened);
134
134
  document.documentElement.classList.toggle(
135
135
  `${this.group.current}-opened`,
136
136
  !!o
@@ -139,111 +139,111 @@ const E = class E extends HTMLElement {
139
139
  });
140
140
  }
141
141
  get history() {
142
- return e(this, f);
142
+ return e(this, g);
143
143
  }
144
144
  get restore() {
145
- return e(this, L);
145
+ return e(this, T);
146
146
  }
147
147
  get closeRest() {
148
- return e(this, A);
148
+ return e(this, P);
149
149
  }
150
150
  get closeRestInGroup() {
151
- return e(this, P);
151
+ return e(this, S);
152
152
  }
153
153
  get group() {
154
- return e(this, g);
154
+ return e(this, m);
155
155
  }
156
156
  get clickOutside() {
157
- return e(this, S);
157
+ return e(this, C);
158
158
  }
159
159
  get escape() {
160
- return e(this, C);
160
+ return e(this, R);
161
161
  }
162
162
  get opened() {
163
- return e(this, d);
163
+ return e(this, f);
164
164
  }
165
165
  get lastTrigger() {
166
- return e(this, R);
166
+ return e(this, x);
167
167
  }
168
168
  get idWithValue() {
169
169
  return `${this.id}${this.urlValue ? "=" + this.urlValue : ""}`;
170
170
  }
171
171
  updateUrlValue(t) {
172
- this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, d) && oe(this.id, t);
172
+ this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, f) && oe(this.id, t);
173
173
  }
174
174
  open(t) {
175
- if (e(this, d))
175
+ if (e(this, f))
176
176
  return;
177
- h(this, R, t == null ? void 0 : t.trigger), clearTimeout(e(this, V)), clearTimeout(e(this, M)), e(this, l).set("closing", !1), e(this, l).set("triggered", !0), D(this, "popoverTriggered", {
177
+ h(this, x, t == null ? void 0 : t.trigger), clearTimeout(e(this, V)), clearTimeout(e(this, M)), e(this, l).set("closing", !1), e(this, l).set("triggered", !0), j(this, "popoverTriggered", {
178
178
  custom: !0,
179
179
  detail: {
180
- trigger: e(this, R)
180
+ trigger: e(this, x)
181
181
  }
182
- }), e(this, f).current && e(this, T) && history.pushState(history.state, "", e(this, y, te)), h(this, d, !0);
182
+ }), e(this, g).current && e(this, y) && history.pushState(history.state, "", e(this, k, se)), h(this, f, !0);
183
183
  const s = () => {
184
- E.stack.add(e(this, g).current, this), e(this, W).call(this), e(this, l).set("opened", !0), D(this, "popoverOpened", {
184
+ L.stack.add(e(this, m).current, this), e(this, W).call(this), e(this, l).set("opened", !0), j(this, "popoverOpened", {
185
185
  custom: !0,
186
186
  detail: {
187
- trigger: e(this, R)
187
+ trigger: e(this, x)
188
188
  }
189
- }), h(this, w, void 0), h(this, O, setTimeout(() => {
189
+ }), h(this, A, void 0), h(this, O, setTimeout(() => {
190
190
  e(this, l).set("transitionend", !0);
191
- }, _(this) + 10));
191
+ }, ee(this) + 10));
192
192
  };
193
- t != null && t.skipTransition ? s() : h(this, w, setTimeout(s, 10));
193
+ t != null && t.skipTransition ? s() : h(this, A, setTimeout(s, 10));
194
194
  }
195
195
  close() {
196
- e(this, d) && (clearTimeout(e(this, w)), clearTimeout(e(this, O)), E.stack.remove(e(this, g).current, this), h(this, d, !1), v(this, y, I).call(this), e(this, l).set("transitionend", !1), h(this, V, setTimeout(() => {
197
- e(this, l).set("opened", !1), e(this, l).set("closing", !0), D(this, "popoverClosing", {
196
+ e(this, f) && (clearTimeout(e(this, A)), clearTimeout(e(this, O)), L.stack.remove(e(this, m).current, this), h(this, f, !1), b(this, k, F).call(this), e(this, l).set("transitionend", !1), h(this, V, setTimeout(() => {
197
+ e(this, l).set("opened", !1), e(this, l).set("closing", !0), j(this, "popoverClosing", {
198
198
  custom: !0
199
199
  }), h(this, M, setTimeout(() => {
200
- e(this, l).set("triggered", !1), e(this, l).set("closing", !1), D(this, "popoverClosed", {
200
+ e(this, l).set("triggered", !1), e(this, l).set("closing", !1), j(this, "popoverClosed", {
201
201
  custom: !0
202
202
  });
203
- }, _(this) + 10));
203
+ }, ee(this) + 10));
204
204
  }, 10)));
205
205
  }
206
206
  connectedCallback() {
207
- e(this, f).observe(), e(this, L).observe(), e(this, A).observe(), e(this, P).observe(), e(this, g).observe(), e(this, S).observe(), e(this, C).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, x)), setTimeout(() => {
208
- e(this, L).current ? (this.urlValue = he(location.search)[this.id], e(this, x).call(this)) : (v(this, y, I).call(this), h(this, T, !0));
209
- }, 0), ee.subscribe(e(this, H));
207
+ e(this, g).observe(), e(this, T).observe(), e(this, P).observe(), e(this, S).observe(), e(this, m).observe(), e(this, C).observe(), e(this, R).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, $)), setTimeout(() => {
208
+ e(this, T).current ? (this.urlValue = he(location.search)[this.id], e(this, $).call(this)) : (b(this, k, F).call(this), h(this, y, !0));
209
+ }, 0), te.subscribe(e(this, H));
210
210
  }
211
211
  disconnectedCallback() {
212
- E.stack.remove(e(this, g).current, this), ee.unsubscribe(e(this, H)), e(this, l).close(), e(this, f).close(), e(this, L).close(), e(this, A).close(), e(this, P).close(), e(this, g).close(), e(this, S).close(), e(this, C).close(), this.removeAttribute("role"), clearTimeout(e(this, V)), clearTimeout(e(this, M)), clearTimeout(e(this, w)), clearTimeout(e(this, O)), removeEventListener("popstate", e(this, x)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), v(this, y, I).call(this);
212
+ L.stack.remove(e(this, m).current, this), te.unsubscribe(e(this, H)), e(this, l).close(), e(this, g).close(), e(this, T).close(), e(this, P).close(), e(this, S).close(), e(this, m).close(), e(this, C).close(), e(this, R).close(), this.removeAttribute("role"), clearTimeout(e(this, V)), clearTimeout(e(this, M)), clearTimeout(e(this, A)), clearTimeout(e(this, O)), removeEventListener("popstate", e(this, $)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), b(this, k, F).call(this);
213
213
  }
214
214
  };
215
- d = new WeakMap(), V = new WeakMap(), M = new WeakMap(), w = new WeakMap(), O = new WeakMap(), f = new WeakMap(), L = new WeakMap(), A = new WeakMap(), P = new WeakMap(), g = new WeakMap(), S = new WeakMap(), C = new WeakMap(), T = new WeakMap(), R = new WeakMap(), l = new WeakMap(), y = new WeakSet(), te = function() {
215
+ f = new WeakMap(), V = new WeakMap(), M = new WeakMap(), A = new WeakMap(), O = new WeakMap(), g = new WeakMap(), T = new WeakMap(), P = new WeakMap(), S = new WeakMap(), m = new WeakMap(), C = new WeakMap(), R = new WeakMap(), y = new WeakMap(), x = new WeakMap(), l = new WeakMap(), k = new WeakSet(), se = function() {
216
216
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
217
- }, I = function() {
218
- if (e(this, f).current) {
217
+ }, F = function() {
218
+ if (e(this, g).current) {
219
219
  const t = new URL(location.href);
220
220
  t.searchParams.delete(this.id), history.replaceState(history.state, "", t.href);
221
221
  }
222
- }, x = new WeakMap(), H = new WeakMap(), G = new WeakMap(), W = new WeakMap(), E.stack = new ne();
223
- let j = E;
224
- Y && !customElements.get("e-popover") && customElements.define("e-popover", j);
225
- var n, p, k, Q, z, q, B, U, X;
222
+ }, $ = new WeakMap(), H = new WeakMap(), q = new WeakMap(), W = new WeakMap(), L.stack = new ne();
223
+ let I = L;
224
+ Z && !customElements.get("e-popover") && customElements.define("e-popover", I);
225
+ var n, d, w, X, z, B, U, D, Y;
226
226
  class ce extends HTMLElement {
227
227
  constructor() {
228
228
  super();
229
- i(this, k);
229
+ i(this, w);
230
230
  i(this, n);
231
- i(this, p, new b(this, "--type", "open"));
231
+ i(this, d, new E(this, "--type", "open"));
232
232
  i(this, z, () => {
233
- e(this, p).current !== "close" && this.classList.add("triggered");
234
- });
235
- i(this, q, () => {
236
- e(this, p).current !== "close" && (this.classList.add("opened"), this.setAttribute("aria-expanded", "true"));
233
+ e(this, d).current !== "close" && this.classList.add("triggered");
237
234
  });
238
235
  i(this, B, () => {
239
- e(this, p).current !== "close" && this.classList.remove("opened");
236
+ e(this, d).current !== "close" && (this.classList.add("opened"), this.setAttribute("aria-expanded", "true"));
240
237
  });
241
238
  i(this, U, () => {
242
- e(this, p).current !== "close" && (this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false"));
239
+ e(this, d).current !== "close" && this.classList.remove("opened");
240
+ });
241
+ i(this, D, () => {
242
+ e(this, d).current !== "close" && (this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false"));
243
243
  });
244
- Y && (this.addEventListener("click", () => {
244
+ Z && (this.addEventListener("click", () => {
245
245
  if (e(this, n)) {
246
- const t = e(this, p).current;
246
+ const t = e(this, d).current;
247
247
  t === "open" || t === "toggle" && !e(this, n).opened ? e(this, n).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, n).opened) && e(this, n).close();
248
248
  }
249
249
  }), this.addEventListener("keydown", (t) => {
@@ -251,73 +251,84 @@ class ce extends HTMLElement {
251
251
  }));
252
252
  }
253
253
  get type() {
254
- return e(this, p);
254
+ return e(this, d);
255
255
  }
256
256
  get popoverElement() {
257
257
  return e(this, n);
258
258
  }
259
259
  changePopover(t) {
260
260
  var s;
261
- if (v(this, k, Q).call(this), t) {
261
+ if (b(this, w, X).call(this), t) {
262
262
  let o = null;
263
263
  if (t === "parent") {
264
264
  const a = this.closest("[data-popover]");
265
265
  if (a)
266
266
  o = a;
267
267
  else {
268
- const $ = this.getRootNode();
269
- $ instanceof ShadowRoot ? o = $.host.closest("[data-popover]") : $ instanceof HTMLElement && (o = $.closest("[data-popover]"));
268
+ const p = this.getRootNode();
269
+ p instanceof ShadowRoot ? o = p.host.closest("[data-popover]") : p instanceof HTMLElement && (o = p.closest("[data-popover]"));
270
270
  }
271
- } else t === "sibling" ? o = (s = this.parentElement) == null ? void 0 : s.querySelector("[data-popover]") : (!t.startsWith(".") && !t.startsWith("[") && (t = `#${t}`), o = document.querySelector(t) || this.getRootNode().querySelector(t));
271
+ } else if (t === "sibling")
272
+ o = (s = this.parentElement) == null ? void 0 : s.querySelector("[data-popover]");
273
+ else if (t === "ancestor-child") {
274
+ const a = (p) => {
275
+ if (!p)
276
+ return null;
277
+ let G = p.querySelector("[data-popover]");
278
+ return !G && (p != null && p.parentElement) && (G = a(p.parentElement)), G;
279
+ };
280
+ o = a(this.parentElement) || null;
281
+ } else
282
+ !t.startsWith(".") && !t.startsWith("[") && (t = `#${t}`), o = document.querySelector(t) || this.getRootNode().querySelector(t);
272
283
  o instanceof HTMLElement ? (h(this, n, o), e(this, n).addEventListener(
273
284
  "popoverTriggered",
274
285
  e(this, z)
275
286
  ), e(this, n).addEventListener(
276
287
  "popoverOpened",
277
- e(this, q)
288
+ e(this, B)
278
289
  ), e(this, n).addEventListener(
279
290
  "popoverClosing",
280
- e(this, B)
291
+ e(this, U)
281
292
  ), e(this, n).addEventListener(
282
293
  "popoverClosed",
283
- e(this, U)
294
+ e(this, D)
284
295
  )) : console.warn(this, `target ${t} not found`);
285
296
  }
286
- v(this, k, X).call(this, e(this, p).current);
297
+ b(this, w, Y).call(this, e(this, d).current);
287
298
  }
288
299
  connectedCallback() {
289
- e(this, p).subscribe((s) => {
290
- v(this, k, X).call(this, s.current);
300
+ e(this, d).subscribe((s) => {
301
+ b(this, w, Y).call(this, s.current);
291
302
  }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
292
303
  const t = this.getAttribute("target");
293
- t && this.changePopover(t), this.isConnected && e(this, p).observe();
304
+ t && this.changePopover(t), this.isConnected && e(this, d).observe();
294
305
  }
295
306
  disconnectedCallback() {
296
- e(this, p).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), v(this, k, Q).call(this);
307
+ e(this, d).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), b(this, w, X).call(this);
297
308
  }
298
309
  }
299
- n = new WeakMap(), p = new WeakMap(), k = new WeakSet(), Q = function() {
310
+ n = new WeakMap(), d = new WeakMap(), w = new WeakSet(), X = function() {
300
311
  e(this, n) && (e(this, n).removeEventListener(
301
312
  "popoverTriggered",
302
313
  e(this, z)
303
314
  ), e(this, n).removeEventListener(
304
315
  "popoverOpened",
305
- e(this, q)
316
+ e(this, B)
306
317
  ), e(this, n).removeEventListener(
307
318
  "popoverClosing",
308
- e(this, B)
319
+ e(this, U)
309
320
  ), e(this, n).removeEventListener(
310
321
  "popoverClosed",
311
- e(this, U)
322
+ e(this, D)
312
323
  ));
313
- }, z = new WeakMap(), q = new WeakMap(), B = new WeakMap(), U = new WeakMap(), X = function(t) {
314
- e(this, n) instanceof j && (t !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
324
+ }, z = new WeakMap(), B = new WeakMap(), U = new WeakMap(), D = new WeakMap(), Y = function(t) {
325
+ e(this, n) instanceof I && (t !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
315
326
  "aria-expanded",
316
327
  e(this, n).opened ? "true" : "false"
317
328
  ), this.setAttribute("aria-controls", e(this, n).id || "")) : (this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
318
329
  };
319
- Y && !customElements.get("e-popover-button") && customElements.define("e-popover-button", ce);
330
+ Z && !customElements.get("e-popover-button") && customElements.define("e-popover-button", ce);
320
331
  export {
321
332
  ce as PopoverButtonElement,
322
- j as PopoverElement
333
+ I as PopoverElement
323
334
  };
@@ -1 +1 @@
1
- "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var _e=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,He=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||_e("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?_e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),he=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-B8bmTxAr.cjs"),hs=require("../Tweened-BsL9FamJ.cjs"),we=require("../controls/index.cjs"),_t=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ue=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,Ht,g,ae,de,Ct,V,et,vt,Pt,oe;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,Ht);s(this,g);s(this,ae,0);s(this,de,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,Ht,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ht))}get element(){return t(this,p)}get index(){return t(this,Ht)}get size(){return t(this,Ct)}get width(){return t(this,ae)}get height(){return t(this,de)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.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,g).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,ae,t(this,p).offsetWidth),h(this,de,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}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),he.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){c(this,Pt,oe).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,oe).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,oe).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,oe).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ht=new WeakMap,g=new WeakMap,ae=new WeakMap,de=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,oe=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 as=We.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:"100%",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 a,Et,w,st,_,H,$,M,it,rt,W,nt,wt,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,Se,pe,C,m,k,q,dt,D,E,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,le,Ot,ze,Le,Me,Te,z,fe,Ge,jt,be,qe,De,gt,Ze,me,ce,ge;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new d.CSSProperty(this,"--controls",!0));s(this,w,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,_,new d.CSSProperty(this,"--direction",0));s(this,H,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,Se,0);s(this,pe,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,E,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!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,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ce).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,jt,(e,i)=>{t(this,Et).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,be).call(this,e,i))});s(this,be,(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,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,ce).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={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,Ut)?this.scrollToSection(c(this,o,ce).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,me,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ge,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];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,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}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,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,Se)}get contentPosition(){return t(this,pe)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,le).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,ce).call(this),Bt=t(this,l)[Ie];let ne=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?(I=t(this,m)+t(this,C)-b.position+t(this,k),ne=0):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-ne,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,He({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,pe,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,me).call(this),he.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new we.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new we.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new we.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,E,new we.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,be)),t(this,w).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,le).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),_t.windowResizer.subscribe(t(this,ge),xe.RESIZE_ORDER.LAST),ue.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),_t.windowResizer.unsubscribe(t(this,ge)),ue.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,Se=new WeakMap,pe=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,w).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},le=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,fe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,fe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),_t.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,fe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,be=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),he.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,me).call(this)}}},Ze=function(){if(t(this,R).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 u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},me=new WeakMap,ce=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let ne=Math.abs(Bt+Ie-i);ne<=r&&(r=ne,u=y)}return u},ge=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ye;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ye,null)}get scrollElement(){return t(this,ye)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ye,e):console.error(this,"e-scroll not found")}}ye=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,Ce,ve;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{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,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,Ce,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ve,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.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,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,ve)),_t.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ue.elementResizer.subscribe(this,t(this,ft)),ue.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Ce))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,ve)),_t.windowResizer.unsubscribe(t(this,ft)),ue.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Ce))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,Ce=new WeakMap,ve=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{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,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,Pe,Ee,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,Pe,null);s(this,Ee,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,Pe)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,Pe,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,Ee)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,Ee)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,Pe=new WeakMap,Ee=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.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 ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}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,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(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 Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
1
+ "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var _e=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,He=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||_e("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?_e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),he=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-B8bmTxAr.cjs"),hs=require("../Tweened-BsL9FamJ.cjs"),Ee=require("../controls/index.cjs"),_t=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ue=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,Ht,g,ae,de,Ct,V,et,vt,Pt,oe;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,Ht);s(this,g);s(this,ae,0);s(this,de,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,Ht,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ht))}get element(){return t(this,p)}get index(){return t(this,Ht)}get size(){return t(this,Ct)}get width(){return t(this,ae)}get height(){return t(this,de)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.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,g).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,ae,t(this,p).offsetWidth),h(this,de,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}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),he.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){c(this,Pt,oe).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,oe).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,oe).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,oe).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ht=new WeakMap,g=new WeakMap,ae=new WeakMap,de=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,oe=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 as=We.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 a,wt,E,st,_,H,$,M,it,rt,W,nt,Et,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,Se,pe,C,m,k,q,dt,D,w,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,le,Ot,ze,Le,Me,Te,z,fe,Ge,jt,be,qe,De,gt,Ze,me,ce,ge;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,wt,new d.CSSProperty(this,"--controls",!0));s(this,E,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,_,new d.CSSProperty(this,"--direction",0));s(this,H,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,Se,0);s(this,pe,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,w,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!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,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ce).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,E).current,e)});s(this,jt,(e,i)=>{t(this,wt).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,be).call(this,e,i))});s(this,be,(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,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,ce).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={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,Ut)?this.scrollToSection(c(this,o,ce).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,me,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ge,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];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,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,E)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}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,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,Se)}get contentPosition(){return t(this,pe)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,E).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,E).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,E).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,le).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,ce).call(this),Bt=t(this,l)[Ie];let ne=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?(I=t(this,m)+t(this,C)-b.position+t(this,k),ne=0):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-ne,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,He({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,pe,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,me).call(this),he.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new Ee.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new Ee.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new Ee.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,w,new Ee.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,be)),t(this,E).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,E).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,le).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).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,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,wt).observe(),t(this,E).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),_t.windowResizer.subscribe(t(this,ge),xe.RESIZE_ORDER.LAST),ue.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,E).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),_t.windowResizer.unsubscribe(t(this,ge)),ue.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,wt=new WeakMap,E=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,Et=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,Se=new WeakMap,pe=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,E).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},le=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,fe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,fe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),_t.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,fe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,be=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),he.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,me).call(this)}}},Ze=function(){if(t(this,R).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 u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},me=new WeakMap,ce=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let ne=Math.abs(Bt+Ie-i);ne<=r&&(r=ne,u=y)}return u},ge=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ye;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ye,null)}get scrollElement(){return t(this,ye)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ye,e):console.error(this,"e-scroll not found")}}ye=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,Ce,ve;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{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,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,Ce,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ve,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.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,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,ve)),_t.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ue.elementResizer.subscribe(this,t(this,ft)),ue.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Ce))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,ve)),_t.windowResizer.unsubscribe(t(this,ft)),ue.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Ce))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,Ce=new WeakMap,ve=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{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,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,Pe,we,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,Pe,null);s(this,we,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,Pe)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,Pe,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,we)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,we)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,Pe=new WeakMap,we=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.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 ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}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,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(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 Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
@@ -37,10 +37,10 @@ import { elementResizer as ce } from "../element-resizer/index.js";
37
37
  import { s as cs } from "../gestures-CcXV6fCp.js";
38
38
  import { b as Ue } from "../dom-CVWzyXPH.js";
39
39
  import { ScrollSegmentElement as as } from "../scroll-segment/index.js";
40
- var f, Bt, g, ae, ue, yt, $, et, Ct, xt, he;
40
+ var f, Bt, g, ae, ue, yt, $, et, Ct, wt, he;
41
41
  class us {
42
42
  constructor(n, e, i) {
43
- s(this, xt);
43
+ s(this, wt);
44
44
  s(this, f);
45
45
  s(this, Bt);
46
46
  s(this, g);
@@ -110,19 +110,19 @@ class us {
110
110
  t(this, f).classList.toggle("middle", n);
111
111
  }
112
112
  setIndex(n) {
113
- c(this, xt, he).call(this, "index", n);
113
+ c(this, wt, he).call(this, "index", n);
114
114
  }
115
115
  setCurrentIndex(n) {
116
- c(this, xt, he).call(this, "current-index", n);
116
+ c(this, wt, he).call(this, "current-index", n);
117
117
  }
118
118
  setCurrentIndexArc(n) {
119
- c(this, xt, he).call(this, "current-index-arc", n);
119
+ c(this, wt, he).call(this, "current-index-arc", n);
120
120
  }
121
121
  setCurrentIndexArcAbs(n) {
122
- c(this, xt, he).call(this, "current-index-arc-abs", n);
122
+ c(this, wt, he).call(this, "current-index-arc-abs", n);
123
123
  }
124
124
  }
125
- f = new WeakMap(), Bt = new WeakMap(), g = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), xt = new WeakSet(), he = function(n, e) {
125
+ f = new WeakMap(), Bt = new WeakMap(), g = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), wt = new WeakSet(), he = function(n, e) {
126
126
  e !== null ? (t(this, f).style.setProperty(`--${n}`, e.toString()), t(this, f).setAttribute(`data-${n}`, e.toString())) : (t(this, f).style.removeProperty(`--${n}`), t(this, f).removeAttribute(`data-${n}`));
127
127
  };
128
128
  const ds = Ne({
@@ -141,8 +141,8 @@ const ds = Ne({
141
141
  height: "var(--static-height, 100%)"
142
142
  },
143
143
  ".content-wrapper": {
144
- width: "100%",
145
- height: "100%",
144
+ width: "var(--content-wrapper-width, 100%)",
145
+ height: "var(--content-wrapper-height, 100%)",
146
146
  overflow: "var(--overflow, initial)",
147
147
  borderRadius: "var(--border-radius, unset)"
148
148
  },
@@ -164,13 +164,13 @@ const ds = Ne({
164
164
  flexShrink: "0"
165
165
  }
166
166
  });
167
- var u, wt, E, st, B, W, F, T, it, rt, N, nt, Et, D, C, Pt, Lt, zt, It, Wt, kt, A, At, ht, M, ot, q, Mt, lt, Tt, ct, at, ut, m, Ft, l, de, pe, y, S, k, R, dt, V, w, P, Nt, U, G, K, _, qt, pt, Z, Ut, O, x, Gt, j, Dt, Kt, o, Me, oe, Ot, we, Ee, Te, De, L, fe, Ge, _t, me, Re, Ve, gt, Ke, be, le, Se;
167
+ var u, xt, E, st, B, W, F, T, it, rt, N, nt, Et, D, C, Pt, Lt, zt, It, Wt, kt, A, At, ht, M, ot, q, Mt, lt, Tt, ct, at, ut, m, Ft, l, de, pe, y, S, k, R, dt, V, x, P, Nt, U, G, K, _, qt, pt, Z, Ut, O, w, Gt, j, Dt, Kt, o, Me, oe, Ot, xe, Ee, Te, De, L, fe, Ge, _t, me, Re, Ve, gt, Ke, be, le, Se;
168
168
  class $t extends HTMLElement {
169
169
  constructor() {
170
170
  super();
171
171
  s(this, o);
172
172
  s(this, u, null);
173
- s(this, wt, new d(this, "--controls", !0));
173
+ s(this, xt, new d(this, "--controls", !0));
174
174
  s(this, E, new d(this, "--axis", "y"));
175
175
  s(this, st, new d(this, "--reverse", !1));
176
176
  s(this, B, new d(this, "--direction", 0));
@@ -260,7 +260,7 @@ class $t extends HTMLElement {
260
260
  s(this, R, null);
261
261
  s(this, dt, null);
262
262
  s(this, V, null);
263
- s(this, w, null);
263
+ s(this, x, null);
264
264
  s(this, P, new Qe(0));
265
265
  s(this, Nt, 0);
266
266
  s(this, U, 0);
@@ -272,7 +272,7 @@ class $t extends HTMLElement {
272
272
  s(this, Z, new is());
273
273
  s(this, Ut, !1);
274
274
  s(this, O, null);
275
- s(this, x, !1);
275
+ s(this, w, !1);
276
276
  s(this, Gt, null);
277
277
  s(this, j, []);
278
278
  s(this, Dt, !1);
@@ -301,7 +301,7 @@ class $t extends HTMLElement {
301
301
  );
302
302
  });
303
303
  s(this, _t, (e, i) => {
304
- t(this, wt).current && (c(this, o, Re).call(this, Math.sign(i) || 1), t(this, me).call(this, e, i));
304
+ t(this, xt).current && (c(this, o, Re).call(this, Math.sign(i) || 1), t(this, me).call(this, e, i));
305
305
  });
306
306
  s(this, me, (e, i) => {
307
307
  if (t(this, B).current) {
@@ -346,7 +346,7 @@ class $t extends HTMLElement {
346
346
  }, 10));
347
347
  }, 20));
348
348
  s(this, Se, () => {
349
- h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, De).call(this);
349
+ h(this, w, !0), this.hibernatedCSSProperty.current || c(this, o, De).call(this);
350
350
  });
351
351
  if (H) {
352
352
  const e = this.attachShadow({ mode: "open" });
@@ -363,7 +363,7 @@ class $t extends HTMLElement {
363
363
  return t(this, u);
364
364
  }
365
365
  get controlsCSSProperty() {
366
- return t(this, wt);
366
+ return t(this, xt);
367
367
  }
368
368
  get axisCSSProperty() {
369
369
  return t(this, E);
@@ -612,7 +612,7 @@ class $t extends HTMLElement {
612
612
  t(this, u).set(e * t(this, S), {
613
613
  equalize: !0
614
614
  });
615
- h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || c(this, o, Ee).call(this) : c(this, o, we).call(this), t(this, be).call(this), ne(this, "scrollResize", { custom: !0 }), t(this, u).notify();
615
+ h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || c(this, o, Ee).call(this) : c(this, o, xe).call(this), t(this, be).call(this), ne(this, "scrollResize", { custom: !0 }), t(this, u).notify();
616
616
  }
617
617
  connectedCallback() {
618
618
  vt.register(this), h(this, u, new ss(0, {
@@ -626,9 +626,9 @@ class $t extends HTMLElement {
626
626
  ), h(this, V, new hs({
627
627
  element: t(this, m),
628
628
  rootElement: this
629
- })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, w, new os({
629
+ })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, x, new os({
630
630
  culling: this
631
- })), t(this, w).changeEvent.subscribe(t(this, me)), t(this, E).subscribe(() => {
631
+ })), t(this, x).changeEvent.subscribe(t(this, me)), t(this, E).subscribe(() => {
632
632
  c(this, o, Me).call(this);
633
633
  }), t(this, st).subscribe(() => {
634
634
  c(this, o, Me).call(this);
@@ -637,17 +637,17 @@ class $t extends HTMLElement {
637
637
  }), t(this, Et).subscribe((e) => {
638
638
  t(this, V).inertion = typeof e.current == "number" ? e.current : 1;
639
639
  }), t(this, W).subscribe(() => {
640
- t(this, x) && t(this, L).call(this);
640
+ t(this, w) && t(this, L).call(this);
641
641
  }), t(this, F).subscribe(({ current: e }) => {
642
- t(this, x) && (e ? c(this, o, oe).call(this) : c(this, o, Ot).call(this));
642
+ t(this, w) && (e ? c(this, o, oe).call(this) : c(this, o, Ot).call(this));
643
643
  }), t(this, T).subscribe((e) => {
644
- t(this, R).debounce = e.current, t(this, V).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ot).call(this));
644
+ t(this, R).debounce = e.current, t(this, V).swipe = e.current, t(this, x).interval = e.current, t(this, w) && (e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ot).call(this));
645
645
  }), t(this, N).subscribe((e) => {
646
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ot).call(this));
646
+ t(this, w) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ot).call(this));
647
647
  }), t(this, D).subscribe((e) => {
648
- t(this, x) && (t(this, L).call(this), c(this, o, gt).call(this));
648
+ t(this, w) && (t(this, L).call(this), c(this, o, gt).call(this));
649
649
  }), t(this, C).subscribe((e) => {
650
- e.current ? (t(this, x) && (t(this, l).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Nt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
650
+ e.current ? (t(this, w) && (t(this, l).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Nt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
651
651
  }), t(this, Pt).subscribe((e) => {
652
652
  t(this, u).damping = e.current;
653
653
  }), t(this, Lt).subscribe((e) => {
@@ -655,17 +655,17 @@ class $t extends HTMLElement {
655
655
  }), t(this, zt).subscribe((e) => {
656
656
  t(this, u).stiffness = e.current;
657
657
  }), t(this, A).subscribe((e) => {
658
- t(this, w).speed = e.current, !t(this, K) && e.current && !e.previous ? t(this, w).connect() : !e.current && e.previous && t(this, w).disconnect();
658
+ t(this, x).speed = e.current, !t(this, K) && e.current && !e.previous ? t(this, x).connect() : !e.current && e.previous && t(this, x).disconnect();
659
659
  }), t(this, ht).subscribe((e) => {
660
- e.current || (t(this, w).direction = 1);
660
+ e.current || (t(this, x).direction = 1);
661
661
  }), t(this, M).subscribe((e) => {
662
- t(this, x) && c(this, o, gt).call(this);
662
+ t(this, w) && c(this, o, gt).call(this);
663
663
  }), t(this, ot).subscribe((e) => {
664
- t(this, x) && t(this, M).current && c(this, o, gt).call(this);
664
+ t(this, w) && t(this, M).current && c(this, o, gt).call(this);
665
665
  }), t(this, q).subscribe((e) => {
666
- t(this, x) && t(this, M).current && c(this, o, gt).call(this);
666
+ t(this, w) && t(this, M).current && c(this, o, gt).call(this);
667
667
  }), t(this, Mt).subscribe((e) => {
668
- t(this, x) && t(this, u).notify();
668
+ t(this, w) && t(this, u).notify();
669
669
  }), t(this, u).isRunning.subscribe((e) => {
670
670
  this.classList.toggle("active", e.current);
671
671
  }), t(this, P).subscribe((e) => {
@@ -673,18 +673,18 @@ class $t extends HTMLElement {
673
673
  }), t(this, Z).subscribe((e) => {
674
674
  t(this, Z).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
675
675
  }), t(this, ct).subscribe((e) => {
676
- e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, we).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, Ee).call(this));
676
+ e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, xe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, Ee).call(this));
677
677
  }), t(this, at).subscribe((e) => {
678
678
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Te).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, De).call(this));
679
- }), t(this, wt).observe(), t(this, E).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, Et).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, It).observe(), t(this, Wt).observe(), t(this, kt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, At).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, Mt).observe(), t(this, lt).observe(), t(this, Tt).observe(), t(this, ct).observe(), t(this, at).observe(), Ht.subscribe(t(this, Se), Ae.LAST), ce.subscribe(this, t(this, L)), t(this, Gt).observe(this, { childList: !0 });
679
+ }), t(this, xt).observe(), t(this, E).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, Et).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, It).observe(), t(this, Wt).observe(), t(this, kt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, At).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, Mt).observe(), t(this, lt).observe(), t(this, Tt).observe(), t(this, ct).observe(), t(this, at).observe(), Ht.subscribe(t(this, Se), Ae.LAST), ce.subscribe(this, t(this, L)), t(this, Gt).observe(this, { childList: !0 });
680
680
  }
681
681
  disconnectedCallback() {
682
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, E).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, Et).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, Wt).unobserve(), t(this, kt).unobserve(), t(this, A).unobserve(), t(this, At).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, Mt).unobserve(), t(this, lt).unobserve(), t(this, Tt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Ht.unsubscribe(t(this, Se)), ce.unsubscribe(t(this, L)), c(this, o, Te).call(this), t(this, Gt).disconnect();
682
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, xt).unobserve(), t(this, E).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, Et).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, Wt).unobserve(), t(this, kt).unobserve(), t(this, A).unobserve(), t(this, At).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, Mt).unobserve(), t(this, lt).unobserve(), t(this, Tt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Ht.unsubscribe(t(this, Se)), ce.unsubscribe(t(this, L)), c(this, o, Te).call(this), t(this, Gt).disconnect();
683
683
  }
684
684
  }
685
- u = new WeakMap(), wt = new WeakMap(), E = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), Et = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), kt = new WeakMap(), A = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), Mt = new WeakMap(), lt = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), Ft = new WeakMap(), l = new WeakMap(), de = new WeakMap(), pe = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), R = new WeakMap(), dt = new WeakMap(), V = new WeakMap(), w = new WeakMap(), P = new WeakMap(), Nt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), qt = new WeakMap(), pt = new WeakMap(), Z = new WeakMap(), Ut = new WeakMap(), O = new WeakMap(), x = new WeakMap(), Gt = new WeakMap(), j = new WeakMap(), Dt = new WeakMap(), Kt = new WeakMap(), o = new WeakSet(), Me = function() {
685
+ u = new WeakMap(), xt = new WeakMap(), E = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), Et = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), kt = new WeakMap(), A = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), Mt = new WeakMap(), lt = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), Ft = new WeakMap(), l = new WeakMap(), de = new WeakMap(), pe = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), R = new WeakMap(), dt = new WeakMap(), V = new WeakMap(), x = new WeakMap(), P = new WeakMap(), Nt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), qt = new WeakMap(), pt = new WeakMap(), Z = new WeakMap(), Ut = new WeakMap(), O = new WeakMap(), w = new WeakMap(), Gt = new WeakMap(), j = new WeakMap(), Dt = new WeakMap(), Kt = new WeakMap(), o = new WeakSet(), Me = function() {
686
686
  const e = t(this, E).current, i = t(this, st).current ? "-reverse" : "";
687
- t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, R).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, V).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
687
+ t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, R).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, V).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, w) && t(this, L).call(this);
688
688
  }, oe = function() {
689
689
  c(this, o, Ot).call(this), t(this, Ft).assignedElements().forEach((e, i) => {
690
690
  e instanceof HTMLElement && t(this, l).push(new us(e, i, this));
@@ -699,14 +699,14 @@ u = new WeakMap(), wt = new WeakMap(), E = new WeakMap(), st = new WeakMap(), B
699
699
  custom: !0,
700
700
  composed: !0
701
701
  });
702
- }, we = function() {
703
- t(this, K) || (h(this, K, !0), t(this, u).unsubscribe(t(this, fe)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, qt)), clearInterval(t(this, pt)), t(this, Z).unlistenAnimationFrame(), t(this, R).disconnect(), t(this, dt).disconnect(), t(this, V).disconnect(), t(this, w).disconnect(), t(this, G) || (this.sections.forEach((e) => {
702
+ }, xe = function() {
703
+ t(this, K) || (h(this, K, !0), t(this, u).unsubscribe(t(this, fe)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, qt)), clearInterval(t(this, pt)), t(this, Z).unlistenAnimationFrame(), t(this, R).disconnect(), t(this, dt).disconnect(), t(this, V).disconnect(), t(this, x).disconnect(), t(this, G) || (this.sections.forEach((e) => {
704
704
  e.unsetTransform();
705
705
  }), t(this, L).call(this)));
706
706
  }, Ee = function() {
707
- t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, fe), -1e4), t(this, u).notify(), t(this, R).connect(), t(this, dt).connect(), t(this, V).connect(), t(this, A).current && t(this, w).connect());
707
+ t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, fe), -1e4), t(this, u).notify(), t(this, R).connect(), t(this, dt).connect(), t(this, V).connect(), t(this, A).current && t(this, x).connect());
708
708
  }, Te = function() {
709
- t(this, _) || (h(this, _, !0), clearTimeout(t(this, Kt)), Ht.unsubscribe(t(this, L)), c(this, o, we).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Ot).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
709
+ t(this, _) || (h(this, _, !0), clearTimeout(t(this, Kt)), Ht.unsubscribe(t(this, L)), c(this, o, xe).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Ot).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
710
710
  }, De = function() {
711
711
  t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, Ee).call(this), this.scrollToSection(t(this, kt).current, {
712
712
  behaviour: "instant"
@@ -715,7 +715,7 @@ u = new WeakMap(), wt = new WeakMap(), E = new WeakMap(), st = new WeakMap(), B
715
715
  let i = t(this, P).current;
716
716
  return t(this, C).current ? i = ts(e, t(this, l).length) : i = qe(e, 0, this.limit), i;
717
717
  }, _t = new WeakMap(), me = new WeakMap(), Re = function(e = 1) {
718
- t(this, ht).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
718
+ t(this, ht).current && (t(this, x).direction = e), t(this, A).current && t(this, x).pauseAndContinue(
719
719
  t(this, At).current,
720
720
  this.sectionalCSSProperty.current
721
721
  );
@@ -929,14 +929,14 @@ class ms extends _e {
929
929
  }
930
930
  X = new WeakMap(), ee = new WeakMap();
931
931
  H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ms);
932
- var Y, bt, se, Ce, xe, ie;
932
+ var Y, bt, se, Ce, we, ie;
933
933
  class bs {
934
934
  constructor(n, e, i) {
935
935
  s(this, Y, null);
936
936
  s(this, bt, null);
937
937
  s(this, se, null);
938
938
  s(this, Ce, null);
939
- s(this, xe, () => {
939
+ s(this, we, () => {
940
940
  t(this, bt).scrollToSection(t(this, se), {
941
941
  behaviour: t(this, Ce)
942
942
  });
@@ -947,16 +947,16 @@ class bs {
947
947
  t(this, bt).counter.current === t(this, se)
948
948
  );
949
949
  });
950
- H && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, Ce, i), h(this, se, e), t(this, Y).addEventListener("click", t(this, xe)), t(this, bt).counter.subscribe(t(this, ie)), t(this, ie).call(this));
950
+ H && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, Ce, i), h(this, se, e), t(this, Y).addEventListener("click", t(this, we)), t(this, bt).counter.subscribe(t(this, ie)), t(this, ie).call(this));
951
951
  }
952
952
  get element() {
953
953
  return t(this, Y);
954
954
  }
955
955
  destroy() {
956
- t(this, Y).removeEventListener("click", t(this, xe)), t(this, bt).counter.unsubscribe(t(this, ie)), t(this, Y).remove();
956
+ t(this, Y).removeEventListener("click", t(this, we)), t(this, bt).counter.unsubscribe(t(this, ie)), t(this, Y).remove();
957
957
  }
958
958
  }
959
- Y = new WeakMap(), bt = new WeakMap(), se = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), ie = new WeakMap();
959
+ Y = new WeakMap(), bt = new WeakMap(), se = new WeakMap(), Ce = new WeakMap(), we = new WeakMap(), ie = new WeakMap();
960
960
  var Rt, St, tt;
961
961
  class Ss extends Oe {
962
962
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.57.2",
3
+ "version": "0.57.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"