aptechka 0.52.1 → 0.52.2

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.
@@ -15,7 +15,7 @@ var c = (a, r, e) => r in a ? O(a, r, { enumerable: !0, configurable: !0, writab
15
15
  }, g = (a, r) => b(a, x(r));
16
16
  var A = (a, r, e) => r.has(a) || f("Cannot " + e);
17
17
  var m = (a, r, e) => (A(a, r, "read from private field"), e ? e.call(a) : r.get(a)), n = (a, r, e) => r.has(a) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), u = (a, r, e, i) => (A(a, r, "write to private field"), i ? i.call(a, e) : r.set(a, e), e);
18
- import { l as h, e as T } from "./easings-Bni3YAAW.js";
18
+ import { l as h, e as T } from "./easings-BEmRlrDd.js";
19
19
  import { c as q } from "./math-BOBiC4TN.js";
20
20
  import { p as w } from "./number-DwCxt_Ck.js";
21
21
  import { n as z } from "./polyfills-DJrTJQky.js";
@@ -1,6 +1,6 @@
1
1
  import { A as r } from "../Animation-eO5_LIJl.js";
2
2
  import { D as m } from "../Damped-GyAS-U-z.js";
3
- import { T as t } from "../Tweened-BSC-evuL.js";
3
+ import { T as t } from "../Tweened-BWPx3jJR.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -8,8 +8,8 @@ import { i as b } from "../index-euf5anj6.js";
8
8
  import { g as J } from "../dom-CVWzyXPH.js";
9
9
  import { ticker as A } from "../ticker/index.js";
10
10
  import "../Store-swP_0ymB.js";
11
- import { b as te } from "../easings-Bni3YAAW.js";
12
- import { T as ie } from "../Tweened-BSC-evuL.js";
11
+ import { a as te } from "../easings-BEmRlrDd.js";
12
+ import { T as ie } from "../Tweened-BWPx3jJR.js";
13
13
  import { s as se } from "../gestures-CcXV6fCp.js";
14
14
  import { p as he } from "../number-DwCxt_Ck.js";
15
15
  import { TICK_ORDER as ae } from "../order/index.js";
@@ -18,21 +18,21 @@ const n = (e) => e, s = (e) => e * e, a = (e) => e * (2 - e), r = (e) => e < 0.5
18
18
  linear: n
19
19
  }, Symbol.toStringTag, { value: "Module" }));
20
20
  export {
21
- g as a,
22
- s as b,
23
- a as c,
24
- r as d,
21
+ s as a,
22
+ a as b,
23
+ r as c,
24
+ u as d,
25
25
  x as e,
26
- u as f,
27
- o as g,
28
- c as h,
29
- O as i,
30
- i as j,
31
- I as k,
26
+ o as f,
27
+ c as g,
28
+ O as h,
29
+ i,
30
+ I as j,
31
+ Q as k,
32
32
  n as l,
33
- Q as m,
34
- b as n,
35
- l as o,
36
- p,
37
- d as q
33
+ b as m,
34
+ l as n,
35
+ p as o,
36
+ d as p,
37
+ g as q
38
38
  };
@@ -1 +1 @@
1
- "use strict";var vt=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r),Lt=r=>{throw TypeError(r)};var et=(r,t,s)=>t.has(r)||Lt("Cannot "+s);var e=(r,t,s)=>(et(r,t,"read from private field"),s?s.call(r):t.get(r)),o=(r,t,s)=>t.has(r)?Lt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),a=(r,t,s,i)=>(et(r,t,"write to private field"),i?i.call(r,s):t.set(r,s),s),d=(r,t,s)=>(et(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((i,u)=>{var f=p=>{try{T(s.next(p))}catch(h){u(h)}},M=p=>{try{T(s.throw(p))}catch(h){u(h)}},T=p=>p.done?i(p.value):Promise.resolve(p.value).then(f,M);T((s=s.apply(r,t)).next())});var St=(r,t,s)=>(t=r[vt("asyncIterator")])?t.call(r):(r=r[vt("iterator")](),t={},s=(i,u)=>(u=r[i])&&(t[i]=f=>new Promise((M,T,p)=>(f=u.call(r,f),p=f.done,Promise.resolve(f.value).then(h=>M({value:h,done:p}),T)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bt=require("../index-Cqw2NKev.cjs"),_=require("../events-KVanG9sR.cjs"),xt=require("../polyfills-Df4r-ETT.cjs"),Nt=require("../scroll-H9zqFeML.cjs"),X=require("../url-D1CgmwZ_.cjs"),Dt=require("../css-value-parser/index.cjs");class Pt extends HTMLElement{connectedCallback(){const t={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(t))this.setAttribute(s,i)}}bt.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",Pt);var P,c,x,j,I;class yt{constructor(t,s){o(this,P);o(this,c);o(this,x);o(this,j,t=>{t.preventDefault();const s=e(this,c).getAttribute("data-history-action")||"push",i=e(this,c).hasAttribute("data-center-scroll"),u=getComputedStyle(e(this,c)).getPropertyValue("--offset-scroll").trim(),f=u?Dt.cssValueParser.parse(u):void 0,M=e(this,c).hasAttribute("data-revalidate"),T=e(this,c).hasAttribute("data-keep-search-parameters");e(this,P).navigate(e(this,x),{historyAction:s,centerScroll:i,offsetScroll:f,revalidate:M,keepSearchParameters:T})});o(this,I,()=>{e(this,P).prefetch(e(this,x)),e(this,c).removeEventListener("pointerenter",e(this,I))});a(this,P,s),a(this,c,t),a(this,x,e(this,c).getAttribute("href")||"/"),e(this,c).addEventListener("click",e(this,j)),this.checkCurrent(location.pathname),e(this,c).hasAttribute("data-prefetch")&&e(this,c).addEventListener("pointerenter",e(this,I))}get element(){return e(this,c)}checkCurrent(t){const s=e(this,P).normalizePath(t),i=e(this,P).normalizePath(e(this,x));e(this,c).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?e(this,c).classList.add("current"):i.pathname===s.pathname?e(this,c).classList.add("current"):e(this,c).classList.remove("current")}destroy(){e(this,c).removeEventListener("click",e(this,j)),e(this,c).removeEventListener("pointerenter",e(this,I)),e(this,c).classList.remove("current")}}P=new WeakMap,c=new WeakMap,x=new WeakMap,j=new WeakMap,I=new WeakMap;var N,V,E,D,R,A;class wt{constructor(t,s,i){o(this,N);o(this,V);o(this,E,{x:0,y:0});o(this,D);o(this,R,null);o(this,A,null);a(this,N,t),a(this,V,s),a(this,D,i.cloneNode(!0))}get pathname(){return e(this,V)}get scrollState(){return e(this,E)}get document(){return e(this,A)}cloneDocument(){a(this,A,(e(this,R)||e(this,D)).cloneNode(!0))}get title(){let t="";if(e(this,A).title)t=e(this,A).title;else{const s=e(this,A).querySelector("h1");t=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||e(this,V)}return t}clearScrollState(){e(this,E).x=0,e(this,E).y=0}clearDocumentState(){a(this,R,null)}saveScrollState(){e(this,D).documentElement.hasAttribute("data-no-scroll-restoration")?(e(this,E).x=0,e(this,E).y=0):(e(this,E).x=e(this,N).scrollElement.scrollLeft,e(this,E).y=e(this,N).scrollElement.scrollTop)}saveDocumentState(){e(this,D).documentElement.hasAttribute("data-no-page-restoration")?a(this,R,null):a(this,R,document.cloneNode(!0))}restoreScrollPosition(){e(this,N).scrollElement.scroll({top:e(this,E).y,left:e(this,E).x})}}N=new WeakMap,V=new WeakMap,E=new WeakMap,D=new WeakMap,R=new WeakMap,A=new WeakMap;var k,U,g,Z,C,m,K,q,y,L,B,z,l,st,it,rt,At,nt,ot,at,lt,$,O;class Rt{constructor(t){o(this,l);o(this,k,null);o(this,U,null);o(this,g,[]);o(this,Z,new DOMParser);o(this,C);o(this,m,null);o(this,K);o(this,q,[]);o(this,y,!1);o(this,L,null);o(this,B,new Map);o(this,z,null);o(this,$,t=>H(this,null,function*(){var s;(s=t.state)!=null&&s.path&&(t.preventDefault(),a(this,y,!0),yield this.navigate(t.state.path,{historyAction:"none"}),a(this,y,!1))}));o(this,O,()=>{const t=e(this,L).scrollTop,s=e(this,L).scrollLeft;document.documentElement.classList.toggle("top-scrolled",t>0),document.documentElement.classList.toggle("left-scrolled",s>0),_.dispatchEvent(document,"morphScroll",{detail:{left:s,top:t}})});if(bt.isBrowser){a(this,k,{base:X.normalizeBase(t==null?void 0:t.base),waitForHeadToLoad:(t==null?void 0:t.waitForHeadToLoad)!==!1,cachePages:(t==null?void 0:t.cachePages)!==!1,trailingSlash:(t==null?void 0:t.trailingSlash)||!1,scrollSelector:(t==null?void 0:t.scrollSelector)||"body"}),a(this,U,d(this,l,rt).call(this,document.body));const s=this.normalizePath(location.pathname+location.hash);a(this,m,s.pathname),e(this,B).set(e(this,m),new wt(this,e(this,m),document)),document.documentElement.setAttribute("data-current-pathname",e(this,m)),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),addEventListener("popstate",e(this,$)),X.changeHistory({action:"replace",pathname:e(this,m),searchParameters:s.parameters||location.search,hash:s.hash}),a(this,z,new Pt),d(this,l,at).call(this,document)}}get currentPathname(){return e(this,m)}get previousPathname(){return e(this,K)}get links(){return e(this,g)}get scrollElement(){return e(this,L)}get isPopstateNavigation(){return e(this,y)}normalizePath(t){return X.splitPath(t,{base:e(this,k).base,trailingSlash:e(this,k).trailingSlash})}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);d(this,l,it).call(this,s.pathname)})}navigate(T){return H(this,arguments,function*(t,{historyAction:s="push",centerScroll:i,offsetScroll:u,revalidate:f,keepSearchParameters:M}={}){var ct;if(e(this,q).length)return;const p=this.normalizePath(((ct=this.pathnameModifier)==null?void 0:ct.call(this,t))||t);let{pathname:h,hash:Y,parameters:kt,leaf:Ct}=p;if(e(this,C)===h||e(this,m)===h){e(this,y)||d(this,l,lt).call(this,Y||0,{centerScroll:i,offsetScroll:u,behavior:"smooth"});return}a(this,C,h),e(this,g).forEach(F=>{F.checkCurrent(h)});try{let F=!0;if(this.preprocessor)try{yield new Promise((n,w)=>{var b;(b=this.preprocessor)==null||b.call(this,{pathname:h,resolve:n,reject:w})})}catch(n){n?console.error(n):console.log("Route change canceled"),F=!1}if(!F||e(this,C)!==h){e(this,g).forEach(n=>{n.checkCurrent(e(this,m))});return}const ht=yield d(this,l,st).call(this,e(this,m)),S=yield d(this,l,st).call(this,h,f);if(e(this,C)!==h){e(this,g).forEach(n=>{n.checkCurrent(e(this,m))});return}ht.saveScrollState(),ht.saveDocumentState(),e(this,y)||(S.clearScrollState(),S.clearDocumentState()),S.cloneDocument(),e(this,z).textContent=S.title,document.body.appendChild(e(this,z));const ut={pathname:h};_.dispatchEvent(document,"morphStart",{detail:ut});const dt=Array.from(document.head.children),mt=Array.from(S.document.head.children),ft=d(this,l,At).call(this,dt,mt),Mt=d(this,l,nt).call(this,dt,ft),G=d(this,l,nt).call(this,mt,ft);G.forEach((n,w)=>{if(n.tagName==="SCRIPT"&&n.getAttribute("src")){const b=document.createElement("script");b.type="module",b.src=n.getAttribute("src"),G[w]=b}}),G.forEach(n=>{document.head.appendChild(n)});const tt=G.filter(n=>{if(n.hasAttribute("data-no-waiting"))return!1;if(d(this,l,ot).call(this,n))return!0});e(this,k).waitForHeadToLoad&&tt.length&&(yield new Promise(n=>H(this,null,function*(){let w=0;try{for(var b=St(tt),Et,W,gt;Et=!(W=yield b.next()).done;Et=!1){const J=W.value;J.onload=()=>{w++,w===tt.length&&n()}}}catch(W){gt=[W]}finally{try{Et&&(W=b.return)&&(yield W.call(b))}finally{if(gt)throw gt[0]}}})));const pt=[];Mt.forEach(n=>{n.hasAttribute("data-permanent")||(d(this,l,ot).call(this,n)?pt.push(n):n.remove())});const Tt=d(this,l,rt).call(this,S.document.body);d(this,l,at).call(this,S.document),document.documentElement.setAttribute("data-current-pathname",h),document.documentElement.setAttribute("data-current-leaf",Ct),X.changeHistory({action:s,pathname:h,searchParameters:kt||(M?location.search:""),hash:Y}),e(this,z).remove(),a(this,K,e(this,m)),a(this,m,h),e(this,U).forEach((n,w)=>{const b=Tt[w],Et=getComputedStyle(n).getPropertyValue("--morph-duration"),W=[...b.childNodes];if(Et){const gt=[...n.childNodes];gt.forEach(v=>{v instanceof HTMLElement&&v.classList.add("old")}),W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("new")}),n.prepend(...W),xt.requestIdleCallback(()=>{W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("in")})});const J={morphElement:n,pathname:h};_.dispatchEvent(document,"morphNewChildrenAdded",{detail:J});const Ht=new Promise(v=>{setTimeout(()=>{gt.forEach(Q=>Q.remove()),W.forEach(Q=>{Q instanceof HTMLElement&&Q.classList.remove("in","new")}),_.dispatchEvent(document,"morphOldChildrenRemoved",{detail:J}),v()},(parseFloat(Et)||0)*1e3+10)});e(this,q).push(Ht)}else n.innerHTML="",n.append(...W)}),Y?(S.clearScrollState(),d(this,l,lt).call(this,Y,{centerScroll:i,offsetScroll:u})):e(this,y)&&S.restoreScrollPosition(),yield Promise.all(e(this,q)),pt.forEach(n=>n.remove()),a(this,q,[]),this.findLinks(),_.dispatchEvent(document,"morphComplete",{detail:ut}),window.dispatchEvent(new Event("resize"))}catch(F){console.error(F)}a(this,C,void 0)})}addLink(t){e(this,g).push(new yt(t,this))}addLinks(t){t.forEach(s=>{this.addLink(s)})}removeLink(t){a(this,g,e(this,g).filter(s=>s.element===t?(s.destroy(),!1):!0))}findLinks(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var i;return((i=s.getAttribute("href"))==null?void 0:i.startsWith("/"))&&!s.hasAttribute("download")&&!s.hasAttribute("data-morph-skip")&&!s.closest("[data-morph-skip]")&&s.getAttribute("target")!=="_blank"});e(this,g).forEach(s=>s.destroy()),a(this,g,t.map(s=>new yt(s,this)))}}k=new WeakMap,U=new WeakMap,g=new WeakMap,Z=new WeakMap,C=new WeakMap,m=new WeakMap,K=new WeakMap,q=new WeakMap,y=new WeakMap,L=new WeakMap,B=new WeakMap,z=new WeakMap,l=new WeakSet,st=function(t,s=!1){return H(this,null,function*(){let i=e(this,B).get(t);return(!i||s)&&(i=yield d(this,l,it).call(this,t)),i})},it=function(t){return H(this,null,function*(){const i=yield(yield fetch(t)).text(),u=e(this,Z).parseFromString(i,"text/html"),f=new wt(this,t,u);return e(this,B).set(t,f),f})},rt=function(t){const s=[...t.querySelectorAll("[data-morph]")];return s.length?s:[t]},At=function(t,s){return t.filter(i=>s.find(u=>u.outerHTML===i.outerHTML))},nt=function(t,s){return t.filter(i=>!s.find(u=>u.outerHTML===i.outerHTML))},ot=function(t){return t.tagName==="SCRIPT"||t.tagName==="STYLE"||t.tagName==="LINK"&&t.getAttribute("rel")==="stylesheet"},at=function(t){var s,i;(s=e(this,L))==null||s.removeEventListener("scroll",e(this,O)),a(this,L,t.querySelector(e(this,k).scrollSelector)||t.documentElement),(i=e(this,L))==null||i.addEventListener("scroll",e(this,O)),e(this,O).call(this)},lt=function(t,s){const i=typeof t=="string"?document.getElementById(t):t;(typeof i=="number"||i)&&Nt.scrollToElement(i,{scrollElement:e(this,L),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},$=new WeakMap,O=new WeakMap;exports.Morph=Rt;
1
+ "use strict";var vt=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r),Lt=r=>{throw TypeError(r)};var et=(r,t,s)=>t.has(r)||Lt("Cannot "+s);var e=(r,t,s)=>(et(r,t,"read from private field"),s?s.call(r):t.get(r)),o=(r,t,s)=>t.has(r)?Lt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),a=(r,t,s,i)=>(et(r,t,"write to private field"),i?i.call(r,s):t.set(r,s),s),d=(r,t,s)=>(et(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((i,u)=>{var f=p=>{try{T(s.next(p))}catch(h){u(h)}},M=p=>{try{T(s.throw(p))}catch(h){u(h)}},T=p=>p.done?i(p.value):Promise.resolve(p.value).then(f,M);T((s=s.apply(r,t)).next())});var St=(r,t,s)=>(t=r[vt("asyncIterator")])?t.call(r):(r=r[vt("iterator")](),t={},s=(i,u)=>(u=r[i])&&(t[i]=f=>new Promise((M,T,p)=>(f=u.call(r,f),p=f.done,Promise.resolve(f.value).then(h=>M({value:h,done:p}),T)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("../index-Cqw2NKev.cjs"),_=require("../events-KVanG9sR.cjs"),Nt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../scroll-DAhSpkhR.cjs"),X=require("../url-D1CgmwZ_.cjs"),Dt=require("../css-value-parser/index.cjs");class At extends HTMLElement{connectedCallback(){const t={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(t))this.setAttribute(s,i)}}Pt.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",At);var P,c,x,j,I;class wt{constructor(t,s){o(this,P);o(this,c);o(this,x);o(this,j,t=>{t.preventDefault();const s=e(this,c).getAttribute("data-history-action")||"push",i=e(this,c).hasAttribute("data-center-scroll"),u=getComputedStyle(e(this,c)).getPropertyValue("--offset-scroll").trim(),f=u?Dt.cssValueParser.parse(u):void 0,M=e(this,c).hasAttribute("data-revalidate"),T=e(this,c).hasAttribute("data-keep-search-parameters");e(this,P).navigate(e(this,x),{historyAction:s,centerScroll:i,offsetScroll:f,revalidate:M,keepSearchParameters:T})});o(this,I,()=>{e(this,P).prefetch(e(this,x)),e(this,c).removeEventListener("pointerenter",e(this,I))});a(this,P,s),a(this,c,t),a(this,x,e(this,c).getAttribute("href")||"/"),e(this,c).addEventListener("click",e(this,j)),this.checkCurrent(location.pathname),e(this,c).hasAttribute("data-prefetch")&&e(this,c).addEventListener("pointerenter",e(this,I))}get element(){return e(this,c)}checkCurrent(t){const s=e(this,P).normalizePath(t),i=e(this,P).normalizePath(e(this,x));e(this,c).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?e(this,c).classList.add("current"):i.pathname===s.pathname?e(this,c).classList.add("current"):e(this,c).classList.remove("current")}destroy(){e(this,c).removeEventListener("click",e(this,j)),e(this,c).removeEventListener("pointerenter",e(this,I)),e(this,c).classList.remove("current")}}P=new WeakMap,c=new WeakMap,x=new WeakMap,j=new WeakMap,I=new WeakMap;var N,V,E,D,R,A;class bt{constructor(t,s,i){o(this,N);o(this,V);o(this,E,{x:0,y:0});o(this,D);o(this,R,null);o(this,A,null);a(this,N,t),a(this,V,s),a(this,D,i.cloneNode(!0))}get pathname(){return e(this,V)}get scrollState(){return e(this,E)}get document(){return e(this,A)}cloneDocument(){a(this,A,(e(this,R)||e(this,D)).cloneNode(!0))}get title(){let t="";if(e(this,A).title)t=e(this,A).title;else{const s=e(this,A).querySelector("h1");t=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||e(this,V)}return t}clearScrollState(){e(this,E).x=0,e(this,E).y=0}clearDocumentState(){a(this,R,null)}saveScrollState(){e(this,D).documentElement.hasAttribute("data-no-scroll-restoration")?(e(this,E).x=0,e(this,E).y=0):(e(this,E).x=e(this,N).scrollElement.scrollLeft,e(this,E).y=e(this,N).scrollElement.scrollTop)}saveDocumentState(){e(this,D).documentElement.hasAttribute("data-no-page-restoration")?a(this,R,null):a(this,R,document.cloneNode(!0))}restoreScrollPosition(){e(this,N).scrollElement.scroll({top:e(this,E).y,left:e(this,E).x})}}N=new WeakMap,V=new WeakMap,E=new WeakMap,D=new WeakMap,R=new WeakMap,A=new WeakMap;var k,U,g,Z,C,m,K,q,y,L,B,z,l,st,it,rt,kt,nt,ot,at,lt,$,O;class Rt{constructor(t){o(this,l);o(this,k,null);o(this,U,null);o(this,g,[]);o(this,Z,new DOMParser);o(this,C);o(this,m,null);o(this,K);o(this,q,[]);o(this,y,!1);o(this,L,null);o(this,B,new Map);o(this,z,null);o(this,$,t=>H(this,null,function*(){var s;(s=t.state)!=null&&s.path&&(t.preventDefault(),a(this,y,!0),yield this.navigate(t.state.path,{historyAction:"none"}),a(this,y,!1))}));o(this,O,()=>{const t=e(this,L).scrollTop,s=e(this,L).scrollLeft;document.documentElement.classList.toggle("top-scrolled",t>0),document.documentElement.classList.toggle("left-scrolled",s>0),_.dispatchEvent(document,"morphScroll",{detail:{left:s,top:t}})});if(Pt.isBrowser){a(this,k,{base:X.normalizeBase(t==null?void 0:t.base),waitForHeadToLoad:(t==null?void 0:t.waitForHeadToLoad)!==!1,cachePages:(t==null?void 0:t.cachePages)!==!1,trailingSlash:(t==null?void 0:t.trailingSlash)||!1,scrollSelector:(t==null?void 0:t.scrollSelector)||"body"}),a(this,U,d(this,l,rt).call(this,document.body));const s=this.normalizePath(location.pathname+location.hash);a(this,m,s.pathname),e(this,B).set(e(this,m),new bt(this,e(this,m),document)),document.documentElement.setAttribute("data-current-pathname",e(this,m)),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),addEventListener("popstate",e(this,$)),X.changeHistory({action:"replace",pathname:e(this,m),searchParameters:s.parameters||location.search,hash:s.hash}),a(this,z,new At),d(this,l,at).call(this,document)}}get currentPathname(){return e(this,m)}get previousPathname(){return e(this,K)}get links(){return e(this,g)}get scrollElement(){return e(this,L)}get isPopstateNavigation(){return e(this,y)}normalizePath(t){return X.splitPath(t,{base:e(this,k).base,trailingSlash:e(this,k).trailingSlash})}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);d(this,l,it).call(this,s.pathname)})}navigate(T){return H(this,arguments,function*(t,{historyAction:s="push",centerScroll:i,offsetScroll:u,revalidate:f,keepSearchParameters:M}={}){var ct;if(e(this,q).length)return;const p=this.normalizePath(((ct=this.pathnameModifier)==null?void 0:ct.call(this,t))||t);let{pathname:h,hash:Y,parameters:Ct,leaf:Mt}=p;if(e(this,C)===h||e(this,m)===h){e(this,y)||d(this,l,lt).call(this,Y||0,{centerScroll:i,offsetScroll:u,behavior:"smooth"});return}a(this,C,h),e(this,g).forEach(F=>{F.checkCurrent(h)});try{let F=!0;if(this.preprocessor)try{yield new Promise((n,w)=>{var b;(b=this.preprocessor)==null||b.call(this,{pathname:h,resolve:n,reject:w})})}catch(n){n?console.error(n):console.log("Route change canceled"),F=!1}if(!F||e(this,C)!==h){e(this,g).forEach(n=>{n.checkCurrent(e(this,m))});return}const ht=yield d(this,l,st).call(this,e(this,m)),S=yield d(this,l,st).call(this,h,f);if(e(this,C)!==h){e(this,g).forEach(n=>{n.checkCurrent(e(this,m))});return}ht.saveScrollState(),ht.saveDocumentState(),e(this,y)||(S.clearScrollState(),S.clearDocumentState()),S.cloneDocument(),e(this,z).textContent=S.title,document.body.appendChild(e(this,z));const ut={pathname:h};_.dispatchEvent(document,"morphStart",{detail:ut});const dt=Array.from(document.head.children),mt=Array.from(S.document.head.children),ft=d(this,l,kt).call(this,dt,mt),Tt=d(this,l,nt).call(this,dt,ft),G=d(this,l,nt).call(this,mt,ft);G.forEach((n,w)=>{if(n.tagName==="SCRIPT"&&n.getAttribute("src")){const b=document.createElement("script");b.type="module",b.src=n.getAttribute("src"),G[w]=b}}),G.forEach(n=>{document.head.appendChild(n)});const tt=G.filter(n=>{if(n.hasAttribute("data-no-waiting"))return!1;if(d(this,l,ot).call(this,n))return!0});e(this,k).waitForHeadToLoad&&tt.length&&(yield new Promise(n=>H(this,null,function*(){let w=0;try{for(var b=St(tt),Et,W,gt;Et=!(W=yield b.next()).done;Et=!1){const J=W.value;J.onload=()=>{w++,w===tt.length&&n()}}}catch(W){gt=[W]}finally{try{Et&&(W=b.return)&&(yield W.call(b))}finally{if(gt)throw gt[0]}}}))),yield yt.wait(10);const pt=[];Tt.forEach(n=>{n.hasAttribute("data-permanent")||(d(this,l,ot).call(this,n)?pt.push(n):n.remove())});const Ht=d(this,l,rt).call(this,S.document.body);d(this,l,at).call(this,S.document),document.documentElement.setAttribute("data-current-pathname",h),document.documentElement.setAttribute("data-current-leaf",Mt),X.changeHistory({action:s,pathname:h,searchParameters:Ct||(M?location.search:""),hash:Y}),e(this,z).remove(),a(this,K,e(this,m)),a(this,m,h),e(this,U).forEach((n,w)=>{const b=Ht[w],Et=getComputedStyle(n).getPropertyValue("--morph-duration"),W=[...b.childNodes];if(Et){const gt=[...n.childNodes];gt.forEach(v=>{v instanceof HTMLElement&&v.classList.add("old")}),W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("new")}),n.prepend(...W),Nt.requestIdleCallback(()=>{W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("in")})});const J={morphElement:n,pathname:h};_.dispatchEvent(document,"morphNewChildrenAdded",{detail:J});const xt=new Promise(v=>{setTimeout(()=>{gt.forEach(Q=>Q.remove()),W.forEach(Q=>{Q instanceof HTMLElement&&Q.classList.remove("in","new")}),_.dispatchEvent(document,"morphOldChildrenRemoved",{detail:J}),v()},(parseFloat(Et)||0)*1e3+10)});e(this,q).push(xt)}else n.innerHTML="",n.append(...W)}),Y?(S.clearScrollState(),d(this,l,lt).call(this,Y,{centerScroll:i,offsetScroll:u})):e(this,y)&&S.restoreScrollPosition(),yield Promise.all(e(this,q)),pt.forEach(n=>n.remove()),a(this,q,[]),this.findLinks(),_.dispatchEvent(document,"morphComplete",{detail:ut}),window.dispatchEvent(new Event("resize"))}catch(F){console.error(F)}a(this,C,void 0)})}addLink(t){e(this,g).push(new wt(t,this))}addLinks(t){t.forEach(s=>{this.addLink(s)})}removeLink(t){a(this,g,e(this,g).filter(s=>s.element===t?(s.destroy(),!1):!0))}findLinks(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var i;return((i=s.getAttribute("href"))==null?void 0:i.startsWith("/"))&&!s.hasAttribute("download")&&!s.hasAttribute("data-morph-skip")&&!s.closest("[data-morph-skip]")&&s.getAttribute("target")!=="_blank"});e(this,g).forEach(s=>s.destroy()),a(this,g,t.map(s=>new wt(s,this)))}}k=new WeakMap,U=new WeakMap,g=new WeakMap,Z=new WeakMap,C=new WeakMap,m=new WeakMap,K=new WeakMap,q=new WeakMap,y=new WeakMap,L=new WeakMap,B=new WeakMap,z=new WeakMap,l=new WeakSet,st=function(t,s=!1){return H(this,null,function*(){let i=e(this,B).get(t);return(!i||s)&&(i=yield d(this,l,it).call(this,t)),i})},it=function(t){return H(this,null,function*(){const i=yield(yield fetch(t)).text(),u=e(this,Z).parseFromString(i,"text/html"),f=new bt(this,t,u);return e(this,B).set(t,f),f})},rt=function(t){const s=[...t.querySelectorAll("[data-morph]")];return s.length?s:[t]},kt=function(t,s){return t.filter(i=>s.find(u=>u.outerHTML===i.outerHTML))},nt=function(t,s){return t.filter(i=>!s.find(u=>u.outerHTML===i.outerHTML))},ot=function(t){return t.tagName==="SCRIPT"||t.tagName==="STYLE"||t.tagName==="LINK"&&t.getAttribute("rel")==="stylesheet"},at=function(t){var s,i;(s=e(this,L))==null||s.removeEventListener("scroll",e(this,O)),a(this,L,t.querySelector(e(this,k).scrollSelector)||t.documentElement),(i=e(this,L))==null||i.addEventListener("scroll",e(this,O)),e(this,O).call(this)},lt=function(t,s){const i=typeof t=="string"?document.getElementById(t):t;(typeof i=="number"||i)&&yt.scrollToElement(i,{scrollElement:e(this,L),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},$=new WeakMap,O=new WeakMap;exports.Morph=Rt;
@@ -23,9 +23,9 @@ var Lt = (r, t, s) => (t = r[gt("asyncIterator")]) ? t.call(r) : (r = r[gt("iter
23
23
  import { i as bt } from "../index-euf5anj6.js";
24
24
  import { d as U } from "../events-CsVF98U6.js";
25
25
  import { r as xt } from "../polyfills-DJrTJQky.js";
26
- import { s as Nt } from "../scroll-myLAt-Tq.js";
27
- import { n as Dt, c as St, s as Rt } from "../url-B6BNcw6_.js";
28
- import { cssValueParser as zt } from "../css-value-parser/index.js";
26
+ import { w as Nt, s as Dt } from "../scroll-Benkuq-t.js";
27
+ import { n as Rt, c as St, s as zt } from "../url-B6BNcw6_.js";
28
+ import { cssValueParser as qt } from "../css-value-parser/index.js";
29
29
  class Pt extends HTMLElement {
30
30
  connectedCallback() {
31
31
  const t = {
@@ -39,7 +39,7 @@ class Pt extends HTMLElement {
39
39
  }
40
40
  bt && !customElements.get("morph-announcer") && customElements.define("morph-announcer", Pt);
41
41
  var P, h, x, j, I;
42
- class yt {
42
+ class wt {
43
43
  constructor(t, s) {
44
44
  o(this, P);
45
45
  o(this, h);
@@ -48,7 +48,7 @@ class yt {
48
48
  t.preventDefault();
49
49
  const s = e(this, h).getAttribute(
50
50
  "data-history-action"
51
- ) || "push", i = e(this, h).hasAttribute("data-center-scroll"), u = getComputedStyle(e(this, h)).getPropertyValue("--offset-scroll").trim(), f = u ? zt.parse(u) : void 0, T = e(this, h).hasAttribute("data-revalidate"), M = e(this, h).hasAttribute(
51
+ ) || "push", i = e(this, h).hasAttribute("data-center-scroll"), u = getComputedStyle(e(this, h)).getPropertyValue("--offset-scroll").trim(), f = u ? qt.parse(u) : void 0, T = e(this, h).hasAttribute("data-revalidate"), M = e(this, h).hasAttribute(
52
52
  "data-keep-search-parameters"
53
53
  );
54
54
  e(this, P).navigate(e(this, x), {
@@ -77,7 +77,7 @@ class yt {
77
77
  }
78
78
  P = new WeakMap(), h = new WeakMap(), x = new WeakMap(), j = new WeakMap(), I = new WeakMap();
79
79
  var N, V, E, D, R, A;
80
- class wt {
80
+ class yt {
81
81
  constructor(t, s, i) {
82
82
  o(this, N);
83
83
  o(this, V);
@@ -133,8 +133,8 @@ class wt {
133
133
  }
134
134
  }
135
135
  N = new WeakMap(), V = new WeakMap(), E = new WeakMap(), D = new WeakMap(), R = new WeakMap(), A = new WeakMap();
136
- var k, K, g, X, C, m, Y, z, y, L, B, q, l, et, st, it, At, rt, nt, ot, at, Z, O;
137
- class Ut {
136
+ var k, K, g, X, C, m, Y, z, w, L, B, q, l, et, st, it, At, rt, nt, ot, at, Z, O;
137
+ class jt {
138
138
  constructor(t) {
139
139
  o(this, l);
140
140
  o(this, k, null);
@@ -145,13 +145,13 @@ class Ut {
145
145
  o(this, m, null);
146
146
  o(this, Y);
147
147
  o(this, z, []);
148
- o(this, y, !1);
148
+ o(this, w, !1);
149
149
  o(this, L, null);
150
150
  o(this, B, /* @__PURE__ */ new Map());
151
151
  o(this, q, null);
152
152
  o(this, Z, (t) => H(this, null, function* () {
153
153
  var s;
154
- (s = t.state) != null && s.path && (t.preventDefault(), a(this, y, !0), yield this.navigate(t.state.path, { historyAction: "none" }), a(this, y, !1));
154
+ (s = t.state) != null && s.path && (t.preventDefault(), a(this, w, !0), yield this.navigate(t.state.path, { historyAction: "none" }), a(this, w, !1));
155
155
  }));
156
156
  o(this, O, () => {
157
157
  const t = e(this, L).scrollTop, s = e(this, L).scrollLeft;
@@ -164,7 +164,7 @@ class Ut {
164
164
  });
165
165
  if (bt) {
166
166
  a(this, k, {
167
- base: Dt(t == null ? void 0 : t.base),
167
+ base: Rt(t == null ? void 0 : t.base),
168
168
  waitForHeadToLoad: (t == null ? void 0 : t.waitForHeadToLoad) !== !1,
169
169
  cachePages: (t == null ? void 0 : t.cachePages) !== !1,
170
170
  trailingSlash: (t == null ? void 0 : t.trailingSlash) || !1,
@@ -175,7 +175,7 @@ class Ut {
175
175
  );
176
176
  a(this, m, s.pathname), e(this, B).set(
177
177
  e(this, m),
178
- new wt(this, e(this, m), document)
178
+ new yt(this, e(this, m), document)
179
179
  ), document.documentElement.setAttribute(
180
180
  "data-current-pathname",
181
181
  e(this, m)
@@ -203,10 +203,10 @@ class Ut {
203
203
  return e(this, L);
204
204
  }
205
205
  get isPopstateNavigation() {
206
- return e(this, y);
206
+ return e(this, w);
207
207
  }
208
208
  normalizePath(t) {
209
- return Rt(t, {
209
+ return zt(t, {
210
210
  base: e(this, k).base,
211
211
  trailingSlash: e(this, k).trailingSlash
212
212
  });
@@ -231,7 +231,7 @@ class Ut {
231
231
  const p = this.normalizePath(((lt = this.pathnameModifier) == null ? void 0 : lt.call(this, t)) || t);
232
232
  let { pathname: c, hash: _, parameters: kt, leaf: Ct } = p;
233
233
  if (e(this, C) === c || e(this, m) === c) {
234
- e(this, y) || d(this, l, at).call(this, _ || 0, {
234
+ e(this, w) || d(this, l, at).call(this, _ || 0, {
235
235
  centerScroll: i,
236
236
  offsetScroll: u,
237
237
  behavior: "smooth"
@@ -245,12 +245,12 @@ class Ut {
245
245
  let F = !0;
246
246
  if (this.preprocessor)
247
247
  try {
248
- yield new Promise((n, w) => {
248
+ yield new Promise((n, y) => {
249
249
  var b;
250
250
  (b = this.preprocessor) == null || b.call(this, {
251
251
  pathname: c,
252
252
  resolve: n,
253
- reject: w
253
+ reject: y
254
254
  });
255
255
  });
256
256
  } catch (n) {
@@ -269,7 +269,7 @@ class Ut {
269
269
  });
270
270
  return;
271
271
  }
272
- ht.saveScrollState(), ht.saveDocumentState(), e(this, y) || (S.clearScrollState(), S.clearDocumentState()), S.cloneDocument(), e(this, q).textContent = S.title, document.body.appendChild(e(this, q));
272
+ ht.saveScrollState(), ht.saveDocumentState(), e(this, w) || (S.clearScrollState(), S.clearDocumentState()), S.cloneDocument(), e(this, q).textContent = S.title, document.body.appendChild(e(this, q));
273
273
  const ct = {
274
274
  pathname: c
275
275
  };
@@ -277,10 +277,10 @@ class Ut {
277
277
  detail: ct
278
278
  });
279
279
  const ut = Array.from(document.head.children), dt = Array.from(S.document.head.children), mt = d(this, l, At).call(this, ut, dt), Tt = d(this, l, rt).call(this, ut, mt), G = d(this, l, rt).call(this, dt, mt);
280
- G.forEach((n, w) => {
280
+ G.forEach((n, y) => {
281
281
  if (n.tagName === "SCRIPT" && n.getAttribute("src")) {
282
282
  const b = document.createElement("script");
283
- b.type = "module", b.src = n.getAttribute("src"), G[w] = b;
283
+ b.type = "module", b.src = n.getAttribute("src"), G[y] = b;
284
284
  }
285
285
  }), G.forEach((n) => {
286
286
  document.head.appendChild(n);
@@ -292,12 +292,12 @@ class Ut {
292
292
  return !0;
293
293
  });
294
294
  e(this, k).waitForHeadToLoad && $.length && (yield new Promise((n) => H(this, null, function* () {
295
- let w = 0;
295
+ let y = 0;
296
296
  try {
297
297
  for (var b = Lt($), pt, W, Et; pt = !(W = yield b.next()).done; pt = !1) {
298
298
  const J = W.value;
299
299
  J.onload = () => {
300
- w++, w === $.length && n();
300
+ y++, y === $.length && n();
301
301
  };
302
302
  }
303
303
  } catch (W) {
@@ -310,7 +310,7 @@ class Ut {
310
310
  throw Et[0];
311
311
  }
312
312
  }
313
- })));
313
+ }))), yield Nt(10);
314
314
  const ft = [];
315
315
  Tt.forEach((n) => {
316
316
  n.hasAttribute("data-permanent") || (d(this, l, nt).call(this, n) ? ft.push(n) : n.remove());
@@ -321,8 +321,8 @@ class Ut {
321
321
  pathname: c,
322
322
  searchParameters: kt || (T ? location.search : ""),
323
323
  hash: _
324
- }), e(this, q).remove(), a(this, Y, e(this, m)), a(this, m, c), e(this, K).forEach((n, w) => {
325
- const b = Mt[w], pt = getComputedStyle(n).getPropertyValue("--morph-duration"), W = [...b.childNodes];
324
+ }), e(this, q).remove(), a(this, Y, e(this, m)), a(this, m, c), e(this, K).forEach((n, y) => {
325
+ const b = Mt[y], pt = getComputedStyle(n).getPropertyValue("--morph-duration"), W = [...b.childNodes];
326
326
  if (pt) {
327
327
  const Et = [...n.childNodes];
328
328
  Et.forEach((v) => {
@@ -353,7 +353,7 @@ class Ut {
353
353
  e(this, z).push(Ht);
354
354
  } else
355
355
  n.innerHTML = "", n.append(...W);
356
- }), _ ? (S.clearScrollState(), d(this, l, at).call(this, _, { centerScroll: i, offsetScroll: u })) : e(this, y) && S.restoreScrollPosition(), yield Promise.all(e(this, z)), ft.forEach((n) => n.remove()), a(this, z, []), this.findLinks(), U(document, "morphComplete", {
356
+ }), _ ? (S.clearScrollState(), d(this, l, at).call(this, _, { centerScroll: i, offsetScroll: u })) : e(this, w) && S.restoreScrollPosition(), yield Promise.all(e(this, z)), ft.forEach((n) => n.remove()), a(this, z, []), this.findLinks(), U(document, "morphComplete", {
357
357
  detail: ct
358
358
  }), window.dispatchEvent(new Event("resize"));
359
359
  } catch (F) {
@@ -363,7 +363,7 @@ class Ut {
363
363
  });
364
364
  }
365
365
  addLink(t) {
366
- e(this, g).push(new yt(t, this));
366
+ e(this, g).push(new wt(t, this));
367
367
  }
368
368
  addLinks(t) {
369
369
  t.forEach((s) => {
@@ -382,17 +382,17 @@ class Ut {
382
382
  return ((i = s.getAttribute("href")) == null ? void 0 : i.startsWith("/")) && !s.hasAttribute("download") && !s.hasAttribute("data-morph-skip") && !s.closest("[data-morph-skip]") && s.getAttribute("target") !== "_blank";
383
383
  }
384
384
  );
385
- e(this, g).forEach((s) => s.destroy()), a(this, g, t.map((s) => new yt(s, this)));
385
+ e(this, g).forEach((s) => s.destroy()), a(this, g, t.map((s) => new wt(s, this)));
386
386
  }
387
387
  }
388
- k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), z = new WeakMap(), y = new WeakMap(), L = new WeakMap(), B = new WeakMap(), q = new WeakMap(), l = new WeakSet(), et = function(t, s = !1) {
388
+ k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), z = new WeakMap(), w = new WeakMap(), L = new WeakMap(), B = new WeakMap(), q = new WeakMap(), l = new WeakSet(), et = function(t, s = !1) {
389
389
  return H(this, null, function* () {
390
390
  let i = e(this, B).get(t);
391
391
  return (!i || s) && (i = yield d(this, l, st).call(this, t)), i;
392
392
  });
393
393
  }, st = function(t) {
394
394
  return H(this, null, function* () {
395
- const i = yield (yield fetch(t)).text(), u = e(this, X).parseFromString(i, "text/html"), f = new wt(this, t, u);
395
+ const i = yield (yield fetch(t)).text(), u = e(this, X).parseFromString(i, "text/html"), f = new yt(this, t, u);
396
396
  return e(this, B).set(t, f), f;
397
397
  });
398
398
  }, it = function(t) {
@@ -420,7 +420,7 @@ k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C =
420
420
  ), a(this, L, t.querySelector(e(this, k).scrollSelector) || t.documentElement), (i = e(this, L)) == null || i.addEventListener("scroll", e(this, O)), e(this, O).call(this);
421
421
  }, at = function(t, s) {
422
422
  const i = typeof t == "string" ? document.getElementById(t) : t;
423
- (typeof i == "number" || i) && Nt(i, {
423
+ (typeof i == "number" || i) && Dt(i, {
424
424
  scrollElement: e(this, L),
425
425
  behavior: (s == null ? void 0 : s.behavior) || "instant",
426
426
  center: s == null ? void 0 : s.centerScroll,
@@ -428,5 +428,5 @@ k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C =
428
428
  });
429
429
  }, Z = new WeakMap(), O = new WeakMap();
430
430
  export {
431
- Ut as Morph
431
+ jt as Morph
432
432
  };
@@ -16,7 +16,7 @@ var ye = (d, n, e) => n.has(d) || Te("Cannot " + e);
16
16
  var t = (d, n, e) => (ye(d, n, "read from private field"), e ? e.call(d) : n.get(d)), s = (d, n, e) => n.has(d) ? Te("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), h = (d, n, e, i) => (ye(d, n, "write to private field"), i ? i.call(d, e) : n.set(d, e), e), c = (d, n, e) => (ye(d, n, "access private method"), e);
17
17
  import { S as Ge } from "../Store-swP_0ymB.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
- import { a as Ke } from "../easings-Bni3YAAW.js";
19
+ import { q as Ke } from "../easings-BEmRlrDd.js";
20
20
  import { d as ee } from "../events-CsVF98U6.js";
21
21
  import { d as Re } from "../function-C10DGppn.js";
22
22
  import { c as Oe } from "../jss-DtnXPEnq.js";
@@ -26,7 +26,7 @@ import { p as _e, l as Ze } from "../number-DwCxt_Ck.js";
26
26
  import "../ticker/index.js";
27
27
  import { TICK_ORDER as je, RESIZE_ORDER as we } from "../order/index.js";
28
28
  import { D as Je } from "../Damped-GyAS-U-z.js";
29
- import { T as Qe } from "../Tweened-BSC-evuL.js";
29
+ import { T as Qe } from "../Tweened-BWPx3jJR.js";
30
30
  import { WheelControls as Xe, KeyboardControls as Ye, DragControls as ts, AutoplayControls as es } from "../controls/index.js";
31
31
  import { windowResizer as Rt } from "../window-resizer/index.js";
32
32
  import { scrollEntries as vt } from "../scroll-entries/index.js";
@@ -0,0 +1,36 @@
1
+ import { g as r, f as u } from "./dom-CVWzyXPH.js";
2
+ import { a as c } from "./layout-DpZo-I0y.js";
3
+ import "./index-euf5anj6.js";
4
+ function y(e) {
5
+ return new Promise((o) => {
6
+ setTimeout(() => {
7
+ o();
8
+ }, e);
9
+ });
10
+ }
11
+ function E(e, {
12
+ behavior: o = "instant",
13
+ offset: i = 0,
14
+ center: m = !1,
15
+ scrollElement: s
16
+ } = {}) {
17
+ var l;
18
+ let n, f = s, a = s;
19
+ if (typeof e == "number")
20
+ n = e;
21
+ else {
22
+ const t = r(e);
23
+ t && (f = t, a = s || u(t), n = c(t));
24
+ }
25
+ if (f && a && typeof n == "number") {
26
+ const t = (typeof i == "number" ? i : ((l = r(i)) == null ? void 0 : l.offsetHeight) || 0) * -1, p = m ? innerHeight / 2 * -1 + f.offsetHeight / 2 : 0;
27
+ a.scroll({
28
+ top: n + t + p,
29
+ behavior: o
30
+ });
31
+ }
32
+ }
33
+ export {
34
+ E as s,
35
+ y as w
36
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./dom-JBOkFLTh.cjs"),m=require("./layout-Ctc2p3uz.cjs");require("./index-Cqw2NKev.cjs");function g(t){return new Promise(i=>{setTimeout(()=>{i()},t)})}function p(t,{behavior:i="instant",offset:o=0,center:a=!1,scrollElement:l}={}){var u;let n,s=l,f=l;if(typeof t=="number")n=t;else{const e=r.getElement(t);e&&(s=e,f=l||r.findScrollParentElement(e),n=m.getCumulativeOffsetTop(e))}if(s&&f&&typeof n=="number"){const e=(typeof o=="number"?o:((u=r.getElement(o))==null?void 0:u.offsetHeight)||0)*-1,c=a?innerHeight/2*-1+s.offsetHeight/2:0;f.scroll({top:n+e+c,behavior:i})}}exports.scrollToElement=p;exports.wait=g;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),q=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),w=require("../gestures-C7gbKx11.cjs"),O=require("../jss-CRBgdvJ3.cjs"),m=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),f=require("../number-0243DApo.cjs"),l=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),Q=require("../scroll-H9zqFeML.cjs"),c=require("../string-DUXXtU8v.cjs"),S=require("../style-At6aDoqG.cjs"),u=require("../url-D1CgmwZ_.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function D(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let s=0;s<n;s++){const a=(s+e)%n;o[a]=t[s]}return o}function A(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,a)).toFixed(o))} ${s[a]}`}function R(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 N(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function z(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?E(t,o.slice(4,-1)):o}}function M(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(s=>{const a=E(o,s);a&&(e[s]=a)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function j(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function k(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function U(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function F(t,e,n,o){let s,a=!1,b=0;const x=()=>{clearInterval(s),o!=null&&o.restartCounter&&(b=0),a&&(s=setInterval(()=>{n(b++)},e))},v=y.intersector.subscribe(t,P=>{a=P.isIntersecting,x()});return()=>{v(),clearInterval(s)}}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=y.isBrowser;exports.contain=d.contain;exports.cover=d.cover;exports.fixPosition=d.fixPosition;exports.measureText=d.measureText;exports.getPointerPosition=g.getPointerPosition;exports.normalize=g.normalize;exports.screenToCartesian=g.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchEvent=q.dispatchEvent;exports.createJSONAndSave=C.createJSONAndSave;exports.downloadURI=C.downloadURI;exports.debounce=I.debounce;exports.throttle=I.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=m.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=m.getCumulativeOffsetTop;exports.getCumulativePosition=m.getCumulativePosition;exports.getStickyOffset=m.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=l.cloneDeep;exports.compareObjects=l.compareObjects;exports.isESClass=l.isESClass;exports.isNullish=l.isNullish;exports.isObject=l.isObject;exports.mergeDeep=l.mergeDeep;exports.mixin=l.mixin;exports.omit=l.omit;exports.pick=l.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=Q.scrollToElement;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.declension=c.declension;exports.decodeHtmlEntities=c.decodeHtmlEntities;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=S.getElementTransitionDurationMS;exports.getElementTransitionDurationS=S.getElementTransitionDurationS;exports.changeHistory=u.changeHistory;exports.normalizeBase=u.normalizeBase;exports.parseSearchParameters=u.parseSearchParameters;exports.splitPath=u.splitPath;exports.updateSearchParameter=u.updateSearchParameter;exports.cloneTemplateContent=U;exports.copyTextToClipboard=R;exports.decode=k;exports.dotCircleCollision=z;exports.dotRectCollision=N;exports.encode=j;exports.formatBytes=A;exports.getRootVariables=M;exports.insert=B;exports.setIntervalOnIntersection=F;exports.shiftArray=D;exports.wait=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),w=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),Q=require("../gestures-C7gbKx11.cjs"),O=require("../jss-CRBgdvJ3.cjs"),m=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),f=require("../number-0243DApo.cjs"),l=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),S=require("../scroll-DAhSpkhR.cjs"),c=require("../string-DUXXtU8v.cjs"),E=require("../style-At6aDoqG.cjs"),u=require("../url-D1CgmwZ_.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function D(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let s=0;s<n;s++){const a=(s+e)%n;o[a]=t[s]}return o}function A(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,a)).toFixed(o))} ${s[a]}`}function R(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 N(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function z(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function x(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?x(t,o.slice(4,-1)):o}}function M(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(s=>{const a=x(o,s);a&&(e[s]=a)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function j(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function k(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function U(t,e,n,o){let s,a=!1,b=0;const v=()=>{clearInterval(s),o!=null&&o.restartCounter&&(b=0),a&&(s=setInterval(()=>{n(b++)},e))},P=y.intersector.subscribe(t,q=>{a=q.isIntersecting,v()});return()=>{P(),clearInterval(s)}}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=y.isBrowser;exports.contain=d.contain;exports.cover=d.cover;exports.fixPosition=d.fixPosition;exports.measureText=d.measureText;exports.getPointerPosition=g.getPointerPosition;exports.normalize=g.normalize;exports.screenToCartesian=g.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchEvent=w.dispatchEvent;exports.createJSONAndSave=C.createJSONAndSave;exports.downloadURI=C.downloadURI;exports.debounce=I.debounce;exports.throttle=I.throttle;exports.setupDrag=Q.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=m.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=m.getCumulativeOffsetTop;exports.getCumulativePosition=m.getCumulativePosition;exports.getStickyOffset=m.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=l.cloneDeep;exports.compareObjects=l.compareObjects;exports.isESClass=l.isESClass;exports.isNullish=l.isNullish;exports.isObject=l.isObject;exports.mergeDeep=l.mergeDeep;exports.mixin=l.mixin;exports.omit=l.omit;exports.pick=l.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=S.scrollToElement;exports.wait=S.wait;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.declension=c.declension;exports.decodeHtmlEntities=c.decodeHtmlEntities;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=E.getElementTransitionDurationMS;exports.getElementTransitionDurationS=E.getElementTransitionDurationS;exports.changeHistory=u.changeHistory;exports.normalizeBase=u.normalizeBase;exports.parseSearchParameters=u.parseSearchParameters;exports.splitPath=u.splitPath;exports.updateSearchParameter=u.updateSearchParameter;exports.cloneTemplateContent=V;exports.copyTextToClipboard=R;exports.decode=k;exports.dotCircleCollision=z;exports.dotRectCollision=N;exports.encode=j;exports.formatBytes=A;exports.getRootVariables=M;exports.insert=B;exports.setIntervalOnIntersection=U;exports.shiftArray=D;
@@ -1,40 +1,40 @@
1
- import { a as O, p as P } from "../attributes-69we3byR.js";
1
+ import { a as w, p as O } from "../attributes-69we3byR.js";
2
2
  import { a as f } from "../index-euf5anj6.js";
3
- import { i as A } from "../index-euf5anj6.js";
4
- import { a as R, c as D, f as M, m as N } from "../canvas-DeZ0SLUJ.js";
5
- import { g as F, n as V, s as j } from "../coordinates-CgdGoSYs.js";
6
- import { b as U, f as q, a as $, g as H } from "../dom-CVWzyXPH.js";
7
- import { f as W, p as G, h as J, a as L, d as Y, k as Z, o as X, b as _, i as ee, m as te, g as se, q as ae, c as oe, j as re, n as ne, l as ie } from "../easings-Bni3YAAW.js";
8
- import { d as le } from "../events-CsVF98U6.js";
9
- import { c as fe, d as pe } from "../file-GHShUlue.js";
10
- import { d as me, t as xe } from "../function-C10DGppn.js";
11
- import { s as be } from "../gestures-CcXV6fCp.js";
12
- import { c as ye, s as Ce } from "../jss-DtnXPEnq.js";
13
- import { g as ve, a as Te, b as Ee, c as Se } from "../layout-DpZo-I0y.js";
14
- import { e as Oe, f as Pe, c as Be, d as Ae, l as Qe, m as Re, r as De, b as Me, a as Ne, s as ze } from "../math-BOBiC4TN.js";
15
- import { l as Ve, p as je, r as ke, t as Ue } from "../number-DwCxt_Ck.js";
16
- import { c as $e, d as He, i as Ke, b as We, a as Ge, m as Je, e as Le, o as Ye, p as Ze } from "../object-D6MVWB4l.js";
17
- import { n as _e, r as et } from "../polyfills-DJrTJQky.js";
18
- import { s as st } from "../scroll-myLAt-Tq.js";
3
+ import { i as B } from "../index-euf5anj6.js";
4
+ import { a as Q, c as R, f as D, m as M } from "../canvas-DeZ0SLUJ.js";
5
+ import { g as z, n as F, s as V } from "../coordinates-CgdGoSYs.js";
6
+ import { b as k, f as U, a as q, g as $ } from "../dom-CVWzyXPH.js";
7
+ import { d as K, o as W, g as G, q as J, c as L, j as Y, n as Z, a as X, h as _, k as ee, f as te, p as ae, b as se, i as oe, m as re, l as ne } from "../easings-BEmRlrDd.js";
8
+ import { d as ce } from "../events-CsVF98U6.js";
9
+ import { c as ue, d as fe } from "../file-GHShUlue.js";
10
+ import { d as de, t as me } from "../function-C10DGppn.js";
11
+ import { s as ge } from "../gestures-CcXV6fCp.js";
12
+ import { c as he, s as ye } from "../jss-DtnXPEnq.js";
13
+ import { g as Ie, a as ve, b as Ee, c as Se } from "../layout-DpZo-I0y.js";
14
+ import { e as we, f as Oe, c as Pe, d as Be, l as Ae, m as Qe, r as Re, b as De, a as Me, s as Ne } from "../math-BOBiC4TN.js";
15
+ import { l as Fe, p as Ve, r as je, t as ke } from "../number-DwCxt_Ck.js";
16
+ import { c as qe, d as $e, i as He, b as Ke, a as We, m as Ge, e as Je, o as Le, p as Ye } from "../object-D6MVWB4l.js";
17
+ import { n as Xe, r as _e } from "../polyfills-DJrTJQky.js";
18
+ import { s as tt, w as at } from "../scroll-Benkuq-t.js";
19
19
  import { c as ot, a as rt, b as nt, d as it, g as ct, i as lt, k as ut, s as ft, t as pt, u as dt } from "../string-BlMQbe8b.js";
20
20
  import { g as xt, a as gt } from "../style-j2TwriJ_.js";
21
21
  import { c as ht, n as yt, p as Ct, s as It, u as vt } from "../url-B6BNcw6_.js";
22
- function d(t, e, ...s) {
23
- return [...t.slice(0, e), ...s, ...t.slice(e)];
22
+ function d(t, e, ...a) {
23
+ return [...t.slice(0, e), ...a, ...t.slice(e)];
24
24
  }
25
25
  function m(t, e) {
26
- const s = t.length;
27
- e = e % s;
28
- const a = new Array(s);
29
- for (let o = 0; o < s; o++) {
30
- const r = (o + e) % s;
31
- a[r] = t[o];
26
+ const a = t.length;
27
+ e = e % a;
28
+ const s = new Array(a);
29
+ for (let o = 0; o < a; o++) {
30
+ const r = (o + e) % a;
31
+ s[r] = t[o];
32
32
  }
33
- return a;
33
+ return s;
34
34
  }
35
35
  function x(t, e = 2) {
36
36
  if (!+t) return "0 Bytes";
37
- const s = 1024, a = e < 0 ? 0 : e, o = [
37
+ const a = 1024, s = e < 0 ? 0 : e, o = [
38
38
  "Bytes",
39
39
  "KiB",
40
40
  "MiB",
@@ -44,8 +44,8 @@ function x(t, e = 2) {
44
44
  "EiB",
45
45
  "ZiB",
46
46
  "YiB"
47
- ], r = Math.floor(Math.log(t) / Math.log(s));
48
- return `${parseFloat((t / Math.pow(s, r)).toFixed(a))} ${o[r]}`;
47
+ ], r = Math.floor(Math.log(t) / Math.log(a));
48
+ return `${parseFloat((t / Math.pow(a, r)).toFixed(s))} ${o[r]}`;
49
49
  }
50
50
  function g(t) {
51
51
  if (navigator.clipboard)
@@ -59,8 +59,8 @@ function g(t) {
59
59
  e.value = t, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", document.body.appendChild(e), e.select();
60
60
  try {
61
61
  document.execCommand("copy") ? console.log("Text copied to clipboard successfully!") : console.error("Failed to copy text to clipboard.");
62
- } catch (s) {
63
- console.error("Failed to copy text to clipboard:", s);
62
+ } catch (a) {
63
+ console.error("Failed to copy text to clipboard:", a);
64
64
  }
65
65
  document.body.removeChild(e);
66
66
  }
@@ -72,23 +72,23 @@ function h(t, e) {
72
72
  return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
73
73
  }
74
74
  function i(t, e) {
75
- const s = t.style.getPropertyValue(e);
76
- if (s) {
77
- const a = s.toString();
78
- return a.startsWith("var") ? i(t, a.slice(4, -1)) : a;
75
+ const a = t.style.getPropertyValue(e);
76
+ if (a) {
77
+ const s = a.toString();
78
+ return s.startsWith("var") ? i(t, s.slice(4, -1)) : s;
79
79
  }
80
80
  }
81
81
  function y(...t) {
82
82
  const e = {};
83
- return Array.from(document.styleSheets).forEach((s) => {
84
- Array.from(s.cssRules).forEach((a) => {
85
- a instanceof CSSStyleRule && a.selectorText === ":root" && t.forEach((o) => {
86
- const r = i(a, o);
83
+ return Array.from(document.styleSheets).forEach((a) => {
84
+ Array.from(a.cssRules).forEach((s) => {
85
+ s instanceof CSSStyleRule && s.selectorText === ":root" && t.forEach((o) => {
86
+ const r = i(s, o);
87
87
  r && (e[o] = r);
88
88
  });
89
89
  });
90
- }), t.forEach((s) => {
91
- e[s] || console.warn(`variable named ${s} not found`);
90
+ }), t.forEach((a) => {
91
+ e[a] || console.warn(`variable named ${a} not found`);
92
92
  }), e;
93
93
  }
94
94
  function C(t) {
@@ -99,25 +99,18 @@ function I(t) {
99
99
  const e = window.unescape(encodeURIComponent(t));
100
100
  return window.btoa(e);
101
101
  }
102
- function v(t) {
103
- return new Promise((e) => {
104
- setTimeout(() => {
105
- e();
106
- }, t);
107
- });
108
- }
109
- function T(t, e) {
102
+ function v(t, e) {
110
103
  if (t) {
111
- const a = t.content.cloneNode(!0).firstElementChild;
112
- return a && (e == null || e(a)), a;
104
+ const s = t.content.cloneNode(!0).firstElementChild;
105
+ return s && (e == null || e(s)), s;
113
106
  }
114
107
  return null;
115
108
  }
116
- function E(t, e, s, a) {
109
+ function E(t, e, a, s) {
117
110
  let o, r = !1, n = 0;
118
111
  const c = () => {
119
- clearInterval(o), a != null && a.restartCounter && (n = 0), r && (o = setInterval(() => {
120
- s(n++);
112
+ clearInterval(o), s != null && s.restartCounter && (n = 0), r && (o = setInterval(() => {
113
+ a(n++);
121
114
  }, e));
122
115
  }, l = f.subscribe(t, (u) => {
123
116
  r = u.isIntersecting, c();
@@ -127,101 +120,101 @@ function E(t, e, s, a) {
127
120
  };
128
121
  }
129
122
  export {
130
- Oe as calculateDistance,
131
- Pe as calculateDistanceWithRadius,
123
+ we as calculateDistance,
124
+ Oe as calculateDistanceWithRadius,
132
125
  ot as camelToKebab,
133
126
  rt as capitalize,
134
127
  ht as changeHistory,
135
- Be as clamp,
136
- $e as cloneDeep,
137
- T as cloneTemplateContent,
138
- He as compareObjects,
139
- R as contain,
128
+ Pe as clamp,
129
+ qe as cloneDeep,
130
+ v as cloneTemplateContent,
131
+ $e as compareObjects,
132
+ Q as contain,
140
133
  g as copyTextToClipboard,
141
- D as cover,
142
- fe as createJSONAndSave,
143
- ye as createStylesheet,
144
- Ae as damp,
145
- me as debounce,
134
+ R as cover,
135
+ ue as createJSONAndSave,
136
+ he as createStylesheet,
137
+ Be as damp,
138
+ de as debounce,
146
139
  nt as declension,
147
140
  I as decode,
148
141
  it as decodeHtmlEntities,
149
- le as dispatchEvent,
142
+ ce as dispatchEvent,
150
143
  h as dotCircleCollision,
151
144
  b as dotRectCollision,
152
- pe as downloadURI,
153
- W as easeInCubic,
154
- G as easeInExpo,
155
- J as easeInOutCubic,
156
- L as easeInOutExpo,
157
- Y as easeInOutQuad,
158
- Z as easeInOutQuart,
159
- X as easeInOutQuint,
160
- _ as easeInQuad,
161
- ee as easeInQuart,
162
- te as easeInQuint,
163
- se as easeOutCubic,
145
+ fe as downloadURI,
146
+ K as easeInCubic,
147
+ W as easeInExpo,
148
+ G as easeInOutCubic,
149
+ J as easeInOutExpo,
150
+ L as easeInOutQuad,
151
+ Y as easeInOutQuart,
152
+ Z as easeInOutQuint,
153
+ X as easeInQuad,
154
+ _ as easeInQuart,
155
+ ee as easeInQuint,
156
+ te as easeOutCubic,
164
157
  ae as easeOutExpo,
165
- oe as easeOutQuad,
166
- re as easeOutQuart,
167
- ne as easeOutQuint,
158
+ se as easeOutQuad,
159
+ oe as easeOutQuart,
160
+ re as easeOutQuint,
168
161
  C as encode,
169
- U as findParentElement,
170
- q as findScrollParentElement,
171
- M as fixPosition,
162
+ k as findParentElement,
163
+ U as findScrollParentElement,
164
+ D as fixPosition,
172
165
  x as formatBytes,
173
166
  ct as generateId,
174
- $ as getAllParentElements,
175
- ve as getCumulativeOffsetLeft,
176
- Te as getCumulativeOffsetTop,
167
+ q as getAllParentElements,
168
+ Ie as getCumulativeOffsetLeft,
169
+ ve as getCumulativeOffsetTop,
177
170
  Ee as getCumulativePosition,
178
- H as getElement,
171
+ $ as getElement,
179
172
  xt as getElementTransitionDurationMS,
180
173
  gt as getElementTransitionDurationS,
181
- F as getPointerPosition,
174
+ z as getPointerPosition,
182
175
  y as getRootVariables,
183
176
  Se as getStickyOffset,
184
177
  d as insert,
185
- A as isBrowser,
186
- Ke as isESClass,
187
- We as isNullish,
188
- Ge as isObject,
178
+ B as isBrowser,
179
+ He as isESClass,
180
+ Ke as isNullish,
181
+ We as isObject,
189
182
  lt as isUppercase,
190
183
  ut as kebabToCamel,
191
- Qe as lerp,
192
- ie as linear,
193
- Ve as loopNumber,
194
- Re as mapRange,
195
- N as measureText,
196
- Je as mergeDeep,
197
- Le as mixin,
198
- V as normalize,
184
+ Ae as lerp,
185
+ ne as linear,
186
+ Fe as loopNumber,
187
+ Qe as mapRange,
188
+ M as measureText,
189
+ Ge as mergeDeep,
190
+ Je as mixin,
191
+ F as normalize,
199
192
  yt as normalizeBase,
200
- _e as nullishCoalescing,
201
- Ye as omit,
202
- O as parseAttribute,
203
- P as parseAttributeValue,
193
+ Xe as nullishCoalescing,
194
+ Le as omit,
195
+ w as parseAttribute,
196
+ O as parseAttributeValue,
204
197
  Ct as parseSearchParameters,
205
- Ze as pick,
206
- je as preciseNumber,
207
- et as requestIdleCallback,
208
- De as round,
209
- ke as roundNumberTo,
210
- j as screenToCartesian,
211
- st as scrollToElement,
198
+ Ye as pick,
199
+ Ve as preciseNumber,
200
+ _e as requestIdleCallback,
201
+ Re as round,
202
+ je as roundNumberTo,
203
+ V as screenToCartesian,
204
+ tt as scrollToElement,
212
205
  E as setIntervalOnIntersection,
213
- be as setupDrag,
206
+ ge as setupDrag,
214
207
  m as shiftArray,
215
- Me as smootherstep,
216
- Ne as smoothstep,
208
+ De as smootherstep,
209
+ Me as smoothstep,
217
210
  ft as snakeToDotted,
218
211
  It as splitPath,
219
- ze as step,
220
- Ce as styleToString,
221
- xe as throttle,
212
+ Ne as step,
213
+ ye as styleToString,
214
+ me as throttle,
222
215
  pt as toPascalCase,
223
- Ue as toStep,
216
+ ke as toStep,
224
217
  dt as uncapitalize,
225
218
  vt as updateSearchParameter,
226
- v as wait
219
+ at as wait
227
220
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.52.1",
3
+ "version": "0.52.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1 +0,0 @@
1
- "use strict";const f=require("./dom-JBOkFLTh.cjs"),m=require("./layout-Ctc2p3uz.cjs");require("./index-Cqw2NKev.cjs");function g(n,{behavior:u="instant",offset:o=0,center:c=!1,scrollElement:l}={}){var r;let t,i=l,s=l;if(typeof n=="number")t=n;else{const e=f.getElement(n);e&&(i=e,s=l||f.findScrollParentElement(e),t=m.getCumulativeOffsetTop(e))}if(i&&s&&typeof t=="number"){const e=(typeof o=="number"?o:((r=f.getElement(o))==null?void 0:r.offsetHeight)||0)*-1,a=c?innerHeight/2*-1+i.offsetHeight/2:0;s.scroll({top:t+e+a,behavior:u})}}exports.scrollToElement=g;
@@ -1,28 +0,0 @@
1
- import { g as l, f as c } from "./dom-CVWzyXPH.js";
2
- import { a as g } from "./layout-DpZo-I0y.js";
3
- import "./index-euf5anj6.js";
4
- function E(n, {
5
- behavior: m = "instant",
6
- offset: o = 0,
7
- center: p = !1,
8
- scrollElement: f
9
- } = {}) {
10
- var a;
11
- let e, i = f, s = f;
12
- if (typeof n == "number")
13
- e = n;
14
- else {
15
- const t = l(n);
16
- t && (i = t, s = f || c(t), e = g(t));
17
- }
18
- if (i && s && typeof e == "number") {
19
- const t = (typeof o == "number" ? o : ((a = l(o)) == null ? void 0 : a.offsetHeight) || 0) * -1, r = p ? innerHeight / 2 * -1 + i.offsetHeight / 2 : 0;
20
- s.scroll({
21
- top: e + t + r,
22
- behavior: m
23
- });
24
- }
25
- }
26
- export {
27
- E as s
28
- };