aptechka 0.80.2 → 0.81.1

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 he=c=>{throw TypeError(c)};var se=(c,n,t)=>n.has(c)||he("Cannot "+t);var e=(c,n,t)=>(se(c,n,"read from private field"),t?t.call(c):n.get(c)),r=(c,n,t)=>n.has(c)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(se(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),p=(c,n,t)=>(se(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("../element-linked-store/index.cjs"),y=require("../css-property/index.cjs"),oe=require("../index-CKTweR3M.cjs"),W=require("../events-KVanG9sR.cjs"),ge=require("../function-MthRj-GJ.cjs"),le=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ce=require("../url-C2kASACG.cjs"),ae=require("../window-resizer/index.cjs"),Z=require("../Viewport-Cx50Hufs.cjs");var f,w,ee,te;class ve{constructor(){r(this,f,new Map);r(this,w,[]);r(this,ee,n=>{var s;const t=[...e(this,w)].reverse().find(i=>i.clickOutside.current);if(t){const i=n.composedPath();if(i.find(Q=>Q instanceof HTMLElement&&Q.hasAttribute("data-popover-content")))return;const l=i[0],d=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),L=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!d||L)&&t.close()}});r(this,te,n=>{if(n.code==="Escape"){const t=[...e(this,w)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,ee)),addEventListener("keydown",e(this,te))}get groups(){return e(this,f)}get stack(){return e(this,w)}add(n,t){if(t.closeRest.current)e(this,f).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,f).get(n);i==null||i.forEach(l=>{l.close()})}let s=e(this,f).get(n);s!=null&&s.length||(s=[],e(this,f).set(n,s)),e(this,w).push(t),s.push(t)}remove(n,t){if(setTimeout(()=>{o(this,w,e(this,w).filter(s=>s!==t))}),t.closeRest.current){let s=[];e(this,f).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,f).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,f).get(n);e(this,f).delete(n),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,f).get(n);s&&(s=s.filter(i=>i!==t),e(this,f).set(n,s))}}}f=new WeakMap,w=new WeakMap,ee=new WeakMap,te=new WeakMap;var v,B,H,R,G,m,T,P,q,$,b,V,O,k,E,z,a,M,D,u,ue,S,_,F,A,I,X,U;const C=class C extends HTMLElement{constructor(){super();r(this,u);r(this,v);r(this,B);r(this,H);r(this,R);r(this,G);r(this,m);r(this,T);r(this,P);r(this,q);r(this,$);r(this,b);r(this,V);r(this,O);r(this,k);r(this,E);r(this,z);r(this,a);r(this,M);r(this,D);r(this,F);r(this,A);r(this,I);r(this,X);r(this,U);this.urlValue="",o(this,v,!1),o(this,m,new y.CSSProperty(this,"--history",!1)),o(this,T,new y.CSSProperty(this,"--restore",!1)),o(this,P,new y.CSSProperty(this,"--dispatch-resize",!1)),o(this,q,new y.CSSProperty(this,"--close-rest",!1)),o(this,$,new y.CSSProperty(this,"--close-rest-in-group",!1)),o(this,b,new y.CSSProperty(this,"--group","")),o(this,V,new y.CSSProperty(this,"--click-outside",!1)),o(this,O,new y.CSSProperty(this,"--escape",!1)),o(this,k,new y.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,E,!0),o(this,a,new fe.ElementLinkedStore(this,{triggered:!1,beforeopen:!1,opened:!1,closing:!1,transitionend:!1})),o(this,M,[]),o(this,D,[]),o(this,F,()=>{o(this,E,!1),e(this,v)&&e(this,m).current&&!location.search.includes(this.id)?this.close():!e(this,v)&&e(this,m).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)}),o(this,A,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,I).call(this)}),o(this,I,ge.debounce(()=>{e(this,X).call(this)},10)),o(this,X,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,k).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>Z.viewport.width?s=Z.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>Z.viewport.height?i=Z.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),o(this,U,()=>{this.close()}),e(this,b).subscribe(t=>{t.previous&&(C.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=C.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get openClass(){return this.getAttribute("data-open-global-class")}get closingClass(){return this.getAttribute("data-closing-global-class")}get history(){return e(this,m)}get restore(){return e(this,T)}get dispatchResize(){return e(this,P)}get closeRest(){return e(this,q)}get closeRestInGroup(){return e(this,$)}get group(){return e(this,b)}get clickOutside(){return e(this,V)}get escape(){return e(this,O)}get opened(){return e(this,v)}get lastTrigger(){return e(this,z)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,v)&&ce.updateSearchParameter(this.id,t)}open(t){if(e(this,v))return;o(this,z,t==null?void 0:t.trigger),clearTimeout(e(this,B)),clearTimeout(e(this,H)),p(this,u,S).call(this,!1,this.closingClass),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),W.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,z)}}),e(this,m).current&&e(this,E)&&history.pushState(history.state,"",e(this,u,ue)),e(this,a).set("beforeopen",!0),o(this,v,!0);const s=()=>{C.stack.add(e(this,b).current,this),e(this,D).forEach(i=>{i.scroll({top:0,left:0,behavior:"instant"})}),p(this,u,S).call(this,!0,this.openClass),e(this,a).set("opened",!0),e(this,P).current?W.dispatchEvent(window,"resize",{custom:!0}):e(this,A).call(this),W.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,z)},bubbles:!0}),o(this,R,void 0),o(this,G,setTimeout(()=>{e(this,a).set("transitionend",!0),W.dispatchEvent(this,"popoverTransitionend")},le.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,R,requestAnimationFrame(s))}close(){e(this,v)&&(o(this,v,!1),cancelAnimationFrame(e(this,R)),clearTimeout(e(this,G)),C.stack.remove(e(this,b).current,this),p(this,u,_).call(this),o(this,B,setTimeout(()=>{e(this,a).set("transitionend",!1),e(this,a).set("opened",!1),e(this,a).set("closing",!0),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!0,this.closingClass),W.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,H,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("beforeopen",!1),e(this,a).set("closing",!1),p(this,u,S).call(this,!1,this.closingClass),W.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},le.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,M,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,M).forEach(t=>{t.addEventListener("click",e(this,U))}),o(this,D,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,m).observe(),e(this,T).observe(),e(this,P).observe(),e(this,q).observe(),e(this,$).observe(),e(this,b).observe(),e(this,V).observe(),e(this,O).observe(),e(this,k).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,F)),setTimeout(()=>{e(this,T).current?(o(this,E,!1),this.urlValue=ce.parseSearchParameters(location.search)[this.id],location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)):(p(this,u,_).call(this),o(this,E,!0))},0),e(this,k).subscribe(()=>{e(this,A).call(this)}),ae.windowResizer.subscribe(e(this,A))}disconnectedCallback(){e(this,M).forEach(t=>{t.removeEventListener("click",e(this,U))}),C.stack.remove(e(this,b).current,this),ae.windowResizer.unsubscribe(e(this,A)),e(this,m).close(),e(this,T).close(),e(this,P).close(),e(this,q).close(),e(this,$).close(),e(this,b).close(),e(this,V).close(),e(this,O).close(),e(this,k).close(),this.removeAttribute("role"),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!1,this.closingClass),clearTimeout(e(this,B)),clearTimeout(e(this,H)),clearTimeout(e(this,R)),clearTimeout(e(this,G)),removeEventListener("popstate",e(this,F)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),p(this,u,_).call(this)}};v=new WeakMap,B=new WeakMap,H=new WeakMap,R=new WeakMap,G=new WeakMap,m=new WeakMap,T=new WeakMap,P=new WeakMap,q=new WeakMap,$=new WeakMap,b=new WeakMap,V=new WeakMap,O=new WeakMap,k=new WeakMap,E=new WeakMap,z=new WeakMap,a=new WeakMap,M=new WeakMap,D=new WeakMap,u=new WeakSet,ue=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},S=function(t,s){s&&s.split(" ").map(i=>{document.documentElement.classList.toggle(i.trim(),t)})},_=function(){if(e(this,m).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},F=new WeakMap,A=new WeakMap,I=new WeakMap,X=new WeakMap,U=new WeakMap,C.stack=new ve;let j=C;oe.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",j);var h,g,x,ie,Y,J,K,N,re;class pe extends HTMLElement{constructor(){super();r(this,x);r(this,h);r(this,g,new y.CSSProperty(this,"--type","open"));r(this,Y,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.add("triggered")});r(this,J,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,K,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.remove("opened")});r(this,N,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});oe.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,g).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,g)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(p(this,x,ie).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const d=this.getRootNode();d instanceof ShadowRoot?i=d.host.closest("[data-popover]"):d instanceof HTMLElement&&(i=d.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=d=>{if(!d)return null;let L=d.querySelector("[data-popover]");return!L&&(d!=null&&d.parentElement)&&(L=l(d.parentElement)),L};i=l(this.parentElement)||null}else{let l=t;if(isNaN(parseInt(l))&&(!t.startsWith(".")&&!t.startsWith("[")&&!t.startsWith("#")&&(l=`#${t}`),i=document.querySelector(l)||this.getRootNode().querySelector(l)),!i){const L=[...document.querySelectorAll("[data-popover-ids]")].find(Q=>{var ne;return(ne=Q.getAttribute("data-popover-ids"))==null?void 0:ne.split(",").find(de=>de.trim()===t)});L&&(i=L)}}i instanceof HTMLElement?(o(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,Y)),e(this,h).addEventListener("popoverOpened",e(this,J)),e(this,h).addEventListener("popoverClosing",e(this,K)),e(this,h).addEventListener("popoverClosed",e(this,N))):console.warn(this,`target ${t} not found`)}p(this,x,re).call(this,e(this,g).current)}connectedCallback(){e(this,g).subscribe(s=>{p(this,x,re).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,g).observe()}disconnectedCallback(){e(this,g).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),p(this,x,ie).call(this)}}h=new WeakMap,g=new WeakMap,x=new WeakSet,ie=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,Y)),e(this,h).removeEventListener("popoverOpened",e(this,J)),e(this,h).removeEventListener("popoverClosing",e(this,K)),e(this,h).removeEventListener("popoverClosed",e(this,N)))},Y=new WeakMap,J=new WeakMap,K=new WeakMap,N=new WeakMap,re=function(t){e(this,h)instanceof j&&(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")))};oe.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",pe);exports.PopoverButtonElement=pe;exports.PopoverElement=j;
1
+ "use strict";var he=c=>{throw TypeError(c)};var se=(c,n,t)=>n.has(c)||he("Cannot "+t);var e=(c,n,t)=>(se(c,n,"read from private field"),t?t.call(c):n.get(c)),r=(c,n,t)=>n.has(c)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(se(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),p=(c,n,t)=>(se(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("../element-linked-store/index.cjs"),y=require("../css-property/index.cjs"),oe=require("../index-CKTweR3M.cjs"),W=require("../events-KVanG9sR.cjs"),ge=require("../function-MthRj-GJ.cjs"),le=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ce=require("../url-BRY7C6vT.cjs"),ae=require("../window-resizer/index.cjs"),Z=require("../Viewport-Cx50Hufs.cjs");var f,w,ee,te;class ve{constructor(){r(this,f,new Map);r(this,w,[]);r(this,ee,n=>{var s;const t=[...e(this,w)].reverse().find(i=>i.clickOutside.current);if(t){const i=n.composedPath();if(i.find(Q=>Q instanceof HTMLElement&&Q.hasAttribute("data-popover-content")))return;const l=i[0],d=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),L=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!d||L)&&t.close()}});r(this,te,n=>{if(n.code==="Escape"){const t=[...e(this,w)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,ee)),addEventListener("keydown",e(this,te))}get groups(){return e(this,f)}get stack(){return e(this,w)}add(n,t){if(t.closeRest.current)e(this,f).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,f).get(n);i==null||i.forEach(l=>{l.close()})}let s=e(this,f).get(n);s!=null&&s.length||(s=[],e(this,f).set(n,s)),e(this,w).push(t),s.push(t)}remove(n,t){if(setTimeout(()=>{o(this,w,e(this,w).filter(s=>s!==t))}),t.closeRest.current){let s=[];e(this,f).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,f).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,f).get(n);e(this,f).delete(n),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,f).get(n);s&&(s=s.filter(i=>i!==t),e(this,f).set(n,s))}}}f=new WeakMap,w=new WeakMap,ee=new WeakMap,te=new WeakMap;var v,B,H,R,G,m,T,P,q,$,b,V,O,k,E,z,a,M,D,u,ue,S,_,F,A,I,X,U;const C=class C extends HTMLElement{constructor(){super();r(this,u);r(this,v);r(this,B);r(this,H);r(this,R);r(this,G);r(this,m);r(this,T);r(this,P);r(this,q);r(this,$);r(this,b);r(this,V);r(this,O);r(this,k);r(this,E);r(this,z);r(this,a);r(this,M);r(this,D);r(this,F);r(this,A);r(this,I);r(this,X);r(this,U);this.urlValue="",o(this,v,!1),o(this,m,new y.CSSProperty(this,"--history",!1)),o(this,T,new y.CSSProperty(this,"--restore",!1)),o(this,P,new y.CSSProperty(this,"--dispatch-resize",!1)),o(this,q,new y.CSSProperty(this,"--close-rest",!1)),o(this,$,new y.CSSProperty(this,"--close-rest-in-group",!1)),o(this,b,new y.CSSProperty(this,"--group","")),o(this,V,new y.CSSProperty(this,"--click-outside",!1)),o(this,O,new y.CSSProperty(this,"--escape",!1)),o(this,k,new y.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,E,!0),o(this,a,new fe.ElementLinkedStore(this,{triggered:!1,beforeopen:!1,opened:!1,closing:!1,transitionend:!1})),o(this,M,[]),o(this,D,[]),o(this,F,()=>{o(this,E,!1),e(this,v)&&e(this,m).current&&!location.search.includes(this.id)?this.close():!e(this,v)&&e(this,m).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)}),o(this,A,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,I).call(this)}),o(this,I,ge.debounce(()=>{e(this,X).call(this)},10)),o(this,X,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,k).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>Z.viewport.width?s=Z.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>Z.viewport.height?i=Z.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),o(this,U,()=>{this.close()}),e(this,b).subscribe(t=>{t.previous&&(C.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=C.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get openClass(){return this.getAttribute("data-open-global-class")}get closingClass(){return this.getAttribute("data-closing-global-class")}get history(){return e(this,m)}get restore(){return e(this,T)}get dispatchResize(){return e(this,P)}get closeRest(){return e(this,q)}get closeRestInGroup(){return e(this,$)}get group(){return e(this,b)}get clickOutside(){return e(this,V)}get escape(){return e(this,O)}get opened(){return e(this,v)}get lastTrigger(){return e(this,z)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,v)&&ce.updateSearchParameter(this.id,t)}open(t){if(e(this,v))return;o(this,z,t==null?void 0:t.trigger),clearTimeout(e(this,B)),clearTimeout(e(this,H)),p(this,u,S).call(this,!1,this.closingClass),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),W.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,z)}}),e(this,m).current&&e(this,E)&&history.pushState(history.state,"",e(this,u,ue)),e(this,a).set("beforeopen",!0),o(this,v,!0);const s=()=>{C.stack.add(e(this,b).current,this),e(this,D).forEach(i=>{i.scroll({top:0,left:0,behavior:"instant"})}),p(this,u,S).call(this,!0,this.openClass),e(this,a).set("opened",!0),e(this,P).current?W.dispatchEvent(window,"resize",{custom:!0}):e(this,A).call(this),W.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,z)},bubbles:!0}),o(this,R,void 0),o(this,G,setTimeout(()=>{e(this,a).set("transitionend",!0),W.dispatchEvent(this,"popoverTransitionend")},le.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,R,requestAnimationFrame(s))}close(){e(this,v)&&(o(this,v,!1),cancelAnimationFrame(e(this,R)),clearTimeout(e(this,G)),C.stack.remove(e(this,b).current,this),p(this,u,_).call(this),o(this,B,setTimeout(()=>{e(this,a).set("transitionend",!1),e(this,a).set("opened",!1),e(this,a).set("closing",!0),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!0,this.closingClass),W.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,H,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("beforeopen",!1),e(this,a).set("closing",!1),p(this,u,S).call(this,!1,this.closingClass),W.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},le.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,M,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,M).forEach(t=>{t.addEventListener("click",e(this,U))}),o(this,D,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,m).observe(),e(this,T).observe(),e(this,P).observe(),e(this,q).observe(),e(this,$).observe(),e(this,b).observe(),e(this,V).observe(),e(this,O).observe(),e(this,k).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,F)),setTimeout(()=>{e(this,T).current?(o(this,E,!1),this.urlValue=ce.parseSearchParameters(location.search)[this.id],location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)):(p(this,u,_).call(this),o(this,E,!0))},0),e(this,k).subscribe(()=>{e(this,A).call(this)}),ae.windowResizer.subscribe(e(this,A))}disconnectedCallback(){e(this,M).forEach(t=>{t.removeEventListener("click",e(this,U))}),C.stack.remove(e(this,b).current,this),ae.windowResizer.unsubscribe(e(this,A)),e(this,m).close(),e(this,T).close(),e(this,P).close(),e(this,q).close(),e(this,$).close(),e(this,b).close(),e(this,V).close(),e(this,O).close(),e(this,k).close(),this.removeAttribute("role"),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!1,this.closingClass),clearTimeout(e(this,B)),clearTimeout(e(this,H)),clearTimeout(e(this,R)),clearTimeout(e(this,G)),removeEventListener("popstate",e(this,F)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),p(this,u,_).call(this)}};v=new WeakMap,B=new WeakMap,H=new WeakMap,R=new WeakMap,G=new WeakMap,m=new WeakMap,T=new WeakMap,P=new WeakMap,q=new WeakMap,$=new WeakMap,b=new WeakMap,V=new WeakMap,O=new WeakMap,k=new WeakMap,E=new WeakMap,z=new WeakMap,a=new WeakMap,M=new WeakMap,D=new WeakMap,u=new WeakSet,ue=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},S=function(t,s){s&&s.split(" ").map(i=>{document.documentElement.classList.toggle(i.trim(),t)})},_=function(){if(e(this,m).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},F=new WeakMap,A=new WeakMap,I=new WeakMap,X=new WeakMap,U=new WeakMap,C.stack=new ve;let j=C;oe.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",j);var h,g,x,ie,Y,J,K,N,re;class pe extends HTMLElement{constructor(){super();r(this,x);r(this,h);r(this,g,new y.CSSProperty(this,"--type","open"));r(this,Y,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.add("triggered")});r(this,J,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,K,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.remove("opened")});r(this,N,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});oe.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,g).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,g)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(p(this,x,ie).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const d=this.getRootNode();d instanceof ShadowRoot?i=d.host.closest("[data-popover]"):d instanceof HTMLElement&&(i=d.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=d=>{if(!d)return null;let L=d.querySelector("[data-popover]");return!L&&(d!=null&&d.parentElement)&&(L=l(d.parentElement)),L};i=l(this.parentElement)||null}else{let l=t;if(isNaN(parseInt(l))&&(!t.startsWith(".")&&!t.startsWith("[")&&!t.startsWith("#")&&(l=`#${t}`),i=document.querySelector(l)||this.getRootNode().querySelector(l)),!i){const L=[...document.querySelectorAll("[data-popover-ids]")].find(Q=>{var ne;return(ne=Q.getAttribute("data-popover-ids"))==null?void 0:ne.split(",").find(de=>de.trim()===t)});L&&(i=L)}}i instanceof HTMLElement?(o(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,Y)),e(this,h).addEventListener("popoverOpened",e(this,J)),e(this,h).addEventListener("popoverClosing",e(this,K)),e(this,h).addEventListener("popoverClosed",e(this,N))):console.warn(this,`target ${t} not found`)}p(this,x,re).call(this,e(this,g).current)}connectedCallback(){e(this,g).subscribe(s=>{p(this,x,re).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,g).observe()}disconnectedCallback(){e(this,g).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),p(this,x,ie).call(this)}}h=new WeakMap,g=new WeakMap,x=new WeakSet,ie=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,Y)),e(this,h).removeEventListener("popoverOpened",e(this,J)),e(this,h).removeEventListener("popoverClosing",e(this,K)),e(this,h).removeEventListener("popoverClosed",e(this,N)))},Y=new WeakMap,J=new WeakMap,K=new WeakMap,N=new WeakMap,re=function(t){e(this,h)instanceof j&&(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")))};oe.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",pe);exports.PopoverButtonElement=pe;exports.PopoverElement=j;
@@ -10,7 +10,7 @@ import { d as W } from "../events-CsVF98U6.js";
10
10
  import { d as dt } from "../function-C10DGppn.js";
11
11
  import { g as lt } from "../style-j2TwriJ_.js";
12
12
  import "construct-style-sheets-polyfill";
13
- import { u as ft, p as gt } from "../url-CGbjOTU4.js";
13
+ import { u as ft, p as gt } from "../url-DQgGZl_e.js";
14
14
  import { windowResizer as ct } from "../window-resizer/index.js";
15
15
  import { v as Q } from "../Viewport-DbN_JWBM.js";
16
16
  var f, w, tt, et;
@@ -1 +1 @@
1
- "use strict";var Y=c=>{throw TypeError(c)};var F=(c,t,s)=>t.has(c)||Y("Cannot "+s);var e=(c,t,s)=>(F(c,t,"read from private field"),s?s.call(c):t.get(c)),a=(c,t,s)=>t.has(c)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(c):t.set(c,s),h=(c,t,s,i)=>(F(c,t,"write to private field"),i?i.call(c,s):t.set(c,s),s),n=(c,t,s)=>(F(c,t,"access private method"),s);var g=(c,t,s)=>new Promise((i,l)=>{var m=f=>{try{L(s.next(f))}catch(D){l(D)}},w=f=>{try{L(s.throw(f))}catch(D){l(D)}},L=f=>f.done?i(f.value):Promise.resolve(f.value).then(m,w);L((s=s.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pt=require("../notifier/index.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const x=require("../url-C2kASACG.cjs"),ft=require("urlpattern-polyfill"),gt=require("../render-DBQUdpsp.cjs"),Rt=require("../dom-hTEdqeoj.cjs"),_=require("../object-CCiXnER2.cjs");var b,y,B,G,H;class yt{constructor(t,s){a(this,B);a(this,b);a(this,y);a(this,H,t=>{t.preventDefault();const s=e(this,B,G),i=e(this,y).getAttribute("data-history-action")||"push";e(this,b).navigate(s,{historyAction:i})});h(this,b,t),h(this,y,s),e(this,y).addEventListener("click",e(this,H))}checkCurrent(t){}destroy(){e(this,y).removeEventListener("click",e(this,H)),e(this,y).classList.remove("current")}}b=new WeakMap,y=new WeakMap,B=new WeakSet,G=function(){const t=new URL(e(this,y).href);return e(this,b).normalizePath(t.pathname+t.search+t.hash).path},H=new WeakMap;var C,T,S,d,u,k,M,P,A,N,o,J,Q,V,X,Z,$,tt,et,st,K;class vt{constructor(t,s){a(this,o);a(this,C);a(this,T);a(this,S);a(this,d,null);a(this,u,null);a(this,k,!1);a(this,M,null);a(this,P);a(this,A,[]);a(this,N,[]);h(this,C,t),h(this,T,s),h(this,S,new URLPattern({pathname:e(this,C)})),h(this,P,new MutationObserver(n(this,o,et).bind(this)))}get pattern(){return e(this,C)}get isActive(){return e(this,k)}get element(){return e(this,u)}get nest(){return e(this,M)}testPathname(t){return e(this,S).test({pathname:t})}render(t,s){return g(this,null,function*(){e(this,P).observe(document.head,{childList:!0,subtree:!0}),e(this,d)?n(this,o,V).call(this):yield n(this,o,J).call(this),yield n(this,o,st).call(this),e(this,d)&&(yield n(this,o,X).call(this,t,s)),e(this,P).disconnect()})}close(){n(this,o,$).call(this)}getAnchorElements(){const t=[];return e(this,u)&&(t.push(...e(this,u).querySelectorAll("a")),Rt.traverseShadowRoots(e(this,u),s=>{t.push(...s.shadowRoot.querySelectorAll("a"))})),t}}C=new WeakMap,T=new WeakMap,S=new WeakMap,d=new WeakMap,u=new WeakMap,k=new WeakMap,M=new WeakMap,P=new WeakMap,A=new WeakMap,N=new WeakMap,o=new WeakSet,J=function(){return g(this,null,function*(){const t=yield e(this,T).call(this);h(this,N,[...e(this,A)]),typeof t.default=="function"&&(h(this,d,t.default),yield n(this,o,Q).call(this))})},Q=function(){return g(this,null,function*(){if(e(this,d)&&_.isESClass(e(this,d))){const t=`e-${e(this,d).name.toLowerCase()}`;customElements.get(t)||customElements.define(t,e(this,d))}})},V=function(){e(this,A).forEach(t=>{document.head.appendChild(t.cloneNode(!0))})},X=function(t,s){return g(this,null,function*(){const l={urlPatternResult:e(this,S).exec({pathname:s})};_.isESClass(e(this,d))?(h(this,u,new(e(this,d))(l)),t.appendChild(e(this,u))):h(this,u,gt.render(t,e(this,d),l)),n(this,o,Z).call(this),h(this,k,!0)})},Z=function(){var t;e(this,u)&&h(this,M,e(this,u).querySelector("[data-nest]")||((t=e(this,u).shadowRoot)==null?void 0:t.querySelector("[data-nest]"))||e(this,u).shadowRoot||e(this,u))},$=function(){var t;e(this,P).disconnect(),(t=e(this,u))==null||t.remove(),h(this,k,!1),n(this,o,tt).call(this)},tt=function(){e(this,N).forEach(t=>{t.parentNode===document.head&&document.head.removeChild(t)}),h(this,N,[])},et=function(t){t.forEach(s=>{s.addedNodes.forEach(i=>{e(this,d)?e(this,N).push(i):e(this,A).push(i)})})},st=function(){return g(this,null,function*(){const t=e(this,A).filter(n(this,o,K));yield Promise.all(t.map(s=>new Promise(i=>{n(this,o,K).call(this,s)?s.onload=()=>i():i()})))})},K=function(t){return t instanceof HTMLElement&&(t.tagName==="STYLE"||t.tagName==="SCRIPT"||t.tagName==="LINK")};globalThis.URLPattern=ft.URLPattern;var q,I,R,U,E,v,j,p,z,r,it,at,rt,ht,nt,ot,ct,lt,ut,W,dt,mt,O;class wt{constructor(t){a(this,r);a(this,q);a(this,I);a(this,R,[]);a(this,U,null);a(this,E,[]);a(this,v,null);a(this,j,null);a(this,p,null);a(this,z,new pt.Notifier);a(this,O,t=>{var s;(s=t.state)!=null&&s.path&&this.navigate(t.state.path,{historyAction:"none"})});var s;h(this,I,t!=null&&t.base?x.normalizeBase(t.base):"/"),h(this,q,(s=t==null?void 0:t.rootElement)!=null?s:document.body),h(this,p,this.normalizePath(location.pathname+location.search+location.hash)),n(this,r,it).call(this)}get candidateURL(){return e(this,v)}get currentURL(){return e(this,p)}get routes(){return e(this,R)}get links(){return e(this,E)}run(){n(this,r,lt).call(this),this.navigate(e(this,p).path,{revalidate:!0})}destroy(){removeEventListener("popstate",e(this,O)),n(this,r,W).call(this),e(this,R).forEach(t=>t.close()),e(this,z).close()}navigationEvent(t){return e(this,z).subscribe(t)}defineRoute(t,s){const i=new vt(t,s);e(this,R).push(i)}navigate(t,s){return g(this,null,function*(){var l,m,w;const i=this.normalizePath(t);if(!(s!=null&&s.revalidate)&&(((l=e(this,v))==null?void 0:l.pathname)===i.pathname||e(this,p).pathname===i.pathname)){((m=e(this,p))==null?void 0:m.parameters)!==i.parameters&&(h(this,j,e(this,p)),h(this,p,i),x.changeHistory({action:((w=e(this,p))==null?void 0:w.hash)!==i.hash?"replace":(s==null?void 0:s.historyAction)||"push",pathname:i.pathname,searchParameters:i.parameters,hash:i.hash})),e(this,E).forEach(L=>{L.checkCurrent(i)});return}h(this,v,i),(yield n(this,r,at).call(this,e(this,v)))&&i.path===e(this,v).path&&(yield n(this,r,rt).call(this,e(this,v),s))})}normalizePath(t){return x.splitPath(t,{base:e(this,I)})}}q=new WeakMap,I=new WeakMap,R=new WeakMap,U=new WeakMap,E=new WeakMap,v=new WeakMap,j=new WeakMap,p=new WeakMap,z=new WeakMap,r=new WeakSet,it=function(){addEventListener("popstate",e(this,O))},at=function(t){return g(this,null,function*(){if(!this.preprocessor)return!0;try{return yield new Promise((s,i)=>{var l;(l=this.preprocessor)==null||l.call(this,{path:t,resolve:s,reject:i})}),!0}catch(s){return console.error(s!=null?s:"Route change canceled"),!1}})},rt=function(i){return g(this,arguments,function*(t,s={}){var f;const{activeRoutes:l,newRoutes:m,oldRoutes:w,keepRoutes:L}=n(this,r,ht).call(this,t.leaf);h(this,U,(f=L[L.length-1])!=null?f:null),n(this,r,nt).call(this,w),h(this,p,t),x.changeHistory({action:s.historyAction||"push",pathname:t.pathname,searchParameters:t.parameters,hash:t.hash}),yield n(this,r,ot).call(this,m,t.leaf),n(this,r,ut).call(this),n(this,r,ct).call(this,t.pathname)})},ht=function(t){const s=e(this,R).filter(i=>i.isActive);return{activeRoutes:s,newRoutes:e(this,R).filter(i=>!s.includes(i)&&i.testPathname(t)),oldRoutes:s.filter(i=>!i.testPathname(t)),keepRoutes:s.filter(i=>i.testPathname(t))}},nt=function(t){t.forEach(s=>s.close())},ot=function(t,s){return g(this,null,function*(){var i,l;for(const m of t){const w=(l=(i=e(this,U))==null?void 0:i.nest)!=null?l:e(this,q);yield m.render(w,s),h(this,U,m)}})},ct=function(t){var s;(s=this.postprocessor)==null||s.call(this,{pathname:t}),e(this,z).notify({pathname:t})},lt=function(){e(this,R).sort((t,s)=>{const i=t.pattern.split("/").length,l=s.pattern.split("/").length;return i-l})},ut=function(){n(this,r,W).call(this),n(this,r,dt).call(this)},W=function(){e(this,E).forEach(t=>t.destroy()),h(this,E,[])},dt=function(){const t=e(this,R).filter(i=>i.isActive),s=n(this,r,mt).call(this,t);h(this,E,s.map(i=>new yt(this,i)))},mt=function(t){const s=Array.from(e(this,q).querySelectorAll("a")),i=t.flatMap(l=>l.getAnchorElements());return Array.from(new Set([...s,...i].filter(l=>{var m;return(m=l.getAttribute("href"))==null?void 0:m.startsWith("/")})))},O=new WeakMap;exports.Router=wt;
1
+ "use strict";var Y=c=>{throw TypeError(c)};var F=(c,t,s)=>t.has(c)||Y("Cannot "+s);var e=(c,t,s)=>(F(c,t,"read from private field"),s?s.call(c):t.get(c)),a=(c,t,s)=>t.has(c)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(c):t.set(c,s),h=(c,t,s,i)=>(F(c,t,"write to private field"),i?i.call(c,s):t.set(c,s),s),n=(c,t,s)=>(F(c,t,"access private method"),s);var g=(c,t,s)=>new Promise((i,l)=>{var m=f=>{try{L(s.next(f))}catch(D){l(D)}},w=f=>{try{L(s.throw(f))}catch(D){l(D)}},L=f=>f.done?i(f.value):Promise.resolve(f.value).then(m,w);L((s=s.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pt=require("../notifier/index.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const x=require("../url-BRY7C6vT.cjs"),ft=require("urlpattern-polyfill"),gt=require("../render-DBQUdpsp.cjs"),Rt=require("../dom-hTEdqeoj.cjs"),_=require("../object-CCiXnER2.cjs");var b,y,B,G,H;class yt{constructor(t,s){a(this,B);a(this,b);a(this,y);a(this,H,t=>{t.preventDefault();const s=e(this,B,G),i=e(this,y).getAttribute("data-history-action")||"push";e(this,b).navigate(s,{historyAction:i})});h(this,b,t),h(this,y,s),e(this,y).addEventListener("click",e(this,H))}checkCurrent(t){}destroy(){e(this,y).removeEventListener("click",e(this,H)),e(this,y).classList.remove("current")}}b=new WeakMap,y=new WeakMap,B=new WeakSet,G=function(){const t=new URL(e(this,y).href);return e(this,b).normalizePath(t.pathname+t.search+t.hash).path},H=new WeakMap;var C,T,S,d,u,k,M,P,A,N,o,J,Q,V,X,Z,$,tt,et,st,K;class vt{constructor(t,s){a(this,o);a(this,C);a(this,T);a(this,S);a(this,d,null);a(this,u,null);a(this,k,!1);a(this,M,null);a(this,P);a(this,A,[]);a(this,N,[]);h(this,C,t),h(this,T,s),h(this,S,new URLPattern({pathname:e(this,C)})),h(this,P,new MutationObserver(n(this,o,et).bind(this)))}get pattern(){return e(this,C)}get isActive(){return e(this,k)}get element(){return e(this,u)}get nest(){return e(this,M)}testPathname(t){return e(this,S).test({pathname:t})}render(t,s){return g(this,null,function*(){e(this,P).observe(document.head,{childList:!0,subtree:!0}),e(this,d)?n(this,o,V).call(this):yield n(this,o,J).call(this),yield n(this,o,st).call(this),e(this,d)&&(yield n(this,o,X).call(this,t,s)),e(this,P).disconnect()})}close(){n(this,o,$).call(this)}getAnchorElements(){const t=[];return e(this,u)&&(t.push(...e(this,u).querySelectorAll("a")),Rt.traverseShadowRoots(e(this,u),s=>{t.push(...s.shadowRoot.querySelectorAll("a"))})),t}}C=new WeakMap,T=new WeakMap,S=new WeakMap,d=new WeakMap,u=new WeakMap,k=new WeakMap,M=new WeakMap,P=new WeakMap,A=new WeakMap,N=new WeakMap,o=new WeakSet,J=function(){return g(this,null,function*(){const t=yield e(this,T).call(this);h(this,N,[...e(this,A)]),typeof t.default=="function"&&(h(this,d,t.default),yield n(this,o,Q).call(this))})},Q=function(){return g(this,null,function*(){if(e(this,d)&&_.isESClass(e(this,d))){const t=`e-${e(this,d).name.toLowerCase()}`;customElements.get(t)||customElements.define(t,e(this,d))}})},V=function(){e(this,A).forEach(t=>{document.head.appendChild(t.cloneNode(!0))})},X=function(t,s){return g(this,null,function*(){const l={urlPatternResult:e(this,S).exec({pathname:s})};_.isESClass(e(this,d))?(h(this,u,new(e(this,d))(l)),t.appendChild(e(this,u))):h(this,u,gt.render(t,e(this,d),l)),n(this,o,Z).call(this),h(this,k,!0)})},Z=function(){var t;e(this,u)&&h(this,M,e(this,u).querySelector("[data-nest]")||((t=e(this,u).shadowRoot)==null?void 0:t.querySelector("[data-nest]"))||e(this,u).shadowRoot||e(this,u))},$=function(){var t;e(this,P).disconnect(),(t=e(this,u))==null||t.remove(),h(this,k,!1),n(this,o,tt).call(this)},tt=function(){e(this,N).forEach(t=>{t.parentNode===document.head&&document.head.removeChild(t)}),h(this,N,[])},et=function(t){t.forEach(s=>{s.addedNodes.forEach(i=>{e(this,d)?e(this,N).push(i):e(this,A).push(i)})})},st=function(){return g(this,null,function*(){const t=e(this,A).filter(n(this,o,K));yield Promise.all(t.map(s=>new Promise(i=>{n(this,o,K).call(this,s)?s.onload=()=>i():i()})))})},K=function(t){return t instanceof HTMLElement&&(t.tagName==="STYLE"||t.tagName==="SCRIPT"||t.tagName==="LINK")};globalThis.URLPattern=ft.URLPattern;var q,I,R,U,E,v,j,p,z,r,it,at,rt,ht,nt,ot,ct,lt,ut,W,dt,mt,O;class wt{constructor(t){a(this,r);a(this,q);a(this,I);a(this,R,[]);a(this,U,null);a(this,E,[]);a(this,v,null);a(this,j,null);a(this,p,null);a(this,z,new pt.Notifier);a(this,O,t=>{var s;(s=t.state)!=null&&s.path&&this.navigate(t.state.path,{historyAction:"none"})});var s;h(this,I,t!=null&&t.base?x.normalizeBase(t.base):"/"),h(this,q,(s=t==null?void 0:t.rootElement)!=null?s:document.body),h(this,p,this.normalizePath(location.pathname+location.search+location.hash)),n(this,r,it).call(this)}get candidateURL(){return e(this,v)}get currentURL(){return e(this,p)}get routes(){return e(this,R)}get links(){return e(this,E)}run(){n(this,r,lt).call(this),this.navigate(e(this,p).path,{revalidate:!0})}destroy(){removeEventListener("popstate",e(this,O)),n(this,r,W).call(this),e(this,R).forEach(t=>t.close()),e(this,z).close()}navigationEvent(t){return e(this,z).subscribe(t)}defineRoute(t,s){const i=new vt(t,s);e(this,R).push(i)}navigate(t,s){return g(this,null,function*(){var l,m,w;const i=this.normalizePath(t);if(!(s!=null&&s.revalidate)&&(((l=e(this,v))==null?void 0:l.pathname)===i.pathname||e(this,p).pathname===i.pathname)){((m=e(this,p))==null?void 0:m.parameters)!==i.parameters&&(h(this,j,e(this,p)),h(this,p,i),x.changeHistory({action:((w=e(this,p))==null?void 0:w.hash)!==i.hash?"replace":(s==null?void 0:s.historyAction)||"push",pathname:i.pathname,searchParameters:i.parameters,hash:i.hash})),e(this,E).forEach(L=>{L.checkCurrent(i)});return}h(this,v,i),(yield n(this,r,at).call(this,e(this,v)))&&i.path===e(this,v).path&&(yield n(this,r,rt).call(this,e(this,v),s))})}normalizePath(t){return x.splitPath(t,{base:e(this,I)})}}q=new WeakMap,I=new WeakMap,R=new WeakMap,U=new WeakMap,E=new WeakMap,v=new WeakMap,j=new WeakMap,p=new WeakMap,z=new WeakMap,r=new WeakSet,it=function(){addEventListener("popstate",e(this,O))},at=function(t){return g(this,null,function*(){if(!this.preprocessor)return!0;try{return yield new Promise((s,i)=>{var l;(l=this.preprocessor)==null||l.call(this,{path:t,resolve:s,reject:i})}),!0}catch(s){return console.error(s!=null?s:"Route change canceled"),!1}})},rt=function(i){return g(this,arguments,function*(t,s={}){var f;const{activeRoutes:l,newRoutes:m,oldRoutes:w,keepRoutes:L}=n(this,r,ht).call(this,t.leaf);h(this,U,(f=L[L.length-1])!=null?f:null),n(this,r,nt).call(this,w),h(this,p,t),x.changeHistory({action:s.historyAction||"push",pathname:t.pathname,searchParameters:t.parameters,hash:t.hash}),yield n(this,r,ot).call(this,m,t.leaf),n(this,r,ut).call(this),n(this,r,ct).call(this,t.pathname)})},ht=function(t){const s=e(this,R).filter(i=>i.isActive);return{activeRoutes:s,newRoutes:e(this,R).filter(i=>!s.includes(i)&&i.testPathname(t)),oldRoutes:s.filter(i=>!i.testPathname(t)),keepRoutes:s.filter(i=>i.testPathname(t))}},nt=function(t){t.forEach(s=>s.close())},ot=function(t,s){return g(this,null,function*(){var i,l;for(const m of t){const w=(l=(i=e(this,U))==null?void 0:i.nest)!=null?l:e(this,q);yield m.render(w,s),h(this,U,m)}})},ct=function(t){var s;(s=this.postprocessor)==null||s.call(this,{pathname:t}),e(this,z).notify({pathname:t})},lt=function(){e(this,R).sort((t,s)=>{const i=t.pattern.split("/").length,l=s.pattern.split("/").length;return i-l})},ut=function(){n(this,r,W).call(this),n(this,r,dt).call(this)},W=function(){e(this,E).forEach(t=>t.destroy()),h(this,E,[])},dt=function(){const t=e(this,R).filter(i=>i.isActive),s=n(this,r,mt).call(this,t);h(this,E,s.map(i=>new yt(this,i)))},mt=function(t){const s=Array.from(e(this,q).querySelectorAll("a")),i=t.flatMap(l=>l.getAnchorElements());return Array.from(new Set([...s,...i].filter(l=>{var m;return(m=l.getAttribute("href"))==null?void 0:m.startsWith("/")})))},O=new WeakMap;exports.Router=wt;
@@ -22,7 +22,7 @@ var R = (c, t, s) => new Promise((i, l) => {
22
22
  import { Notifier as pt } from "../notifier/index.js";
23
23
  import "construct-style-sheets-polyfill";
24
24
  import "../index-JqYHGoo6.js";
25
- import { n as ft, c as Y, s as Rt } from "../url-CGbjOTU4.js";
25
+ import { n as ft, c as Y, s as Rt } from "../url-DQgGZl_e.js";
26
26
  import { URLPattern as gt } from "urlpattern-polyfill";
27
27
  import { r as vt } from "../render-CMQbWthg.js";
28
28
  import { t as Lt } from "../dom-fgxIeFxm.js";
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-CKTweR3M.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-CKTweR3M.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-DMS25FM0.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
@@ -24,7 +24,7 @@ import { elementResizer as k } from "../element-resizer/index.js";
24
24
  import { i as q } from "../index-JqYHGoo6.js";
25
25
  import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
26
  import "construct-style-sheets-polyfill";
27
- import { a as W } from "../SourceElement-BiNNtaz9.js";
27
+ import { a as W } from "../SourceElement-BweVAYgJ.js";
28
28
  import "../window-resizer/index.js";
29
29
  import "../Store-BtVtCGLk.js";
30
30
  import { CanvasElement as A } from "../canvas/index.js";
@@ -1,6 +1,6 @@
1
1
  import { ElementLinkedStore } from '../element-linked-store';
2
- import { SourceSetOptions } from './SourceSet';
3
2
  import { SourceManager } from './SourceManager';
3
+ import { SourceSetOptions } from './SourceSet';
4
4
  export interface SourceEvents {
5
5
  sourceCapture: CustomEvent;
6
6
  sourceRelease: CustomEvent;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-BBfaAgwe.cjs");exports.Source=e.Source;exports.SourceElement=e.SourceElement;exports.SourceManager=e.SourceManager;exports.SourceSet=e.SourceSet;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-DMS25FM0.cjs");exports.Source=e.Source;exports.SourceElement=e.SourceElement;exports.SourceManager=e.SourceManager;exports.SourceSet=e.SourceSet;
@@ -1,4 +1,4 @@
1
- import { S as r, a as o, c as S, b as c } from "../SourceElement-BiNNtaz9.js";
1
+ import { S as r, a as o, c as S, b as c } from "../SourceElement-BweVAYgJ.js";
2
2
  export {
3
3
  r as Source,
4
4
  o as SourceElement,
@@ -0,0 +1 @@
1
+ "use strict";var $=Object.defineProperty,g=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var p=(t,s,e)=>s in t?$(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,P=(t,s)=>{for(var e in s||(s={}))L.call(s,e)&&p(t,e,s[e]);if(S)for(var e of S(s))R.call(s,e)&&p(t,e,s[e]);return t},W=(t,s)=>g(t,w(s));function U(t,{base:s="",trailingSlash:e=!1,mergeParams:n,removeParams:r}={}){s=s.endsWith("/")?s.slice(0,-1):s,t=t.replace(s,""),t.startsWith("/")&&(t=t.slice(1));const h=t.split("#"),f=h[0].split("?");let a=f[0].startsWith("/")?f[0]:"/"+f[0];e?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let i=f[1]||"";if(n){const c=new URLSearchParams(i),y=new URLSearchParams(n);for(const[o,d]of y)c.has(o)||c.set(o,d);r==null||r.split(",").forEach(o=>{c.has(o)&&c.delete(o)}),i=c.toString()}const u=s+a,l=h[1],m=`${u}${i?"?"+i:""}${l?"#"+l:""}`;return{leaf:a,pathname:u,parameters:i,hash:l,path:m}}function k(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function z(t){if(t.action==="none")return;const s=t==null?void 0:t.searchParameters,e=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",n=s?s.startsWith("?")?s:"?"+s:"",r=`${t.pathname}${n}${e}`,h=W(P({},t.state),{path:r});t.action==="push"?history.pushState(h,"",r):t.action==="replace"&&history.replaceState(h,"",r)}function B(t){const s=new URLSearchParams(t),e={};for(const[n,r]of s)e[n]=r;return e}function H(t,s){const e=new URL(location.href),n=(s==null?void 0:s.toString())||"";e.searchParams.set(t,n),history.replaceState(history.state,"",e.href)}exports.changeHistory=z;exports.normalizeBase=k;exports.parseSearchParameters=B;exports.splitPath=U;exports.updateSearchParameter=H;
@@ -0,0 +1,66 @@
1
+ var m = Object.defineProperty, g = Object.defineProperties;
2
+ var w = Object.getOwnPropertyDescriptors;
3
+ var p = Object.getOwnPropertySymbols;
4
+ var L = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
5
+ var S = (t, s, n) => s in t ? m(t, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[s] = n, W = (t, s) => {
6
+ for (var n in s || (s = {}))
7
+ L.call(s, n) && S(t, n, s[n]);
8
+ if (p)
9
+ for (var n of p(s))
10
+ R.call(s, n) && S(t, n, s[n]);
11
+ return t;
12
+ }, y = (t, s) => g(t, w(s));
13
+ function x(t, {
14
+ base: s = "",
15
+ trailingSlash: n = !1,
16
+ mergeParams: r,
17
+ removeParams: e
18
+ } = {}) {
19
+ s = s.endsWith("/") ? s.slice(0, -1) : s, t = t.replace(s, ""), t.startsWith("/") && (t = t.slice(1));
20
+ const h = t.split("#"), f = h[0].split("?");
21
+ let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
22
+ n ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
23
+ let i = f[1] || "";
24
+ if (r) {
25
+ const c = new URLSearchParams(i), d = new URLSearchParams(r);
26
+ for (const [o, $] of d)
27
+ c.has(o) || c.set(o, $);
28
+ e == null || e.split(",").forEach((o) => {
29
+ c.has(o) && c.delete(o);
30
+ }), i = c.toString();
31
+ }
32
+ const u = s + a, l = h[1], P = `${u}${i ? "?" + i : ""}${l ? "#" + l : ""}`;
33
+ return {
34
+ leaf: a,
35
+ pathname: u,
36
+ parameters: i,
37
+ hash: l,
38
+ path: P
39
+ };
40
+ }
41
+ function j(t = "/") {
42
+ return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
43
+ }
44
+ function z(t) {
45
+ if (t.action === "none")
46
+ return;
47
+ const s = t == null ? void 0 : t.searchParameters, n = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", r = s ? s.startsWith("?") ? s : "?" + s : "", e = `${t.pathname}${r}${n}`, h = y(W({}, t.state), { path: e });
48
+ t.action === "push" ? history.pushState(h, "", e) : t.action === "replace" && history.replaceState(h, "", e);
49
+ }
50
+ function B(t) {
51
+ const s = new URLSearchParams(t), n = {};
52
+ for (const [r, e] of s)
53
+ n[r] = e;
54
+ return n;
55
+ }
56
+ function E(t, s) {
57
+ const n = new URL(location.href), r = (s == null ? void 0 : s.toString()) || "";
58
+ n.searchParams.set(t, r), history.replaceState(history.state, "", n.href);
59
+ }
60
+ export {
61
+ z as c,
62
+ j as n,
63
+ B as p,
64
+ x as s,
65
+ E as u
66
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-CKTweR3M.cjs"),h=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),d=require("../dom-hTEdqeoj.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),R=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),S=require("../function-MthRj-GJ.cjs"),A=require("../gestures-C7gbKx11.cjs"),v=require("../stylesheet-BcwbfhBp.cjs"),g=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),f=require("../number-ChAm68cm.cjs"),c=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),P=require("../scroll-DxcPU0vk.cjs"),l=require("../string-DUXXtU8v.cjs"),q=require("../style-At6aDoqG.cjs"),p=require("../url-C2kASACG.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function N(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function z(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function j(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function M(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function V(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function k(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,u=e.length-1;i<e.length;u=i++){const b=e[i].x,m=e[i].y,y=e[u].x,I=e[u].y;m>r!=I>r&&o<(y-b)*(r-m)/(I-m)+b&&(n=!n)}return n}function w(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?w(t,o.slice(4,-1)):o}}function F(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=w(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function $(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function H(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const U=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,K=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function W(t){let e,n;return K.test(t)?(e=`mailto:${t.trim()}`,n="email"):U.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function Z(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function J(t,e,n,o){let r,i=!1,u=0;const b=()=>{clearInterval(r),o!=null&&o.restartCounter&&(u=0),i&&(r=setInterval(()=>{n(u++)},e))},m=E.intersector.subscribe(t,y=>{i=y.isIntersecting,b()});return()=>{m(),clearInterval(r)}}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=h.contain;exports.cover=h.cover;exports.fixPosition=h.fixPosition;exports.measureText=h.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.whenDefined=D.whenDefined;exports.findParentElement=d.findParentElement;exports.findScrollParentElement=d.findScrollParentElement;exports.getAllParentElements=d.getAllParentElements;exports.getElement=d.getElement;exports.traverseNodes=d.traverseNodes;exports.traverseShadowRoots=d.traverseShadowRoots;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=Q.isElementVisible;exports.dispatchEvent=R.dispatchEvent;exports.createJSONAndSave=O.createJSONAndSave;exports.downloadURI=O.downloadURI;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=A.setupDrag;exports.createStylesheet=v.createStylesheet;exports.styleToString=v.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.getStickyOffset=g.getStickyOffset;exports.calculateDistance=a.calculateDistance;exports.calculateDistanceWithRadius=a.calculateDistanceWithRadius;exports.clamp=a.clamp;exports.damp=a.damp;exports.lerp=a.lerp;exports.mapRange=a.mapRange;exports.round=a.round;exports.smootherstep=a.smootherstep;exports.smoothstep=a.smoothstep;exports.step=a.step;exports.beautifyNumber=f.beautifyNumber;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=P.scrollToElement;exports.wait=P.wait;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.declension=l.declension;exports.decodeHtmlEntities=l.decodeHtmlEntities;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=q.getElementTransitionDurationMS;exports.getElementTransitionDurationS=q.getElementTransitionDurationS;exports.changeHistory=p.changeHistory;exports.normalizeBase=p.normalizeBase;exports.parseSearchParameters=p.parseSearchParameters;exports.splitPath=p.splitPath;exports.updateSearchParameter=p.updateSearchParameter;exports.cloneTemplateContent=Z;exports.copyTextToClipboard=j;exports.decode=H;exports.dotCircleCollision=V;exports.dotPolygonCollision=k;exports.dotRectCollision=M;exports.encode=$;exports.formatBytes=z;exports.getRootVariables=F;exports.insert=B;exports.setIntervalOnIntersection=J;exports.shiftArray=N;exports.tryCreateHrefFromContact=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-CKTweR3M.cjs"),h=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),d=require("../dom-hTEdqeoj.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),R=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),S=require("../function-MthRj-GJ.cjs"),A=require("../gestures-C7gbKx11.cjs"),v=require("../stylesheet-BcwbfhBp.cjs"),g=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),f=require("../number-ChAm68cm.cjs"),c=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),P=require("../scroll-DxcPU0vk.cjs"),l=require("../string-DUXXtU8v.cjs"),q=require("../style-At6aDoqG.cjs"),p=require("../url-BRY7C6vT.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function N(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function z(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function j(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function M(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function V(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function k(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,u=e.length-1;i<e.length;u=i++){const b=e[i].x,m=e[i].y,y=e[u].x,I=e[u].y;m>r!=I>r&&o<(y-b)*(r-m)/(I-m)+b&&(n=!n)}return n}function w(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?w(t,o.slice(4,-1)):o}}function F(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=w(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function $(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function H(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const U=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,K=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function W(t){let e,n;return K.test(t)?(e=`mailto:${t.trim()}`,n="email"):U.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function Z(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function J(t,e,n,o){let r,i=!1,u=0;const b=()=>{clearInterval(r),o!=null&&o.restartCounter&&(u=0),i&&(r=setInterval(()=>{n(u++)},e))},m=E.intersector.subscribe(t,y=>{i=y.isIntersecting,b()});return()=>{m(),clearInterval(r)}}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=h.contain;exports.cover=h.cover;exports.fixPosition=h.fixPosition;exports.measureText=h.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.whenDefined=D.whenDefined;exports.findParentElement=d.findParentElement;exports.findScrollParentElement=d.findScrollParentElement;exports.getAllParentElements=d.getAllParentElements;exports.getElement=d.getElement;exports.traverseNodes=d.traverseNodes;exports.traverseShadowRoots=d.traverseShadowRoots;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=Q.isElementVisible;exports.dispatchEvent=R.dispatchEvent;exports.createJSONAndSave=O.createJSONAndSave;exports.downloadURI=O.downloadURI;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=A.setupDrag;exports.createStylesheet=v.createStylesheet;exports.styleToString=v.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.getStickyOffset=g.getStickyOffset;exports.calculateDistance=a.calculateDistance;exports.calculateDistanceWithRadius=a.calculateDistanceWithRadius;exports.clamp=a.clamp;exports.damp=a.damp;exports.lerp=a.lerp;exports.mapRange=a.mapRange;exports.round=a.round;exports.smootherstep=a.smootherstep;exports.smoothstep=a.smoothstep;exports.step=a.step;exports.beautifyNumber=f.beautifyNumber;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=P.scrollToElement;exports.wait=P.wait;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.declension=l.declension;exports.decodeHtmlEntities=l.decodeHtmlEntities;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=q.getElementTransitionDurationMS;exports.getElementTransitionDurationS=q.getElementTransitionDurationS;exports.changeHistory=p.changeHistory;exports.normalizeBase=p.normalizeBase;exports.parseSearchParameters=p.parseSearchParameters;exports.splitPath=p.splitPath;exports.updateSearchParameter=p.updateSearchParameter;exports.cloneTemplateContent=Z;exports.copyTextToClipboard=j;exports.decode=H;exports.dotCircleCollision=V;exports.dotPolygonCollision=k;exports.dotRectCollision=M;exports.encode=$;exports.formatBytes=z;exports.getRootVariables=F;exports.insert=B;exports.setIntervalOnIntersection=J;exports.shiftArray=N;exports.tryCreateHrefFromContact=W;
@@ -20,7 +20,7 @@ import { n as ft, r as dt } from "../polyfills-DJrTJQky.js";
20
20
  import { s as pt, w as xt } from "../scroll-7JSxRKFK.js";
21
21
  import { c as bt, a as gt, b as yt, d as Ct, g as It, i as vt, k as wt, s as Et, t as St, u as Tt } from "../string-BlMQbe8b.js";
22
22
  import { g as Pt, a as Bt } from "../style-j2TwriJ_.js";
23
- import { c as Rt, n as Dt, p as Qt, s as Nt, u as jt } from "../url-CGbjOTU4.js";
23
+ import { c as Rt, n as Dt, p as Qt, s as Nt, u as jt } from "../url-DQgGZl_e.js";
24
24
  function b(t, e, ...s) {
25
25
  return [...t.slice(0, e), ...s, ...t.slice(e)];
26
26
  }
@@ -2,6 +2,7 @@ export interface SplitPathOptions {
2
2
  base?: string;
3
3
  trailingSlash?: boolean;
4
4
  mergeParams?: string;
5
+ removeParams?: string;
5
6
  }
6
7
  export interface SplitPathResult {
7
8
  leaf: string;
@@ -10,7 +11,7 @@ export interface SplitPathResult {
10
11
  hash: string;
11
12
  path: string;
12
13
  }
13
- export declare function splitPath(value: string, { base, trailingSlash, mergeParams }?: SplitPathOptions): SplitPathResult;
14
+ export declare function splitPath(value: string, { base, trailingSlash, mergeParams, removeParams, }?: SplitPathOptions): SplitPathResult;
14
15
  export declare function normalizeBase(base?: string): string;
15
16
  export type ChangeHistoryAction = 'replace' | 'push' | 'none';
16
17
  export interface ChangeHistoryParameters {
@@ -1 +1 @@
1
- "use strict";var d=t=>{throw TypeError(t)};var E=(t,s,e)=>s.has(t)||d("Cannot "+e);var i=(t,s,e)=>(E(t,s,"read from private field"),e?e.call(t):s.get(t)),a=(t,s,e)=>s.has(t)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,m)=>(E(t,s,"write to private field"),m?m.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const f=require("../index-CKTweR3M.cjs"),y=require("../events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");const h=require("../ticker/index.cjs");var r,u,c,o,l;class p extends b.SourceElement{constructor(){super(...arguments);a(this,r,0);a(this,u,!1);a(this,c,this);a(this,o,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e!==i(this,r)&&y.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}}),e>i(this,r)&&n(this,r,e),this.consumerElement.readyState===4&&(h.ticker.unsubscribe(i(this,o)),i(this,u)&&this.sourceManager.current&&this.consumerElement.play())});a(this,l,()=>{this.hasAttribute("click-controls")&&(this.consumerElement.paused?this.consumerElement.play():this.hasAttribute("controls")||this.consumerElement.pause())})}connectedCallback(){super.connectedCallback();const e=this.getAttribute("click-controls");e&&(e==="parent"?n(this,c,this.parentElement):n(this,c,document.querySelector(e)||this)),this.addEventListener("sourceCapture",()=>{n(this,u,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():n(this,u,!0)),h.ticker.subscribe(i(this,o))}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.pause(),this.hasAttribute("release-pause")&&this.consumerElement.pause(),this.hasAttribute("release-stop")&&(this.consumerElement.pause(),this.consumerElement.currentTime=0),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")}),i(this,c).addEventListener("click",i(this,l))}disconnectedCallback(){super.disconnectedCallback(),h.ticker.unsubscribe(i(this,o)),n(this,r,0),i(this,c).removeEventListener("click",i(this,l))}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||"",e&&this.hasAttribute("volume")&&(this.consumerElement.volume=parseFloat(this.getAttribute("volume")||"1"))}}r=new WeakMap,u=new WeakMap,c=new WeakMap,o=new WeakMap,l=new WeakMap;f.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",p);exports.VideoElement=p;
1
+ "use strict";var d=t=>{throw TypeError(t)};var E=(t,s,e)=>s.has(t)||d("Cannot "+e);var i=(t,s,e)=>(E(t,s,"read from private field"),e?e.call(t):s.get(t)),a=(t,s,e)=>s.has(t)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,m)=>(E(t,s,"write to private field"),m?m.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../SourceElement-DMS25FM0.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const f=require("../index-CKTweR3M.cjs"),y=require("../events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");const h=require("../ticker/index.cjs");var r,u,c,o,l;class p extends b.SourceElement{constructor(){super(...arguments);a(this,r,0);a(this,u,!1);a(this,c,this);a(this,o,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e!==i(this,r)&&y.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}}),e>i(this,r)&&n(this,r,e),this.consumerElement.readyState===4&&(h.ticker.unsubscribe(i(this,o)),i(this,u)&&this.sourceManager.current&&this.consumerElement.play())});a(this,l,()=>{this.hasAttribute("click-controls")&&(this.consumerElement.paused?this.consumerElement.play():this.hasAttribute("controls")||this.consumerElement.pause())})}connectedCallback(){super.connectedCallback();const e=this.getAttribute("click-controls");e&&(e==="parent"?n(this,c,this.parentElement):n(this,c,document.querySelector(e)||this)),this.addEventListener("sourceCapture",()=>{n(this,u,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():n(this,u,!0)),h.ticker.subscribe(i(this,o))}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.pause(),this.hasAttribute("release-pause")&&this.consumerElement.pause(),this.hasAttribute("release-stop")&&(this.consumerElement.pause(),this.consumerElement.currentTime=0),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")}),i(this,c).addEventListener("click",i(this,l))}disconnectedCallback(){super.disconnectedCallback(),h.ticker.unsubscribe(i(this,o)),n(this,r,0),i(this,c).removeEventListener("click",i(this,l))}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||"",e&&this.hasAttribute("volume")&&(this.consumerElement.volume=parseFloat(this.getAttribute("volume")||"1"))}}r=new WeakMap,u=new WeakMap,c=new WeakMap,o=new WeakMap,l=new WeakMap;f.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",p);exports.VideoElement=p;
@@ -3,7 +3,7 @@ var d = (t) => {
3
3
  };
4
4
  var p = (t, s, e) => s.has(t) || d("Cannot " + e);
5
5
  var i = (t, s, e) => (p(t, s, "read from private field"), e ? e.call(t) : s.get(t)), c = (t, s, e) => s.has(t) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), a = (t, s, e, m) => (p(t, s, "write to private field"), m ? m.call(t, e) : s.set(t, e), e);
6
- import { a as E } from "../SourceElement-BiNNtaz9.js";
6
+ import { a as E } from "../SourceElement-BweVAYgJ.js";
7
7
  import "../window-resizer/index.js";
8
8
  import "../Store-BtVtCGLk.js";
9
9
  import { i as f } from "../index-JqYHGoo6.js";
@@ -1 +1 @@
1
- "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const L=require("../index-CKTweR3M.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
1
+ "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../SourceElement-DMS25FM0.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const L=require("../index-CKTweR3M.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
@@ -3,7 +3,7 @@ var L = (s) => {
3
3
  };
4
4
  var b = (s, r, t) => r.has(s) || L("Cannot " + t);
5
5
  var e = (s, r, t) => (b(s, r, "read from private field"), t ? t.call(s) : r.get(s)), o = (s, r, t) => r.has(s) ? L("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), u = (s, r, t, a) => (b(s, r, "write to private field"), a ? a.call(s, t) : r.set(s, t), t), E = (s, r, t) => (b(s, r, "access private method"), t);
6
- import { a as g } from "../SourceElement-BiNNtaz9.js";
6
+ import { a as g } from "../SourceElement-BweVAYgJ.js";
7
7
  import "../window-resizer/index.js";
8
8
  import "../Store-BtVtCGLk.js";
9
9
  import { i as v } from "../index-JqYHGoo6.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.80.2",
3
+ "version": "0.81.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,5 +0,0 @@
1
- "use strict";var Y=l=>{throw TypeError(l)};var Z=(l,n,e)=>n.has(l)||Y("Cannot "+e);var t=(l,n,e)=>(Z(l,n,"read from private field"),e?e.call(l):n.get(l)),i=(l,n,e)=>n.has(l)?Y("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(l):n.set(l,e),s=(l,n,e,h)=>(Z(l,n,"write to private field"),h?h.call(l,e):n.set(l,e),e),F=(l,n,e)=>(Z(l,n,"access private method"),e);const rt=require("./element-linked-store/index.cjs"),nt=require("./index-CKTweR3M.cjs"),w=require("./events-KVanG9sR.cjs"),tt=require("./string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");const J=require("./loading/index.cjs"),at=require("./order/index.cjs"),et=require("./window-resizer/index.cjs"),ht=require("./Store-1JrMCgdX.cjs");var V,b,_,L,m,p,M;class st{constructor(n){i(this,V);i(this,b);i(this,_);i(this,L);i(this,m);i(this,p);i(this,M);s(this,V,n);let e=n.split(".");const h=/\b\d{1,2}x\b/g,a=e.find(y=>y.match(h)&&parseInt(y));s(this,_,a?parseInt(a):1),a&&(e=e.slice(0,-1)),s(this,b,e.length>1?e.slice(0,-1).join("."):e.join("."));const o=/\d+max/g,d=/\d+min/g,N=/\d+mar/g,U=/\d+mir/g,W=e.find(y=>y.match(o)),u=e.find(y=>y.match(d)),x=e.find(y=>y.match(N)),X=e.find(y=>y.match(U));x?(s(this,m,parseInt(x)),s(this,p,"max"),s(this,L,`(max-aspect-ratio: ${t(this,m)})`)):X?(s(this,m,parseInt(X)),s(this,p,"max"),s(this,L,`(min-aspect-ratio: ${t(this,m)})`)):W?(s(this,m,parseInt(W)),s(this,p,"max"),s(this,L,`(max-width: ${t(this,m)}px)`)):u?(s(this,m,parseInt(u)),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")):(s(this,m,0),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")),s(this,b,t(this,b).replace(`.${t(this,m)}${t(this,p)}`,"")),s(this,M,e[e.length-1]===t(this,b)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,m)}${t(this,p)}`,""))}get url(){return t(this,V)}get name(){return t(this,b)}get density(){return t(this,_)}get query(){return t(this,L)}get extension(){return t(this,M)}get queryType(){return t(this,p)}get queryValue(){return t(this,m)}}V=new WeakMap,b=new WeakMap,_=new WeakMap,L=new WeakMap,m=new WeakMap,p=new WeakMap,M=new WeakMap;var v;class Q{constructor(n,e){i(this,v);s(this,v,new Map);const h=(e==null?void 0:e.mediaBuckets)!==!1,a=typeof n=="string"?h?n.trim().split(",").map(u=>u.trim()).filter(u=>!!u):[n]:n,o=[];a.forEach(u=>{const x=new st(u);o.push([x.query,x])});const d=o.filter(u=>u[1].queryType.includes("max")).sort((u,x)=>x[1].queryValue-u[1].queryValue),N=o.filter(u=>u[1].queryType.includes("min")&&u[1].queryValue!==0).sort((u,x)=>u[1].queryValue-x[1].queryValue),U=o.filter(u=>u[0]==="(min-width: 0px)");(U?[...U,...d,...N]:[...d,...N]).forEach(u=>{t(this,v).has(u[0])||t(this,v).set(u[0],[]),t(this,v).get(u[0]).push(u[1])})}get mediaBuckets(){return t(this,v)}}v=new WeakMap;var A,$;class it extends ht.Store{constructor(e){super(void 0);i(this,A);i(this,$,()=>{let e;t(this,A).mediaBuckets.forEach((o,d)=>{matchMedia(d).matches&&(e=o)});let h,a=0;e==null||e.forEach(o=>{o.density>a&&o.density<=Math.max(devicePixelRatio,1)&&(a=o.density,h=o)}),e!=null&&e.length&&!h&&(h=e[0]),this.current=h});s(this,A,new Q(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,A,new Q(e.srcset,e.sourceSetOptions)),t(this,$).call(this)}close(){super.close(),this.disconnect()}connect(){et.windowResizer.subscribe(t(this,$),at.RESIZE_ORDER.SOURCE_MANAGER),t(this,$).call(this)}disconnect(){et.windowResizer.unsubscribe(t(this,$))}}A=new WeakMap,$=new WeakMap;function ot(l){if(isNaN(l))return"0:00";const n=Math.floor(Math.max(0,l)),e=Math.floor(n/3600),h=Math.floor(n%3600/60),o=(n%60).toString().padStart(2,"0");if(e>0){const d=h.toString().padStart(2,"0");return`${e}:${d}:${o}`}else return`${h}:${o}`}let ct=0;var f,r,I,E,S,g,z,k,c,R,O,q,B,T,j,G,P,K,D,H,C;class lt extends HTMLElement{constructor(e){super();i(this,T);i(this,f,null);i(this,r,null);i(this,I,this);i(this,E,!1);i(this,S,!1);i(this,g,!1);i(this,z,"");i(this,k,"");i(this,c,new rt.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));i(this,R,null);i(this,O);i(this,q,null);i(this,B);i(this,G,e=>{const h=e[0];t(this,g)&&(!t(this,S)||this.hasAttribute("reload-source"))&&h.isIntersecting&&this.triggerLazyLoad(),h.isIntersecting?w.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(F(this,T,j).call(this,void 0),s(this,S,!1)),w.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,P,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.complete(t(this,k)),w.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,O,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,E,!0)});i(this,K,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.error(t(this,k)),w.dispatchEvent(this,"sourceError",{custom:!0}),s(this,E,!0)});i(this,D,()=>{t(this,c).set("playing",!0),w.dispatchEvent(this,"sourcePlay",{custom:!0})});i(this,H,()=>{t(this,c).set("playing",!1),w.dispatchEvent(this,"sourcePause",{custom:!0})});i(this,C,()=>{const e=t(this,r);(e.tagName==="VIDEO"||e.tagName==="AUDIO")&&e.readyState>=1&&(t(this,c).set("metadata",!0),w.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(h=>{h.textContent=ot(e.duration)}))});s(this,B,e==null?void 0:e.sourceSetOptions),nt.isBrowser&&window.IntersectionObserver&&s(this,R,new IntersectionObserver(t(this,G))),t(this,c).subscribe(h=>{var o;const a=(o=this.getAttribute("data-global-play-class"))==null?void 0:o.split(",");a!=null&&a.length&&(h.current.playing?a.forEach(d=>{document.documentElement.classList.add(d.trim())}):a.forEach(d=>{document.documentElement.classList.remove(d.trim())}))})}get consumerElement(){return t(this,r)}get consumerHolderElement(){return t(this,I)}get sourceManager(){return t(this,f)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,q)}get isFirstLoadHappened(){return t(this,E)}triggerLazyLoad(){!t(this,S)&&t(this,f).current&&t(this,f).current!==t(this,f).previous&&(s(this,S,!0),F(this,T,j).call(this,t(this,f).current))}connectedCallback(){s(this,z,`source-consumer-${++ct}`);const e=this.getAttribute("srcset")||"",h=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;h&&t(this,c).addElement(h),s(this,I,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(a=>a==null?void 0:a.remove()),s(this,r,this.createConsumer()),t(this,r).style.cssText=`
2
- display: block;
3
- width: 100%;
4
- height: 100%;
5
- `,t(this,r).classList.add("source-consumer"),t(this,r).addEventListener("play",t(this,D)),t(this,r).addEventListener("pause",t(this,H)),t(this,r).addEventListener("loadedmetadata",t(this,C)),t(this,C).call(this),this.classList.contains("MaskedVideo__video__element")&&console.log(),Array.from(this.attributes).forEach(a=>{if(a.name!=="srcset"){const o=a.nodeValue||"",d=tt.kebabToCamel(a.name);d in t(this,r)&&(t(this,r)[d]=o||!0)}});for(const a in this.dataset){const o=this.dataset[a],d=tt.kebabToCamel(a);d in t(this,r)&&(t(this,r)[d]=o?o==="false"?!1:o:!0)}t(this,I).appendChild(t(this,r)),s(this,f,new it({srcset:e,sourceSetOptions:t(this,B)})),s(this,g,this.hasAttribute("lazy")),t(this,f).subscribe(a=>{(!t(this,g)||t(this,g)&&t(this,S))&&F(this,T,j).call(this,a.current)}),t(this,f).connect(),t(this,R).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,O)),t(this,R).disconnect(),(e=t(this,f))==null||e.close(),t(this,r)&&(this.consumeSource(null),t(this,r).removeEventListener("play",t(this,D)),t(this,r).removeEventListener("pause",t(this,H)),t(this,r).removeEventListener("loadedmetadata",t(this,C)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,r).onerror=null,t(this,r).remove()),s(this,E,!1),s(this,S,!1),t(this,c).reset()}}f=new WeakMap,r=new WeakMap,I=new WeakMap,E=new WeakMap,S=new WeakMap,g=new WeakMap,z=new WeakMap,k=new WeakMap,c=new WeakMap,R=new WeakMap,O=new WeakMap,q=new WeakMap,B=new WeakMap,T=new WeakSet,j=function(e){if(clearTimeout(t(this,O)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),t(this,c).set("playing",!1),t(this,c).set("metadata",!1),e){s(this,k,`${t(this,z)}-${e.url}`);const h=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,q,h?e.url:e.name+e.extension),this.consumeSource(t(this,q)),!t(this,g)&&!t(this,E)&&J.loading.add(t(this,k)),t(this,r).onloadeddata=()=>{t(this,P).call(this)},t(this,r).onload=()=>{t(this,P).call(this)},t(this,r).onerror=()=>{t(this,K).call(this,t(this,q))}}else s(this,q,null),this.consumeSource(null)},G=new WeakMap,P=new WeakMap,K=new WeakMap,D=new WeakMap,H=new WeakMap,C=new WeakMap;exports.Source=st;exports.SourceElement=lt;exports.SourceManager=it;exports.SourceSet=Q;
@@ -1 +0,0 @@
1
- "use strict";var d=Object.defineProperty,$=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var P=(t,s,e)=>s in t?d(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,u=(t,s)=>{for(var e in s||(s={}))w.call(s,e)&&P(t,e,s[e]);if(m)for(var e of m(s))L.call(s,e)&&P(t,e,s[e]);return t},S=(t,s)=>$(t,g(s));function R(t,{base:s="",trailingSlash:e=!1,mergeParams:r}={}){s=s.endsWith("/")?s.slice(0,-1):s,t=t.replace(s,""),t.startsWith("/")&&(t=t.slice(1));const n=t.split("#"),h=n[0].split("?");let a=h[0].startsWith("/")?h[0]:"/"+h[0];e?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let i=h[1]||"";if(r){const o=new URLSearchParams(i),W=new URLSearchParams(r);for(const[l,y]of W)o.has(l)||o.set(l,y);i=o.toString()}const f=s+a,c=n[1],p=`${f}${i?"?"+i:""}${c?"#"+c:""}`;return{leaf:a,pathname:f,parameters:i,hash:c,path:p}}function U(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function k(t){if(t.action==="none")return;const s=t==null?void 0:t.searchParameters,e=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",r=s?s.startsWith("?")?s:"?"+s:"",n=`${t.pathname}${r}${e}`,h=S(u({},t.state),{path:n});t.action==="push"?history.pushState(h,"",n):t.action==="replace"&&history.replaceState(h,"",n)}function z(t){const s=new URLSearchParams(t),e={};for(const[r,n]of s)e[r]=n;return e}function B(t,s){const e=new URL(location.href),r=(s==null?void 0:s.toString())||"";e.searchParams.set(t,r),history.replaceState(history.state,"",e.href)}exports.changeHistory=k;exports.normalizeBase=U;exports.parseSearchParameters=z;exports.splitPath=R;exports.updateSearchParameter=B;
@@ -1,59 +0,0 @@
1
- var $ = Object.defineProperty, d = Object.defineProperties;
2
- var g = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var w = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
- var u = (t, s, a) => s in t ? $(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a, P = (t, s) => {
6
- for (var a in s || (s = {}))
7
- w.call(s, a) && u(t, a, s[a]);
8
- if (m)
9
- for (var a of m(s))
10
- L.call(s, a) && u(t, a, s[a]);
11
- return t;
12
- }, p = (t, s) => d(t, g(s));
13
- function k(t, { base: s = "", trailingSlash: a = !1, mergeParams: e } = {}) {
14
- s = s.endsWith("/") ? s.slice(0, -1) : s, t = t.replace(s, ""), t.startsWith("/") && (t = t.slice(1));
15
- const n = t.split("#"), h = n[0].split("?");
16
- let r = h[0].startsWith("/") ? h[0] : "/" + h[0];
17
- a ? r = !r.endsWith("/") && r !== "/" ? r + "/" : r : r = r.endsWith("/") && r !== "/" ? r.slice(0, -1) : r;
18
- let i = h[1] || "";
19
- if (e) {
20
- const o = new URLSearchParams(i), W = new URLSearchParams(e);
21
- for (const [l, y] of W)
22
- o.has(l) || o.set(l, y);
23
- i = o.toString();
24
- }
25
- const f = s + r, c = n[1], S = `${f}${i ? "?" + i : ""}${c ? "#" + c : ""}`;
26
- return {
27
- leaf: r,
28
- pathname: f,
29
- parameters: i,
30
- hash: c,
31
- path: S
32
- };
33
- }
34
- function x(t = "/") {
35
- return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
36
- }
37
- function j(t) {
38
- if (t.action === "none")
39
- return;
40
- const s = t == null ? void 0 : t.searchParameters, a = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", e = s ? s.startsWith("?") ? s : "?" + s : "", n = `${t.pathname}${e}${a}`, h = p(P({}, t.state), { path: n });
41
- t.action === "push" ? history.pushState(h, "", n) : t.action === "replace" && history.replaceState(h, "", n);
42
- }
43
- function z(t) {
44
- const s = new URLSearchParams(t), a = {};
45
- for (const [e, n] of s)
46
- a[e] = n;
47
- return a;
48
- }
49
- function B(t, s) {
50
- const a = new URL(location.href), e = (s == null ? void 0 : s.toString()) || "";
51
- a.searchParams.set(t, e), history.replaceState(history.state, "", a.href);
52
- }
53
- export {
54
- j as c,
55
- x as n,
56
- z as p,
57
- k as s,
58
- B as u
59
- };