svg-scroll-draw 2.24.0 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +174 -30
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +60 -6
  4. package/dist/angular/index.d.ts +60 -6
  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 +69 -31
  11. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  12. package/dist/chunk-5SJE7725.mjs +1 -0
  13. package/dist/{chunk-NX74KN5X.mjs → chunk-5U4JXBHR.mjs} +1 -1
  14. package/dist/chunk-7LDSB4FT.mjs +1 -0
  15. package/dist/chunk-ASCOHQQD.mjs +2 -0
  16. package/dist/chunk-GBFWTY5L.mjs +1 -0
  17. package/dist/chunk-HAGTU5EX.mjs +1 -0
  18. package/dist/chunk-HJTHOZK5.mjs +1 -0
  19. package/dist/chunk-IXR6RML7.mjs +1 -0
  20. package/dist/chunk-KN2YB54Z.mjs +1 -0
  21. package/dist/chunk-NJV6S5LD.mjs +1 -0
  22. package/dist/chunk-UBH4K5YD.mjs +1 -0
  23. package/dist/chunk-UF3MO5XQ.mjs +1 -0
  24. package/dist/chunk-XLXVGQ3P.mjs +3 -0
  25. package/dist/chunk-YOOPMYT6.mjs +1 -0
  26. package/dist/chunk-Z72TVDHY.mjs +1 -0
  27. package/dist/cinematic/index.cjs +2 -2
  28. package/dist/cinematic/index.d.mts +3 -1
  29. package/dist/cinematic/index.d.ts +3 -1
  30. package/dist/cinematic/index.mjs +1 -1
  31. package/dist/{engine-6VsjEwzb.d.ts → engine-Bi2x8-X-.d.mts} +2 -2
  32. package/dist/{engine-BLWKCfxC.d.mts → engine-DAlvk6i0.d.ts} +2 -2
  33. package/dist/frames/index.cjs +1 -1
  34. package/dist/frames/index.d.mts +2 -2
  35. package/dist/frames/index.d.ts +2 -2
  36. package/dist/frames/index.mjs +1 -1
  37. package/dist/group/index.cjs +3 -3
  38. package/dist/group/index.d.mts +3 -3
  39. package/dist/group/index.d.ts +3 -3
  40. package/dist/group/index.mjs +1 -1
  41. package/dist/horizontal/index.cjs +1 -1
  42. package/dist/horizontal/index.d.mts +2 -2
  43. package/dist/horizontal/index.d.ts +2 -2
  44. package/dist/horizontal/index.mjs +1 -1
  45. package/dist/{index-BN8yKeQ3.d.ts → index-BMMZ8aW7.d.mts} +2 -2
  46. package/dist/{index-hSQqLVbg.d.ts → index-CEMsUTEG.d.ts} +3 -3
  47. package/dist/{index-DAiRJgtF.d.mts → index-ClAFxNEp.d.mts} +3 -3
  48. package/dist/{index-DVjblK_4.d.mts → index-MdQ4ti_z.d.ts} +2 -2
  49. package/dist/index.cjs +4 -4
  50. package/dist/index.d.mts +6 -6
  51. package/dist/index.d.ts +6 -6
  52. package/dist/index.mjs +1 -1
  53. package/dist/lenis/index.cjs +1 -1
  54. package/dist/lenis/index.d.mts +15 -16
  55. package/dist/lenis/index.d.ts +15 -16
  56. package/dist/lenis/index.mjs +1 -1
  57. package/dist/nuxt/index.cjs +3 -3
  58. package/dist/nuxt/index.d.mts +8 -5
  59. package/dist/nuxt/index.d.ts +8 -5
  60. package/dist/nuxt/index.mjs +1 -1
  61. package/dist/progress/index.cjs +1 -1
  62. package/dist/progress/index.d.mts +2 -2
  63. package/dist/progress/index.d.ts +2 -2
  64. package/dist/progress/index.mjs +1 -1
  65. package/dist/react/index.cjs +3 -3
  66. package/dist/react/index.d.mts +21 -5
  67. package/dist/react/index.d.ts +21 -5
  68. package/dist/react/index.mjs +1 -1
  69. package/dist/reveal/index.cjs +1 -1
  70. package/dist/reveal/index.d.mts +2 -2
  71. package/dist/reveal/index.d.ts +2 -2
  72. package/dist/reveal/index.mjs +1 -1
  73. package/dist/{scroll-draw-Fzir8hlU.d.mts → scroll-draw-CKZysh22.d.mts} +1 -1
  74. package/dist/{scroll-draw-BsU_Ohmu.d.ts → scroll-draw-DbY8RUJE.d.ts} +1 -1
  75. package/dist/snap/index.cjs +1 -1
  76. package/dist/snap/index.d.mts +2 -2
  77. package/dist/snap/index.d.ts +2 -2
  78. package/dist/snap/index.mjs +1 -1
  79. package/dist/solid/index.cjs +3 -3
  80. package/dist/solid/index.d.mts +40 -4
  81. package/dist/solid/index.d.ts +40 -4
  82. package/dist/solid/index.mjs +1 -1
  83. package/dist/svelte/index.cjs +3 -3
  84. package/dist/svelte/index.d.mts +47 -4
  85. package/dist/svelte/index.d.ts +47 -4
  86. package/dist/svelte/index.mjs +1 -1
  87. package/dist/text/index.cjs +1 -1
  88. package/dist/text/index.d.mts +2 -2
  89. package/dist/text/index.d.ts +2 -2
  90. package/dist/text/index.mjs +1 -1
  91. package/dist/timeline/index.cjs +10 -10
  92. package/dist/timeline/index.d.mts +2 -2
  93. package/dist/timeline/index.d.ts +2 -2
  94. package/dist/timeline/index.mjs +2 -2
  95. package/dist/{types-9bcJdVcg.d.mts → types-iITMwrru.d.mts} +10 -2
  96. package/dist/{types-9bcJdVcg.d.ts → types-iITMwrru.d.ts} +10 -2
  97. package/dist/video/index.cjs +1 -1
  98. package/dist/video/index.d.mts +2 -2
  99. package/dist/video/index.d.ts +2 -2
  100. package/dist/video/index.mjs +1 -1
  101. package/dist/vue/index.cjs +3 -3
  102. package/dist/vue/index.d.mts +37 -4
  103. package/dist/vue/index.d.ts +37 -4
  104. package/dist/vue/index.mjs +1 -1
  105. package/dist/web-component/index.cjs +3 -3
  106. package/dist/web-component/index.mjs +1 -1
  107. package/dist/wrapper-BOHrDnBO.d.mts +8 -0
  108. package/dist/wrapper-Cm7JTIVl.d.ts +8 -0
  109. package/package.json +1 -1
  110. package/dist/chunk-32ZCSGFZ.mjs +0 -1
  111. package/dist/chunk-5SKWSPQT.mjs +0 -1
  112. package/dist/chunk-7USW2XFB.mjs +0 -1
  113. package/dist/chunk-7XOFQCQE.mjs +0 -3
  114. package/dist/chunk-BDXWPUBJ.mjs +0 -2
  115. package/dist/chunk-BRV2B2YW.mjs +0 -1
  116. package/dist/chunk-QZKYGS74.mjs +0 -1
  117. package/dist/chunk-THPTANES.mjs +0 -1
  118. package/dist/chunk-U5TKLHGW.mjs +0 -1
  119. package/dist/chunk-V3Z6G5JE.mjs +0 -1
  120. package/dist/chunk-XSVTHCLO.mjs +0 -1
@@ -1 +1 @@
1
- import {a,e,c,b as b$2}from'../chunk-NV6YTPHI.mjs';import {d}from'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var k={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Oe(c){let f=c>1?[0,c-1]:[0],d=[[0,c-1]];for(let r=0;r<d.length;r++){let[l,h]=d[r];if(h-l<2)continue;let m=l+h>>1;f.push(m),d.push([l,m],[m,h]);}return f}function $e(c$1,f){if(typeof window>"u")return k;let d$1=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!d$1||d$1.tagName.toLowerCase()!=="canvas")return b("scrollFrames: <canvas> element not found:",c$1),k;let r=d$1,{frames:l,trigger:h={},easing:m="linear",once:J=false,axis:A="y",fit:be="cover",triggerElement:ye,onReady:ve,onLoad:Me,onComplete:xe,onProgress:Ee}=f||{},p=Array.isArray(l)?l:null,K=f?.count,w=Math.floor(p?Math.min(K??p.length,p.length):K??NaN);if(!(p||typeof l=="function")||!Number.isFinite(w)||w<1)return b("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",r),k;let b$3=f.concurrency??6;(!Number.isFinite(b$3)||b$3<1)&&(b("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",f.concurrency),b$3=6),b$3=Math.floor(b$3);let H=r.getContext("2d");if(!H)return b("scrollFrames: the canvas has no 2D context.",r),k;let y=w-1,Q=ye??r,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Fe=typeof m=="function"?m:d[m]??d.linear,V=e=>{let t=Fe(e);return t===t?t:0},Se=a(h.start||"top top"),Re=a(h.end||"bottom top"),C=0,P=0,E=false,W=-1,T=0,v=0,L=false,a$3=false,Z=false,ee=false,$=0,D=-1,O=new Array(w),U=new Uint8Array(w),F=new Set,M=i?[y]:Oe(w),q=0,G=0,te=false,z=(e,...t)=>{if(e)try{e(...t);}catch(n){typeof reportError=="function"?reportError(n):setTimeout(()=>{throw n});}},ne=false,Ae=e=>{let t;try{t=p?p[e]:l(e);}catch(n){t=n;}return typeof t=="string"&&t?t:(ne||(ne=true,b(`scrollFrames: no URL for frame ${e}; it is skipped for its nearest neighbour.`,t)),null)},re=()=>A==="x"?window.scrollX:window.scrollY,Ce=()=>A==="x"?window.innerWidth:window.innerHeight;function _(){!te&&G===M.length&&(te=true,z(Me));}function B(){for(;!a$3&&F.size<b$3&&q<M.length;){let e=M[q++];U[e]||Pe(e);}}function Pe(e){U[e]=1;let t=Ae(e);if(t===null){G++,queueMicrotask(()=>{a$3||_();});return}let n=new Image,o=false,s=g=>{o||a$3||(o=true,n.onload=n.onerror=null,F.delete(n),g?O[e]=n:b("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",t),G++,B(),I(),_());};F.add(n),n.decoding="async",n.onerror=()=>s(false),n.src=t,typeof n.decode=="function"?n.decode().then(()=>s(true),()=>{n.complete?s(n.naturalWidth>0):n.onload=()=>s(true);}):n.onload=()=>s(true);}function Te(e){for(let t=0;t<=y;t++){if(O[e-t])return e-t;if(O[e+t])return e+t}return -1}function X(){let e=r.clientWidth,t=r.clientHeight;if(!e||!t)return;let n=Math.min(window.devicePixelRatio||1,2),o=Math.round(e*n),s=Math.round(t*n);if(Math.abs(r.width-o)<=1&&Math.abs(r.height-s)<=1)return;r.width=o,r.height=s,D=-1;let g=r.clientWidth,R=r.clientHeight;if(g!==e||R!==t){let x=r.style;g!==e&&R!==t?(x.width=`${e}px`,x.height=`${t}px`):x.aspectRatio=`${e} / ${t}`;}}function I(){let e=Te($);if(e<0||e===D)return;let t=O[e],n=r.width,o=r.height,s=t.naturalWidth||n,g=t.naturalHeight||o,R=(be==="contain"?Math.min:Math.max)(n/s,o/g),x=s*R,fe=g*R;H.clearRect(0,0,n,o),H.drawImage(t,(n-x)/2,(o-fe)/2,x,fe),D=e,Z||(Z=true,z(ve));}function N(e){$=Math.min(y,Math.max(0,Math.round(e*y))),r.style.setProperty("--scroll-draw-progress",String(e)),I(),z(Ee,e,$);}function oe(){let e=Q.getBoundingClientRect(),t=A==="x"?e.left:e.top,n=A==="x"?e.width:e.height,o=c({top:t,height:n},re(),Ce(),Se,Re);C=o.tStart,P=o.tEnd,P===C&&n>0&&!i&&!ee&&(ee=true,b("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r));}let se=()=>b$2(re(),C,P,1);function Le(){if(i)return;let e=se(),t=J?Math.max(W,V(T=Math.max(T,e))):V(e);v=t,N(t),t>=1&&!L?(L=true,z(xe)):t<1&&!J&&(L=false);}function ie(){v=1,N(1);}X(),i||oe();let S=e(window,[Q],se,Le,()=>{X(),i||oe(),I();}),ae=()=>S.hold(E||i);ae(),i&&ie(),B();let ce=typeof ResizeObserver=="function"?new ResizeObserver(()=>{X(),I();}):null;ce?.observe(r);let le=i?()=>{}:a$1(e=>{e&&(le(),i=true,S.hold(true),M=M.slice(0,q),U[y]||M.push(y),_(),ie(),B());});a$2(r,{type:"frames",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:P})});function ue(){a$3||!E||(E=false,ae());}return {destroy(){if(!a$3){a$3=true,S.off(),ce?.disconnect(),le();for(let e of F)e.onload=e.onerror=null,e.src="";F.clear(),b$1(r);}},replay(){a$3||(W=-1,T=0,L=false,v=0,N(0),ue());},pause(){a$3||(E=true,S.hold(true));},resume:ue,seek(e){if(a$3)return;let t=Math.min(1,Math.max(0,e===e?e:0));v=t,W=t,T=0,E=true,S.hold(true),N(t);},getProgress(){return v}}}export{$e as scrollFrames};
1
+ export{a as scrollFrames}from'../chunk-GBFWTY5L.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';function or({tension:e=2.5,friction:n=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,n)}function sr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),a=0,u=[];for(let d=0;d<r;d++){let b=Math.pow(o,d);u.push(b),a+=b;}let i=[0],f=0;for(let d=0;d<r;d++)f+=u[d]/a,i.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<r;b++)if(d<=i[b+1]){let E=(d-i[b])/(i[b+1]-i[b]);if(b===0)return E*(2-E);let g=1-Math.pow(t,b);return g+(1-g)*(2*E-1)*(2*E-1)}return 1}}function ir({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return a=>a<=0?0:a>=1?1:r*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/t)+1}var ve={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:or(),bounce:sr(),elastic:ir()};function $t(e,n,r){return Math.min(r,Math.max(n,e))}function Ce(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}var Ct=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function kt(e,n,r,t){return e+r+n*Ct(t,0)}function Dt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Ct(e,1))}function Q(e,n,r,t){return r===n?0:$t((e-n)/(r-n)*t,0,1)}function Oe(e,n,r,t,o){let a=kt(e.top,e.height,n,t.element)-Dt(t.viewport,r),u=kt(e.top,e.height,n,o.element)-Dt(o.viewport,r);return {tStart:a,tEnd:u}}function Ze(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:t.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ke(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(t+o)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ot(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Je(e,n,r){let t=Ot(e),o=Ot(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var It={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ie=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function oe(e,...n){Ie&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let n=[];for(let r=0;r<Rt;r++){let t=r/(Rt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function et(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(ve["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function Ft(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Ge(e,n){Ft().set(e,n);}function We(e){Ft().delete(e);}function Ht(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",r),()=>n.removeEventListener("change",r);let t=n;return t.addListener?.(r),()=>t.removeListener?.(r)}function tt(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let r=n(e,false),t=Ht(a=>{if(!a)return;t();let u=(r.getProgress?.()??0)>=1;r.destroy(),r=n(u?{...e,onComplete:void 0}:e,true);}),o={};for(let a of Object.keys(r))o[a]=(...u)=>r[a]?.(...u);return o.destroy=()=>{t(),r.destroy();},o}var ze,rt=new Set,nt=new WeakMap,qe=new Map,_t=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function fr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Vt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();ze??(ze=new ResizeObserver(o=>{let a=false;for(let{target:u}of o)nt.get(u)!==_t(u)&&(a=true),nt.set(u,"");a&&rt.forEach(u=>u());})),rt.add(r);let t=fr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{nt.has(o)||nt.set(o,_t(o)),qe.set(o,(qe.get(o)??0)+1),ze.observe(o);}),()=>{rt.delete(r)&&(t.forEach(o=>{let a=(qe.get(o)??1)-1;if(a)return void qe.set(o,a);qe.delete(o),ze?.unobserve(o);}),rt.size||(ze?.disconnect(),ze=void 0));}}function ot(e,n,r,t,o){let a,u=NaN,i,f,d=()=>{a=0,t(),!i&&!a&&(u=r())>0&&u<1&&(a=requestAnimationFrame(d));},b=()=>{!a&&!i&&r()!==u&&(a=requestAnimationFrame(d));},E=U=>{i=U,cancelAnimationFrame(a),a=u=NaN,b();},g=()=>{clearTimeout(f),o(),b();},q=()=>{clearTimeout(f),f=setTimeout(g,150);},ge=Vt(n,q),_=U=>{e[U]("scroll",b,{passive:true}),window[U]("resize",q),window[U]("orientationchange",q);};return _("addEventListener"),b(),{hold:E,remeasure:g,off(){E(true),_("removeEventListener"),ge(),clearTimeout(f);}}}var mr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Gt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Ie)return;let n=Gt(e,"stroke");if(!n||n==="none"){oe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Wt.has(r)&&!Wt.has(Gt(e,"fill"))&&oe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let a=r==="x"?window.scrollX:window.scrollY,u=e-a,i=n-a,f=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${f?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}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:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,qt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,n,r){if(!Ie)return;let t=(e.match(qt)??[]).join("").toUpperCase(),o=(n.match(qt)??[]).join("").toUpperCase(),a=(e.match(zt)??[]).length,u=(n.match(zt)??[]).length;if(t!==o){oe(`morphTo: command sequence differs (${t||"\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.`,r);return}a!==u&&oe(`morphTo: coordinate count differs (${a} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function hr(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),i=t[o++]??u;return String(+(u+(i-u)*r).toFixed(4))})}function dt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:tt(n,(r,t)=>br(e,r,t))}function br(e,n,r){let{preset:t,...o}=n,a=t?{...It[t],...o}:o,{selector:u="path, polyline, line, polygon, rect, circle",speed:i=1,fade:f=false,easing:d="linear",trigger:b={},stagger:E=0,direction:g="forward",once:q=false,debug:ge=false,axis:_="y",scrollContainer:U,autoReverse:Pe=false,delay:ye=0,strokeColor:Y,strokeWidth:ee,fillOpacity:te,waypoints:X,velocityScale:R=false,threshold:J=0,rootMargin:st="0px",repeat:we=0,repeatDelay:Ae=0,morphTo:V,clip:se,autoplay:Ne=false,duration:je=1e3,native:it=true,onProgress:Ee,onStart:N,onComplete:G,onEnter:ie,onLeave:Le,onEnterBack:ae,onLeaveBack:re}=a,F=se===true?"left":typeof se=="string"?se:false,D=typeof d=="function"?d:ve[d]??ve.linear,$e=Ce(b.start||"top bottom"),Fe=Ce(b.end||"bottom top"),A=typeof U=="string"?document.querySelector(U):U??null,le=Array.isArray(Y)?Y[0]:null,ce=Array.isArray(Y)?Y[1]:typeof Y=="string"?Y:null,Z=Array.isArray(ee)?ee[0]:null,he=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null,ue=Array.isArray(te)?te[0]:null,K=Array.isArray(te)?te[1]:typeof te=="number"?te:null;function fe(s){let c=s*100;switch(F){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(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let l=F?[]:Array.from(e.querySelectorAll(u)),m=[],L=[],v=0,S=0,P=E,x=0,be=0,$=false,me=false,pe=0,at=-1,Qe=[],Ue=-1,B=false,ne=0,Se=0,xe,lt=false,ct=null;function yt(){ct?.destroy(),ct=null;}let Me=new Set,ht=NaN,ke=true,Ye=-1,bt=performance.now(),De=NaN;function Xe(){return A?_==="x"?A.scrollLeft:A.scrollTop:_==="x"?window.scrollX:window.scrollY}function vt(){return A?_==="x"?A.clientWidth:A.clientHeight:_==="x"?window.innerWidth:window.innerHeight}function wt(){let s=Ze(e,A,_);return Oe(s,s.scroll,vt(),$e,Fe)}function Zt(){let s=S-v,c=l.length-1,p=A??document.documentElement,h=_==="x"?"Width":"Height";if(P=E,E>0&&c>0&&s>0){let C=p[`scroll${h}`]-p[`client${h}`]-1-v-s/i;C>=0&&(P=Math.min(E,C/(c*s)));}let k=Math.max(0,c)*P*s,W=s/Math.min(i,1);x=v+Math.min(0,k,W,k+W),be=v+Math.max(0,k,W,k+W);}function Et(){(({tStart:v,tEnd:S}=wt())),Zt(),ge&&Ie&&(yt(),ct=gr(v,S,_));}function ut(s,c=wt){Ge(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let p=s.destroy;return s.destroy=()=>{p.call(s),We(e);},s}function St(s,c){return q&&!Pe?Math.max(at,D(Qe[s]=Math.max(Qe[s]??0,c))):D(c)}function Kt(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),F){let p=c==="reverse"?1-s:s;e.style.clipPath=fe(p);return}l.forEach((p,h)=>ft(p,h,s,c));}function ft(s,c,p,h){s.style.strokeDashoffset=h==="reverse"?`${m[c]*p}`:`${m[c]*(1-p)}`,f&&(s.style.opacity=h==="reverse"?`${1-p}`:`${p}`),le&&ce?s.style.stroke=Je(le,ce,p):ce&&(s.style.stroke=ce),Z!==null&&he!==null?s.style.strokeWidth=`${Z+(he-Z)*p}`:he!==null&&(s.style.strokeWidth=`${he}`),ue!==null&&K!==null?s.style.fillOpacity=`${ue+(K-ue)*p}`:K!==null&&(s.style.fillOpacity=`${K}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",hr(L[c],V,p));}function mt(){if(e.style.setProperty("--scroll-draw-progress","0"),F){e.style.clipPath=fe(g==="reverse"?1:0);return}l.forEach((s,c)=>{s.style.strokeDasharray=`${m[c]}`,s.style.strokeDashoffset=g==="reverse"?"0":`${m[c]}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ue!==null&&(s.style.fillOpacity=`${ue}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",L[c]);});}function He(s,c){let p=s.getAttribute("d"),h=Ke(s);if(V&&L[c]){s.setAttribute("d",V);let k=Ke(s);s.setAttribute("d",L[c]),h=Math.max(Ke(s),k),s.setAttribute("d",p);}m[c]=h,s.style.strokeDasharray=`${h}`;}if(l.forEach((s,c)=>{dr(s);let p=s.tagName.toLowerCase()==="path";p?L.push(s.getAttribute("d")??""):L.push(""),He(s,c);let h=m[c];V&&(p?yr(L[L.length-1],V,s):oe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),r?(s.style.strokeDashoffset=g==="reverse"?`${h}`:"0",f&&(s.style.opacity="1"),ce&&(s.style.stroke=ce),he!==null&&(s.style.strokeWidth=`${he}`),K!==null&&(s.style.fillOpacity=`${K}`),V&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",V)):(s.style.strokeDashoffset=g==="reverse"?"0":`${h}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ue!==null&&(s.style.fillOpacity=`${ue}`));}),r)return F&&(e.style.clipPath=fe(1)),G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F&&(e.style.clipPath=fe(g==="reverse"?1:0));let xt=typeof d=="string"?et(d):null;function Jt(){return !(it===false||Ne||ge&&Ie||!pr()||!l.length||!xt||F||_!=="y"||A||i!==1||E!==0||q||Pe||R!==false||V||X||we||ye>0||Ee||N||G||ie||Le||ae||re||Y!=null||ee!=null||te!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function er(){let s=++mr,c=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,h=`--svg-scroll-draw-${s}`,k=g==="reverse"?"0":"var(--ssd-len)",W=g==="reverse"?"var(--ssd-len)":"0",C=`stroke-dashoffset:${k};`,M=`stroke-dashoffset:${W};`;f&&(C+=`opacity:${g==="reverse"?1:0};`,M+=`opacity:${g==="reverse"?0:1};`);let T=document.createElement("style");T.setAttribute("data-svg-scroll-draw",""),T.textContent=`@keyframes ${c}{from{${C}}to{${M}}}.${p}{view-timeline-name:${h};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${h};animation-range:cover 0% cover 100%;}`,document.head.appendChild(T),e.classList.add(p);function H(y,w){y.style.setProperty("--ssd-len",String(m[w])),y.style.strokeDasharray=`${m[w]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(c);}l.forEach(H);let O=false,z=-1;function j(){if(z>=0)return z;let y=e.getBoundingClientRect(),{tStart:w,tEnd:I}=Oe({top:y.top,height:y.height},Xe(),vt(),$e,Fe);return D(Q(Xe(),w,I,i))}return {destroy(){e.classList.remove(p),l.forEach(y=>{y.classList.remove(c),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),T.remove();},replay(){O=false,z=-1,l.forEach(H);},pause(){O=true,l.forEach(y=>{y.style.animationPlayState="paused";});},resume(){O&&(O=false,l.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let w=Math.min(1,Math.max(0,y));z=w,O=true,l.forEach((I,de)=>{I.classList.remove(c),I.style.strokeDashoffset=g==="reverse"?`${m[de]*w}`:`${m[de]*(1-w)}`,f&&(I.style.opacity=g==="reverse"?`${1-w}`:`${w}`);});},getProgress(){return j()},refresh(){l.forEach((y,w)=>{He(y,w),y.style.setProperty("--ssd-len",String(m[w]));});}}}if(Jt())return ut(er());function tr(){let s=Math.max(1,je),c=F?s:s*(1+Math.max(0,l.length-1)*E),p=0,h=0,k=false;function W(z){let j=true,y=Math.min(1,Math.max(0,z/c));if(F){let w=Math.min(1,Math.max(0,z/s)),I=D(w);ne=I,e.style.setProperty("--scroll-draw-progress",String(I)),e.style.clipPath=fe(g==="reverse"?1-I:I),Ee?.(I),w<1&&(j=false);}else {l.forEach((I,de)=>{let nr=de*E*s,Lt=Math.min(1,Math.max(0,(z-nr)/s));ft(I,de,D(Lt),g),Lt<1&&(j=false);});let w=D(y);ne=w,Ee?.(w),e.style.setProperty("--scroll-draw-progress",String(w));}if(X){let w=D(y);for(let I in X){let de=parseFloat(I);w>=de&&!Me.has(de)&&(Me.add(de),X[I]?.());}}return j}function C(z){if(B)return;let j=z-p;me||(me=true,N?.());let y=W(j);if(y&&!$){$=true,W(c),G?.(),Se<(we==="infinite"?1/0:we??0)&&(Se++,xe=setTimeout(()=>{p=performance.now(),me=false,$=false,Me.clear(),mt(),pe=requestAnimationFrame(C);},Ae));return}y||(pe=requestAnimationFrame(C));}function M(){cancelAnimationFrame(pe),clearTimeout(xe),p=performance.now(),h=0,B=false,me=false,$=false,Se=0,k=true,ne=0,Me.clear(),mt(),pe=requestAnimationFrame(C);}let T=new IntersectionObserver(z=>{z.forEach(j=>{j.isIntersecting&&!(q&&$)?M():!j.isIntersecting&&!q&&!$&&(cancelAnimationFrame(pe),clearTimeout(xe),k=false);});},{root:A??null,threshold:J,rootMargin:st}),H;function O(){clearTimeout(H),H=setTimeout(()=>l.forEach(He),150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),ye>0?setTimeout(()=>T.observe(e),ye):T.observe(e),{destroy(){cancelAnimationFrame(pe),clearTimeout(xe),T.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(H);},replay(){Se=0,M();},pause(){B||!k||(B=true,h=performance.now()-p,cancelAnimationFrame(pe));},resume(){B&&(B=false,k=true,p=performance.now()-h,pe=requestAnimationFrame(C));},seek(z){let j=Math.min(1,Math.max(0,z));ne=j,B=true,h=j*c,p=performance.now()-h,cancelAnimationFrame(pe),W(h);},getProgress(){return ne},refresh(){clearTimeout(H),l.forEach(He);}}}if(Ne)return ut(tr());Et();let Mt=()=>Q(Xe(),x,be,1);function Tt(){$=true,G?.(),Se<(we==="infinite"?1/0:we)&&(Se++,xe=setTimeout(()=>{lt=true;},Ae));}function Pt(){at=-1,Qe=[],me=false,$=false,lt=false,Me.clear(),mt(),ke=true;}function rr(){let s=performance.now(),c=Xe();if(lt&&Mt()%1&&Pt(),!ke&&R===false&&c===ht)return;ke=false,ht=c;let p=i;if(R!==false){let M=s-bt,T=M>0?Math.abs(c-(Ye<0?c:Ye))/M:0;p=i*Math.max(.2,1+T*(typeof R=="number"?R:1)*.04);}Ye=c,bt=s;let h=Pe?Ue===-1||c>=Ue?"forward":"reverse":g;Ue=c;let k=S-v,W=true,C=k===0?0:(c-v)/k;if(isNaN(De)||(De<=0&&C>0&&ie?.(),De<1&&C>=1&&Le?.(),De>=1&&C<1&&ae?.(),De>0&&C<=0&&re?.()),De=C,F){let M=St(0,Q(c,v,S,p));ne=M,e.style.setProperty("--scroll-draw-progress",String(M));let T=h==="reverse"?1-M:M;e.style.clipPath=fe(T),Ee?.(M),!me&&Q(c,v,S,p)>0&&(me=true,N?.()),M>=1&&!$?Tt():M<1&&!q&&($=false);return}if(l.forEach((M,T)=>{let H=T*P*k,O=St(T,Q(c,v+H,S+H,p));ft(M,T,O,h),T===0&&(ne=O,Ee?.(O),e.style.setProperty("--scroll-draw-progress",String(O))),O<1&&(W=false);}),X){let M=D(Q(c,v,S,p));for(let T in X){let H=parseFloat(T);M>=H&&!Me.has(H)&&(Me.add(H),X[T]?.());}}!me&&Q(c,v,S,p)>0&&(me=true,N?.()),W&&!$?Tt():!W&&!q&&($=false);}let _e=ot(A??window,[e],Mt,rr,()=>{let s=m.join();l.forEach(He),Et(),ke=true,m.join()!==s&&Ve();}),pt=ye>0;function Ve(){_e.hold(B||pt);}let At;return pt&&(At=setTimeout(()=>{pt=false,Ve();},ye)),Ve(),ut({destroy(){clearTimeout(xe),clearTimeout(At),_e.off(),yt();},replay(){Pt(),Ue=-1,Ye=-1,Se=0,B=false,ne=0,clearTimeout(xe),Ve();},pause(){B=true,_e.hold(true);},resume(){B&&(B=false,ke=true,Ve());},seek(s){let c=Math.min(1,Math.max(0,s));ne=c,at=c,Qe=[],B=true,_e.hold(true),Kt(c,g),ke=true;},getProgress(){return ne},refresh:_e.remeasure},()=>({tStart:v,tEnd:S}))}function vr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],a=[],u=t[2].trim();if(u)for(let i of u.split(/[\s,]+/)){let f=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),a.push(f?f[2]:"");}n.push({fn:t[1],nums:o,units:a});}return n}function wr(e,n,r){let t=Bt(e),o=Bt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((a,u)=>{let i=o[u];return a.fn!==i.fn||a.nums.length!==i.nums.length?r<1?`${a.fn}(${a.nums.map((f,d)=>`${f}${a.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${a.fn}(${a.nums.map((f,d)=>`${f+(i.nums[d]-f)*r}${a.units[d]}`).join(", ")})`}).join(" ")}function gt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(vr(t))return Je(t,o,r);if(t.includes("("))return wr(t,o,r);let a=t.match(/^([-+]?[\d.]+)(.*)$/),u=o.match(/^([-+]?[\d.]+)(.*)$/);if(a&&u){let i=parseFloat(a[1]),f=parseFloat(u[1]);return `${i+(f-i)*r}${a[2]||u[2]}`}return r<1?t:o}function Er(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Sr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),xr=0,jt="--scroll-draw-progress";function Mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Re(e,n){return typeof window>"u"?Ut:n.respectReducedMotion===false?Qt(e,n,false):tt(n,(r,t)=>Qt(e,r,t))}function Qt(e,n,r){let{props:t,trigger:o={},easing:a="ease-out",speed:u=1,once:i=false,axis:f="y",scrollContainer:d,native:b=true,velocityScale:E=false,triggerElement:g,onProgress:q,onComplete:ge,onEnter:_,onLeave:U,onEnterBack:Pe,onLeaveBack:ye}=n,Y=typeof a=="function"?a:ve[a]??ve["ease-out"],ee=Ce(o.start||"top bottom"),te=Ce(o.end||"bottom top"),X=g??e,R=typeof d=="string"?document.querySelector(d):d??null,J=Object.entries(t).map(([l,m])=>({prop:Er(l),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function st(){let l=window.getComputedStyle(e);for(let m of J)m.from===""&&(m.from=l.getPropertyValue(m.prop).trim()||"0");}function we(){for(let l of J)e.style.setProperty(l.prop,String(l.to));}let Ae=new Map;for(let l of [...J.map(m=>m.prop),jt])Ae.set(l,e.style.getPropertyValue(l));function V(){for(let[l,m]of Ae)m?e.style.setProperty(l,m):e.style.removeProperty(l);}if(r)return we(),ge?.(),{...Ut,destroy:V,getProgress:()=>1};st();let se=()=>R?f==="x"?R.scrollLeft:R.scrollTop:f==="x"?window.scrollX:window.scrollY,Ne=()=>R?f==="x"?R.clientWidth:R.clientHeight:f==="x"?window.innerWidth:window.innerHeight,je=typeof a=="string"?et(a):null;function it(){if(!b||!Mr()||!je||f!=="y"||R||X!==e||i||u!==1||q||ge||_||U||Pe||ye||E!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of J)if(!Sr.has(l.prop))return false;return true}function Ee(){let l=`ssd-a-${++xr}`,m=J.map(x=>`${x.prop}:${x.from}`).join(";"),L=J.map(x=>`${x.prop}:${x.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${l}{from{${m}}to{${L}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${je};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(l);let S=()=>{let x=e.getBoundingClientRect();return Oe({top:x.top,height:x.height},se(),Ne(),ee,te)};Ge(e,{type:"animate",getProgress:()=>P.getProgress(),getTrigger:S});let P={refresh(){},destroy(){e.classList.remove(l),v.remove(),e.style.animationPlayState="",V(),We(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(x){let be=Math.min(1,Math.max(0,x));e.classList.remove(l);for(let $ of J)e.style.setProperty($.prop,gt($.from,$.to,be));},getProgress(){let{tStart:x,tEnd:be}=S();return Y(Q(se(),x,be,u))}};return P}if(it())return Ee();let N=0,G=0,ie=false,Le=-1,ae=0,re=0,F=false,D=NaN,$e=-1,Fe=0,A=X===e?J:[],le=false;function ce(){let l=e.style,m=A.map(P=>l.getPropertyValue(P.prop)),L=l.transition;A.length&&(l.transition="none"),A.forEach(P=>l.setProperty(P.prop,Ae.get(P.prop)??""));let v=Ze(X,R,f);A.forEach((P,x)=>l.setProperty(P.prop,m[x])),A.length&&(e.offsetWidth,l.transition=L);let S=Oe(v,v.scroll,Ne(),ee,te);le&&Math.abs(S.tStart-N)<1&&Math.abs(S.tEnd-G)<1||(le=true,N=S.tStart,G=S.tEnd);}function Z(l){e.style.setProperty(jt,String(l));for(let m of J)e.style.setProperty(m.prop,gt(m.from,m.to,l));q?.(l);}function he(l){if(isNaN(D)){D=l;return}D<=0&&l>0&&_?.(),D<1&&l>=1&&U?.(),D>=1&&l<1&&Pe?.(),D>0&&l<=0&&ye?.(),D=l;}function ue(){if(ie)return;let l=performance.now(),m=se(),L=u;if(E!==false){let x=l-Fe,be=x>0?Math.abs(m-($e<0?m:$e))/x:0;L=u*Math.max(.2,1+be*(typeof E=="number"?E:1)*.04);}$e=m,Fe=l;let v=G===N?0:(m-N)/(G-N);he(v);let S=Q(m,N,G,L),P=i?Math.max(Le,Y(ae=Math.max(ae,S))):Y(S);re=P,Z(P),P>=1&&!F?(F=true,ge?.()):P<1&&!i&&(F=false);}let K=ot(R??window,[X],()=>Q(se(),N,G,Math.min(u,1)),ue,ce);ce(),G===N&&oe("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ae=Q(se(),N,G,u),re=Y(ae),Z(re),Ge(e,{type:"animate",getProgress:()=>re,getTrigger:()=>({tStart:N,tEnd:G})});function fe(){ie=true,K.hold(true);}return {destroy(){ie=true,K.off(),V(),We(e);},replay(){Le=-1,ae=0,F=false,re=0,ie=false,Z(0),K.hold(false);},pause:fe,resume(){ie&&(ie=false,K.hold(false));},seek(l){let m=Math.min(1,Math.max(0,l));re=m,Le=m,ae=0,fe(),Z(m);},getProgress(){return re},refresh:K.remeasure}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return oe("scrollParallax: element not found:",e),Yt;let{speed:t=.3,axis:o="y",easing:a="linear",trigger:u,onProgress:i}=n,f=-t*100,d=r.style,b=!!r.ownerSVGElement,E=d.getPropertyValue("transform-box");b&&d.setProperty("transform-box","fill-box");let g=Re(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${f}%)`]}:{transform:["translateY(0%)",`translateY(${f}%)`]},trigger:u??{start:"top bottom",end:"bottom top"},easing:a,native:false,onProgress:i});return b?{...g,destroy(){g.destroy(),d.setProperty("transform-box",E);}}:g}function Be(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bn(e,n={}){if(typeof window>"u")return Te;let r=Be(e).map(t=>dt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function vn(e,n={}){if(typeof window>"u")return Te;let r=Be(e);if(r.length===0)return Te;let t=0,o=[];function a(i){return dt(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function u(){r.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return u(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,u();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function wn(e,n){if(typeof window>"u")return Te;let r=Be(e).map(t=>Re(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function En(e,n){if(typeof window>"u")return Te;let r=Be(e);if(r.length===0)return Te;let t=0,o=[];function a(i){return Re(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function u(){r.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return u(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,u();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Sn(e,n={}){if(typeof window>"u")return Te;let r=Be(e).map(t=>Xt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=wn;exports.scrollAnimateSequence=En;exports.scrollDrawGroup=bn;exports.scrollDrawSequence=vn;exports.scrollParallaxGroup=Sn;
1
+ 'use strict';var De=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function K(e,...n){De&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function lr({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function ur({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),a=0,l=[];for(let d=0;d<t;d++){let b=Math.pow(o,d);l.push(b),a+=b;}let i=[0],f=0;for(let d=0;d<t;d++)f+=l[d]/a,i.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<t;b++)if(d<=i[b+1]){let w=(d-i[b])/(i[b+1]-i[b]);if(b===0)return w*(2-w);let g=1-Math.pow(r,b);return g+(1-g)*(2*w-1)*(2*w-1)}return 1}}function cr({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 a=>a<=0?0:a>=1?1:t*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/r)+1}var Ce={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:lr(),bounce:ur(),elastic:cr()};function fr(e,n,t,r){let o=(a,l,i)=>((1+3*a-3*l)*i+3*l-6*a)*i*i+3*a*i;return a=>{if(a<=0||a>=1)return +(a>0);let l=a;for(let i=0;i<8;i++)l-=(o(e,t,l)-a)/((3*(1+3*e-3*t)*l+6*t-12*e)*l+3*e);if(!(l>=0&&l<=1&&Math.abs(o(e,t,l)-a)<1e-9))for(let i=0,f=0,d=1;i<30;i++)l=(f+d)/2,o(e,t,l)<a?f=l:d=l;return o(n,r,l)}}function yt(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [fr(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var Ct=new Set;function Ze(e,n="linear"){if(typeof e=="function")return e;if(e==null)return Ce[n];if({}.hasOwnProperty.call(Ce,e))return Ce[e];let t=yt(String(e));return t?t[0]:(!Ct.has(e)&&Ct.add(e)&&K(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),Ce[n])}function Ot(e,n,t){return Math.min(t,Math.max(n,e))}function Oe(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 Nt=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function It(e,n,t,r){return e+t+n*Nt(r,0)}function Rt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Nt(e,1))}function Q(e,n,t,r){return t===n?0:Ot((e-n)/(t-n)*r,0,1)}function Ie(e,n,t,r,o){let a=It(e.top,e.height,n,r.element)-Rt(r.viewport,t),l=It(e.top,e.height,n,o.element)-Rt(o.viewport,t);return {tStart:a,tEnd:l}}function Je(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 Ke(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 et(e){return `${e} ${e*2}`}function Ft(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 tt(e,n,t){let r=Ft(e),o=Ft(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 Ht={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 mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",_t=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let n=[];for(let t=0;t<_t;t++){let r=t/(_t-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return pr;case "ease-in-out":return dr()?gr(Ce["ease-in-out"]):null;default:return yt(e)?.[1]??null}}var Vt=Symbol.for("svg-scroll-draw.registry");function zt(){let e=globalThis;return e[Vt]||(e[Vt]=new Map)}function ze(e,n){zt().set(e,n);}function Ge(e){zt().delete(e);}function Gt(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 nt(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=Gt(a=>{if(!a)return;r();let l=(t.getProgress?.()??0)>=1;t.destroy(),t=n(l?{...e,onComplete:void 0}:e,true);}),o={};for(let a of Object.keys(t))o[a]=(...l)=>t[a]?.(...l);return o.destroy=()=>{r(),t.destroy();},o}var We,ot=new Set,st=new WeakMap,Be=new Map,Wt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function yr(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();We??(We=new ResizeObserver(o=>{let a=false;for(let{target:l}of o)st.get(l)!==Wt(l)&&(a=true),st.set(l,"");a&&ot.forEach(l=>l());})),ot.add(t);let r=yr(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{st.has(o)||st.set(o,Wt(o)),Be.set(o,(Be.get(o)??0)+1),We.observe(o);}),()=>{ot.delete(t)&&(r.forEach(o=>{let a=(Be.get(o)??1)-1;if(a)return void Be.set(o,a);Be.delete(o),We?.unobserve(o);}),ot.size||(We?.disconnect(),We=void 0));}}function it(e,n,t,r,o){let a,l=NaN,i,f,d=()=>{a=0,r(),!i&&!a&&(l=t())>0&&l<1&&(a=requestAnimationFrame(d));},b=()=>{!a&&!i&&t()!==l&&(a=requestAnimationFrame(d));},w=U=>{i=U,cancelAnimationFrame(a),a=l=NaN,b();},g=()=>{clearTimeout(f),o(),b();},B=()=>{clearTimeout(f),f=setTimeout(g,150);},ge=Bt(n,B),_=U=>{e[U]("scroll",b,{passive:true}),window[U]("resize",B),window[U]("orientationchange",B);};return _("addEventListener"),b(),{hold:w,remeasure:g,off(){w(true),_("removeEventListener"),ge(),clearTimeout(f);}}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function qt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var jt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Er(e){if(!De)return;let n=qt(e,"stroke");if(!n||n==="none"){K("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!jt.has(t)&&!jt.has(qt(e,"fill"))&&K("Element has a fill \u2014 it may obscure the stroke animation.",e);}function vr(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 a=t==="x"?window.scrollX:window.scrollY,l=e-a,i=n-a,f=t==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}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,Ut=/[MmLlHhVvCcSsQqTtAaZz]/g;function wr(e,n,t){if(!De)return;let r=(e.match(Ut)??[]).join("").toUpperCase(),o=(n.match(Ut)??[]).join("").toUpperCase(),a=(e.match(Qt)??[]).length,l=(n.match(Qt)??[]).length;if(r!==o){K(`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}a!==l&&K(`morphTo: coordinate count differs (${a} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function Sr(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let l=parseFloat(a),i=r[o++]??l;return String(+(l+(i-l)*t).toFixed(4))})}function ht(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:nt(n,(t,r)=>Mr(e,t,r))}function Mr(e,n,t){let{preset:r,...o}=n,a=r?{...Ht[r],...o}:o,{selector:l="path, polyline, line, polygon, rect, circle",speed:i=1,fade:f=false,easing:d="linear",trigger:b={},stagger:w=0,direction:g="forward",once:B=false,debug:ge=false,axis:_="y",scrollContainer:U,autoReverse:xe=false,delay:ye=0,strokeColor:Y,strokeWidth:te,fillOpacity:re,waypoints:X,velocityScale:R=false,threshold:ee=0,rootMargin:at="0px",repeat:Ee=0,repeatDelay:Pe=0,morphTo:V,clip:se,autoplay:Ne=false,duration:je=1e3,native:lt=true,onProgress:ve,onStart:N,onComplete:z,onEnter:ie,onLeave:Ae,onEnterBack:ae,onLeaveBack:ne}=a,F=se===true?"left":typeof se=="string"?se:false,D=Ze(d),Le=Oe(b.start||"top bottom"),Fe=Oe(b.end||"bottom top"),A=typeof U=="string"?document.querySelector(U):U??null,le=Array.isArray(Y)?Y[0]:null,ue=Array.isArray(Y)?Y[1]:typeof Y=="string"?Y:null,Z=Array.isArray(te)?te[0]:null,he=Array.isArray(te)?te[1]:typeof te=="number"?te:null,ce=Array.isArray(re)?re[0]:null,J=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function fe(s){let c=s*100;switch(F){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(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let u=F?[]:Array.from(e.querySelectorAll(l)),m=[],L=[],E=0,S=0,P=w,M=0,be=0,$=false,me=false,pe=0,ut=-1,Qe=[],Ue=-1,q=false,oe=0,we=0,Se,ct=false,ft=null;function Et(){ft?.destroy(),ft=null;}let Me=new Set,vt=NaN,$e=true,Ye=-1,wt=performance.now(),ke=NaN;function Xe(){return A?_==="x"?A.scrollLeft:A.scrollTop:_==="x"?window.scrollX:window.scrollY}function St(){return A?_==="x"?A.clientWidth:A.clientHeight:_==="x"?window.innerWidth:window.innerHeight}function Mt(){let s=Je(e,A,_);return Ie(s,s.scroll,St(),Le,Fe)}function tr(){let s=S-E,c=u.length-1,p=A??document.documentElement,h=_==="x"?"Width":"Height";if(P=w,w>0&&c>0&&s>0){let C=p[`scroll${h}`]-p[`client${h}`]-1-E-s/i;C>=0&&(P=Math.min(w,C/(c*s)));}let k=Math.max(0,c)*P*s,G=s/Math.min(i,1);M=E+Math.min(0,k,G,k+G),be=E+Math.max(0,k,G,k+G);}function Tt(){(({tStart:E,tEnd:S}=Mt())),tr(),ge&&De&&(Et(),ft=vr(E,S,_));}function mt(s,c=Mt){ze(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let p=s.destroy;return s.destroy=()=>{p.call(s),Ge(e);},s}function xt(s,c){return B&&!xe?Math.max(ut,D(Qe[s]=Math.max(Qe[s]??0,c))):D(c)}function rr(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),F){let p=c==="reverse"?1-s:s;e.style.clipPath=fe(p);return}u.forEach((p,h)=>pt(p,h,s,c));}function pt(s,c,p,h){s.style.strokeDashoffset=h==="reverse"?`${m[c]*p}`:`${m[c]*(1-p)}`,f&&(s.style.opacity=h==="reverse"?`${1-p}`:`${p}`),le&&ue?s.style.stroke=tt(le,ue,p):ue&&(s.style.stroke=ue),Z!==null&&he!==null?s.style.strokeWidth=`${Z+(he-Z)*p}`:he!==null&&(s.style.strokeWidth=`${he}`),ce!==null&&J!==null?s.style.fillOpacity=`${ce+(J-ce)*p}`:J!==null&&(s.style.fillOpacity=`${J}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",Sr(L[c],V,p));}function dt(){if(e.style.setProperty("--scroll-draw-progress","0"),F){e.style.clipPath=fe(g==="reverse"?1:0);return}u.forEach((s,c)=>{s.style.strokeDasharray=et(m[c]),s.style.strokeDashoffset=g==="reverse"?"0":`${m[c]}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ce!==null&&(s.style.fillOpacity=`${ce}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",L[c]);});}function He(s,c){let p=s.getAttribute("d"),h=Ke(s);if(V&&L[c]){s.setAttribute("d",V);let k=Ke(s);s.setAttribute("d",L[c]),h=Math.max(Ke(s),k),s.setAttribute("d",p);}m[c]=h,s.style.strokeDasharray=et(h);}if(u.forEach((s,c)=>{Er(s);let p=s.tagName.toLowerCase()==="path";p?L.push(s.getAttribute("d")??""):L.push(""),He(s,c);let h=m[c];V&&(p?wr(L[L.length-1],V,s):K(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),t?(s.style.strokeDashoffset=g==="reverse"?`${h}`:"0",f&&(s.style.opacity="1"),ue&&(s.style.stroke=ue),he!==null&&(s.style.strokeWidth=`${he}`),J!==null&&(s.style.fillOpacity=`${J}`),V&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",V)):(s.style.strokeDashoffset=g==="reverse"?"0":`${h}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ce!==null&&(s.style.fillOpacity=`${ce}`));}),t)return F&&(e.style.clipPath=fe(1)),z?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F&&(e.style.clipPath=fe(g==="reverse"?1:0));let Pt=typeof d=="string"?rt(d):null;function nr(){return !(lt===false||Ne||ge&&De||!br()||!u.length||!Pt||F||_!=="y"||A||i!==1||w!==0||B||xe||R!==false||V||X||Ee||ye>0||ve||N||z||ie||Ae||ae||ne||Y!=null||te!=null||re!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function or(){let s=++hr,c=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,h=`--svg-scroll-draw-${s}`,k=g==="reverse"?"0":"var(--ssd-len)",G=g==="reverse"?"var(--ssd-len)":"0",C=`stroke-dashoffset:${k};`,T=`stroke-dashoffset:${G};`;f&&(C+=`opacity:${g==="reverse"?1:0};`,T+=`opacity:${g==="reverse"?0:1};`);let x=document.createElement("style");x.setAttribute("data-svg-scroll-draw",""),x.textContent=`@keyframes ${c}{from{${C}}to{${T}}}.${p}{view-timeline-name:${h};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Pt};animation-fill-mode:both;animation-timeline:${h};animation-range:cover 0% cover 100%;}`,document.head.appendChild(x),e.classList.add(p);function H(y,v){y.style.setProperty("--ssd-len",String(m[v])),y.style.strokeDasharray=et(m[v]),y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(c);}u.forEach(H);let O=false,W=-1;function j(){if(W>=0)return W;let y=e.getBoundingClientRect(),{tStart:v,tEnd:I}=Ie({top:y.top,height:y.height},Xe(),St(),Le,Fe);return D(Q(Xe(),v,I,i))}return {destroy(){e.classList.remove(p),u.forEach(y=>{y.classList.remove(c),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),x.remove();},replay(){O=false,W=-1,u.forEach(H);},pause(){O=true,u.forEach(y=>{y.style.animationPlayState="paused";});},resume(){O&&(O=false,u.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let v=Math.min(1,Math.max(0,y));W=v,O=true,u.forEach((I,de)=>{I.classList.remove(c),I.style.strokeDashoffset=g==="reverse"?`${m[de]*v}`:`${m[de]*(1-v)}`,f&&(I.style.opacity=g==="reverse"?`${1-v}`:`${v}`);});},getProgress(){return j()},refresh(){u.forEach((y,v)=>{He(y,v),y.style.setProperty("--ssd-len",String(m[v]));});}}}if(nr())return mt(or());function sr(){let s=Math.max(1,je),c=F?s:s*(1+Math.max(0,u.length-1)*w),p=0,h=0,k=false;function G(W){let j=true,y=Math.min(1,Math.max(0,W/c));if(F){let v=Math.min(1,Math.max(0,W/s)),I=D(v);oe=I,e.style.setProperty("--scroll-draw-progress",String(I)),e.style.clipPath=fe(g==="reverse"?1-I:I),ve?.(I),v<1&&(j=false);}else {u.forEach((I,de)=>{let ar=de*w*s,Dt=Math.min(1,Math.max(0,(W-ar)/s));pt(I,de,D(Dt),g),Dt<1&&(j=false);});let v=D(y);oe=v,ve?.(v),e.style.setProperty("--scroll-draw-progress",String(v));}if(X){let v=D(y);for(let I in X){let de=parseFloat(I);v>=de&&!Me.has(de)&&(Me.add(de),X[I]?.());}}return j}function C(W){if(q)return;let j=W-p;me||(me=true,N?.());let y=G(j);if(y&&!$){$=true,G(c),z?.(),we<(Ee==="infinite"?1/0:Ee??0)&&(we++,Se=setTimeout(()=>{p=performance.now(),me=false,$=false,Me.clear(),dt(),pe=requestAnimationFrame(C);},Pe));return}y||(pe=requestAnimationFrame(C));}function T(){cancelAnimationFrame(pe),clearTimeout(Se),p=performance.now(),h=0,q=false,me=false,$=false,we=0,k=true,oe=0,Me.clear(),dt(),pe=requestAnimationFrame(C);}let x=new IntersectionObserver(W=>{W.forEach(j=>{j.isIntersecting&&!(B&&$)?T():!j.isIntersecting&&!B&&!$&&(cancelAnimationFrame(pe),clearTimeout(Se),k=false);});},{root:A??null,threshold:ee,rootMargin:at}),H;function O(){clearTimeout(H),H=setTimeout(()=>u.forEach(He),150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),ye>0?setTimeout(()=>x.observe(e),ye):x.observe(e),{destroy(){cancelAnimationFrame(pe),clearTimeout(Se),x.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(H);},replay(){we=0,T();},pause(){q||!k||(q=true,h=performance.now()-p,cancelAnimationFrame(pe));},resume(){q&&(q=false,k=true,p=performance.now()-h,pe=requestAnimationFrame(C));},seek(W){let j=Math.min(1,Math.max(0,W));oe=j,q=true,h=j*c,p=performance.now()-h,cancelAnimationFrame(pe),G(h);},getProgress(){return oe},refresh(){clearTimeout(H),u.forEach(He);}}}if(Ne)return mt(sr());Tt();let At=()=>Q(Xe(),M,be,1);function Lt(){$=true,z?.(),we<(Ee==="infinite"?1/0:Ee)&&(we++,Se=setTimeout(()=>{ct=true;},Pe));}function $t(){ut=-1,Qe=[],me=false,$=false,ct=false,Me.clear(),dt(),$e=true;}function ir(){let s=performance.now(),c=Xe();if(ct&&At()%1&&$t(),!$e&&R===false&&c===vt)return;$e=false,vt=c;let p=i;if(R!==false){let T=s-wt,x=T>0?Math.abs(c-(Ye<0?c:Ye))/T:0;p=i*Math.max(.2,1+x*(typeof R=="number"?R:1)*.04);}Ye=c,wt=s;let h=xe?Ue===-1||c>=Ue?"forward":"reverse":g;Ue=c;let k=S-E,G=true,C=k===0?0:(c-E)/k;if(isNaN(ke)||(ke<=0&&C>0&&ie?.(),ke<1&&C>=1&&Ae?.(),ke>=1&&C<1&&ae?.(),ke>0&&C<=0&&ne?.()),ke=C,F){let T=xt(0,Q(c,E,S,p));oe=T,e.style.setProperty("--scroll-draw-progress",String(T));let x=h==="reverse"?1-T:T;e.style.clipPath=fe(x),ve?.(T),!me&&Q(c,E,S,p)>0&&(me=true,N?.()),T>=1&&!$?Lt():T<1&&!B&&($=false);return}if(u.forEach((T,x)=>{let H=x*P*k,O=xt(x,Q(c,E+H,S+H,p));pt(T,x,O,h),x===0&&(oe=O,ve?.(O),e.style.setProperty("--scroll-draw-progress",String(O))),O<1&&(G=false);}),X){let T=D(Q(c,E,S,p));for(let x in X){let H=parseFloat(x);T>=H&&!Me.has(H)&&(Me.add(H),X[x]?.());}}!me&&Q(c,E,S,p)>0&&(me=true,N?.()),G&&!$?Lt():!G&&!B&&($=false);}let _e=it(A??window,[e],At,ir,()=>{let s=m.join();u.forEach(He),Tt(),$e=true,m.join()!==s&&Ve();}),gt=ye>0;function Ve(){_e.hold(q||gt);}let kt;return gt&&(kt=setTimeout(()=>{gt=false,Ve();},ye)),Ve(),mt({destroy(){clearTimeout(Se),clearTimeout(kt),_e.off(),Et();},replay(){$t(),Ue=-1,Ye=-1,we=0,q=false,oe=0,clearTimeout(Se),Ve();},pause(){q=true,_e.hold(true);},resume(){q&&(q=false,$e=true,Ve());},seek(s){let c=Math.min(1,Math.max(0,s));oe=c,ut=c,Qe=[],q=true,_e.hold(true),rr(c,g),$e=true;},getProgress(){return oe},refresh:_e.remeasure},()=>({tStart:E,tEnd:S}))}function Tr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Yt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let o=[],a=[],l=r[2].trim();if(l)for(let i of l.split(/[\s,]+/)){let f=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),a.push(f?f[2]:"");}n.push({fn:r[1],nums:o,units:a});}return n}function xr(e,n,t){let r=Yt(e),o=Yt(n);return r.length===0||r.length!==o.length?t<1?e:n:r.map((a,l)=>{let i=o[l];return a.fn!==i.fn||a.nums.length!==i.nums.length?t<1?`${a.fn}(${a.nums.map((f,d)=>`${f}${a.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${a.fn}(${a.nums.map((f,d)=>`${f+(i.nums[d]-f)*t}${a.units[d]}`).join(", ")})`}).join(" ")}function bt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),o=String(n);if(Tr(r))return tt(r,o,t);if(r.includes("("))return xr(r,o,t);let a=r.match(/^([-+]?[\d.]+)(.*)$/),l=o.match(/^([-+]?[\d.]+)(.*)$/);if(a&&l){let i=parseFloat(a[1]),f=parseFloat(l[1]);return `${i+(f-i)*t}${a[2]||l[2]}`}return t<1?r:o}function Pr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Xt="--scroll-draw-progress";function $r(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Re(e,n){return typeof window>"u"?Jt:n.respectReducedMotion===false?Zt(e,n,false):nt(n,(t,r)=>Zt(e,t,r))}function Zt(e,n,t){let{props:r,trigger:o={},easing:a="ease-out",speed:l=1,once:i=false,axis:f="y",scrollContainer:d,native:b=true,velocityScale:w=false,triggerElement:g,onProgress:B,onComplete:ge,onEnter:_,onLeave:U,onEnterBack:xe,onLeaveBack:ye}=n,Y=Ze(a,"ease-out"),te=Oe(o.start||"top bottom"),re=Oe(o.end||"bottom top"),X=g??e,R=typeof d=="string"?document.querySelector(d):d??null,ee=Object.entries(r).map(([u,m])=>({prop:Pr(u),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function at(){let u=window.getComputedStyle(e);for(let m of ee)m.from===""&&(m.from=u.getPropertyValue(m.prop).trim()||"0");}function Ee(){for(let u of ee)e.style.setProperty(u.prop,String(u.to));}let Pe=new Map;for(let u of [...ee.map(m=>m.prop),Xt])Pe.set(u,e.style.getPropertyValue(u));function V(){for(let[u,m]of Pe)m?e.style.setProperty(u,m):e.style.removeProperty(u);}if(t)return Ee(),ge?.(),{...Jt,destroy:V,getProgress:()=>1};at();let se=()=>R?f==="x"?R.scrollLeft:R.scrollTop:f==="x"?window.scrollX:window.scrollY,Ne=()=>R?f==="x"?R.clientWidth:R.clientHeight:f==="x"?window.innerWidth:window.innerHeight,je=typeof a=="string"?rt(a):null;function lt(){if(!b||!$r()||!je||f!=="y"||R||X!==e||i||l!==1||B||ge||_||U||xe||ye||w!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let u of ee)if(!Ar.has(u.prop))return false;return true}function ve(){let u=`ssd-a-${++Lr}`,m=ee.map(M=>`${M.prop}:${M.from}`).join(";"),L=ee.map(M=>`${M.prop}:${M.to}`).join(";"),E=document.createElement("style");E.setAttribute("data-ssd-animate",""),E.textContent=`@keyframes ${u}{from{${m}}to{${L}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${je};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(E),e.classList.add(u);let S=()=>{let M=e.getBoundingClientRect();return Ie({top:M.top,height:M.height},se(),Ne(),te,re)};ze(e,{type:"animate",getProgress:()=>P.getProgress(),getTrigger:S});let P={refresh(){},destroy(){e.classList.remove(u),E.remove(),e.style.animationPlayState="",V(),Ge(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(M){let be=Math.min(1,Math.max(0,M));e.classList.remove(u);for(let $ of ee)e.style.setProperty($.prop,bt($.from,$.to,be));},getProgress(){let{tStart:M,tEnd:be}=S();return Y(Q(se(),M,be,l))}};return P}if(lt())return ve();let N=0,z=0,ie=false,Ae=-1,ae=0,ne=0,F=false,D=NaN,Le=-1,Fe=0,A=X===e?ee:[],le=false;function ue(){let u=e.style,m=A.map(P=>u.getPropertyValue(P.prop)),L=u.transition;A.length&&(u.transition="none"),A.forEach(P=>u.setProperty(P.prop,Pe.get(P.prop)??""));let E=Je(X,R,f);A.forEach((P,M)=>u.setProperty(P.prop,m[M])),A.length&&(e.offsetWidth,u.transition=L);let S=Ie(E,E.scroll,Ne(),te,re);le&&Math.abs(S.tStart-N)<1&&Math.abs(S.tEnd-z)<1||(le=true,N=S.tStart,z=S.tEnd);}function Z(u){e.style.setProperty(Xt,String(u));for(let m of ee)e.style.setProperty(m.prop,bt(m.from,m.to,u));B?.(u);}function he(u){if(isNaN(D)){D=u;return}D<=0&&u>0&&_?.(),D<1&&u>=1&&U?.(),D>=1&&u<1&&xe?.(),D>0&&u<=0&&ye?.(),D=u;}function ce(){if(ie)return;let u=performance.now(),m=se(),L=l;if(w!==false){let M=u-Fe,be=M>0?Math.abs(m-(Le<0?m:Le))/M:0;L=l*Math.max(.2,1+be*(typeof w=="number"?w:1)*.04);}Le=m,Fe=u;let E=z===N?0:(m-N)/(z-N);he(E);let S=Q(m,N,z,L),P=i?Math.max(Ae,Y(ae=Math.max(ae,S))):Y(S);ne=P,Z(P),P>=1&&!F?(F=true,ge?.()):P<1&&!i&&(F=false);}let J=it(R??window,[X],()=>Q(se(),N,z,Math.min(l,1)),ce,ue);ue(),z===N&&K("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ae=Q(se(),N,z,l),ne=Y(ae),Z(ne),ze(e,{type:"animate",getProgress:()=>ne,getTrigger:()=>({tStart:N,tEnd:z})});function fe(){ie=true,J.hold(true);}return {destroy(){ie=true,J.off(),V(),Ge(e);},replay(){Ae=-1,ae=0,F=false,ne=0,ie=false,Z(0),J.hold(false);},pause:fe,resume(){ie&&(ie=false,J.hold(false));},seek(u){let m=Math.min(1,Math.max(0,u));ne=m,Ae=m,ae=0,fe(),Z(m);},getProgress(){return ne},refresh:J.remeasure}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function er(e,n={}){if(typeof window>"u")return Kt;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return K("scrollParallax: element not found:",e),Kt;let{speed:r=.3,axis:o="y",easing:a="linear",trigger:l,onProgress:i}=n,f=-r*100,d=t.style,b=!!t.ownerSVGElement,w=d.getPropertyValue("transform-box");b&&d.setProperty("transform-box","fill-box");let g=Re(t,{props:o==="x"?{transform:["translateX(0%)",`translateX(${f}%)`]}:{transform:["translateY(0%)",`translateY(${f}%)`]},trigger:l??{start:"top bottom",end:"bottom top"},easing:a,native:false,onProgress:i});return b?{...g,destroy(){g.destroy(),d.setProperty("transform-box",w);}}:g}function qe(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pn(e,n={}){if(typeof window>"u")return Te;let t=qe(e).map(r=>ht(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}function An(e,n={}){if(typeof window>"u")return Te;let t=qe(e);if(t.length===0)return Te;let r=0,o=[];function a(i){return ht(t[i],{...n,once:true,onComplete(){n.onComplete?.(),r=Math.min(i+1,t.length-1),r>i&&o[r]?.resume();}})}function l(){t.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return l(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,r=0,l();},pause(){o[r]?.pause();},resume(){o[r]?.resume();},seek(i){o[r]?.seek(i);},getProgress(){return o[r]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Ln(e,n){if(typeof window>"u")return Te;let t=qe(e).map(r=>Re(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}function $n(e,n){if(typeof window>"u")return Te;let t=qe(e);if(t.length===0)return Te;let r=0,o=[];function a(i){return Re(t[i],{...n,once:true,onComplete(){n.onComplete?.(),r=Math.min(i+1,t.length-1),r>i&&o[r]?.resume();}})}function l(){t.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return l(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,r=0,l();},pause(){o[r]?.pause();},resume(){o[r]?.resume();},seek(i){o[r]?.seek(i);},getProgress(){return o[r]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function kn(e,n={}){if(typeof window>"u")return Te;let t=qe(e).map(r=>er(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}exports.scrollAnimateGroup=Ln;exports.scrollAnimateSequence=$n;exports.scrollDrawGroup=Pn;exports.scrollDrawSequence=An;exports.scrollParallaxGroup=kn;
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
2
- import { S as ScrollParallaxOptions } from '../index-DAiRJgtF.mjs';
3
- import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-iITMwrru.mjs';
2
+ import { S as ScrollParallaxOptions } from '../index-ClAFxNEp.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-Bi2x8-X-.mjs';
4
4
 
5
5
  /**
6
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
2
- import { S as ScrollParallaxOptions } from '../index-hSQqLVbg.js';
3
- import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-iITMwrru.js';
2
+ import { S as ScrollParallaxOptions } from '../index-CEMsUTEG.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-DAlvk6i0.js';
4
4
 
5
5
  /**
6
6
  * Animate multiple SVG containers simultaneously with the same options.
@@ -1 +1 @@
1
- import {b as b$1}from'../chunk-QZKYGS74.mjs';import {a as a$1}from'../chunk-7USW2XFB.mjs';import {b}from'../chunk-7XOFQCQE.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-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
1
+ import {b as b$1}from'../chunk-UBH4K5YD.mjs';import {a as a$1}from'../chunk-HAGTU5EX.mjs';import {b}from'../chunk-XLXVGQ3P.mjs';import'../chunk-7LDSB4FT.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-YOOPMYT6.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
@@ -1 +1 @@
1
- 'use strict';function Fe({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function Ve({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),i=0,a=[];for(let u=0;u<n;u++){let d=Math.pow(o,u);a.push(d),i+=d;}let f=[0],c=0;for(let u=0;u<n;u++)c+=a[u]/i,f.push(c);return u=>{if(u<=0)return 0;if(u>=1)return 1;for(let d=0;d<n;d++)if(u<=f[d+1]){let h=(u-f[d])/(f[d+1]-f[d]);if(d===0)return h*(2-h);let w=1-Math.pow(r,d);return w+(1-w)*(2*h-1)*(2*h-1)}return 1}}function Be({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 i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1}var Q={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:Fe(),bounce:Ve(),elastic:Be()};function be(e,t,n){return Math.min(n,Math.max(t,e))}function ie(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 Ee=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function ye(e,t,n,r){return e+n+t*Ee(r,0)}function he(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Ee(e,1))}function q(e,t,n,r){return n===t?0:be((e-t)/(n-t)*r,0,1)}function se(e,t,n,r,o){let i=ye(e.top,e.height,t,r.element)-he(r.viewport,n),a=ye(e.top,e.height,t,o.element)-he(o.viewport,n);return {tStart:i,tEnd:a}}function ve(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 we(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 Se(e,t,n){let r=we(e),o=we(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)",Me=33;function qe(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function je(e){let t=[];for(let n=0;n<Me;n++){let r=n/(Me-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Le(e){switch(e){case "linear":return "linear";case "ease-in":return Ge;case "ease-out":return Qe;case "ease-in-out":return qe()?je(Q["ease-in-out"]):null;default:return null}}var Te=Symbol.for("svg-scroll-draw.registry");function xe(){let e=globalThis;return e[Te]||(e[Te]=new Map)}function ae(e,t){xe().set(e,t);}function ue(e){xe().delete(e);}var Ye=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function j(e,...t){Ye&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function Pe(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 Re(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=Pe(i=>{if(!i)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(n))o[i]=(...a)=>n[i]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var Y,ee=new Set,te=new WeakMap,U=new Map,$e=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ue(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 ne(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Y??(Y=new ResizeObserver(o=>{let i=false;for(let{target:a}of o)te.get(a)!==$e(a)&&(i=true),te.set(a,"");i&&ee.forEach(a=>a());})),ee.add(n);let r=Ue(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{te.has(o)||te.set(o,$e(o)),U.set(o,(U.get(o)??0)+1),Y.observe(o);}),()=>{ee.delete(n)&&(r.forEach(o=>{let i=(U.get(o)??1)-1;if(i)return void U.set(o,i);U.delete(o),Y?.unobserve(o);}),ee.size||(Y?.disconnect(),Y=void 0));}}function Ce(e,t,n,r,o){let i,a=NaN,f,c,u=()=>{i=0,r(),!f&&!i&&(a=n())>0&&a<1&&(i=requestAnimationFrame(u));},d=()=>{!i&&!f&&n()!==a&&(i=requestAnimationFrame(u));},h=p=>{f=p,cancelAnimationFrame(i),i=a=NaN,d();},w=()=>{clearTimeout(c),o(),d();},M=()=>{clearTimeout(c),c=setTimeout(w,150);},x=ne(t,M),v=p=>{e[p]("scroll",d,{passive:true}),window[p]("resize",M),window[p]("orientationchange",M);};return v("addEventListener"),d(),{hold:h,remeasure:w,off(){h(true),v("removeEventListener"),x(),clearTimeout(c);}}}function Xe(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ae(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],i=[],a=r[2].trim();if(a)for(let f of a.split(/[\s,]+/)){let c=f.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:i});}return t}function Ke(e,t,n){let r=Ae(e),o=Ae(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((i,a)=>{let f=o[a];return i.fn!==f.fn||i.nums.length!==f.nums.length?n<1?`${i.fn}(${i.nums.map((c,u)=>`${c}${i.units[u]}`).join(", ")})`:`${f.fn}(${f.nums.map((c,u)=>`${c}${f.units[u]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,u)=>`${c+(f.nums[u]-c)*n}${i.units[u]}`).join(", ")})`}).join(" ")}function Ie(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Xe(r))return Se(r,o,n);if(r.includes("("))return Ke(r,o,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let f=parseFloat(i[1]),c=parseFloat(a[1]);return `${f+(c-f)*n}${i[2]||a[2]}`}return n<1?r:o}function Ze(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Je=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),et=0,_e="--scroll-draw-progress";function tt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var ke={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function le(e,t){return typeof window>"u"?ke:t.respectReducedMotion===false?He(e,t,false):Re(t,(n,r)=>He(e,n,r))}function He(e,t,n){let{props:r,trigger:o={},easing:i="ease-out",speed:a=1,once:f=false,axis:c="y",scrollContainer:u,native:d=true,velocityScale:h=false,triggerElement:w,onProgress:M,onComplete:x,onEnter:v,onLeave:p,onEnterBack:z,onLeaveBack:P}=t,A=typeof i=="function"?i:Q[i]??Q["ease-out"],H=ie(o.start||"top bottom"),W=ie(o.end||"bottom top"),C=w??e,S=typeof u=="string"?document.querySelector(u):u??null,y=Object.entries(r).map(([s,l])=>({prop:Ze(s),from:Array.isArray(l)?l[0]:"",to:Array.isArray(l)?l[1]:l}));function D(){let s=window.getComputedStyle(e);for(let l of y)l.from===""&&(l.from=s.getPropertyValue(l.prop).trim()||"0");}function X(){for(let s of y)e.style.setProperty(s.prop,String(s.to));}let m=new Map;for(let s of [...y.map(l=>l.prop),_e])m.set(s,e.style.getPropertyValue(s));function b(){for(let[s,l]of m)l?e.style.setProperty(s,l):e.style.removeProperty(s);}if(n)return X(),x?.(),{...ke,destroy:b,getProgress:()=>1};D();let F=()=>S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY,ce=()=>S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight,me=typeof i=="string"?Le(i):null;function Oe(){if(!d||!tt()||!me||c!=="y"||S||C!==e||f||a!==1||M||x||v||p||z||P||h!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let s of y)if(!Je.has(s.prop))return false;return true}function ze(){let s=`ssd-a-${++et}`,l=y.map(g=>`${g.prop}:${g.from}`).join(";"),O=y.map(g=>`${g.prop}:${g.to}`).join(";"),$=document.createElement("style");$.setAttribute("data-ssd-animate",""),$.textContent=`@keyframes ${s}{from{${l}}to{${O}}}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${me};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild($),e.classList.add(s);let T=()=>{let g=e.getBoundingClientRect();return se({top:g.top,height:g.height},F(),ce(),H,W)};ae(e,{type:"animate",getProgress:()=>E.getProgress(),getTrigger:T});let E={refresh(){},destroy(){e.classList.remove(s),$.remove(),e.style.animationPlayState="",b(),ue(e);},replay(){e.classList.remove(s),e.offsetWidth,e.classList.add(s);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(g){let G=Math.min(1,Math.max(0,g));e.classList.remove(s);for(let J of y)e.style.setProperty(J.prop,Ie(J.from,J.to,G));},getProgress(){let{tStart:g,tEnd:G}=T();return A(q(F(),g,G,a))}};return E}if(Oe())return ze();let L=0,R=0,k=false,re=-1,N=0,I=0,K=false,_=NaN,oe=-1,fe=0,V=C===e?y:[],de=false;function pe(){let s=e.style,l=V.map(E=>s.getPropertyValue(E.prop)),O=s.transition;V.length&&(s.transition="none"),V.forEach(E=>s.setProperty(E.prop,m.get(E.prop)??""));let $=ve(C,S,c);V.forEach((E,g)=>s.setProperty(E.prop,l[g])),V.length&&(e.offsetWidth,s.transition=O);let T=se($,$.scroll,ce(),H,W);de&&Math.abs(T.tStart-L)<1&&Math.abs(T.tEnd-R)<1||(de=true,L=T.tStart,R=T.tEnd);}function Z(s){e.style.setProperty(_e,String(s));for(let l of y)e.style.setProperty(l.prop,Ie(l.from,l.to,s));M?.(s);}function We(s){if(isNaN(_)){_=s;return}_<=0&&s>0&&v?.(),_<1&&s>=1&&p?.(),_>=1&&s<1&&z?.(),_>0&&s<=0&&P?.(),_=s;}function De(){if(k)return;let s=performance.now(),l=F(),O=a;if(h!==false){let g=s-fe,G=g>0?Math.abs(l-(oe<0?l:oe))/g:0;O=a*Math.max(.2,1+G*(typeof h=="number"?h:1)*.04);}oe=l,fe=s;let $=R===L?0:(l-L)/(R-L);We($);let T=q(l,L,R,O),E=f?Math.max(re,A(N=Math.max(N,T))):A(T);I=E,Z(E),E>=1&&!K?(K=true,x?.()):E<1&&!f&&(K=false);}let B=Ce(S??window,[C],()=>q(F(),L,R,Math.min(a,1)),De,pe);pe(),R===L&&j("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),N=q(F(),L,R,a),I=A(N),Z(I),ae(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:L,tEnd:R})});function ge(){k=true,B.hold(true);}return {destroy(){k=true,B.off(),b(),ue(e);},replay(){re=-1,N=0,K=false,I=0,k=false,Z(0),B.hold(false);},pause:ge,resume(){k&&(k=false,B.hold(false));},seek(s){let l=Math.min(1,Math.max(0,s));I=l,re=l,N=0,ge(),Z(l);},getProgress(){return I},refresh:B.remeasure}}var Ne={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function At(e,t={}){if(typeof window>"u")return Ne;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return j("scrollHorizontal: track element not found:",e),Ne;let r=n,{easing:o="linear",trigger:i={start:"top top",end:"bottom bottom"},scrollContainer:a,respectReducedMotion:f=false,onProgress:c}=t,u=typeof a=="string"?document.querySelector(a):a??null;function d(){for(let m=r.parentElement;m;m=m.parentElement)if(window.getComputedStyle(m).position==="sticky")return m;return null}function h(){let m=d();if(m){let b=window.getComputedStyle(m);return m.clientWidth-(parseFloat(b.paddingLeft)||0)-(parseFloat(b.paddingRight)||0)}return u?u.clientWidth:document.documentElement.clientWidth||window.innerWidth}function w(){return t.distance??r.scrollWidth-h()}function M(){if(t.triggerElement!==void 0){let b=typeof t.triggerElement=="string"?document.querySelector(t.triggerElement):t.triggerElement;if(b)return b;j("scrollHorizontal: triggerElement not found:",t.triggerElement);}let m=d();return m?m.parentElement??m:r}let x=w(),v=M(),p=le(r,A(x,v)),z=H(),P=null;function A(m,b){return {props:{transform:["translateX(0px)",`translateX(${-m}px)`]},trigger:i,easing:o,native:false,respectReducedMotion:f,...b!==r&&{triggerElement:b},...a!==void 0&&{scrollContainer:a},...c!==void 0&&{onProgress:c}}}function H(){let m=v.getBoundingClientRect(),b=u?m.top-u.getBoundingClientRect().top+u.scrollTop:m.top+window.scrollY;return `${w()} ${Math.round(b)} ${Math.round(m.height)}`}function W(){p.destroy();let m=M(),b=m!==v;x=w(),v=m,p=le(r,A(x,v)),z=H(),P!==null&&p.seek(P),b&&X();}let C;function S(){(M()!==v||H()!==z)&&W();}function y(){clearTimeout(C),C=setTimeout(S,150);}window.addEventListener("resize",y),window.addEventListener("orientationchange",y);let D=()=>{};function X(){D(),D=ne([r,v],y);}return X(),{destroy(){clearTimeout(C),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),D(),p.destroy();},replay(){P=null,p.replay();},pause(){p.pause(),P=p.getProgress();},resume(){P=null,p.resume();},seek(m){p.seek(m),P=p.getProgress();},getProgress(){return p.getProgress()},refresh(){W();}}}exports.scrollHorizontal=At;
1
+ 'use strict';var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function k(e,...n){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function Ge({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function qe({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(r),o=0,s=[];for(let l=0;l<t;l++){let d=Math.pow(i,l);s.push(d),o+=d;}let u=[0],c=0;for(let l=0;l<t;l++)c+=s[l]/o,u.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let d=0;d<t;d++)if(l<=u[d+1]){let h=(l-u[d])/(u[d+1]-u[d]);if(d===0)return h*(2-h);let w=1-Math.pow(r,d);return w+(1-w)*(2*h-1)*(2*h-1)}return 1}}function je({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),i=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return o=>o<=0?0:o>=1?1:t*Math.pow(2,-10*o)*Math.sin((o-i)*(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:Ge(),bounce:qe(),elastic:je()};function Ue(e,n,t,r){let i=(o,s,u)=>((1+3*o-3*s)*u+3*s-6*o)*u*u+3*o*u;return o=>{if(o<=0||o>=1)return +(o>0);let s=o;for(let u=0;u<8;u++)s-=(i(e,t,s)-o)/((3*(1+3*e-3*t)*s+6*t-12*e)*s+3*e);if(!(s>=0&&s<=1&&Math.abs(i(e,t,s)-o)<1e-9))for(let u=0,c=0,l=1;u<30;u++)s=(c+l)/2,i(e,t,s)<o?c=s:l=s;return i(n,r,s)}}function ie(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [Ue(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var ye=new Set;function he(e,n="linear"){if(typeof e=="function")return e;if(e==null)return W[n];if({}.hasOwnProperty.call(W,e))return W[e];let t=ie(String(e));return t?t[0]:(!ye.has(e)&&ye.add(e)&&k(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),W[n])}function Ee(e,n,t){return Math.min(t,Math.max(n,e))}function se(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 Se=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function ve(e,n,t,r){return e+t+n*Se(r,0)}function we(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Se(e,1))}function j(e,n,t,r){return t===n?0:Ee((e-n)/(t-n)*r,0,1)}function ae(e,n,t,r,i){let o=ve(e.top,e.height,n,r.element)-we(r.viewport,t),s=ve(e.top,e.height,n,i.element)-we(i.viewport,t);return {tStart:o,tEnd:s}}function Me(e,n,t){let r=e.getBoundingClientRect(),i=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:i,scroll:0}:{top:t==="x"?r.left:r.top,height:i,scroll:t==="x"?window.scrollX:window.scrollY}}function Le(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 Te(e,n,t){let r=Le(e),i=Le(n);return !r||!i?e:`rgb(${Math.round(r[0]+(i[0]-r[0])*t)},${Math.round(r[1]+(i[1]-r[1])*t)},${Math.round(r[2]+(i[2]-r[2])*t)})`}var Ye="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Xe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",xe=33;function Ke(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Je(e){let n=[];for(let t=0;t<xe;t++){let r=t/(xe-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function Pe(e){switch(e){case "linear":return "linear";case "ease-in":return Ye;case "ease-out":return Xe;case "ease-in-out":return Ke()?Je(W["ease-in-out"]):null;default:return ie(e)?.[1]??null}}var Re=Symbol.for("svg-scroll-draw.registry");function $e(){let e=globalThis;return e[Re]||(e[Re]=new Map)}function ue(e,n){$e().set(e,n);}function le(e){$e().delete(e);}function Ce(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.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 Ae(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=Ce(o=>{if(!o)return;r();let s=(t.getProgress?.()??0)>=1;t.destroy(),t=n(s?{...e,onComplete:void 0}:e,true);}),i={};for(let o of Object.keys(t))i[o]=(...s)=>t[o]?.(...s);return i.destroy=()=>{r(),t.destroy();},i}var U,ee=new Set,te=new WeakMap,Y=new Map,Ie=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Ze(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 ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();U??(U=new ResizeObserver(i=>{let o=false;for(let{target:s}of i)te.get(s)!==Ie(s)&&(o=true),te.set(s,"");o&&ee.forEach(s=>s());})),ee.add(t);let r=Ze(e);return [document.body,document.documentElement].forEach(i=>i&&r.add(i)),r.forEach(i=>{te.has(i)||te.set(i,Ie(i)),Y.set(i,(Y.get(i)??0)+1),U.observe(i);}),()=>{ee.delete(t)&&(r.forEach(i=>{let o=(Y.get(i)??1)-1;if(o)return void Y.set(i,o);Y.delete(i),U?.unobserve(i);}),ee.size||(U?.disconnect(),U=void 0));}}function _e(e,n,t,r,i){let o,s=NaN,u,c,l=()=>{o=0,r(),!u&&!o&&(s=t())>0&&s<1&&(o=requestAnimationFrame(l));},d=()=>{!o&&!u&&t()!==s&&(o=requestAnimationFrame(l));},h=p=>{u=p,cancelAnimationFrame(o),o=s=NaN,d();},w=()=>{clearTimeout(c),i(),d();},M=()=>{clearTimeout(c),c=setTimeout(w,150);},x=ne(n,M),v=p=>{e[p]("scroll",d,{passive:true}),window[p]("resize",M),window[p]("orientationchange",M);};return v("addEventListener"),d(),{hold:h,remeasure:w,off(){h(true),v("removeEventListener"),x(),clearTimeout(c);}}}function et(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function ke(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let i=[],o=[],s=r[2].trim();if(s)for(let u of s.split(/[\s,]+/)){let c=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(c?parseFloat(c[1]):0),o.push(c?c[2]:"");}n.push({fn:r[1],nums:i,units:o});}return n}function tt(e,n,t){let r=ke(e),i=ke(n);return r.length===0||r.length!==i.length?t<1?e:n:r.map((o,s)=>{let u=i[s];return o.fn!==u.fn||o.nums.length!==u.nums.length?t<1?`${o.fn}(${o.nums.map((c,l)=>`${c}${o.units[l]}`).join(", ")})`:`${u.fn}(${u.nums.map((c,l)=>`${c}${u.units[l]}`).join(", ")})`:`${o.fn}(${o.nums.map((c,l)=>`${c+(u.nums[l]-c)*t}${o.units[l]}`).join(", ")})`}).join(" ")}function He(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),i=String(n);if(et(r))return Te(r,i,t);if(r.includes("("))return tt(r,i,t);let o=r.match(/^([-+]?[\d.]+)(.*)$/),s=i.match(/^([-+]?[\d.]+)(.*)$/);if(o&&s){let u=parseFloat(o[1]),c=parseFloat(s[1]);return `${u+(c-u)*t}${o[2]||s[2]}`}return t<1?r:i}function nt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var rt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ot=0,Oe="--scroll-draw-progress";function it(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ne={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ce(e,n){return typeof window>"u"?Ne:n.respectReducedMotion===false?ze(e,n,false):Ae(n,(t,r)=>ze(e,t,r))}function ze(e,n,t){let{props:r,trigger:i={},easing:o="ease-out",speed:s=1,once:u=false,axis:c="y",scrollContainer:l,native:d=true,velocityScale:h=false,triggerElement:w,onProgress:M,onComplete:x,onEnter:v,onLeave:p,onEnterBack:F,onLeaveBack:P}=n,A=he(o,"ease-out"),H=se(i.start||"top bottom"),D=se(i.end||"bottom top"),C=w??e,S=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([a,m])=>({prop:nt(a),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function V(){let a=window.getComputedStyle(e);for(let m of y)m.from===""&&(m.from=a.getPropertyValue(m.prop).trim()||"0");}function X(){for(let a of y)e.style.setProperty(a.prop,String(a.to));}let f=new Map;for(let a of [...y.map(m=>m.prop),Oe])f.set(a,e.style.getPropertyValue(a));function b(){for(let[a,m]of f)m?e.style.setProperty(a,m):e.style.removeProperty(a);}if(t)return X(),x?.(),{...Ne,destroy:b,getProgress:()=>1};V();let B=()=>S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY,me=()=>S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight,fe=typeof o=="string"?Pe(o):null;function Fe(){if(!d||!it()||!fe||c!=="y"||S||C!==e||u||s!==1||M||x||v||p||F||P||h!==false||(i.start||"top bottom").trim()!=="top bottom"||(i.end||"bottom top").trim()!=="bottom top")return false;for(let a of y)if(!rt.has(a.prop))return false;return true}function De(){let a=`ssd-a-${++ot}`,m=y.map(g=>`${g.prop}:${g.from}`).join(";"),N=y.map(g=>`${g.prop}:${g.to}`).join(";"),$=document.createElement("style");$.setAttribute("data-ssd-animate",""),$.textContent=`@keyframes ${a}{from{${m}}to{${N}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild($),e.classList.add(a);let T=()=>{let g=e.getBoundingClientRect();return ae({top:g.top,height:g.height},B(),me(),H,D)};ue(e,{type:"animate",getProgress:()=>E.getProgress(),getTrigger:T});let E={refresh(){},destroy(){e.classList.remove(a),$.remove(),e.style.animationPlayState="",b(),le(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(g){let q=Math.min(1,Math.max(0,g));e.classList.remove(a);for(let Z of y)e.style.setProperty(Z.prop,He(Z.from,Z.to,q));},getProgress(){let{tStart:g,tEnd:q}=T();return A(j(B(),g,q,s))}};return E}if(Fe())return De();let L=0,R=0,O=false,re=-1,z=0,I=0,K=false,_=NaN,oe=-1,de=0,Q=C===e?y:[],pe=false;function ge(){let a=e.style,m=Q.map(E=>a.getPropertyValue(E.prop)),N=a.transition;Q.length&&(a.transition="none"),Q.forEach(E=>a.setProperty(E.prop,f.get(E.prop)??""));let $=Me(C,S,c);Q.forEach((E,g)=>a.setProperty(E.prop,m[g])),Q.length&&(e.offsetWidth,a.transition=N);let T=ae($,$.scroll,me(),H,D);pe&&Math.abs(T.tStart-L)<1&&Math.abs(T.tEnd-R)<1||(pe=true,L=T.tStart,R=T.tEnd);}function J(a){e.style.setProperty(Oe,String(a));for(let m of y)e.style.setProperty(m.prop,He(m.from,m.to,a));M?.(a);}function Ve(a){if(isNaN(_)){_=a;return}_<=0&&a>0&&v?.(),_<1&&a>=1&&p?.(),_>=1&&a<1&&F?.(),_>0&&a<=0&&P?.(),_=a;}function Be(){if(O)return;let a=performance.now(),m=B(),N=s;if(h!==false){let g=a-de,q=g>0?Math.abs(m-(oe<0?m:oe))/g:0;N=s*Math.max(.2,1+q*(typeof h=="number"?h:1)*.04);}oe=m,de=a;let $=R===L?0:(m-L)/(R-L);Ve($);let T=j(m,L,R,N),E=u?Math.max(re,A(z=Math.max(z,T))):A(T);I=E,J(E),E>=1&&!K?(K=true,x?.()):E<1&&!u&&(K=false);}let G=_e(S??window,[C],()=>j(B(),L,R,Math.min(s,1)),Be,ge);ge(),R===L&&k("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),z=j(B(),L,R,s),I=A(z),J(I),ue(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:L,tEnd:R})});function be(){O=true,G.hold(true);}return {destroy(){O=true,G.off(),b(),le(e);},replay(){re=-1,z=0,K=false,I=0,O=false,J(0),G.hold(false);},pause:be,resume(){O&&(O=false,G.hold(false));},seek(a){let m=Math.min(1,Math.max(0,a));I=m,re=m,z=0,be(),J(m);},getProgress(){return I},refresh:G.remeasure}}var We={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function Ot(e,n={}){if(typeof window>"u")return We;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return k("scrollHorizontal: track element not found:",e),We;let r=t,{easing:i="linear",trigger:o={start:"top top",end:"bottom bottom"},scrollContainer:s,respectReducedMotion:u=false,onProgress:c}=n,l=typeof s=="string"?document.querySelector(s):s??null;function d(){for(let f=r.parentElement;f;f=f.parentElement)if(window.getComputedStyle(f).position==="sticky")return f;return null}function h(){let f=d();if(f){let b=window.getComputedStyle(f);return f.clientWidth-(parseFloat(b.paddingLeft)||0)-(parseFloat(b.paddingRight)||0)}return l?l.clientWidth:document.documentElement.clientWidth||window.innerWidth}function w(){return n.distance??r.scrollWidth-h()}function M(){if(n.triggerElement!==void 0){let b=typeof n.triggerElement=="string"?document.querySelector(n.triggerElement):n.triggerElement;if(b)return b;k("scrollHorizontal: triggerElement not found:",n.triggerElement);}let f=d();return f?f.parentElement??f:r}let x=w(),v=M(),p=ce(r,A(x,v)),F=H(),P=null;function A(f,b){return {props:{transform:["translateX(0px)",`translateX(${-f}px)`]},trigger:o,easing:i,native:false,respectReducedMotion:u,...b!==r&&{triggerElement:b},...s!==void 0&&{scrollContainer:s},...c!==void 0&&{onProgress:c}}}function H(){let f=v.getBoundingClientRect(),b=l?f.top-l.getBoundingClientRect().top+l.scrollTop:f.top+window.scrollY;return `${w()} ${Math.round(b)} ${Math.round(f.height)}`}function D(){p.destroy();let f=M(),b=f!==v;x=w(),v=f,p=ce(r,A(x,v)),F=H(),P!==null&&p.seek(P),b&&X();}let C;function S(){(M()!==v||H()!==F)&&D();}function y(){clearTimeout(C),C=setTimeout(S,150);}window.addEventListener("resize",y),window.addEventListener("orientationchange",y);let V=()=>{};function X(){V(),V=ne([r,v],y);}return X(),{destroy(){clearTimeout(C),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),V(),p.destroy();},replay(){P=null,p.replay();},pause(){p.pause(),P=p.getProgress();},resume(){P=null,p.resume();},seek(f){p.seek(f),P=p.getProgress();},getProgress(){return p.getProgress()},refresh(){D();}}}exports.scrollHorizontal=Ot;
@@ -1,4 +1,4 @@
1
- import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-9bcJdVcg.mjs';
1
+ import { S as ScrollDrawInstance, T as TriggerConfig, E as Easing } from '../types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollHorizontalOptions {
4
4
  /**
@@ -17,7 +17,7 @@ interface ScrollHorizontalOptions {
17
17
  */
18
18
  trigger?: TriggerConfig;
19
19
  /** Easing for the horizontal movement. Default: `'linear'` (scrub feel). */
20
- easing?: EasingName | ((t: number) => number);
20
+ easing?: Easing;
21
21
  /** Custom scroll container. Default: window. */
22
22
  scrollContainer?: string | Element;
23
23
  /**
@@ -1,4 +1,4 @@
1
- import { S as ScrollDrawInstance, T as TriggerConfig, E as EasingName } from '../types-9bcJdVcg.js';
1
+ import { S as ScrollDrawInstance, T as TriggerConfig, E as Easing } from '../types-iITMwrru.js';
2
2
 
3
3
  interface ScrollHorizontalOptions {
4
4
  /**
@@ -17,7 +17,7 @@ interface ScrollHorizontalOptions {
17
17
  */
18
18
  trigger?: TriggerConfig;
19
19
  /** Easing for the horizontal movement. Default: `'linear'` (scrub feel). */
20
- easing?: EasingName | ((t: number) => number);
20
+ easing?: Easing;
21
21
  /** Custom scroll container. Default: window. */
22
22
  scrollContainer?: string | Element;
23
23
  /**
@@ -1 +1 @@
1
- import {a}from'../chunk-7USW2XFB.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import {d}from'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var x={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function $(a$1,r={}){if(typeof window>"u")return x;let h=typeof a$1=="string"?document.querySelector(a$1):a$1;if(!h)return b("scrollHorizontal: track element not found:",a$1),x;let o=h,{easing:C="linear",trigger:P={start:"top top",end:"bottom bottom"},scrollContainer:s,respectReducedMotion:R=false,onProgress:v}=r,u=typeof s=="string"?document.querySelector(s):s??null;function b$1(){for(let e=o.parentElement;e;e=e.parentElement)if(window.getComputedStyle(e).position==="sticky")return e;return null}function M(){let e=b$1();if(e){let t=window.getComputedStyle(e);return e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)}return u?u.clientWidth:document.documentElement.clientWidth||window.innerWidth}function d$1(){return r.distance??o.scrollWidth-M()}function g(){if(r.triggerElement!==void 0){let t=typeof r.triggerElement=="string"?document.querySelector(r.triggerElement):r.triggerElement;if(t)return t;b("scrollHorizontal: triggerElement not found:",r.triggerElement);}let e=b$1();return e?e.parentElement??e:o}let m=d$1(),i=g(),n=a(o,T(m,i)),S=f(),l=null;function T(e,t){return {props:{transform:["translateX(0px)",`translateX(${-e}px)`]},trigger:P,easing:C,native:false,respectReducedMotion:R,...t!==o&&{triggerElement:t},...s!==void 0&&{scrollContainer:s},...v!==void 0&&{onProgress:v}}}function f(){let e=i.getBoundingClientRect(),t=u?e.top-u.getBoundingClientRect().top+u.scrollTop:e.top+window.scrollY;return `${d$1()} ${Math.round(t)} ${Math.round(e.height)}`}function z(){n.destroy();let e=g(),t=e!==i;m=d$1(),i=e,n=a(o,T(m,i)),S=f(),l!==null&&n.seek(l),t&&H();}let p;function W(){(g()!==i||f()!==S)&&z();}function c(){clearTimeout(p),p=setTimeout(W,150);}window.addEventListener("resize",c),window.addEventListener("orientationchange",c);let E=()=>{};function H(){E(),E=d([o,i],c);}return H(),{destroy(){clearTimeout(p),window.removeEventListener("resize",c),window.removeEventListener("orientationchange",c),E(),n.destroy();},replay(){l=null,n.replay();},pause(){n.pause(),l=n.getProgress();},resume(){l=null,n.resume();},seek(e){n.seek(e),l=n.getProgress();},getProgress(){return n.getProgress()},refresh(){z();}}}export{$ as scrollHorizontal};
1
+ import {a}from'../chunk-HAGTU5EX.mjs';import'../chunk-7LDSB4FT.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import {d}from'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var x={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0,refresh:()=>{}};function $(a$1,r={}){if(typeof window>"u")return x;let h=typeof a$1=="string"?document.querySelector(a$1):a$1;if(!h)return b("scrollHorizontal: track element not found:",a$1),x;let o=h,{easing:C="linear",trigger:P={start:"top top",end:"bottom bottom"},scrollContainer:s,respectReducedMotion:R=false,onProgress:v}=r,u=typeof s=="string"?document.querySelector(s):s??null;function S(){for(let e=o.parentElement;e;e=e.parentElement)if(window.getComputedStyle(e).position==="sticky")return e;return null}function M(){let e=S();if(e){let t=window.getComputedStyle(e);return e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)}return u?u.clientWidth:document.documentElement.clientWidth||window.innerWidth}function d$1(){return r.distance??o.scrollWidth-M()}function g(){if(r.triggerElement!==void 0){let t=typeof r.triggerElement=="string"?document.querySelector(r.triggerElement):r.triggerElement;if(t)return t;b("scrollHorizontal: triggerElement not found:",r.triggerElement);}let e=S();return e?e.parentElement??e:o}let m=d$1(),i=g(),n=a(o,T(m,i)),b$1=f(),l=null;function T(e,t){return {props:{transform:["translateX(0px)",`translateX(${-e}px)`]},trigger:P,easing:C,native:false,respectReducedMotion:R,...t!==o&&{triggerElement:t},...s!==void 0&&{scrollContainer:s},...v!==void 0&&{onProgress:v}}}function f(){let e=i.getBoundingClientRect(),t=u?e.top-u.getBoundingClientRect().top+u.scrollTop:e.top+window.scrollY;return `${d$1()} ${Math.round(t)} ${Math.round(e.height)}`}function z(){n.destroy();let e=g(),t=e!==i;m=d$1(),i=e,n=a(o,T(m,i)),b$1=f(),l!==null&&n.seek(l),t&&H();}let p;function W(){(g()!==i||f()!==b$1)&&z();}function c(){clearTimeout(p),p=setTimeout(W,150);}window.addEventListener("resize",c),window.addEventListener("orientationchange",c);let E=()=>{};function H(){E(),E=d([o,i],c);}return H(),{destroy(){clearTimeout(p),window.removeEventListener("resize",c),window.removeEventListener("orientationchange",c),E(),n.destroy();},replay(){l=null,n.replay();},pause(){n.pause(),l=n.getProgress();},resume(){l=null,n.resume();},seek(e){n.seek(e),l=n.getProgress();},getProgress(){return n.getProgress()},refresh(){z();}}}export{$ as scrollHorizontal};
@@ -1,10 +1,10 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-9bcJdVcg.js';
1
+ import { E as Easing, T as TriggerConfig, S as ScrollDrawInstance } from './types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollCounterOptions {
4
4
  from?: number;
5
5
  to: number;
6
6
  format?: (value: number) => string;
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  trigger?: TriggerConfig;
9
9
  once?: boolean;
10
10
  decimals?: number;
@@ -1,10 +1,10 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-9bcJdVcg.js';
2
- import { S as ScrollAnimateOptions } from './engine-6VsjEwzb.js';
1
+ import { E as Easing, T as TriggerConfig, S as ScrollDrawInstance } from './types-iITMwrru.js';
2
+ import { S as ScrollAnimateOptions } from './engine-DAlvk6i0.js';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;
6
6
  axis?: 'x' | 'y';
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  trigger?: TriggerConfig;
9
9
  onProgress?: (alpha: number) => void;
10
10
  }
@@ -1,10 +1,10 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-9bcJdVcg.mjs';
2
- import { S as ScrollAnimateOptions } from './engine-BLWKCfxC.mjs';
1
+ import { E as Easing, T as TriggerConfig, S as ScrollDrawInstance } from './types-iITMwrru.mjs';
2
+ import { S as ScrollAnimateOptions } from './engine-Bi2x8-X-.mjs';
3
3
 
4
4
  interface ScrollParallaxOptions {
5
5
  speed?: number;
6
6
  axis?: 'x' | 'y';
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  trigger?: TriggerConfig;
9
9
  onProgress?: (alpha: number) => void;
10
10
  }
@@ -1,10 +1,10 @@
1
- import { E as EasingName, T as TriggerConfig, S as ScrollDrawInstance } from './types-9bcJdVcg.mjs';
1
+ import { E as Easing, T as TriggerConfig, S as ScrollDrawInstance } from './types-iITMwrru.js';
2
2
 
3
3
  interface ScrollCounterOptions {
4
4
  from?: number;
5
5
  to: number;
6
6
  format?: (value: number) => string;
7
- easing?: EasingName | ((t: number) => number);
7
+ easing?: Easing;
8
8
  trigger?: TriggerConfig;
9
9
  once?: boolean;
10
10
  decimals?: number;