svg-scroll-draw 2.21.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/dist/angular/index.cjs +3 -3
- package/dist/angular/index.d.mts +1 -1
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.mjs +1 -1
- package/dist/aos/index.cjs +2 -2
- package/dist/aos/index.mjs +1 -1
- package/dist/aos/react/index.cjs +2 -2
- package/dist/aos/react/index.mjs +1 -1
- package/dist/astro/index.cjs +3 -3
- package/dist/astro/index.mjs +1 -1
- package/dist/cdn/aos.global.js +2 -2
- package/dist/cdn/scrollreveal.global.js +2 -2
- package/dist/cdn/svg-scroll-draw.dev.global.js +83 -29
- package/dist/cdn/svg-scroll-draw.global.js +3 -3
- package/dist/cdn/vivus.global.js +1 -1
- package/dist/chunk-2PYLM3E7.mjs +1 -0
- package/dist/chunk-DWK6XXY6.mjs +2 -0
- package/dist/chunk-DY5JCXVR.mjs +1 -0
- package/dist/chunk-EAWFBJUR.mjs +2 -0
- package/dist/{chunk-MTEGM4RR.mjs → chunk-GVBO5GRD.mjs} +1 -1
- package/dist/chunk-HX4SP5WN.mjs +3 -0
- package/dist/chunk-JCXMBI4G.mjs +2 -0
- package/dist/chunk-KV3WCPQ5.mjs +1 -0
- package/dist/chunk-LTCJVVSC.mjs +1 -0
- package/dist/{chunk-SMRTRZSD.mjs → chunk-OTDD2ROH.mjs} +1 -1
- package/dist/{chunk-MENZ5DS4.mjs → chunk-VMUJMXKO.mjs} +1 -1
- package/dist/chunk-WXUOF4NM.mjs +1 -0
- package/dist/chunk-YNNA33A5.mjs +2 -0
- package/dist/cinematic/index.cjs +2 -2
- package/dist/cinematic/index.mjs +1 -1
- package/dist/{engine-DQyBzZDl.d.ts → engine-B7UpB4fT.d.ts} +2 -1
- package/dist/{engine-P8u6OK4m.d.mts → engine-o1VSQ1lX.d.mts} +2 -1
- package/dist/group/index.cjs +3 -3
- package/dist/group/index.d.mts +2 -2
- package/dist/group/index.d.ts +2 -2
- package/dist/group/index.mjs +1 -1
- package/dist/horizontal/index.cjs +1 -1
- package/dist/horizontal/index.d.mts +2 -1
- package/dist/horizontal/index.d.ts +2 -1
- package/dist/horizontal/index.mjs +1 -1
- package/dist/{index-CMqK0GCT.d.mts → index-BY-CNE8c.d.mts} +1 -1
- package/dist/{index-DPqPEnO-.d.ts → index-DqXXiDIk.d.ts} +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/nuxt/index.cjs +3 -3
- package/dist/nuxt/index.d.mts +1 -1
- package/dist/nuxt/index.d.ts +1 -1
- package/dist/nuxt/index.mjs +1 -1
- package/dist/react/index.cjs +3 -3
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.mjs +1 -1
- package/dist/reveal/index.cjs +1 -1
- package/dist/reveal/index.mjs +1 -1
- package/dist/scrollreveal/index.cjs +2 -2
- package/dist/scrollreveal/index.mjs +1 -1
- package/dist/scrollreveal/react/index.cjs +2 -2
- package/dist/scrollreveal/react/index.mjs +1 -1
- package/dist/snap/index.mjs +1 -1
- package/dist/solid/index.cjs +2 -2
- package/dist/solid/index.d.mts +1 -1
- package/dist/solid/index.d.ts +1 -1
- package/dist/solid/index.mjs +1 -1
- package/dist/svelte/index.cjs +3 -3
- package/dist/svelte/index.d.mts +1 -1
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.mjs +1 -1
- package/dist/text/index.cjs +1 -1
- package/dist/text/index.mjs +1 -1
- package/dist/timeline/index.mjs +1 -1
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.mjs +1 -1
- package/dist/vivus/index.cjs +2 -2
- package/dist/vivus/index.d.mts +3 -0
- package/dist/vivus/index.d.ts +3 -0
- package/dist/vivus/index.mjs +1 -1
- package/dist/vivus/react/index.cjs +2 -2
- package/dist/vivus/react/index.mjs +1 -1
- package/dist/vue/index.cjs +3 -3
- package/dist/vue/index.d.mts +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue/index.mjs +1 -1
- package/dist/web-component/index.cjs +3 -3
- package/dist/web-component/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-426RAN5I.mjs +0 -1
- package/dist/chunk-4T5R3ZTL.mjs +0 -2
- package/dist/chunk-7SBTYJGH.mjs +0 -1
- package/dist/chunk-BFX2CSQ3.mjs +0 -1
- package/dist/chunk-ENACACPZ.mjs +0 -3
- package/dist/chunk-KGAJQP2N.mjs +0 -2
- package/dist/chunk-KHQ7OGQK.mjs +0 -1
- package/dist/chunk-OMI46IXL.mjs +0 -2
- package/dist/chunk-WQZKXAXK.mjs +0 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
[](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.
|
|
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.
|
|
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
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
| `scrollParallax` | `svg-scroll-draw` | Move any element at a different rate than scroll. Speed multiplier, reverse direction. |
|
|
29
29
|
| `scrollDraw` | `svg-scroll-draw` | The original — scroll-driven SVG path drawing via `stroke-dashoffset`. |
|
|
30
30
|
| `scrollVideo` | `svg-scroll-draw/video` | Tie `<video>.currentTime` to scroll. The Apple/Stripe product-page pattern. |
|
|
31
|
-
| `scrollText` | `svg-scroll-draw/text` | Split text into chars/words/lines and stagger-animate each on scroll. 3.
|
|
31
|
+
| `scrollText` | `svg-scroll-draw/text` | Split text into chars/words/lines and stagger-animate each on scroll. 3.4 KB, nothing else to load. |
|
|
32
32
|
| `devtools` | `svg-scroll-draw/devtools` | Visual overlay showing every active animation's triggers and progress. Dev-only. |
|
|
33
33
|
| `AOS` | `svg-scroll-draw/aos` | Drop-in replacement for AOS: same `AOS.init()`, same `data-aos` markup, no `aos.css`. |
|
|
34
34
|
| `ScrollReveal` | `svg-scroll-draw/scrollreveal` | Drop-in replacement for ScrollReveal.js 4, MIT instead of GPL-3.0. |
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
|
|
37
37
|
All APIs return the same instance object: `{ destroy, replay, pause, resume, seek, getProgress }`.
|
|
38
38
|
|
|
39
|
+
Under `prefers-reduced-motion: reduce` each one shows its finished state instead of animating. If the reader turns the setting on while the page is open, everything still moving finishes at once, as if the page had loaded that way; turning it off again leaves it finished until the next load.
|
|
40
|
+
|
|
39
41
|
---
|
|
40
42
|
|
|
41
43
|
## Install
|
|
@@ -273,7 +275,7 @@ import { ScrollText } from 'svg-scroll-draw/react';
|
|
|
273
275
|
| `once` | `boolean` | `true` | — |
|
|
274
276
|
| `onComplete` | `() => void` | — | — |
|
|
275
277
|
|
|
276
|
-
> **Accessibility:** `scrollText`
|
|
278
|
+
> **Accessibility:** `scrollText` adds `aria-hidden="true"` to every split piece and keeps the whole text once in a visually hidden span, which a screen reader reads as part of the element (ARIA does not allow an `aria-label` on a `<p>`, `<span>` or `<div>`). `destroy()` fully restores the original HTML.
|
|
277
279
|
|
|
278
280
|
---
|
|
279
281
|
|
|
@@ -419,7 +421,7 @@ WebKit and fails if any element differs at any scroll stop. AOS 3's `mirror`, `a
|
|
|
419
421
|
|
|
420
422
|
Differences, on purpose:
|
|
421
423
|
|
|
422
|
-
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition.
|
|
424
|
+
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition, also when the reader turns it on while the page is open.
|
|
423
425
|
- `disable: 'phone' | 'tablet' | 'mobile'` checks the viewport width, not the user agent.
|
|
424
426
|
- Trigger positions are re-measured on `load`, so images that finish late do not shift them.
|
|
425
427
|
- `AOS.destroy()` stops everything, for single-page apps that unmount the page.
|
|
@@ -474,7 +476,7 @@ Differences, on purpose:
|
|
|
474
476
|
|
|
475
477
|
- Nothing happens on import. ScrollReveal adds the `sr` class and `body { height: 100% }` as soon as its
|
|
476
478
|
script loads; this does both on the first `ScrollReveal()` call, keeping the import SSR-safe.
|
|
477
|
-
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition.
|
|
479
|
+
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition, also when the reader turns it on while the page is open.
|
|
478
480
|
|
|
479
481
|
---
|
|
480
482
|
|
|
@@ -519,7 +521,7 @@ in 0.4.6. Shapes become `<path>`s with the same `d` strings, and dashes get the
|
|
|
519
521
|
suite runs vivus 0.4.6 beside it across nine configurations and requires the SVG markup to match exactly
|
|
520
522
|
at every point of the animation. Like vivus, the clock is the animation frame.
|
|
521
523
|
|
|
522
|
-
One difference, on purpose: under `prefers-reduced-motion: reduce
|
|
524
|
+
One difference, on purpose: under `prefers-reduced-motion: reduce` (including when it is turned on mid-play), `play()` jumps to the end and still
|
|
523
525
|
fires its callbacks. When you want the stroke to follow the scroll instead of a clock, use
|
|
524
526
|
[`scrollDraw`](#scrolldraw--svg-path-drawing-v1-api-unchanged) from the same package.
|
|
525
527
|
|
|
@@ -629,15 +631,15 @@ devtools.highlight('#my-element'); // outline for 2 seconds
|
|
|
629
631
|
<!-- size-table:start -->
|
|
630
632
|
| Entry | Gzipped |
|
|
631
633
|
|---|---|
|
|
632
|
-
| `svg-scroll-draw` (main, every core API) | 11.
|
|
633
|
-
| `svg-scroll-draw/react` (includes the engine) |
|
|
634
|
-
| `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.
|
|
635
|
-
| `svg-scroll-draw/reveal` | 5.
|
|
636
|
-
| `svg-scroll-draw/text` | 3.
|
|
637
|
-
| `svg-scroll-draw/video` | 2.
|
|
638
|
-
| `svg-scroll-draw/scrollreveal` | 4.
|
|
639
|
-
| `svg-scroll-draw/vivus` | 4.
|
|
640
|
-
| `svg-scroll-draw/aos` (styles included) | 3.
|
|
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/reveal` | 5.8 KB |
|
|
638
|
+
| `svg-scroll-draw/text` | 3.4 KB |
|
|
639
|
+
| `svg-scroll-draw/video` | 2.8 KB |
|
|
640
|
+
| `svg-scroll-draw/scrollreveal` | 4.7 KB |
|
|
641
|
+
| `svg-scroll-draw/vivus` | 4.2 KB |
|
|
642
|
+
| `svg-scroll-draw/aos` (styles included) | 3.2 KB |
|
|
641
643
|
| `svg-scroll-draw/snap` | 1.9 KB |
|
|
642
644
|
| `svg-scroll-draw/devtools` | 1.8 KB (dev only) |
|
|
643
645
|
| `svg-scroll-draw/pin` | 1.6 KB |
|
package/dist/angular/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';function
|
|
2
|
-
<div style="position:absolute;${f?`left:${
|
|
3
|
-
<div style="position:absolute;${f?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var Nt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Rt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sr(e,n,r){if(!Ke)return;let t=(e.match(Rt)??[]).join("").toUpperCase(),s=(n.match(Rt)??[]).join("").toUpperCase(),i=(e.match(Nt)??[]).length,l=(n.match(Nt)??[]).length;if(t!==s){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==l&&be(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),u=t[s++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function zt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,s=r?{...Ct[r],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:p="linear",trigger:S={},stagger:N=0,direction:P="forward",once:oe=false,debug:Ce=false,axis:G="y",scrollContainer:Le,autoReverse:R=false,delay:Y=0,strokeColor:X,strokeWidth:A,fillOpacity:I,waypoints:T,velocityScale:$=false,threshold:C=0,rootMargin:x="0px",repeat:w=0,repeatDelay:K=0,morphTo:M,clip:te,autoplay:xe=false,duration:we=1e3,native:ce=true,onProgress:q,onStart:F,onComplete:m,onEnter:O,onLeave:v,onEnterBack:L,onLeaveBack:ue}=s,y=te===true?"left":typeof te=="string"?te:false,z=typeof p=="function"?p:le[p]??le.linear,me=he(S.start??"top bottom"),He=he(S.end??"bottom top"),ve=typeof Le=="string"?document.querySelector(Le):Le??null,Me=Array.isArray(X)?X[0]:null,fe=Array.isArray(X)?X[1]:typeof X=="string"?X:null,Q=Array.isArray(A)?A[0]:null,se=Array.isArray(A)?A[1]:typeof A=="number"?A:null,ie=Array.isArray(I)?I[0]:null,Z=Array.isArray(I)?I[1]:typeof I=="number"?I:null;function Ne(o){let a=o*100;switch(y){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let V=y?[]:Array.from(e.querySelectorAll(l)),D=[],pe=[],re=0,Ee=0,c=N,h=0,_=false,B=false,k=0,de=false,ye=-1,Re=[],ae=-1,j=false,Se=0,ze=0,Ve,lt=null;function ht(){lt?.destroy(),lt=null;}let _e=new Set,bt=NaN,We=true,Je=-1,wt=performance.now(),Be=NaN;function Ye(){return ve?G==="x"?ve.scrollLeft:ve.scrollTop:G==="x"?window.scrollX:window.scrollY}function vt(){return ve?G==="x"?ve.clientWidth:ve.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Et(){let o=ot(e,ve,G);return Pe(o,o.scroll,vt(),me,He)}function sr(){let o=Ee-re,a=V.length-1,g=ve??document.documentElement,J=G==="x"?"Width":"Height";if(c=N,N>0&&a>0&&o>0){let Ae=g[`scroll${J}`]-g[`client${J}`]-1-re-o/u;Ae>=0&&(c=Math.min(N,Ae/(a*o)));}h=Ee+a*c*o;}function St(){(({tStart:re,tEnd:Ee}=Et())),sr(),Ce&&Ke&&(ht(),lt=Er(re,Ee,G));}function ct(o,a=Et){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let g=o.destroy;return o.destroy=()=>{g.call(o),Ie(e);},o}function ir(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),y){let g=a==="reverse"?1-o:o;e.style.clipPath=Ne(g);return}V.forEach((g,J)=>{g.style.strokeDashoffset=a==="reverse"?`${D[J]*o}`:`${D[J]*(1-o)}`,f&&(g.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Me&&fe?g.style.stroke=Ue(Me,fe,o):fe&&(g.style.stroke=fe),Q!==null&&se!==null?g.style.strokeWidth=`${Q+(se-Q)*o}`:se!==null&&(g.style.strokeWidth=`${se}`),ie!==null&&Z!==null?g.style.fillOpacity=`${ie+(Z-ie)*o}`:Z!==null&&(g.style.fillOpacity=`${Z}`),M&&g.tagName.toLowerCase()==="path"&&pe[J]&&g.setAttribute("d",dt(pe[J],M,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),y){e.style.clipPath=Ne(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${D[a]}`,o.style.strokeDashoffset=P==="reverse"?"0":`${D[a]}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`),M&&o.tagName.toLowerCase()==="path"&&pe[a]&&o.setAttribute("d",pe[a]);});}if(V.forEach(o=>{vr(o);let a=je(o);D.push(a);let g=o.tagName.toLowerCase()==="path";g?pe.push(o.getAttribute("d")??""):pe.push(""),M&&(g?Sr(pe[pe.length-1],M,o):be(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=P==="reverse"?`${a}`:"0",f&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),se!==null&&(o.style.strokeWidth=`${se}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=P==="reverse"?"0":`${a}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),y){if(i)return e.style.clipPath=Ne(1),m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(i)return m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof p=="string"?st(p):null;function ar(){return !(ce===false||!wr()||!V.length||!Tt||y||G!=="y"||ve||u!==1||N!==0||oe||R||$!==false||M||T||w||Y>0||q||F||m||O||v||L||ue||X!=null||A!=null||I!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function lr(){let o=++br,a=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,J=`--svg-scroll-draw-${o}`,Ae=P==="reverse"?"0":"var(--ssd-len)",Fe=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ae};`,E=`stroke-dashoffset:${Fe};`;f&&(ke+=`opacity:${P==="reverse"?1:0};`,E+=`opacity:${P==="reverse"?0:1};`);let H=document.createElement("style");H.setAttribute("data-svg-scroll-draw",""),H.textContent=`@keyframes ${a}{from{${ke}}to{${E}}}.${g}{view-timeline-name:${J};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${J};animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(g);function ge(d,ee){d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(a);}V.forEach(ge);let b=false,W=-1;function U(){if(W>=0)return W;let d=e.getBoundingClientRect(),{tStart:ee,tEnd:$e}=Pe({top:d.top,height:d.height},Ye(),vt(),me,He);return z(ne(Ye(),ee,$e,u))}return {destroy(){e.classList.remove(g),V.forEach(d=>{d.classList.remove(a),d.style.removeProperty("--ssd-len"),d.style.animationPlayState="";}),H.remove();},replay(){b=false,W=-1,V.forEach(ge);},pause(){b=true,V.forEach(d=>{d.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(d=>{d.style.animationPlayState="running";}));},seek(d){let ee=Math.min(1,Math.max(0,d));W=ee,b=true,V.forEach(($e,Te)=>{$e.classList.remove(a),$e.style.strokeDashoffset=P==="reverse"?`${D[Te]*ee}`:`${D[Te]*(1-ee)}`,f&&($e.style.opacity=P==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return U()},refresh(){V.forEach((d,ee)=>{D[ee]=je(d),d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`;});}}}if(ar())return ct(lr());function cr(){let o=Math.max(1,we),a=0,g=0,J=false;function Ae(b){let W=true;if(y){let U=Math.min(1,Math.max(0,b/o)),d=z(U);Se=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=Ne(P==="reverse"?1-d:d),q?.(d),U<1&&(W=false);}else V.forEach((U,d)=>{let ee=d*N*o,$e=Math.min(1,Math.max(0,(b-ee)/o)),Te=z($e);U.style.strokeDashoffset=P==="reverse"?`${D[d]*Te}`:`${D[d]*(1-Te)}`,f&&(U.style.opacity=P==="reverse"?`${1-Te}`:`${Te}`),Me&&fe?U.style.stroke=Ue(Me,fe,Te):fe&&(U.style.stroke=fe),Q!==null&&se!==null?U.style.strokeWidth=`${Q+(se-Q)*Te}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&Z!==null?U.style.fillOpacity=`${ie+(Z-ie)*Te}`:Z!==null&&(U.style.fillOpacity=`${Z}`),M&&U.tagName.toLowerCase()==="path"&&pe[d]&&U.setAttribute("d",dt(pe[d],M,Te)),d===0&&(Se=Te,q?.(Te),e.style.setProperty("--scroll-draw-progress",String(Te))),$e<1&&(W=false);});if(T){let U=Math.min(1,Math.max(0,b/o)),d=z(U);for(let ee in T){let $e=parseFloat(ee);d>=$e&&!_e.has($e)&&(_e.add($e),T[ee]?.());}}return W}function Fe(b){if(j)return;let W=b-a;B||(B=true,F?.());let U=Ae(W);if(U&&!_){_=true,Ae(o*(1+Math.max(0,V.length-1)*N)),m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{a=performance.now(),B=false,_=false,_e.clear(),et(),k=requestAnimationFrame(Fe);},K));return}U||(k=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame(k),clearTimeout(Ve),a=performance.now(),g=0,j=false,B=false,_=false,ze=0,J=true,Se=0,_e.clear(),et(),k=requestAnimationFrame(Fe);}let E=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(oe&&_)?ke():!W.isIntersecting&&!oe&&!_&&(cancelAnimationFrame(k),clearTimeout(Ve),J=false);});},{root:ve??null,threshold:C,rootMargin:x}),H;function ge(){clearTimeout(H),H=setTimeout(()=>{V.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});},150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),Y>0?setTimeout(()=>E.observe(e),Y):E.observe(e),{destroy(){cancelAnimationFrame(k),clearTimeout(Ve),E.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(H);},replay(){ze=0,ke();},pause(){j||!J||(j=true,g=performance.now()-a,cancelAnimationFrame(k));},resume(){j&&(j=false,J=true,a=performance.now()-g,k=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Se=W,j=true,g=W*o,a=performance.now()-g,cancelAnimationFrame(k),Ae(g);},getProgress(){return Se},refresh(){clearTimeout(H),V.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});}}}if(xe)return ct(cr());St();function xt(){if(j||!Ge)return;let o=performance.now(),a=Ye();if(!We&&$===false&&a===bt){mt(a);return}We=false,bt=a;let g=u;if($!==false){let E=o-wt,H=E>0?Math.abs(a-(Je<0?a:Je))/E:0;g=u*Math.max(.2,1+H*(typeof $=="number"?$:1)*.04);}Je=a,wt=o;let J=R?ae===-1||a>=ae?"forward":"reverse":P;ae=a;let Ae=Ee-re,Fe=true,ke=Ae===0?0:(a-re)/Ae;if(isNaN(Be)||(Be<=0&&ke>0?O?.():Be>0&&ke<=0&&ue?.(),Be<1&&ke>=1?v?.():Be>=1&&ke<1&&L?.()),Be=ke,y){let E=z(ne(a,re,Ee,g));oe&&!R&&(ye=Math.max(ye,E),E=ye),Se=E,e.style.setProperty("--scroll-draw-progress",String(E));let H=J==="reverse"?1-E:E;e.style.clipPath=Ne(H),q?.(E),!B&&ne(a,re,Ee,g)>0&&(B=true,F?.()),E>=1&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{ye=-1,B=false,_=false,e.style.clipPath=Ne(0);},K))):E<1&&!oe&&(_=false),mt(a);return}if(V.forEach((E,H)=>{let ge=H*c*Ae,b=z(ne(a,re+ge,Ee+ge,g));oe&&!R&&(b=Re[H]=Math.max(Re[H]??ye,b)),E.style.strokeDashoffset=J==="reverse"?`${D[H]*b}`:`${D[H]*(1-b)}`,f&&(E.style.opacity=J==="reverse"?`${1-b}`:`${b}`),Me&&fe?E.style.stroke=Ue(Me,fe,b):fe&&(E.style.stroke=fe),Q!==null&&se!==null?E.style.strokeWidth=`${Q+(se-Q)*b}`:se!==null&&(E.style.strokeWidth=`${se}`),ie!==null&&Z!==null?E.style.fillOpacity=`${ie+(Z-ie)*b}`:Z!==null&&(E.style.fillOpacity=`${Z}`),M&&E.tagName.toLowerCase()==="path"&&pe[H]&&E.setAttribute("d",dt(pe[H],M,b)),H===0&&(Se=b,q?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),T){let E=z(ne(a,re,Ee,g));for(let H in T){let ge=parseFloat(H);E>=ge&&!_e.has(ge)&&(_e.add(ge),T[H]?.());}}!B&&ne(a,re,Ee,g)>0&&(B=true,F?.()),Fe&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{ye=-1,Re=[],B=false,_=false,_e.clear(),et(),We=true;},K))):!Fe&&!oe&&(_=false),mt(a);}function ut(o){return o>=Ee&&o<h}function mt(o){de||ut(o)?k=requestAnimationFrame(xt):Ge=false;}function ft(){return de||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,k=requestAnimationFrame(function(){xt();}));}function rt(){Ge=false,cancelAnimationFrame(k);}let pt=new IntersectionObserver(o=>{o.forEach(a=>{de=a.isIntersecting,de&&!j?(We=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:ve??null,threshold:C,rootMargin:x});function Mt(){V.forEach((o,a)=>{D[a]=je(o),o.style.strokeDasharray=`${D[a]}`;}),St(),We=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let ur=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame(k),clearTimeout(Ve),rt(),pt.disconnect(),ur(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),ht();},replay(){ye=-1,Re=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Se=0,_e.clear(),clearTimeout(Ve),et(),We=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,We=true,ft()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Se=a,ye=a,Re=[],j=true,rt(),ir(a,P),We=true;},getProgress(){return Se},refresh(){clearTimeout(nt),Mt(),ft()&&!j&&tt();}},()=>({tStart:re,tEnd:Ee}))}var Vt=new WeakMap,Tr=0;function gt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Vt.get(r);return t===void 0&&Vt.set(r,t=++Tr),`el#${t}`}return r})}function _t(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...s)=>n()[t]?.(...s));return r}function xr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Wt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:t[1],nums:s,units:i});}return n}function Mr(e,n,r){let t=Wt(e),s=Wt(n);return t.length===0||t.length!==s.length?r<1?e:n:t.map((i,l)=>{let u=s[l];return i.fn!==u.fn||i.nums.length!==u.nums.length?r<1?`${i.fn}(${i.nums.map((f,p)=>`${f}${i.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,p)=>`${f}${u.units[p]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,p)=>`${f+(u.nums[p]-f)*r}${i.units[p]}`).join(", ")})`}).join(" ")}function qt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),s=String(n);if(xr(t))return Ue(t,s,r);if(t.includes("("))return Mr(t,s,r);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let u=parseFloat(i[1]),f=parseFloat(l[1]);return `${u+(f-u)*r}${i[2]||l[2]}`}return r<1?t:s}function Lr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),$r=0,Bt="--scroll-draw-progress";function Pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Gt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:u=false,axis:f="y",scrollContainer:p,native:S=true,velocityScale:N=false,respectReducedMotion:P=true,triggerElement:oe,onProgress:Ce,onComplete:G,onEnter:Le,onLeave:R,onEnterBack:Y,onLeaveBack:X}=n,A=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:le[i]??le["ease-out"],T=he(s.start??"top bottom"),$=he(s.end??"bottom top"),C=oe??e,x=typeof p=="string"?document.querySelector(p):p??null,w=Object.entries(t).map(([c,h])=>({prop:Lr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function K(){let c=window.getComputedStyle(e);for(let h of w)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function M(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let te=new Map;for(let c of [...w.map(h=>h.prop),Bt])te.set(c,e.style.getPropertyValue(c));function xe(){for(let[c,h]of te)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(A)return M(),G?.(),{...r,destroy:xe,getProgress:()=>1};K();let we=typeof i=="string"?st(i):null;function ce(){if(!S||!Pr()||!we||f!=="y"||x||C!==e||u||l!==1||Ce||G||Le||R||Y||X||N!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Ar.has(c.prop))return false;return true}function q(){let c=`ssd-a-${++$r}`,h=w.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=w.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${we};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let k=()=>f==="x"?window.scrollX:window.scrollY,de=()=>f==="x"?window.innerWidth:window.innerHeight,ye=()=>{let ae=e.getBoundingClientRect();return Pe({top:ae.top,height:ae.height},k(),de(),T,$)};Oe(e,{type:"animate",getProgress:()=>Re.getProgress(),getTrigger:ye});let Re={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",xe(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Se of w)e.style.setProperty(Se.prop,qt(Se.from,Se.to,j));},getProgress(){let{tStart:ae,tEnd:j}=ye();return I(ne(k(),ae,j,l))}};return Re}if(ce())return q();let F=0,m=0,O=0,v=false,L=false,ue=-1,y=0,z=false,me=NaN,He=-1,ve=0,Me=()=>x?f==="x"?x.scrollLeft:x.scrollTop:f==="x"?window.scrollX:window.scrollY,fe=()=>x?f==="x"?x.clientWidth:x.clientHeight:f==="x"?window.innerWidth:window.innerHeight,Q=C===e?w:[],se=false;function ie(){let c=e.style,h=Q.map(de=>c.getPropertyValue(de.prop)),_=c.transition;Q.length&&(c.transition="none"),Q.forEach(de=>c.setProperty(de.prop,te.get(de.prop)??""));let B=ot(C,x,f);Q.forEach((de,ye)=>c.setProperty(de.prop,h[ye])),Q.length&&(e.offsetWidth,c.transition=_);let k=Pe(B,B.scroll,fe(),T,$);se&&Math.abs(k.tStart-F)<1&&Math.abs(k.tEnd-m)<1||(se=true,F=k.tStart,m=k.tEnd);}function Z(c){e.style.setProperty(Bt,String(c));for(let h of w)e.style.setProperty(h.prop,qt(h.from,h.to,c));Ce?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?Le?.():me>0&&c<=0&&X?.(),me<1&&c>=1?R?.():me>=1&&c<1&&Y?.(),me=c;}function V(){if(!v||L)return;let c=performance.now(),h=Me(),_=l;if(N!==false){let de=c-ve,ye=de>0?Math.abs(h-(He<0?h:He))/de:0;_=l*Math.max(.2,1+ye*(typeof N=="number"?N:1)*.04);}He=h,ve=c;let B=m===F?0:(h-F)/(m-F);Ne(B);let k=I(ne(h,F,m,_));u&&(ue=Math.max(ue,k),k=ue),y=k,Z(k),k>=1&&!z?(z=true,G?.()):k<1&&!u&&(z=false),O=requestAnimationFrame(V);}ie(),m===F&&be("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=I(ne(Me(),F,m,l));u&&c>0&&(ue=c),y=c,Z(c);}let D=new IntersectionObserver(c=>{c.forEach(h=>{v=h.isIntersecting,v&&!L?O=requestAnimationFrame(V):cancelAnimationFrame(O);});},{root:x??null}),pe;function re(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",re),window.addEventListener("orientationchange",re);let Ee=De([C],re);return D.observe(e),Oe(e,{type:"animate",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:m})}),{destroy(){cancelAnimationFrame(O),D.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),Ee(),clearTimeout(pe),xe(),Ie(e);},replay(){ue=-1,z=false,y=0,L=false,Z(0);},pause(){L=true,cancelAnimationFrame(O);},resume(){L&&(L=false,v&&(O=requestAnimationFrame(V)));},seek(c){let h=Math.min(1,Math.max(0,c));y=h,ue=h,L=true,cancelAnimationFrame(O),Z(h);},getProgress(){return y},refresh(){ie();}}}var yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,n){if(typeof window>"u")return yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollCounter: element not found:",e),yt;let t=r,{from:s=0,to:i,format:l,easing:u="ease-out",trigger:f={},once:p=true,decimals:S,onComplete:N}=n,P=S!==void 0?m=>m.toFixed(S):l??(m=>String(Math.round(m))),oe=typeof u=="function"?u:le[u]??le["ease-out"],Ce=he(f.start??"top 80%"),G=he(f.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(i),N?.(),yt;let R=0,Y=0,X=false,A=0,I=false,T=false,$=-1,C=0,x=false,w=()=>window.scrollY,K=()=>window.innerHeight;function M(){let m=t.getBoundingClientRect(),O=Pe({top:m.top,height:m.height},w(),K(),Ce,G);X&&Math.abs(O.tStart-R)<1&&Math.abs(O.tEnd-Y)<1||(X=true,R=O.tStart,Y=O.tEnd);}function te(m){t.textContent=P(s+(i-s)*m),t.style.setProperty("--scroll-draw-progress",String(m));}function xe(){if(!I||T)return;let m=oe(ne(w(),R,Y,1));p&&($=Math.max($,m),m=$),C=m,te(m),m>=1&&!x?(x=true,N?.()):m<1&&!p&&(x=false),A=requestAnimationFrame(xe);}M();{let m=oe(ne(w(),R,Y,1));p&&m>0&&($=m),C=m,te(m);}let we=new IntersectionObserver(m=>{m.forEach(O=>{I=O.isIntersecting,I&&!T?A=requestAnimationFrame(xe):cancelAnimationFrame(A);});}),ce;function q(){clearTimeout(ce),ce=setTimeout(M,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let F=De([t],q);return we.observe(t),Oe(t,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:R,tEnd:Y})}),{destroy(){cancelAnimationFrame(A),we.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),F(),clearTimeout(ce),Ie(t);},replay(){$=-1,x=false,C=0,T=false,te(0);},pause(){T=true,cancelAnimationFrame(A);},resume(){T&&(T=false,I&&(A=requestAnimationFrame(xe)));},seek(m){let O=Math.min(1,Math.max(0,m));C=O,$=O,T=true,cancelAnimationFrame(A),te(O);},getProgress(){return C}}}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n={}){if(typeof window>"u")return Ut;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),Ut;let t=r,{trigger:s={},easing:i="linear",once:l=false,axis:u="y",preload:f="auto",triggerElement:p,onReady:S,onComplete:N,onProgress:P}=n,oe=p??t,Ce=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:le[i]??le.linear,Le=he(s.start??"top top"),R=he(s.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=f);let Y=n.from??0,X=n.to,A=0,I=0,T=0,$=false,C=false,x=-1,w=0,K=false,M=false,te=()=>u==="x"?window.scrollX:window.scrollY,xe=()=>u==="x"?window.innerWidth:window.innerHeight;function we(){let y=oe.getBoundingClientRect(),z=u==="x"?y.left:y.top,me=u==="x"?y.width:y.height,He=Pe({top:z,height:me},te(),xe(),Le,R);A=He.tStart,I=He.tEnd,M&&I===A&&be("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function q(y){if(!M)return;let z=X??t.duration??0,me=Y+(z-Y)*y;me!==ce&&(ce=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(y)),P?.(y);}function F(){if(!$||C||!M||Ce)return;let y=G(ne(te(),A,I,1));l&&(x=Math.max(x,y),y=x),w=y,q(y),y>=1&&!K?(K=true,N?.()):y<1&&!l&&(K=false),T=requestAnimationFrame(F);}function m(){if(M=true,X===void 0&&(X=t.duration),Ce){q(1),S?.();return}we(),S?.(),$&&!C&&(T=requestAnimationFrame(F));}t.readyState>=1?m():t.addEventListener("loadedmetadata",m,{once:true}),M||we();let O=new IntersectionObserver(y=>{y.forEach(z=>{$=z.isIntersecting,$&&!C&&M?T=requestAnimationFrame(F):cancelAnimationFrame(T);});}),v;function L(){clearTimeout(v),v=setTimeout(we,150);}window.addEventListener("resize",L),window.addEventListener("orientationchange",L);let ue=De([oe],L);return O.observe(t),Oe(t,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:A,tEnd:I})}),{destroy(){cancelAnimationFrame(T),O.disconnect(),t.removeEventListener("loadedmetadata",m),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),ue(),clearTimeout(v),Ie(t);},replay(){x=-1,K=false,w=0,C=false,ce=NaN,q(0);},pause(){C=true,cancelAnimationFrame(T);},resume(){C&&(C=false,$&&M&&(T=requestAnimationFrame(F)));},seek(y){let z=Math.min(1,Math.max(0,y));w=z,x=z,C=true,cancelAnimationFrame(T),ce=NaN,q(z);},getProgress(){return w}}}function Xt(e,n){let r=document.createElement("span");r.textContent=n,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 Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Cr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Kt(e){let n=Zt(e),r=new Map;for(let i of n){let l=i.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(i);}let t=[],s=Array.from(r.keys()).sort((i,l)=>i-l);for(let i of s){let l=r.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((f,p)=>{let S=f.nextElementSibling;u.appendChild(f),p<l.length-1&&S&&S.style.whiteSpace==="pre"&&u.appendChild(S);}),t.push(u);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function kr(e,n,r,t){if(r<=1||t===0)return e;let s=(r-1)*t,i=n*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Or(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,n={}){if(typeof window>"u")return Qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollText: element not found:",e),Qt;let t=r,{split:s="words",stagger:i=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:f={},once:p=true,onComplete:S}=n,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof l=="function"?l:le[l]??le["ease-out"],oe=he(f.start??"top 85%"),Ce=he(f.end??"top 40%"),G=t.innerHTML,Le=t.textContent??"",R;s==="chars"?R=Cr(t):s==="lines"?R=Kt(t):R=Zt(t),Xt(t,Le);let Y=R.length;function X(v,L){u?.opacity!==void 0&&(v.style.opacity=String(u.opacity+(1-u.opacity)*L));let ue=Or(L,u);ue&&(v.style.transform=ue);}function A(v){t.style.setProperty("--scroll-draw-progress",String(v)),R.forEach((L,ue)=>{let y=P(kr(v,ue,Y,i));X(L,y);});}if(N)return A(1),S?.(),{destroy(){t.innerHTML=G;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let I=0,T=0,$=0,C=false,x=false,w=-1,K=0,M=false,te=()=>window.scrollY,xe=()=>window.innerHeight;function we(){let v=t.getBoundingClientRect(),L=Pe({top:v.top,height:v.height},te(),xe(),oe,Ce);I=L.tStart,T=L.tEnd;}function ce(){if(!C||x)return;let v=ne(te(),I,T,1);p&&(w=Math.max(w,v),v=w),K=v,A(v),v>=1&&!M?(M=true,S?.()):v<1&&!p&&(M=false),$=requestAnimationFrame(ce);}we();let q=new IntersectionObserver(v=>{v.forEach(L=>{C=L.isIntersecting,C&&!x?$=requestAnimationFrame(ce):cancelAnimationFrame($);});}),F;function m(){clearTimeout(F),F=setTimeout(()=>{if(s==="lines"){let v=K;t.innerHTML=G,R=Kt(t),Xt(t,Le),A(v);}we();},150);}window.addEventListener("resize",m),window.addEventListener("orientationchange",m);let O=De([t],m);return q.observe(t),Oe(t,{type:"text",getProgress:()=>K,getTrigger:()=>({tStart:I,tEnd:T})}),{destroy(){cancelAnimationFrame($),q.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),O(),clearTimeout(F),t.innerHTML=G,Ie(t);},replay(){w=-1,M=false,K=0,x=false,A(0);},pause(){x=true,cancelAnimationFrame($);},resume(){x&&(x=false,C&&($=requestAnimationFrame(ce)));},seek(v){let L=Math.min(1,Math.max(0,v));K=L,w=L,x=true,cancelAnimationFrame($),A(L);},getProgress(){return K}}}var qe=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,r){return this.destroy(),this.el=n,this.latest=r,this.key=gt(r),this.instance=this.create(n,_t(r,()=>this.latest)),this}update(n){return this.el?gt(n)!==this.key?this.init(this.el,n):(this.latest=n,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(n){return this.instance?.seek(n),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},er=class extends qe{constructor(){super(zt);}init(n,r={}){return super.init(n,r)}},tr=class extends qe{constructor(){super(Gt);}},rr=class extends qe{constructor(){super(jt);}},nr=class extends qe{constructor(){super(Yt);}init(n,r={}){return super.init(n,r)}},or=class extends qe{constructor(){super(Jt);}init(n,r={}){return super.init(n,r)}};exports.EngineRef=qe;exports.ScrollAnimateRef=tr;exports.ScrollCounterRef=rr;exports.ScrollDrawRef=er;exports.ScrollTextRef=or;exports.ScrollVideoRef=nr;
|
|
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;
|
package/dist/angular/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
|
|
2
|
-
import { S as ScrollAnimateOptions } from '../engine-
|
|
2
|
+
import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
|
|
3
3
|
import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
|
|
4
4
|
import { ScrollVideoOptions } from '../video/index.mjs';
|
|
5
5
|
import { ScrollTextOptions } from '../text/index.mjs';
|
package/dist/angular/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
|
|
2
|
-
import { S as ScrollAnimateOptions } from '../engine-
|
|
2
|
+
import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
|
|
3
3
|
import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
|
|
4
4
|
import { ScrollVideoOptions } from '../video/index.js';
|
|
5
5
|
import { ScrollTextOptions } from '../text/index.js';
|
package/dist/angular/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-
|
|
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};
|
package/dist/aos/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});function
|
|
2
|
-
`)}var a={...
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});function $(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function A(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=d=>e(!!d.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let o=t;return o.addListener?.(n),()=>o.removeListener?.(n)}var B=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function z(e,...t){B&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var _={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},G={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},E="svg-scroll-draw-aos",i=(e,t)=>`translate3d(${e},${t},0)`,W=[["fade-up",i("0","100px")],["fade-down",i("0","-100px")],["fade-right",i("-100px","0")],["fade-left",i("100px","0")],["fade-up-right",i("-100px","100px")],["fade-up-left",i("100px","100px")],["fade-down-right",i("-100px","-100px")],["fade-down-left",i("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${i("0","100px")} scale(.6)`],["zoom-in-down",`${i("0","-100px")} scale(.6)`],["zoom-in-right",`${i("-100px","0")} scale(.6)`],["zoom-in-left",`${i("100px","0")} scale(.6)`],["zoom-out-up",`${i("0","100px")} scale(1.2)`],["zoom-out-down",`${i("0","-100px")} scale(1.2)`],["zoom-out-right",`${i("-100px","0")} scale(1.2)`],["zoom-out-left",`${i("100px","0")} scale(1.2)`],["slide-up",i("0","100%")],["slide-down",i("0","-100%")],["slide-right",i("-100%","0")],["slide-left",i("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function X(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...W.map(([o,d])=>`[data-aos=${o}]{transform:${d}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
2
|
+
`)}var a={..._},s=[],l=false,b=0,L,v=null,c=null,m=false,p=null,C=()=>typeof window<"u"&&typeof document<"u";function N(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var D=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function u(e,t){return e.getAttribute(`data-aos-${t}`)}function S(e,t,n){let o=u(e,t);return o==="true"?true:o==="false"?false:n}function R(e,t){let n=u(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function Z(e){let t=window.innerHeight,n=u(e,"anchor-placement"),o=R(e,n),d=u(e,"anchor"),M=d?document.querySelector(d):null;d&&!M&&z(`aos: data-aos-anchor="${d}" matches nothing; using the element itself`);let x=M||e,f=D(x),r=N(x)-t;switch(n||a.anchorPlacement){case "center-bottom":r+=f/2;break;case "bottom-bottom":r+=f;break;case "top-center":r+=t/2;break;case "center-center":r+=t/2+f/2;break;case "bottom-center":r+=t/2+f;break;case "top-top":r+=t;break;case "bottom-top":r+=t+f;break;case "center-top":r+=t+f/2;break;}return r+o}function j(e){return N(e)+D(e)-R(e,null)}function U(e){let t=u(e,"duration")??String(a.duration),n=u(e,"delay")??String(a.delay),o=u(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",G[o]??o);}function H(){s=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=s.find(n=>n.node===e);return {node:e,in:0,out:0,once:S(e,"once",a.once),mirror:S(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:u(e,"id")}});for(let e of s)U(e.node),e.node.classList.add(a.initClassName);}function k(){for(let e of s)e.in=Z(e.node),e.out=j(e.node);}function q(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function O(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),q("in",e));}function T(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),q("out",e));}function g(){b=0;let e=window.scrollY;for(let t of s){if(m){O(t);continue}t.mirror&&!t.once&&e>t.out?T(t):e>t.in?O(t):t.once||T(t);}}var I=()=>{b||(b=requestAnimationFrame(g));};function y(){clearTimeout(L),L=setTimeout(h,50);}var P=()=>h();function Q(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function F(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function J(){if(document.getElementById(E))return;let e=document.createElement("style");e.id=E,e.textContent=X(a.animatedClassName),document.head.appendChild(e);}function w(){if(!l){if(l=true,c=null,H(),m)for(let e of s)e.node.setAttribute("data-aos-instant","");k(),g(),window.addEventListener("scroll",I,{passive:true}),window.addEventListener("resize",y),window.addEventListener("orientationchange",y),window.addEventListener("load",P),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(v=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&V();}),v.observe(document.documentElement,{childList:true,subtree:true}));}}function K(e={}){if(!C())return [];if((l||c)&&Y(),a={..._,...e},Q())return F(),[];m=$(),m||(p=A(n=>{if(n&&(p?.(),p=null,m=true,!!l)){for(let o of s)o.node.setAttribute("data-aos-instant","");g();}})),J();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)w();else if(a.startEvent==="load"&&document.readyState==="complete")w();else {let n=a.startEvent==="load"?window:document,o=()=>w();n.addEventListener(a.startEvent,o,{once:true}),c={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function h(){l&&(k(),g());}function V(){if(l){if(Q()){F();return}H(),h();}}function Y(){if(C()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout(L),window.removeEventListener("scroll",I),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),window.removeEventListener("load",P),v?.disconnect(),v=null,p?.(),p=null;for(let e of s)e.node.removeAttribute("data-aos-instant");s=[],l=false,document.getElementById(E)?.remove();}}var ee={init:K,refresh:h,refreshHard:V,destroy:Y},se=ee;exports.default=se;exports.destroy=Y;exports.init=K;exports.refresh=h;exports.refreshHard=V;
|
package/dist/aos/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as default,d as destroy,a as init,b as refresh,c as refreshHard}from'../chunk-
|
|
1
|
+
export{e as default,d as destroy,a as init,b as refresh,c as refreshHard}from'../chunk-JCXMBI4G.mjs';import'../chunk-AJ22VSHC.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-LFSU6LR3.mjs';
|
package/dist/aos/react/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react');function O(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var
|
|
3
|
-
`)}var a={...
|
|
2
|
+
'use strict';var react=require('react');function O(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function S(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=d=>e(!!d.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let o=t;return o.addListener?.(n),()=>o.removeListener?.(n)}var X=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function $(e,...t){X&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var C={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},Z={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},L="svg-scroll-draw-aos",r=(e,t)=>`translate3d(${e},${t},0)`,j=[["fade-up",r("0","100px")],["fade-down",r("0","-100px")],["fade-right",r("-100px","0")],["fade-left",r("100px","0")],["fade-up-right",r("-100px","100px")],["fade-up-left",r("100px","100px")],["fade-down-right",r("-100px","-100px")],["fade-down-left",r("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${r("0","100px")} scale(.6)`],["zoom-in-down",`${r("0","-100px")} scale(.6)`],["zoom-in-right",`${r("-100px","0")} scale(.6)`],["zoom-in-left",`${r("100px","0")} scale(.6)`],["zoom-out-up",`${r("0","100px")} scale(1.2)`],["zoom-out-down",`${r("0","-100px")} scale(1.2)`],["zoom-out-right",`${r("-100px","0")} scale(1.2)`],["zoom-out-left",`${r("100px","0")} scale(1.2)`],["slide-up",r("0","100%")],["slide-down",r("0","-100%")],["slide-right",r("-100%","0")],["slide-left",r("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function U(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...j.map(([o,d])=>`[data-aos=${o}]{transform:${d}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
3
|
+
`)}var a={...C},s=[],l=false,b=0,A,v=null,c=null,m=false,p=null,N=()=>typeof window<"u"&&typeof document<"u";function D(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var R=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function u(e,t){return e.getAttribute(`data-aos-${t}`)}function z(e,t,n){let o=u(e,t);return o==="true"?true:o==="false"?false:n}function k(e,t){let n=u(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function K(e){let t=window.innerHeight,n=u(e,"anchor-placement"),o=k(e,n),d=u(e,"anchor"),x=d?document.querySelector(d):null;d&&!x&&$(`aos: data-aos-anchor="${d}" matches nothing; using the element itself`);let M=x||e,f=R(M),i=D(M)-t;switch(n||a.anchorPlacement){case "center-bottom":i+=f/2;break;case "bottom-bottom":i+=f;break;case "top-center":i+=t/2;break;case "center-center":i+=t/2+f/2;break;case "bottom-center":i+=t/2+f;break;case "top-top":i+=t;break;case "bottom-top":i+=t+f;break;case "center-top":i+=t+f/2;break;}return i+o}function J(e){return D(e)+R(e)-k(e,null)}function ee(e){let t=u(e,"duration")??String(a.duration),n=u(e,"delay")??String(a.delay),o=u(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",Z[o]??o);}function H(){s=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=s.find(n=>n.node===e);return {node:e,in:0,out:0,once:z(e,"once",a.once),mirror:z(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:u(e,"id")}});for(let e of s)ee(e.node),e.node.classList.add(a.initClassName);}function I(){for(let e of s)e.in=K(e.node),e.out=J(e.node);}function q(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function T(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),q("in",e));}function _(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),q("out",e));}function g(){b=0;let e=window.scrollY;for(let t of s){if(m){T(t);continue}t.mirror&&!t.once&&e>t.out?_(t):e>t.in?T(t):t.once||_(t);}}var P=()=>{b||(b=requestAnimationFrame(g));};function y(){clearTimeout(A),A=setTimeout(h,50);}var Q=()=>h();function F(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function V(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function te(){if(document.getElementById(L))return;let e=document.createElement("style");e.id=L,e.textContent=U(a.animatedClassName),document.head.appendChild(e);}function E(){if(!l){if(l=true,c=null,H(),m)for(let e of s)e.node.setAttribute("data-aos-instant","");I(),g(),window.addEventListener("scroll",P,{passive:true}),window.addEventListener("resize",y),window.addEventListener("orientationchange",y),window.addEventListener("load",Q),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(v=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&Y();}),v.observe(document.documentElement,{childList:true,subtree:true}));}}function ne(e={}){if(!N())return [];if((l||c)&&B(),a={...C,...e},F())return V(),[];m=O(),m||(p=S(n=>{if(n&&(p?.(),p=null,m=true,!!l)){for(let o of s)o.node.setAttribute("data-aos-instant","");g();}})),te();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)E();else if(a.startEvent==="load"&&document.readyState==="complete")E();else {let n=a.startEvent==="load"?window:document,o=()=>E();n.addEventListener(a.startEvent,o,{once:true}),c={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function h(){l&&(I(),g());}function Y(){if(l){if(F()){V();return}H(),h();}}function B(){if(N()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout(A),window.removeEventListener("scroll",P),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),window.removeEventListener("load",Q),v?.disconnect(),v=null,p?.(),p=null;for(let e of s)e.node.removeAttribute("data-aos-instant");s=[],l=false,document.getElementById(L)?.remove();}}var oe={init:ne,refresh:h,refreshHard:Y,destroy:B},w=oe;function ae(e={},t){let n=react.useRef(e);n.current=e,react.useEffect(()=>(w.init(n.current),()=>w.destroy()),[]);let o=react.useRef(true);react.useEffect(()=>{if(o.current){o.current=false;return}w.refreshHard();},[t]);}function pe({refreshKey:e,...t}){return ae(t,e),null}exports.AOSInit=pe;exports.useAOS=ae;
|
package/dist/aos/react/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {e}from'../../chunk-
|
|
2
|
+
import {e}from'../../chunk-JCXMBI4G.mjs';import'../../chunk-AJ22VSHC.mjs';import'../../chunk-5PJEKEEP.mjs';import'../../chunk-LFSU6LR3.mjs';import {useRef,useEffect}from'react';function i(r={},n){let e$1=useRef(r);e$1.current=r,useEffect(()=>(e.init(e$1.current),()=>e.destroy()),[]);let o=useRef(true);useEffect(()=>{if(o.current){o.current=false;return}e.refreshHard();},[n]);}function O({refreshKey:r,...n}){return i(n,r),null}export{O as AOSInit,i as useAOS};
|