svg-scroll-draw 2.23.0 → 2.23.3

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.
Files changed (54) hide show
  1. package/README.md +16 -13
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.mjs +1 -1
  4. package/dist/astro/index.cjs +3 -3
  5. package/dist/astro/index.mjs +1 -1
  6. package/dist/cdn/svg-scroll-draw.dev.global.js +77 -118
  7. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  8. package/dist/chunk-23EALNDF.mjs +3 -0
  9. package/dist/{chunk-DY5JCXVR.mjs → chunk-4H2SGMAQ.mjs} +1 -1
  10. package/dist/{chunk-VMUJMXKO.mjs → chunk-4I7MLTP5.mjs} +1 -1
  11. package/dist/{chunk-OTDD2ROH.mjs → chunk-BLY6F6EC.mjs} +1 -1
  12. package/dist/{chunk-GVBO5GRD.mjs → chunk-ETACBG7W.mjs} +1 -1
  13. package/dist/chunk-GMBIGV3M.mjs +1 -0
  14. package/dist/chunk-LGJQWZHH.mjs +1 -0
  15. package/dist/chunk-UPWWULKI.mjs +1 -0
  16. package/dist/chunk-V4L3ELVC.mjs +1 -0
  17. package/dist/group/index.cjs +3 -3
  18. package/dist/group/index.d.mts +4 -2
  19. package/dist/group/index.d.ts +4 -2
  20. package/dist/group/index.mjs +1 -1
  21. package/dist/horizontal/index.cjs +1 -1
  22. package/dist/horizontal/index.mjs +1 -1
  23. package/dist/index.cjs +3 -3
  24. package/dist/index.d.mts +3 -2
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.mjs +1 -1
  27. package/dist/nuxt/index.cjs +3 -3
  28. package/dist/nuxt/index.mjs +1 -1
  29. package/dist/progress/index.cjs +1 -1
  30. package/dist/progress/index.mjs +1 -1
  31. package/dist/react/index.cjs +3 -3
  32. package/dist/react/index.mjs +1 -1
  33. package/dist/reveal/index.cjs +1 -1
  34. package/dist/reveal/index.mjs +1 -1
  35. package/dist/solid/index.cjs +2 -2
  36. package/dist/solid/index.mjs +1 -1
  37. package/dist/svelte/index.cjs +2 -2
  38. package/dist/svelte/index.mjs +1 -1
  39. package/dist/text/index.cjs +1 -1
  40. package/dist/text/index.mjs +1 -1
  41. package/dist/timeline/index.cjs +1 -1
  42. package/dist/timeline/index.mjs +1 -1
  43. package/dist/video/index.cjs +1 -1
  44. package/dist/video/index.mjs +1 -1
  45. package/dist/vue/index.cjs +3 -3
  46. package/dist/vue/index.mjs +1 -1
  47. package/dist/web-component/index.cjs +3 -3
  48. package/dist/web-component/index.mjs +1 -1
  49. package/package.json +1 -1
  50. package/dist/chunk-HX4SP5WN.mjs +0 -3
  51. package/dist/chunk-KV3WCPQ5.mjs +0 -1
  52. package/dist/chunk-LTCJVVSC.mjs +0 -1
  53. package/dist/chunk-WXUOF4NM.mjs +0 -1
  54. package/dist/chunk-YWKPTYSG.mjs +0 -1
package/README.md CHANGED
@@ -7,10 +7,14 @@
7
7
  [![license](https://img.shields.io/npm/l/svg-scroll-draw)](./LICENSE)
8
8
  [![GitHub stars](https://img.shields.io/github/stars/DhruvilChauahan0210/ink-scroll?style=flat)](https://github.com/DhruvilChauahan0210/ink-scroll/stargazers)
9
9
 
10
- > Draw SVG paths on scroll — plus reveal, pin, snap, parallax, counters, video scrub and text splitting. **11.7 KB gzipped for every API, from 1.6 KB if you import one.** Zero dependencies, MIT, and a native CSS fast path that runs with no per-frame JavaScript. Works in React, Next.js, Vue, Svelte, Solid, Angular, Astro, Nuxt and vanilla JS.
10
+ > Draw SVG paths on scroll — plus reveal, pin, snap, parallax, counters, video scrub and text splitting. **11.6 KB gzipped for every API, from 1.6 KB if you import one.** Zero dependencies, MIT, and a native CSS fast path that runs with no per-frame JavaScript. Works in React, Next.js, Vue, Svelte, Solid, Angular, Astro, Nuxt and vanilla JS.
11
11
 
12
12
  **[Live Demo](https://svg-scroll-draw.vercel.app)** · [npm](https://www.npmjs.com/package/svg-scroll-draw) · [Docs](https://svg-scroll-draw.vercel.app/docs) · [Examples](https://svg-scroll-draw.vercel.app/examples) · [Report a bug](https://github.com/DhruvilChauahan0210/ink-scroll/issues)
13
13
 
14
+ **Guides by framework:** [React](https://svg-scroll-draw.vercel.app/react-scroll-animation) · [Next.js](https://svg-scroll-draw.vercel.app/nextjs-scroll-animation) · [Vue](https://svg-scroll-draw.vercel.app/vue-scroll-animation) · [Nuxt](https://svg-scroll-draw.vercel.app/nuxt-scroll-animation) · [Svelte](https://svg-scroll-draw.vercel.app/svelte-scroll-animation) · [Solid](https://svg-scroll-draw.vercel.app/solid-scroll-animation) · [Angular](https://svg-scroll-draw.vercel.app/angular-scroll-animation) · [Astro](https://svg-scroll-draw.vercel.app/astro-scroll-animation)
15
+
16
+ **Compared with:** [GSAP](https://svg-scroll-draw.vercel.app/vs-gsap) · [Framer Motion](https://svg-scroll-draw.vercel.app/vs-framer-motion) · [Motion](https://svg-scroll-draw.vercel.app/vs-motion) · [AOS](https://svg-scroll-draw.vercel.app/vs-aos) · [Locomotive Scroll](https://svg-scroll-draw.vercel.app/vs-locomotive-scroll) · [ScrollMagic](https://svg-scroll-draw.vercel.app/vs-scrollmagic) · [Vivus](https://svg-scroll-draw.vercel.app/vs-vivus)
17
+
14
18
  **Try it in your browser, no install:** [Vanilla JS on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/vanilla) · [React on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/react)
15
19
 
16
20
  **Using an AI coding agent?** Give it the [svg-scroll-draw skill](https://github.com/DhruvilChauahan0210/ink-scroll/blob/main/skills/svg-scroll-draw/SKILL.md) or point it at [llms.txt](https://svg-scroll-draw.vercel.app/llms.txt).
@@ -133,12 +137,11 @@ scrollCounter('#revenue', {
133
137
  once: true,
134
138
  });
135
139
 
136
- // Percentage with decimal
140
+ // Percentage with one decimal. decimals replaces format, so the % goes in format.
137
141
  scrollCounter('#rate', {
138
- from: 0,
139
- to: 94.7,
140
- decimals: 1,
141
- format: n => n.toFixed(1) + '%',
142
+ from: 0,
143
+ to: 94.7,
144
+ format: n => n.toFixed(1) + '%',
142
145
  });
143
146
  ```
144
147
 
@@ -157,7 +160,7 @@ import { ScrollCounter } from 'svg-scroll-draw/react';
157
160
  | `to` | `number` | — | Target value **(required)** |
158
161
  | `from` | `number` | `0` | Starting value. Set higher than `to` to count down. |
159
162
  | `format` | `(n: number) => string` | `String(Math.round(n))` | Custom formatter |
160
- | `decimals` | `number` | — | Shorthand for `format: n => n.toFixed(decimals)` |
163
+ | `decimals` | `number` | — | Shorthand for `format: n => n.toFixed(decimals)`; replaces `format` when both are set |
161
164
  | `easing` | `string \| fn` | `"ease-out"` | — |
162
165
  | `trigger` | `TriggerConfig` | `{ start: 'top 80%', end: 'top 20%' }` | — |
163
166
  | `once` | `boolean` | `true` | — |
@@ -170,12 +173,12 @@ import { ScrollCounter } from 'svg-scroll-draw/react';
170
173
  ```js
171
174
  import { scrollParallax } from 'svg-scroll-draw';
172
175
 
173
- scrollParallax('#hero-bg', { speed: 0.4 }); // 40% of scroll rate
174
- scrollParallax('#floating-badge', { speed: -0.3 }); // opposite direction
176
+ scrollParallax('#hero-bg', { speed: 0.4 }); // up 40% of its height: ahead of the page
177
+ scrollParallax('#floating-badge', { speed: -0.3 }); // down 30%: lags behind the page
175
178
  scrollParallax('#sidebar', { speed: 0.3, axis: 'x' }); // horizontal
176
179
  ```
177
180
 
178
- `speed` is a multiplier relative to element height. `0.5` = half scroll speed, `-0.2` = opposite direction.
181
+ `speed` is how far the element travels while it crosses the viewport, as a fraction of its own height (its width on `axis: 'x'`). A positive speed moves it up as you scroll down, so it runs ahead of the page: `0.5` = up half its height. A negative one moves it down, so it lags behind, as a background does: `-0.2` = down a fifth.
179
182
 
180
183
  ---
181
184
 
@@ -631,9 +634,9 @@ devtools.highlight('#my-element'); // outline for 2 seconds
631
634
  <!-- size-table:start -->
632
635
  | Entry | Gzipped |
633
636
  |---|---|
634
- | `svg-scroll-draw` (main, every core API) | 11.7 KB |
635
- | `svg-scroll-draw/react` (includes the engine) | 13.2 KB |
636
- | `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.8 KB |
637
+ | `svg-scroll-draw` (main, every core API) | 11.6 KB |
638
+ | `svg-scroll-draw/react` (includes the engine) | 13.1 KB |
639
+ | `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.7 KB |
637
640
  | `svg-scroll-draw/reveal` | 5.8 KB |
638
641
  | `svg-scroll-draw/text` | 3.4 KB |
639
642
  | `svg-scroll-draw/video` | 2.8 KB |
@@ -1,3 +1,3 @@
1
- 'use strict';function yn({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(r),i=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(s,d);a.push(x),i+=x;}let m=[0],f=0;for(let d=0;d<t;d++)f+=a[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let H=(d-m[x])/(m[x+1]-m[x]);if(x===0)return H*(2-H);let P=1-Math.pow(r,x);return P+(1-P)*(2*H-1)*(2*H-1)}return 1}}function hn({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),s=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var oe={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:yn(),elastic:hn()};function $t(e,n,t){return Math.min(t,Math.max(n,e))}function ye(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function Pt(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function Ct(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,t,r){return t===n?0:$t((e-n)/(t-n)*r,0,1)}function Le(e,n,t,r,s){let i=Pt(e.top,e.height,n,r.element)-Ct(r.viewport,t),a=Pt(e.top,e.height,n,s.element)-Ct(s.viewport,t);return {tStart:i,tEnd:a}}function st(e,n,t){let r=e.getBoundingClientRect(),s=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left+n.scrollLeft:r.top-n.getBoundingClientRect().top+n.scrollTop,height:s,scroll:0}:{top:t==="x"?r.left:r.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function Qe(e){let n=e.tagName.toLowerCase();if(n==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(t+r)}if(n==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function kt(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 t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Ue(e,n,t){let r=kt(e),s=kt(n);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*t)},${Math.round(r[1]+(s[1]-r[1])*t)},${Math.round(r[2]+(s[2]-r[2])*t)})`}var Ot={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 he(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var bn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",wn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",It=33;function vn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function En(e){let n=[];for(let t=0;t<It;t++){let r=t/(It-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return bn;case "ease-out":return wn;case "ease-in-out":return vn()?En(oe["ease-in-out"]):null;default:return null}}var Ft=Symbol.for("svg-scroll-draw.registry");function Dt(){let e=globalThis;return e[Ft]||(e[Ft]=new Map)}function Ce(e,n){Dt().set(e,n);}function ke(e){Dt().delete(e);}var Ze,at=new Set,lt=new WeakMap,Je=new Map,Ht=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Sn(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==Ht(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(t);let r=Sn(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{lt.has(s)||lt.set(s,Ht(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{at.delete(t)&&(r.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),at.size||(Ze?.disconnect(),Ze=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function qe(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=ct(i=>{if(!i)return;r();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=n(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...a)=>t[i]?.(...a);return s.destroy=()=>{r(),t.destroy();},s}var Tn=0;function xn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Rt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Nt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Mn(e){if(!Ke)return;let n=Rt(e,"stroke");if(!n||n==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Nt.has(t)&&!Nt.has(Rt(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ln(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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=t==="x"?window.scrollX:window.scrollY,a=e-i,m=n-i,f=t==="x";r.innerHTML=`
2
- <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${f?`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(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function An(e,n,t){if(!Ke)return;let r=(e.match(Vt)??[]).join("").toUpperCase(),s=(n.match(Vt)??[]).join("").toUpperCase(),i=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(r!==s){he(`morphTo: command sequence differs (${r||"\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.`,t);return}i!==a&&he(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function yt(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=r[s++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function _t(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(n,(t,r)=>$n(e,t,r))}function $n(e,n,t){let{preset:r,...s}=n,i=r?{...Ot[r],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:x={},stagger:H=0,direction:P="forward",once:Q=false,debug:me=false,axis:I="y",scrollContainer:se,autoReverse:be=false,delay:F=0,strokeColor:R,strokeWidth:k,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Ee=false,duration:ie=1e3,native:V=true,onProgress:u,onStart:A,onComplete:h,onEnter:O,onLeave:te,onEnterBack:pe,onLeaveBack:Se}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,E=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(R)?R[0]:null,ne=Array.isArray(R)?R[1]:typeof R=="string"?R:null,re=Array.isArray(k)?k[0]:null,Y=Array.isArray(k)?k[1]:typeof k=="number"?k:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let c=o*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),C=[],we=[],l=0,p=0,$e=H,Te=0,$=false,z=false,G=0,Ne=false,q=-1,He=[],ze=-1,ce=false,Ie=0,Re=0,Ve,ut=null;function wt(){ut?.destroy(),ut=null;}let _e=new Set,vt=NaN,We=true,et=-1,Et=performance.now(),Ge=NaN;function Ye(){return ae?I==="x"?ae.scrollLeft:ae.scrollTop:I==="x"?window.scrollX:window.scrollY}function St(){return ae?I==="x"?ae.clientWidth:ae.clientHeight:I==="x"?window.innerWidth:window.innerHeight}function Tt(){let o=st(e,ae,I);return Le(o,o.scroll,St(),de,Ae)}function un(){let o=p-l,c=_.length-1,y=ae??document.documentElement,X=I==="x"?"Width":"Height";if($e=H,H>0&&c>0&&o>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-o/m;xe>=0&&($e=Math.min(H,xe/(c*o)));}Te=p+c*$e*o;}function xt(){(({tStart:l,tEnd:p}=Tt())),un(),me&&Ke&&(wt(),ut=Ln(l,p,I));}function mt(o,c=Tt){Ce(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),ke(e);},o}function mn(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),Z){let y=c==="reverse"?1-o:o;e.style.clipPath=Oe(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${C[X]*o}`:`${C[X]*(1-o)}`,f&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),le&&ne?y.style.stroke=Ue(le,ne,o):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*o}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",yt(we[X],L,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=Oe(0);return}_.forEach((o,c)=>{o.style.strokeDasharray=`${C[c]}`,o.style.strokeDashoffset=P==="reverse"?"0":`${C[c]}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`),L&&o.tagName.toLowerCase()==="path"&&we[c]&&o.setAttribute("d",we[c]);});}if(_.forEach(o=>{Mn(o);let c=Qe(o);C.push(c);let y=o.tagName.toLowerCase()==="path";y?we.push(o.getAttribute("d")??""):we.push(""),L&&(y?An(we[we.length-1],L,o):he(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=P==="reverse"?`${c}`:"0",f&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Y!==null&&(o.style.strokeWidth=`${Y}`),J!==null&&(o.style.fillOpacity=`${J}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=P==="reverse"?"0":`${c}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),Z){if(t)return e.style.clipPath=Oe(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(t)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Mt=typeof d=="string"?it(d):null;function fn(){return !(V===false||!xn()||!_.length||!Mt||Z||I!=="y"||ae||m!==1||H!==0||Q||be||v!==false||L||w||N||F>0||u||A||h||O||te||pe||Se||R!=null||k!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function pn(){let o=++Tn,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,X=`--svg-scroll-draw-${o}`,xe=P==="reverse"?"0":"var(--ssd-len)",Fe=P==="reverse"?"var(--ssd-len)":"0",Pe=`stroke-dashoffset:${xe};`,S=`stroke-dashoffset:${Fe};`;f&&(Pe+=`opacity:${P==="reverse"?1:0};`,S+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${c}{from{${Pe}}to{${S}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Mt};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(C[K])),g.style.strokeDasharray=`${C[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Ye(),St(),de,Ae);return E(ee(Ye(),K,Me,m))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=P==="reverse"?`${C[ve]*K}`:`${C[ve]*(1-K)}`,f&&(Me.style.opacity=P==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{C[K]=Qe(g),g.style.setProperty("--ssd-len",String(C[K])),g.style.strokeDasharray=`${C[K]}`;});}}}if(fn())return mt(pn());function dn(){let o=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/o)),g=E(j);Ie=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Oe(P==="reverse"?1-g:g),u?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*H*o,Me=Math.min(1,Math.max(0,(b-K)/o)),ve=E(Me);j.style.strokeDashoffset=P==="reverse"?`${C[g]*ve}`:`${C[g]*(1-ve)}`,f&&(j.style.opacity=P==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Ue(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",yt(we[g],L,ve)),g===0&&(Ie=ve,u?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/o)),g=E(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!_e.has(Me)&&(_e.add(Me),w[K]?.());}}return W}function Fe(b){if(ce)return;let W=b-c;z||(z=true,A?.());let j=xe(W);if(j&&!$){$=true,xe(o*(1+Math.max(0,_.length-1)*H)),h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{c=performance.now(),z=false,$=false,_e.clear(),tt(),G=requestAnimationFrame(Fe);},B));return}j||(G=requestAnimationFrame(Fe));}function Pe(){cancelAnimationFrame(G),clearTimeout(Ve),c=performance.now(),y=0,ce=false,z=false,$=false,Re=0,X=true,Ie=0,_e.clear(),tt(),G=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&$)?Pe():!W.isIntersecting&&!Q&&!$&&(cancelAnimationFrame(G),clearTimeout(Ve),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),D;function ue(){clearTimeout(D),D=setTimeout(()=>{_.forEach((b,W)=>{C[W]=Qe(b),b.style.strokeDasharray=`${C[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),F>0?setTimeout(()=>S.observe(e),F):S.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(Ve),S.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(D);},replay(){Re=0,Pe();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Ie=W,ce=true,y=W*o,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Ie},refresh(){clearTimeout(D),_.forEach((b,W)=>{C[W]=Qe(b),b.style.strokeDasharray=`${C[W]}`;});}}}if(Ee)return mt(dn());xt();function Lt(){if(ce||!je)return;let o=performance.now(),c=Ye();if(!We&&v===false&&c===vt){pt(c);return}We=false,vt=c;let y=m;if(v!==false){let S=o-Et,D=S>0?Math.abs(c-(et<0?c:et))/S:0;y=m*Math.max(.2,1+D*(typeof v=="number"?v:1)*.04);}et=c,Et=o;let X=be?ze===-1||c>=ze?"forward":"reverse":P;ze=c;let xe=p-l,Fe=true,Pe=xe===0?0:(c-l)/xe;if(isNaN(Ge)||(Ge<=0&&Pe>0?O?.():Ge>0&&Pe<=0&&Se?.(),Ge<1&&Pe>=1?te?.():Ge>=1&&Pe<1&&pe?.()),Ge=Pe,Z){let S=E(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,S),S=q),Ie=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=X==="reverse"?1-S:S;e.style.clipPath=Oe(D),u?.(S),!z&&ee(c,l,p,y)>0&&(z=true,A?.()),S>=1&&!$?($=true,h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{q=-1,z=false,$=false,e.style.clipPath=Oe(0);},B))):S<1&&!Q&&($=false),pt(c);return}if(_.forEach((S,D)=>{let ue=D*$e*xe,b=E(ee(c,l+ue,p+ue,y));Q&&!be&&(b=He[D]=Math.max(He[D]??q,b)),S.style.strokeDashoffset=X==="reverse"?`${C[D]*b}`:`${C[D]*(1-b)}`,f&&(S.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?S.style.stroke=Ue(le,ne,b):ne&&(S.style.stroke=ne),re!==null&&Y!==null?S.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(S.style.strokeWidth=`${Y}`),ge!==null&&J!==null?S.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(S.style.fillOpacity=`${J}`),L&&S.tagName.toLowerCase()==="path"&&we[D]&&S.setAttribute("d",yt(we[D],L,b)),D===0&&(Ie=b,u?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=E(ee(c,l,p,y));for(let D in w){let ue=parseFloat(D);S>=ue&&!_e.has(ue)&&(_e.add(ue),w[D]?.());}}!z&&ee(c,l,p,y)>0&&(z=true,A?.()),Fe&&!$?($=true,h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{q=-1,He=[],z=false,$=false,_e.clear(),tt(),We=true;},B))):!Fe&&!Q&&($=false),pt(c);}function ft(o){return o>=p&&o<Te}function pt(o){Ne||ft(o)?G=requestAnimationFrame(Lt):je=false;}function dt(){return Ne||ft(Ye())}let je=false;function nt(){je||(je=true,G=requestAnimationFrame(function(){Lt();}));}function rt(){je=false,cancelAnimationFrame(G);}let gt=new IntersectionObserver(o=>{o.forEach(c=>{Ne=c.isIntersecting,Ne&&!ce?(We=true,nt()):je&&!ce&&ft(Ye())||rt();});},{root:ae??null,threshold:T,rootMargin:U});function At(){_.forEach((o,c)=>{C[c]=Qe(o),o.style.strokeDasharray=`${C[c]}`;}),xt(),We=true;}let ot;function Xe(){clearTimeout(ot),ot=setTimeout(At,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let gn=De([e],Xe);return F>0?setTimeout(()=>gt.observe(e),F):gt.observe(e),mt({destroy(){cancelAnimationFrame(G),clearTimeout(Ve),rt(),gt.disconnect(),gn(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(ot),wt();},replay(){q=-1,He=[],ze=-1,et=-1,z=false,$=false,Re=0,ce=false,Ie=0,_e.clear(),clearTimeout(Ve),tt(),We=true,dt()&&nt();},pause(){ce=true,rt();},resume(){ce&&(ce=false,We=true,dt()&&nt());},seek(o){let c=Math.min(1,Math.max(0,o));Ie=c,q=c,He=[],ce=true,rt(),mn(c,P),We=true;},getProgress(){return Ie},refresh(){clearTimeout(ot),At(),dt()&&!ce&&nt();}},()=>({tStart:l,tEnd:p}))}var Wt=new WeakMap,Pn=0;function ht(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=Wt.get(t);return r===void 0&&Wt.set(t,r=++Pn),`el#${r}`}return t})}function qt(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...s)=>n()[r]?.(...s));return t}function Cn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let s=[],i=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:r[1],nums:s,units:i});}return n}function kn(e,n,t){let r=Bt(e),s=Bt(n);return r.length===0||r.length!==s.length?t<1?e:n:r.map((i,a)=>{let m=s[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function Gt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),s=String(n);if(Cn(r))return Ue(r,s,t);if(r.includes("("))return kn(r,s,t);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),f=parseFloat(a[1]);return `${m+(f-m)*t}${i[2]||a[2]}`}return t<1?r:s}function On(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var In=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Fn=0,jt="--scroll-draw-progress";function Dn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n){return typeof window>"u"?Ut:n.respectReducedMotion===false?Qt(e,n,false):qe(n,(t,r)=>Qt(e,t,r))}function Qt(e,n,t){let{props:r,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:H=false,triggerElement:P,onProgress:Q,onComplete:me,onEnter:I,onLeave:se,onEnterBack:be,onLeaveBack:F}=n,R=typeof i=="function"?i:oe[i]??oe["ease-out"],k=ye(s.start??"top bottom"),M=ye(s.end??"bottom top"),w=P??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(r).map(([l,p])=>({prop:On(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),jt])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return N(),me?.(),{...Ut,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?it(i):null;function Ee(){if(!x||!Dn()||!fe||f!=="y"||v||w!==e||m||a!==1||Q||me||I||se||be||F||H!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!In.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++Fn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),$e=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${$e}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let $=()=>f==="x"?window.scrollX:window.scrollY,z=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},$(),z(),k,M)};Ce(e,{type:"animate",getProgress:()=>Ne.getProgress(),getTrigger:G});let Ne={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let He=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let ze of T)e.style.setProperty(ze.prop,Gt(ze.from,ze.to,He));},getProgress(){let{tStart:q,tEnd:He}=G();return R(ee($(),q,He,a))}};return Ne}if(Ee())return ie();let V=0,u=0,A=0,h=false,O=false,te=-1,pe=0,Se=false,Z=NaN,E=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(z=>l.getPropertyValue(z.prop)),$e=l.transition;le.length&&(l.transition="none"),le.forEach(z=>l.setProperty(z.prop,B.get(z.prop)??""));let Te=st(w,v,f);le.forEach((z,G)=>l.setProperty(z.prop,p[G])),le.length&&(e.offsetWidth,l.transition=$e);let $=Le(Te,Te.scroll,ae(),k,M);ne&&Math.abs($.tStart-V)<1&&Math.abs($.tEnd-u)<1||(ne=true,V=$.tStart,u=$.tEnd);}function Y(l){e.style.setProperty(jt,String(l));for(let p of T)e.style.setProperty(p.prop,Gt(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?I?.():Z>0&&l<=0&&F?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||O)return;let l=performance.now(),p=Ae(),$e=a;if(H!==false){let z=l-de,G=z>0?Math.abs(p-(E<0?p:E))/z:0;$e=a*Math.max(.2,1+G*(typeof H=="number"?H:1)*.04);}E=p,de=l;let Te=u===V?0:(p-V)/(u-V);ge(Te);let $=R(ee(p,V,u,$e));m&&(te=Math.max(te,$),$=te),pe=$,Y($),$>=1&&!Se?(Se=true,me?.()):$<1&&!m&&(Se=false),A=requestAnimationFrame(J);}re(),u===V&&he("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 l=R(ee(Ae(),V,u,a));m&&l>0&&(te=l),pe=l,Y(l);}let Oe=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!O?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function C(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let we=De([w],C);return Oe.observe(e),Ce(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:V,tEnd:u})}),{destroy(){cancelAnimationFrame(A),Oe.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),we(),clearTimeout(_),L(),ke(e);},replay(){te=-1,Se=false,pe=0,O=false,Y(0);},pause(){O=true,cancelAnimationFrame(A);},resume(){O&&(O=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,O=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,n){if(typeof window>"u")return bt;let t=typeof e=="string"?document.querySelector(e):e;return t?qe(n,(r,s)=>Hn(t,r,s)):(he("scrollCounter: element not found:",e),bt)}function Hn(e,n,t){let{from:r=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:x}=n,H=d!==void 0?u=>u.toFixed(d):i??(u=>String(Math.round(u))),P=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(m.start??"top 80%"),me=ye(m.end??"top 20%");if(t)return e.textContent=H(s),x?.(),{...bt,getProgress:()=>1};let I=0,se=0,be=false,F=0,R=false,k=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let u=e.getBoundingClientRect(),A=Le({top:u.top,height:u.height},T(),U(),Q,me);be&&Math.abs(A.tStart-I)<1&&Math.abs(A.tEnd-se)<1||(be=true,I=A.tStart,se=A.tEnd);}function B(u){e.textContent=H(r+(s-r)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function L(){if(!R||k)return;let u=P(ee(T(),I,se,1));f&&(M=Math.max(M,u),u=M),w=u,B(u),u>=1&&!v?(v=true,x?.()):u<1&&!f&&(v=false),F=requestAnimationFrame(L);}N();{let u=P(ee(T(),I,se,1));f&&u>0&&(M=u),w=u,B(u);}let fe=new IntersectionObserver(u=>{u.forEach(A=>{R=A.isIntersecting,R&&!k?F=requestAnimationFrame(L):cancelAnimationFrame(F);});}),Ee;function ie(){clearTimeout(Ee),Ee=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let V=De([e],ie);return fe.observe(e),Ce(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:se})}),{destroy(){cancelAnimationFrame(F),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),V(),clearTimeout(Ee),ke(e);},replay(){M=-1,v=false,w=0,k=false,B(0);},pause(){k=true,cancelAnimationFrame(F);},resume(){k&&(k=false,R&&(F=requestAnimationFrame(L)));},seek(u){let A=Math.min(1,Math.max(0,u));w=A,M=A,k=true,cancelAnimationFrame(F),B(A);},getProgress(){return w}}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,n={}){if(typeof window>"u")return Kt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),Kt;let r=t,{trigger:s={},easing:i="linear",once:a=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:H,onProgress:P}=n,Q=d??r,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:oe[i]??oe.linear,se=ye(s.start??"top top"),be=ye(s.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let F=n.from??0,R=n.to,k=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>m==="x"?window.scrollX:window.scrollY,Ee=()=>m==="x"?window.innerWidth:window.innerHeight;function ie(){let E=Q.getBoundingClientRect(),de=m==="x"?E.left:E.top,Ae=m==="x"?E.width:E.height,ae=Le({top:de,height:Ae},fe(),Ee(),se,be);k=ae.tStart,M=ae.tEnd,L&&M===k&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let V=NaN;function u(E){if(!L)return;let de=R??r.duration??0,Ae=F+(de-F)*E;Ae!==V&&(V=Ae,r.currentTime=Ae),r.style.setProperty("--scroll-draw-progress",String(E)),P?.(E);}function A(){if(!v||T||!L||me)return;let E=I(ee(fe(),k,M,1));a&&(U=Math.max(U,E),E=U),N=E,u(E),E>=1&&!B?(B=true,H?.()):E<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,R===void 0&&(R=r.duration),me){u(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}r.readyState>=1?h():r.addEventListener("loadedmetadata",h,{once:true}),L||ie();let O=me?()=>{}:ct(E=>{E&&(O(),me=true,cancelAnimationFrame(w),u(1));}),te=new IntersectionObserver(E=>{E.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Se(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Z=De([Q],Se);return te.observe(r),Ce(r,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:k,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),r.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),Z(),O(),clearTimeout(pe),ke(r);},replay(){U=-1,B=false,N=0,T=false,V=NaN,u(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(E){let de=Math.min(1,Math.max(0,E));N=de,U=de,T=true,cancelAnimationFrame(w),V=NaN,u(de);},getProgress(){return N}}}function Jt(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function nn(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function Rn(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function en(e){let n=nn(e),t=new Map;for(let i of n){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let r=[],s=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of s){let a=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;m.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),r.push(m);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Nn(e,n,t,r){if(t<=1||r===0)return e;let s=(t-1)*r,i=n*r,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function zn(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var tn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rn(e,n={}){if(typeof window>"u")return tn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return he("scrollText: element not found:",e),tn;let r=t;return qe(n,(s,i)=>Vn(r,s,i))}function Vn(e,n,t){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=n,x=typeof i=="function"?i:oe[i]??oe["ease-out"],H=ye(m.start??"top 85%"),P=ye(m.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",I;r==="chars"?I=Rn(e):r==="lines"?I=en(e):I=nn(e),Jt(e,me);let se=I.length;function be(h,O){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*O));let te=zn(O,a);te&&(h.style.transform=te);}function F(h){e.style.setProperty("--scroll-draw-progress",String(h)),I.forEach((O,te)=>{let pe=x(Nn(h,te,se,s));be(O,pe);});}if(t)return F(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F(0);let R=0,k=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),O=Le({top:h.top,height:h.height},B(),L(),H,P);R=O.tStart,k=O.tEnd;}function Ee(){if(!w||v)return;let h=ee(B(),R,k,1);f&&(T=Math.max(T,h),h=T),U=h,F(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Ee);}fe();let ie=new IntersectionObserver(h=>{h.forEach(O=>{w=O.isIntersecting,w&&!v?M=requestAnimationFrame(Ee):cancelAnimationFrame(M);});}),V;function u(){clearTimeout(V),V=setTimeout(()=>{if(r==="lines"){let h=U;e.innerHTML=Q,I=en(e),Jt(e,me),F(h);}fe();},150);}window.addEventListener("resize",u),window.addEventListener("orientationchange",u);let A=De([e],u);return ie.observe(e),Ce(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:R,tEnd:k})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",u),A(),clearTimeout(V),e.innerHTML=Q,ke(e);},replay(){T=-1,N=false,U=0,v=false,F(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Ee)));},seek(h){let O=Math.min(1,Math.max(0,h));U=O,T=O,v=true,cancelAnimationFrame(M),F(O);},getProgress(){return U}}}var Be=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,t){return this.destroy(),this.el=n,this.latest=t,this.key=ht(t),this.instance=this.create(n,qt(t,()=>this.latest)),this}update(n){return this.el?ht(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}},on=class extends Be{constructor(){super(_t);}init(n,t={}){return super.init(n,t)}},sn=class extends Be{constructor(){super(Yt);}},an=class extends Be{constructor(){super(Xt);}},ln=class extends Be{constructor(){super(Zt);}init(n,t={}){return super.init(n,t)}},cn=class extends Be{constructor(){super(rn);}init(n,t={}){return super.init(n,t)}};exports.EngineRef=Be;exports.ScrollAnimateRef=sn;exports.ScrollCounterRef=an;exports.ScrollDrawRef=on;exports.ScrollTextRef=cn;exports.ScrollVideoRef=ln;
1
+ 'use strict';function wn({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(r),i=0,l=[];for(let d=0;d<t;d++){let v=Math.pow(s,d);l.push(v),i+=v;}let m=[0],f=0;for(let d=0;d<t;d++)f+=l[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let v=0;v<t;v++)if(d<=m[v+1]){let I=(d-m[v])/(m[v+1]-m[v]);if(v===0)return I*(2-I);let E=1-Math.pow(r,v);return E+(1-E)*(2*I-1)*(2*I-1)}return 1}}function vn({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),s=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var ne={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:wn(),elastic:vn()};function $t(e,n,t){return Math.min(t,Math.max(n,e))}function fe(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function kt(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function Ot(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,t,r){return t===n?0:$t((e-n)/(t-n)*r,0,1)}function Te(e,n,t,r,s){let i=kt(e.top,e.height,n,r.element)-Ot(r.viewport,t),l=kt(e.top,e.height,n,s.element)-Ot(s.viewport,t);return {tStart:i,tEnd:l}}function ot(e,n,t){let r=e.getBoundingClientRect(),s=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:s,scroll:0}:{top:t==="x"?r.left:r.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(t+r)}if(n==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function It(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 t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function st(e,n,t){let r=It(e),s=It(n);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*t)},${Math.round(r[1]+(s[1]-r[1])*t)},${Math.round(r[2]+(s[2]-r[2])*t)})`}var Ft={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 pe(e,...n){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var En="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Sn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function Tn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function xn(e){let n=[];for(let t=0;t<Rt;t++){let r=t/(Rt-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return En;case "ease-out":return Sn;case "ease-in-out":return Tn()?xn(ne["ease-in-out"]):null;default:return null}}var Dt=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Dt]||(e[Dt]=new Map)}function Le(e,n){Ht().set(e,n);}function Ae(e){Ht().delete(e);}var Ke,at=new Set,lt=new WeakMap,Ze=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Mn(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function Ie(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Ke??(Ke=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)lt.get(l)!==Nt(l)&&(i=true),lt.set(l,"");i&&at.forEach(l=>l());})),at.add(t);let r=Mn(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{lt.has(s)||lt.set(s,Nt(s)),Ze.set(s,(Ze.get(s)??0)+1),Ke.observe(s);}),()=>{at.delete(t)&&(r.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Ke?.unobserve(s);}),at.size||(Ke?.disconnect(),Ke=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function We(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=ct(i=>{if(!i)return;r();let l=(t.getProgress?.()??0)>=1;t.destroy(),t=n(l?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...l)=>t[i]?.(...l);return s.destroy=()=>{r(),t.destroy();},s}var Ln=0;function An(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function zt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Vt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Pn(e){if(!Xe)return;let n=zt(e,"stroke");if(!n||n==="none"){pe("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Vt.has(t)&&!Vt.has(zt(e,"fill"))&&pe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Cn(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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=t==="x"?window.scrollX:window.scrollY,l=e-i,m=n-i,f=t==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`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;${f?`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(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function $n(e,n,t){if(!Xe)return;let r=(e.match(Wt)??[]).join("").toUpperCase(),s=(n.match(Wt)??[]).join("").toUpperCase(),i=(e.match(_t)??[]).length,l=(n.match(_t)??[]).length;if(r!==s){pe(`morphTo: command sequence differs (${r||"\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.`,t);return}i!==l&&pe(`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.`,t);}function kn(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),m=r[s++]??l;return String(+(l+(m-l)*t).toFixed(4))})}function qt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:We(n,(t,r)=>On(e,t,r))}function On(e,n,t){let{preset:r,...s}=n,i=r?{...Ft[r],...s}:s,{selector:l="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:v={},stagger:I=0,direction:E="forward",once:Z=false,debug:re=false,axis:M="y",scrollContainer:oe,autoReverse:he=false,delay:P=0,strokeColor:C,strokeWidth:L,fillOpacity:A,waypoints:b,velocityScale:y=false,threshold:w=0,rootMargin:Y="0px",repeat:_=0,repeatDelay:X=0,morphTo:F,clip:D,autoplay:ce=false,duration:ye=1e3,native:te=true,onProgress:G,onStart:p,onComplete:u,onEnter:T,onLeave:ue,onEnterBack:me,onLeaveBack:Pe}=i,H=D===true?"left":typeof D=="string"?D:false,J=typeof d=="function"?d:ne[d]??ne.linear,$=fe(v.start||"top bottom"),k=fe(v.end||"bottom top"),W=typeof oe=="string"?document.querySelector(oe):oe??null,ve=Array.isArray(C)?C[0]:null,Ee=Array.isArray(C)?C[1]:typeof C=="string"?C:null,Ce=Array.isArray(L)?L[0]:null,$e=Array.isArray(L)?L[1]:typeof L=="number"?L:null,Se=Array.isArray(A)?A[0]:null,Ne=Array.isArray(A)?A[1]:typeof A=="number"?A:null;function ke(o){let a=o*100;switch(H){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 q=H?[]:Array.from(e.querySelectorAll(l)),N=[],de=[],ge=0,c=0,g=I,Fe=0,O=false,z=false,x=0,V=false,xe=-1,Me=[],Je=-1,se=false,Oe=0,Re=0,ze,ut=null;function wt(){ut?.destroy(),ut=null;}let Ve=new Set,vt=NaN,_e=true,et=-1,Et=performance.now(),Be=NaN;function Qe(){return W?M==="x"?W.scrollLeft:W.scrollTop:M==="x"?window.scrollX:window.scrollY}function St(){return W?M==="x"?W.clientWidth:W.clientHeight:M==="x"?window.innerWidth:window.innerHeight}function Tt(){let o=ot(e,W,M);return Te(o,o.scroll,St(),$,k)}function fn(){let o=c-ge,a=q.length-1,h=W??document.documentElement,j=M==="x"?"Width":"Height";if(g=I,I>0&&a>0&&o>0){let be=h[`scroll${j}`]-h[`client${j}`]-1-ge-o/m;be>=0&&(g=Math.min(I,be/(a*o)));}Fe=c+a*g*o;}function xt(){(({tStart:ge,tEnd:c}=Tt())),fn(),re&&Xe&&(wt(),ut=Cn(ge,c,M));}function mt(o,a=Tt){Le(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let h=o.destroy;return o.destroy=()=>{h.call(o),Ae(e);},o}function Mt(o,a){return Z&&!he?Math.max(xe,J(Me[o]=Math.max(Me[o]??0,a))):J(a)}function pn(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),H){let h=a==="reverse"?1-o:o;e.style.clipPath=ke(h);return}q.forEach((h,j)=>ft(h,j,o,a));}function ft(o,a,h,j){o.style.strokeDashoffset=j==="reverse"?`${N[a]*h}`:`${N[a]*(1-h)}`,f&&(o.style.opacity=j==="reverse"?`${1-h}`:`${h}`),ve&&Ee?o.style.stroke=st(ve,Ee,h):Ee&&(o.style.stroke=Ee),Ce!==null&&$e!==null?o.style.strokeWidth=`${Ce+($e-Ce)*h}`:$e!==null&&(o.style.strokeWidth=`${$e}`),Se!==null&&Ne!==null?o.style.fillOpacity=`${Se+(Ne-Se)*h}`:Ne!==null&&(o.style.fillOpacity=`${Ne}`),F&&o.tagName.toLowerCase()==="path"&&de[a]&&o.setAttribute("d",kn(de[a],F,h));}function Ue(){if(e.style.setProperty("--scroll-draw-progress","0"),H){e.style.clipPath=ke(E==="reverse"?1:0);return}q.forEach((o,a)=>{o.style.strokeDasharray=`${N[a]}`,o.style.strokeDashoffset=E==="reverse"?"0":`${N[a]}`,f?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ve&&(o.style.stroke=ve),Ce!==null&&(o.style.strokeWidth=`${Ce}`),Se!==null&&(o.style.fillOpacity=`${Se}`),F&&o.tagName.toLowerCase()==="path"&&de[a]&&o.setAttribute("d",de[a]);});}if(q.forEach(o=>{Pn(o);let a=je(o);N.push(a);let h=o.tagName.toLowerCase()==="path";h?de.push(o.getAttribute("d")??""):de.push(""),F&&(h?$n(de[de.length-1],F,o):pe(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?`${a}`:"0",f&&(o.style.opacity="1"),Ee&&(o.style.stroke=Ee),$e!==null&&(o.style.strokeWidth=`${$e}`),Ne!==null&&(o.style.fillOpacity=`${Ne}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=E==="reverse"?"0":`${a}`,f?o.style.opacity=E==="reverse"?"1":"0":o.style.opacity="",ve&&(o.style.stroke=ve),Ce!==null&&(o.style.strokeWidth=`${Ce}`),Se!==null&&(o.style.fillOpacity=`${Se}`));}),t)return H&&(e.style.clipPath=ke(1)),u?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H&&(e.style.clipPath=ke(E==="reverse"?1:0));let Lt=typeof d=="string"?it(d):null;function dn(){return !(te===false||ce||re||!An()||!q.length||!Lt||H||M!=="y"||W||m!==1||I!==0||Z||he||y!==false||F||b||_||P>0||G||p||u||T||ue||me||Pe||C!=null||L!=null||A!=null||(v.start||"top bottom").trim()!=="top bottom"||(v.end||"bottom top").trim()!=="bottom top")}function gn(){let o=++Ln,a=`svg-scroll-draw-${o}`,h=`svg-scroll-draw-host-${o}`,j=`--svg-scroll-draw-${o}`,be=E==="reverse"?"0":"var(--ssd-len)",De=E==="reverse"?"var(--ssd-len)":"0",we=`stroke-dashoffset:${be};`,B=`stroke-dashoffset:${De};`;f&&(we+=`opacity:${E==="reverse"?1:0};`,B+=`opacity:${E==="reverse"?0:1};`);let Q=document.createElement("style");Q.setAttribute("data-svg-scroll-draw",""),Q.textContent=`@keyframes ${a}{from{${we}}to{${B}}}.${h}{view-timeline-name:${j};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Lt};animation-fill-mode:both;animation-timeline:${j};animation-range:cover 0% cover 100%;}`,document.head.appendChild(Q),e.classList.add(h);function ie(S,R){S.style.setProperty("--ssd-len",String(N[R])),S.style.strokeDasharray=`${N[R]}`,S.style.strokeDashoffset="",S.style.opacity="",S.style.animationPlayState="",S.classList.add(a);}q.forEach(ie);let ae=false,U=-1;function K(){if(U>=0)return U;let S=e.getBoundingClientRect(),{tStart:R,tEnd:le}=Te({top:S.top,height:S.height},Qe(),St(),$,k);return J(ee(Qe(),R,le,m))}return {destroy(){e.classList.remove(h),q.forEach(S=>{S.classList.remove(a),S.style.removeProperty("--ssd-len"),S.style.animationPlayState="";}),Q.remove();},replay(){ae=false,U=-1,q.forEach(ie);},pause(){ae=true,q.forEach(S=>{S.style.animationPlayState="paused";});},resume(){ae&&(ae=false,q.forEach(S=>{S.style.animationPlayState="running";}));},seek(S){let R=Math.min(1,Math.max(0,S));U=R,ae=true,q.forEach((le,He)=>{le.classList.remove(a),le.style.strokeDashoffset=E==="reverse"?`${N[He]*R}`:`${N[He]*(1-R)}`,f&&(le.style.opacity=E==="reverse"?`${1-R}`:`${R}`);});},getProgress(){return K()},refresh(){q.forEach((S,R)=>{N[R]=je(S),S.style.setProperty("--ssd-len",String(N[R])),S.style.strokeDasharray=`${N[R]}`;});}}}if(dn())return mt(gn());function hn(){let o=Math.max(1,ye),a=H?o:o*(1+Math.max(0,q.length-1)*I),h=0,j=0,be=false;function De(U){let K=true,S=Math.min(1,Math.max(0,U/a));if(H){let R=Math.min(1,Math.max(0,U/o)),le=J(R);Oe=le,e.style.setProperty("--scroll-draw-progress",String(le)),e.style.clipPath=ke(E==="reverse"?1-le:le),G?.(le),R<1&&(K=false);}else {q.forEach((le,He)=>{let bn=He*I*o,Ct=Math.min(1,Math.max(0,(U-bn)/o));ft(le,He,J(Ct),E),Ct<1&&(K=false);});let R=J(S);Oe=R,G?.(R),e.style.setProperty("--scroll-draw-progress",String(R));}if(b){let R=J(S);for(let le in b){let He=parseFloat(le);R>=He&&!Ve.has(He)&&(Ve.add(He),b[le]?.());}}return K}function we(U){if(se)return;let K=U-h;z||(z=true,p?.());let S=De(K);if(S&&!O){O=true,De(a),u?.(),Re<(_==="infinite"?1/0:_??0)&&(Re++,ze=setTimeout(()=>{h=performance.now(),z=false,O=false,Ve.clear(),Ue(),x=requestAnimationFrame(we);},X));return}S||(x=requestAnimationFrame(we));}function B(){cancelAnimationFrame(x),clearTimeout(ze),h=performance.now(),j=0,se=false,z=false,O=false,Re=0,be=true,Oe=0,Ve.clear(),Ue(),x=requestAnimationFrame(we);}let Q=new IntersectionObserver(U=>{U.forEach(K=>{K.isIntersecting&&!(Z&&O)?B():!K.isIntersecting&&!Z&&!O&&(cancelAnimationFrame(x),clearTimeout(ze),be=false);});},{root:W??null,threshold:w,rootMargin:Y}),ie;function ae(){clearTimeout(ie),ie=setTimeout(()=>{q.forEach((U,K)=>{N[K]=je(U),U.style.strokeDasharray=`${N[K]}`;});},150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),P>0?setTimeout(()=>Q.observe(e),P):Q.observe(e),{destroy(){cancelAnimationFrame(x),clearTimeout(ze),Q.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ie);},replay(){Re=0,B();},pause(){se||!be||(se=true,j=performance.now()-h,cancelAnimationFrame(x));},resume(){se&&(se=false,be=true,h=performance.now()-j,x=requestAnimationFrame(we));},seek(U){let K=Math.min(1,Math.max(0,U));Oe=K,se=true,j=K*a,h=performance.now()-j,cancelAnimationFrame(x),De(j);},getProgress(){return Oe},refresh(){clearTimeout(ie),q.forEach((U,K)=>{N[K]=je(U),U.style.strokeDasharray=`${N[K]}`;});}}}if(ce)return mt(hn());xt();function At(){if(se||!Ge)return;let o=performance.now(),a=Qe();if(!_e&&y===false&&a===vt){dt(a);return}_e=false,vt=a;let h=m;if(y!==false){let B=o-Et,Q=B>0?Math.abs(a-(et<0?a:et))/B:0;h=m*Math.max(.2,1+Q*(typeof y=="number"?y:1)*.04);}et=a,Et=o;let j=he?Je===-1||a>=Je?"forward":"reverse":E;Je=a;let be=c-ge,De=true,we=be===0?0:(a-ge)/be;if(isNaN(Be)||(Be<=0&&we>0?T?.():Be>0&&we<=0&&Pe?.(),Be<1&&we>=1?ue?.():Be>=1&&we<1&&me?.()),Be=we,H){let B=Mt(0,ee(a,ge,c,h));Oe=B,e.style.setProperty("--scroll-draw-progress",String(B));let Q=j==="reverse"?1-B:B;e.style.clipPath=ke(Q),G?.(B),!z&&ee(a,ge,c,h)>0&&(z=true,p?.()),B>=1&&!O?(O=true,u?.(),Re<(_==="infinite"?1/0:_??0)&&(Re++,ze=setTimeout(()=>{xe=-1,Me=[],z=false,O=false,Ue();},X))):B<1&&!Z&&(O=false),dt(a);return}if(q.forEach((B,Q)=>{let ie=Q*g*be,ae=Mt(Q,ee(a,ge+ie,c+ie,h));ft(B,Q,ae,j),Q===0&&(Oe=ae,G?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),ae<1&&(De=false);}),b){let B=J(ee(a,ge,c,h));for(let Q in b){let ie=parseFloat(Q);B>=ie&&!Ve.has(ie)&&(Ve.add(ie),b[Q]?.());}}!z&&ee(a,ge,c,h)>0&&(z=true,p?.()),De&&!O?(O=true,u?.(),Re<(_==="infinite"?1/0:_??0)&&(Re++,ze=setTimeout(()=>{xe=-1,Me=[],z=false,O=false,Ve.clear(),Ue(),_e=true;},X))):!De&&!Z&&(O=false),dt(a);}function pt(o){return o>=c&&o<Fe}function dt(o){V||pt(o)?x=requestAnimationFrame(At):Ge=false;}function gt(){return V||pt(Qe())}let Ge=false;function tt(){Ge||(Ge=true,x=requestAnimationFrame(function(){At();}));}function nt(){Ge=false,cancelAnimationFrame(x);}let ht=new IntersectionObserver(o=>{o.forEach(a=>{V=a.isIntersecting,V&&!se?(_e=true,tt()):Ge&&!se&&pt(Qe())||nt();});},{root:W??null,threshold:w,rootMargin:Y});function Pt(){q.forEach((o,a)=>{N[a]=je(o),o.style.strokeDasharray=`${N[a]}`;}),xt(),_e=true;}let rt;function Ye(){clearTimeout(rt),rt=setTimeout(Pt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let yn=Ie([e],Ye);return P>0?setTimeout(()=>ht.observe(e),P):ht.observe(e),mt({destroy(){cancelAnimationFrame(x),clearTimeout(ze),nt(),ht.disconnect(),yn(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(rt),wt();},replay(){xe=-1,Me=[],Je=-1,et=-1,z=false,O=false,Re=0,se=false,Oe=0,Ve.clear(),clearTimeout(ze),Ue(),_e=true,gt()&&tt();},pause(){se=true,nt();},resume(){se&&(se=false,_e=true,gt()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Oe=a,xe=a,Me=[],se=true,nt(),pn(a,E),_e=true;},getProgress(){return Oe},refresh(){clearTimeout(rt),Pt(),gt()&&!se&&tt();}},()=>({tStart:ge,tEnd:c}))}var Bt=new WeakMap,In=0;function yt(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=Bt.get(t);return r===void 0&&Bt.set(t,r=++In),`el#${r}`}return t})}function Gt(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...s)=>n()[r]?.(...s));return t}function Fn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function jt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let s=[],i=[],l=r[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:r[1],nums:s,units:i});}return n}function Rn(e,n,t){let r=jt(e),s=jt(n);return r.length===0||r.length!==s.length?t<1?e:n:r.map((i,l)=>{let m=s[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function Qt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),s=String(n);if(Fn(r))return st(r,s,t);if(r.includes("("))return Rn(r,s,t);let i=r.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),f=parseFloat(l[1]);return `${m+(f-m)*t}${i[2]||l[2]}`}return t<1?r:s}function Dn(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Hn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Nn=0,Ut="--scroll-draw-progress";function zn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,n){return typeof window>"u"?Xt:n.respectReducedMotion===false?Yt(e,n,false):We(n,(t,r)=>Yt(e,t,r))}function Yt(e,n,t){let{props:r,trigger:s={},easing:i="ease-out",speed:l=1,once:m=false,axis:f="y",scrollContainer:d,native:v=true,velocityScale:I=false,triggerElement:E,onProgress:Z,onComplete:re,onEnter:M,onLeave:oe,onEnterBack:he,onLeaveBack:P}=n,C=typeof i=="function"?i:ne[i]??ne["ease-out"],L=fe(s.start||"top bottom"),A=fe(s.end||"bottom top"),b=E??e,y=typeof d=="string"?document.querySelector(d):d??null,w=Object.entries(r).map(([c,g])=>({prop:Dn(c),from:Array.isArray(g)?g[0]:"",to:Array.isArray(g)?g[1]:g}));function Y(){let c=window.getComputedStyle(e);for(let g of w)g.from===""&&(g.from=c.getPropertyValue(g.prop).trim()||"0");}function _(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let X=new Map;for(let c of [...w.map(g=>g.prop),Ut])X.set(c,e.style.getPropertyValue(c));function F(){for(let[c,g]of X)g?e.style.setProperty(c,g):e.style.removeProperty(c);}if(t)return _(),re?.(),{...Xt,destroy:F,getProgress:()=>1};Y();let D=()=>y?f==="x"?y.scrollLeft:y.scrollTop:f==="x"?window.scrollX:window.scrollY,ce=()=>y?f==="x"?y.clientWidth:y.clientHeight:f==="x"?window.innerWidth:window.innerHeight,ye=typeof i=="string"?it(i):null;function te(){if(!v||!zn()||!ye||f!=="y"||y||b!==e||m||l!==1||Z||re||M||oe||he||P||I!==false||(s.start||"top bottom").trim()!=="top bottom"||(s.end||"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Hn.has(c.prop))return false;return true}function G(){let c=`ssd-a-${++Nn}`,g=w.map(V=>`${V.prop}:${V.from}`).join(";"),Fe=w.map(V=>`${V.prop}:${V.to}`).join(";"),O=document.createElement("style");O.setAttribute("data-ssd-animate",""),O.textContent=`@keyframes ${c}{from{${g}}to{${Fe}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ye};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(O),e.classList.add(c);let z=()=>{let V=e.getBoundingClientRect();return Te({top:V.top,height:V.height},D(),ce(),L,A)};Le(e,{type:"animate",getProgress:()=>x.getProgress(),getTrigger:z});let x={refresh(){},destroy(){e.classList.remove(c),O.remove(),e.style.animationPlayState="",F(),Ae(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(V){let xe=Math.min(1,Math.max(0,V));e.classList.remove(c);for(let Me of w)e.style.setProperty(Me.prop,Qt(Me.from,Me.to,xe));},getProgress(){let{tStart:V,tEnd:xe}=z();return C(ee(D(),V,xe,l))}};return x}if(te())return G();let p=0,u=0,T=0,ue=false,me=false,Pe=-1,H=0,J=0,$=false,k=NaN,W=-1,ve=0,Ee=b===e?w:[],Ce=false;function $e(){let c=e.style,g=Ee.map(x=>c.getPropertyValue(x.prop)),Fe=c.transition;Ee.length&&(c.transition="none"),Ee.forEach(x=>c.setProperty(x.prop,X.get(x.prop)??""));let O=ot(b,y,f);Ee.forEach((x,V)=>c.setProperty(x.prop,g[V])),Ee.length&&(e.offsetWidth,c.transition=Fe);let z=Te(O,O.scroll,ce(),L,A);Ce&&Math.abs(z.tStart-p)<1&&Math.abs(z.tEnd-u)<1||(Ce=true,p=z.tStart,u=z.tEnd);}function Se(c){e.style.setProperty(Ut,String(c));for(let g of w)e.style.setProperty(g.prop,Qt(g.from,g.to,c));Z?.(c);}function Ne(c){if(isNaN(k)){k=c;return}k<=0&&c>0?M?.():k>0&&c<=0&&P?.(),k<1&&c>=1?oe?.():k>=1&&c<1&&he?.(),k=c;}function ke(){if(!ue||me)return;let c=performance.now(),g=D(),Fe=l;if(I!==false){let V=c-ve,xe=V>0?Math.abs(g-(W<0?g:W))/V:0;Fe=l*Math.max(.2,1+xe*(typeof I=="number"?I:1)*.04);}W=g,ve=c;let O=u===p?0:(g-p)/(u-p);Ne(O);let z=ee(g,p,u,Fe),x=m?Math.max(Pe,C(H=Math.max(H,z))):C(z);J=x,Se(x),x>=1&&!$?($=true,re?.()):x<1&&!m&&($=false),T=requestAnimationFrame(ke);}$e(),u===p&&pe("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),H=ee(D(),p,u,l),J=C(H),Se(J);let q=new IntersectionObserver(c=>{c.forEach(g=>{ue=g.isIntersecting,ue&&!me?T=requestAnimationFrame(ke):cancelAnimationFrame(T);});},{root:y??null}),N;function de(){clearTimeout(N),N=setTimeout($e,150);}window.addEventListener("resize",de),window.addEventListener("orientationchange",de);let ge=Ie([b],de);return q.observe(e),Le(e,{type:"animate",getProgress:()=>J,getTrigger:()=>({tStart:p,tEnd:u})}),{destroy(){cancelAnimationFrame(T),q.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),ge(),clearTimeout(N),F(),Ae(e);},replay(){Pe=-1,H=0,$=false,J=0,me=false,Se(0);},pause(){me=true,cancelAnimationFrame(T);},resume(){me&&(me=false,ue&&(T=requestAnimationFrame(ke)));},seek(c){let g=Math.min(1,Math.max(0,c));J=g,Pe=g,H=0,me=true,cancelAnimationFrame(T),Se(g);},getProgress(){return J},refresh(){$e();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,n){if(typeof window>"u")return bt;let t=typeof e=="string"?document.querySelector(e):e;return t?We(n,(r,s)=>Vn(t,r,s)):(pe("scrollCounter: element not found:",e),bt)}function Vn(e,n,t){let{from:r=0,to:s,format:i,easing:l="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:v}=n,I=d!==void 0?p=>p.toFixed(d):i??(p=>String(Math.round(p))),E=typeof l=="function"?l:ne[l]??ne["ease-out"],Z=fe(m.start||"top 80%"),re=fe(m.end||"top 20%");if(t)return e.textContent=I(s),v?.(),{...bt,getProgress:()=>1};let M=0,oe=0,he=false,P=0,C=false,L=false,A=-1,b=0,y=0,w=false,Y=()=>window.scrollY,_=()=>window.innerHeight;function X(){let p=e.getBoundingClientRect(),u=Te({top:p.top,height:p.height},Y(),_(),Z,re);he&&Math.abs(u.tStart-M)<1&&Math.abs(u.tEnd-oe)<1||(he=true,M=u.tStart,oe=u.tEnd);}function F(p){e.textContent=I(r+(s-r)*p),e.style.setProperty("--scroll-draw-progress",String(p));}function D(){if(!C||L)return;let p=ee(Y(),M,oe,1),u=f?Math.max(A,E(b=Math.max(b,p))):E(p);y=u,F(u),u>=1&&!w?(w=true,v?.()):u<1&&!f&&(w=false),P=requestAnimationFrame(D);}X();{b=ee(Y(),M,oe,1);let p=E(b);y=p,F(p);}let ce=new IntersectionObserver(p=>{p.forEach(u=>{C=u.isIntersecting,C&&!L?P=requestAnimationFrame(D):cancelAnimationFrame(P);});}),ye;function te(){clearTimeout(ye),ye=setTimeout(X,150);}window.addEventListener("resize",te),window.addEventListener("orientationchange",te);let G=Ie([e],te);return ce.observe(e),Le(e,{type:"counter",getProgress:()=>y,getTrigger:()=>({tStart:M,tEnd:oe})}),{destroy(){cancelAnimationFrame(P),ce.disconnect(),window.removeEventListener("resize",te),window.removeEventListener("orientationchange",te),G(),clearTimeout(ye),Ae(e);},replay(){A=-1,b=0,w=false,y=0,L=false,F(0);},pause(){L=true,cancelAnimationFrame(P);},resume(){L&&(L=false,C&&(P=requestAnimationFrame(D)));},seek(p){let u=Math.min(1,Math.max(0,p));y=u,A=u,b=0,L=true,cancelAnimationFrame(P),F(u);},getProgress(){return y}}}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function en(e,n={}){if(typeof window>"u")return Jt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return pe("scrollVideo: <video> element not found:",e),Jt;let r=t,{trigger:s={},easing:i="linear",once:l=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:v,onComplete:I,onProgress:E}=n,Z=d??r,re=window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof i=="function"?i:ne[i]??ne.linear,oe=fe(s.start||"top top"),he=fe(s.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let P=n.from??0,C=n.to,L=0,A=0,b=0,y=false,w=false,Y=-1,_=0,X=0,F=false,D=false,ce=()=>m==="x"?window.scrollX:window.scrollY,ye=()=>m==="x"?window.innerWidth:window.innerHeight;function te(){let $=Z.getBoundingClientRect(),k=m==="x"?$.left:$.top,W=m==="x"?$.width:$.height,ve=Te({top:k,height:W},ce(),ye(),oe,he);L=ve.tStart,A=ve.tEnd,D&&A===L&&pe("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let G=NaN;function p($){if(!D)return;let k=C??r.duration??0,W=P+(k-P)*$;W!==G&&(G=W,r.currentTime=W),r.style.setProperty("--scroll-draw-progress",String($)),E?.($);}function u(){if(!y||w||!D||re)return;let $=ee(ce(),L,A,1),k=l?Math.max(Y,M(_=Math.max(_,$))):M($);X=k,p(k),k>=1&&!F?(F=true,I?.()):k<1&&!l&&(F=false),b=requestAnimationFrame(u);}function T(){if(D=true,C===void 0&&(C=r.duration),re){p(1),v?.();return}te(),v?.(),y&&!w&&(b=requestAnimationFrame(u));}r.readyState>=1?T():r.addEventListener("loadedmetadata",T,{once:true}),D||te();let ue=re?()=>{}:ct($=>{$&&(ue(),re=true,cancelAnimationFrame(b),p(1));}),me=new IntersectionObserver($=>{$.forEach(k=>{y=k.isIntersecting,y&&!w&&D?b=requestAnimationFrame(u):cancelAnimationFrame(b);});}),Pe;function H(){clearTimeout(Pe),Pe=setTimeout(te,150);}window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let J=Ie([Z],H);return me.observe(r),Le(r,{type:"video",getProgress:()=>X,getTrigger:()=>({tStart:L,tEnd:A})}),{destroy(){cancelAnimationFrame(b),me.disconnect(),r.removeEventListener("loadedmetadata",T),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),J(),ue(),clearTimeout(Pe),Ae(r);},replay(){Y=-1,_=0,F=false,X=0,w=false,G=NaN,p(0);},pause(){w=true,cancelAnimationFrame(b);},resume(){w&&(w=false,y&&D&&(b=requestAnimationFrame(u)));},seek($){let k=Math.min(1,Math.max(0,$));X=k,Y=k,_=0,w=true,cancelAnimationFrame(b),G=NaN,p(k);},getProgress(){return X}}}function tn(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function on(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function _n(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function nn(e){let n=on(e),t=new Map;for(let i of n){let l=i.offsetTop;t.has(l)||t.set(l,[]),t.get(l).push(i);}let r=[],s=Array.from(t.keys()).sort((i,l)=>i-l);for(let i of s){let l=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",l.forEach((f,d)=>{let v=f.nextElementSibling;m.appendChild(f),d<l.length-1&&v&&v.style.whiteSpace==="pre"&&m.appendChild(v);}),r.push(m);}return e.textContent="",r.forEach((i,l)=>{e.appendChild(i),l<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Wn(e,n,t,r){if(t<=1||r===0)return e;let s=(t-1)*r,i=n*r,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function qn(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var rn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function sn(e,n={}){if(typeof window>"u")return rn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return pe("scrollText: element not found:",e),rn;let r=t;return We(n,(s,i)=>Bn(r,s,i))}function Bn(e,n,t){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:l={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=n,v=typeof i=="function"?i:ne[i]??ne["ease-out"],I=fe(m.start||"top 85%"),E=fe(m.end||"top 40%"),Z=e.innerHTML,re=e.textContent??"",M;r==="chars"?M=_n(e):r==="lines"?M=nn(e):M=on(e),tn(e,re);let oe=M.length;function he(u,T){l?.opacity!==void 0&&(u.style.opacity=String(l.opacity+(1-l.opacity)*T));let ue=qn(T,l);ue&&(u.style.transform=ue);}function P(u){e.style.setProperty("--scroll-draw-progress",String(u)),M.forEach((T,ue)=>{let me=v(Wn(u,ue,oe,s));he(T,me);});}if(t)return P(1),d?.(),{destroy(){e.innerHTML=Z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};P(0);let C=0,L=0,A=0,b=false,y=false,w=-1,Y=0,_=false,X=()=>window.scrollY,F=()=>window.innerHeight;function D(){let u=e.getBoundingClientRect(),T=Te({top:u.top,height:u.height},X(),F(),I,E);C=T.tStart,L=T.tEnd;}function ce(){if(!b||y)return;let u=ee(X(),C,L,1);f&&(w=Math.max(w,u),u=w),Y=u,P(u),u>=1&&!_?(_=true,d?.()):u<1&&!f&&(_=false),A=requestAnimationFrame(ce);}D();let ye=new IntersectionObserver(u=>{u.forEach(T=>{b=T.isIntersecting,b&&!y?A=requestAnimationFrame(ce):cancelAnimationFrame(A);});}),te;function G(){clearTimeout(te),te=setTimeout(()=>{if(r==="lines"){let u=Y;e.innerHTML=Z,M=nn(e),tn(e,re),P(u);}D();},150);}window.addEventListener("resize",G),window.addEventListener("orientationchange",G);let p=Ie([e],G);return ye.observe(e),Le(e,{type:"text",getProgress:()=>Y,getTrigger:()=>({tStart:C,tEnd:L})}),{destroy(){cancelAnimationFrame(A),ye.disconnect(),window.removeEventListener("resize",G),window.removeEventListener("orientationchange",G),p(),clearTimeout(te),e.innerHTML=Z,Ae(e);},replay(){w=-1,_=false,Y=0,y=false,P(0);},pause(){y=true,cancelAnimationFrame(A);},resume(){y&&(y=false,b&&(A=requestAnimationFrame(ce)));},seek(u){let T=Math.min(1,Math.max(0,u));Y=T,w=T,y=true,cancelAnimationFrame(A),P(T);},getProgress(){return Y}}}var qe=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,t){return this.destroy(),this.el=n,this.latest=t,this.key=yt(t),this.instance=this.create(n,Gt(t,()=>this.latest)),this}update(n){return this.el?yt(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}},an=class extends qe{constructor(){super(qt);}init(n,t={}){return super.init(n,t)}},ln=class extends qe{constructor(){super(Kt);}},cn=class extends qe{constructor(){super(Zt);}},un=class extends qe{constructor(){super(en);}init(n,t={}){return super.init(n,t)}},mn=class extends qe{constructor(){super(sn);}init(n,t={}){return super.init(n,t)}};exports.EngineRef=qe;exports.ScrollAnimateRef=ln;exports.ScrollCounterRef=cn;exports.ScrollDrawRef=an;exports.ScrollTextRef=mn;exports.ScrollVideoRef=un;
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-KV3WCPQ5.mjs';import {a as a$4}from'../chunk-DY5JCXVR.mjs';import {a as a$2}from'../chunk-WXUOF4NM.mjs';import {a as a$1}from'../chunk-LTCJVVSC.mjs';import {b as b$1}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.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-GMBIGV3M.mjs';import {a as a$4}from'../chunk-4H2SGMAQ.mjs';import {a as a$2}from'../chunk-LGJQWZHH.mjs';import {a as a$1}from'../chunk-V4L3ELVC.mjs';import {b as b$1}from'../chunk-23EALNDF.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.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 cr({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(n),i=0,a=[];for(let d=0;d<r;d++){let E=Math.pow(s,d);a.push(E),i+=E;}let m=[0],u=0;for(let d=0;d<r;d++)u+=a[d]/i,m.push(u);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let E=0;E<r;E++)if(d<=m[E+1]){let O=(d-m[E])/(m[E+1]-m[E]);if(E===0)return O*(2-O);let x=1-Math.pow(n,E);return x+(1-x)*(2*O-1)*(2*O-1)}return 1}}function ur({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),s=r<=1?n/4:n/(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)/n)+1}var ue={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 Pt(e,t,r){return Math.min(r,Math.max(t,e))}function we(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}function Dt(e,t,r,n){switch(n){case "top":return e+r;case "center":return e+r+t/2;case "bottom":return e+r+t;default:return e+r}}function kt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function ne(e,t,r,n){return r===t?0:Pt((e-t)/(r-t)*n,0,1)}function Ce(e,t,r,n,s){let i=Dt(e.top,e.height,t,n.element)-kt(n.viewport,r),a=Dt(e.top,e.height,t,s.element)-kt(s.viewport,r);return {tStart:i,tEnd:a}}function st(e,t,r){let n=e.getBoundingClientRect(),s=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:r==="x"?n.left:n.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function Be(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Ot(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ge(e,t,r){let n=Ot(e),s=Ot(t);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*r)},${Math.round(n[1]+(s[1]-n[1])*r)},${Math.round(n[2]+(s[2]-n[2])*r)})`}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 J(e,...t){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",fr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function dr(e){let t=[];for(let r=0;r<Rt;r++){let n=r/(Rt-1);t.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${t.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return fr;case "ease-in-out":return pr()?dr(ue["ease-in-out"]):null;default:return null}}var Ft=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Ft]||(e[Ft]=new Map)}function ke(e,t){Ht().set(e,t);}function Oe(e){Ht().delete(e);}var Je,at=new Set,lt=new WeakMap,Ze=new Map,Nt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function gr(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function _e(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();Je??(Je=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==Nt(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(r);let n=gr(e);return [document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{lt.has(s)||lt.set(s,Nt(s)),Ze.set(s,(Ze.get(s)??0)+1),Je.observe(s);}),()=>{at.delete(r)&&(n.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Je?.unobserve(s);}),at.size||(Je?.disconnect(),Je=void 0));}}function _t(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=s=>e(!!s.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",r),()=>t.removeEventListener("change",r);let n=t;return n.addListener?.(r),()=>n.removeListener?.(r)}function ze(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let r=t(e,false),n=_t(i=>{if(!i)return;n();let a=(r.getProgress?.()??0)>=1;r.destroy(),r=t(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(r))s[i]=(...a)=>r[i]?.(...a);return s.destroy=()=>{n(),r.destroy();},s}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 zt(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return r||(e.getAttribute(t)??"").trim()}var Vt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function br(e){if(!Xe)return;let t=zt(e,"stroke");if(!t||t==="none"){J("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Vt.has(r)&&!Vt.has(zt(e,"fill"))&&J("Element has a fill \u2014 it may obscure the stroke animation.",e);}function wr(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.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,a=e-i,m=t-i,u=r==="x";n.innerHTML=`
2
- <div style="position:absolute;${u?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${u?`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(n),window.addEventListener("scroll",s,{passive:true}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove();}}}var Wt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,qt=/[MmLlHhVvCcSsQqTtAaZz]/g;function vr(e,t,r){if(!Xe)return;let n=(e.match(qt)??[]).join("").toUpperCase(),s=(t.match(qt)??[]).join("").toUpperCase(),i=(e.match(Wt)??[]).length,a=(t.match(Wt)??[]).length;if(n!==s){J(`morphTo: command sequence differs (${n||"\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!==a&&J(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function bt(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=n[s++]??a;return String(+(a+(m-a)*r).toFixed(4))})}function ct(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:ze(t,(r,n)=>Er(e,r,n))}function Er(e,t,r){let{preset:n,...s}=t,i=n?{...It[n],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:u=false,easing:d="linear",trigger:E={},stagger:O=0,direction:x="forward",once:Z=false,debug:Me=false,axis:$="y",scrollContainer:ie,autoReverse:pe=false,delay:D=0,strokeColor:z,strokeWidth:I,fillOpacity:M,waypoints:C,velocityScale:S=false,threshold:R=0,rootMargin:me="0px",repeat:j=0,repeatDelay:oe=0,morphTo:F,clip:de,autoplay:ve=false,duration:ge=1e3,native:U=true,onProgress:p,onStart:L,onComplete:b,onEnter:P,onLeave:ae,onEnterBack:Ee,onLeaveBack:Ve}=i,K=de===true?"left":typeof de=="string"?de:false,Se=typeof d=="function"?d:ue[d]??ue.linear,Qe=we(E.start??"top bottom"),je=we(E.end??"bottom top"),fe=typeof ie=="string"?document.querySelector(ie):ie??null,ee=Array.isArray(z)?z[0]:null,Y=Array.isArray(z)?z[1]:typeof z=="string"?z:null,X=Array.isArray(I)?I[0]:null,q=Array.isArray(I)?I[1]:typeof I=="number"?I:null,se=Array.isArray(M)?M[0]:null,Q=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Le(o){let c=o*100;switch(K){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let H=K?[]:Array.from(e.querySelectorAll(a)),T=[],le=[],l=0,f=0,Te=O,ye=0,v=false,k=false,V=0,Ie=false,_=-1,Pe=[],Re=-1,te=false,Ae=0,De=0,Fe,ft=null;function Et(){ft?.destroy(),ft=null;}let He=new Set,St=NaN,Ne=true,et=-1,Tt=performance.now(),We=NaN;function Ue(){return fe?$==="x"?fe.scrollLeft:fe.scrollTop:$==="x"?window.scrollX:window.scrollY}function xt(){return fe?$==="x"?fe.clientWidth:fe.clientHeight:$==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=st(e,fe,$);return Ce(o,o.scroll,xt(),Qe,je)}function nr(){let o=f-l,c=H.length-1,y=fe??document.documentElement,B=$==="x"?"Width":"Height";if(Te=O,O>0&&c>0&&o>0){let he=y[`scroll${B}`]-y[`client${B}`]-1-l-o/m;he>=0&&(Te=Math.min(O,he/(c*o)));}ye=f+c*Te*o;}function Lt(){(({tStart:l,tEnd:f}=Mt())),nr(),Me&&Xe&&(Et(),ft=wr(l,f,$));}function pt(o,c=Mt){ke(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),Oe(e);},o}function or(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),K){let y=c==="reverse"?1-o:o;e.style.clipPath=Le(y);return}H.forEach((y,B)=>{y.style.strokeDashoffset=c==="reverse"?`${T[B]*o}`:`${T[B]*(1-o)}`,u&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),ee&&Y?y.style.stroke=Ge(ee,Y,o):Y&&(y.style.stroke=Y),X!==null&&q!==null?y.style.strokeWidth=`${X+(q-X)*o}`:q!==null&&(y.style.strokeWidth=`${q}`),se!==null&&Q!==null?y.style.fillOpacity=`${se+(Q-se)*o}`:Q!==null&&(y.style.fillOpacity=`${Q}`),F&&y.tagName.toLowerCase()==="path"&&le[B]&&y.setAttribute("d",bt(le[B],F,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),K){e.style.clipPath=Le(0);return}H.forEach((o,c)=>{o.style.strokeDasharray=`${T[c]}`,o.style.strokeDashoffset=x==="reverse"?"0":`${T[c]}`,u?o.style.opacity=x==="reverse"?"1":"0":o.style.opacity="",ee&&(o.style.stroke=ee),X!==null&&(o.style.strokeWidth=`${X}`),se!==null&&(o.style.fillOpacity=`${se}`),F&&o.tagName.toLowerCase()==="path"&&le[c]&&o.setAttribute("d",le[c]);});}if(H.forEach(o=>{br(o);let c=Be(o);T.push(c);let y=o.tagName.toLowerCase()==="path";y?le.push(o.getAttribute("d")??""):le.push(""),F&&(y?vr(le[le.length-1],F,o):J(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),r?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=x==="reverse"?`${c}`:"0",u&&(o.style.opacity="1"),Y&&(o.style.stroke=Y),q!==null&&(o.style.strokeWidth=`${q}`),Q!==null&&(o.style.fillOpacity=`${Q}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=x==="reverse"?"0":`${c}`,u?o.style.opacity=x==="reverse"?"1":"0":o.style.opacity="",ee&&(o.style.stroke=ee),X!==null&&(o.style.strokeWidth=`${X}`),se!==null&&(o.style.fillOpacity=`${se}`));}),K){if(r)return e.style.clipPath=Le(1),b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Le(0);}else if(r)return b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof d=="string"?it(d):null;function sr(){return !(U===false||!hr()||!H.length||!At||K||$!=="y"||fe||m!==1||O!==0||Z||pe||S!==false||F||C||j||D>0||p||L||b||P||ae||Ee||Ve||z!=null||I!=null||M!=null||(E.start??"top bottom").trim()!=="top bottom"||(E.end??"bottom top").trim()!=="bottom top")}function ir(){let o=++yr,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,B=`--svg-scroll-draw-${o}`,he=x==="reverse"?"0":"var(--ssd-len)",$e=x==="reverse"?"var(--ssd-len)":"0",xe=`stroke-dashoffset:${he};`,w=`stroke-dashoffset:${$e};`;u&&(xe+=`opacity:${x==="reverse"?1:0};`,w+=`opacity:${x==="reverse"?0:1};`);let A=document.createElement("style");A.setAttribute("data-svg-scroll-draw",""),A.textContent=`@keyframes ${c}{from{${xe}}to{${w}}}.${y}{view-timeline-name:${B};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${B};animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(y);function re(g,G){g.style.setProperty("--ssd-len",String(T[G])),g.style.strokeDasharray=`${T[G]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}H.forEach(re);let h=false,N=-1;function W(){if(N>=0)return N;let g=e.getBoundingClientRect(),{tStart:G,tEnd:be}=Ce({top:g.top,height:g.height},Ue(),xt(),Qe,je);return Se(ne(Ue(),G,be,m))}return {destroy(){e.classList.remove(y),H.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),A.remove();},replay(){h=false,N=-1,H.forEach(re);},pause(){h=true,H.forEach(g=>{g.style.animationPlayState="paused";});},resume(){h&&(h=false,H.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let G=Math.min(1,Math.max(0,g));N=G,h=true,H.forEach((be,ce)=>{be.classList.remove(c),be.style.strokeDashoffset=x==="reverse"?`${T[ce]*G}`:`${T[ce]*(1-G)}`,u&&(be.style.opacity=x==="reverse"?`${1-G}`:`${G}`);});},getProgress(){return W()},refresh(){H.forEach((g,G)=>{T[G]=Be(g),g.style.setProperty("--ssd-len",String(T[G])),g.style.strokeDasharray=`${T[G]}`;});}}}if(sr())return pt(ir());function ar(){let o=Math.max(1,ge),c=0,y=0,B=false;function he(h){let N=true;if(K){let W=Math.min(1,Math.max(0,h/o)),g=Se(W);Ae=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Le(x==="reverse"?1-g:g),p?.(g),W<1&&(N=false);}else H.forEach((W,g)=>{let G=g*O*o,be=Math.min(1,Math.max(0,(h-G)/o)),ce=Se(be);W.style.strokeDashoffset=x==="reverse"?`${T[g]*ce}`:`${T[g]*(1-ce)}`,u&&(W.style.opacity=x==="reverse"?`${1-ce}`:`${ce}`),ee&&Y?W.style.stroke=Ge(ee,Y,ce):Y&&(W.style.stroke=Y),X!==null&&q!==null?W.style.strokeWidth=`${X+(q-X)*ce}`:q!==null&&(W.style.strokeWidth=`${q}`),se!==null&&Q!==null?W.style.fillOpacity=`${se+(Q-se)*ce}`:Q!==null&&(W.style.fillOpacity=`${Q}`),F&&W.tagName.toLowerCase()==="path"&&le[g]&&W.setAttribute("d",bt(le[g],F,ce)),g===0&&(Ae=ce,p?.(ce),e.style.setProperty("--scroll-draw-progress",String(ce))),be<1&&(N=false);});if(C){let W=Math.min(1,Math.max(0,h/o)),g=Se(W);for(let G in C){let be=parseFloat(G);g>=be&&!He.has(be)&&(He.add(be),C[G]?.());}}return N}function $e(h){if(te)return;let N=h-c;k||(k=true,L?.());let W=he(N);if(W&&!v){v=true,he(o*(1+Math.max(0,H.length-1)*O)),b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{c=performance.now(),k=false,v=false,He.clear(),tt(),V=requestAnimationFrame($e);},oe));return}W||(V=requestAnimationFrame($e));}function xe(){cancelAnimationFrame(V),clearTimeout(Fe),c=performance.now(),y=0,te=false,k=false,v=false,De=0,B=true,Ae=0,He.clear(),tt(),V=requestAnimationFrame($e);}let w=new IntersectionObserver(h=>{h.forEach(N=>{N.isIntersecting&&!(Z&&v)?xe():!N.isIntersecting&&!Z&&!v&&(cancelAnimationFrame(V),clearTimeout(Fe),B=false);});},{root:fe??null,threshold:R,rootMargin:me}),A;function re(){clearTimeout(A),A=setTimeout(()=>{H.forEach((h,N)=>{T[N]=Be(h),h.style.strokeDasharray=`${T[N]}`;});},150);}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),D>0?setTimeout(()=>w.observe(e),D):w.observe(e),{destroy(){cancelAnimationFrame(V),clearTimeout(Fe),w.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(A);},replay(){De=0,xe();},pause(){te||!B||(te=true,y=performance.now()-c,cancelAnimationFrame(V));},resume(){te&&(te=false,B=true,c=performance.now()-y,V=requestAnimationFrame($e));},seek(h){let N=Math.min(1,Math.max(0,h));Ae=N,te=true,y=N*o,c=performance.now()-y,cancelAnimationFrame(V),he(y);},getProgress(){return Ae},refresh(){clearTimeout(A),H.forEach((h,N)=>{T[N]=Be(h),h.style.strokeDasharray=`${T[N]}`;});}}}if(ve)return pt(ar());Lt();function $t(){if(te||!qe)return;let o=performance.now(),c=Ue();if(!Ne&&S===false&&c===St){gt(c);return}Ne=false,St=c;let y=m;if(S!==false){let w=o-Tt,A=w>0?Math.abs(c-(et<0?c:et))/w:0;y=m*Math.max(.2,1+A*(typeof S=="number"?S:1)*.04);}et=c,Tt=o;let B=pe?Re===-1||c>=Re?"forward":"reverse":x;Re=c;let he=f-l,$e=true,xe=he===0?0:(c-l)/he;if(isNaN(We)||(We<=0&&xe>0?P?.():We>0&&xe<=0&&Ve?.(),We<1&&xe>=1?ae?.():We>=1&&xe<1&&Ee?.()),We=xe,K){let w=Se(ne(c,l,f,y));Z&&!pe&&(_=Math.max(_,w),w=_),Ae=w,e.style.setProperty("--scroll-draw-progress",String(w));let A=B==="reverse"?1-w:w;e.style.clipPath=Le(A),p?.(w),!k&&ne(c,l,f,y)>0&&(k=true,L?.()),w>=1&&!v?(v=true,b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{_=-1,k=false,v=false,e.style.clipPath=Le(0);},oe))):w<1&&!Z&&(v=false),gt(c);return}if(H.forEach((w,A)=>{let re=A*Te*he,h=Se(ne(c,l+re,f+re,y));Z&&!pe&&(h=Pe[A]=Math.max(Pe[A]??_,h)),w.style.strokeDashoffset=B==="reverse"?`${T[A]*h}`:`${T[A]*(1-h)}`,u&&(w.style.opacity=B==="reverse"?`${1-h}`:`${h}`),ee&&Y?w.style.stroke=Ge(ee,Y,h):Y&&(w.style.stroke=Y),X!==null&&q!==null?w.style.strokeWidth=`${X+(q-X)*h}`:q!==null&&(w.style.strokeWidth=`${q}`),se!==null&&Q!==null?w.style.fillOpacity=`${se+(Q-se)*h}`:Q!==null&&(w.style.fillOpacity=`${Q}`),F&&w.tagName.toLowerCase()==="path"&&le[A]&&w.setAttribute("d",bt(le[A],F,h)),A===0&&(Ae=h,p?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&($e=false);}),C){let w=Se(ne(c,l,f,y));for(let A in C){let re=parseFloat(A);w>=re&&!He.has(re)&&(He.add(re),C[A]?.());}}!k&&ne(c,l,f,y)>0&&(k=true,L?.()),$e&&!v?(v=true,b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{_=-1,Pe=[],k=false,v=false,He.clear(),tt(),Ne=true;},oe))):!$e&&!Z&&(v=false),gt(c);}function dt(o){return o>=f&&o<ye}function gt(o){Ie||dt(o)?V=requestAnimationFrame($t):qe=false;}function yt(){return Ie||dt(Ue())}let qe=false;function rt(){qe||(qe=true,V=requestAnimationFrame(function(){$t();}));}function nt(){qe=false,cancelAnimationFrame(V);}let ht=new IntersectionObserver(o=>{o.forEach(c=>{Ie=c.isIntersecting,Ie&&!te?(Ne=true,rt()):qe&&!te&&dt(Ue())||nt();});},{root:fe??null,threshold:R,rootMargin:me});function Ct(){H.forEach((o,c)=>{T[c]=Be(o),o.style.strokeDasharray=`${T[c]}`;}),Lt(),Ne=true;}let ot;function Ye(){clearTimeout(ot),ot=setTimeout(Ct,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let lr=_e([e],Ye);return D>0?setTimeout(()=>ht.observe(e),D):ht.observe(e),pt({destroy(){cancelAnimationFrame(V),clearTimeout(Fe),nt(),ht.disconnect(),lr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(ot),Et();},replay(){_=-1,Pe=[],Re=-1,et=-1,k=false,v=false,De=0,te=false,Ae=0,He.clear(),clearTimeout(Fe),tt(),Ne=true,yt()&&rt();},pause(){te=true,nt();},resume(){te&&(te=false,Ne=true,yt()&&rt());},seek(o){let c=Math.min(1,Math.max(0,o));Ae=c,_=c,Pe=[],te=true,nt(),or(c,x),Ne=true;},getProgress(){return Ae},refresh(){clearTimeout(ot),Ct(),yt()&&!te&&rt();}},()=>({tStart:l,tEnd:f}))}function Sr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let s=[],i=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:n[1],nums:s,units:i});}return t}function Tr(e,t,r){let n=Bt(e),s=Bt(t);return n.length===0||n.length!==s.length?r<1?e:t:n.map((i,a)=>{let m=s[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?r<1?`${i.fn}(${i.nums.map((u,d)=>`${u}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,d)=>`${u}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,d)=>`${u+(m.nums[d]-u)*r}${i.units[d]}`).join(", ")})`}).join(" ")}function Gt(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),s=String(t);if(Sr(n))return Ge(n,s,r);if(n.includes("("))return Tr(n,s,r);let i=n.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),u=parseFloat(a[1]);return `${m+(u-m)*r}${i[2]||a[2]}`}return r<1?n:s}function xr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Qt="--scroll-draw-progress";function Ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,t){return typeof window>"u"?Ut:t.respectReducedMotion===false?jt(e,t,false):ze(t,(r,n)=>jt(e,r,n))}function jt(e,t,r){let{props:n,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:u="y",scrollContainer:d,native:E=true,velocityScale:O=false,triggerElement:x,onProgress:Z,onComplete:Me,onEnter:$,onLeave:ie,onEnterBack:pe,onLeaveBack:D}=t,z=typeof i=="function"?i:ue[i]??ue["ease-out"],I=we(s.start??"top bottom"),M=we(s.end??"bottom top"),C=x??e,S=typeof d=="string"?document.querySelector(d):d??null,R=Object.entries(n).map(([l,f])=>({prop:xr(l),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function me(){let l=window.getComputedStyle(e);for(let f of R)f.from===""&&(f.from=l.getPropertyValue(f.prop).trim()||"0");}function j(){for(let l of R)e.style.setProperty(l.prop,String(l.to));}let oe=new Map;for(let l of [...R.map(f=>f.prop),Qt])oe.set(l,e.style.getPropertyValue(l));function F(){for(let[l,f]of oe)f?e.style.setProperty(l,f):e.style.removeProperty(l);}if(r)return j(),Me?.(),{...Ut,destroy:F,getProgress:()=>1};me();let de=typeof i=="string"?it(i):null;function ve(){if(!E||!Ar()||!de||u!=="y"||S||C!==e||m||a!==1||Z||Me||$||ie||pe||D||O!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of R)if(!Mr.has(l.prop))return false;return true}function ge(){let l=`ssd-a-${++Lr}`,f=R.map(_=>`${_.prop}:${_.from}`).join(";"),Te=R.map(_=>`${_.prop}:${_.to}`).join(";"),ye=document.createElement("style");ye.setAttribute("data-ssd-animate",""),ye.textContent=`@keyframes ${l}{from{${f}}to{${Te}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ye),e.classList.add(l);let v=()=>u==="x"?window.scrollX:window.scrollY,k=()=>u==="x"?window.innerWidth:window.innerHeight,V=()=>{let _=e.getBoundingClientRect();return Ce({top:_.top,height:_.height},v(),k(),I,M)};ke(e,{type:"animate",getProgress:()=>Ie.getProgress(),getTrigger:V});let Ie={refresh(){},destroy(){e.classList.remove(l),ye.remove(),e.style.animationPlayState="",F(),Oe(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(_){let Pe=Math.min(1,Math.max(0,_));e.classList.remove(l);for(let Re of R)e.style.setProperty(Re.prop,Gt(Re.from,Re.to,Pe));},getProgress(){let{tStart:_,tEnd:Pe}=V();return z(ne(v(),_,Pe,a))}};return Ie}if(ve())return ge();let U=0,p=0,L=0,b=false,P=false,ae=-1,Ee=0,Ve=false,K=NaN,Se=-1,Qe=0,je=()=>S?u==="x"?S.scrollLeft:S.scrollTop:u==="x"?window.scrollX:window.scrollY,fe=()=>S?u==="x"?S.clientWidth:S.clientHeight:u==="x"?window.innerWidth:window.innerHeight,ee=C===e?R:[],Y=false;function X(){let l=e.style,f=ee.map(k=>l.getPropertyValue(k.prop)),Te=l.transition;ee.length&&(l.transition="none"),ee.forEach(k=>l.setProperty(k.prop,oe.get(k.prop)??""));let ye=st(C,S,u);ee.forEach((k,V)=>l.setProperty(k.prop,f[V])),ee.length&&(e.offsetWidth,l.transition=Te);let v=Ce(ye,ye.scroll,fe(),I,M);Y&&Math.abs(v.tStart-U)<1&&Math.abs(v.tEnd-p)<1||(Y=true,U=v.tStart,p=v.tEnd);}function q(l){e.style.setProperty(Qt,String(l));for(let f of R)e.style.setProperty(f.prop,Gt(f.from,f.to,l));Z?.(l);}function se(l){if(isNaN(K)){K=l;return}K<=0&&l>0?$?.():K>0&&l<=0&&D?.(),K<1&&l>=1?ie?.():K>=1&&l<1&&pe?.(),K=l;}function Q(){if(!b||P)return;let l=performance.now(),f=je(),Te=a;if(O!==false){let k=l-Qe,V=k>0?Math.abs(f-(Se<0?f:Se))/k:0;Te=a*Math.max(.2,1+V*(typeof O=="number"?O:1)*.04);}Se=f,Qe=l;let ye=p===U?0:(f-U)/(p-U);se(ye);let v=z(ne(f,U,p,Te));m&&(ae=Math.max(ae,v),v=ae),Ee=v,q(v),v>=1&&!Ve?(Ve=true,Me?.()):v<1&&!m&&(Ve=false),L=requestAnimationFrame(Q);}X(),p===U&&J("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 l=z(ne(je(),U,p,a));m&&l>0&&(ae=l),Ee=l,q(l);}let Le=new IntersectionObserver(l=>{l.forEach(f=>{b=f.isIntersecting,b&&!P?L=requestAnimationFrame(Q):cancelAnimationFrame(L);});},{root:S??null}),H;function T(){clearTimeout(H),H=setTimeout(X,150);}window.addEventListener("resize",T),window.addEventListener("orientationchange",T);let le=_e([C],T);return Le.observe(e),ke(e,{type:"animate",getProgress:()=>Ee,getTrigger:()=>({tStart:U,tEnd:p})}),{destroy(){cancelAnimationFrame(L),Le.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),le(),clearTimeout(H),F(),Oe(e);},replay(){ae=-1,Ve=false,Ee=0,P=false,q(0);},pause(){P=true,cancelAnimationFrame(L);},resume(){P&&(P=false,b&&(L=requestAnimationFrame(Q)));},seek(l){let f=Math.min(1,Math.max(0,l));Ee=f,ae=f,P=true,cancelAnimationFrame(L),q(f);},getProgress(){return Ee},refresh(){X();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,t){if(typeof window>"u")return wt;let r=typeof e=="string"?document.querySelector(e):e;return r?ze(t,(n,s)=>$r(r,n,s)):(J("scrollCounter: element not found:",e),wt)}function $r(e,t,r){let{from:n=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:u=true,decimals:d,onComplete:E}=t,O=d!==void 0?p=>p.toFixed(d):i??(p=>String(Math.round(p))),x=typeof a=="function"?a:ue[a]??ue["ease-out"],Z=we(m.start??"top 80%"),Me=we(m.end??"top 20%");if(r)return e.textContent=O(s),E?.(),{...wt,getProgress:()=>1};let $=0,ie=0,pe=false,D=0,z=false,I=false,M=-1,C=0,S=false,R=()=>window.scrollY,me=()=>window.innerHeight;function j(){let p=e.getBoundingClientRect(),L=Ce({top:p.top,height:p.height},R(),me(),Z,Me);pe&&Math.abs(L.tStart-$)<1&&Math.abs(L.tEnd-ie)<1||(pe=true,$=L.tStart,ie=L.tEnd);}function oe(p){e.textContent=O(n+(s-n)*p),e.style.setProperty("--scroll-draw-progress",String(p));}function F(){if(!z||I)return;let p=x(ne(R(),$,ie,1));u&&(M=Math.max(M,p),p=M),C=p,oe(p),p>=1&&!S?(S=true,E?.()):p<1&&!u&&(S=false),D=requestAnimationFrame(F);}j();{let p=x(ne(R(),$,ie,1));u&&p>0&&(M=p),C=p,oe(p);}let de=new IntersectionObserver(p=>{p.forEach(L=>{z=L.isIntersecting,z&&!I?D=requestAnimationFrame(F):cancelAnimationFrame(D);});}),ve;function ge(){clearTimeout(ve),ve=setTimeout(j,150);}window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge);let U=_e([e],ge);return de.observe(e),ke(e,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:$,tEnd:ie})}),{destroy(){cancelAnimationFrame(D),de.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),U(),clearTimeout(ve),Oe(e);},replay(){M=-1,S=false,C=0,I=false,oe(0);},pause(){I=true,cancelAnimationFrame(D);},resume(){I&&(I=false,z&&(D=requestAnimationFrame(F)));},seek(p){let L=Math.min(1,Math.max(0,p));C=L,M=L,I=true,cancelAnimationFrame(D),oe(L);},getProgress(){return C}}}function Jt(e,t){let r=document.createElement("span");r.textContent=t,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function er(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(r=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(n.textContent=r,n.style.whiteSpace="pre"):(n.textContent=r,n.style.display="inline-block"),e.appendChild(n),/^\s+$/.test(r)?null:n}).filter(r=>r!==null)}function Cr(e){let t=e.textContent??"";return e.textContent="",t.split("").map(r=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=r,r===" "?n.style.whiteSpace="pre":n.style.display="inline-block",e.appendChild(n),r===" "?null:n}).filter(r=>r!==null)}function Zt(e){let t=er(e),r=new Map;for(let i of t){let a=i.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(i);}let n=[],s=Array.from(r.keys()).sort((i,a)=>i-a);for(let i of s){let a=r.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((u,d)=>{let E=u.nextElementSibling;m.appendChild(u),d<a.length-1&&E&&E.style.whiteSpace==="pre"&&m.appendChild(E);}),n.push(m);}return e.textContent="",n.forEach((i,a)=>{e.appendChild(i),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function Pr(e,t,r,n){if(r<=1||n===0)return e;let s=(r-1)*n,i=t*n,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Dr(e,t){let r=[];if(t?.y!==void 0&&r.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&r.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&r.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let n=t.scale+(1-t.scale)*e;r.push(`scale(${n})`);}return r.join(" ")||""}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tr(e,t={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return J("scrollText: element not found:",e),Kt;let n=r;return ze(t,(s,i)=>kr(n,s,i))}function kr(e,t,r){let{split:n="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:u=true,onComplete:d}=t,E=typeof i=="function"?i:ue[i]??ue["ease-out"],O=we(m.start??"top 85%"),x=we(m.end??"top 40%"),Z=e.innerHTML,Me=e.textContent??"",$;n==="chars"?$=Cr(e):n==="lines"?$=Zt(e):$=er(e),Jt(e,Me);let ie=$.length;function pe(b,P){a?.opacity!==void 0&&(b.style.opacity=String(a.opacity+(1-a.opacity)*P));let ae=Dr(P,a);ae&&(b.style.transform=ae);}function D(b){e.style.setProperty("--scroll-draw-progress",String(b)),$.forEach((P,ae)=>{let Ee=E(Pr(b,ae,ie,s));pe(P,Ee);});}if(r)return D(1),d?.(),{destroy(){e.innerHTML=Z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let z=0,I=0,M=0,C=false,S=false,R=-1,me=0,j=false,oe=()=>window.scrollY,F=()=>window.innerHeight;function de(){let b=e.getBoundingClientRect(),P=Ce({top:b.top,height:b.height},oe(),F(),O,x);z=P.tStart,I=P.tEnd;}function ve(){if(!C||S)return;let b=ne(oe(),z,I,1);u&&(R=Math.max(R,b),b=R),me=b,D(b),b>=1&&!j?(j=true,d?.()):b<1&&!u&&(j=false),M=requestAnimationFrame(ve);}de();let ge=new IntersectionObserver(b=>{b.forEach(P=>{C=P.isIntersecting,C&&!S?M=requestAnimationFrame(ve):cancelAnimationFrame(M);});}),U;function p(){clearTimeout(U),U=setTimeout(()=>{if(n==="lines"){let b=me;e.innerHTML=Z,$=Zt(e),Jt(e,Me),D(b);}de();},150);}window.addEventListener("resize",p),window.addEventListener("orientationchange",p);let L=_e([e],p);return ge.observe(e),ke(e,{type:"text",getProgress:()=>me,getTrigger:()=>({tStart:z,tEnd:I})}),{destroy(){cancelAnimationFrame(M),ge.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p),L(),clearTimeout(U),e.innerHTML=Z,Oe(e);},replay(){R=-1,j=false,me=0,S=false,D(0);},pause(){S=true,cancelAnimationFrame(M);},resume(){S&&(S=false,C&&(M=requestAnimationFrame(ve)));},seek(b){let P=Math.min(1,Math.max(0,b));me=P,R=P,S=true,cancelAnimationFrame(M),D(P);},getProgress(){return me}}}function Or(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?ct(n,t):(J("Container not found:",e),r)}function Ke(){return typeof document>"u"?null:document}var vt=new WeakMap,rr;function ut(e,t,r,n){let s=vt.get(e)??new Map;vt.set(e,s);let i=()=>{let u=r(),d=s.get(t);d&&d.key===u||(d?.inst.destroy(),s.set(t,{inst:n(u),key:u,build:i,users:d?.users??0}));};i(),s.get(t).users++;let a=true;typeof MutationObserver<"u"&&(rr??(rr=new MutationObserver(u=>u.forEach(d=>vt.get(d.target)?.forEach(E=>E.build())))),rr.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(u=>`data-scroll-${u}-options`).concat("data-scroll-drawoptions")}));let m=()=>s.get(t)?.inst;return {destroy:()=>{let u=s.get(t);!a||!u||(a=false,!(--u.users>0)&&(u.inst.destroy(),s.delete(t)));},replay:()=>m()?.replay(),pause:()=>m()?.pause(),resume:()=>m()?.resume(),seek:u=>m()?.seek(u),getProgress:()=>m()?.getProgress()??0,refresh:()=>m()?.refresh?.()}}function mt(e,t){try{return e?JSON.parse(e):t}catch{return t}}function Ir(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(t=>ut(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",r=>ct(t,mt(r,{})))):[]}function Rr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(t=>ut(t,"animate",()=>t.dataset.scrollAnimateOptions??"",r=>Yt(t,mt(r,{props:{}})))):[]}function Fr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(t=>ut(t,"counter",()=>t.dataset.scrollCounterOptions??"",r=>{let n=mt(r,{});return !n.to&&n.to!==0&&(J('initScrollCounter: element missing "to" in options JSON:',t),n.to=0),typeof n.format!="function"&&n.format!==void 0&&(J('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete n.format),Xt(t,n)})):[]}function Hr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(t=>ut(t,"text",()=>t.dataset.scrollTextOptions??"",r=>tr(t,mt(r,{})))):[]}function Gn(e=Ke()){return {draw:Ir(e),animate:Rr(e),counter:Fr(e),text:Hr(e)}}exports.initAll=Gn;exports.initScrollAnimate=Rr;exports.initScrollCounter=Fr;exports.initScrollDraw=Ir;exports.initScrollText=Hr;exports.scrollDraw=Or;
1
+ 'use strict';function pn({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,l=[];for(let p=0;p<n;p++){let b=Math.pow(s,p);l.push(b),i+=b;}let f=[0],u=0;for(let p=0;p<n;p++)u+=l[p]/i,f.push(u);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let b=0;b<n;b++)if(p<=f[b+1]){let P=(p-f[b])/(f[b+1]-f[b]);if(b===0)return P*(2-P);let v=1-Math.pow(r,b);return v+(1-v)*(2*P-1)*(2*P-1)}return 1}}function dn({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(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)/r)+1}var ie={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:pn(),elastic:dn()};function It(e,t,n){return Math.min(n,Math.max(t,e))}function ye(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function Ot(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function kt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function J(e,t,n,r){return n===t?0:It((e-t)/(n-t)*r,0,1)}function Ae(e,t,n,r,s){let i=Ot(e.top,e.height,t,r.element)-kt(r.viewport,n),l=Ot(e.top,e.height,t,s.element)-kt(s.viewport,n);return {tStart:i,tEnd:l}}function ot(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function Ge(e){let t=e.tagName.toLowerCase();if(t==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(n+r)}if(t==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Rt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[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 r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function st(e,t,n){let r=Rt(e),s=Rt(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var Ft={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 B(e,...t){Ye&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var gn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",yn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ht=33;function hn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function bn(e){let t=[];for(let n=0;n<Ht;n++){let r=n/(Ht-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return gn;case "ease-out":return yn;case "ease-in-out":return hn()?bn(ie["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function _t(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Oe(e,t){_t().set(e,t);}function ke(e){_t().delete(e);}var Xe,at=new Set,lt=new WeakMap,Je=new Map,zt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function wn(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function _e(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Xe??(Xe=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)lt.get(l)!==zt(l)&&(i=true),lt.set(l,"");i&&at.forEach(l=>l());})),at.add(n);let r=wn(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{lt.has(s)||lt.set(s,zt(s)),Je.set(s,(Je.get(s)??0)+1),Xe.observe(s);}),()=>{at.delete(n)&&(r.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Xe?.unobserve(s);}),at.size||(Xe?.disconnect(),Xe=void 0));}}function Vt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=s=>e(!!s.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function ze(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=Vt(i=>{if(!i)return;r();let l=(n.getProgress?.()??0)>=1;n.destroy(),n=t(l?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(n))s[i]=(...l)=>n[i]?.(...l);return s.destroy=()=>{r(),n.destroy();},s}var vn=0;function En(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function qt(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Sn(e){if(!Ye)return;let t=qt(e,"stroke");if(!t||t==="none"){B("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Wt.has(n)&&!Wt.has(qt(e,"fill"))&&B("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Tn(e,t,n){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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,f=t-i,u=n==="x";r.innerHTML=`
2
+ <div style="position:absolute;${u?`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;${u?`left:${f}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${f}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(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var Bt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Gt=/[MmLlHhVvCcSsQqTtAaZz]/g;function xn(e,t,n){if(!Ye)return;let r=(e.match(Gt)??[]).join("").toUpperCase(),s=(t.match(Gt)??[]).join("").toUpperCase(),i=(e.match(Bt)??[]).length,l=(t.match(Bt)??[]).length;if(r!==s){B(`morphTo: command sequence differs (${r||"\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&&B(`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 Mn(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),f=r[s++]??l;return String(+(l+(f-l)*n).toFixed(4))})}function ct(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:ze(t,(n,r)=>Ln(e,n,r))}function Ln(e,t,n){let{preset:r,...s}=t,i=r?{...Ft[r],...s}:s,{selector:l="path, polyline, line, polygon, rect, circle",speed:f=1,fade:u=false,easing:p="linear",trigger:b={},stagger:P=0,direction:v="forward",once:Z=false,debug:he=false,axis:T="y",scrollContainer:re,autoReverse:be=false,delay:A=0,strokeColor:R,strokeWidth:$,fillOpacity:D,waypoints:x,velocityScale:h=false,threshold:C=0,rootMargin:K="0px",repeat:G=0,repeatDelay:ae=0,morphTo:V,clip:ee,autoplay:me=false,duration:we=1e3,native:le=true,onProgress:te,onStart:y,onComplete:m,onEnter:M,onLeave:fe,onEnterBack:pe,onLeaveBack:qe}=i,W=ee===true?"left":typeof ee=="string"?ee:false,Q=typeof p=="function"?p:ie[p]??ie.linear,Ve=ye(b.start||"top bottom"),Se=ye(b.end||"bottom top"),ne=typeof re=="string"?document.querySelector(re):re??null,Ce=Array.isArray(R)?R[0]:null,de=Array.isArray(R)?R[1]:typeof R=="string"?R:null,Te=Array.isArray($)?$[0]:null,xe=Array.isArray($)?$[1]:typeof $=="number"?$:null,ge=Array.isArray(D)?D[0]:null,Re=Array.isArray(D)?D[1]:typeof D=="number"?D:null;function Me(o){let a=o*100;switch(W){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 F=W?[]:Array.from(e.querySelectorAll(l)),I=[],oe=[],se=0,c=0,d=P,Pe=0,S=false,O=false,E=0,k=false,ve=-1,Ee=[],Ke=-1,j=false,Le=0,$e=0,Fe,ft=null;function Et(){ft?.destroy(),ft=null;}let He=new Set,St=NaN,Ne=true,et=-1,Tt=performance.now(),We=NaN;function Qe(){return ne?T==="x"?ne.scrollLeft:ne.scrollTop:T==="x"?window.scrollX:window.scrollY}function xt(){return ne?T==="x"?ne.clientWidth:ne.clientHeight:T==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=ot(e,ne,T);return Ae(o,o.scroll,xt(),Ve,Se)}function sn(){let o=c-se,a=F.length-1,g=ne??document.documentElement,N=T==="x"?"Width":"Height";if(d=P,P>0&&a>0&&o>0){let ce=g[`scroll${N}`]-g[`client${N}`]-1-se-o/f;ce>=0&&(d=Math.min(P,ce/(a*o)));}Pe=c+a*d*o;}function Lt(){(({tStart:se,tEnd:c}=Mt())),sn(),he&&Ye&&(Et(),ft=Tn(se,c,T));}function pt(o,a=Mt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let g=o.destroy;return o.destroy=()=>{g.call(o),ke(e);},o}function At(o,a){return Z&&!be?Math.max(ve,Q(Ee[o]=Math.max(Ee[o]??0,a))):Q(a)}function an(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),W){let g=a==="reverse"?1-o:o;e.style.clipPath=Me(g);return}F.forEach((g,N)=>dt(g,N,o,a));}function dt(o,a,g,N){o.style.strokeDashoffset=N==="reverse"?`${I[a]*g}`:`${I[a]*(1-g)}`,u&&(o.style.opacity=N==="reverse"?`${1-g}`:`${g}`),Ce&&de?o.style.stroke=st(Ce,de,g):de&&(o.style.stroke=de),Te!==null&&xe!==null?o.style.strokeWidth=`${Te+(xe-Te)*g}`:xe!==null&&(o.style.strokeWidth=`${xe}`),ge!==null&&Re!==null?o.style.fillOpacity=`${ge+(Re-ge)*g}`:Re!==null&&(o.style.fillOpacity=`${Re}`),V&&o.tagName.toLowerCase()==="path"&&oe[a]&&o.setAttribute("d",Mn(oe[a],V,g));}function je(){if(e.style.setProperty("--scroll-draw-progress","0"),W){e.style.clipPath=Me(v==="reverse"?1:0);return}F.forEach((o,a)=>{o.style.strokeDasharray=`${I[a]}`,o.style.strokeDashoffset=v==="reverse"?"0":`${I[a]}`,u?o.style.opacity=v==="reverse"?"1":"0":o.style.opacity="",Ce&&(o.style.stroke=Ce),Te!==null&&(o.style.strokeWidth=`${Te}`),ge!==null&&(o.style.fillOpacity=`${ge}`),V&&o.tagName.toLowerCase()==="path"&&oe[a]&&o.setAttribute("d",oe[a]);});}if(F.forEach(o=>{Sn(o);let a=Ge(o);I.push(a);let g=o.tagName.toLowerCase()==="path";g?oe.push(o.getAttribute("d")??""):oe.push(""),V&&(g?xn(oe[oe.length-1],V,o):B(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),n?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=v==="reverse"?`${a}`:"0",u&&(o.style.opacity="1"),de&&(o.style.stroke=de),xe!==null&&(o.style.strokeWidth=`${xe}`),Re!==null&&(o.style.fillOpacity=`${Re}`),V&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",V)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=v==="reverse"?"0":`${a}`,u?o.style.opacity=v==="reverse"?"1":"0":o.style.opacity="",Ce&&(o.style.stroke=Ce),Te!==null&&(o.style.strokeWidth=`${Te}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),n)return W&&(e.style.clipPath=Me(1)),m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};W&&(e.style.clipPath=Me(v==="reverse"?1:0));let Ct=typeof p=="string"?it(p):null;function ln(){return !(le===false||me||he||!En()||!F.length||!Ct||W||T!=="y"||ne||f!==1||P!==0||Z||be||h!==false||V||x||G||A>0||te||y||m||M||fe||pe||qe||R!=null||$!=null||D!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function cn(){let o=++vn,a=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,N=`--svg-scroll-draw-${o}`,ce=v==="reverse"?"0":"var(--ssd-len)",De=v==="reverse"?"var(--ssd-len)":"0",ue=`stroke-dashoffset:${ce};`,H=`stroke-dashoffset:${De};`;u&&(ue+=`opacity:${v==="reverse"?1:0};`,H+=`opacity:${v==="reverse"?0:1};`);let _=document.createElement("style");_.setAttribute("data-svg-scroll-draw",""),_.textContent=`@keyframes ${a}{from{${ue}}to{${H}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(_),e.classList.add(g);function U(w,L){w.style.setProperty("--ssd-len",String(I[L])),w.style.strokeDasharray=`${I[L]}`,w.style.strokeDashoffset="",w.style.opacity="",w.style.animationPlayState="",w.classList.add(a);}F.forEach(U);let Y=false,z=-1;function q(){if(z>=0)return z;let w=e.getBoundingClientRect(),{tStart:L,tEnd:X}=Ae({top:w.top,height:w.height},Qe(),xt(),Ve,Se);return Q(J(Qe(),L,X,f))}return {destroy(){e.classList.remove(g),F.forEach(w=>{w.classList.remove(a),w.style.removeProperty("--ssd-len"),w.style.animationPlayState="";}),_.remove();},replay(){Y=false,z=-1,F.forEach(U);},pause(){Y=true,F.forEach(w=>{w.style.animationPlayState="paused";});},resume(){Y&&(Y=false,F.forEach(w=>{w.style.animationPlayState="running";}));},seek(w){let L=Math.min(1,Math.max(0,w));z=L,Y=true,F.forEach((X,Ie)=>{X.classList.remove(a),X.style.strokeDashoffset=v==="reverse"?`${I[Ie]*L}`:`${I[Ie]*(1-L)}`,u&&(X.style.opacity=v==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return q()},refresh(){F.forEach((w,L)=>{I[L]=Ge(w),w.style.setProperty("--ssd-len",String(I[L])),w.style.strokeDasharray=`${I[L]}`;});}}}if(ln())return pt(cn());function un(){let o=Math.max(1,we),a=W?o:o*(1+Math.max(0,F.length-1)*P),g=0,N=0,ce=false;function De(z){let q=true,w=Math.min(1,Math.max(0,z/a));if(W){let L=Math.min(1,Math.max(0,z/o)),X=Q(L);Le=X,e.style.setProperty("--scroll-draw-progress",String(X)),e.style.clipPath=Me(v==="reverse"?1-X:X),te?.(X),L<1&&(q=false);}else {F.forEach((X,Ie)=>{let fn=Ie*P*o,Dt=Math.min(1,Math.max(0,(z-fn)/o));dt(X,Ie,Q(Dt),v),Dt<1&&(q=false);});let L=Q(w);Le=L,te?.(L),e.style.setProperty("--scroll-draw-progress",String(L));}if(x){let L=Q(w);for(let X in x){let Ie=parseFloat(X);L>=Ie&&!He.has(Ie)&&(He.add(Ie),x[X]?.());}}return q}function ue(z){if(j)return;let q=z-g;O||(O=true,y?.());let w=De(q);if(w&&!S){S=true,De(a),m?.(),$e<(G==="infinite"?1/0:G??0)&&($e++,Fe=setTimeout(()=>{g=performance.now(),O=false,S=false,He.clear(),je(),E=requestAnimationFrame(ue);},ae));return}w||(E=requestAnimationFrame(ue));}function H(){cancelAnimationFrame(E),clearTimeout(Fe),g=performance.now(),N=0,j=false,O=false,S=false,$e=0,ce=true,Le=0,He.clear(),je(),E=requestAnimationFrame(ue);}let _=new IntersectionObserver(z=>{z.forEach(q=>{q.isIntersecting&&!(Z&&S)?H():!q.isIntersecting&&!Z&&!S&&(cancelAnimationFrame(E),clearTimeout(Fe),ce=false);});},{root:ne??null,threshold:C,rootMargin:K}),U;function Y(){clearTimeout(U),U=setTimeout(()=>{F.forEach((z,q)=>{I[q]=Ge(z),z.style.strokeDasharray=`${I[q]}`;});},150);}return window.addEventListener("resize",Y),window.addEventListener("orientationchange",Y),A>0?setTimeout(()=>_.observe(e),A):_.observe(e),{destroy(){cancelAnimationFrame(E),clearTimeout(Fe),_.disconnect(),window.removeEventListener("resize",Y),window.removeEventListener("orientationchange",Y),clearTimeout(U);},replay(){$e=0,H();},pause(){j||!ce||(j=true,N=performance.now()-g,cancelAnimationFrame(E));},resume(){j&&(j=false,ce=true,g=performance.now()-N,E=requestAnimationFrame(ue));},seek(z){let q=Math.min(1,Math.max(0,z));Le=q,j=true,N=q*a,g=performance.now()-N,cancelAnimationFrame(E),De(N);},getProgress(){return Le},refresh(){clearTimeout(U),F.forEach((z,q)=>{I[q]=Ge(z),z.style.strokeDasharray=`${I[q]}`;});}}}if(me)return pt(un());Lt();function Pt(){if(j||!Be)return;let o=performance.now(),a=Qe();if(!Ne&&h===false&&a===St){yt(a);return}Ne=false,St=a;let g=f;if(h!==false){let H=o-Tt,_=H>0?Math.abs(a-(et<0?a:et))/H:0;g=f*Math.max(.2,1+_*(typeof h=="number"?h:1)*.04);}et=a,Tt=o;let N=be?Ke===-1||a>=Ke?"forward":"reverse":v;Ke=a;let ce=c-se,De=true,ue=ce===0?0:(a-se)/ce;if(isNaN(We)||(We<=0&&ue>0?M?.():We>0&&ue<=0&&qe?.(),We<1&&ue>=1?fe?.():We>=1&&ue<1&&pe?.()),We=ue,W){let H=At(0,J(a,se,c,g));Le=H,e.style.setProperty("--scroll-draw-progress",String(H));let _=N==="reverse"?1-H:H;e.style.clipPath=Me(_),te?.(H),!O&&J(a,se,c,g)>0&&(O=true,y?.()),H>=1&&!S?(S=true,m?.(),$e<(G==="infinite"?1/0:G??0)&&($e++,Fe=setTimeout(()=>{ve=-1,Ee=[],O=false,S=false,je();},ae))):H<1&&!Z&&(S=false),yt(a);return}if(F.forEach((H,_)=>{let U=_*d*ce,Y=At(_,J(a,se+U,c+U,g));dt(H,_,Y,N),_===0&&(Le=Y,te?.(Y),e.style.setProperty("--scroll-draw-progress",String(Y))),Y<1&&(De=false);}),x){let H=Q(J(a,se,c,g));for(let _ in x){let U=parseFloat(_);H>=U&&!He.has(U)&&(He.add(U),x[_]?.());}}!O&&J(a,se,c,g)>0&&(O=true,y?.()),De&&!S?(S=true,m?.(),$e<(G==="infinite"?1/0:G??0)&&($e++,Fe=setTimeout(()=>{ve=-1,Ee=[],O=false,S=false,He.clear(),je(),Ne=true;},ae))):!De&&!Z&&(S=false),yt(a);}function gt(o){return o>=c&&o<Pe}function yt(o){k||gt(o)?E=requestAnimationFrame(Pt):Be=false;}function ht(){return k||gt(Qe())}let Be=false;function tt(){Be||(Be=true,E=requestAnimationFrame(function(){Pt();}));}function nt(){Be=false,cancelAnimationFrame(E);}let bt=new IntersectionObserver(o=>{o.forEach(a=>{k=a.isIntersecting,k&&!j?(Ne=true,tt()):Be&&!j&&gt(Qe())||nt();});},{root:ne??null,threshold:C,rootMargin:K});function $t(){F.forEach((o,a)=>{I[a]=Ge(o),o.style.strokeDasharray=`${I[a]}`;}),Lt(),Ne=true;}let rt;function Ue(){clearTimeout(rt),rt=setTimeout($t,150);}window.addEventListener("resize",Ue),window.addEventListener("orientationchange",Ue);let mn=_e([e],Ue);return A>0?setTimeout(()=>bt.observe(e),A):bt.observe(e),pt({destroy(){cancelAnimationFrame(E),clearTimeout(Fe),nt(),bt.disconnect(),mn(),window.removeEventListener("resize",Ue),window.removeEventListener("orientationchange",Ue),clearTimeout(rt),Et();},replay(){ve=-1,Ee=[],Ke=-1,et=-1,O=false,S=false,$e=0,j=false,Le=0,He.clear(),clearTimeout(Fe),je(),Ne=true,ht()&&tt();},pause(){j=true,nt();},resume(){j&&(j=false,Ne=true,ht()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Le=a,ve=a,Ee=[],j=true,nt(),an(a,v),Ne=true;},getProgress(){return Le},refresh(){clearTimeout(rt),$t(),ht()&&!j&&tt();}},()=>({tStart:se,tEnd:c}))}function An(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Qt(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],l=r[2].trim();if(l)for(let f of l.split(/[\s,]+/)){let u=f.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Cn(e,t,n){let r=Qt(e),s=Qt(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,l)=>{let f=s[l];return i.fn!==f.fn||i.nums.length!==f.nums.length?n<1?`${i.fn}(${i.nums.map((u,p)=>`${u}${i.units[p]}`).join(", ")})`:`${f.fn}(${f.nums.map((u,p)=>`${u}${f.units[p]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,p)=>`${u+(f.nums[p]-u)*n}${i.units[p]}`).join(", ")})`}).join(" ")}function jt(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(An(r))return st(r,s,n);if(r.includes("("))return Cn(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let f=parseFloat(i[1]),u=parseFloat(l[1]);return `${f+(u-f)*n}${i[2]||l[2]}`}return n<1?r:s}function Pn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var $n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dn=0,Ut="--scroll-draw-progress";function In(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,t){return typeof window>"u"?Xt:t.respectReducedMotion===false?Yt(e,t,false):ze(t,(n,r)=>Yt(e,n,r))}function Yt(e,t,n){let{props:r,trigger:s={},easing:i="ease-out",speed:l=1,once:f=false,axis:u="y",scrollContainer:p,native:b=true,velocityScale:P=false,triggerElement:v,onProgress:Z,onComplete:he,onEnter:T,onLeave:re,onEnterBack:be,onLeaveBack:A}=t,R=typeof i=="function"?i:ie[i]??ie["ease-out"],$=ye(s.start||"top bottom"),D=ye(s.end||"bottom top"),x=v??e,h=typeof p=="string"?document.querySelector(p):p??null,C=Object.entries(r).map(([c,d])=>({prop:Pn(c),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function K(){let c=window.getComputedStyle(e);for(let d of C)d.from===""&&(d.from=c.getPropertyValue(d.prop).trim()||"0");}function G(){for(let c of C)e.style.setProperty(c.prop,String(c.to));}let ae=new Map;for(let c of [...C.map(d=>d.prop),Ut])ae.set(c,e.style.getPropertyValue(c));function V(){for(let[c,d]of ae)d?e.style.setProperty(c,d):e.style.removeProperty(c);}if(n)return G(),he?.(),{...Xt,destroy:V,getProgress:()=>1};K();let ee=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,me=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,we=typeof i=="string"?it(i):null;function le(){if(!b||!In()||!we||u!=="y"||h||x!==e||f||l!==1||Z||he||T||re||be||A||P!==false||(s.start||"top bottom").trim()!=="top bottom"||(s.end||"bottom top").trim()!=="bottom top")return false;for(let c of C)if(!$n.has(c.prop))return false;return true}function te(){let c=`ssd-a-${++Dn}`,d=C.map(k=>`${k.prop}:${k.from}`).join(";"),Pe=C.map(k=>`${k.prop}:${k.to}`).join(";"),S=document.createElement("style");S.setAttribute("data-ssd-animate",""),S.textContent=`@keyframes ${c}{from{${d}}to{${Pe}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${we};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(S),e.classList.add(c);let O=()=>{let k=e.getBoundingClientRect();return Ae({top:k.top,height:k.height},ee(),me(),$,D)};Oe(e,{type:"animate",getProgress:()=>E.getProgress(),getTrigger:O});let E={refresh(){},destroy(){e.classList.remove(c),S.remove(),e.style.animationPlayState="",V(),ke(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(k){let ve=Math.min(1,Math.max(0,k));e.classList.remove(c);for(let Ee of C)e.style.setProperty(Ee.prop,jt(Ee.from,Ee.to,ve));},getProgress(){let{tStart:k,tEnd:ve}=O();return R(J(ee(),k,ve,l))}};return E}if(le())return te();let y=0,m=0,M=0,fe=false,pe=false,qe=-1,W=0,Q=0,Ve=false,Se=NaN,ne=-1,Ce=0,de=x===e?C:[],Te=false;function xe(){let c=e.style,d=de.map(E=>c.getPropertyValue(E.prop)),Pe=c.transition;de.length&&(c.transition="none"),de.forEach(E=>c.setProperty(E.prop,ae.get(E.prop)??""));let S=ot(x,h,u);de.forEach((E,k)=>c.setProperty(E.prop,d[k])),de.length&&(e.offsetWidth,c.transition=Pe);let O=Ae(S,S.scroll,me(),$,D);Te&&Math.abs(O.tStart-y)<1&&Math.abs(O.tEnd-m)<1||(Te=true,y=O.tStart,m=O.tEnd);}function ge(c){e.style.setProperty(Ut,String(c));for(let d of C)e.style.setProperty(d.prop,jt(d.from,d.to,c));Z?.(c);}function Re(c){if(isNaN(Se)){Se=c;return}Se<=0&&c>0?T?.():Se>0&&c<=0&&A?.(),Se<1&&c>=1?re?.():Se>=1&&c<1&&be?.(),Se=c;}function Me(){if(!fe||pe)return;let c=performance.now(),d=ee(),Pe=l;if(P!==false){let k=c-Ce,ve=k>0?Math.abs(d-(ne<0?d:ne))/k:0;Pe=l*Math.max(.2,1+ve*(typeof P=="number"?P:1)*.04);}ne=d,Ce=c;let S=m===y?0:(d-y)/(m-y);Re(S);let O=J(d,y,m,Pe),E=f?Math.max(qe,R(W=Math.max(W,O))):R(O);Q=E,ge(E),E>=1&&!Ve?(Ve=true,he?.()):E<1&&!f&&(Ve=false),M=requestAnimationFrame(Me);}xe(),m===y&&B("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),W=J(ee(),y,m,l),Q=R(W),ge(Q);let F=new IntersectionObserver(c=>{c.forEach(d=>{fe=d.isIntersecting,fe&&!pe?M=requestAnimationFrame(Me):cancelAnimationFrame(M);});},{root:h??null}),I;function oe(){clearTimeout(I),I=setTimeout(xe,150);}window.addEventListener("resize",oe),window.addEventListener("orientationchange",oe);let se=_e([x],oe);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:y,tEnd:m})}),{destroy(){cancelAnimationFrame(M),F.disconnect(),window.removeEventListener("resize",oe),window.removeEventListener("orientationchange",oe),se(),clearTimeout(I),V(),ke(e);},replay(){qe=-1,W=0,Ve=false,Q=0,pe=false,ge(0);},pause(){pe=true,cancelAnimationFrame(M);},resume(){pe&&(pe=false,fe&&(M=requestAnimationFrame(Me)));},seek(c){let d=Math.min(1,Math.max(0,c));Q=d,qe=d,W=0,pe=true,cancelAnimationFrame(M),ge(d);},getProgress(){return Q},refresh(){xe();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,t){if(typeof window>"u")return wt;let n=typeof e=="string"?document.querySelector(e):e;return n?ze(t,(r,s)=>On(n,r,s)):(B("scrollCounter: element not found:",e),wt)}function On(e,t,n){let{from:r=0,to:s,format:i,easing:l="ease-out",trigger:f={},once:u=true,decimals:p,onComplete:b}=t,P=p!==void 0?y=>y.toFixed(p):i??(y=>String(Math.round(y))),v=typeof l=="function"?l:ie[l]??ie["ease-out"],Z=ye(f.start||"top 80%"),he=ye(f.end||"top 20%");if(n)return e.textContent=P(s),b?.(),{...wt,getProgress:()=>1};let T=0,re=0,be=false,A=0,R=false,$=false,D=-1,x=0,h=0,C=false,K=()=>window.scrollY,G=()=>window.innerHeight;function ae(){let y=e.getBoundingClientRect(),m=Ae({top:y.top,height:y.height},K(),G(),Z,he);be&&Math.abs(m.tStart-T)<1&&Math.abs(m.tEnd-re)<1||(be=true,T=m.tStart,re=m.tEnd);}function V(y){e.textContent=P(r+(s-r)*y),e.style.setProperty("--scroll-draw-progress",String(y));}function ee(){if(!R||$)return;let y=J(K(),T,re,1),m=u?Math.max(D,v(x=Math.max(x,y))):v(y);h=m,V(m),m>=1&&!C?(C=true,b?.()):m<1&&!u&&(C=false),A=requestAnimationFrame(ee);}ae();{x=J(K(),T,re,1);let y=v(x);h=y,V(y);}let me=new IntersectionObserver(y=>{y.forEach(m=>{R=m.isIntersecting,R&&!$?A=requestAnimationFrame(ee):cancelAnimationFrame(A);});}),we;function le(){clearTimeout(we),we=setTimeout(ae,150);}window.addEventListener("resize",le),window.addEventListener("orientationchange",le);let te=_e([e],le);return me.observe(e),Oe(e,{type:"counter",getProgress:()=>h,getTrigger:()=>({tStart:T,tEnd:re})}),{destroy(){cancelAnimationFrame(A),me.disconnect(),window.removeEventListener("resize",le),window.removeEventListener("orientationchange",le),te(),clearTimeout(we),ke(e);},replay(){D=-1,x=0,C=false,h=0,$=false,V(0);},pause(){$=true,cancelAnimationFrame(A);},resume(){$&&($=false,R&&(A=requestAnimationFrame(ee)));},seek(y){let m=Math.min(1,Math.max(0,y));h=m,D=m,x=0,$=true,cancelAnimationFrame(A),V(m);},getProgress(){return h}}}function Kt(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function nn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(r.textContent=n,r.style.whiteSpace="pre"):(r.textContent=n,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(n)?null:r}).filter(n=>n!==null)}function kn(e){let t=e.textContent??"";return e.textContent="",t.split("").map(n=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=n,n===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),n===" "?null:r}).filter(n=>n!==null)}function en(e){let t=nn(e),n=new Map;for(let i of t){let l=i.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(i);}let r=[],s=Array.from(n.keys()).sort((i,l)=>i-l);for(let i of s){let l=n.get(i),f=document.createElement("span");f.setAttribute("aria-hidden","true"),f.style.display="inline-block",l.forEach((u,p)=>{let b=u.nextElementSibling;f.appendChild(u),p<l.length-1&&b&&b.style.whiteSpace==="pre"&&f.appendChild(b);}),r.push(f);}return e.textContent="",r.forEach((i,l)=>{e.appendChild(i),l<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Rn(e,t,n,r){if(n<=1||r===0)return e;let s=(n-1)*r,i=t*r,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Fn(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")||""}var tn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rn(e,t={}){if(typeof window>"u")return tn;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return B("scrollText: element not found:",e),tn;let r=n;return ze(t,(s,i)=>Hn(r,s,i))}function Hn(e,t,n){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:l={opacity:0,y:24},trigger:f={},once:u=true,onComplete:p}=t,b=typeof i=="function"?i:ie[i]??ie["ease-out"],P=ye(f.start||"top 85%"),v=ye(f.end||"top 40%"),Z=e.innerHTML,he=e.textContent??"",T;r==="chars"?T=kn(e):r==="lines"?T=en(e):T=nn(e),Kt(e,he);let re=T.length;function be(m,M){l?.opacity!==void 0&&(m.style.opacity=String(l.opacity+(1-l.opacity)*M));let fe=Fn(M,l);fe&&(m.style.transform=fe);}function A(m){e.style.setProperty("--scroll-draw-progress",String(m)),T.forEach((M,fe)=>{let pe=b(Rn(m,fe,re,s));be(M,pe);});}if(n)return A(1),p?.(),{destroy(){e.innerHTML=Z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let R=0,$=0,D=0,x=false,h=false,C=-1,K=0,G=false,ae=()=>window.scrollY,V=()=>window.innerHeight;function ee(){let m=e.getBoundingClientRect(),M=Ae({top:m.top,height:m.height},ae(),V(),P,v);R=M.tStart,$=M.tEnd;}function me(){if(!x||h)return;let m=J(ae(),R,$,1);u&&(C=Math.max(C,m),m=C),K=m,A(m),m>=1&&!G?(G=true,p?.()):m<1&&!u&&(G=false),D=requestAnimationFrame(me);}ee();let we=new IntersectionObserver(m=>{m.forEach(M=>{x=M.isIntersecting,x&&!h?D=requestAnimationFrame(me):cancelAnimationFrame(D);});}),le;function te(){clearTimeout(le),le=setTimeout(()=>{if(r==="lines"){let m=K;e.innerHTML=Z,T=en(e),Kt(e,he),A(m);}ee();},150);}window.addEventListener("resize",te),window.addEventListener("orientationchange",te);let y=_e([e],te);return we.observe(e),Oe(e,{type:"text",getProgress:()=>K,getTrigger:()=>({tStart:R,tEnd:$})}),{destroy(){cancelAnimationFrame(D),we.disconnect(),window.removeEventListener("resize",te),window.removeEventListener("orientationchange",te),y(),clearTimeout(le),e.innerHTML=Z,ke(e);},replay(){C=-1,G=false,K=0,h=false,A(0);},pause(){h=true,cancelAnimationFrame(D);},resume(){h&&(h=false,x&&(D=requestAnimationFrame(me)));},seek(m){let M=Math.min(1,Math.max(0,m));K=M,C=M,h=true,cancelAnimationFrame(D),A(M);},getProgress(){return K}}}function Nn(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let r=typeof e=="string"?document.querySelector(e):e;return r?ct(r,t):(B("Container not found:",e),n)}function Ze(){return typeof document>"u"?null:document}var vt=new WeakMap,on;function ut(e,t,n,r){let s=vt.get(e)??new Map;vt.set(e,s);let i=()=>{let u=n(),p=s.get(t);p&&p.key===u||(p?.inst.destroy(),s.set(t,{inst:r(u),key:u,build:i,users:p?.users??0}));};i(),s.get(t).users++;let l=true;typeof MutationObserver<"u"&&(on??(on=new MutationObserver(u=>u.forEach(p=>vt.get(p.target)?.forEach(b=>b.build())))),on.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(u=>`data-scroll-${u}-options`).concat("data-scroll-drawoptions")}));let f=()=>s.get(t)?.inst;return {destroy:()=>{let u=s.get(t);!l||!u||(l=false,!(--u.users>0)&&(u.inst.destroy(),s.delete(t)));},replay:()=>f()?.replay(),pause:()=>f()?.pause(),resume:()=>f()?.resume(),seek:u=>f()?.seek(u),getProgress:()=>f()?.getProgress()??0,refresh:()=>f()?.refresh?.()}}function mt(e,t){try{return e?JSON.parse(e):t}catch{return t}}function _n(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(t=>ut(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>ct(t,mt(n,{})))):[]}function zn(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(t=>ut(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>Jt(t,mt(n,{props:{}})))):[]}function Vn(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(t=>ut(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let r=mt(n,{});return !r.to&&r.to!==0&&(B('initScrollCounter: element missing "to" in options JSON:',t),r.to=0),typeof r.format!="function"&&r.format!==void 0&&(B('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete r.format),Zt(t,r)})):[]}function qn(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(t=>ut(t,"text",()=>t.dataset.scrollTextOptions??"",n=>rn(t,mt(n,{})))):[]}function Yr(e=Ze()){return {draw:_n(e),animate:zn(e),counter:Vn(e),text:qn(e)}}exports.initAll=Yr;exports.initScrollAnimate=zn;exports.initScrollCounter=Vn;exports.initScrollDraw=_n;exports.initScrollText=qn;exports.scrollDraw=Nn;
@@ -1 +1 @@
1
- export{a as scrollDraw}from'../chunk-OTDD2ROH.mjs';import {a as a$2}from'../chunk-DY5JCXVR.mjs';import {a as a$1}from'../chunk-WXUOF4NM.mjs';import {a}from'../chunk-LTCJVVSC.mjs';import {b}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.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-BLY6F6EC.mjs';import {a as a$2}from'../chunk-4H2SGMAQ.mjs';import {a as a$1}from'../chunk-LGJQWZHH.mjs';import {a}from'../chunk-V4L3ELVC.mjs';import {b}from'../chunk-23EALNDF.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.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};