svg-scroll-draw 2.19.1 → 2.20.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.
package/README.md CHANGED
@@ -630,7 +630,7 @@ devtools.highlight('#my-element'); // outline for 2 seconds
630
630
  | Entry | Gzipped |
631
631
  |---|---|
632
632
  | `svg-scroll-draw` (main, every core API) | 11.4 KB |
633
- | `svg-scroll-draw/react` (includes the engine) | 12.8 KB |
633
+ | `svg-scroll-draw/react` (includes the engine) | 12.9 KB |
634
634
  | `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.3 KB |
635
635
  | `svg-scroll-draw/reveal` | 5.5 KB |
636
636
  | `svg-scroll-draw/text` | 3.1 KB |
@@ -640,7 +640,7 @@ devtools.highlight('#my-element'); // outline for 2 seconds
640
640
  | `svg-scroll-draw/aos` (styles included) | 3.1 KB |
641
641
  | `svg-scroll-draw/snap` | 1.9 KB |
642
642
  | `svg-scroll-draw/devtools` | 1.8 KB (dev only) |
643
- | `svg-scroll-draw/pin` | 1.4 KB |
643
+ | `svg-scroll-draw/pin` | 1.6 KB |
644
644
  <!-- size-table:end -->
645
645
 
646
646
  Measured with `npm run size`: each entry plus the shared chunks it imports, minified, gzip level 9. Entries share their code through those chunks, so importing several costs less than the sum. For comparison, GSAP 3.15.0 core + ScrollTrigger is 45.3 KB gzipped, and 47.5 KB with DrawSVG. GSAP does far more than scroll animation; for the scroll effects this library covers, that is the size difference.
@@ -1,3 +1,3 @@
1
- 'use strict';function cr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(t),i=0,l=[];for(let d=0;d<r;d++){let T=Math.pow(s,d);l.push(T),i+=T;}let u=[0],m=0;for(let d=0;d<r;d++)m+=l[d]/i,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<r;T++)if(d<=u[T+1]){let H=(d-u[T])/(u[T+1]-u[T]);if(T===0)return H*(2-H);let A=1-Math.pow(t,T);return A+(1-A)*(2*H-1)*(2*H-1)}return 1}}function ur({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),s=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var ce={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:cr(),elastic:ur()};function Mt(e,n,r){return Math.min(r,Math.max(n,e))}function be(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function At(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Lt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function te(e,n,r,t){return r===n?0:Mt((e-n)/(r-n)*t,0,1)}function Pe(e,n,r,t,s){let i=At(e.top,e.height,n,t.element)-Lt(t.viewport,r),l=At(e.top,e.height,n,s.element)-Lt(s.viewport,r);return {tStart:i,tEnd:l}}function ot(e,n,r){let t=e.getBoundingClientRect(),s=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:s,scroll:0}:{top:r==="x"?t.left:t.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function $t(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Ue(e,n,r){let t=$t(e),s=$t(n);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*r)},${Math.round(t[1]+(s[1]-t[1])*r)},${Math.round(t[2]+(s[2]-t[2])*r)})`}var Pt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...n){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",fr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ct=33;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function dr(e){let n=[];for(let r=0;r<Ct;r++){let t=r/(Ct-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return fr;case "ease-in-out":return pr()?dr(ce["ease-in-out"]):null;default:return null}}var kt=Symbol.for("svg-scroll-draw.registry");function Ot(){let e=globalThis;return e[kt]||(e[kt]=new Map)}function Oe(e,n){Ot().set(e,n);}function Ie(e){Ot().delete(e);}var Ke,it=new Set,at=new WeakMap,Qe=new Map,It=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function gr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ke??(Ke=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==It(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(r);let t=gr(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,It(s)),Qe.set(s,(Qe.get(s)??0)+1),Ke.observe(s);}),()=>{it.delete(r)&&(t.forEach(s=>{let i=(Qe.get(s)??1)-1;if(i)return void Qe.set(s,i);Qe.delete(s),Ke?.unobserve(s);}),it.size||(Ke?.disconnect(),Ke=void 0));}}var yr=0;function hr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ft(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Dt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function br(e){if(!Xe)return;let n=Ft(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Dt.has(r)&&!Dt.has(Ft(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function wr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=r==="x"?window.scrollX:window.scrollY,l=e-i,u=n-i,m=r==="x";t.innerHTML=`
1
+ 'use strict';function ur({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(t),i=0,l=[];for(let d=0;d<r;d++){let T=Math.pow(s,d);l.push(T),i+=T;}let u=[0],m=0;for(let d=0;d<r;d++)m+=l[d]/i,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<r;T++)if(d<=u[T+1]){let H=(d-u[T])/(u[T+1]-u[T]);if(T===0)return H*(2-H);let A=1-Math.pow(t,T);return A+(1-A)*(2*H-1)*(2*H-1)}return 1}}function mr({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),s=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var le={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ur(),elastic:mr()};function At(e,n,r){return Math.min(r,Math.max(n,e))}function be(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Lt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function $t(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:At((e-n)/(r-n)*t,0,1)}function Pe(e,n,r,t,s){let i=Lt(e.top,e.height,n,t.element)-$t(t.viewport,r),l=Lt(e.top,e.height,n,s.element)-$t(s.viewport,r);return {tStart:i,tEnd:l}}function ot(e,n,r){let t=e.getBoundingClientRect(),s=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:s,scroll:0}:{top:r==="x"?t.left:t.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Pt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Ue(e,n,r){let t=Pt(e),s=Pt(n);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*r)},${Math.round(t[1]+(s[1]-t[1])*r)},${Math.round(t[2]+(s[2]-t[2])*r)})`}var Ct={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var fr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",kt=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let n=[];for(let r=0;r<kt;r++){let t=r/(kt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return fr;case "ease-out":return pr;case "ease-in-out":return dr()?gr(le["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function It(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function Oe(e,n){It().set(e,n);}function Ie(e){It().delete(e);}var Qe,it=new Set,at=new WeakMap,Ze=new Map,Ft=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function yr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==Ft(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(r);let t=yr(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,Ft(s)),Ze.set(s,(Ze.get(s)??0)+1),Qe.observe(s);}),()=>{it.delete(r)&&(t.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Qe?.unobserve(s);}),it.size||(Qe?.disconnect(),Qe=void 0));}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function wr(e){if(!Ke)return;let n=Dt(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ht.has(r)&&!Ht.has(Dt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function vr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=r==="x"?window.scrollX:window.scrollY,l=e-i,u=n-i,m=r==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${m?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var Ht=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Nt=/[MmLlHhVvCcSsQqTtAaZz]/g;function vr(e,n,r){if(!Xe)return;let t=(e.match(Nt)??[]).join("").toUpperCase(),s=(n.match(Nt)??[]).join("").toUpperCase(),i=(e.match(Ht)??[]).length,l=(n.match(Ht)??[]).length;if(t!==s){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==l&&we(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ft(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),u=t[s++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function Rt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,s=r?{...Pt[r],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:H=0,direction:A="forward",once:re=false,debug:Ce=false,axis:G="y",scrollContainer:ue,autoReverse:ne=false,delay:Y=0,strokeColor:N,strokeWidth:C,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:oe=0,morphTo:L,clip:se,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:R,onStart:P,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=s,v=se===true?"left":typeof se=="string"?se:false,z=typeof d=="function"?d:ce[d]??ce.linear,me=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ue=="string"?document.querySelector(ue):ue??null,Ae=Array.isArray(N)?N[0]:null,fe=Array.isArray(N)?N[1]:typeof N=="string"?N:null,X=Array.isArray(C)?C[0]:null,ie=Array.isArray(C)?C[1]:typeof C=="number"?C:null,ae=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let a=o*100;switch(v){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let V=v?[]:Array.from(e.querySelectorAll(l)),F=[],pe=[],J=0,Se=0,c=H,h=0,_=false,B=false,$=0,ee=false,he=-1,Re=[],le=-1,j=false,Te=0,ze=0,Ve,lt=null;function gt(){lt?.destroy(),lt=null;}let _e=new Set,yt=NaN,We=true,Ze=-1,ht=performance.now(),Be=NaN;function Je(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function bt(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function wt(){let o=ot(e,Ee,G);return Pe(o,o.scroll,bt(),me,He)}function nr(){let o=Se-J,a=V.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=H,H>0&&a>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(H,Le/(a*o)));}h=Se+a*c*o;}function vt(){(({tStart:J,tEnd:Se}=wt())),nr(),Ce&&Xe&&(gt(),lt=wr(J,Se,G));}function ct(o,a=wt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function or(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=a==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}V.forEach((y,Q)=>{y.style.strokeDashoffset=a==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Ae&&fe?y.style.stroke=Ue(Ae,fe,o):fe&&(y.style.stroke=fe),X!==null&&ie!==null?y.style.strokeWidth=`${X+(ie-X)*o}`:ie!==null&&(y.style.strokeWidth=`${ie}`),ae!==null&&K!==null?y.style.fillOpacity=`${ae+(K-ae)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&pe[Q]&&y.setAttribute("d",ft(pe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${F[a]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[a]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`),L&&o.tagName.toLowerCase()==="path"&&pe[a]&&o.setAttribute("d",pe[a]);});}if(V.forEach(o=>{br(o);let a=je(o);F.push(a);let y=o.tagName.toLowerCase()==="path";y?pe.push(o.getAttribute("d")??""):pe.push(""),L&&(y?vr(pe[pe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),ie!==null&&(o.style.strokeWidth=`${ie}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?"0":`${a}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`));}),v){if(i)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(i)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof d=="string"?st(d):null;function sr(){return !(ye===false||!hr()||!V.length||!Et||v||G!=="y"||Ee||u!==1||H!==0||re||ne||k!==false||L||w||E||Y>0||R||P||f||p||I||q||Me||N!=null||C!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function ir(){let o=++yr,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${a}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a);}V.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Pe({top:g.top,height:g.height},Je(),bt(),me,He);return z(te(Je(),Z,$e,u))}return {destroy(){e.classList.remove(y),V.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,V.forEach(de);},pause(){b=true,V.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,V.forEach(($e,xe)=>{$e.classList.remove(a),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){V.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(sr())return ct(ir());function ar(){let o=Math.max(1,ge),a=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=z(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),R?.(g),U<1&&(W=false);}else V.forEach((U,g)=>{let Z=g*H*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=z($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&fe?U.style.stroke=Ue(Ae,fe,xe):fe&&(U.style.stroke=fe),X!==null&&ie!==null?U.style.strokeWidth=`${X+(ie-X)*xe}`:ie!==null&&(U.style.strokeWidth=`${ie}`),ae!==null&&K!==null?U.style.fillOpacity=`${ae+(K-ae)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&pe[g]&&U.setAttribute("d",ft(pe[g],L,xe)),g===0&&(Te=xe,R?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=z(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!_e.has($e)&&(_e.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-a;B||(B=true,P?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,V.length-1)*H)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{a=performance.now(),B=false,_=false,_e.clear(),et(),$=requestAnimationFrame(Fe);},oe));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(Ve),a=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,_e.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(re&&_)?ke():!W.isIntersecting&&!re&&!_&&(cancelAnimationFrame($),clearTimeout(Ve),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{V.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(Ve),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-a,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,a=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,a=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),V.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(ar());vt();function St(){if(j||!Ge)return;let o=performance.now(),a=Je();if(!We&&k===false&&a===yt){ut(a);return}We=false,yt=a;let y=u;if(k!==false){let S=o-ht,D=S>0?Math.abs(a-(Ze<0?a:Ze))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Ze=a,ht=o;let Q=ne?le===-1||a>=le?"forward":"reverse":A;le=a;let Le=Se-J,Fe=true,ke=Le===0?0:(a-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=z(te(a,J,Se,y));re&&!ne&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),R?.(S),!B&&te(a,J,Se,y)>0&&(B=true,P?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},oe))):S<1&&!re&&(_=false),ut(a);return}if(V.forEach((S,D)=>{let de=D*c*Le,b=z(te(a,J+de,Se+de,y));re&&!ne&&(b=Re[D]=Math.max(Re[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&fe?S.style.stroke=Ue(Ae,fe,b):fe&&(S.style.stroke=fe),X!==null&&ie!==null?S.style.strokeWidth=`${X+(ie-X)*b}`:ie!==null&&(S.style.strokeWidth=`${ie}`),ae!==null&&K!==null?S.style.fillOpacity=`${ae+(K-ae)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&pe[D]&&S.setAttribute("d",ft(pe[D],L,b)),D===0&&(Te=b,R?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=z(te(a,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!_e.has(de)&&(_e.add(de),w[D]?.());}}!B&&te(a,J,Se,y)>0&&(B=true,P?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{he=-1,Re=[],B=false,_=false,_e.clear(),et(),We=true;},oe))):!Fe&&!re&&(_=false),ut(a);}function Tt(o){return o>=Se&&o<h}function ut(o){ee||Tt(o)?$=requestAnimationFrame(St):Ge=false;}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){St();}));}function rt(){Ge=false,cancelAnimationFrame($);}let mt=new IntersectionObserver(o=>{o.forEach(a=>{ee=a.isIntersecting,ee&&!j?(We=true,tt()):Ge&&!j&&Tt(Je())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function xt(){V.forEach((o,a)=>{F[a]=je(o),o.style.strokeDasharray=`${F[a]}`;}),vt(),We=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout(xt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let lr=De([e],Ye);return Y>0?setTimeout(()=>mt.observe(e),Y):mt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(Ve),rt(),mt.disconnect(),lr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),gt();},replay(){he=-1,Re=[],le=-1,Ze=-1,B=false,_=false,ze=0,j=false,Te=0,_e.clear(),clearTimeout(Ve),et(),We=true,ee&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,We=true,ee&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Te=a,he=a,Re=[],j=true,rt(),or(a,A),We=true;},getProgress(){return Te},refresh(){clearTimeout(nt),xt(),ee&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var zt=new WeakMap,Er=0;function pt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=zt.get(r);return t===void 0&&zt.set(r,t=++Er),`el#${t}`}return r})}function Vt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...s)=>n()[t]?.(...s));return r}function Sr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function _t(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(m?parseFloat(m[1]):0),i.push(m?m[2]:"");}n.push({fn:t[1],nums:s,units:i});}return n}function Tr(e,n,r){let t=_t(e),s=_t(n);return t.length===0||t.length!==s.length?r<1?e:n:t.map((i,l)=>{let u=s[l];return i.fn!==u.fn||i.nums.length!==u.nums.length?r<1?`${i.fn}(${i.nums.map((m,d)=>`${m}${i.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${i.units[d]}`).join(", ")})`}).join(" ")}function Wt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),s=String(n);if(Sr(t))return Ue(t,s,r);if(t.includes("("))return Tr(t,s,r);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let u=parseFloat(i[1]),m=parseFloat(l[1]);return `${u+(m-u)*r}${i[2]||l[2]}`}return r<1?t:s}function xr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Ar=0,qt="--scroll-draw-progress";function Lr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Bt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:H=false,respectReducedMotion:A=true,triggerElement:re,onProgress:Ce,onComplete:G,onEnter:ue,onLeave:ne,onEnterBack:Y,onLeaveBack:N}=n,C=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof i=="function"?i:ce[i]??ce["ease-out"],w=be(s.start??"top bottom"),k=be(s.end??"bottom top"),x=re??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:xr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function oe(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let se=new Map;for(let c of [...E.map(h=>h.prop),qt])se.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of se)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(C)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};oe();let ge=typeof i=="string"?st(i):null;function ye(){if(!T||!Lr()||!ge||m!=="y"||M||x!==e||u||l!==1||Ce||G||ue||ne||Y||N||H!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!Mr.has(c.prop))return false;return true}function R(){let c=`ssd-a-${++Ar}`,h=E.map(le=>`${le.prop}:${le.from}`).join(";"),_=E.map(le=>`${le.prop}:${le.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,ee=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let le=e.getBoundingClientRect();return Pe({top:le.top,height:le.height},$(),ee(),w,k)};Oe(e,{type:"animate",getProgress:()=>Re.getProgress(),getTrigger:he});let Re={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(le){let j=Math.min(1,Math.max(0,le));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,Wt(Te.from,Te.to,j));},getProgress(){let{tStart:le,tEnd:j}=he();return O(te($(),le,j,l))}};return Re}if(ye())return R();let P=0,f=0,p=0,I=false,q=false,Me=-1,v=0,z=false,me=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,fe=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],ie=false;function ae(){let c=e.style,h=X.map(ee=>c.getPropertyValue(ee.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(ee=>c.setProperty(ee.prop,se.get(ee.prop)??""));let B=ot(x,M,m);X.forEach((ee,he)=>c.setProperty(ee.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Pe(B,B.scroll,fe(),w,k);ie&&Math.abs($.tStart-P)<1&&Math.abs($.tEnd-f)<1||(ie=true,P=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(qt,String(c));for(let h of E)e.style.setProperty(h.prop,Wt(h.from,h.to,c));Ce?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?ue?.():me>0&&c<=0&&N?.(),me<1&&c>=1?ne?.():me>=1&&c<1&&Y?.(),me=c;}function V(){if(!I||q)return;let c=performance.now(),h=Ae(),_=l;if(H!==false){let ee=c-Ee,he=ee>0?Math.abs(h-(He<0?h:He))/ee:0;_=l*Math.max(.2,1+he*(typeof H=="number"?H:1)*.04);}He=h,Ee=c;let B=f===P?0:(h-P)/(f-P);Ne(B);let $=O(te(h,P,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!z?(z=true,G?.()):$<1&&!u&&(z=false),p=requestAnimationFrame(V);}ae(),f===P&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(te(Ae(),P,f,l));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(V):cancelAnimationFrame(p);});},{root:M??null}),pe;function J(){clearTimeout(pe),pe=setTimeout(ae,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:P,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(pe),ve(),Ie(e);},replay(){Me=-1,z=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(V)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ae();}}}var dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Gt(e,n){if(typeof window>"u")return dt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),dt;let t=r,{from:s=0,to:i,format:l,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:H}=n,A=T!==void 0?f=>f.toFixed(T):l??(f=>String(Math.round(f))),re=typeof u=="function"?u:ce[u]??ce["ease-out"],Ce=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(i),H?.(),dt;let ne=0,Y=0,N=false,C=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,oe=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Pe({top:f.top,height:f.height},E(),oe(),Ce,G);N&&Math.abs(p.tStart-ne)<1&&Math.abs(p.tEnd-Y)<1||(N=true,ne=p.tStart,Y=p.tEnd);}function se(f){t.textContent=A(s+(i-s)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=re(te(E(),ne,Y,1));d&&(k=Math.max(k,f),f=k),x=f,se(f),f>=1&&!M?(M=true,H?.()):f<1&&!d&&(M=false),C=requestAnimationFrame(ve);}L();{let f=re(te(E(),ne,Y,1));d&&f>0&&(k=f),x=f,se(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?C=requestAnimationFrame(ve):cancelAnimationFrame(C);});}),ye;function R(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",R),window.addEventListener("orientationchange",R);let P=De([t],R);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:ne,tEnd:Y})}),{destroy(){cancelAnimationFrame(C),ge.disconnect(),window.removeEventListener("resize",R),window.removeEventListener("orientationchange",R),P(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,se(0);},pause(){w=true,cancelAnimationFrame(C);},resume(){w&&(w=false,O&&(C=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(C),se(p);},getProgress(){return x}}}var jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ut(e,n={}){if(typeof window>"u")return jt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),jt;let t=r,{trigger:s={},easing:i="linear",once:l=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:H,onProgress:A}=n,re=d??t,Ce=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:ce[i]??ce.linear,ue=be(s.start??"top top"),ne=be(s.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,N=n.to,C=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=false,se=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=re.getBoundingClientRect(),z=u==="x"?v.left:v.top,me=u==="x"?v.width:v.height,He=Pe({top:z,height:me},se(),ve(),ue,ne);C=He.tStart,O=He.tEnd,L&&O===C&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function R(v){if(!L)return;let z=N??t.duration??0,me=Y+(z-Y)*v;me!==ye&&(ye=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function P(){if(!k||x||!L||Ce)return;let v=G(te(se(),C,O,1));l&&(M=Math.max(M,v),v=M),E=v,R(v),v>=1&&!oe?(oe=true,H?.()):v<1&&!l&&(oe=false),w=requestAnimationFrame(P);}function f(){if(L=true,N===void 0&&(N=t.duration),Ce){R(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(P));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(z=>{k=z.isIntersecting,k&&!x&&L?w=requestAnimationFrame(P):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([re],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,ye=NaN,R(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(P)));},seek(v){let z=Math.min(1,Math.max(0,v));E=z,M=z,x=true,cancelAnimationFrame(w),ye=NaN,R(z);},getProgress(){return E}}}function Kt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function $r(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Yt(e){let n=Kt(e),r=new Map;for(let i of n){let l=i.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(i);}let t=[],s=Array.from(r.keys()).sort((i,l)=>i-l);for(let i of s){let l=r.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<l.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Pr(e,n,r,t){if(r<=1||t===0)return e;let s=(r-1)*t,i=n*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Cr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,n={}){if(typeof window>"u")return Xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Xt;let t=r,{split:s="words",stagger:i=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,H=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof l=="function"?l:ce[l]??ce["ease-out"],re=be(m.start??"top 85%"),Ce=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ue;s==="chars"?ue=$r(t):s==="lines"?ue=Yt(t):ue=Kt(t);let ne=ue.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Cr(I,u);q&&(p.style.transform=q);}function N(p){t.style.setProperty("--scroll-draw-progress",String(p)),ue.forEach((I,q)=>{let Me=A(Pr(p,q,ne,i));Y(I,Me);});}if(H)return N(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};N(0);let C=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=()=>window.scrollY,se=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Pe({top:p.top,height:p.height},L(),se(),re,Ce);C=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=te(L(),C,O,1);d&&(M=Math.max(M,p),p=M),E=p,N(p),p>=1&&!oe?(oe=true,T?.()):p<1&&!d&&(oe=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),R;function P(){clearTimeout(R),R=setTimeout(()=>{if(s==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ue=Yt(t),N(p);}ve();},150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let f=De([t],P);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),f(),clearTimeout(R),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),N(I);},getProgress(){return E}}}var qe=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,r){return this.destroy(),this.el=n,this.latest=r,this.key=pt(r),this.instance=this.create(n,Vt(r,()=>this.latest)),this}update(n){return this.el?pt(n)!==this.key?this.init(this.el,n):(this.latest=n,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(n){return this.instance?.seek(n),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},Zt=class extends qe{constructor(){super(Rt);}init(n,r={}){return super.init(n,r)}},Jt=class extends qe{constructor(){super(Bt);}},er=class extends qe{constructor(){super(Gt);}},tr=class extends qe{constructor(){super(Ut);}init(n,r={}){return super.init(n,r)}},rr=class extends qe{constructor(){super(Qt);}init(n,r={}){return super.init(n,r)}};exports.EngineRef=qe;exports.ScrollAnimateRef=Jt;exports.ScrollCounterRef=er;exports.ScrollDrawRef=Zt;exports.ScrollTextRef=rr;exports.ScrollVideoRef=tr;
3
+ <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var Nt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Rt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Er(e,n,r){if(!Ke)return;let t=(e.match(Rt)??[]).join("").toUpperCase(),s=(n.match(Rt)??[]).join("").toUpperCase(),i=(e.match(Nt)??[]).length,l=(n.match(Nt)??[]).length;if(t!==s){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==l&&we(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),u=t[s++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function zt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,s=r?{...Ct[r],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:H=0,direction:A="forward",once:te=false,debug:Ce=false,axis:G="y",scrollContainer:ce,autoReverse:re=false,delay:Y=0,strokeColor:N,strokeWidth:C,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:ne=0,morphTo:L,clip:oe,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:R,onStart:P,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=s,v=oe===true?"left":typeof oe=="string"?oe:false,z=typeof d=="function"?d:le[d]??le.linear,ue=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ce=="string"?document.querySelector(ce):ce??null,Ae=Array.isArray(N)?N[0]:null,me=Array.isArray(N)?N[1]:typeof N=="string"?N:null,X=Array.isArray(C)?C[0]:null,se=Array.isArray(C)?C[1]:typeof C=="number"?C:null,ie=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let a=o*100;switch(v){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let V=v?[]:Array.from(e.querySelectorAll(l)),F=[],fe=[],J=0,Se=0,c=H,h=0,_=false,B=false,$=0,pe=false,he=-1,Re=[],ae=-1,j=false,Te=0,ze=0,Ve,lt=null;function ht(){lt?.destroy(),lt=null;}let _e=new Set,bt=NaN,We=true,Je=-1,wt=performance.now(),Be=NaN;function Ye(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function vt(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Et(){let o=ot(e,Ee,G);return Pe(o,o.scroll,vt(),ue,He)}function or(){let o=Se-J,a=V.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=H,H>0&&a>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(H,Le/(a*o)));}h=Se+a*c*o;}function St(){(({tStart:J,tEnd:Se}=Et())),or(),Ce&&Ke&&(ht(),lt=vr(J,Se,G));}function ct(o,a=Et){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function sr(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=a==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}V.forEach((y,Q)=>{y.style.strokeDashoffset=a==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Ae&&me?y.style.stroke=Ue(Ae,me,o):me&&(y.style.stroke=me),X!==null&&se!==null?y.style.strokeWidth=`${X+(se-X)*o}`:se!==null&&(y.style.strokeWidth=`${se}`),ie!==null&&K!==null?y.style.fillOpacity=`${ie+(K-ie)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&fe[Q]&&y.setAttribute("d",dt(fe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${F[a]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[a]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`),L&&o.tagName.toLowerCase()==="path"&&fe[a]&&o.setAttribute("d",fe[a]);});}if(V.forEach(o=>{wr(o);let a=je(o);F.push(a);let y=o.tagName.toLowerCase()==="path";y?fe.push(o.getAttribute("d")??""):fe.push(""),L&&(y?Er(fe[fe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),me&&(o.style.stroke=me),se!==null&&(o.style.strokeWidth=`${se}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?"0":`${a}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),v){if(i)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(i)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof d=="string"?st(d):null;function ir(){return !(ye===false||!br()||!V.length||!Tt||v||G!=="y"||Ee||u!==1||H!==0||te||re||k!==false||L||w||E||Y>0||R||P||f||p||I||q||Me||N!=null||C!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function ar(){let o=++hr,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${a}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a);}V.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Pe({top:g.top,height:g.height},Ye(),vt(),ue,He);return z(ee(Ye(),Z,$e,u))}return {destroy(){e.classList.remove(y),V.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,V.forEach(de);},pause(){b=true,V.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,V.forEach(($e,xe)=>{$e.classList.remove(a),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){V.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(ir())return ct(ar());function lr(){let o=Math.max(1,ge),a=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=z(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),R?.(g),U<1&&(W=false);}else V.forEach((U,g)=>{let Z=g*H*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=z($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&me?U.style.stroke=Ue(Ae,me,xe):me&&(U.style.stroke=me),X!==null&&se!==null?U.style.strokeWidth=`${X+(se-X)*xe}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&K!==null?U.style.fillOpacity=`${ie+(K-ie)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&fe[g]&&U.setAttribute("d",dt(fe[g],L,xe)),g===0&&(Te=xe,R?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=z(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!_e.has($e)&&(_e.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-a;B||(B=true,P?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,V.length-1)*H)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{a=performance.now(),B=false,_=false,_e.clear(),et(),$=requestAnimationFrame(Fe);},ne));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(Ve),a=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,_e.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(te&&_)?ke():!W.isIntersecting&&!te&&!_&&(cancelAnimationFrame($),clearTimeout(Ve),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{V.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(Ve),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-a,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,a=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,a=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),V.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(lr());St();function xt(){if(j||!Ge)return;let o=performance.now(),a=Ye();if(!We&&k===false&&a===bt){mt(a);return}We=false,bt=a;let y=u;if(k!==false){let S=o-wt,D=S>0?Math.abs(a-(Je<0?a:Je))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Je=a,wt=o;let Q=re?ae===-1||a>=ae?"forward":"reverse":A;ae=a;let Le=Se-J,Fe=true,ke=Le===0?0:(a-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=z(ee(a,J,Se,y));te&&!re&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),R?.(S),!B&&ee(a,J,Se,y)>0&&(B=true,P?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},ne))):S<1&&!te&&(_=false),mt(a);return}if(V.forEach((S,D)=>{let de=D*c*Le,b=z(ee(a,J+de,Se+de,y));te&&!re&&(b=Re[D]=Math.max(Re[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&me?S.style.stroke=Ue(Ae,me,b):me&&(S.style.stroke=me),X!==null&&se!==null?S.style.strokeWidth=`${X+(se-X)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&K!==null?S.style.fillOpacity=`${ie+(K-ie)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&fe[D]&&S.setAttribute("d",dt(fe[D],L,b)),D===0&&(Te=b,R?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=z(ee(a,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!_e.has(de)&&(_e.add(de),w[D]?.());}}!B&&ee(a,J,Se,y)>0&&(B=true,P?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,Ve=setTimeout(()=>{he=-1,Re=[],B=false,_=false,_e.clear(),et(),We=true;},ne))):!Fe&&!te&&(_=false),mt(a);}function ut(o){return o>=Se&&o<h}function mt(o){pe||ut(o)?$=requestAnimationFrame(xt):Ge=false;}function ft(){return pe||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){xt();}));}function rt(){Ge=false,cancelAnimationFrame($);}let pt=new IntersectionObserver(o=>{o.forEach(a=>{pe=a.isIntersecting,pe&&!j?(We=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function Mt(){V.forEach((o,a)=>{F[a]=je(o),o.style.strokeDasharray=`${F[a]}`;}),St(),We=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let cr=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(Ve),rt(),pt.disconnect(),cr(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),ht();},replay(){he=-1,Re=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Te=0,_e.clear(),clearTimeout(Ve),et(),We=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,We=true,ft()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Te=a,he=a,Re=[],j=true,rt(),sr(a,A),We=true;},getProgress(){return Te},refresh(){clearTimeout(nt),Mt(),ft()&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var Vt=new WeakMap,Sr=0;function gt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Vt.get(r);return t===void 0&&Vt.set(r,t=++Sr),`el#${t}`}return r})}function _t(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...s)=>n()[t]?.(...s));return r}function Tr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Wt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(m?parseFloat(m[1]):0),i.push(m?m[2]:"");}n.push({fn:t[1],nums:s,units:i});}return n}function xr(e,n,r){let t=Wt(e),s=Wt(n);return t.length===0||t.length!==s.length?r<1?e:n:t.map((i,l)=>{let u=s[l];return i.fn!==u.fn||i.nums.length!==u.nums.length?r<1?`${i.fn}(${i.nums.map((m,d)=>`${m}${i.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${i.units[d]}`).join(", ")})`}).join(" ")}function qt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),s=String(n);if(Tr(t))return Ue(t,s,r);if(t.includes("("))return xr(t,s,r);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let u=parseFloat(i[1]),m=parseFloat(l[1]);return `${u+(m-u)*r}${i[2]||l[2]}`}return r<1?t:s}function Mr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Bt="--scroll-draw-progress";function $r(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Gt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:H=false,respectReducedMotion:A=true,triggerElement:te,onProgress:Ce,onComplete:G,onEnter:ce,onLeave:re,onEnterBack:Y,onLeaveBack:N}=n,C=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof i=="function"?i:le[i]??le["ease-out"],w=be(s.start??"top bottom"),k=be(s.end??"bottom top"),x=te??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:Mr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function ne(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let oe=new Map;for(let c of [...E.map(h=>h.prop),Bt])oe.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of oe)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(C)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};ne();let ge=typeof i=="string"?st(i):null;function ye(){if(!T||!$r()||!ge||m!=="y"||M||x!==e||u||l!==1||Ce||G||ce||re||Y||N||H!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!Ar.has(c.prop))return false;return true}function R(){let c=`ssd-a-${++Lr}`,h=E.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=E.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,pe=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let ae=e.getBoundingClientRect();return Pe({top:ae.top,height:ae.height},$(),pe(),w,k)};Oe(e,{type:"animate",getProgress:()=>Re.getProgress(),getTrigger:he});let Re={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,qt(Te.from,Te.to,j));},getProgress(){let{tStart:ae,tEnd:j}=he();return O(ee($(),ae,j,l))}};return Re}if(ye())return R();let P=0,f=0,p=0,I=false,q=false,Me=-1,v=0,z=false,ue=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],se=false;function ie(){let c=e.style,h=X.map(pe=>c.getPropertyValue(pe.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(pe=>c.setProperty(pe.prop,oe.get(pe.prop)??""));let B=ot(x,M,m);X.forEach((pe,he)=>c.setProperty(pe.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Pe(B,B.scroll,me(),w,k);se&&Math.abs($.tStart-P)<1&&Math.abs($.tEnd-f)<1||(se=true,P=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Bt,String(c));for(let h of E)e.style.setProperty(h.prop,qt(h.from,h.to,c));Ce?.(c);}function Ne(c){if(isNaN(ue)){ue=c;return}ue<=0&&c>0?ce?.():ue>0&&c<=0&&N?.(),ue<1&&c>=1?re?.():ue>=1&&c<1&&Y?.(),ue=c;}function V(){if(!I||q)return;let c=performance.now(),h=Ae(),_=l;if(H!==false){let pe=c-Ee,he=pe>0?Math.abs(h-(He<0?h:He))/pe:0;_=l*Math.max(.2,1+he*(typeof H=="number"?H:1)*.04);}He=h,Ee=c;let B=f===P?0:(h-P)/(f-P);Ne(B);let $=O(ee(h,P,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!z?(z=true,G?.()):$<1&&!u&&(z=false),p=requestAnimationFrame(V);}ie(),f===P&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(ee(Ae(),P,f,l));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(V):cancelAnimationFrame(p);});},{root:M??null}),fe;function J(){clearTimeout(fe),fe=setTimeout(ie,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:P,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(fe),ve(),Ie(e);},replay(){Me=-1,z=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(V)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ie();}}}var yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,n){if(typeof window>"u")return yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),yt;let t=r,{from:s=0,to:i,format:l,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:H}=n,A=T!==void 0?f=>f.toFixed(T):l??(f=>String(Math.round(f))),te=typeof u=="function"?u:le[u]??le["ease-out"],Ce=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(i),H?.(),yt;let re=0,Y=0,N=false,C=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,ne=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Pe({top:f.top,height:f.height},E(),ne(),Ce,G);N&&Math.abs(p.tStart-re)<1&&Math.abs(p.tEnd-Y)<1||(N=true,re=p.tStart,Y=p.tEnd);}function oe(f){t.textContent=A(s+(i-s)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=te(ee(E(),re,Y,1));d&&(k=Math.max(k,f),f=k),x=f,oe(f),f>=1&&!M?(M=true,H?.()):f<1&&!d&&(M=false),C=requestAnimationFrame(ve);}L();{let f=te(ee(E(),re,Y,1));d&&f>0&&(k=f),x=f,oe(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?C=requestAnimationFrame(ve):cancelAnimationFrame(C);});}),ye;function R(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",R),window.addEventListener("orientationchange",R);let P=De([t],R);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:re,tEnd:Y})}),{destroy(){cancelAnimationFrame(C),ge.disconnect(),window.removeEventListener("resize",R),window.removeEventListener("orientationchange",R),P(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(C);},resume(){w&&(w=false,O&&(C=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(C),oe(p);},getProgress(){return x}}}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n={}){if(typeof window>"u")return Ut;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Ut;let t=r,{trigger:s={},easing:i="linear",once:l=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:H,onProgress:A}=n,te=d??t,Ce=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:le[i]??le.linear,ce=be(s.start??"top top"),re=be(s.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,N=n.to,C=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=false,oe=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=te.getBoundingClientRect(),z=u==="x"?v.left:v.top,ue=u==="x"?v.width:v.height,He=Pe({top:z,height:ue},oe(),ve(),ce,re);C=He.tStart,O=He.tEnd,L&&O===C&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function R(v){if(!L)return;let z=N??t.duration??0,ue=Y+(z-Y)*v;ue!==ye&&(ye=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function P(){if(!k||x||!L||Ce)return;let v=G(ee(oe(),C,O,1));l&&(M=Math.max(M,v),v=M),E=v,R(v),v>=1&&!ne?(ne=true,H?.()):v<1&&!l&&(ne=false),w=requestAnimationFrame(P);}function f(){if(L=true,N===void 0&&(N=t.duration),Ce){R(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(P));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(z=>{k=z.isIntersecting,k&&!x&&L?w=requestAnimationFrame(P):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([te],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,ye=NaN,R(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(P)));},seek(v){let z=Math.min(1,Math.max(0,v));E=z,M=z,x=true,cancelAnimationFrame(w),ye=NaN,R(z);},getProgress(){return E}}}function Qt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Pr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Xt(e){let n=Qt(e),r=new Map;for(let i of n){let l=i.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(i);}let t=[],s=Array.from(r.keys()).sort((i,l)=>i-l);for(let i of s){let l=r.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<l.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Cr(e,n,r,t){if(r<=1||t===0)return e;let s=(r-1)*t,i=n*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function kr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Kt;let t=r,{split:s="words",stagger:i=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,H=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof l=="function"?l:le[l]??le["ease-out"],te=be(m.start??"top 85%"),Ce=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ce;s==="chars"?ce=Pr(t):s==="lines"?ce=Xt(t):ce=Qt(t);let re=ce.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=kr(I,u);q&&(p.style.transform=q);}function N(p){t.style.setProperty("--scroll-draw-progress",String(p)),ce.forEach((I,q)=>{let Me=A(Cr(p,q,re,i));Y(I,Me);});}if(H)return N(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};N(0);let C=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=()=>window.scrollY,oe=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Pe({top:p.top,height:p.height},L(),oe(),te,Ce);C=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=ee(L(),C,O,1);d&&(M=Math.max(M,p),p=M),E=p,N(p),p>=1&&!ne?(ne=true,T?.()):p<1&&!d&&(ne=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),R;function P(){clearTimeout(R),R=setTimeout(()=>{if(s==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ce=Xt(t),N(p);}ve();},150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let f=De([t],P);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),f(),clearTimeout(R),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),N(I);},getProgress(){return E}}}var qe=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,r){return this.destroy(),this.el=n,this.latest=r,this.key=gt(r),this.instance=this.create(n,_t(r,()=>this.latest)),this}update(n){return this.el?gt(n)!==this.key?this.init(this.el,n):(this.latest=n,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(n){return this.instance?.seek(n),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},Jt=class extends qe{constructor(){super(zt);}init(n,r={}){return super.init(n,r)}},er=class extends qe{constructor(){super(Gt);}},tr=class extends qe{constructor(){super(jt);}},rr=class extends qe{constructor(){super(Yt);}init(n,r={}){return super.init(n,r)}},nr=class extends qe{constructor(){super(Zt);}init(n,r={}){return super.init(n,r)}};exports.EngineRef=qe;exports.ScrollAnimateRef=er;exports.ScrollCounterRef=tr;exports.ScrollDrawRef=Jt;exports.ScrollTextRef=nr;exports.ScrollVideoRef=rr;
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';var r=class{constructor(t){this.create=t;this.instance=null;this.el=null;this.key="";}init(t,e){return this.destroy(),this.el=t,this.latest=e,this.key=a(e),this.instance=this.create(t,b(e,()=>this.latest)),this}update(t){return this.el?a(t)!==this.key?this.init(this.el,t):(this.latest=t,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(t){return this.instance?.seek(t),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},u=class extends r{constructor(){super(b$1);}init(t,e={}){return super.init(t,e)}},h=class extends r{constructor(){super(a$1);}},m=class extends r{constructor(){super(a$2);}},O=class extends r{constructor(){super(a$3);}init(t,e={}){return super.init(t,e)}},d=class extends r{constructor(){super(a$4);}init(t,e={}){return super.init(t,e)}};export{r as EngineRef,h as ScrollAnimateRef,m as ScrollCounterRef,u as ScrollDrawRef,d as ScrollTextRef,O as ScrollVideoRef};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';var r=class{constructor(t){this.create=t;this.instance=null;this.el=null;this.key="";}init(t,e){return this.destroy(),this.el=t,this.latest=e,this.key=a(e),this.instance=this.create(t,b(e,()=>this.latest)),this}update(t){return this.el?a(t)!==this.key?this.init(this.el,t):(this.latest=t,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(t){return this.instance?.seek(t),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},u=class extends r{constructor(){super(b$1);}init(t,e={}){return super.init(t,e)}},h=class extends r{constructor(){super(a$1);}},m=class extends r{constructor(){super(a$2);}},O=class extends r{constructor(){super(a$3);}init(t,e={}){return super.init(t,e)}},d=class extends r{constructor(){super(a$4);}init(t,e={}){return super.init(t,e)}};export{r as EngineRef,h as ScrollAnimateRef,m as ScrollCounterRef,u as ScrollDrawRef,d as ScrollTextRef,O as ScrollVideoRef};
@@ -1,3 +1,3 @@
1
- 'use strict';function nr({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(t),i=0,l=[];for(let f=0;f<n;f++){let v=Math.pow(s,f);l.push(v),i+=v;}let m=[0],c=0;for(let f=0;f<n;f++)c+=l[f]/i,m.push(c);return f=>{if(f<=0)return 0;if(f>=1)return 1;for(let v=0;v<n;v++)if(f<=m[v+1]){let $=(f-m[v])/(m[v+1]-m[v]);if(v===0)return $*(2-$);let T=1-Math.pow(t,v);return T+(1-T)*(2*$-1)*(2*$-1)}return 1}}function or({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),s=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var he={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:nr(),elastic:or()};function $t(e,r,n){return Math.min(n,Math.max(r,e))}function xe(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function Ct(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function Pt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function se(e,r,n,t){return n===r?0:$t((e-r)/(n-r)*t,0,1)}function De(e,r,n,t,s){let i=Ct(e.top,e.height,r,t.element)-Pt(t.viewport,n),l=Ct(e.top,e.height,r,s.element)-Pt(s.viewport,n);return {tStart:i,tEnd:l}}function ot(e,r,n){let t=e.getBoundingClientRect(),s=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:s,scroll:0}:{top:n==="x"?t.left:t.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Dt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,r,n){let t=Dt(e),s=Dt(r);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*n)},${Math.round(t[1]+(s[1]-t[1])*n)},${Math.round(t[2]+(s[2]-t[2])*n)})`}var kt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ye=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ee(e,...r){Ye&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var sr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",ir="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",It=33;function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function lr(e){let r=[];for(let n=0;n<It;n++){let t=n/(It-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return sr;case "ease-out":return ir;case "ease-in-out":return ar()?lr(he["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function Rt(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function Re(e,r){Rt().set(e,r);}function Fe(e){Rt().delete(e);}var Xe,it=new Set,at=new WeakMap,Je=new Map,Ft=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function cr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let t=n;t;t=t.previousElementSibling)r.add(t);return r}function Ve(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Xe??(Xe=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==Ft(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(n);let t=cr(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,Ft(s)),Je.set(s,(Je.get(s)??0)+1),Xe.observe(s);}),()=>{it.delete(n)&&(t.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Xe?.unobserve(s);}),it.size||(Xe?.disconnect(),Xe=void 0));}}var ur=0;function mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ht(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var Nt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function fr(e){if(!Ye)return;let r=Ht(e,"stroke");if(!r||r==="none"){ee("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Nt.has(n)&&!Nt.has(Ht(e,"fill"))&&ee("Element has a fill \u2014 it may obscure the stroke animation.",e);}function pr(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=n==="x"?window.scrollX:window.scrollY,l=e-i,m=r-i,c=n==="x";t.innerHTML=`
1
+ 'use strict';function or({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(t),i=0,l=[];for(let f=0;f<n;f++){let v=Math.pow(s,f);l.push(v),i+=v;}let m=[0],c=0;for(let f=0;f<n;f++)c+=l[f]/i,m.push(c);return f=>{if(f<=0)return 0;if(f>=1)return 1;for(let v=0;v<n;v++)if(f<=m[v+1]){let $=(f-m[v])/(m[v+1]-m[v]);if(v===0)return $*(2-$);let T=1-Math.pow(t,v);return T+(1-T)*(2*$-1)*(2*$-1)}return 1}}function sr({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),s=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var he={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:or(),elastic:sr()};function Ct(e,r,n){return Math.min(n,Math.max(r,e))}function xe(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function Pt(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function Dt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function se(e,r,n,t){return n===r?0:Ct((e-r)/(n-r)*t,0,1)}function De(e,r,n,t,s){let i=Pt(e.top,e.height,r,t.element)-Dt(t.viewport,n),l=Pt(e.top,e.height,r,s.element)-Dt(s.viewport,n);return {tStart:i,tEnd:l}}function ot(e,r,n){let t=e.getBoundingClientRect(),s=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:s,scroll:0}:{top:n==="x"?t.left:t.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function kt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,r,n){let t=kt(e),s=kt(r);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*n)},${Math.round(t[1]+(s[1]-t[1])*n)},${Math.round(t[2]+(s[2]-t[2])*n)})`}var It={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function K(e,...r){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var ir="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",ar="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ot=33;function lr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function cr(e){let r=[];for(let n=0;n<Ot;n++){let t=n/(Ot-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ir;case "ease-out":return ar;case "ease-in-out":return lr()?cr(he["ease-in-out"]):null;default:return null}}var Rt=Symbol.for("svg-scroll-draw.registry");function Ft(){let e=globalThis;return e[Rt]||(e[Rt]=new Map)}function Re(e,r){Ft().set(e,r);}function Fe(e){Ft().delete(e);}var Je,it=new Set,at=new WeakMap,Qe=new Map,Ht=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function ur(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let t=n;t;t=t.previousElementSibling)r.add(t);return r}function Ve(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Je??(Je=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==Ht(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(n);let t=ur(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,Ht(s)),Qe.set(s,(Qe.get(s)??0)+1),Je.observe(s);}),()=>{it.delete(n)&&(t.forEach(s=>{let i=(Qe.get(s)??1)-1;if(i)return void Qe.set(s,i);Qe.delete(s),Je?.unobserve(s);}),it.size||(Je?.disconnect(),Je=void 0));}}var mr=0;function fr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Nt(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var _t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function pr(e){if(!Xe)return;let r=Nt(e,"stroke");if(!r||r==="none"){K("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!_t.has(n)&&!_t.has(Nt(e,"fill"))&&K("Element has a fill \u2014 it may obscure the stroke animation.",e);}function dr(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=n==="x"?window.scrollX:window.scrollY,l=e-i,m=r-i,c=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function dr(e,r,n){if(!Ye)return;let t=(e.match(zt)??[]).join("").toUpperCase(),s=(r.match(zt)??[]).join("").toUpperCase(),i=(e.match(_t)??[]).length,l=(r.match(_t)??[]).length;if(t!==s){ee(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}i!==l&&ee(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function gt(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),m=t[s++]??l;return String(+(l+(m-l)*n).toFixed(4))})}function lt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,s=n?{...kt[n],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=false,easing:f="linear",trigger:v={},stagger:$=0,direction:T="forward",once:ue=false,debug:He=false,axis:U="y",scrollContainer:me,autoReverse:ie=false,delay:te=0,strokeColor:H,strokeWidth:O,fillOpacity:N,waypoints:x,velocityScale:_=false,threshold:C=0,rootMargin:L="0px",repeat:E=0,repeatDelay:we=0,morphTo:z,clip:fe,autoplay:ve=false,duration:Me=1e3,native:$e=true,onProgress:J,onStart:P,onComplete:p,onEnter:d,onLeave:R,onEnterBack:ae,onLeaveBack:Ae}=s,le=fe===true?"left":typeof fe=="string"?fe:false,Ee=typeof f=="function"?f:he[f]??he.linear,Ce=xe(v.start??"top bottom"),We=xe(v.end??"bottom top"),pe=typeof me=="string"?document.querySelector(me):me??null,be=Array.isArray(H)?H[0]:null,re=Array.isArray(H)?H[1]:typeof H=="string"?H:null,q=Array.isArray(O)?O[0]:null,Q=Array.isArray(O)?O[1]:typeof O=="number"?O:null,Z=Array.isArray(N)?N[0]:null,B=Array.isArray(N)?N[1]:typeof N=="number"?N:null;function ke(o){let a=o*100;switch(le){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let D=le?[]:Array.from(e.querySelectorAll(l)),M=[],ne=[],Y=0,de=0,u=$,h=0,k=false,F=false,S=0,X=false,ce=-1,Ie=[],K=-1,V=false,ge=0,Oe=0,Ne,mt=null;function bt(){mt?.destroy(),mt=null;}let _e=new Set,wt=NaN,ze=true,Ze=-1,vt=performance.now(),qe=NaN;function Ke(){return pe?U==="x"?pe.scrollLeft:pe.scrollTop:U==="x"?window.scrollX:window.scrollY}function Et(){return pe?U==="x"?pe.clientWidth:pe.clientHeight:U==="x"?window.innerWidth:window.innerHeight}function St(){let o=ot(e,pe,U);return De(o,o.scroll,Et(),Ce,We)}function Qt(){let o=de-Y,a=D.length-1,y=pe??document.documentElement,G=U==="x"?"Width":"Height";if(u=$,$>0&&a>0&&o>0){let Se=y[`scroll${G}`]-y[`client${G}`]-1-Y-o/m;Se>=0&&(u=Math.min($,Se/(a*o)));}h=de+a*u*o;}function Tt(){(({tStart:Y,tEnd:de}=St())),Qt(),He&&Ye&&(bt(),mt=pr(Y,de,U));}function ft(o,a=St){Re(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Fe(e);},o}function Zt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),le){let y=a==="reverse"?1-o:o;e.style.clipPath=ke(y);return}D.forEach((y,G)=>{y.style.strokeDashoffset=a==="reverse"?`${M[G]*o}`:`${M[G]*(1-o)}`,c&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),be&&re?y.style.stroke=je(be,re,o):re&&(y.style.stroke=re),q!==null&&Q!==null?y.style.strokeWidth=`${q+(Q-q)*o}`:Q!==null&&(y.style.strokeWidth=`${Q}`),Z!==null&&B!==null?y.style.fillOpacity=`${Z+(B-Z)*o}`:B!==null&&(y.style.fillOpacity=`${B}`),z&&y.tagName.toLowerCase()==="path"&&ne[G]&&y.setAttribute("d",gt(ne[G],z,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),le){e.style.clipPath=ke(0);return}D.forEach((o,a)=>{o.style.strokeDasharray=`${M[a]}`,o.style.strokeDashoffset=T==="reverse"?"0":`${M[a]}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),q!==null&&(o.style.strokeWidth=`${q}`),Z!==null&&(o.style.fillOpacity=`${Z}`),z&&o.tagName.toLowerCase()==="path"&&ne[a]&&o.setAttribute("d",ne[a]);});}if(D.forEach(o=>{fr(o);let a=Ge(o);M.push(a);let y=o.tagName.toLowerCase()==="path";y?ne.push(o.getAttribute("d")??""):ne.push(""),z&&(y?dr(ne[ne.length-1],z,o):ee(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),re&&(o.style.stroke=re),Q!==null&&(o.style.strokeWidth=`${Q}`),B!==null&&(o.style.fillOpacity=`${B}`),z&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",z)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?"0":`${a}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),q!==null&&(o.style.strokeWidth=`${q}`),Z!==null&&(o.style.fillOpacity=`${Z}`));}),le){if(i)return e.style.clipPath=ke(1),p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(i)return p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let xt=typeof f=="string"?st(f):null;function Kt(){return !($e===false||!mr()||!D.length||!xt||le||U!=="y"||pe||m!==1||$!==0||ue||ie||_!==false||z||x||E||te>0||J||P||p||d||R||ae||Ae||H!=null||O!=null||N!=null||(v.start??"top bottom").trim()!=="top bottom"||(v.end??"bottom top").trim()!=="bottom top")}function er(){let o=++ur,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,G=`--svg-scroll-draw-${o}`,Se=T==="reverse"?"0":"var(--ssd-len)",Pe=T==="reverse"?"var(--ssd-len)":"0",Le=`stroke-dashoffset:${Se};`,w=`stroke-dashoffset:${Pe};`;c&&(Le+=`opacity:${T==="reverse"?1:0};`,w+=`opacity:${T==="reverse"?0:1};`);let A=document.createElement("style");A.setAttribute("data-svg-scroll-draw",""),A.textContent=`@keyframes ${a}{from{${Le}}to{${w}}}.${y}{view-timeline-name:${G};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${G};animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(y);function oe(g,j){g.style.setProperty("--ssd-len",String(M[j])),g.style.strokeDasharray=`${M[j]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a);}D.forEach(oe);let b=false,I=-1;function W(){if(I>=0)return I;let g=e.getBoundingClientRect(),{tStart:j,tEnd:Te}=De({top:g.top,height:g.height},Ke(),Et(),Ce,We);return Ee(se(Ke(),j,Te,m))}return {destroy(){e.classList.remove(y),D.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),A.remove();},replay(){b=false,I=-1,D.forEach(oe);},pause(){b=true,D.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,D.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let j=Math.min(1,Math.max(0,g));I=j,b=true,D.forEach((Te,ye)=>{Te.classList.remove(a),Te.style.strokeDashoffset=T==="reverse"?`${M[ye]*j}`:`${M[ye]*(1-j)}`,c&&(Te.style.opacity=T==="reverse"?`${1-j}`:`${j}`);});},getProgress(){return W()},refresh(){D.forEach((g,j)=>{M[j]=Ge(g),g.style.setProperty("--ssd-len",String(M[j])),g.style.strokeDasharray=`${M[j]}`;});}}}if(Kt())return ft(er());function tr(){let o=Math.max(1,Me),a=0,y=0,G=false;function Se(b){let I=true;if(le){let W=Math.min(1,Math.max(0,b/o)),g=Ee(W);ge=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=ke(T==="reverse"?1-g:g),J?.(g),W<1&&(I=false);}else D.forEach((W,g)=>{let j=g*$*o,Te=Math.min(1,Math.max(0,(b-j)/o)),ye=Ee(Te);W.style.strokeDashoffset=T==="reverse"?`${M[g]*ye}`:`${M[g]*(1-ye)}`,c&&(W.style.opacity=T==="reverse"?`${1-ye}`:`${ye}`),be&&re?W.style.stroke=je(be,re,ye):re&&(W.style.stroke=re),q!==null&&Q!==null?W.style.strokeWidth=`${q+(Q-q)*ye}`:Q!==null&&(W.style.strokeWidth=`${Q}`),Z!==null&&B!==null?W.style.fillOpacity=`${Z+(B-Z)*ye}`:B!==null&&(W.style.fillOpacity=`${B}`),z&&W.tagName.toLowerCase()==="path"&&ne[g]&&W.setAttribute("d",gt(ne[g],z,ye)),g===0&&(ge=ye,J?.(ye),e.style.setProperty("--scroll-draw-progress",String(ye))),Te<1&&(I=false);});if(x){let W=Math.min(1,Math.max(0,b/o)),g=Ee(W);for(let j in x){let Te=parseFloat(j);g>=Te&&!_e.has(Te)&&(_e.add(Te),x[j]?.());}}return I}function Pe(b){if(V)return;let I=b-a;F||(F=true,P?.());let W=Se(I);if(W&&!k){k=true,Se(o*(1+Math.max(0,D.length-1)*$)),p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{a=performance.now(),F=false,k=false,_e.clear(),et(),S=requestAnimationFrame(Pe);},we));return}W||(S=requestAnimationFrame(Pe));}function Le(){cancelAnimationFrame(S),clearTimeout(Ne),a=performance.now(),y=0,V=false,F=false,k=false,Oe=0,G=true,ge=0,_e.clear(),et(),S=requestAnimationFrame(Pe);}let w=new IntersectionObserver(b=>{b.forEach(I=>{I.isIntersecting&&!(ue&&k)?Le():!I.isIntersecting&&!ue&&!k&&(cancelAnimationFrame(S),clearTimeout(Ne),G=false);});},{root:pe??null,threshold:C,rootMargin:L}),A;function oe(){clearTimeout(A),A=setTimeout(()=>{D.forEach((b,I)=>{M[I]=Ge(b),b.style.strokeDasharray=`${M[I]}`;});},150);}return window.addEventListener("resize",oe),window.addEventListener("orientationchange",oe),te>0?setTimeout(()=>w.observe(e),te):w.observe(e),{destroy(){cancelAnimationFrame(S),clearTimeout(Ne),w.disconnect(),window.removeEventListener("resize",oe),window.removeEventListener("orientationchange",oe),clearTimeout(A);},replay(){Oe=0,Le();},pause(){V||!G||(V=true,y=performance.now()-a,cancelAnimationFrame(S));},resume(){V&&(V=false,G=true,a=performance.now()-y,S=requestAnimationFrame(Pe));},seek(b){let I=Math.min(1,Math.max(0,b));ge=I,V=true,y=I*o,a=performance.now()-y,cancelAnimationFrame(S),Se(y);},getProgress(){return ge},refresh(){clearTimeout(A),D.forEach((b,I)=>{M[I]=Ge(b),b.style.strokeDasharray=`${M[I]}`;});}}}if(ve)return ft(tr());Tt();function Mt(){if(V||!Be)return;let o=performance.now(),a=Ke();if(!ze&&_===false&&a===wt){pt(a);return}ze=false,wt=a;let y=m;if(_!==false){let w=o-vt,A=w>0?Math.abs(a-(Ze<0?a:Ze))/w:0;y=m*Math.max(.2,1+A*(typeof _=="number"?_:1)*.04);}Ze=a,vt=o;let G=ie?K===-1||a>=K?"forward":"reverse":T;K=a;let Se=de-Y,Pe=true,Le=Se===0?0:(a-Y)/Se;if(isNaN(qe)||(qe<=0&&Le>0?d?.():qe>0&&Le<=0&&Ae?.(),qe<1&&Le>=1?R?.():qe>=1&&Le<1&&ae?.()),qe=Le,le){let w=Ee(se(a,Y,de,y));ue&&!ie&&(ce=Math.max(ce,w),w=ce),ge=w,e.style.setProperty("--scroll-draw-progress",String(w));let A=G==="reverse"?1-w:w;e.style.clipPath=ke(A),J?.(w),!F&&se(a,Y,de,y)>0&&(F=true,P?.()),w>=1&&!k?(k=true,p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{ce=-1,F=false,k=false,e.style.clipPath=ke(0);},we))):w<1&&!ue&&(k=false),pt(a);return}if(D.forEach((w,A)=>{let oe=A*u*Se,b=Ee(se(a,Y+oe,de+oe,y));ue&&!ie&&(b=Ie[A]=Math.max(Ie[A]??ce,b)),w.style.strokeDashoffset=G==="reverse"?`${M[A]*b}`:`${M[A]*(1-b)}`,c&&(w.style.opacity=G==="reverse"?`${1-b}`:`${b}`),be&&re?w.style.stroke=je(be,re,b):re&&(w.style.stroke=re),q!==null&&Q!==null?w.style.strokeWidth=`${q+(Q-q)*b}`:Q!==null&&(w.style.strokeWidth=`${Q}`),Z!==null&&B!==null?w.style.fillOpacity=`${Z+(B-Z)*b}`:B!==null&&(w.style.fillOpacity=`${B}`),z&&w.tagName.toLowerCase()==="path"&&ne[A]&&w.setAttribute("d",gt(ne[A],z,b)),A===0&&(ge=b,J?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Pe=false);}),x){let w=Ee(se(a,Y,de,y));for(let A in x){let oe=parseFloat(A);w>=oe&&!_e.has(oe)&&(_e.add(oe),x[A]?.());}}!F&&se(a,Y,de,y)>0&&(F=true,P?.()),Pe&&!k?(k=true,p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{ce=-1,Ie=[],F=false,k=false,_e.clear(),et(),ze=true;},we))):!Pe&&!ue&&(k=false),pt(a);}function At(o){return o>=de&&o<h}function pt(o){X||At(o)?S=requestAnimationFrame(Mt):Be=false;}let Be=false;function tt(){Be||(Be=true,S=requestAnimationFrame(function(){Mt();}));}function rt(){Be=false,cancelAnimationFrame(S);}let dt=new IntersectionObserver(o=>{o.forEach(a=>{X=a.isIntersecting,X&&!V?(ze=true,tt()):Be&&!V&&At(Ke())||rt();});},{root:pe??null,threshold:C,rootMargin:L});function Lt(){D.forEach((o,a)=>{M[a]=Ge(o),o.style.strokeDasharray=`${M[a]}`;}),Tt(),ze=true;}let nt;function Ue(){clearTimeout(nt),nt=setTimeout(Lt,150);}window.addEventListener("resize",Ue),window.addEventListener("orientationchange",Ue);let rr=Ve([e],Ue);return te>0?setTimeout(()=>dt.observe(e),te):dt.observe(e),ft({destroy(){cancelAnimationFrame(S),clearTimeout(Ne),rt(),dt.disconnect(),rr(),window.removeEventListener("resize",Ue),window.removeEventListener("orientationchange",Ue),clearTimeout(nt),bt();},replay(){ce=-1,Ie=[],K=-1,Ze=-1,F=false,k=false,Oe=0,V=false,ge=0,_e.clear(),clearTimeout(Ne),et(),ze=true,X&&tt();},pause(){V=true,rt();},resume(){V&&(V=false,ze=true,X&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));ge=a,ce=a,Ie=[],V=true,rt(),Zt(a,T),ze=true;},getProgress(){return ge},refresh(){clearTimeout(nt),Lt(),X&&!V&&tt();}},()=>({tStart:Y,tEnd:de}))}function gr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Vt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}r.push({fn:t[1],nums:s,units:i});}return r}function yr(e,r,n){let t=Vt(e),s=Vt(r);return t.length===0||t.length!==s.length?n<1?e:r:t.map((i,l)=>{let m=s[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((c,f)=>`${c}${i.units[f]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,f)=>`${c}${m.units[f]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,f)=>`${c+(m.nums[f]-c)*n}${i.units[f]}`).join(", ")})`}).join(" ")}function Wt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),s=String(r);if(gr(t))return je(t,s,n);if(t.includes("("))return yr(t,s,n);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),c=parseFloat(l[1]);return `${m+(c-m)*n}${i[2]||l[2]}`}return n<1?t:s}function hr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var br=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),wr=0,qt="--scroll-draw-progress";function vr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Bt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:m=false,axis:c="y",scrollContainer:f,native:v=true,velocityScale:$=false,respectReducedMotion:T=true,triggerElement:ue,onProgress:He,onComplete:U,onEnter:me,onLeave:ie,onEnterBack:te,onLeaveBack:H}=r,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,N=typeof i=="function"?i:he[i]??he["ease-out"],x=xe(s.start??"top bottom"),_=xe(s.end??"bottom top"),C=ue??e,L=typeof f=="string"?document.querySelector(f):f??null,E=Object.entries(t).map(([u,h])=>({prop:hr(u),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function we(){let u=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=u.getPropertyValue(h.prop).trim()||"0");}function z(){for(let u of E)e.style.setProperty(u.prop,String(u.to));}let fe=new Map;for(let u of [...E.map(h=>h.prop),qt])fe.set(u,e.style.getPropertyValue(u));function ve(){for(let[u,h]of fe)h?e.style.setProperty(u,h):e.style.removeProperty(u);}if(O)return z(),U?.(),{...n,destroy:ve,getProgress:()=>1};we();let Me=typeof i=="string"?st(i):null;function $e(){if(!v||!vr()||!Me||c!=="y"||L||C!==e||m||l!==1||He||U||me||ie||te||H||$!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let u of E)if(!br.has(u.prop))return false;return true}function J(){let u=`ssd-a-${++wr}`,h=E.map(K=>`${K.prop}:${K.from}`).join(";"),k=E.map(K=>`${K.prop}:${K.to}`).join(";"),F=document.createElement("style");F.setAttribute("data-ssd-animate",""),F.textContent=`@keyframes ${u}{from{${h}}to{${k}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Me};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(u);let S=()=>c==="x"?window.scrollX:window.scrollY,X=()=>c==="x"?window.innerWidth:window.innerHeight,ce=()=>{let K=e.getBoundingClientRect();return De({top:K.top,height:K.height},S(),X(),x,_)};Re(e,{type:"animate",getProgress:()=>Ie.getProgress(),getTrigger:ce});let Ie={refresh(){},destroy(){e.classList.remove(u),F.remove(),e.style.animationPlayState="",ve(),Fe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(K){let V=Math.min(1,Math.max(0,K));e.classList.remove(u);for(let ge of E)e.style.setProperty(ge.prop,Wt(ge.from,ge.to,V));},getProgress(){let{tStart:K,tEnd:V}=ce();return N(se(S(),K,V,l))}};return Ie}if($e())return J();let P=0,p=0,d=0,R=false,ae=false,Ae=-1,le=0,Ee=false,Ce=NaN,We=-1,pe=0,be=()=>L?c==="x"?L.scrollLeft:L.scrollTop:c==="x"?window.scrollX:window.scrollY,re=()=>L?c==="x"?L.clientWidth:L.clientHeight:c==="x"?window.innerWidth:window.innerHeight,q=C===e?E:[],Q=false;function Z(){let u=e.style,h=q.map(X=>u.getPropertyValue(X.prop)),k=u.transition;q.length&&(u.transition="none"),q.forEach(X=>u.setProperty(X.prop,fe.get(X.prop)??""));let F=ot(C,L,c);q.forEach((X,ce)=>u.setProperty(X.prop,h[ce])),q.length&&(e.offsetWidth,u.transition=k);let S=De(F,F.scroll,re(),x,_);Q&&Math.abs(S.tStart-P)<1&&Math.abs(S.tEnd-p)<1||(Q=true,P=S.tStart,p=S.tEnd);}function B(u){e.style.setProperty(qt,String(u));for(let h of E)e.style.setProperty(h.prop,Wt(h.from,h.to,u));He?.(u);}function ke(u){if(isNaN(Ce)){Ce=u;return}Ce<=0&&u>0?me?.():Ce>0&&u<=0&&H?.(),Ce<1&&u>=1?ie?.():Ce>=1&&u<1&&te?.(),Ce=u;}function D(){if(!R||ae)return;let u=performance.now(),h=be(),k=l;if($!==false){let X=u-pe,ce=X>0?Math.abs(h-(We<0?h:We))/X:0;k=l*Math.max(.2,1+ce*(typeof $=="number"?$:1)*.04);}We=h,pe=u;let F=p===P?0:(h-P)/(p-P);ke(F);let S=N(se(h,P,p,k));m&&(Ae=Math.max(Ae,S),S=Ae),le=S,B(S),S>=1&&!Ee?(Ee=true,U?.()):S<1&&!m&&(Ee=false),d=requestAnimationFrame(D);}Z(),p===P&&ee("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=N(se(be(),P,p,l));m&&u>0&&(Ae=u),le=u,B(u);}let M=new IntersectionObserver(u=>{u.forEach(h=>{R=h.isIntersecting,R&&!ae?d=requestAnimationFrame(D):cancelAnimationFrame(d);});},{root:L??null}),ne;function Y(){clearTimeout(ne),ne=setTimeout(Z,150);}window.addEventListener("resize",Y),window.addEventListener("orientationchange",Y);let de=Ve([C],Y);return M.observe(e),Re(e,{type:"animate",getProgress:()=>le,getTrigger:()=>({tStart:P,tEnd:p})}),{destroy(){cancelAnimationFrame(d),M.disconnect(),window.removeEventListener("resize",Y),window.removeEventListener("orientationchange",Y),de(),clearTimeout(ne),ve(),Fe(e);},replay(){Ae=-1,Ee=false,le=0,ae=false,B(0);},pause(){ae=true,cancelAnimationFrame(d);},resume(){ae&&(ae=false,R&&(d=requestAnimationFrame(D)));},seek(u){let h=Math.min(1,Math.max(0,u));le=h,Ae=h,ae=true,cancelAnimationFrame(d),B(h);},getProgress(){return le},refresh(){Z();}}}var yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Gt(e,r){if(typeof window>"u")return yt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ee("scrollCounter: element not found:",e),yt;let t=n,{from:s=0,to:i,format:l,easing:m="ease-out",trigger:c={},once:f=true,decimals:v,onComplete:$}=r,T=v!==void 0?p=>p.toFixed(v):l??(p=>String(Math.round(p))),ue=typeof m=="function"?m:he[m]??he["ease-out"],He=xe(c.start??"top 80%"),U=xe(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=T(i),$?.(),yt;let ie=0,te=0,H=false,O=0,N=false,x=false,_=-1,C=0,L=false,E=()=>window.scrollY,we=()=>window.innerHeight;function z(){let p=t.getBoundingClientRect(),d=De({top:p.top,height:p.height},E(),we(),He,U);H&&Math.abs(d.tStart-ie)<1&&Math.abs(d.tEnd-te)<1||(H=true,ie=d.tStart,te=d.tEnd);}function fe(p){t.textContent=T(s+(i-s)*p),t.style.setProperty("--scroll-draw-progress",String(p));}function ve(){if(!N||x)return;let p=ue(se(E(),ie,te,1));f&&(_=Math.max(_,p),p=_),C=p,fe(p),p>=1&&!L?(L=true,$?.()):p<1&&!f&&(L=false),O=requestAnimationFrame(ve);}z();{let p=ue(se(E(),ie,te,1));f&&p>0&&(_=p),C=p,fe(p);}let Me=new IntersectionObserver(p=>{p.forEach(d=>{N=d.isIntersecting,N&&!x?O=requestAnimationFrame(ve):cancelAnimationFrame(O);});}),$e;function J(){clearTimeout($e),$e=setTimeout(z,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let P=Ve([t],J);return Me.observe(t),Re(t,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:ie,tEnd:te})}),{destroy(){cancelAnimationFrame(O),Me.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),P(),clearTimeout($e),Fe(t);},replay(){_=-1,L=false,C=0,x=false,fe(0);},pause(){x=true,cancelAnimationFrame(O);},resume(){x&&(x=false,N&&(O=requestAnimationFrame(ve)));},seek(p){let d=Math.min(1,Math.max(0,p));C=d,_=d,x=true,cancelAnimationFrame(O),fe(d);},getProgress(){return C}}}function Yt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Er(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function jt(e){let r=Yt(e),n=new Map;for(let i of r){let l=i.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(i);}let t=[],s=Array.from(n.keys()).sort((i,l)=>i-l);for(let i of s){let l=n.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",l.forEach((c,f)=>{let v=c.nextElementSibling;m.appendChild(c),f<l.length-1&&v&&v.style.whiteSpace==="pre"&&m.appendChild(v);}),t.push(m);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Sr(e,r,n,t){if(n<=1||t===0)return e;let s=(n-1)*t,i=r*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Tr(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,r={}){if(typeof window>"u")return Ut;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ee("scrollText: element not found:",e),Ut;let t=n,{split:s="words",stagger:i=.04,easing:l="ease-out",from:m={opacity:0,y:24},trigger:c={},once:f=true,onComplete:v}=r,$=window.matchMedia("(prefers-reduced-motion: reduce)").matches,T=typeof l=="function"?l:he[l]??he["ease-out"],ue=xe(c.start??"top 85%"),He=xe(c.end??"top 40%"),U=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let me;s==="chars"?me=Er(t):s==="lines"?me=jt(t):me=Yt(t);let ie=me.length;function te(d,R){m?.opacity!==void 0&&(d.style.opacity=String(m.opacity+(1-m.opacity)*R));let ae=Tr(R,m);ae&&(d.style.transform=ae);}function H(d){t.style.setProperty("--scroll-draw-progress",String(d)),me.forEach((R,ae)=>{let Ae=T(Sr(d,ae,ie,i));te(R,Ae);});}if($)return H(1),v?.(),{destroy(){t.innerHTML=U,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let O=0,N=0,x=0,_=false,C=false,L=-1,E=0,we=false,z=()=>window.scrollY,fe=()=>window.innerHeight;function ve(){let d=t.getBoundingClientRect(),R=De({top:d.top,height:d.height},z(),fe(),ue,He);O=R.tStart,N=R.tEnd;}function Me(){if(!_||C)return;let d=se(z(),O,N,1);f&&(L=Math.max(L,d),d=L),E=d,H(d),d>=1&&!we?(we=true,v?.()):d<1&&!f&&(we=false),x=requestAnimationFrame(Me);}ve();let $e=new IntersectionObserver(d=>{d.forEach(R=>{_=R.isIntersecting,_&&!C?x=requestAnimationFrame(Me):cancelAnimationFrame(x);});}),J;function P(){clearTimeout(J),J=setTimeout(()=>{if(s==="lines"){let d=E;t.innerHTML=U,t.setAttribute("aria-label",t.textContent??""),me=jt(t),H(d);}ve();},150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let p=Ve([t],P);return $e.observe(t),Re(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:O,tEnd:N})}),{destroy(){cancelAnimationFrame(x),$e.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),p(),clearTimeout(J),t.innerHTML=U,t.removeAttribute("aria-label"),Fe(t);},replay(){L=-1,we=false,E=0,C=false,H(0);},pause(){C=true,cancelAnimationFrame(x);},resume(){C&&(C=false,_&&(x=requestAnimationFrame(Me)));},seek(d){let R=Math.min(1,Math.max(0,d));E=R,L=R,C=true,cancelAnimationFrame(x),H(R);},getProgress(){return E}}}function xr(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let t=typeof e=="string"?document.querySelector(e):e;return t?lt(t,r):(ee("Container not found:",e),n)}function Qe(){return typeof document>"u"?null:document}var ht=new WeakMap,Jt;function ct(e,r,n,t){let s=ht.get(e)??new Map;ht.set(e,s);let i=()=>{let c=n(),f=s.get(r);f&&f.key===c||(f?.inst.destroy(),s.set(r,{inst:t(c),key:c,build:i,users:f?.users??0}));};i(),s.get(r).users++;let l=true;typeof MutationObserver<"u"&&(Jt??(Jt=new MutationObserver(c=>c.forEach(f=>ht.get(f.target)?.forEach(v=>v.build())))),Jt.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(c=>`data-scroll-${c}-options`).concat("data-scroll-drawoptions")}));let m=()=>s.get(r)?.inst;return {destroy:()=>{let c=s.get(r);!l||!c||(l=false,!(--c.users>0)&&(c.inst.destroy(),s.delete(r)));},replay:()=>m()?.replay(),pause:()=>m()?.pause(),resume:()=>m()?.resume(),seek:c=>m()?.seek(c),getProgress:()=>m()?.getProgress()??0,refresh:()=>m()?.refresh?.()}}function ut(e,r){try{return e?JSON.parse(e):r}catch{return r}}function Mr(e=Qe()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(r=>ct(r,"draw",()=>r.dataset.scrollDrawOptions??r.dataset.scrollDrawoptions??"",n=>lt(r,ut(n,{})))):[]}function Ar(e=Qe()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(r=>ct(r,"animate",()=>r.dataset.scrollAnimateOptions??"",n=>Bt(r,ut(n,{props:{}})))):[]}function Lr(e=Qe()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(r=>ct(r,"counter",()=>r.dataset.scrollCounterOptions??"",n=>{let t=ut(n,{});return !t.to&&t.to!==0&&(ee('initScrollCounter: element missing "to" in options JSON:',r),t.to=0),typeof t.format!="function"&&t.format!==void 0&&(ee('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',r),delete t.format),Gt(r,t)})):[]}function $r(e=Qe()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(r=>ct(r,"text",()=>r.dataset.scrollTextOptions??"",n=>Xt(r,ut(n,{})))):[]}function Cn(e=Qe()){return {draw:Mr(e),animate:Ar(e),counter:Lr(e),text:$r(e)}}exports.initAll=Cn;exports.initScrollAnimate=Ar;exports.initScrollCounter=Lr;exports.initScrollDraw=Mr;exports.initScrollText=$r;exports.scrollDraw=xr;
3
+ <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function gr(e,r,n){if(!Xe)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),s=(r.match(Vt)??[]).join("").toUpperCase(),i=(e.match(zt)??[]).length,l=(r.match(zt)??[]).length;if(t!==s){K(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}i!==l&&K(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ht(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),m=t[s++]??l;return String(+(l+(m-l)*n).toFixed(4))})}function lt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,s=n?{...It[n],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=false,easing:f="linear",trigger:v={},stagger:$=0,direction:T="forward",once:ue=false,debug:He=false,axis:U="y",scrollContainer:me,autoReverse:ie=false,delay:ee=0,strokeColor:H,strokeWidth:O,fillOpacity:N,waypoints:x,velocityScale:_=false,threshold:C=0,rootMargin:L="0px",repeat:E=0,repeatDelay:we=0,morphTo:z,clip:fe,autoplay:ve=false,duration:Me=1e3,native:$e=true,onProgress:X,onStart:P,onComplete:p,onEnter:d,onLeave:R,onEnterBack:ae,onLeaveBack:Ae}=s,le=fe===true?"left":typeof fe=="string"?fe:false,Ee=typeof f=="function"?f:he[f]??he.linear,Ce=xe(v.start??"top bottom"),We=xe(v.end??"bottom top"),pe=typeof me=="string"?document.querySelector(me):me??null,be=Array.isArray(H)?H[0]:null,te=Array.isArray(H)?H[1]:typeof H=="string"?H:null,q=Array.isArray(O)?O[0]:null,J=Array.isArray(O)?O[1]:typeof O=="number"?O:null,Q=Array.isArray(N)?N[0]:null,B=Array.isArray(N)?N[1]:typeof N=="number"?N:null;function ke(o){let a=o*100;switch(le){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let D=le?[]:Array.from(e.querySelectorAll(l)),M=[],re=[],Y=0,de=0,u=$,h=0,k=false,F=false,S=0,ne=false,ce=-1,Ie=[],Z=-1,V=false,ge=0,Oe=0,Ne,mt=null;function vt(){mt?.destroy(),mt=null;}let _e=new Set,Et=NaN,ze=true,Ke=-1,St=performance.now(),qe=NaN;function Ue(){return pe?U==="x"?pe.scrollLeft:pe.scrollTop:U==="x"?window.scrollX:window.scrollY}function Tt(){return pe?U==="x"?pe.clientWidth:pe.clientHeight:U==="x"?window.innerWidth:window.innerHeight}function xt(){let o=ot(e,pe,U);return De(o,o.scroll,Tt(),Ce,We)}function Zt(){let o=de-Y,a=D.length-1,y=pe??document.documentElement,G=U==="x"?"Width":"Height";if(u=$,$>0&&a>0&&o>0){let Se=y[`scroll${G}`]-y[`client${G}`]-1-Y-o/m;Se>=0&&(u=Math.min($,Se/(a*o)));}h=de+a*u*o;}function Mt(){(({tStart:Y,tEnd:de}=xt())),Zt(),He&&Xe&&(vt(),mt=dr(Y,de,U));}function ft(o,a=xt){Re(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let y=o.destroy;return o.destroy=()=>{y.call(o),Fe(e);},o}function Kt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),le){let y=a==="reverse"?1-o:o;e.style.clipPath=ke(y);return}D.forEach((y,G)=>{y.style.strokeDashoffset=a==="reverse"?`${M[G]*o}`:`${M[G]*(1-o)}`,c&&(y.style.opacity=a==="reverse"?`${1-o}`:`${o}`),be&&te?y.style.stroke=je(be,te,o):te&&(y.style.stroke=te),q!==null&&J!==null?y.style.strokeWidth=`${q+(J-q)*o}`:J!==null&&(y.style.strokeWidth=`${J}`),Q!==null&&B!==null?y.style.fillOpacity=`${Q+(B-Q)*o}`:B!==null&&(y.style.fillOpacity=`${B}`),z&&y.tagName.toLowerCase()==="path"&&re[G]&&y.setAttribute("d",ht(re[G],z,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),le){e.style.clipPath=ke(0);return}D.forEach((o,a)=>{o.style.strokeDasharray=`${M[a]}`,o.style.strokeDashoffset=T==="reverse"?"0":`${M[a]}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),q!==null&&(o.style.strokeWidth=`${q}`),Q!==null&&(o.style.fillOpacity=`${Q}`),z&&o.tagName.toLowerCase()==="path"&&re[a]&&o.setAttribute("d",re[a]);});}if(D.forEach(o=>{pr(o);let a=Ge(o);M.push(a);let y=o.tagName.toLowerCase()==="path";y?re.push(o.getAttribute("d")??""):re.push(""),z&&(y?gr(re[re.length-1],z,o):K(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),te&&(o.style.stroke=te),J!==null&&(o.style.strokeWidth=`${J}`),B!==null&&(o.style.fillOpacity=`${B}`),z&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",z)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?"0":`${a}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),q!==null&&(o.style.strokeWidth=`${q}`),Q!==null&&(o.style.fillOpacity=`${Q}`));}),le){if(i)return e.style.clipPath=ke(1),p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(i)return p?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof f=="string"?st(f):null;function er(){return !($e===false||!fr()||!D.length||!At||le||U!=="y"||pe||m!==1||$!==0||ue||ie||_!==false||z||x||E||ee>0||X||P||p||d||R||ae||Ae||H!=null||O!=null||N!=null||(v.start??"top bottom").trim()!=="top bottom"||(v.end??"bottom top").trim()!=="bottom top")}function tr(){let o=++mr,a=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,G=`--svg-scroll-draw-${o}`,Se=T==="reverse"?"0":"var(--ssd-len)",Pe=T==="reverse"?"var(--ssd-len)":"0",Le=`stroke-dashoffset:${Se};`,w=`stroke-dashoffset:${Pe};`;c&&(Le+=`opacity:${T==="reverse"?1:0};`,w+=`opacity:${T==="reverse"?0:1};`);let A=document.createElement("style");A.setAttribute("data-svg-scroll-draw",""),A.textContent=`@keyframes ${a}{from{${Le}}to{${w}}}.${y}{view-timeline-name:${G};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${G};animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(y);function oe(g,j){g.style.setProperty("--ssd-len",String(M[j])),g.style.strokeDasharray=`${M[j]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(a);}D.forEach(oe);let b=false,I=-1;function W(){if(I>=0)return I;let g=e.getBoundingClientRect(),{tStart:j,tEnd:Te}=De({top:g.top,height:g.height},Ue(),Tt(),Ce,We);return Ee(se(Ue(),j,Te,m))}return {destroy(){e.classList.remove(y),D.forEach(g=>{g.classList.remove(a),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),A.remove();},replay(){b=false,I=-1,D.forEach(oe);},pause(){b=true,D.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,D.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let j=Math.min(1,Math.max(0,g));I=j,b=true,D.forEach((Te,ye)=>{Te.classList.remove(a),Te.style.strokeDashoffset=T==="reverse"?`${M[ye]*j}`:`${M[ye]*(1-j)}`,c&&(Te.style.opacity=T==="reverse"?`${1-j}`:`${j}`);});},getProgress(){return W()},refresh(){D.forEach((g,j)=>{M[j]=Ge(g),g.style.setProperty("--ssd-len",String(M[j])),g.style.strokeDasharray=`${M[j]}`;});}}}if(er())return ft(tr());function rr(){let o=Math.max(1,Me),a=0,y=0,G=false;function Se(b){let I=true;if(le){let W=Math.min(1,Math.max(0,b/o)),g=Ee(W);ge=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=ke(T==="reverse"?1-g:g),X?.(g),W<1&&(I=false);}else D.forEach((W,g)=>{let j=g*$*o,Te=Math.min(1,Math.max(0,(b-j)/o)),ye=Ee(Te);W.style.strokeDashoffset=T==="reverse"?`${M[g]*ye}`:`${M[g]*(1-ye)}`,c&&(W.style.opacity=T==="reverse"?`${1-ye}`:`${ye}`),be&&te?W.style.stroke=je(be,te,ye):te&&(W.style.stroke=te),q!==null&&J!==null?W.style.strokeWidth=`${q+(J-q)*ye}`:J!==null&&(W.style.strokeWidth=`${J}`),Q!==null&&B!==null?W.style.fillOpacity=`${Q+(B-Q)*ye}`:B!==null&&(W.style.fillOpacity=`${B}`),z&&W.tagName.toLowerCase()==="path"&&re[g]&&W.setAttribute("d",ht(re[g],z,ye)),g===0&&(ge=ye,X?.(ye),e.style.setProperty("--scroll-draw-progress",String(ye))),Te<1&&(I=false);});if(x){let W=Math.min(1,Math.max(0,b/o)),g=Ee(W);for(let j in x){let Te=parseFloat(j);g>=Te&&!_e.has(Te)&&(_e.add(Te),x[j]?.());}}return I}function Pe(b){if(V)return;let I=b-a;F||(F=true,P?.());let W=Se(I);if(W&&!k){k=true,Se(o*(1+Math.max(0,D.length-1)*$)),p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{a=performance.now(),F=false,k=false,_e.clear(),et(),S=requestAnimationFrame(Pe);},we));return}W||(S=requestAnimationFrame(Pe));}function Le(){cancelAnimationFrame(S),clearTimeout(Ne),a=performance.now(),y=0,V=false,F=false,k=false,Oe=0,G=true,ge=0,_e.clear(),et(),S=requestAnimationFrame(Pe);}let w=new IntersectionObserver(b=>{b.forEach(I=>{I.isIntersecting&&!(ue&&k)?Le():!I.isIntersecting&&!ue&&!k&&(cancelAnimationFrame(S),clearTimeout(Ne),G=false);});},{root:pe??null,threshold:C,rootMargin:L}),A;function oe(){clearTimeout(A),A=setTimeout(()=>{D.forEach((b,I)=>{M[I]=Ge(b),b.style.strokeDasharray=`${M[I]}`;});},150);}return window.addEventListener("resize",oe),window.addEventListener("orientationchange",oe),ee>0?setTimeout(()=>w.observe(e),ee):w.observe(e),{destroy(){cancelAnimationFrame(S),clearTimeout(Ne),w.disconnect(),window.removeEventListener("resize",oe),window.removeEventListener("orientationchange",oe),clearTimeout(A);},replay(){Oe=0,Le();},pause(){V||!G||(V=true,y=performance.now()-a,cancelAnimationFrame(S));},resume(){V&&(V=false,G=true,a=performance.now()-y,S=requestAnimationFrame(Pe));},seek(b){let I=Math.min(1,Math.max(0,b));ge=I,V=true,y=I*o,a=performance.now()-y,cancelAnimationFrame(S),Se(y);},getProgress(){return ge},refresh(){clearTimeout(A),D.forEach((b,I)=>{M[I]=Ge(b),b.style.strokeDasharray=`${M[I]}`;});}}}if(ve)return ft(rr());Mt();function Lt(){if(V||!Be)return;let o=performance.now(),a=Ue();if(!ze&&_===false&&a===Et){dt(a);return}ze=false,Et=a;let y=m;if(_!==false){let w=o-St,A=w>0?Math.abs(a-(Ke<0?a:Ke))/w:0;y=m*Math.max(.2,1+A*(typeof _=="number"?_:1)*.04);}Ke=a,St=o;let G=ie?Z===-1||a>=Z?"forward":"reverse":T;Z=a;let Se=de-Y,Pe=true,Le=Se===0?0:(a-Y)/Se;if(isNaN(qe)||(qe<=0&&Le>0?d?.():qe>0&&Le<=0&&Ae?.(),qe<1&&Le>=1?R?.():qe>=1&&Le<1&&ae?.()),qe=Le,le){let w=Ee(se(a,Y,de,y));ue&&!ie&&(ce=Math.max(ce,w),w=ce),ge=w,e.style.setProperty("--scroll-draw-progress",String(w));let A=G==="reverse"?1-w:w;e.style.clipPath=ke(A),X?.(w),!F&&se(a,Y,de,y)>0&&(F=true,P?.()),w>=1&&!k?(k=true,p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{ce=-1,F=false,k=false,e.style.clipPath=ke(0);},we))):w<1&&!ue&&(k=false),dt(a);return}if(D.forEach((w,A)=>{let oe=A*u*Se,b=Ee(se(a,Y+oe,de+oe,y));ue&&!ie&&(b=Ie[A]=Math.max(Ie[A]??ce,b)),w.style.strokeDashoffset=G==="reverse"?`${M[A]*b}`:`${M[A]*(1-b)}`,c&&(w.style.opacity=G==="reverse"?`${1-b}`:`${b}`),be&&te?w.style.stroke=je(be,te,b):te&&(w.style.stroke=te),q!==null&&J!==null?w.style.strokeWidth=`${q+(J-q)*b}`:J!==null&&(w.style.strokeWidth=`${J}`),Q!==null&&B!==null?w.style.fillOpacity=`${Q+(B-Q)*b}`:B!==null&&(w.style.fillOpacity=`${B}`),z&&w.tagName.toLowerCase()==="path"&&re[A]&&w.setAttribute("d",ht(re[A],z,b)),A===0&&(ge=b,X?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Pe=false);}),x){let w=Ee(se(a,Y,de,y));for(let A in x){let oe=parseFloat(A);w>=oe&&!_e.has(oe)&&(_e.add(oe),x[A]?.());}}!F&&se(a,Y,de,y)>0&&(F=true,P?.()),Pe&&!k?(k=true,p?.(),Oe<(E==="infinite"?1/0:E??0)&&(Oe++,Ne=setTimeout(()=>{ce=-1,Ie=[],F=false,k=false,_e.clear(),et(),ze=true;},we))):!Pe&&!ue&&(k=false),dt(a);}function pt(o){return o>=de&&o<h}function dt(o){ne||pt(o)?S=requestAnimationFrame(Lt):Be=false;}function gt(){return ne||pt(Ue())}let Be=false;function tt(){Be||(Be=true,S=requestAnimationFrame(function(){Lt();}));}function rt(){Be=false,cancelAnimationFrame(S);}let yt=new IntersectionObserver(o=>{o.forEach(a=>{ne=a.isIntersecting,ne&&!V?(ze=true,tt()):Be&&!V&&pt(Ue())||rt();});},{root:pe??null,threshold:C,rootMargin:L});function $t(){D.forEach((o,a)=>{M[a]=Ge(o),o.style.strokeDasharray=`${M[a]}`;}),Mt(),ze=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout($t,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let nr=Ve([e],Ye);return ee>0?setTimeout(()=>yt.observe(e),ee):yt.observe(e),ft({destroy(){cancelAnimationFrame(S),clearTimeout(Ne),rt(),yt.disconnect(),nr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),vt();},replay(){ce=-1,Ie=[],Z=-1,Ke=-1,F=false,k=false,Oe=0,V=false,ge=0,_e.clear(),clearTimeout(Ne),et(),ze=true,gt()&&tt();},pause(){V=true,rt();},resume(){V&&(V=false,ze=true,gt()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));ge=a,ce=a,Ie=[],V=true,rt(),Kt(a,T),ze=true;},getProgress(){return ge},refresh(){clearTimeout(nt),$t(),gt()&&!V&&tt();}},()=>({tStart:Y,tEnd:de}))}function yr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Wt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}r.push({fn:t[1],nums:s,units:i});}return r}function hr(e,r,n){let t=Wt(e),s=Wt(r);return t.length===0||t.length!==s.length?n<1?e:r:t.map((i,l)=>{let m=s[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((c,f)=>`${c}${i.units[f]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,f)=>`${c}${m.units[f]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,f)=>`${c+(m.nums[f]-c)*n}${i.units[f]}`).join(", ")})`}).join(" ")}function qt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),s=String(r);if(yr(t))return je(t,s,n);if(t.includes("("))return hr(t,s,n);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),c=parseFloat(l[1]);return `${m+(c-m)*n}${i[2]||l[2]}`}return n<1?t:s}function br(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var wr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),vr=0,Bt="--scroll-draw-progress";function Er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Gt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:m=false,axis:c="y",scrollContainer:f,native:v=true,velocityScale:$=false,respectReducedMotion:T=true,triggerElement:ue,onProgress:He,onComplete:U,onEnter:me,onLeave:ie,onEnterBack:ee,onLeaveBack:H}=r,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,N=typeof i=="function"?i:he[i]??he["ease-out"],x=xe(s.start??"top bottom"),_=xe(s.end??"bottom top"),C=ue??e,L=typeof f=="string"?document.querySelector(f):f??null,E=Object.entries(t).map(([u,h])=>({prop:br(u),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function we(){let u=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=u.getPropertyValue(h.prop).trim()||"0");}function z(){for(let u of E)e.style.setProperty(u.prop,String(u.to));}let fe=new Map;for(let u of [...E.map(h=>h.prop),Bt])fe.set(u,e.style.getPropertyValue(u));function ve(){for(let[u,h]of fe)h?e.style.setProperty(u,h):e.style.removeProperty(u);}if(O)return z(),U?.(),{...n,destroy:ve,getProgress:()=>1};we();let Me=typeof i=="string"?st(i):null;function $e(){if(!v||!Er()||!Me||c!=="y"||L||C!==e||m||l!==1||He||U||me||ie||ee||H||$!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let u of E)if(!wr.has(u.prop))return false;return true}function X(){let u=`ssd-a-${++vr}`,h=E.map(Z=>`${Z.prop}:${Z.from}`).join(";"),k=E.map(Z=>`${Z.prop}:${Z.to}`).join(";"),F=document.createElement("style");F.setAttribute("data-ssd-animate",""),F.textContent=`@keyframes ${u}{from{${h}}to{${k}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Me};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(u);let S=()=>c==="x"?window.scrollX:window.scrollY,ne=()=>c==="x"?window.innerWidth:window.innerHeight,ce=()=>{let Z=e.getBoundingClientRect();return De({top:Z.top,height:Z.height},S(),ne(),x,_)};Re(e,{type:"animate",getProgress:()=>Ie.getProgress(),getTrigger:ce});let Ie={refresh(){},destroy(){e.classList.remove(u),F.remove(),e.style.animationPlayState="",ve(),Fe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(Z){let V=Math.min(1,Math.max(0,Z));e.classList.remove(u);for(let ge of E)e.style.setProperty(ge.prop,qt(ge.from,ge.to,V));},getProgress(){let{tStart:Z,tEnd:V}=ce();return N(se(S(),Z,V,l))}};return Ie}if($e())return X();let P=0,p=0,d=0,R=false,ae=false,Ae=-1,le=0,Ee=false,Ce=NaN,We=-1,pe=0,be=()=>L?c==="x"?L.scrollLeft:L.scrollTop:c==="x"?window.scrollX:window.scrollY,te=()=>L?c==="x"?L.clientWidth:L.clientHeight:c==="x"?window.innerWidth:window.innerHeight,q=C===e?E:[],J=false;function Q(){let u=e.style,h=q.map(ne=>u.getPropertyValue(ne.prop)),k=u.transition;q.length&&(u.transition="none"),q.forEach(ne=>u.setProperty(ne.prop,fe.get(ne.prop)??""));let F=ot(C,L,c);q.forEach((ne,ce)=>u.setProperty(ne.prop,h[ce])),q.length&&(e.offsetWidth,u.transition=k);let S=De(F,F.scroll,te(),x,_);J&&Math.abs(S.tStart-P)<1&&Math.abs(S.tEnd-p)<1||(J=true,P=S.tStart,p=S.tEnd);}function B(u){e.style.setProperty(Bt,String(u));for(let h of E)e.style.setProperty(h.prop,qt(h.from,h.to,u));He?.(u);}function ke(u){if(isNaN(Ce)){Ce=u;return}Ce<=0&&u>0?me?.():Ce>0&&u<=0&&H?.(),Ce<1&&u>=1?ie?.():Ce>=1&&u<1&&ee?.(),Ce=u;}function D(){if(!R||ae)return;let u=performance.now(),h=be(),k=l;if($!==false){let ne=u-pe,ce=ne>0?Math.abs(h-(We<0?h:We))/ne:0;k=l*Math.max(.2,1+ce*(typeof $=="number"?$:1)*.04);}We=h,pe=u;let F=p===P?0:(h-P)/(p-P);ke(F);let S=N(se(h,P,p,k));m&&(Ae=Math.max(Ae,S),S=Ae),le=S,B(S),S>=1&&!Ee?(Ee=true,U?.()):S<1&&!m&&(Ee=false),d=requestAnimationFrame(D);}Q(),p===P&&K("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=N(se(be(),P,p,l));m&&u>0&&(Ae=u),le=u,B(u);}let M=new IntersectionObserver(u=>{u.forEach(h=>{R=h.isIntersecting,R&&!ae?d=requestAnimationFrame(D):cancelAnimationFrame(d);});},{root:L??null}),re;function Y(){clearTimeout(re),re=setTimeout(Q,150);}window.addEventListener("resize",Y),window.addEventListener("orientationchange",Y);let de=Ve([C],Y);return M.observe(e),Re(e,{type:"animate",getProgress:()=>le,getTrigger:()=>({tStart:P,tEnd:p})}),{destroy(){cancelAnimationFrame(d),M.disconnect(),window.removeEventListener("resize",Y),window.removeEventListener("orientationchange",Y),de(),clearTimeout(re),ve(),Fe(e);},replay(){Ae=-1,Ee=false,le=0,ae=false,B(0);},pause(){ae=true,cancelAnimationFrame(d);},resume(){ae&&(ae=false,R&&(d=requestAnimationFrame(D)));},seek(u){let h=Math.min(1,Math.max(0,u));le=h,Ae=h,ae=true,cancelAnimationFrame(d),B(h);},getProgress(){return le},refresh(){Q();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,r){if(typeof window>"u")return bt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return K("scrollCounter: element not found:",e),bt;let t=n,{from:s=0,to:i,format:l,easing:m="ease-out",trigger:c={},once:f=true,decimals:v,onComplete:$}=r,T=v!==void 0?p=>p.toFixed(v):l??(p=>String(Math.round(p))),ue=typeof m=="function"?m:he[m]??he["ease-out"],He=xe(c.start??"top 80%"),U=xe(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=T(i),$?.(),bt;let ie=0,ee=0,H=false,O=0,N=false,x=false,_=-1,C=0,L=false,E=()=>window.scrollY,we=()=>window.innerHeight;function z(){let p=t.getBoundingClientRect(),d=De({top:p.top,height:p.height},E(),we(),He,U);H&&Math.abs(d.tStart-ie)<1&&Math.abs(d.tEnd-ee)<1||(H=true,ie=d.tStart,ee=d.tEnd);}function fe(p){t.textContent=T(s+(i-s)*p),t.style.setProperty("--scroll-draw-progress",String(p));}function ve(){if(!N||x)return;let p=ue(se(E(),ie,ee,1));f&&(_=Math.max(_,p),p=_),C=p,fe(p),p>=1&&!L?(L=true,$?.()):p<1&&!f&&(L=false),O=requestAnimationFrame(ve);}z();{let p=ue(se(E(),ie,ee,1));f&&p>0&&(_=p),C=p,fe(p);}let Me=new IntersectionObserver(p=>{p.forEach(d=>{N=d.isIntersecting,N&&!x?O=requestAnimationFrame(ve):cancelAnimationFrame(O);});}),$e;function X(){clearTimeout($e),$e=setTimeout(z,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let P=Ve([t],X);return Me.observe(t),Re(t,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:ie,tEnd:ee})}),{destroy(){cancelAnimationFrame(O),Me.disconnect(),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),P(),clearTimeout($e),Fe(t);},replay(){_=-1,L=false,C=0,x=false,fe(0);},pause(){x=true,cancelAnimationFrame(O);},resume(){x&&(x=false,N&&(O=requestAnimationFrame(ve)));},seek(p){let d=Math.min(1,Math.max(0,p));C=d,_=d,x=true,cancelAnimationFrame(O),fe(d);},getProgress(){return C}}}function Xt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function Sr(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Ut(e){let r=Xt(e),n=new Map;for(let i of r){let l=i.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(i);}let t=[],s=Array.from(n.keys()).sort((i,l)=>i-l);for(let i of s){let l=n.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",l.forEach((c,f)=>{let v=c.nextElementSibling;m.appendChild(c),f<l.length-1&&v&&v.style.whiteSpace==="pre"&&m.appendChild(v);}),t.push(m);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Tr(e,r,n,t){if(n<=1||t===0)return e;let s=(n-1)*t,i=r*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function xr(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,r={}){if(typeof window>"u")return Yt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return K("scrollText: element not found:",e),Yt;let t=n,{split:s="words",stagger:i=.04,easing:l="ease-out",from:m={opacity:0,y:24},trigger:c={},once:f=true,onComplete:v}=r,$=window.matchMedia("(prefers-reduced-motion: reduce)").matches,T=typeof l=="function"?l:he[l]??he["ease-out"],ue=xe(c.start??"top 85%"),He=xe(c.end??"top 40%"),U=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let me;s==="chars"?me=Sr(t):s==="lines"?me=Ut(t):me=Xt(t);let ie=me.length;function ee(d,R){m?.opacity!==void 0&&(d.style.opacity=String(m.opacity+(1-m.opacity)*R));let ae=xr(R,m);ae&&(d.style.transform=ae);}function H(d){t.style.setProperty("--scroll-draw-progress",String(d)),me.forEach((R,ae)=>{let Ae=T(Tr(d,ae,ie,i));ee(R,Ae);});}if($)return H(1),v?.(),{destroy(){t.innerHTML=U,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let O=0,N=0,x=0,_=false,C=false,L=-1,E=0,we=false,z=()=>window.scrollY,fe=()=>window.innerHeight;function ve(){let d=t.getBoundingClientRect(),R=De({top:d.top,height:d.height},z(),fe(),ue,He);O=R.tStart,N=R.tEnd;}function Me(){if(!_||C)return;let d=se(z(),O,N,1);f&&(L=Math.max(L,d),d=L),E=d,H(d),d>=1&&!we?(we=true,v?.()):d<1&&!f&&(we=false),x=requestAnimationFrame(Me);}ve();let $e=new IntersectionObserver(d=>{d.forEach(R=>{_=R.isIntersecting,_&&!C?x=requestAnimationFrame(Me):cancelAnimationFrame(x);});}),X;function P(){clearTimeout(X),X=setTimeout(()=>{if(s==="lines"){let d=E;t.innerHTML=U,t.setAttribute("aria-label",t.textContent??""),me=Ut(t),H(d);}ve();},150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let p=Ve([t],P);return $e.observe(t),Re(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:O,tEnd:N})}),{destroy(){cancelAnimationFrame(x),$e.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),p(),clearTimeout(X),t.innerHTML=U,t.removeAttribute("aria-label"),Fe(t);},replay(){L=-1,we=false,E=0,C=false,H(0);},pause(){C=true,cancelAnimationFrame(x);},resume(){C&&(C=false,_&&(x=requestAnimationFrame(Me)));},seek(d){let R=Math.min(1,Math.max(0,d));E=R,L=R,C=true,cancelAnimationFrame(x),H(R);},getProgress(){return E}}}function Mr(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let t=typeof e=="string"?document.querySelector(e):e;return t?lt(t,r):(K("Container not found:",e),n)}function Ze(){return typeof document>"u"?null:document}var wt=new WeakMap,Qt;function ct(e,r,n,t){let s=wt.get(e)??new Map;wt.set(e,s);let i=()=>{let c=n(),f=s.get(r);f&&f.key===c||(f?.inst.destroy(),s.set(r,{inst:t(c),key:c,build:i,users:f?.users??0}));};i(),s.get(r).users++;let l=true;typeof MutationObserver<"u"&&(Qt??(Qt=new MutationObserver(c=>c.forEach(f=>wt.get(f.target)?.forEach(v=>v.build())))),Qt.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(c=>`data-scroll-${c}-options`).concat("data-scroll-drawoptions")}));let m=()=>s.get(r)?.inst;return {destroy:()=>{let c=s.get(r);!l||!c||(l=false,!(--c.users>0)&&(c.inst.destroy(),s.delete(r)));},replay:()=>m()?.replay(),pause:()=>m()?.pause(),resume:()=>m()?.resume(),seek:c=>m()?.seek(c),getProgress:()=>m()?.getProgress()??0,refresh:()=>m()?.refresh?.()}}function ut(e,r){try{return e?JSON.parse(e):r}catch{return r}}function Ar(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(r=>ct(r,"draw",()=>r.dataset.scrollDrawOptions??r.dataset.scrollDrawoptions??"",n=>lt(r,ut(n,{})))):[]}function Lr(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(r=>ct(r,"animate",()=>r.dataset.scrollAnimateOptions??"",n=>Gt(r,ut(n,{props:{}})))):[]}function $r(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(r=>ct(r,"counter",()=>r.dataset.scrollCounterOptions??"",n=>{let t=ut(n,{});return !t.to&&t.to!==0&&(K('initScrollCounter: element missing "to" in options JSON:',r),t.to=0),typeof t.format!="function"&&t.format!==void 0&&(K('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',r),delete t.format),jt(r,t)})):[]}function Cr(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(r=>ct(r,"text",()=>r.dataset.scrollTextOptions??"",n=>Jt(r,ut(n,{})))):[]}function Pn(e=Ze()){return {draw:Ar(e),animate:Lr(e),counter:$r(e),text:Cr(e)}}exports.initAll=Pn;exports.initScrollAnimate=Lr;exports.initScrollCounter=$r;exports.initScrollDraw=Ar;exports.initScrollText=Cr;exports.scrollDraw=Mr;
@@ -1 +1 @@
1
- export{a as scrollDraw}from'../chunk-6SSA5V7J.mjs';import {a as a$2}from'../chunk-I45LCJUP.mjs';import {a as a$1}from'../chunk-KHQ7OGQK.mjs';import {a}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b as b$1}from'../chunk-LFSU6LR3.mjs';function i(){return typeof document>"u"?null:document}var p=new WeakMap,g;function c(r,t,n,o){let l=p.get(r)??new Map;p.set(r,l);let f=()=>{let e=n(),s=l.get(t);s&&s.key===e||(s?.inst.destroy(),l.set(t,{inst:o(e),key:e,build:f,users:s?.users??0}));};f(),l.get(t).users++;let S=true;typeof MutationObserver<"u"&&(g??(g=new MutationObserver(e=>e.forEach(s=>p.get(s.target)?.forEach(O=>O.build())))),g.observe(r,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(e=>`data-scroll-${e}-options`).concat("data-scroll-drawoptions")}));let a=()=>l.get(t)?.inst;return {destroy:()=>{let e=l.get(t);!S||!e||(S=false,!(--e.users>0)&&(e.inst.destroy(),l.delete(t)));},replay:()=>a()?.replay(),pause:()=>a()?.pause(),resume:()=>a()?.resume(),seek:e=>a()?.seek(e),getProgress:()=>a()?.getProgress()??0,refresh:()=>a()?.refresh?.()}}function u(r,t){try{return r?JSON.parse(r):t}catch{return t}}function E(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-draw]")).map(t=>c(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>b(t,u(n,{})))):[]}function A(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-animate]")).map(t=>c(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>a(t,u(n,{props:{}})))):[]}function I(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-counter]")).map(t=>c(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let o=u(n,{});return !o.to&&o.to!==0&&(b$1('initScrollCounter: element missing "to" in options JSON:',t),o.to=0),typeof o.format!="function"&&o.format!==void 0&&(b$1('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete o.format),a$1(t,o)})):[]}function M(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-text]")).map(t=>c(t,"text",()=>t.dataset.scrollTextOptions??"",n=>a$2(t,u(n,{})))):[]}function H(r=i()){return {draw:E(r),animate:A(r),counter:I(r),text:M(r)}}export{H as initAll,A as initScrollAnimate,I as initScrollCounter,E as initScrollDraw,M as initScrollText};
1
+ export{a as scrollDraw}from'../chunk-SMRTRZSD.mjs';import {a as a$2}from'../chunk-I45LCJUP.mjs';import {a as a$1}from'../chunk-KHQ7OGQK.mjs';import {a}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b as b$1}from'../chunk-LFSU6LR3.mjs';function i(){return typeof document>"u"?null:document}var p=new WeakMap,g;function c(r,t,n,o){let l=p.get(r)??new Map;p.set(r,l);let f=()=>{let e=n(),s=l.get(t);s&&s.key===e||(s?.inst.destroy(),l.set(t,{inst:o(e),key:e,build:f,users:s?.users??0}));};f(),l.get(t).users++;let S=true;typeof MutationObserver<"u"&&(g??(g=new MutationObserver(e=>e.forEach(s=>p.get(s.target)?.forEach(O=>O.build())))),g.observe(r,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(e=>`data-scroll-${e}-options`).concat("data-scroll-drawoptions")}));let a=()=>l.get(t)?.inst;return {destroy:()=>{let e=l.get(t);!S||!e||(S=false,!(--e.users>0)&&(e.inst.destroy(),l.delete(t)));},replay:()=>a()?.replay(),pause:()=>a()?.pause(),resume:()=>a()?.resume(),seek:e=>a()?.seek(e),getProgress:()=>a()?.getProgress()??0,refresh:()=>a()?.refresh?.()}}function u(r,t){try{return r?JSON.parse(r):t}catch{return t}}function E(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-draw]")).map(t=>c(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>b(t,u(n,{})))):[]}function A(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-animate]")).map(t=>c(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>a(t,u(n,{props:{}})))):[]}function I(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-counter]")).map(t=>c(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let o=u(n,{});return !o.to&&o.to!==0&&(b$1('initScrollCounter: element missing "to" in options JSON:',t),o.to=0),typeof o.format!="function"&&o.format!==void 0&&(b$1('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete o.format),a$1(t,o)})):[]}function M(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-text]")).map(t=>c(t,"text",()=>t.dataset.scrollTextOptions??"",n=>a$2(t,u(n,{})))):[]}function H(r=i()){return {draw:E(r),animate:A(r),counter:I(r),text:M(r)}}export{H as initAll,A as initScrollAnimate,I as initScrollCounter,E as initScrollDraw,M as initScrollText};
@@ -1119,6 +1119,9 @@ var SvgScrollDraw = (() => {
1119
1119
  if (isVisible || inStaggerTail(scroll)) rafId = requestAnimationFrame(update);
1120
1120
  else looping = false;
1121
1121
  }
1122
+ function live() {
1123
+ return isVisible || inStaggerTail(scrollPos());
1124
+ }
1122
1125
  let looping = false;
1123
1126
  function startLoop() {
1124
1127
  if (looping) return;
@@ -1189,7 +1192,7 @@ var SvgScrollDraw = (() => {
1189
1192
  clearTimeout(repeatTimer);
1190
1193
  resetPaths();
1191
1194
  dirty = true;
1192
- if (isVisible) startLoop();
1195
+ if (live()) startLoop();
1193
1196
  },
1194
1197
  pause() {
1195
1198
  paused = true;
@@ -1199,7 +1202,7 @@ var SvgScrollDraw = (() => {
1199
1202
  if (!paused) return;
1200
1203
  paused = false;
1201
1204
  dirty = true;
1202
- if (isVisible) startLoop();
1205
+ if (live()) startLoop();
1203
1206
  },
1204
1207
  seek(progress) {
1205
1208
  const p = Math.min(1, Math.max(0, progress));
@@ -1224,7 +1227,7 @@ var SvgScrollDraw = (() => {
1224
1227
  refresh() {
1225
1228
  clearTimeout(resizeTimer);
1226
1229
  remeasure();
1227
- if (isVisible && !paused) startLoop();
1230
+ if (live() && !paused) startLoop();
1228
1231
  }
1229
1232
  }, () => ({ tStart, tEnd }));
1230
1233
  }