svg-scroll-draw 2.23.4 → 2.23.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +21 -6
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +3 -3
  4. package/dist/angular/index.d.ts +3 -3
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +2 -2
  7. package/dist/astro/index.d.mts +3 -3
  8. package/dist/astro/index.d.ts +3 -3
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +190 -265
  11. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  12. package/dist/{chunk-DSFD227B.mjs → chunk-22B37AWY.mjs} +1 -1
  13. package/dist/{chunk-YNNA33A5.mjs → chunk-BSW7W2Y5.mjs} +1 -1
  14. package/dist/{chunk-XTPAW6XR.mjs → chunk-CZLUBJAI.mjs} +1 -1
  15. package/dist/chunk-K6VATIJH.mjs +3 -0
  16. package/dist/chunk-NV6YTPHI.mjs +1 -0
  17. package/dist/chunk-NYQJPPMP.mjs +1 -0
  18. package/dist/{chunk-ZNCZYV3Q.mjs → chunk-OSGWGHQJ.mjs} +1 -1
  19. package/dist/chunk-PAGN26EH.mjs +1 -0
  20. package/dist/chunk-THPTANES.mjs +1 -0
  21. package/dist/{chunk-OJFWQ6CU.mjs → chunk-V3Z6G5JE.mjs} +1 -1
  22. package/dist/chunk-VJ5ZU55P.mjs +1 -0
  23. package/dist/chunk-XNM3VKEK.mjs +1 -0
  24. package/dist/cinematic/index.cjs +2 -2
  25. package/dist/cinematic/index.mjs +1 -1
  26. package/dist/{engine-B7UpB4fT.d.ts → engine-6VsjEwzb.d.ts} +1 -1
  27. package/dist/{engine-o1VSQ1lX.d.mts → engine-BLWKCfxC.d.mts} +1 -1
  28. package/dist/group/index.cjs +3 -3
  29. package/dist/group/index.d.mts +3 -3
  30. package/dist/group/index.d.ts +3 -3
  31. package/dist/group/index.mjs +1 -1
  32. package/dist/horizontal/index.cjs +1 -1
  33. package/dist/horizontal/index.d.mts +1 -1
  34. package/dist/horizontal/index.d.ts +1 -1
  35. package/dist/horizontal/index.mjs +1 -1
  36. package/dist/{index-D3o4vT3e.d.ts → index-BN8yKeQ3.d.ts} +1 -1
  37. package/dist/{index-BY-CNE8c.d.mts → index-DAiRJgtF.d.mts} +2 -2
  38. package/dist/{index-CdaBYn3A.d.mts → index-DVjblK_4.d.mts} +1 -1
  39. package/dist/{index-DqXXiDIk.d.ts → index-hSQqLVbg.d.ts} +2 -2
  40. package/dist/index.cjs +4 -4
  41. package/dist/index.d.mts +6 -6
  42. package/dist/index.d.ts +6 -6
  43. package/dist/index.mjs +1 -1
  44. package/dist/nuxt/index.cjs +3 -3
  45. package/dist/nuxt/index.d.mts +3 -3
  46. package/dist/nuxt/index.d.ts +3 -3
  47. package/dist/nuxt/index.mjs +1 -1
  48. package/dist/progress/index.cjs +1 -1
  49. package/dist/progress/index.d.mts +1 -1
  50. package/dist/progress/index.d.ts +1 -1
  51. package/dist/progress/index.mjs +1 -1
  52. package/dist/react/index.cjs +2 -2
  53. package/dist/react/index.d.mts +3 -3
  54. package/dist/react/index.d.ts +3 -3
  55. package/dist/react/index.mjs +1 -1
  56. package/dist/reveal/index.cjs +1 -1
  57. package/dist/reveal/index.d.mts +1 -1
  58. package/dist/reveal/index.d.ts +1 -1
  59. package/dist/reveal/index.mjs +1 -1
  60. package/dist/{scroll-draw-DsBMkwrX.d.ts → scroll-draw-BsU_Ohmu.d.ts} +1 -1
  61. package/dist/{scroll-draw-Dej-GIRP.d.mts → scroll-draw-Fzir8hlU.d.mts} +1 -1
  62. package/dist/snap/index.cjs +1 -1
  63. package/dist/snap/index.d.mts +1 -1
  64. package/dist/snap/index.d.ts +1 -1
  65. package/dist/snap/index.mjs +1 -1
  66. package/dist/solid/index.cjs +3 -3
  67. package/dist/solid/index.d.mts +3 -3
  68. package/dist/solid/index.d.ts +3 -3
  69. package/dist/solid/index.mjs +1 -1
  70. package/dist/svelte/index.cjs +3 -3
  71. package/dist/svelte/index.d.mts +3 -3
  72. package/dist/svelte/index.d.ts +3 -3
  73. package/dist/svelte/index.mjs +1 -1
  74. package/dist/text/index.cjs +1 -1
  75. package/dist/text/index.d.mts +1 -1
  76. package/dist/text/index.d.ts +1 -1
  77. package/dist/text/index.mjs +1 -1
  78. package/dist/timeline/index.cjs +9 -9
  79. package/dist/timeline/index.d.mts +1 -1
  80. package/dist/timeline/index.d.ts +1 -1
  81. package/dist/timeline/index.mjs +8 -8
  82. package/dist/{types-MswK0erX.d.mts → types-9bcJdVcg.d.mts} +6 -2
  83. package/dist/{types-MswK0erX.d.ts → types-9bcJdVcg.d.ts} +6 -2
  84. package/dist/video/index.cjs +1 -1
  85. package/dist/video/index.d.mts +1 -1
  86. package/dist/video/index.d.ts +1 -1
  87. package/dist/video/index.mjs +1 -1
  88. package/dist/vue/index.cjs +3 -3
  89. package/dist/vue/index.d.mts +3 -3
  90. package/dist/vue/index.d.ts +3 -3
  91. package/dist/vue/index.mjs +1 -1
  92. package/dist/web-component/index.cjs +3 -3
  93. package/dist/web-component/index.mjs +1 -1
  94. package/package.json +8 -2
  95. package/dist/chunk-6TWFLRUB.mjs +0 -3
  96. package/dist/chunk-A4JCC3QQ.mjs +0 -1
  97. package/dist/chunk-DM6EDKWH.mjs +0 -1
  98. package/dist/chunk-I73SOXBN.mjs +0 -1
  99. package/dist/chunk-NLPSVYFP.mjs +0 -1
  100. package/dist/chunk-OPXWNJBG.mjs +0 -1
  101. package/dist/chunk-QFSTKVA3.mjs +0 -1
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$3,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$6}from'../chunk-QFSTKVA3.mjs';import {a as a$7}from'../chunk-NLPSVYFP.mjs';import {a as a$5}from'../chunk-I73SOXBN.mjs';import {a as a$4}from'../chunk-OPXWNJBG.mjs';import {b as b$2}from'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import {a as a$2}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import {a,d,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import te,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function ee(o,t={}){let[n,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof o=="string"?document.querySelector(o):o.current;if(!i)return;let l=i,{axis:c$1="y",scrollContainer:u,trigger:v={}}=r.current,a$3=typeof u=="string"?document.querySelector(u):u??null,X=a(v.start||"top bottom"),$=a(v.end||"bottom top"),x=0,P=0,E=false,f=0;function G(){return a$3?c$1==="x"?a$3.scrollLeft:a$3.scrollTop:c$1==="x"?window.scrollX:window.scrollY}function J(){return a$3?c$1==="x"?a$3.clientWidth:a$3.clientHeight:c$1==="x"?window.innerWidth:window.innerHeight}function A(){let m=a$2(l,a$3,c$1);({tStart:x,tEnd:P}=c(m,m.scroll,J(),X,$));}function h(){if(!E)return;let{speed:m=1,easing:g="linear",once:Y=false}=r.current,B=typeof g=="function"?g:d$1[g]??d$1.linear,D=b(G(),x,P,m),Q=B(Y?s.current=Math.max(s.current,D):D);e(Q),f=requestAnimationFrame(h);}let O=new IntersectionObserver(m=>{m.forEach(g=>{E=g.isIntersecting,E?f=requestAnimationFrame(h):cancelAnimationFrame(f);});},{root:a$3??null,threshold:0});A(),O.observe(l);let b$1;function d$2(){clearTimeout(b$1),b$1=setTimeout(A,150);}window.addEventListener("resize",d$2),window.addEventListener("orientationchange",d$2);let K=d([l],d$2),C=a$1(m=>{m&&(C(),cancelAnimationFrame(f),O.disconnect(),e(1));});return ()=>{C(),K(),cancelAnimationFrame(f),clearTimeout(b$1),O.disconnect(),window.removeEventListener("resize",d$2),window.removeEventListener("orientationchange",d$2);}},[]),n}function S(o,t,n){let e=useRef(t);e.current=t;let r=a$3(t);useEffect(()=>{if(!o.current)return;let s=n(o.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var oe=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function y(o){let t={},n={};for(let[e,r]of Object.entries(o))(oe.test(e)?n:t)[e]=r;return [t,n]}function we({children:o,className:t,style:n,...e}){let r=useRef(null),[s,i]=y(e);return S(r,s,b$2),jsx("div",{ref:r,className:t,style:n,...i,children:o})}function Ee({children:o,className:t,style:n,...e}){let r=useRef(null),[s,i]=y(e);return S(r,s,a$4),jsx("div",{ref:r,className:t,style:n,...i,children:o})}function Oe({className:o,style:t,...n}){let e=useRef(null),[r,s]=y(n);return S(e,r,a$5),jsx("span",{ref:e,className:o,style:t,...s})}function be({src:o,poster:t,className:n,style:e,muted:r=true,playsInline:s=true,...i}){let l=useRef(null),[c,u]=y(i);return S(l,c,a$6),jsx("video",{...u,ref:l,src:o,poster:t,className:n,style:e,muted:r,playsInline:s,preload:c.preload??"auto"})}function Te({children:o,as:t="p",className:n,style:e,...r}){let s=useRef(null),[i,l]=y(r);return S(s,i,a$7),te.createElement(t,{...l,ref:s,className:n,style:e},o)}export{Ee as ScrollAnimate,Oe as ScrollCounter,we as ScrollDraw,Te as ScrollText,be as ScrollVideo,ee as useScrollDrawProgress};
2
+ import {a as a$3,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$6}from'../chunk-NYQJPPMP.mjs';import {a as a$7}from'../chunk-XNM3VKEK.mjs';import {a as a$5}from'../chunk-PAGN26EH.mjs';import {a as a$4}from'../chunk-VJ5ZU55P.mjs';import {b as b$2}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import {a as a$2}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import {a,e,b,c}from'../chunk-NV6YTPHI.mjs';import {d as d$1}from'../chunk-THPTANES.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import B,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function Y(o,r={}){let[n,e$1]=useState(0),t=useRef(r);t.current=r;let s=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e$1(1);return}let l=typeof o=="string"?document.querySelector(o):o.current;if(!l)return;let a$3=l,{axis:i="y",scrollContainer:u,trigger:R={}}=t.current,c$1=typeof u=="string"?document.querySelector(u):u??null,U=a(R.start||"top bottom"),q=a(R.end||"bottom top"),S=0,y=0;function b$1(){return c$1?i==="x"?c$1.scrollLeft:c$1.scrollTop:i==="x"?window.scrollX:window.scrollY}function z(){return c$1?i==="x"?c$1.clientWidth:c$1.clientHeight:i==="x"?window.innerWidth:window.innerHeight}function P(){let p=a$2(a$3,c$1,i);({tStart:S,tEnd:y}=c(p,p.scroll,z(),U,q));}function G(){let{speed:p=1,easing:w="linear",once:W=false}=t.current,X=typeof w=="function"?w:d$1[w]??d$1.linear,C=b(b$1(),S,y,p),$=X(W?s.current=Math.max(s.current,C):C);e$1($);}P();let T=e(c$1??window,[a$3],()=>b(b$1(),S,y,Math.min(t.current.speed??1,1)),G,P),A=a$1(p=>{p&&(A(),T.off(),e$1(1));});return ()=>{A(),T.off();}},[]),n}function f(o,r,n){let e=useRef(r);e.current=r;let t=a$3(r);useEffect(()=>{if(!o.current)return;let s=n(o.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[t]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function d(o){let r={},n={};for(let[e,t]of Object.entries(o))(Z.test(e)?n:r)[e]=t;return [r,n]}function fe({children:o,className:r,style:n,...e}){let t=useRef(null),[s,l]=d(e);return f(t,s,b$2),jsx("div",{ref:t,className:r,style:n,...l,children:o})}function de({children:o,className:r,style:n,...e}){let t=useRef(null),[s,l]=d(e);return f(t,s,a$4),jsx("div",{ref:t,className:r,style:n,...l,children:o})}function ge({className:o,style:r,...n}){let e=useRef(null),[t,s]=d(n);return f(e,t,a$5),jsx("span",{ref:e,className:o,style:r,...s})}function Se({src:o,poster:r,className:n,style:e,muted:t=true,playsInline:s=true,...l}){let a=useRef(null),[i,u]=d(l);return f(a,i,a$6),jsx("video",{...u,ref:a,src:o,poster:r,className:n,style:e,muted:t,playsInline:s,preload:i.preload??"auto"})}function ye({children:o,as:r="p",className:n,style:e,...t}){let s=useRef(null),[l,a]=d(t);return f(s,l,a$7),B.createElement(r,{...a,ref:s,className:n,style:e},o)}export{de as ScrollAnimate,ge as ScrollCounter,fe as ScrollDraw,ye as ScrollText,Se as ScrollVideo,Y as useScrollDrawProgress};
@@ -1 +1 @@
1
- 'use strict';function Ge({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),s=0,u=[];for(let l=0;l<n;l++){let p=Math.pow(o,l);u.push(p),s+=p;}let m=[0],c=0;for(let l=0;l<n;l++)c+=u[l]/s,m.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=m[p+1]){let g=(l-m[p])/(m[p+1]-m[p]);if(p===0)return g*(2-g);let T=1-Math.pow(r,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ue({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var W={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:Ge(),elastic:Ue()};function we(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function Se(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function Me(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function B(e,t,n,r){return n===t?0:we((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,o){let s=Se(e.top,e.height,t,r.element)-Me(r.viewport,n),u=Se(e.top,e.height,t,o.element)-Me(o.viewport,n);return {tStart:s,tEnd:u}}function xe(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function Le(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Re(e,t,n){let r=Le(e),o=Le(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Ke="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ze="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Te=33;function Je(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function et(e){let t=[];for(let n=0;n<Te;n++){let r=n/(Te-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Pe(e){switch(e){case "linear":return "linear";case "ease-in":return Ke;case "ease-out":return Ze;case "ease-in-out":return Je()?et(W["ease-in-out"]):null;default:return null}}var $e=Symbol.for("svg-scroll-draw.registry");function Ae(){let e=globalThis;return e[$e]||(e[$e]=new Map)}function ce(e,t){Ae().set(e,t);}function le(e){Ae().delete(e);}var tt=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){tt&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var X,J=new Set,ee=new WeakMap,Q=new Map,Ie=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function nt(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Ce(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();X??(X=new ResizeObserver(o=>{let s=false;for(let{target:u}of o)ee.get(u)!==Ie(u)&&(s=true),ee.set(u,"");s&&J.forEach(u=>u());})),J.add(n);let r=nt(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{ee.has(o)||ee.set(o,Ie(o)),Q.set(o,(Q.get(o)??0)+1),X.observe(o);}),()=>{J.delete(n)&&(r.forEach(o=>{let s=(Q.get(o)??1)-1;if(s)return void Q.set(o,s);Q.delete(o),X?.unobserve(o);}),J.size||(X?.disconnect(),X=void 0));}}function _e(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function Ne(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=_e(s=>{if(!s)return;r();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=t(u?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(n))o[s]=(...u)=>n[s]?.(...u);return o.destroy=()=>{r(),n.destroy();},o}function rt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Oe(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],u=r[2].trim();if(u)for(let m of u.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function ot(e,t,n){let r=Oe(e),o=Oe(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,u)=>{let m=o[u];return s.fn!==m.fn||s.nums.length!==m.nums.length?n<1?`${s.fn}(${s.nums.map((c,l)=>`${c}${s.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,l)=>`${c}${m.units[l]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,l)=>`${c+(m.nums[l]-c)*n}${s.units[l]}`).join(", ")})`}).join(" ")}function ke(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(rt(r))return Re(r,o,n);if(r.includes("("))return ot(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),u=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&u){let m=parseFloat(s[1]),c=parseFloat(u[1]);return `${m+(c-m)*n}${s[2]||u[2]}`}return n<1?r:o}function st(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var it=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),at=0,Fe="--scroll-draw-progress";function ut(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ve={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function He(e,t){return typeof window>"u"?Ve:t.respectReducedMotion===false?De(e,t,false):Ne(t,(n,r)=>De(e,n,r))}function De(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:u=1,once:m=false,axis:c="y",scrollContainer:l,native:p=true,velocityScale:g=false,triggerElement:T,onProgress:P,onComplete:M,onEnter:O,onLeave:k,onEnterBack:j,onLeaveBack:Y}=t,S=typeof s=="function"?s:W[s]??W["ease-out"],$=ae(o.start||"top bottom"),A=ae(o.end||"bottom top"),q=T??e,y=typeof l=="string"?document.querySelector(l):l??null,v=Object.entries(r).map(([i,a])=>({prop:st(i),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function Be(){let i=window.getComputedStyle(e);for(let a of v)a.from===""&&(a.from=i.getPropertyValue(a.prop).trim()||"0");}function Xe(){for(let i of v)e.style.setProperty(i.prop,String(i.to));}let te=new Map;for(let i of [...v.map(a=>a.prop),Fe])te.set(i,e.style.getPropertyValue(i));function ne(){for(let[i,a]of te)a?e.style.setProperty(i,a):e.style.removeProperty(i);}if(n)return Xe(),M?.(),{...Ve,destroy:ne,getProgress:()=>1};Be();let F=()=>y?c==="x"?y.scrollLeft:y.scrollTop:c==="x"?window.scrollX:window.scrollY,fe=()=>y?c==="x"?y.clientWidth:y.clientHeight:c==="x"?window.innerWidth:window.innerHeight,pe=typeof s=="string"?Pe(s):null;function Qe(){if(!p||!ut()||!pe||c!=="y"||y||q!==e||m||u!==1||P||M||O||k||j||Y||g!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let i of v)if(!it.has(i.prop))return false;return true}function je(){let i=`ssd-a-${++at}`,a=v.map(f=>`${f.prop}:${f.from}`).join(";"),N=v.map(f=>`${f.prop}:${f.to}`).join(";"),w=document.createElement("style");w.setAttribute("data-ssd-animate",""),w.textContent=`@keyframes ${i}{from{${a}}to{${N}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${pe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(w),e.classList.add(i);let h=()=>{let f=e.getBoundingClientRect();return ue({top:f.top,height:f.height},F(),fe(),$,A)};ce(e,{type:"animate",getProgress:()=>d.getProgress(),getTrigger:h});let d={refresh(){},destroy(){e.classList.remove(i),w.remove(),e.style.animationPlayState="",ne(),le(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(f){let z=Math.min(1,Math.max(0,f));e.classList.remove(i);for(let K of v)e.style.setProperty(K.prop,ke(K.from,K.to,z));},getProgress(){let{tStart:f,tEnd:z}=h();return S(B(F(),f,z,u))}};return d}if(Qe())return je();let b=0,E=0,D=0,I=NaN,x=false,re=-1,C=0,L=0,G=false,R=NaN,oe=-1,de=0,V=q===e?v:[],ge=false;function be(){let i=e.style,a=V.map(d=>i.getPropertyValue(d.prop)),N=i.transition;V.length&&(i.transition="none"),V.forEach(d=>i.setProperty(d.prop,te.get(d.prop)??""));let w=xe(q,y,c);V.forEach((d,f)=>i.setProperty(d.prop,a[f])),V.length&&(e.offsetWidth,i.transition=N);let h=ue(w,w.scroll,fe(),$,A);ge&&Math.abs(h.tStart-b)<1&&Math.abs(h.tEnd-E)<1||(ge=true,b=h.tStart,E=h.tEnd);}function U(i){e.style.setProperty(Fe,String(i));for(let a of v)e.style.setProperty(a.prop,ke(a.from,a.to,i));P?.(i);}function Ye(i){if(isNaN(R)){R=i;return}R<=0&&i>0?O?.():R>0&&i<=0&&Y?.(),R<1&&i>=1?k?.():R>=1&&i<1&&j?.(),R=i;}let he=i=>B(i,b,E,Math.min(u,1));function _(){!D&&!x&&he(F())!==I&&(D=requestAnimationFrame(ye));}function ye(){if(x)return;let i=performance.now(),a=F(),N=u;if(g!==false){let f=i-de,z=f>0?Math.abs(a-(oe<0?a:oe))/f:0;N=u*Math.max(.2,1+z*(typeof g=="number"?g:1)*.04);}oe=a,de=i;let w=E===b?0:(a-b)/(E-b);Ye(w);let h=B(a,b,E,N),d=m?Math.max(re,S(C=Math.max(C,h))):S(h);L=d,U(d),d>=1&&!G?(G=true,M?.()):d<1&&!m&&(G=false),!x&&(I=he(a),D=I>0&&I<1?requestAnimationFrame(ye):0);}be(),E===b&&Z("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),C=B(F(),b,E,u),L=S(C),U(L);function ve(){be(),_();}let se;function H(){clearTimeout(se),se=setTimeout(ve,150);}let Ee=y??window;Ee.addEventListener("scroll",_,{passive:true}),window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let qe=Ce([q],H);_(),ce(e,{type:"animate",getProgress:()=>L,getTrigger:()=>({tStart:b,tEnd:E})});function ie(){x=true,cancelAnimationFrame(D),D=0,I=NaN;}return {destroy(){ie(),Ee.removeEventListener("scroll",_),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),qe(),clearTimeout(se),ne(),le(e);},replay(){re=-1,C=0,G=false,L=0,x=false,U(0),I=0,_();},pause:ie,resume(){x&&(x=false,_());},seek(i){let a=Math.min(1,Math.max(0,i));L=a,re=a,C=0,ie(),U(a);},getProgress(){return L},refresh:ve}}var ct={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function lt(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function mt(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function ze(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function ft(e){let t=NaN,n=0,r=0;return e.map(o=>{let s=o.getBoundingClientRect();return Math.abs(s.top-t)<=Math.max(8,Math.min(s.height,n||s.height)/2)?r++:(t=s.top,n=s.height,r=0),r})}var We={destroy:()=>{}};function Vt(e,t={}){if(typeof window>"u")return We;let n=mt(e);if(!n.length)return Z("scrollReveal: no elements found:",e),We;let{preset:r="fadeUp",from:o,stagger:s=.15,easing:u="ease-out",once:m=true,trigger:c,onEnter:l,onLeave:p}=t,g={...ct[r],...o},T=lt(g),P=c?.start||"top 88%",M=c?.end||"top 53%",O=Math.abs(me(P)[1]-me(M)[1]),k=Math.min(Math.max(s,0),1)*O,j=k>0?ft(n):n.map(()=>0),Y=n.map((S,$)=>{let A=Math.min(j[$]*k,O);return He(S,{props:T,easing:u,once:m,native:false,trigger:A>0?{start:ze(P,A),end:ze(M,A)}:{start:P,end:M},onEnter:$===0?l:void 0,onLeave:$===n.length-1?p:void 0})});return {destroy(){Y.forEach(S=>S.destroy());}}}exports.scrollReveal=Vt;
1
+ 'use strict';function ze({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),s=0,a=[];for(let l=0;l<n;l++){let f=Math.pow(o,l);a.push(f),s+=f;}let m=[0],c=0;for(let l=0;l<n;l++)c+=a[l]/s,m.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let f=0;f<n;f++)if(l<=m[f+1]){let d=(l-m[f])/(m[f+1]-m[f]);if(f===0)return d*(2-d);let E=1-Math.pow(r,f);return E+(1-E)*(2*d-1)*(2*d-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var H={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:ze(),bounce:Xe(),elastic:Ye()};function pe(e,t,n){return Math.min(n,Math.max(t,e))}function ne(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}var be=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function de(e,t,n,r){return e+n+t*be(r,0)}function ge(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:be(e,1))}function V(e,t,n,r){return n===t?0:pe((e-t)/(n-t)*r,0,1)}function re(e,t,n,r,o){let s=de(e.top,e.height,t,r.element)-ge(r.viewport,n),a=de(e.top,e.height,t,o.element)-ge(o.viewport,n);return {tStart:s,tEnd:a}}function he(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function ye(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function ve(e,t,n){let r=ye(e),o=ye(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Ge="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ee=33;function je(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function qe(e){let t=[];for(let n=0;n<Ee;n++){let r=n/(Ee-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function we(e){switch(e){case "linear":return "linear";case "ease-in":return Ge;case "ease-out":return Qe;case "ease-in-out":return je()?qe(H["ease-in-out"]):null;default:return null}}var Se=Symbol.for("svg-scroll-draw.registry");function Me(){let e=globalThis;return e[Se]||(e[Se]=new Map)}function oe(e,t){Me().set(e,t);}function se(e){Me().delete(e);}var Ue=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function q(e,...t){Ue&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function xe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function Le(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=xe(s=>{if(!s)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(n))o[s]=(...a)=>n[s]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var W,U=new Set,K=new WeakMap,B=new Map,Re=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Te(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();W??(W=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)K.get(a)!==Re(a)&&(s=true),K.set(a,"");s&&U.forEach(a=>a());})),U.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{K.has(o)||K.set(o,Re(o)),B.set(o,(B.get(o)??0)+1),W.observe(o);}),()=>{U.delete(n)&&(r.forEach(o=>{let s=(B.get(o)??1)-1;if(s)return void B.set(o,s);B.delete(o),W?.unobserve(o);}),U.size||(W?.disconnect(),W=void 0));}}function Pe(e,t,n,r,o){let s,a=NaN,m,c,l=()=>{s=0,r(),!m&&!s&&(a=n())>0&&a<1&&(s=requestAnimationFrame(l));},f=()=>{!s&&!m&&n()!==a&&(s=requestAnimationFrame(l));},d=b=>{m=b,cancelAnimationFrame(s),s=a=NaN,f();},E=()=>{clearTimeout(c),o(),f();},h=()=>{clearTimeout(c),c=setTimeout(E,150);},w=Te(t,h),R=b=>{e[b]("scroll",f,{passive:true}),window[b]("resize",h),window[b]("orientationchange",h);};return R("addEventListener"),f(),{hold:d,remeasure:E,off(){d(true),R("removeEventListener"),w(),clearTimeout(c);}}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function $e(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function Je(e,t,n){let r=$e(e),o=$e(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,a)=>{let m=o[a];return s.fn!==m.fn||s.nums.length!==m.nums.length?n<1?`${s.fn}(${s.nums.map((c,l)=>`${c}${s.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,l)=>`${c}${m.units[l]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,l)=>`${c+(m.nums[l]-c)*n}${s.units[l]}`).join(", ")})`}).join(" ")}function Ae(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Ze(r))return ve(r,o,n);if(r.includes("("))return Je(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let m=parseFloat(s[1]),c=parseFloat(a[1]);return `${m+(c-m)*n}${s[2]||a[2]}`}return n<1?r:o}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ie={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ne(e,t){return typeof window>"u"?Ie:t.respectReducedMotion===false?_e(e,t,false):Le(t,(n,r)=>_e(e,n,r))}function _e(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:m=false,axis:c="y",scrollContainer:l,native:f=true,velocityScale:d=false,triggerElement:E,onProgress:h,onComplete:w,onEnter:R,onLeave:b,onEnterBack:z,onLeaveBack:X}=t,T=typeof s=="function"?s:H[s]??H["ease-out"],A=ne(o.start||"top bottom"),C=ne(o.end||"bottom top"),Y=E??e,S=typeof l=="string"?document.querySelector(l):l??null,M=Object.entries(r).map(([i,u])=>({prop:et(i),from:Array.isArray(u)?u[0]:"",to:Array.isArray(u)?u[1]:u}));function Fe(){let i=window.getComputedStyle(e);for(let u of M)u.from===""&&(u.from=i.getPropertyValue(u.prop).trim()||"0");}function De(){for(let i of M)e.style.setProperty(i.prop,String(i.to));}let Z=new Map;for(let i of [...M.map(u=>u.prop),Ce])Z.set(i,e.style.getPropertyValue(i));function J(){for(let[i,u]of Z)u?e.style.setProperty(i,u):e.style.removeProperty(i);}if(n)return De(),w?.(),{...Ie,destroy:J,getProgress:()=>1};Fe();let O=()=>S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY,ae=()=>S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight,ue=typeof s=="string"?we(s):null;function He(){if(!f||!rt()||!ue||c!=="y"||S||Y!==e||m||a!==1||h||w||R||b||z||X||d!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let i of M)if(!tt.has(i.prop))return false;return true}function Ve(){let i=`ssd-a-${++nt}`,u=M.map(p=>`${p.prop}:${p.from}`).join(";"),N=M.map(p=>`${p.prop}:${p.to}`).join(";"),L=document.createElement("style");L.setAttribute("data-ssd-animate",""),L.textContent=`@keyframes ${i}{from{${u}}to{${N}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(L),e.classList.add(i);let v=()=>{let p=e.getBoundingClientRect();return re({top:p.top,height:p.height},O(),ae(),A,C)};oe(e,{type:"animate",getProgress:()=>g.getProgress(),getTrigger:v});let g={refresh(){},destroy(){e.classList.remove(i),L.remove(),e.style.animationPlayState="",J(),se(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(p){let D=Math.min(1,Math.max(0,p));e.classList.remove(i);for(let j of M)e.style.setProperty(j.prop,Ae(j.from,j.to,D));},getProgress(){let{tStart:p,tEnd:D}=v();return T(V(O(),p,D,a))}};return g}if(He())return Ve();let y=0,x=0,_=false,ee=-1,I=0,P=0,G=false,$=NaN,te=-1,ce=0,k=Y===e?M:[],le=false;function me(){let i=e.style,u=k.map(g=>i.getPropertyValue(g.prop)),N=i.transition;k.length&&(i.transition="none"),k.forEach(g=>i.setProperty(g.prop,Z.get(g.prop)??""));let L=he(Y,S,c);k.forEach((g,p)=>i.setProperty(g.prop,u[p])),k.length&&(e.offsetWidth,i.transition=N);let v=re(L,L.scroll,ae(),A,C);le&&Math.abs(v.tStart-y)<1&&Math.abs(v.tEnd-x)<1||(le=true,y=v.tStart,x=v.tEnd);}function Q(i){e.style.setProperty(Ce,String(i));for(let u of M)e.style.setProperty(u.prop,Ae(u.from,u.to,i));h?.(i);}function We(i){if(isNaN($)){$=i;return}$<=0&&i>0&&R?.(),$<1&&i>=1&&b?.(),$>=1&&i<1&&z?.(),$>0&&i<=0&&X?.(),$=i;}function Be(){if(_)return;let i=performance.now(),u=O(),N=a;if(d!==false){let p=i-ce,D=p>0?Math.abs(u-(te<0?u:te))/p:0;N=a*Math.max(.2,1+D*(typeof d=="number"?d:1)*.04);}te=u,ce=i;let L=x===y?0:(u-y)/(x-y);We(L);let v=V(u,y,x,N),g=m?Math.max(ee,T(I=Math.max(I,v))):T(v);P=g,Q(g),g>=1&&!G?(G=true,w?.()):g<1&&!m&&(G=false);}let F=Pe(S??window,[Y],()=>V(O(),y,x,Math.min(a,1)),Be,me);me(),x===y&&q("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),I=V(O(),y,x,a),P=T(I),Q(P),oe(e,{type:"animate",getProgress:()=>P,getTrigger:()=>({tStart:y,tEnd:x})});function fe(){_=true,F.hold(true);}return {destroy(){_=true,F.off(),J(),se(e);},replay(){ee=-1,I=0,G=false,P=0,_=false,Q(0),F.hold(false);},pause:fe,resume(){_&&(_=false,F.hold(false));},seek(i){let u=Math.min(1,Math.max(0,i));P=u,ee=u,I=0,fe(),Q(u);},getProgress(){return P},refresh:F.remeasure}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function ie(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Oe(e,t){let[n,r]=ie(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(o=>{let s=o.getBoundingClientRect();return Math.abs(s.top-t)<=Math.max(8,Math.min(s.height,n||s.height)/2)?r++:(t=s.top,n=s.height,r=0),r})}var ke={destroy:()=>{}};function kt(e,t={}){if(typeof window>"u")return ke;let n=it(e);if(!n.length)return q("scrollReveal: no elements found:",e),ke;let{preset:r="fadeUp",from:o,stagger:s=.15,easing:a="ease-out",once:m=true,trigger:c,onEnter:l,onLeave:f}=t,d={...ot[r],...o},E=st(d),h=c?.start||"top 88%",w=c?.end||"top 53%",R=Math.abs(ie(h)[1]-ie(w)[1]),b=Math.min(Math.max(s,0),1)*R,z=b>0?at(n):n.map(()=>0),X=n.map((T,A)=>{let C=Math.min(z[A]*b,R);return Ne(T,{props:E,easing:a,once:m,native:false,trigger:C>0?{start:Oe(h,C),end:Oe(w,C)}:{start:h,end:w},onEnter:A===0?l:void 0,onLeave:A===n.length-1?f:void 0})});return {destroy(){X.forEach(T=>T.destroy());}}}exports.scrollReveal=kt;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-MswK0erX.mjs';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-9bcJdVcg.mjs';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-MswK0erX.js';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-9bcJdVcg.js';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1 +1 @@
1
- import {a}from'../chunk-OPXWNJBG.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start||"top 88%",i=d?.end||"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-VJ5ZU55P.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start||"top 88%",i=d?.end||"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-MswK0erX.js';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-9bcJdVcg.js';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-MswK0erX.mjs';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-9bcJdVcg.mjs';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1 +1 @@
1
- 'use strict';function K({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),a=Math.max(.01,Math.min(.99,r)),p=Math.sqrt(a),u=0,y=[];for(let o=0;o<n;o++){let s=Math.pow(p,o);y.push(s),u+=s;}let m=[0],M=0;for(let o=0;o<n;o++)M+=y[o]/u,m.push(M);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let s=0;s<n;s++)if(o<=m[s+1]){let b=(o-m[s])/(m[s+1]-m[s]);if(s===0)return b*(2-b);let E=1-Math.pow(a,s);return E+(1-E)*(2*b-1)*(2*b-1)}return 1}}function X({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),a=Math.max(.1,r),p=n<=1?a/4:a/(2*Math.PI)*Math.asin(1/n);return u=>u<=0?0:u>=1?1:n*Math.pow(2,-10*u)*Math.sin((u-p)*(2*Math.PI)/a)+1}var A={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:K(),elastic:X()};function x(e,r,n){return Math.min(n,Math.max(r,e))}var j=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function q(e,...r){j&&console.warn(`[svg-scroll-draw] ${e}`,...r);}function P(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function H(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=p=>e(!!p.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let a=r;return a.addListener?.(n),()=>a.removeListener?.(n)}var W=Symbol.for("svg-scroll-draw.registry");function F(){let e=globalThis;return e[W]||(e[W]=new Map)}function G(e,r){F().set(e,r);}function z(e){F().delete(e);}var $={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function J(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function le(e,r={}){if(typeof window>"u")return $;let n=J(e);if(!n.length)return q("scrollSnap: no sections found"),$;let{direction:a="vertical",duration:p=600,easing:u="ease-in-out",threshold:y=.3,scrollContainer:m,onSnap:M,respectReducedMotion:o=true}=r,s=o&&P(),b=o?H(t=>{s=t;}):()=>{},E=typeof u=="function"?u:A[u]??A["ease-in-out"],h=a==="horizontal",_=h?"Width":"Height",C=h?"left":"top",f=typeof m=="string"?document.querySelector(m):m??null,R=false,v=0;function w(){return f?h?f.scrollLeft:f.scrollTop:h?window.scrollX:window.scrollY}function N(t){let i=f??window,c=h?{left:t}:{top:t};try{i.scrollTo({...c,behavior:"instant"});}catch{i.scrollTo(c);}}function S(){let t=f??document.scrollingElement??document.documentElement,i=t[`scroll${_}`]-t[`client${_}`],c=f?f.getBoundingClientRect()[C]+f[h?"clientLeft":"clientTop"]:0,d=w();return n.map(g=>x(g.getBoundingClientRect()[C]-c+d,0,i))}function B(){let t=w(),i=S();return i.reduce((c,d,g)=>Math.abs(d-t)<Math.abs(i[c]-t)?g:c,0)}let l=B();function T(t){R=false,l=t,M?.(t);}function L(t){let i=x(t,0,n.length-1);cancelAnimationFrame(v),R=true;let c=S(),d=w(),g=c[i];if(Math.abs(d-g)<1)return T(i);if(s)return N(g),T(i);let k=performance.now();function Q(Y){let V=x((Y-k)/p,0,1);N(d+(g-d)*E(V)),V<1?v=requestAnimationFrame(Q):T(i);}v=requestAnimationFrame(Q);}let I;function O(){R||(clearTimeout(I),I=setTimeout(()=>{let t=w(),i=S();if(Math.abs(t-i[l])<1)return;let c=n[l][`offset${_}`],d=t-i[l];d>c*y&&l<n.length-1?L(l+1):d<-(c*y)&&l>0?L(l-1):L(l);},100));}let D=f??window;return D.addEventListener("scroll",O,{passive:true}),G(n[0],{type:"snap",getProgress:()=>l/(n.length-1||1),getTrigger:()=>{let t=S();return {tStart:t[0],tEnd:t[t.length-1]}}}),{destroy(){cancelAnimationFrame(v),clearTimeout(I),D.removeEventListener("scroll",O),b(),z(n[0]);},snapTo:L,getCurrentIndex(){return l}}}exports.scrollSnap=le;
1
+ 'use strict';function K({tension:e=2.5,friction:r=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,r)}function X({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),a=Math.max(.01,Math.min(.99,r)),p=Math.sqrt(a),u=0,h=[];for(let o=0;o<n;o++){let s=Math.pow(p,o);h.push(s),u+=s;}let m=[0],M=0;for(let o=0;o<n;o++)M+=h[o]/u,m.push(M);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let s=0;s<n;s++)if(o<=m[s+1]){let b=(o-m[s])/(m[s+1]-m[s]);if(s===0)return b*(2-b);let E=1-Math.pow(a,s);return E+(1-E)*(2*b-1)*(2*b-1)}return 1}}function j({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),a=Math.max(.1,r),p=n<=1?a/4:a/(2*Math.PI)*Math.asin(1/n);return u=>u<=0?0:u>=1?1:n*Math.pow(2,-10*u)*Math.sin((u-p)*(2*Math.PI)/a)+1}var A={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:K(),bounce:X(),elastic:j()};function x(e,r,n){return Math.min(n,Math.max(r,e))}var J=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function q(e,...r){J&&console.warn(`[svg-scroll-draw] ${e}`,...r);}function H(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function P(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=p=>e(!!p.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let a=r;return a.addListener?.(n),()=>a.removeListener?.(n)}var W=Symbol.for("svg-scroll-draw.registry");function F(){let e=globalThis;return e[W]||(e[W]=new Map)}function G(e,r){F().set(e,r);}function z(e){F().delete(e);}var $={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function U(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function de(e,r={}){if(typeof window>"u")return $;let n=U(e);if(!n.length)return q("scrollSnap: no sections found"),$;let{direction:a="vertical",duration:p=600,easing:u="ease-in-out",threshold:h=.3,scrollContainer:m,onSnap:M,respectReducedMotion:o=true}=r,s=o&&H(),b=o?P(t=>{s=t;}):()=>{},E=typeof u=="function"?u:A[u]??A["ease-in-out"],y=a==="horizontal",_=y?"Width":"Height",C=y?"left":"top",f=typeof m=="string"?document.querySelector(m):m??null,R=false,v=0;function w(){return f?y?f.scrollLeft:f.scrollTop:y?window.scrollX:window.scrollY}function N(t){let i=f??window,c=y?{left:t}:{top:t};try{i.scrollTo({...c,behavior:"instant"});}catch{i.scrollTo(c);}}function S(){let t=f??document.scrollingElement??document.documentElement,i=t[`scroll${_}`]-t[`client${_}`],c=f?f.getBoundingClientRect()[C]+f[y?"clientLeft":"clientTop"]:0,d=w();return n.map(g=>x(g.getBoundingClientRect()[C]-c+d,0,i))}function B(){let t=w(),i=S();return i.reduce((c,d,g)=>Math.abs(d-t)<Math.abs(i[c]-t)?g:c,0)}let l=B();function T(t){R=false,l=t,M?.(t);}function L(t){let i=x(t,0,n.length-1);cancelAnimationFrame(v),R=true;let c=S(),d=w(),g=c[i];if(Math.abs(d-g)<1)return T(i);if(s)return N(g),T(i);let k=performance.now();function Q(Y){let V=x((Y-k)/p,0,1);N(d+(g-d)*E(V)),V<1?v=requestAnimationFrame(Q):T(i);}v=requestAnimationFrame(Q);}let I;function O(){R||(clearTimeout(I),I=setTimeout(()=>{let t=w(),i=S();if(Math.abs(t-i[l])<1)return;let c=n[l][`offset${_}`],d=t-i[l];d>c*h&&l<n.length-1?L(l+1):d<-(c*h)&&l>0?L(l-1):L(l);},100));}let D=f??window;return D.addEventListener("scroll",O,{passive:true}),G(n[0],{type:"snap",getProgress:()=>l/(n.length-1||1),getTrigger:()=>{let t=S();return {tStart:t[0],tEnd:t[t.length-1]}}}),{destroy(){cancelAnimationFrame(v),clearTimeout(I),D.removeEventListener("scroll",O),b(),z(n[0]);},snapTo:L,getCurrentIndex(){return l}}}exports.scrollSnap=de;
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-MswK0erX.mjs';
1
+ import { E as EasingName } from '../types-9bcJdVcg.mjs';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-MswK0erX.js';
1
+ import { E as EasingName } from '../types-9bcJdVcg.js';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -1 +1 @@
1
- import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function k(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,$={}){if(typeof window>"u")return z;let i=k(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:B="vertical",duration:P=600,easing:g="ease-in-out",threshold:v=.3,scrollContainer:S,onSnap:_,respectReducedMotion:w=true}=$,M=w&&a(),G=w?a$1(e=>{M=e;}):()=>{},W=typeof g=="function"?g:d[g]??d["ease-in-out"],a$4=B==="horizontal",b$2=a$4?"Width":"Height",x=a$4?"left":"top",s=typeof S=="string"?document.querySelector(S):S??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function L(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d$1(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${b$2}`]-e[`client${b$2}`],n=s?s.getBoundingClientRect()[x]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[x]-n+r,0,t))}function X(){let e=m(),t=d$1();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=X();function T(e){h=false,o=e,_?.(e);}function f(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d$1(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(M)return L(l),T(t);let Y=performance.now();function R(j){let C=a$3((j-Y)/P,0,1);L(r+(l-r)*W(C)),C<1?u=requestAnimationFrame(R):T(t);}u=requestAnimationFrame(R);}let E;function I(){h||(clearTimeout(E),E=setTimeout(()=>{let e=m(),t=d$1();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${b$2}`],r=e-t[o];r>n*v&&o<i.length-1?f(o+1):r<-(n*v)&&o>0?f(o-1):f(o);},100));}let A=s??window;return A.addEventListener("scroll",I,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d$1();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(E),A.removeEventListener("scroll",I),G(),b$1(i[0]);},snapTo:f,getCurrentIndex(){return o}}}export{Z as scrollSnap};
1
+ import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-THPTANES.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function k(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,$={}){if(typeof window>"u")return z;let i=k(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:B="vertical",duration:P=600,easing:g="ease-in-out",threshold:v=.3,scrollContainer:S,onSnap:_,respectReducedMotion:w=true}=$,M=w&&a(),G=w?a$1(e=>{M=e;}):()=>{},W=typeof g=="function"?g:d[g]??d["ease-in-out"],a$4=B==="horizontal",b$2=a$4?"Width":"Height",x=a$4?"left":"top",s=typeof S=="string"?document.querySelector(S):S??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function L(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d$1(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${b$2}`]-e[`client${b$2}`],n=s?s.getBoundingClientRect()[x]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[x]-n+r,0,t))}function X(){let e=m(),t=d$1();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=X();function T(e){h=false,o=e,_?.(e);}function f(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d$1(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(M)return L(l),T(t);let Y=performance.now();function R(j){let C=a$3((j-Y)/P,0,1);L(r+(l-r)*W(C)),C<1?u=requestAnimationFrame(R):T(t);}u=requestAnimationFrame(R);}let E;function I(){h||(clearTimeout(E),E=setTimeout(()=>{let e=m(),t=d$1();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${b$2}`],r=e-t[o];r>n*v&&o<i.length-1?f(o+1):r<-(n*v)&&o>0?f(o-1):f(o);},100));}let A=s??window;return A.addEventListener("scroll",I,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d$1();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(E),A.removeEventListener("scroll",I),G(),b$1(i[0]);},snapTo:f,getCurrentIndex(){return o}}}export{Z as scrollSnap};
@@ -1,3 +1,3 @@
1
- 'use strict';var solidJs=require('solid-js');function yn({bounces:e=3,decay:r=.5}={}){let t=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(n),i=0,a=[];for(let y=0;y<t;y++){let E=Math.pow(s,y);a.push(E),i+=E;}let m=[0],p=0;for(let y=0;y<t;y++)p+=a[y]/i,m.push(p);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let E=0;E<t;E++)if(y<=m[E+1]){let D=(y-m[E])/(m[E+1]-m[E]);if(E===0)return D*(2-D);let S=1-Math.pow(n,E);return S+(1-S)*(2*D-1)*(2*D-1)}return 1}}function hn({amplitude:e=1,period:r=.4}={}){let t=Math.max(1,e),n=Math.max(.1,r),s=t<=1?n/4:n/(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)/n)+1}var ee={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 Ht(e,r,t){return Math.min(t,Math.max(r,e))}function de(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[t="top",n="bottom"]=r.split(/\s+/).filter(Boolean);return {element:t,viewport:n}}function Nt(e,r,t,n){switch(n){case "top":return e+t;case "center":return e+t+r/2;case "bottom":return e+t+r;default:return e+t}}function Vt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function U(e,r,t,n){return t===r?0:Ht((e-r)/(t-r)*n,0,1)}function Le(e,r,t,n,s){let i=Nt(e.top,e.height,r,n.element)-Vt(n.viewport,t),a=Nt(e.top,e.height,r,s.element)-Vt(s.viewport,t);return {tStart:i,tEnd:a}}function ot(e,r,t){let n=e.getBoundingClientRect(),s=t==="x"?n.width:n.height;return r?{top:t==="x"?n.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:n.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:s,scroll:0}:{top:t==="x"?n.left:n.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function st(e){let r=parseFloat(e.getAttribute("pathLength")??"");if(r>0)return r;let t=e.tagName.toLowerCase();if(t==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),s=parseFloat(e.getAttribute("height")??"0");return 2*(n+s)}if(t==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function zt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function it(e,r,t){let n=zt(e),s=zt(r);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*t)},${Math.round(n[1]+(s[1]-n[1])*t)},${Math.round(n[2]+(s[2]-n[2])*t)})`}var _t={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 je=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ge(e,...r){je&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var bn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",wn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Wt=33;function vn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function En(e){let r=[];for(let t=0;t<Wt;t++){let n=t/(Wt-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return bn;case "ease-out":return wn;case "ease-in-out":return vn()?En(ee["ease-in-out"]):null;default:return null}}var qt=Symbol.for("svg-scroll-draw.registry");function Bt(){let e=globalThis;return e[qt]||(e[qt]=new Map)}function Ce(e,r){Bt().set(e,r);}function Pe(e){Bt().delete(e);}var Ke,lt=new Set,ct=new WeakMap,Ze=new Map,Gt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function Sn(e){let r=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling)r.add(n);return r}function ke(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>r();Ke??(Ke=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)ct.get(a)!==Gt(a)&&(i=true),ct.set(a,"");i&&lt.forEach(a=>a());})),lt.add(t);let n=Sn(e);return [document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{ct.has(s)||ct.set(s,Gt(s)),Ze.set(s,(Ze.get(s)??0)+1),Ke.observe(s);}),()=>{lt.delete(t)&&(n.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Ke?.unobserve(s);}),lt.size||(Ke?.disconnect(),Ke=void 0));}}function ut(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",t),()=>r.removeEventListener("change",t);let n=r;return n.addListener?.(t),()=>n.removeListener?.(t)}function We(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let t=r(e,false),n=ut(i=>{if(!i)return;n();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=r(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...a)=>t[i]?.(...a);return s.destroy=()=>{n(),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 jt(e,r){let t="";try{t=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return t||(e.getAttribute(r)??"").trim()}var Qt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Mn(e){if(!je)return;let r=jt(e,"stroke");if(!r||r==="none"){ge("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Qt.has(t)&&!Qt.has(jt(e,"fill"))&&ge("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ln(e,r,t){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=t==="x"?window.scrollX:window.scrollY,a=e-i,m=r-i,p=t==="x";n.innerHTML=`
2
- <div style="position:absolute;${p?`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;${p?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(n),window.addEventListener("scroll",s,{passive:true}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove();}}}var Ut=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Yt=/[MmLlHhVvCcSsQqTtAaZz]/g;function An(e,r,t){if(!je)return;let n=(e.match(Yt)??[]).join("").toUpperCase(),s=(r.match(Yt)??[]).join("").toUpperCase(),i=(e.match(Ut)??[]).length,a=(r.match(Ut)??[]).length;if(n!==s){ge(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}i!==a&&ge(`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 Cn(e,r,t){let n=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=n[s++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function wt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:We(r,(t,n)=>Pn(e,t,n))}function Pn(e,r,t){let{preset:n,...s}=r,i=n?{..._t[n],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:p=false,easing:y="linear",trigger:E={},stagger:D=0,direction:S="forward",once:Y=false,debug:te=false,axis:L="y",scrollContainer:ne,autoReverse:we=false,delay:P=0,strokeColor:I,strokeWidth:O,fillOpacity:A,waypoints:b,velocityScale:h=false,threshold:v=0,rootMargin:G="0px",repeat:_=0,repeatDelay:q=0,morphTo:N,clip:R,autoplay:re=false,duration:Te=1e3,native:ce=true,onProgress:H,onStart:$,onComplete:k,onEnter:u,onLeave:d,onEnterBack:X,onLeaveBack:xe}=i,V=R===true?"left":typeof R=="string"?R:false,K=typeof y=="function"?y:ee[y]??ee.linear,Oe=de(E.start||"top bottom"),x=de(E.end||"bottom top"),T=typeof ne=="string"?document.querySelector(ne):ne??null,ue=Array.isArray(I)?I[0]:null,me=Array.isArray(I)?I[1]:typeof I=="string"?I:null,$e=Array.isArray(O)?O[0]:null,Re=Array.isArray(O)?O[1]:typeof O=="number"?O:null,Me=Array.isArray(A)?A[0]:null,Ne=Array.isArray(A)?A[1]:typeof A=="number"?A:null;function Fe(o){let l=o*100;switch(V){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let F=V?[]:Array.from(e.querySelectorAll(a)),ye=[],ve=[],oe=0,Z=0,qe=D,Je=0,j=false,c=false,f=0,Ae=false,fe=-1,J=[],Q=-1,w=false,se=0,he=0,Ve,ft=null;function Lt(){ft?.destroy(),ft=null;}let ze=new Set,At=NaN,_e=true,et=-1,Ct=performance.now(),Be=NaN;function Qe(){return T?L==="x"?T.scrollLeft:T.scrollTop:L==="x"?window.scrollX:window.scrollY}function Pt(){return T?L==="x"?T.clientWidth:T.clientHeight:L==="x"?window.innerWidth:window.innerHeight}function Ot(){let o=ot(e,T,L);return Le(o,o.scroll,Pt(),Oe,x)}function cn(){let o=Z-oe,l=F.length-1,g=T??document.documentElement,C=L==="x"?"Width":"Height";if(qe=D,D>0&&l>0&&o>0){let pe=g[`scroll${C}`]-g[`client${C}`]-1-oe-o/m;pe>=0&&(qe=Math.min(D,pe/(l*o)));}Je=Z+l*qe*o;}function $t(){(({tStart:oe,tEnd:Z}=Ot())),cn(),te&&je&&(Lt(),ft=Ln(oe,Z,L));}function pt(o,l=Ot){Ce(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let g=o.destroy;return o.destroy=()=>{g.call(o),Pe(e);},o}function kt(o,l){return Y&&!we?Math.max(fe,K(J[o]=Math.max(J[o]??0,l))):K(l)}function un(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),V){let g=l==="reverse"?1-o:o;e.style.clipPath=Fe(g);return}F.forEach((g,C)=>dt(g,C,o,l));}function dt(o,l,g,C){o.style.strokeDashoffset=C==="reverse"?`${ye[l]*g}`:`${ye[l]*(1-g)}`,p&&(o.style.opacity=C==="reverse"?`${1-g}`:`${g}`),ue&&me?o.style.stroke=it(ue,me,g):me&&(o.style.stroke=me),$e!==null&&Re!==null?o.style.strokeWidth=`${$e+(Re-$e)*g}`:Re!==null&&(o.style.strokeWidth=`${Re}`),Me!==null&&Ne!==null?o.style.fillOpacity=`${Me+(Ne-Me)*g}`:Ne!==null&&(o.style.fillOpacity=`${Ne}`),N&&o.tagName.toLowerCase()==="path"&&ve[l]&&o.setAttribute("d",Cn(ve[l],N,g));}function Ue(){if(e.style.setProperty("--scroll-draw-progress","0"),V){e.style.clipPath=Fe(S==="reverse"?1:0);return}F.forEach((o,l)=>{o.style.strokeDasharray=`${ye[l]}`,o.style.strokeDashoffset=S==="reverse"?"0":`${ye[l]}`,p?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",ue&&(o.style.stroke=ue),$e!==null&&(o.style.strokeWidth=`${$e}`),Me!==null&&(o.style.fillOpacity=`${Me}`),N&&o.tagName.toLowerCase()==="path"&&ve[l]&&o.setAttribute("d",ve[l]);});}function Ye(o,l){let g=o.getAttribute("d"),C=st(o);if(N&&ve[l]){o.setAttribute("d",N);let pe=st(o);o.setAttribute("d",ve[l]),C=Math.max(st(o),pe),o.setAttribute("d",g);}ye[l]=C,o.style.strokeDasharray=`${C}`;}if(F.forEach((o,l)=>{Mn(o);let g=o.tagName.toLowerCase()==="path";g?ve.push(o.getAttribute("d")??""):ve.push(""),Ye(o,l);let C=ye[l];N&&(g?An(ve[ve.length-1],N,o):ge(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDashoffset=S==="reverse"?`${C}`:"0",p&&(o.style.opacity="1"),me&&(o.style.stroke=me),Re!==null&&(o.style.strokeWidth=`${Re}`),Ne!==null&&(o.style.fillOpacity=`${Ne}`),N&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",N)):(o.style.strokeDashoffset=S==="reverse"?"0":`${C}`,p?o.style.opacity=S==="reverse"?"1":"0":o.style.opacity="",ue&&(o.style.stroke=ue),$e!==null&&(o.style.strokeWidth=`${$e}`),Me!==null&&(o.style.fillOpacity=`${Me}`));}),t)return V&&(e.style.clipPath=Fe(1)),k?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};V&&(e.style.clipPath=Fe(S==="reverse"?1:0));let It=typeof y=="string"?at(y):null;function mn(){return !(ce===false||re||te&&je||!xn()||!F.length||!It||V||L!=="y"||T||m!==1||D!==0||Y||we||h!==false||N||b||_||P>0||H||$||k||u||d||X||xe||I!=null||O!=null||A!=null||(E.start||"top bottom").trim()!=="top bottom"||(E.end||"bottom top").trim()!=="bottom top")}function fn(){let o=++Tn,l=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,C=`--svg-scroll-draw-${o}`,pe=S==="reverse"?"0":"var(--ssd-len)",De=S==="reverse"?"var(--ssd-len)":"0",Ee=`stroke-dashoffset:${pe};`,W=`stroke-dashoffset:${De};`;p&&(Ee+=`opacity:${S==="reverse"?1:0};`,W+=`opacity:${S==="reverse"?0:1};`);let B=document.createElement("style");B.setAttribute("data-svg-scroll-draw",""),B.textContent=`@keyframes ${l}{from{${Ee}}to{${W}}}.${g}{view-timeline-name:${C};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${It};animation-fill-mode:both;animation-timeline:${C};animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(g);function ie(M,z){M.style.setProperty("--ssd-len",String(ye[z])),M.style.strokeDasharray=`${ye[z]}`,M.style.strokeDashoffset="",M.style.opacity="",M.style.animationPlayState="",M.classList.add(l);}F.forEach(ie);let ae=false,be=-1;function Se(){if(be>=0)return be;let M=e.getBoundingClientRect(),{tStart:z,tEnd:le}=Le({top:M.top,height:M.height},Qe(),Pt(),Oe,x);return K(U(Qe(),z,le,m))}return {destroy(){e.classList.remove(g),F.forEach(M=>{M.classList.remove(l),M.style.removeProperty("--ssd-len"),M.style.animationPlayState="";}),B.remove();},replay(){ae=false,be=-1,F.forEach(ie);},pause(){ae=true,F.forEach(M=>{M.style.animationPlayState="paused";});},resume(){ae&&(ae=false,F.forEach(M=>{M.style.animationPlayState="running";}));},seek(M){let z=Math.min(1,Math.max(0,M));be=z,ae=true,F.forEach((le,He)=>{le.classList.remove(l),le.style.strokeDashoffset=S==="reverse"?`${ye[He]*z}`:`${ye[He]*(1-z)}`,p&&(le.style.opacity=S==="reverse"?`${1-z}`:`${z}`);});},getProgress(){return Se()},refresh(){F.forEach((M,z)=>{Ye(M,z),M.style.setProperty("--ssd-len",String(ye[z]));});}}}if(mn())return pt(fn());function pn(){let o=Math.max(1,Te),l=V?o:o*(1+Math.max(0,F.length-1)*D),g=0,C=0,pe=false;function De(be){let Se=true,M=Math.min(1,Math.max(0,be/l));if(V){let z=Math.min(1,Math.max(0,be/o)),le=K(z);se=le,e.style.setProperty("--scroll-draw-progress",String(le)),e.style.clipPath=Fe(S==="reverse"?1-le:le),H?.(le),z<1&&(Se=false);}else {F.forEach((le,He)=>{let gn=He*D*o,Dt=Math.min(1,Math.max(0,(be-gn)/o));dt(le,He,K(Dt),S),Dt<1&&(Se=false);});let z=K(M);se=z,H?.(z),e.style.setProperty("--scroll-draw-progress",String(z));}if(b){let z=K(M);for(let le in b){let He=parseFloat(le);z>=He&&!ze.has(He)&&(ze.add(He),b[le]?.());}}return Se}function Ee(be){if(w)return;let Se=be-g;c||(c=true,$?.());let M=De(Se);if(M&&!j){j=true,De(l),k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,Ve=setTimeout(()=>{g=performance.now(),c=false,j=false,ze.clear(),Ue(),f=requestAnimationFrame(Ee);},q));return}M||(f=requestAnimationFrame(Ee));}function W(){cancelAnimationFrame(f),clearTimeout(Ve),g=performance.now(),C=0,w=false,c=false,j=false,he=0,pe=true,se=0,ze.clear(),Ue(),f=requestAnimationFrame(Ee);}let B=new IntersectionObserver(be=>{be.forEach(Se=>{Se.isIntersecting&&!(Y&&j)?W():!Se.isIntersecting&&!Y&&!j&&(cancelAnimationFrame(f),clearTimeout(Ve),pe=false);});},{root:T??null,threshold:v,rootMargin:G}),ie;function ae(){clearTimeout(ie),ie=setTimeout(()=>F.forEach(Ye),150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),P>0?setTimeout(()=>B.observe(e),P):B.observe(e),{destroy(){cancelAnimationFrame(f),clearTimeout(Ve),B.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ie);},replay(){he=0,W();},pause(){w||!pe||(w=true,C=performance.now()-g,cancelAnimationFrame(f));},resume(){w&&(w=false,pe=true,g=performance.now()-C,f=requestAnimationFrame(Ee));},seek(be){let Se=Math.min(1,Math.max(0,be));se=Se,w=true,C=Se*l,g=performance.now()-C,cancelAnimationFrame(f),De(C);},getProgress(){return se},refresh(){clearTimeout(ie),F.forEach(Ye);}}}if(re)return pt(pn());$t();function Rt(){if(w||!Ge)return;let o=performance.now(),l=Qe();if(!_e&&h===false&&l===At){yt(l);return}_e=false,At=l;let g=m;if(h!==false){let W=o-Ct,B=W>0?Math.abs(l-(et<0?l:et))/W:0;g=m*Math.max(.2,1+B*(typeof h=="number"?h:1)*.04);}et=l,Ct=o;let C=we?Q===-1||l>=Q?"forward":"reverse":S;Q=l;let pe=Z-oe,De=true,Ee=pe===0?0:(l-oe)/pe;if(isNaN(Be)||(Be<=0&&Ee>0?u?.():Be>0&&Ee<=0&&xe?.(),Be<1&&Ee>=1?d?.():Be>=1&&Ee<1&&X?.()),Be=Ee,V){let W=kt(0,U(l,oe,Z,g));se=W,e.style.setProperty("--scroll-draw-progress",String(W));let B=C==="reverse"?1-W:W;e.style.clipPath=Fe(B),H?.(W),!c&&U(l,oe,Z,g)>0&&(c=true,$?.()),W>=1&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,Ve=setTimeout(()=>{fe=-1,J=[],c=false,j=false,Ue();},q))):W<1&&!Y&&(j=false),yt(l);return}if(F.forEach((W,B)=>{let ie=B*qe*pe,ae=kt(B,U(l,oe+ie,Z+ie,g));dt(W,B,ae,C),B===0&&(se=ae,H?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),ae<1&&(De=false);}),b){let W=K(U(l,oe,Z,g));for(let B in b){let ie=parseFloat(B);W>=ie&&!ze.has(ie)&&(ze.add(ie),b[B]?.());}}!c&&U(l,oe,Z,g)>0&&(c=true,$?.()),De&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,Ve=setTimeout(()=>{fe=-1,J=[],c=false,j=false,ze.clear(),Ue(),_e=true;},q))):!De&&!Y&&(j=false),yt(l);}function gt(o){return o>=Z&&o<Je}function yt(o){Ae||gt(o)?f=requestAnimationFrame(Rt):Ge=false;}function ht(){return Ae||gt(Qe())}let Ge=false;function tt(){Ge||(Ge=true,f=requestAnimationFrame(function(){Rt();}));}function nt(){Ge=false,cancelAnimationFrame(f);}let bt=new IntersectionObserver(o=>{o.forEach(l=>{Ae=l.isIntersecting,Ae&&!w?(_e=true,tt()):Ge&&!w&&gt(Qe())||nt();});},{root:T??null,threshold:v,rootMargin:G});function Ft(){F.forEach(Ye),$t(),_e=true;}let rt;function Xe(){clearTimeout(rt),rt=setTimeout(Ft,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let dn=ke([e],Xe);return P>0?setTimeout(()=>bt.observe(e),P):bt.observe(e),pt({destroy(){cancelAnimationFrame(f),clearTimeout(Ve),nt(),bt.disconnect(),dn(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(rt),Lt();},replay(){fe=-1,J=[],Q=-1,et=-1,c=false,j=false,he=0,w=false,se=0,ze.clear(),clearTimeout(Ve),Ue(),_e=true,ht()&&tt();},pause(){w=true,nt();},resume(){w&&(w=false,_e=true,ht()&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));se=l,fe=l,J=[],w=true,nt(),un(l,S),_e=true;},getProgress(){return se},refresh(){clearTimeout(rt),Ft(),ht()&&!w&&tt();}},()=>({tStart:oe,tEnd:Z}))}var Xt=new WeakMap,On=0;function Kt(e){return JSON.stringify(e,(r,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let n=Xt.get(t);return n===void 0&&Xt.set(t,n=++On),`el#${n}`}return t})}function Zt(e,r){let t={...e};for(let n of Object.keys(t))typeof t[n]=="function"&&(t[n]=(...s)=>r()[n]?.(...s));return t}function $n(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Jt(e){let r=[],t=/([\w]+)\(([^)]*)\)/g,n;for(;(n=t.exec(e))!==null;){let s=[],i=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let p=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(p?parseFloat(p[1]):0),i.push(p?p[2]:"");}r.push({fn:n[1],nums:s,units:i});}return r}function kn(e,r,t){let n=Jt(e),s=Jt(r);return n.length===0||n.length!==s.length?t<1?e:r:n.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((p,y)=>`${p}${i.units[y]}`).join(", ")})`:`${m.fn}(${m.nums.map((p,y)=>`${p}${m.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((p,y)=>`${p+(m.nums[y]-p)*t}${i.units[y]}`).join(", ")})`}).join(" ")}function en(e,r,t){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*t);let n=String(e),s=String(r);if($n(n))return it(n,s,t);if(n.includes("("))return kn(n,s,t);let i=n.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),p=parseFloat(a[1]);return `${m+(p-m)*t}${i[2]||a[2]}`}return t<1?n:s}function In(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var Rn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Fn=0,tn="--scroll-draw-progress";function Dn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var rn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,r){return typeof window>"u"?rn:r.respectReducedMotion===false?nn(e,r,false):We(r,(t,n)=>nn(e,t,n))}function nn(e,r,t){let{props:n,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:p="y",scrollContainer:y,native:E=true,velocityScale:D=false,triggerElement:S,onProgress:Y,onComplete:te,onEnter:L,onLeave:ne,onEnterBack:we,onLeaveBack:P}=r,I=typeof i=="function"?i:ee[i]??ee["ease-out"],O=de(s.start||"top bottom"),A=de(s.end||"bottom top"),b=S??e,h=typeof y=="string"?document.querySelector(y):y??null,v=Object.entries(n).map(([c,f])=>({prop:In(c),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function G(){let c=window.getComputedStyle(e);for(let f of v)f.from===""&&(f.from=c.getPropertyValue(f.prop).trim()||"0");}function _(){for(let c of v)e.style.setProperty(c.prop,String(c.to));}let q=new Map;for(let c of [...v.map(f=>f.prop),tn])q.set(c,e.style.getPropertyValue(c));function N(){for(let[c,f]of q)f?e.style.setProperty(c,f):e.style.removeProperty(c);}if(t)return _(),te?.(),{...rn,destroy:N,getProgress:()=>1};G();let R=()=>h?p==="x"?h.scrollLeft:h.scrollTop:p==="x"?window.scrollX:window.scrollY,re=()=>h?p==="x"?h.clientWidth:h.clientHeight:p==="x"?window.innerWidth:window.innerHeight,Te=typeof i=="string"?at(i):null;function ce(){if(!E||!Dn()||!Te||p!=="y"||h||b!==e||m||a!==1||Y||te||L||ne||we||P||D!==false||(s.start||"top bottom").trim()!=="top bottom"||(s.end||"bottom top").trim()!=="bottom top")return false;for(let c of v)if(!Rn.has(c.prop))return false;return true}function H(){let c=`ssd-a-${++Fn}`,f=v.map(w=>`${w.prop}:${w.from}`).join(";"),Ae=v.map(w=>`${w.prop}:${w.to}`).join(";"),fe=document.createElement("style");fe.setAttribute("data-ssd-animate",""),fe.textContent=`@keyframes ${c}{from{${f}}to{${Ae}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Te};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(fe),e.classList.add(c);let J=()=>{let w=e.getBoundingClientRect();return Le({top:w.top,height:w.height},R(),re(),O,A)};Ce(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:J});let Q={refresh(){},destroy(){e.classList.remove(c),fe.remove(),e.style.animationPlayState="",N(),Pe(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(w){let se=Math.min(1,Math.max(0,w));e.classList.remove(c);for(let he of v)e.style.setProperty(he.prop,en(he.from,he.to,se));},getProgress(){let{tStart:w,tEnd:se}=J();return I(U(R(),w,se,a))}};return Q}if(ce())return H();let $=0,k=0,u=0,d=NaN,X=false,xe=-1,V=0,K=0,Oe=false,x=NaN,T=-1,ue=0,me=b===e?v:[],$e=false;function Re(){let c=e.style,f=me.map(Q=>c.getPropertyValue(Q.prop)),Ae=c.transition;me.length&&(c.transition="none"),me.forEach(Q=>c.setProperty(Q.prop,q.get(Q.prop)??""));let fe=ot(b,h,p);me.forEach((Q,w)=>c.setProperty(Q.prop,f[w])),me.length&&(e.offsetWidth,c.transition=Ae);let J=Le(fe,fe.scroll,re(),O,A);$e&&Math.abs(J.tStart-$)<1&&Math.abs(J.tEnd-k)<1||($e=true,$=J.tStart,k=J.tEnd);}function Me(c){e.style.setProperty(tn,String(c));for(let f of v)e.style.setProperty(f.prop,en(f.from,f.to,c));Y?.(c);}function Ne(c){if(isNaN(x)){x=c;return}x<=0&&c>0?L?.():x>0&&c<=0&&P?.(),x<1&&c>=1?ne?.():x>=1&&c<1&&we?.(),x=c;}let Fe=c=>U(c,$,k,Math.min(a,1));function F(){!u&&!X&&Fe(R())!==d&&(u=requestAnimationFrame(ye));}function ye(){if(X)return;let c=performance.now(),f=R(),Ae=a;if(D!==false){let w=c-ue,se=w>0?Math.abs(f-(T<0?f:T))/w:0;Ae=a*Math.max(.2,1+se*(typeof D=="number"?D:1)*.04);}T=f,ue=c;let fe=k===$?0:(f-$)/(k-$);Ne(fe);let J=U(f,$,k,Ae),Q=m?Math.max(xe,I(V=Math.max(V,J))):I(J);K=Q,Me(Q),Q>=1&&!Oe?(Oe=true,te?.()):Q<1&&!m&&(Oe=false),!X&&(d=Fe(f),u=d>0&&d<1?requestAnimationFrame(ye):0);}Re(),k===$&&ge("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),V=U(R(),$,k,a),K=I(V),Me(K);function ve(){Re(),F();}let oe;function Z(){clearTimeout(oe),oe=setTimeout(ve,150);}let qe=h??window;qe.addEventListener("scroll",F,{passive:true}),window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z);let Je=ke([b],Z);F(),Ce(e,{type:"animate",getProgress:()=>K,getTrigger:()=>({tStart:$,tEnd:k})});function j(){X=true,cancelAnimationFrame(u),u=0,d=NaN;}return {destroy(){j(),qe.removeEventListener("scroll",F),window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),Je(),clearTimeout(oe),N(),Pe(e);},replay(){xe=-1,V=0,Oe=false,K=0,X=false,Me(0),d=0,F();},pause:j,resume(){X&&(X=false,F());},seek(c){let f=Math.min(1,Math.max(0,c));K=f,xe=f,V=0,j(),Me(f);},getProgress(){return K},refresh:ve}}var Et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,r){if(typeof window>"u")return Et;let t=typeof e=="string"?document.querySelector(e):e;return t?We(r,(n,s)=>Hn(t,n,s)):(ge("scrollCounter: element not found:",e),Et)}function Hn(e,r,t){let{from:n=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:p=true,decimals:y,onComplete:E}=r,D=y!==void 0?u=>u.toFixed(y):i??(u=>String(Math.round(u))),S=typeof a=="function"?a:ee[a]??ee["ease-out"],Y=de(m.start||"top 80%"),te=de(m.end||"top 20%");if(t)return e.textContent=D(s),E?.(),{...Et,getProgress:()=>1};let L=0,ne=0,we=false,P=0,I=false,O=false,A=-1,b=0,h=0,v=false,G=()=>window.scrollY,_=()=>window.innerHeight;function q(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},G(),_(),Y,te);we&&Math.abs(d.tStart-L)<1&&Math.abs(d.tEnd-ne)<1||(we=true,L=d.tStart,ne=d.tEnd);}let N=e.style.getPropertyValue("--scroll-draw-progress");function R(u){e.textContent=D(n+(s-n)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function re(){if(!I||O)return;let u=U(G(),L,ne,1),d=p?Math.max(A,S(b=Math.max(b,u))):S(u);h=d,R(d),d>=1&&!v?(v=true,E?.()):d<1&&!p&&(v=false),P=requestAnimationFrame(re);}q();{b=U(G(),L,ne,1);let u=S(b);h=u,R(u);}let Te=new IntersectionObserver(u=>{u.forEach(d=>{I=d.isIntersecting,I&&!O?P=requestAnimationFrame(re):cancelAnimationFrame(P);});}),ce;function H(){clearTimeout(ce),ce=setTimeout(q,150);}window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let $=ke([e],H);Te.observe(e),Ce(e,{type:"counter",getProgress:()=>h,getTrigger:()=>({tStart:L,tEnd:ne})});function k(){O&&(O=false,I&&(P=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(P),Te.disconnect(),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),$(),clearTimeout(ce),e.style.setProperty("--scroll-draw-progress",N),Pe(e);},replay(){A=-1,b=0,v=false,h=0,R(0),k();},pause(){O=true,cancelAnimationFrame(P);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));h=d,A=d,b=0,O=true,cancelAnimationFrame(P),R(d);},getProgress(){return h}}}var on={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Tt(e,r={}){if(typeof window>"u")return on;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return ge("scrollVideo: <video> element not found:",e),on;let n=t,{trigger:s={},easing:i="linear",once:a=false,axis:m="y",preload:p="auto",triggerElement:y,onReady:E,onComplete:D,onProgress:S}=r,Y=y??n,te=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof i=="function"?i:ee[i]??ee.linear,ne=de(s.start||"top top"),we=de(s.end||"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=p);let P=r.from??0,I=r.to,O=0,A=0,b=0,h=false,v=false,G=-1,_=0,q=0,N=false,R=false,re=()=>m==="x"?window.scrollX:window.scrollY,Te=()=>m==="x"?window.innerWidth:window.innerHeight;function ce(){let x=Y.getBoundingClientRect(),T=m==="x"?x.left:x.top,ue=m==="x"?x.width:x.height,me=Le({top:T,height:ue},re(),Te(),ne,we);O=me.tStart,A=me.tEnd,R&&A===O&&ge("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let H=NaN;function $(x){if(!R)return;let T=I??n.duration??0,ue=P+(T-P)*x;ue!==H&&(H=ue,n.currentTime=ue),n.style.setProperty("--scroll-draw-progress",String(x)),S?.(x);}function k(){if(!h||v||!R||te)return;let x=U(re(),O,A,1),T=a?Math.max(G,L(_=Math.max(_,x))):L(x);q=T,$(T),T>=1&&!N?(N=true,D?.()):T<1&&!a&&(N=false),b=requestAnimationFrame(k);}function u(){if(R=true,I===void 0&&(I=n.duration),te){$(1),E?.();return}ce(),E?.(),v?$(q):h&&(b=requestAnimationFrame(k));}n.readyState>=1?u():n.addEventListener("loadedmetadata",u,{once:true}),R||ce();let d=te?()=>{}:ut(x=>{x&&(d(),te=true,cancelAnimationFrame(b),$(1));}),X=new IntersectionObserver(x=>{x.forEach(T=>{h=T.isIntersecting,h&&!v&&R?b=requestAnimationFrame(k):cancelAnimationFrame(b);});}),xe;function V(){clearTimeout(xe),xe=setTimeout(ce,150);}window.addEventListener("resize",V),window.addEventListener("orientationchange",V);let K=ke([Y],V);X.observe(n),Ce(n,{type:"video",getProgress:()=>q,getTrigger:()=>({tStart:O,tEnd:A})});function Oe(){v&&(v=false,h&&R&&(b=requestAnimationFrame(k)));}return {destroy(){cancelAnimationFrame(b),X.disconnect(),n.removeEventListener("loadedmetadata",u),window.removeEventListener("resize",V),window.removeEventListener("orientationchange",V),K(),d(),clearTimeout(xe),Pe(n);},replay(){G=-1,_=0,N=false,q=0,H=NaN,$(0),Oe();},pause(){v=true,cancelAnimationFrame(b);},resume:Oe,seek(x){let T=Math.min(1,Math.max(0,x));q=T,G=T,_=0,v=true,cancelAnimationFrame(b),H=NaN,$(T);},getProgress(){return q}}}function sn(e,r){let t=document.createElement("span");t.textContent=r,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 mt(e=""){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=e,r}function ln(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(t=>{let n=e.appendChild(mt(t)),s=/^\s+$/.test(t);return s?n.style.whiteSpace="pre":n.style.display="inline-block",s?null:n}).filter(t=>t!==null)}function Nn(e){let r=e.textContent??"";e.textContent="";let t=[],n=null;for(let s of r){let i=mt(s),a=s===" ";a?i.style.whiteSpace="pre":(i.style.display="inline-block",t.push(i)),a||s>"\u0DFF"?n=null:n||(n=e.appendChild(mt()),n.style.cssText="display:inline-block;white-space:nowrap"),(n??e).appendChild(i);}return t}function an(e){let r=ln(e),t=new Map;for(let i of r){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let n=[],s=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of s){let a=t.get(i),m=mt();m.style.display="inline-block",a.forEach((p,y)=>{let E=p.nextElementSibling;m.appendChild(p),y<a.length-1&&E&&E.style.whiteSpace==="pre"&&m.appendChild(E);}),n.push(m);}return e.textContent="",n.forEach((i,a)=>{e.appendChild(i),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function Vn(e,r,t,n){if(t<=1||n===0)return e;n=Math.min(n,1/t);let s=(t-1)*n,i=r*n,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function zn(e,r){let t=[];if(r?.y!==void 0&&t.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&t.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&t.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let n=r.scale+(1-r.scale)*e;t.push(`scale(${n})`);}return t.join(" ")}var xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Mt(e,r={}){if(typeof window>"u")return xt;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return ge("scrollText: element not found:",e),xt;let n=t;return We(r,(s,i)=>_n(n,s,i))}function _n(e,r,t){let{split:n="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:p=true,onComplete:y}=r,E=typeof i=="function"?i:ee[i]??ee["ease-out"],D=de(m.start||"top 85%"),S=de(m.end||"top 40%"),Y=e.innerHTML,te=e.textContent??"",L;n==="chars"?L=Nn(e):n==="lines"?L=an(e):L=ln(e),sn(e,te);let ne=L.length;function we(u,d){a?.opacity!==void 0&&(u.style.opacity=String(a.opacity+(1-a.opacity)*d));let X=zn(d,a);X&&(u.style.transform=X);}function P(u){e.style.setProperty("--scroll-draw-progress",String(u)),L.forEach((d,X)=>{let xe=E(Vn(u,X,ne,s));we(d,xe);});}if(t)return P(1),y?.(),{...xt,destroy:()=>{e.innerHTML=Y;},getProgress:()=>1};P(0);let I=0,O=0,A=0,b=false,h=false,v=-1,G=0,_=false,q=()=>window.scrollY,N=()=>window.innerHeight;function R(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},q(),N(),D,S);I=d.tStart,O=d.tEnd;}function re(){if(!b||h)return;let u=U(q(),I,O,1);p&&(v=Math.max(v,u),u=v),G=u,P(u),u>=1&&!_?(_=true,y?.()):u<1&&!p&&(_=false),A=requestAnimationFrame(re);}R();let Te=new IntersectionObserver(u=>{u.forEach(d=>{b=d.isIntersecting,b&&!h?A=requestAnimationFrame(re):cancelAnimationFrame(A);});}),ce;function H(){clearTimeout(ce),ce=setTimeout(()=>{if(n==="lines"){let u=G;e.innerHTML=Y,L=an(e),sn(e,te),P(u);}R();},150);}window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let $=ke([e],H);Te.observe(e),Ce(e,{type:"text",getProgress:()=>G,getTrigger:()=>({tStart:I,tEnd:O})});function k(){h&&(h=false,b&&(A=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(A),Te.disconnect(),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),$(),clearTimeout(ce),e.innerHTML=Y,Pe(e);},replay(){v=-1,_=false,G=0,P(0),k();},pause(){h=true,cancelAnimationFrame(A);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));G=d,v=d,h=true,cancelAnimationFrame(A),P(d);},getProgress(){return G}}}function Ie(e,r){let t,n,s,i;return solidJs.createEffect(()=>{i=typeof e=="function"?e():e;let a=Kt(i);!t||a===s||(s=a,solidJs.untrack(()=>{n?.destroy(),n=r(t,Zt(i,()=>i));}));}),solidJs.onCleanup(()=>{n?.destroy(),n=s=void 0;}),{ref:a=>{t=a;},getInstance:()=>n}}function oo(e={}){return Ie(e,wt).ref}function so(e={}){return Ie(e,wt)}function io(e){return Ie(e,vt).ref}function ao(e){return Ie(e,vt)}function lo(e){return Ie(e,St).ref}function co(e){return Ie(e,St)}function uo(e={}){return Ie(e,Tt).ref}function mo(e={}){return Ie(e,Tt)}function fo(e={}){return Ie(e,Mt).ref}function po(e={}){return Ie(e,Mt)}exports.createScrollAnimate=ao;exports.createScrollCounter=co;exports.createScrollDraw=so;exports.createScrollText=po;exports.createScrollVideo=mo;exports.useScrollAnimate=io;exports.useScrollCounter=lo;exports.useScrollDraw=oo;exports.useScrollText=fo;exports.useScrollVideo=uo;
1
+ 'use strict';var solidJs=require('solid-js');function dr({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function gr({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(r),s=0,a=[];for(let p=0;p<t;p++){let g=Math.pow(o,p);a.push(g),s+=g;}let u=[0],f=0;for(let p=0;p<t;p++)f+=a[p]/s,u.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let g=0;g<t;g++)if(p<=u[g+1]){let x=(p-u[g])/(u[g+1]-u[g]);if(g===0)return x*(2-x);let y=1-Math.pow(r,g);return y+(1-y)*(2*x-1)*(2*x-1)}return 1}}function yr({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),o=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var ee={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:dr(),bounce:gr(),elastic:yr()};function Qe(e,n,t){return Math.min(t,Math.max(n,e))}function ie(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}}var Rt=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function It(e,n,t,r){return e+t+n*Rt(r,0)}function Nt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Rt(e,1))}function B(e,n,t,r){return t===n?0:Qe((e-n)/(t-n)*r,0,1)}function we(e,n,t,r,o){let s=It(e.top,e.height,n,r.element)-Nt(r.viewport,t),a=It(e.top,e.height,n,o.element)-Nt(o.viewport,t);return {tStart:s,tEnd:a}}function et(e,n,t){let r=e.getBoundingClientRect(),o=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:t==="x"?r.left:r.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function tt(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Vt(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 rt(e,n,t){let r=Vt(e),o=Vt(n);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*t)},${Math.round(r[1]+(o[1]-r[1])*t)},${Math.round(r[2]+(o[2]-r[2])*t)})`}var Ft={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ge=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ae(e,...n){Ge&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var hr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",br="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",_t=33;function wr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function vr(e){let n=[];for(let t=0;t<_t;t++){let r=t/(_t-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function nt(e){switch(e){case "linear":return "linear";case "ease-in":return hr;case "ease-out":return br;case "ease-in-out":return wr()?vr(ee["ease-in-out"]):null;default:return null}}var Wt=Symbol.for("svg-scroll-draw.registry");function zt(){let e=globalThis;return e[Wt]||(e[Wt]=new Map)}function ve(e,n){zt().set(e,n);}function Ee(e){zt().delete(e);}function ot(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.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 Re(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=ot(s=>{if(!s)return;r();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=n(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(t))o[s]=(...a)=>t[s]?.(...a);return o.destroy=()=>{r(),t.destroy();},o}var Ye,st=new Set,it=new WeakMap,Ue=new Map,Gt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Er(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 Bt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Ye??(Ye=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)it.get(a)!==Gt(a)&&(s=true),it.set(a,"");s&&st.forEach(a=>a());})),st.add(t);let r=Er(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{it.has(o)||it.set(o,Gt(o)),Ue.set(o,(Ue.get(o)??0)+1),Ye.observe(o);}),()=>{st.delete(t)&&(r.forEach(o=>{let s=(Ue.get(o)??1)-1;if(s)return void Ue.set(o,s);Ue.delete(o),Ye?.unobserve(o);}),st.size||(Ye?.disconnect(),Ye=void 0));}}function Me(e,n,t,r,o){let s,a=NaN,u,f,p=()=>{s=0,r(),!u&&!s&&(a=t())>0&&a<1&&(s=requestAnimationFrame(p));},g=()=>{!s&&!u&&t()!==a&&(s=requestAnimationFrame(p));},x=D=>{u=D,cancelAnimationFrame(s),s=a=NaN,g();},y=()=>{clearTimeout(f),o(),g();},H=()=>{clearTimeout(f),f=setTimeout(y,150);},j=Bt(n,H),w=D=>{e[D]("scroll",g,{passive:true}),window[D]("resize",H),window[D]("orientationchange",H);};return w("addEventListener"),g(),{hold:x,remeasure:y,off(){x(true),w("removeEventListener"),j(),clearTimeout(f);}}}var Sr=0;function Tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function jt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var qt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function xr(e){if(!Ge)return;let n=jt(e,"stroke");if(!n||n==="none"){ae("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!qt.has(t)&&!qt.has(jt(e,"fill"))&&ae("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Mr(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 o(){let s=t==="x"?window.scrollX:window.scrollY,a=e-s,u=n-s,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:${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(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Qt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Yt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Lr(e,n,t){if(!Ge)return;let r=(e.match(Yt)??[]).join("").toUpperCase(),o=(n.match(Yt)??[]).join("").toUpperCase(),s=(e.match(Qt)??[]).length,a=(n.match(Qt)??[]).length;if(r!==o){ae(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}s!==a&&ae(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function Ar(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=r[o++]??a;return String(+(a+(u-a)*t).toFixed(4))})}function gt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Re(n,(t,r)=>Cr(e,t,r))}function Cr(e,n,t){let{preset:r,...o}=n,s=r?{...Ft[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:p="linear",trigger:g={},stagger:x=0,direction:y="forward",once:H=false,debug:j=false,axis:w="y",scrollContainer:D,autoReverse:ue=false,delay:I=0,strokeColor:M,strokeWidth:A,fillOpacity:$,waypoints:v,velocityScale:C=false,threshold:N=0,rootMargin:te="0px",repeat:q=0,repeatDelay:V=0,morphTo:R,clip:E,autoplay:Y=false,duration:h=1e3,native:P=true,onProgress:Se,onStart:U,onComplete:_,onEnter:fe,onLeave:Te,onEnterBack:ge,onLeaveBack:me}=s,b=E===true?"left":typeof E=="string"?E:false,S=typeof p=="function"?p:ee[p]??ee.linear,ye=ie(g.start||"top bottom"),De=ie(g.end||"bottom top"),X=typeof D=="string"?document.querySelector(D):D??null,Ae=Array.isArray(M)?M[0]:null,Ce=Array.isArray(M)?M[1]:typeof M=="string"?M:null,he=Array.isArray(A)?A[0]:null,Ie=Array.isArray(A)?A[1]:typeof A=="number"?A:null,Pe=Array.isArray($)?$[0]:null,be=Array.isArray($)?$[1]:typeof $=="number"?$:null;function $e(i){let c=i*100;switch(b){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(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let l=b?[]:Array.from(e.querySelectorAll(a)),m=[],K=[],O=0,F=0,Q=x,W=0,Ne=0,Z=false,Oe=false,ke=0,lt=-1,Xe=[],Ke=-1,pe=false,xe=0,Ve=0,Fe,ct=false,ut=null;function St(){ut?.destroy(),ut=null;}let _e=new Set,Tt=NaN,We=true,Ze=-1,xt=performance.now(),ze=NaN;function Je(){return X?w==="x"?X.scrollLeft:X.scrollTop:w==="x"?window.scrollX:window.scrollY}function Mt(){return X?w==="x"?X.clientWidth:X.clientHeight:w==="x"?window.innerWidth:window.innerHeight}function Lt(){let i=et(e,X,w);return we(i,i.scroll,Mt(),ye,De)}function ar(){let i=F-O,c=l.length-1,d=X??document.documentElement,L=w==="x"?"Width":"Height";if(Q=x,x>0&&c>0&&i>0){let re=d[`scroll${L}`]-d[`client${L}`]-1-O-i/u;re>=0&&(Q=Math.min(x,re/(c*i)));}let J=Math.max(0,c)*Q*i,le=i/Math.min(u,1);W=O+Math.min(0,J,le,J+le),Ne=O+Math.max(0,J,le,J+le);}function At(){(({tStart:O,tEnd:F}=Lt())),ar(),j&&Ge&&(St(),ut=Mr(O,F,w));}function ft(i,c=Lt){ve(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:c});let d=i.destroy;return i.destroy=()=>{d.call(i),Ee(e);},i}function Ct(i,c){return H&&!ue?Math.max(lt,S(Xe[i]=Math.max(Xe[i]??0,c))):S(c)}function lr(i,c){if(e.style.setProperty("--scroll-draw-progress",String(i)),b){let d=c==="reverse"?1-i:i;e.style.clipPath=$e(d);return}l.forEach((d,L)=>mt(d,L,i,c));}function mt(i,c,d,L){i.style.strokeDashoffset=L==="reverse"?`${m[c]*d}`:`${m[c]*(1-d)}`,f&&(i.style.opacity=L==="reverse"?`${1-d}`:`${d}`),Ae&&Ce?i.style.stroke=rt(Ae,Ce,d):Ce&&(i.style.stroke=Ce),he!==null&&Ie!==null?i.style.strokeWidth=`${he+(Ie-he)*d}`:Ie!==null&&(i.style.strokeWidth=`${Ie}`),Pe!==null&&be!==null?i.style.fillOpacity=`${Pe+(be-Pe)*d}`:be!==null&&(i.style.fillOpacity=`${be}`),R&&i.tagName.toLowerCase()==="path"&&K[c]&&i.setAttribute("d",Ar(K[c],R,d));}function pt(){if(e.style.setProperty("--scroll-draw-progress","0"),b){e.style.clipPath=$e(y==="reverse"?1:0);return}l.forEach((i,c)=>{i.style.strokeDasharray=`${m[c]}`,i.style.strokeDashoffset=y==="reverse"?"0":`${m[c]}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Pe!==null&&(i.style.fillOpacity=`${Pe}`),R&&i.tagName.toLowerCase()==="path"&&K[c]&&i.setAttribute("d",K[c]);});}function Be(i,c){let d=i.getAttribute("d"),L=tt(i);if(R&&K[c]){i.setAttribute("d",R);let J=tt(i);i.setAttribute("d",K[c]),L=Math.max(tt(i),J),i.setAttribute("d",d);}m[c]=L,i.style.strokeDasharray=`${L}`;}if(l.forEach((i,c)=>{xr(i);let d=i.tagName.toLowerCase()==="path";d?K.push(i.getAttribute("d")??""):K.push(""),Be(i,c);let L=m[c];R&&(d?Lr(K[K.length-1],R,i):ae(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),t?(i.style.strokeDashoffset=y==="reverse"?`${L}`:"0",f&&(i.style.opacity="1"),Ce&&(i.style.stroke=Ce),Ie!==null&&(i.style.strokeWidth=`${Ie}`),be!==null&&(i.style.fillOpacity=`${be}`),R&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",R)):(i.style.strokeDashoffset=y==="reverse"?"0":`${L}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Pe!==null&&(i.style.fillOpacity=`${Pe}`));}),t)return b&&(e.style.clipPath=$e(1)),_?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};b&&(e.style.clipPath=$e(y==="reverse"?1:0));let Pt=typeof p=="string"?nt(p):null;function cr(){return !(P===false||Y||j&&Ge||!Tr()||!l.length||!Pt||b||w!=="y"||X||u!==1||x!==0||H||ue||C!==false||R||v||q||I>0||Se||U||_||fe||Te||ge||me||M!=null||A!=null||$!=null||(g.start||"top bottom").trim()!=="top bottom"||(g.end||"bottom top").trim()!=="bottom top")}function ur(){let i=++Sr,c=`svg-scroll-draw-${i}`,d=`svg-scroll-draw-host-${i}`,L=`--svg-scroll-draw-${i}`,J=y==="reverse"?"0":"var(--ssd-len)",le=y==="reverse"?"var(--ssd-len)":"0",re=`stroke-dashoffset:${J};`,z=`stroke-dashoffset:${le};`;f&&(re+=`opacity:${y==="reverse"?1:0};`,z+=`opacity:${y==="reverse"?0:1};`);let G=document.createElement("style");G.setAttribute("data-svg-scroll-draw",""),G.textContent=`@keyframes ${c}{from{${re}}to{${z}}}.${d}{view-timeline-name:${L};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Pt};animation-fill-mode:both;animation-timeline:${L};animation-range:cover 0% cover 100%;}`,document.head.appendChild(G),e.classList.add(d);function se(T,k){T.style.setProperty("--ssd-len",String(m[k])),T.style.strokeDasharray=`${m[k]}`,T.style.strokeDashoffset="",T.style.opacity="",T.style.animationPlayState="",T.classList.add(c);}l.forEach(se);let ne=false,ce=-1;function de(){if(ce>=0)return ce;let T=e.getBoundingClientRect(),{tStart:k,tEnd:oe}=we({top:T.top,height:T.height},Je(),Mt(),ye,De);return S(B(Je(),k,oe,u))}return {destroy(){e.classList.remove(d),l.forEach(T=>{T.classList.remove(c),T.style.removeProperty("--ssd-len"),T.style.animationPlayState="";}),G.remove();},replay(){ne=false,ce=-1,l.forEach(se);},pause(){ne=true,l.forEach(T=>{T.style.animationPlayState="paused";});},resume(){ne&&(ne=false,l.forEach(T=>{T.style.animationPlayState="running";}));},seek(T){let k=Math.min(1,Math.max(0,T));ce=k,ne=true,l.forEach((oe,He)=>{oe.classList.remove(c),oe.style.strokeDashoffset=y==="reverse"?`${m[He]*k}`:`${m[He]*(1-k)}`,f&&(oe.style.opacity=y==="reverse"?`${1-k}`:`${k}`);});},getProgress(){return de()},refresh(){l.forEach((T,k)=>{Be(T,k),T.style.setProperty("--ssd-len",String(m[k]));});}}}if(cr())return ft(ur());function fr(){let i=Math.max(1,h),c=b?i:i*(1+Math.max(0,l.length-1)*x),d=0,L=0,J=false;function le(ce){let de=true,T=Math.min(1,Math.max(0,ce/c));if(b){let k=Math.min(1,Math.max(0,ce/i)),oe=S(k);xe=oe,e.style.setProperty("--scroll-draw-progress",String(oe)),e.style.clipPath=$e(y==="reverse"?1-oe:oe),Se?.(oe),k<1&&(de=false);}else {l.forEach((oe,He)=>{let pr=He*x*i,Dt=Math.min(1,Math.max(0,(ce-pr)/i));mt(oe,He,S(Dt),y),Dt<1&&(de=false);});let k=S(T);xe=k,Se?.(k),e.style.setProperty("--scroll-draw-progress",String(k));}if(v){let k=S(T);for(let oe in v){let He=parseFloat(oe);k>=He&&!_e.has(He)&&(_e.add(He),v[oe]?.());}}return de}function re(ce){if(pe)return;let de=ce-d;Oe||(Oe=true,U?.());let T=le(de);if(T&&!Z){Z=true,le(c),_?.(),Ve<(q==="infinite"?1/0:q??0)&&(Ve++,Fe=setTimeout(()=>{d=performance.now(),Oe=false,Z=false,_e.clear(),pt(),ke=requestAnimationFrame(re);},V));return}T||(ke=requestAnimationFrame(re));}function z(){cancelAnimationFrame(ke),clearTimeout(Fe),d=performance.now(),L=0,pe=false,Oe=false,Z=false,Ve=0,J=true,xe=0,_e.clear(),pt(),ke=requestAnimationFrame(re);}let G=new IntersectionObserver(ce=>{ce.forEach(de=>{de.isIntersecting&&!(H&&Z)?z():!de.isIntersecting&&!H&&!Z&&(cancelAnimationFrame(ke),clearTimeout(Fe),J=false);});},{root:X??null,threshold:N,rootMargin:te}),se;function ne(){clearTimeout(se),se=setTimeout(()=>l.forEach(Be),150);}return window.addEventListener("resize",ne),window.addEventListener("orientationchange",ne),I>0?setTimeout(()=>G.observe(e),I):G.observe(e),{destroy(){cancelAnimationFrame(ke),clearTimeout(Fe),G.disconnect(),window.removeEventListener("resize",ne),window.removeEventListener("orientationchange",ne),clearTimeout(se);},replay(){Ve=0,z();},pause(){pe||!J||(pe=true,L=performance.now()-d,cancelAnimationFrame(ke));},resume(){pe&&(pe=false,J=true,d=performance.now()-L,ke=requestAnimationFrame(re));},seek(ce){let de=Math.min(1,Math.max(0,ce));xe=de,pe=true,L=de*c,d=performance.now()-L,cancelAnimationFrame(ke),le(L);},getProgress(){return xe},refresh(){clearTimeout(se),l.forEach(Be);}}}if(Y)return ft(fr());At();let $t=()=>B(Je(),W,Ne,1);function Ot(){Z=true,_?.(),Ve<(q==="infinite"?1/0:q)&&(Ve++,Fe=setTimeout(()=>{ct=true;},V));}function kt(){lt=-1,Xe=[],Oe=false,Z=false,ct=false,_e.clear(),pt(),We=true;}function mr(){let i=performance.now(),c=Je();if(ct&&$t()%1&&kt(),!We&&C===false&&c===Tt)return;We=false,Tt=c;let d=u;if(C!==false){let z=i-xt,G=z>0?Math.abs(c-(Ze<0?c:Ze))/z:0;d=u*Math.max(.2,1+G*(typeof C=="number"?C:1)*.04);}Ze=c,xt=i;let L=ue?Ke===-1||c>=Ke?"forward":"reverse":y;Ke=c;let J=F-O,le=true,re=J===0?0:(c-O)/J;if(isNaN(ze)||(ze<=0&&re>0&&fe?.(),ze<1&&re>=1&&Te?.(),ze>=1&&re<1&&ge?.(),ze>0&&re<=0&&me?.()),ze=re,b){let z=Ct(0,B(c,O,F,d));xe=z,e.style.setProperty("--scroll-draw-progress",String(z));let G=L==="reverse"?1-z:z;e.style.clipPath=$e(G),Se?.(z),!Oe&&B(c,O,F,d)>0&&(Oe=true,U?.()),z>=1&&!Z?Ot():z<1&&!H&&(Z=false);return}if(l.forEach((z,G)=>{let se=G*Q*J,ne=Ct(G,B(c,O+se,F+se,d));mt(z,G,ne,L),G===0&&(xe=ne,Se?.(ne),e.style.setProperty("--scroll-draw-progress",String(ne))),ne<1&&(le=false);}),v){let z=S(B(c,O,F,d));for(let G in v){let se=parseFloat(G);z>=se&&!_e.has(se)&&(_e.add(se),v[G]?.());}}!Oe&&B(c,O,F,d)>0&&(Oe=true,U?.()),le&&!Z?Ot():!le&&!H&&(Z=false);}let je=Me(X??window,[e],$t,mr,()=>{let i=m.join();l.forEach(Be),At(),We=true,m.join()!==i&&qe();}),dt=I>0;function qe(){je.hold(pe||dt);}let Ht;return dt&&(Ht=setTimeout(()=>{dt=false,qe();},I)),qe(),ft({destroy(){clearTimeout(Fe),clearTimeout(Ht),je.off(),St();},replay(){kt(),Ke=-1,Ze=-1,Ve=0,pe=false,xe=0,clearTimeout(Fe),qe();},pause(){pe=true,je.hold(true);},resume(){pe&&(pe=false,We=true,qe());},seek(i){let c=Math.min(1,Math.max(0,i));xe=c,lt=c,Xe=[],pe=true,je.hold(true),lr(c,y),We=true;},getProgress(){return xe},refresh:je.remeasure},()=>({tStart:O,tEnd:F}))}var Ut=new WeakMap,Pr=0;function Xt(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=Ut.get(t);return r===void 0&&Ut.set(t,r=++Pr),`el#${r}`}return t})}function Kt(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...o)=>n()[r]?.(...o));return t}function $r(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Zt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),s.push(f?f[2]:"");}n.push({fn:r[1],nums:o,units:s});}return n}function Or(e,n,t){let r=Zt(e),o=Zt(n);return r.length===0||r.length!==o.length?t<1?e:n:r.map((s,a)=>{let u=o[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?t<1?`${s.fn}(${s.nums.map((f,p)=>`${f}${s.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,p)=>`${f}${u.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((f,p)=>`${f+(u.nums[p]-f)*t}${s.units[p]}`).join(", ")})`}).join(" ")}function Jt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),o=String(n);if($r(r))return rt(r,o,t);if(r.includes("("))return Or(r,o,t);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),f=parseFloat(a[1]);return `${u+(f-u)*t}${s[2]||a[2]}`}return t<1?r:o}function kr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Hr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Dr=0,er="--scroll-draw-progress";function Ir(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var rr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function yt(e,n){return typeof window>"u"?rr:n.respectReducedMotion===false?tr(e,n,false):Re(n,(t,r)=>tr(e,t,r))}function tr(e,n,t){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:u=false,axis:f="y",scrollContainer:p,native:g=true,velocityScale:x=false,triggerElement:y,onProgress:H,onComplete:j,onEnter:w,onLeave:D,onEnterBack:ue,onLeaveBack:I}=n,M=typeof s=="function"?s:ee[s]??ee["ease-out"],A=ie(o.start||"top bottom"),$=ie(o.end||"bottom top"),v=y??e,C=typeof p=="string"?document.querySelector(p):p??null,N=Object.entries(r).map(([l,m])=>({prop:kr(l),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function te(){let l=window.getComputedStyle(e);for(let m of N)m.from===""&&(m.from=l.getPropertyValue(m.prop).trim()||"0");}function q(){for(let l of N)e.style.setProperty(l.prop,String(l.to));}let V=new Map;for(let l of [...N.map(m=>m.prop),er])V.set(l,e.style.getPropertyValue(l));function R(){for(let[l,m]of V)m?e.style.setProperty(l,m):e.style.removeProperty(l);}if(t)return q(),j?.(),{...rr,destroy:R,getProgress:()=>1};te();let E=()=>C?f==="x"?C.scrollLeft:C.scrollTop:f==="x"?window.scrollX:window.scrollY,Y=()=>C?f==="x"?C.clientWidth:C.clientHeight:f==="x"?window.innerWidth:window.innerHeight,h=typeof s=="string"?nt(s):null;function P(){if(!g||!Ir()||!h||f!=="y"||C||v!==e||u||a!==1||H||j||w||D||ue||I||x!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of N)if(!Hr.has(l.prop))return false;return true}function Se(){let l=`ssd-a-${++Dr}`,m=N.map(W=>`${W.prop}:${W.from}`).join(";"),K=N.map(W=>`${W.prop}:${W.to}`).join(";"),O=document.createElement("style");O.setAttribute("data-ssd-animate",""),O.textContent=`@keyframes ${l}{from{${m}}to{${K}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${h};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(O),e.classList.add(l);let F=()=>{let W=e.getBoundingClientRect();return we({top:W.top,height:W.height},E(),Y(),A,$)};ve(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:F});let Q={refresh(){},destroy(){e.classList.remove(l),O.remove(),e.style.animationPlayState="",R(),Ee(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(W){let Ne=Math.min(1,Math.max(0,W));e.classList.remove(l);for(let Z of N)e.style.setProperty(Z.prop,Jt(Z.from,Z.to,Ne));},getProgress(){let{tStart:W,tEnd:Ne}=F();return M(B(E(),W,Ne,a))}};return Q}if(P())return Se();let U=0,_=0,fe=false,Te=-1,ge=0,me=0,b=false,S=NaN,ye=-1,De=0,X=v===e?N:[],Ae=false;function Ce(){let l=e.style,m=X.map(Q=>l.getPropertyValue(Q.prop)),K=l.transition;X.length&&(l.transition="none"),X.forEach(Q=>l.setProperty(Q.prop,V.get(Q.prop)??""));let O=et(v,C,f);X.forEach((Q,W)=>l.setProperty(Q.prop,m[W])),X.length&&(e.offsetWidth,l.transition=K);let F=we(O,O.scroll,Y(),A,$);Ae&&Math.abs(F.tStart-U)<1&&Math.abs(F.tEnd-_)<1||(Ae=true,U=F.tStart,_=F.tEnd);}function he(l){e.style.setProperty(er,String(l));for(let m of N)e.style.setProperty(m.prop,Jt(m.from,m.to,l));H?.(l);}function Ie(l){if(isNaN(S)){S=l;return}S<=0&&l>0&&w?.(),S<1&&l>=1&&D?.(),S>=1&&l<1&&ue?.(),S>0&&l<=0&&I?.(),S=l;}function Pe(){if(fe)return;let l=performance.now(),m=E(),K=a;if(x!==false){let W=l-De,Ne=W>0?Math.abs(m-(ye<0?m:ye))/W:0;K=a*Math.max(.2,1+Ne*(typeof x=="number"?x:1)*.04);}ye=m,De=l;let O=_===U?0:(m-U)/(_-U);Ie(O);let F=B(m,U,_,K),Q=u?Math.max(Te,M(ge=Math.max(ge,F))):M(F);me=Q,he(Q),Q>=1&&!b?(b=true,j?.()):Q<1&&!u&&(b=false);}let be=Me(C??window,[v],()=>B(E(),U,_,Math.min(a,1)),Pe,Ce);Ce(),_===U&&ae("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ge=B(E(),U,_,a),me=M(ge),he(me),ve(e,{type:"animate",getProgress:()=>me,getTrigger:()=>({tStart:U,tEnd:_})});function $e(){fe=true,be.hold(true);}return {destroy(){fe=true,be.off(),R(),Ee(e);},replay(){Te=-1,ge=0,b=false,me=0,fe=false,he(0),be.hold(false);},pause:$e,resume(){fe&&(fe=false,be.hold(false));},seek(l){let m=Math.min(1,Math.max(0,l));me=m,Te=m,ge=0,$e(),he(m);},getProgress(){return me},refresh:be.remeasure}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n){if(typeof window>"u")return ht;let t=typeof e=="string"?document.querySelector(e):e;return t?Re(n,(r,o)=>Nr(t,r,o)):(ae("scrollCounter: element not found:",e),ht)}function Nr(e,n,t){let{from:r=0,to:o,format:s,easing:a="ease-out",trigger:u={},once:f=true,decimals:p,onComplete:g}=n,x=p!==void 0?h=>h.toFixed(p):s??(h=>String(Math.round(h))),y=typeof a=="function"?a:ee[a]??ee["ease-out"],H=ie(u.start||"top 80%"),j=ie(u.end||"top 20%");if(t)return e.textContent=x(o),g?.(),{...ht,getProgress:()=>1};let w=0,D=0,ue=false,I=-1,M=0,A=0,$=false,v=()=>window.scrollY,C=()=>window.innerHeight;function N(){let h=e.getBoundingClientRect(),P=we({top:h.top,height:h.height},v(),C(),H,j);ue&&Math.abs(P.tStart-w)<1&&Math.abs(P.tEnd-D)<1||(ue=true,w=P.tStart,D=P.tEnd);}let te=e.style.getPropertyValue("--scroll-draw-progress");function q(h){e.textContent=x(r+(o-r)*h),e.style.setProperty("--scroll-draw-progress",String(h));}let V=()=>B(v(),w,D,1);function R(){let h=V(),P=f?Math.max(I,y(M=Math.max(M,h))):y(h);A=P,q(P),P>=1&&!$?($=true,g?.()):P<1&&!f&&($=false);}N();{M=B(v(),w,D,1);let h=y(M);A=h,q(h);}let E=Me(window,[e],V,R,N);ve(e,{type:"counter",getProgress:()=>A,getTrigger:()=>({tStart:w,tEnd:D})});let Y=()=>E.hold(false);return {destroy(){E.off(),e.style.setProperty("--scroll-draw-progress",te),Ee(e);},replay(){I=-1,M=0,$=false,A=0,q(0),Y();},pause:()=>E.hold(true),resume:Y,seek(h){let P=Math.min(1,Math.max(0,h));A=P,I=P,M=0,E.hold(true),q(P);},getProgress(){return A}}}var nr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function wt(e,n={}){if(typeof window>"u")return nr;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return ae("scrollVideo: <video> element not found:",e),nr;let r=t,{trigger:o={},easing:s="linear",once:a=false,axis:u="y",preload:f="auto",triggerElement:p,onReady:g,onComplete:x,onProgress:y}=n,H=p??r,j=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=typeof s=="function"?s:ee[s]??ee.linear,D=ie(o.start||"top top"),ue=ie(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let I=n.from??0,M=n.to,A=0,$=0,v=false,C=-1,N=0,te=0,q=false,V=false,R=()=>u==="x"?window.scrollX:window.scrollY,E=()=>u==="x"?window.innerWidth:window.innerHeight;function Y(){let b=H.getBoundingClientRect(),S=u==="x"?b.left:b.top,ye=u==="x"?b.width:b.height,De=we({top:S,height:ye},R(),E(),D,ue);A=De.tStart,$=De.tEnd,V&&$===A&&ae("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let h=NaN;function P(b){if(!V)return;let S=M??r.duration??0,ye=I+(S-I)*b;ye!==h&&(h=ye,r.currentTime=ye),r.style.setProperty("--scroll-draw-progress",String(b)),y?.(b);}let Se=()=>B(R(),A,$,1);function U(){if(!V||j)return;let b=Se(),S=a?Math.max(C,w(N=Math.max(N,b))):w(b);te=S,P(S),S>=1&&!q?(q=true,x?.()):S<1&&!a&&(q=false);}let _=Me(window,[H],Se,U,Y),fe=()=>_.hold(v||!V||j);fe();function Te(){if(V=true,M===void 0&&(M=r.duration),j){P(1),g?.();return}Y(),g?.(),v?P(te):fe();}r.readyState>=1?Te():r.addEventListener("loadedmetadata",Te,{once:true}),V||Y();let ge=j?()=>{}:ot(b=>{b&&(ge(),j=true,_.hold(true),P(1));});ve(r,{type:"video",getProgress:()=>te,getTrigger:()=>({tStart:A,tEnd:$})});function me(){v&&(v=false,fe());}return {destroy(){_.off(),r.removeEventListener("loadedmetadata",Te),ge(),Ee(r);},replay(){C=-1,N=0,q=false,te=0,h=NaN,P(0),me();},pause(){v=true,_.hold(true);},resume:me,seek(b){let S=Math.min(1,Math.max(0,b));te=S,C=S,N=0,v=true,_.hold(true),h=NaN,P(S);},getProgress(){return te}}}function or(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 at(e=""){let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=e,n}function ir(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=e.appendChild(at(t)),o=/^\s+$/.test(t);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(t=>t!==null)}function Rr(e){let n=e.textContent??"";e.textContent="";let t=[],r=null;for(let o of n){let s=at(o),a=o===" ";a?s.style.whiteSpace="pre":(s.style.display="inline-block",t.push(s)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(at()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(s);}return t}function sr(e){let n=ir(e),t=new Map;for(let s of n){let a=s.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(s);}let r=[],o=Array.from(t.keys()).sort((s,a)=>s-a);for(let s of o){let a=t.get(s),u=at();u.style.display="inline-block",a.forEach((f,p)=>{let g=f.nextElementSibling;u.appendChild(f),p<a.length-1&&g&&g.style.whiteSpace==="pre"&&u.appendChild(g);}),r.push(u);}return e.textContent="",r.forEach((s,a)=>{e.appendChild(s),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Vr(e,n,t,r){if(t<=1||r===0)return e;r=Math.min(r,1/t);let o=(t-1)*r,s=n*r,a=s+(1-o);return a<=s?e>=s?1:0:Qe((e-s)/(a-s),0,1)}function Fr(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 vt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,n={}){if(typeof window>"u")return vt;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return ae("scrollText: element not found:",e),vt;let r=t;return Re(n,(o,s)=>_r(r,o,s))}function _r(e,n,t){let{split:r="words",stagger:o=.04,easing:s="ease-out",from:a={opacity:0,y:24},trigger:u={},once:f=true,onComplete:p}=n,g=typeof s=="function"?s:ee[s]??ee["ease-out"],x=ie(u.start||"top 85%"),y=ie(u.end||"top 40%"),H=e.innerHTML,j=e.textContent??"",w;r==="chars"?w=Rr(e):r==="lines"?w=sr(e):w=ir(e),or(e,j);let D=w.length;function ue(E,Y){a?.opacity!==void 0&&(E.style.opacity=String(a.opacity+(1-a.opacity)*Y));let h=Fr(Y,a);h&&(E.style.transform=h);}function I(E){e.style.setProperty("--scroll-draw-progress",String(E)),w.forEach((Y,h)=>{let P=g(Vr(E,h,D,o));ue(Y,P);});}if(t)return I(1),p?.(),{...vt,destroy:()=>{e.innerHTML=H;},getProgress:()=>1};I(0);let M=0,A=0,$=-1,v=0,C=false;function N(){({tStart:M,tEnd:A}=we(e.getBoundingClientRect(),window.scrollY,window.innerHeight,x,y));}let te=()=>B(window.scrollY,M,A,1);function q(){let E=f?$=Math.max($,te()):te();v=E,I(E),E>=1&&!C?(C=true,p?.()):E<1&&!f&&(C=false);}N();let V=Me(window,[e],te,q,()=>{r==="lines"&&(e.innerHTML=H,w=sr(e),or(e,j),I(v)),N();});ve(e,{type:"text",getProgress:()=>v,getTrigger:()=>({tStart:M,tEnd:A})});let R=()=>V.hold(false);return {destroy(){V.off(),e.innerHTML=H,Ee(e);},replay(){$=-1,C=false,v=0,I(0),R();},pause:()=>V.hold(true),resume:R,seek(E){V.hold(true),I(v=$=Qe(E,0,1));},getProgress(){return v}}}function Le(e,n){let t,r,o,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=Xt(s);!t||a===o||(o=a,solidJs.untrack(()=>{r?.destroy(),r=n(t,Kt(s,()=>s));}));}),solidJs.onCleanup(()=>{r?.destroy(),r=o=void 0;}),{ref:a=>{t=a;},getInstance:()=>r}}function ao(e={}){return Le(e,gt).ref}function lo(e={}){return Le(e,gt)}function co(e){return Le(e,yt).ref}function uo(e){return Le(e,yt)}function fo(e){return Le(e,bt).ref}function mo(e){return Le(e,bt)}function po(e={}){return Le(e,wt).ref}function go(e={}){return Le(e,wt)}function yo(e={}){return Le(e,Et).ref}function ho(e={}){return Le(e,Et)}exports.createScrollAnimate=uo;exports.createScrollCounter=mo;exports.createScrollDraw=lo;exports.createScrollText=ho;exports.createScrollVideo=go;exports.useScrollAnimate=co;exports.useScrollCounter=fo;exports.useScrollDraw=ao;exports.useScrollText=yo;exports.useScrollVideo=po;
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
- import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
3
- import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
2
+ import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
3
+ import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
4
4
  import { ScrollVideoOptions } from '../video/index.mjs';
5
5
  import { ScrollTextOptions } from '../text/index.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
- import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
3
- import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
2
+ import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
3
+ import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
4
4
  import { ScrollVideoOptions } from '../video/index.js';
5
5
  import { ScrollTextOptions } from '../text/index.js';
6
6
 
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-QFSTKVA3.mjs';import {a as a$4}from'../chunk-NLPSVYFP.mjs';import {a as a$2}from'../chunk-I73SOXBN.mjs';import {a as a$1}from'../chunk-OPXWNJBG.mjs';import {b as b$1}from'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.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';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-NYQJPPMP.mjs';import {a as a$4}from'../chunk-XNM3VKEK.mjs';import {a as a$2}from'../chunk-PAGN26EH.mjs';import {a as a$1}from'../chunk-VJ5ZU55P.mjs';import {b as b$1}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};