svg-scroll-draw 2.20.0 → 2.21.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.
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- 'use strict';var Or=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Or__default=/*#__PURE__*/_interopDefault(Or);function lr({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),s=0,a=[];for(let d=0;d<r;d++){let x=Math.pow(o,d);a.push(x),s+=x;}let c=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,c.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<r;x++)if(d<=c[x+1]){let M=(d-c[x])/(c[x+1]-c[x]);if(x===0)return M*(2-M);let P=1-Math.pow(t,x);return P+(1-P)*(2*M-1)*(2*M-1)}return 1}}function cr({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 s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var Z={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:lr(),elastic:cr()};function Lt(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}}function Pt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Ct(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:Lt((e-n)/(r-n)*t,0,1)}function Me(e,n,r,t,o){let s=Pt(e.top,e.height,n,t.element)-Ct(t.viewport,r),a=Pt(e.top,e.height,n,o.element)-Ct(o.viewport,r);return {tStart:s,tEnd:a}}function it(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.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ge(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function $t(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,n,r){let t=$t(e),o=$t(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 kt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ye=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ve(e,...n){Ye&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ur="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",mr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function fr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function pr(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 at(e){switch(e){case "linear":return "linear";case "ease-in":return ur;case "ease-out":return mr;case "ease-in-out":return fr()?pr(Z["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function It(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function Re(e,n){It().set(e,n);}function Oe(e){It().delete(e);}var Ke,lt=new Set,ct=new WeakMap,Qe=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function dr(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 Ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ke??(Ke=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Nt(a)&&(s=true),ct.set(a,"");s&&lt.forEach(a=>a());})),lt.add(r);let t=dr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ct.has(o)||ct.set(o,Nt(o)),Qe.set(o,(Qe.get(o)??0)+1),Ke.observe(o);}),()=>{lt.delete(r)&&(t.forEach(o=>{let s=(Qe.get(o)??1)-1;if(s)return void Qe.set(o,s);Qe.delete(o),Ke?.unobserve(o);}),lt.size||(Ke?.disconnect(),Ke=void 0));}}var gr=0;function yr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ft(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Dt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function hr(e){if(!Ye)return;let n=Ft(e,"stroke");if(!n||n==="none"){ve("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Dt.has(r)&&!Dt.has(Ft(e,"fill"))&&ve("Element has a fill \u2014 it may obscure the stroke animation.",e);}function br(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 s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
2
+ 'use strict';var Nr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Nr__default=/*#__PURE__*/_interopDefault(Nr);function ur({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),s=0,a=[];for(let p=0;p<r;p++){let E=Math.pow(o,p);a.push(E),s+=E;}let c=[0],m=0;for(let p=0;p<r;p++)m+=a[p]/s,c.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let E=0;E<r;E++)if(p<=c[E+1]){let P=(p-c[E])/(c[E+1]-c[E]);if(E===0)return P*(2-P);let $=1-Math.pow(t,E);return $+(1-$)*(2*P-1)*(2*P-1)}return 1}}function mr({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 s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var J={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ur(),elastic:mr()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function ie(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Ct(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function $t(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function Z(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Le(e,n,r,t,o){let s=Ct(e.top,e.height,n,t.element)-$t(t.viewport,r),a=Ct(e.top,e.height,n,o.element)-$t(o.viewport,r);return {tStart:s,tEnd:a}}function it(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.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ge(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function kt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let 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=kt(e),o=kt(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 Rt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ve(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var fr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ot=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let n=[];for(let r=0;r<Ot;r++){let t=r/(Ot-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return fr;case "ease-out":return pr;case "ease-in-out":return dr()?gr(J["ease-in-out"]):null;default:return null}}var It=Symbol.for("svg-scroll-draw.registry");function Nt(){let e=globalThis;return e[It]||(e[It]=new Map)}function Re(e,n){Nt().set(e,n);}function Oe(e){Nt().delete(e);}var Qe,lt=new Set,ct=new WeakMap,Je=new Map,Ft=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function yr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Ft(a)&&(s=true),ct.set(a,"");s&&lt.forEach(a=>a());})),lt.add(r);let t=yr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ct.has(o)||ct.set(o,Ft(o)),Je.set(o,(Je.get(o)??0)+1),Qe.observe(o);}),()=>{lt.delete(r)&&(t.forEach(o=>{let s=(Je.get(o)??1)-1;if(s)return void Je.set(o,s);Je.delete(o),Qe?.unobserve(o);}),lt.size||(Qe?.disconnect(),Qe=void 0));}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function wr(e){if(!Ke)return;let n=Dt(e,"stroke");if(!n||n==="none"){ve("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ht.has(r)&&!Ht.has(Dt(e,"fill"))&&ve("Element has a fill \u2014 it may obscure the stroke animation.",e);}function vr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
3
3
  <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
4
- <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}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 Ht=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function wr(e,n,r){if(!Ye)return;let t=(e.match(zt)??[]).join("").toUpperCase(),o=(n.match(zt)??[]).join("").toUpperCase(),s=(e.match(Ht)??[]).length,a=(n.match(Ht)??[]).length;if(t!==o){ve(`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}s!==a&&ve(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function gt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function Vt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...kt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:d="linear",trigger:x={},stagger:M=0,direction:P="forward",once:te=false,debug:Ee=false,axis:H="y",scrollContainer:K,autoReverse:z=false,delay:V=0,strokeColor:I,strokeWidth:$,fillOpacity:k,waypoints:h,velocityScale:C=false,threshold:E=0,rootMargin:b="0px",repeat:g=0,repeatDelay:U=0,morphTo:L,clip:_,autoplay:ie=false,duration:he=1e3,native:be=true,onProgress:q,onStart:O,onComplete:f,onEnter:p,onLeave:N,onEnterBack:X,onLeaveBack:Le}=o,T=_===true?"left":typeof _=="string"?_:false,W=typeof d=="function"?d:Z[d]??Z.linear,pe=ce(x.start??"top bottom"),Fe=ce(x.end??"bottom top"),Se=typeof K=="string"?document.querySelector(K):K??null,Pe=Array.isArray(I)?I[0]:null,de=Array.isArray(I)?I[1]:typeof I=="string"?I:null,re=Array.isArray($)?$[0]:null,ue=Array.isArray($)?$[1]:typeof $=="number"?$:null,me=Array.isArray(k)?k[0]:null,ne=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function De(i){let l=i*100;switch(T){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=T?[]:Array.from(e.querySelectorAll(a)),F=[],ge=[],ae=0,Te=0,u=M,v=0,G=false,Y=false,R=0,le=false,we=-1,He=[],fe=-1,Q=false,xe=0,ze=0,Ve,mt=null;function ht(){mt?.destroy(),mt=null;}let _e=new Set,bt=NaN,qe=true,et=-1,wt=performance.now(),We=NaN;function tt(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function vt(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function Et(){let i=it(e,Se,H);return Me(i,i.scroll,vt(),pe,Fe)}function rr(){let i=Te-ae,l=B.length-1,w=Se??document.documentElement,oe=H==="x"?"Width":"Height";if(u=M,M>0&&l>0&&i>0){let Ce=w[`scroll${oe}`]-w[`client${oe}`]-1-ae-i/c;Ce>=0&&(u=Math.min(M,Ce/(l*i)));}v=Te+l*u*i;}function St(){(({tStart:ae,tEnd:Te}=Et())),rr(),Ee&&Ye&&(ht(),mt=br(ae,Te,H));}function ft(i,l=Et){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let w=i.destroy;return i.destroy=()=>{w.call(i),Oe(e);},i}function nr(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),T){let w=l==="reverse"?1-i:i;e.style.clipPath=De(w);return}B.forEach((w,oe)=>{w.style.strokeDashoffset=l==="reverse"?`${F[oe]*i}`:`${F[oe]*(1-i)}`,m&&(w.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&de?w.style.stroke=je(Pe,de,i):de&&(w.style.stroke=de),re!==null&&ue!==null?w.style.strokeWidth=`${re+(ue-re)*i}`:ue!==null&&(w.style.strokeWidth=`${ue}`),me!==null&&ne!==null?w.style.fillOpacity=`${me+(ne-me)*i}`:ne!==null&&(w.style.fillOpacity=`${ne}`),L&&w.tagName.toLowerCase()==="path"&&ge[oe]&&w.setAttribute("d",gt(ge[oe],L,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),T){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${F[l]}`,i.style.strokeDashoffset=P==="reverse"?"0":`${F[l]}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`),L&&i.tagName.toLowerCase()==="path"&&ge[l]&&i.setAttribute("d",ge[l]);});}if(B.forEach(i=>{hr(i);let l=Ge(i);F.push(l);let w=i.tagName.toLowerCase()==="path";w?ge.push(i.getAttribute("d")??""):ge.push(""),L&&(w?wr(ge[ge.length-1],L,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),de&&(i.style.stroke=de),ue!==null&&(i.style.strokeWidth=`${ue}`),ne!==null&&(i.style.fillOpacity=`${ne}`),L&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",L)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?"0":`${l}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`));}),T){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof d=="string"?at(d):null;function or(){return !(be===false||!yr()||!B.length||!Tt||T||H!=="y"||Se||c!==1||M!==0||te||z||C!==false||L||h||g||V>0||q||O||f||p||N||X||Le||I!=null||$!=null||k!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function sr(){let i=++gr,l=`svg-scroll-draw-${i}`,w=`svg-scroll-draw-host-${i}`,oe=`--svg-scroll-draw-${i}`,Ce=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,A=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${P==="reverse"?1:0};`,A+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${A}}}.${w}{view-timeline-name:${oe};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${oe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function ye(y,se){y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(ye);let S=false,j=-1;function J(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:se,tEnd:$e}=Me({top:y.top,height:y.height},tt(),vt(),pe,Fe);return W(ee(tt(),se,$e,c))}return {destroy(){e.classList.remove(w),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){S=false,j=-1,B.forEach(ye);},pause(){S=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){S&&(S=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let se=Math.min(1,Math.max(0,y));j=se,S=true,B.forEach(($e,Ae)=>{$e.classList.remove(l),$e.style.strokeDashoffset=P==="reverse"?`${F[Ae]*se}`:`${F[Ae]*(1-se)}`,m&&($e.style.opacity=P==="reverse"?`${1-se}`:`${se}`);});},getProgress(){return J()},refresh(){B.forEach((y,se)=>{F[se]=Ge(y),y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`;});}}}if(or())return ft(sr());function ir(){let i=Math.max(1,he),l=0,w=0,oe=false;function Ce(S){let j=true;if(T){let J=Math.min(1,Math.max(0,S/i)),y=W(J);xe=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De(P==="reverse"?1-y:y),q?.(y),J<1&&(j=false);}else B.forEach((J,y)=>{let se=y*M*i,$e=Math.min(1,Math.max(0,(S-se)/i)),Ae=W($e);J.style.strokeDashoffset=P==="reverse"?`${F[y]*Ae}`:`${F[y]*(1-Ae)}`,m&&(J.style.opacity=P==="reverse"?`${1-Ae}`:`${Ae}`),Pe&&de?J.style.stroke=je(Pe,de,Ae):de&&(J.style.stroke=de),re!==null&&ue!==null?J.style.strokeWidth=`${re+(ue-re)*Ae}`:ue!==null&&(J.style.strokeWidth=`${ue}`),me!==null&&ne!==null?J.style.fillOpacity=`${me+(ne-me)*Ae}`:ne!==null&&(J.style.fillOpacity=`${ne}`),L&&J.tagName.toLowerCase()==="path"&&ge[y]&&J.setAttribute("d",gt(ge[y],L,Ae)),y===0&&(xe=Ae,q?.(Ae),e.style.setProperty("--scroll-draw-progress",String(Ae))),$e<1&&(j=false);});if(h){let J=Math.min(1,Math.max(0,S/i)),y=W(J);for(let se in h){let $e=parseFloat(se);y>=$e&&!_e.has($e)&&(_e.add($e),h[se]?.());}}return j}function Ie(S){if(Q)return;let j=S-l;Y||(Y=true,O?.());let J=Ce(j);if(J&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*M)),f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),R=requestAnimationFrame(Ie);},U));return}J||(R=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(R),clearTimeout(Ve),l=performance.now(),w=0,Q=false,Y=false,G=false,ze=0,oe=true,xe=0,_e.clear(),rt(),R=requestAnimationFrame(Ie);}let A=new IntersectionObserver(S=>{S.forEach(j=>{j.isIntersecting&&!(te&&G)?ke():!j.isIntersecting&&!te&&!G&&(cancelAnimationFrame(R),clearTimeout(Ve),oe=false);});},{root:Se??null,threshold:E,rootMargin:b}),D;function ye(){clearTimeout(D),D=setTimeout(()=>{B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});},150);}return window.addEventListener("resize",ye),window.addEventListener("orientationchange",ye),V>0?setTimeout(()=>A.observe(e),V):A.observe(e),{destroy(){cancelAnimationFrame(R),clearTimeout(Ve),A.disconnect(),window.removeEventListener("resize",ye),window.removeEventListener("orientationchange",ye),clearTimeout(D);},replay(){ze=0,ke();},pause(){Q||!oe||(Q=true,w=performance.now()-l,cancelAnimationFrame(R));},resume(){Q&&(Q=false,oe=true,l=performance.now()-w,R=requestAnimationFrame(Ie));},seek(S){let j=Math.min(1,Math.max(0,S));xe=j,Q=true,w=j*i,l=performance.now()-w,cancelAnimationFrame(R),Ce(w);},getProgress(){return xe},refresh(){clearTimeout(D),B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});}}}if(ie)return ft(ir());St();function xt(){if(Q||!Be)return;let i=performance.now(),l=tt();if(!qe&&C===false&&l===bt){pt(l);return}qe=false,bt=l;let w=c;if(C!==false){let A=i-wt,D=A>0?Math.abs(l-(et<0?l:et))/A:0;w=c*Math.max(.2,1+D*(typeof C=="number"?C:1)*.04);}et=l,wt=i;let oe=z?fe===-1||l>=fe?"forward":"reverse":P;fe=l;let Ce=Te-ae,Ie=true,ke=Ce===0?0:(l-ae)/Ce;if(isNaN(We)||(We<=0&&ke>0?p?.():We>0&&ke<=0&&Le?.(),We<1&&ke>=1?N?.():We>=1&&ke<1&&X?.()),We=ke,T){let A=W(ee(l,ae,Te,w));te&&!z&&(we=Math.max(we,A),A=we),xe=A,e.style.setProperty("--scroll-draw-progress",String(A));let D=oe==="reverse"?1-A:A;e.style.clipPath=De(D),q?.(A),!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),A>=1&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},U))):A<1&&!te&&(G=false),pt(l);return}if(B.forEach((A,D)=>{let ye=D*u*Ce,S=W(ee(l,ae+ye,Te+ye,w));te&&!z&&(S=He[D]=Math.max(He[D]??we,S)),A.style.strokeDashoffset=oe==="reverse"?`${F[D]*S}`:`${F[D]*(1-S)}`,m&&(A.style.opacity=oe==="reverse"?`${1-S}`:`${S}`),Pe&&de?A.style.stroke=je(Pe,de,S):de&&(A.style.stroke=de),re!==null&&ue!==null?A.style.strokeWidth=`${re+(ue-re)*S}`:ue!==null&&(A.style.strokeWidth=`${ue}`),me!==null&&ne!==null?A.style.fillOpacity=`${me+(ne-me)*S}`:ne!==null&&(A.style.fillOpacity=`${ne}`),L&&A.tagName.toLowerCase()==="path"&&ge[D]&&A.setAttribute("d",gt(ge[D],L,S)),D===0&&(xe=S,q?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(Ie=false);}),h){let A=W(ee(l,ae,Te,w));for(let D in h){let ye=parseFloat(D);A>=ye&&!_e.has(ye)&&(_e.add(ye),h[D]?.());}}!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),Ie&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},U))):!Ie&&!te&&(G=false),pt(l);}function At(i){return i>=Te&&i<v}function pt(i){le||At(i)?R=requestAnimationFrame(xt):Be=false;}let Be=false;function nt(){Be||(Be=true,R=requestAnimationFrame(function(){xt();}));}function ot(){Be=false,cancelAnimationFrame(R);}let dt=new IntersectionObserver(i=>{i.forEach(l=>{le=l.isIntersecting,le&&!Q?(qe=true,nt()):Be&&!Q&&At(tt())||ot();});},{root:Se??null,threshold:E,rootMargin:b});function Mt(){B.forEach((i,l)=>{F[l]=Ge(i),i.style.strokeDasharray=`${F[l]}`;}),St(),qe=true;}let st;function Xe(){clearTimeout(st),st=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let ar=Ne([e],Xe);return V>0?setTimeout(()=>dt.observe(e),V):dt.observe(e),ft({destroy(){cancelAnimationFrame(R),clearTimeout(Ve),ot(),dt.disconnect(),ar(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(st),ht();},replay(){we=-1,He=[],fe=-1,et=-1,Y=false,G=false,ze=0,Q=false,xe=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,le&&nt();},pause(){Q=true,ot();},resume(){Q&&(Q=false,qe=true,le&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));xe=l,we=l,He=[],Q=true,ot(),nr(l,P),qe=true;},getProgress(){return xe},refresh(){clearTimeout(st),Mt(),le&&!Q&&nt();}},()=>({tStart:ae,tEnd:Te}))}var _t=new WeakMap,vr=0;function qt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=_t.get(r);return t===void 0&&_t.set(r,t=++vr),`el#${t}`}return r})}function Wt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Er(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=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function Sr(e,n,r){let t=Bt(e),o=Bt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,d)=>`${m}${c.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(c.nums[d]-m)*r}${s.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(Er(t))return je(t,o,r);if(t.includes("("))return Sr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function Tr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var xr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Ar=0,jt="--scroll-draw-progress";function Mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ut(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:M=false,respectReducedMotion:P=true,triggerElement:te,onProgress:Ee,onComplete:H,onEnter:K,onLeave:z,onEnterBack:V,onLeaveBack:I}=n,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof s=="function"?s:Z[s]??Z["ease-out"],h=ce(o.start??"top bottom"),C=ce(o.end??"bottom top"),E=te??e,b=typeof d=="string"?document.querySelector(d):d??null,g=Object.entries(t).map(([u,v])=>({prop:Tr(u),from:Array.isArray(v)?v[0]:"",to:Array.isArray(v)?v[1]:v}));function U(){let u=window.getComputedStyle(e);for(let v of g)v.from===""&&(v.from=u.getPropertyValue(v.prop).trim()||"0");}function L(){for(let u of g)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...g.map(v=>v.prop),jt])_.set(u,e.style.getPropertyValue(u));function ie(){for(let[u,v]of _)v?e.style.setProperty(u,v):e.style.removeProperty(u);}if($)return L(),H?.(),{...r,destroy:ie,getProgress:()=>1};U();let he=typeof s=="string"?at(s):null;function be(){if(!x||!Mr()||!he||m!=="y"||b||E!==e||c||a!==1||Ee||H||K||z||V||I||M!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of g)if(!xr.has(u.prop))return false;return true}function q(){let u=`ssd-a-${++Ar}`,v=g.map(fe=>`${fe.prop}:${fe.from}`).join(";"),G=g.map(fe=>`${fe.prop}:${fe.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${v}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let R=()=>m==="x"?window.scrollX:window.scrollY,le=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let fe=e.getBoundingClientRect();return Me({top:fe.top,height:fe.height},R(),le(),h,C)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ie(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(fe){let Q=Math.min(1,Math.max(0,fe));e.classList.remove(u);for(let xe of g)e.style.setProperty(xe.prop,Gt(xe.from,xe.to,Q));},getProgress(){let{tStart:fe,tEnd:Q}=we();return k(ee(R(),fe,Q,a))}};return He}if(be())return q();let O=0,f=0,p=0,N=false,X=false,Le=-1,T=0,W=false,pe=NaN,Fe=-1,Se=0,Pe=()=>b?m==="x"?b.scrollLeft:b.scrollTop:m==="x"?window.scrollX:window.scrollY,de=()=>b?m==="x"?b.clientWidth:b.clientHeight:m==="x"?window.innerWidth:window.innerHeight,re=E===e?g:[],ue=false;function me(){let u=e.style,v=re.map(le=>u.getPropertyValue(le.prop)),G=u.transition;re.length&&(u.transition="none"),re.forEach(le=>u.setProperty(le.prop,_.get(le.prop)??""));let Y=it(E,b,m);re.forEach((le,we)=>u.setProperty(le.prop,v[we])),re.length&&(e.offsetWidth,u.transition=G);let R=Me(Y,Y.scroll,de(),h,C);ue&&Math.abs(R.tStart-O)<1&&Math.abs(R.tEnd-f)<1||(ue=true,O=R.tStart,f=R.tEnd);}function ne(u){e.style.setProperty(jt,String(u));for(let v of g)e.style.setProperty(v.prop,Gt(v.from,v.to,u));Ee?.(u);}function De(u){if(isNaN(pe)){pe=u;return}pe<=0&&u>0?K?.():pe>0&&u<=0&&I?.(),pe<1&&u>=1?z?.():pe>=1&&u<1&&V?.(),pe=u;}function B(){if(!N||X)return;let u=performance.now(),v=Pe(),G=a;if(M!==false){let le=u-Se,we=le>0?Math.abs(v-(Fe<0?v:Fe))/le:0;G=a*Math.max(.2,1+we*(typeof M=="number"?M:1)*.04);}Fe=v,Se=u;let Y=f===O?0:(v-O)/(f-O);De(Y);let R=k(ee(v,O,f,G));c&&(Le=Math.max(Le,R),R=Le),T=R,ne(R),R>=1&&!W?(W=true,H?.()):R<1&&!c&&(W=false),p=requestAnimationFrame(B);}me(),f===O&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=k(ee(Pe(),O,f,a));c&&u>0&&(Le=u),T=u,ne(u);}let F=new IntersectionObserver(u=>{u.forEach(v=>{N=v.isIntersecting,N&&!X?p=requestAnimationFrame(B):cancelAnimationFrame(p);});},{root:b??null}),ge;function ae(){clearTimeout(ge),ge=setTimeout(me,150);}window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae);let Te=Ne([E],ae);return F.observe(e),Re(e,{type:"animate",getProgress:()=>T,getTrigger:()=>({tStart:O,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),Te(),clearTimeout(ge),ie(),Oe(e);},replay(){Le=-1,W=false,T=0,X=false,ne(0);},pause(){X=true,cancelAnimationFrame(p);},resume(){X&&(X=false,N&&(p=requestAnimationFrame(B)));},seek(u){let v=Math.min(1,Math.max(0,u));T=v,Le=v,X=true,cancelAnimationFrame(p),ne(v);},getProgress(){return T},refresh(){me();}}}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 ve("scrollCounter: element not found:",e),yt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:M}=n,P=x!==void 0?f=>f.toFixed(x):a??(f=>String(Math.round(f))),te=typeof c=="function"?c:Z[c]??Z["ease-out"],Ee=ce(m.start??"top 80%"),H=ce(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(s),M?.(),yt;let z=0,V=0,I=false,$=0,k=false,h=false,C=-1,E=0,b=false,g=()=>window.scrollY,U=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Me({top:f.top,height:f.height},g(),U(),Ee,H);I&&Math.abs(p.tStart-z)<1&&Math.abs(p.tEnd-V)<1||(I=true,z=p.tStart,V=p.tEnd);}function _(f){t.textContent=P(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ie(){if(!k||h)return;let f=te(ee(g(),z,V,1));d&&(C=Math.max(C,f),f=C),E=f,_(f),f>=1&&!b?(b=true,M?.()):f<1&&!d&&(b=false),$=requestAnimationFrame(ie);}L();{let f=te(ee(g(),z,V,1));d&&f>0&&(C=f),E=f,_(f);}let he=new IntersectionObserver(f=>{f.forEach(p=>{k=p.isIntersecting,k&&!h?$=requestAnimationFrame(ie):cancelAnimationFrame($);});}),be;function q(){clearTimeout(be),be=setTimeout(L,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let O=Ne([t],q);return he.observe(t),Re(t,{type:"counter",getProgress:()=>E,getTrigger:()=>({tStart:z,tEnd:V})}),{destroy(){cancelAnimationFrame($),he.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),O(),clearTimeout(be),Oe(t);},replay(){C=-1,b=false,E=0,h=false,_(0);},pause(){h=true,cancelAnimationFrame($);},resume(){h&&(h=false,k&&($=requestAnimationFrame(ie)));},seek(f){let p=Math.min(1,Math.max(0,f));E=p,C=p,h=true,cancelAnimationFrame($),_(p);},getProgress(){return E}}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Yt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:d,onReady:x,onComplete:M,onProgress:P}=n,te=d??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof s=="function"?s:Z[s]??Z.linear,K=ce(o.start??"top top"),z=ce(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let V=n.from??0,I=n.to,$=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=false,_=()=>c==="x"?window.scrollX:window.scrollY,ie=()=>c==="x"?window.innerWidth:window.innerHeight;function he(){let T=te.getBoundingClientRect(),W=c==="x"?T.left:T.top,pe=c==="x"?T.width:T.height,Fe=Me({top:W,height:pe},_(),ie(),K,z);$=Fe.tStart,k=Fe.tEnd,L&&k===$&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let be=NaN;function q(T){if(!L)return;let W=I??t.duration??0,pe=V+(W-V)*T;pe!==be&&(be=pe,t.currentTime=pe),t.style.setProperty("--scroll-draw-progress",String(T)),P?.(T);}function O(){if(!C||E||!L||Ee)return;let T=H(ee(_(),$,k,1));a&&(b=Math.max(b,T),T=b),g=T,q(T),T>=1&&!U?(U=true,M?.()):T<1&&!a&&(U=false),h=requestAnimationFrame(O);}function f(){if(L=true,I===void 0&&(I=t.duration),Ee){q(1),x?.();return}he(),x?.(),C&&!E&&(h=requestAnimationFrame(O));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||he();let p=new IntersectionObserver(T=>{T.forEach(W=>{C=W.isIntersecting,C&&!E&&L?h=requestAnimationFrame(O):cancelAnimationFrame(h);});}),N;function X(){clearTimeout(N),N=setTimeout(he,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let Le=Ne([te],X);return p.observe(t),Re(t,{type:"video",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),Le(),clearTimeout(N),Oe(t);},replay(){b=-1,U=false,g=0,E=false,be=NaN,q(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&L&&(h=requestAnimationFrame(O)));},seek(T){let W=Math.min(1,Math.max(0,T));g=W,b=W,E=true,cancelAnimationFrame(h),be=NaN,q(W);},getProgress(){return g}}}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Lr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Qt(e){let n=Zt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,d)=>{let x=m.nextElementSibling;c.appendChild(m),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&c.appendChild(x);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Pr(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Cr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function er(e,n={}){if(typeof window>"u")return Jt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),Jt;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=n,M=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof a=="function"?a:Z[a]??Z["ease-out"],te=ce(m.start??"top 85%"),Ee=ce(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let K;o==="chars"?K=Lr(t):o==="lines"?K=Qt(t):K=Zt(t);let z=K.length;function V(p,N){c?.opacity!==void 0&&(p.style.opacity=String(c.opacity+(1-c.opacity)*N));let X=Cr(N,c);X&&(p.style.transform=X);}function I(p){t.style.setProperty("--scroll-draw-progress",String(p)),K.forEach((N,X)=>{let Le=P(Pr(p,X,z,s));V(N,Le);});}if(M)return I(1),x?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};I(0);let $=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=()=>window.scrollY,_=()=>window.innerHeight;function ie(){let p=t.getBoundingClientRect(),N=Me({top:p.top,height:p.height},L(),_(),te,Ee);$=N.tStart,k=N.tEnd;}function he(){if(!C||E)return;let p=ee(L(),$,k,1);d&&(b=Math.max(b,p),p=b),g=p,I(p),p>=1&&!U?(U=true,x?.()):p<1&&!d&&(U=false),h=requestAnimationFrame(he);}ie();let be=new IntersectionObserver(p=>{p.forEach(N=>{C=N.isIntersecting,C&&!E?h=requestAnimationFrame(he):cancelAnimationFrame(h);});}),q;function O(){clearTimeout(q),q=setTimeout(()=>{if(o==="lines"){let p=g;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),K=Qt(t),I(p);}ie();},150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let f=Ne([t],O);return be.observe(t),Re(t,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),be.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),f(),clearTimeout(q),t.innerHTML=H,t.removeAttribute("aria-label"),Oe(t);},replay(){b=-1,U=false,g=0,E=false,I(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&(h=requestAnimationFrame(he)));},seek(p){let N=Math.min(1,Math.max(0,p));g=N,b=N,E=true,cancelAnimationFrame(h),I(N);},getProgress(){return g}}}function Rr(e,n={}){let[r,t]=Or.useState(0),o=Or.useRef(n);o.current=n;let s=Or.useRef(-1);return Or.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:d,trigger:x={}}=o.current,M=typeof d=="string"?document.querySelector(d):d??null,P=ce(x.start??"top bottom"),te=ce(x.end??"bottom top"),Ee=0,H=0,K=false,z=0;function V(){return M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY}function I(){return M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function $(){let b=c.getBoundingClientRect(),g=V(),U=m==="x"?b.left:b.top,L=m==="x"?b.width:b.height,_=Me({top:U,height:L},g,I(),P,te);Ee=_.tStart,H=_.tEnd;}function k(){if(!K)return;let{speed:b=1,easing:g="linear",once:U=false}=o.current,L=typeof g=="function"?g:Z[g]??Z.linear,_=ee(V(),Ee,H,b),ie=L(_);U&&(s.current=Math.max(s.current,ie),ie=s.current),t(ie),z=requestAnimationFrame(k);}let h=new IntersectionObserver(b=>{b.forEach(g=>{K=g.isIntersecting,K?z=requestAnimationFrame(k):cancelAnimationFrame(z);});},{root:M??null,threshold:0});$(),h.observe(c);let C;function E(){clearTimeout(C),C=setTimeout($,150);}return window.addEventListener("resize",E),window.addEventListener("orientationchange",E),()=>{cancelAnimationFrame(z),clearTimeout(C),h.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E);}},[]),r}function Je(e,n,r){let t=Or.useRef(n);t.current=n;let o=qt(n);Or.useEffect(()=>{if(!e.current)return;let s=r(e.current,Wt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Nr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function Ze(e){let n={},r={};for(let[t,o]of Object.entries(e))(Nr.test(t)?r:n)[t]=o;return [n,r]}function jn({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Vt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Un({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Ut),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Xn({className:e,style:n,...r}){let t=Or.useRef(null),[o,s]=Ze(r);return Je(t,o,Xt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Yn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Or.useRef(null),[c,m]=Ze(s);return Je(a,c,Kt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Kn({children:e,as:n="p",className:r,style:t,...o}){let s=Or.useRef(null),[a,c]=Ze(o);return Je(s,a,er),Or__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Un;exports.ScrollCounter=Xn;exports.ScrollDraw=jn;exports.ScrollText=Kn;exports.ScrollVideo=Yn;exports.useScrollDrawProgress=Rr;
4
+ <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}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,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Er(e,n,r){if(!Ke)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),o=(n.match(Vt)??[]).join("").toUpperCase(),s=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(t!==o){ve(`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}s!==a&&ve(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ht(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function _t(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Rt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:p="linear",trigger:E={},stagger:P=0,direction:$="forward",once:ee=false,debug:Ee=false,axis:z="y",scrollContainer:me,autoReverse:I=false,delay:q=0,strokeColor:U,strokeWidth:C,fillOpacity:R,waypoints:S,velocityScale:x=false,threshold:A=0,rootMargin:g="0px",repeat:d=0,repeatDelay:V=0,morphTo:T,clip:_,autoplay:ae=false,duration:Se=1e3,native:fe=true,onProgress:X,onStart:F,onComplete:f,onEnter:N,onLeave:M,onEnterBack:k,onLeaveBack:pe}=o,b=_===true?"left":typeof _=="string"?_:false,W=typeof p=="function"?p:J[p]??J.linear,de=ie(E.start??"top bottom"),Fe=ie(E.end??"bottom top"),Te=typeof me=="string"?document.querySelector(me):me??null,Pe=Array.isArray(U)?U[0]:null,ge=Array.isArray(U)?U[1]:typeof U=="string"?U:null,te=Array.isArray(C)?C[0]:null,le=Array.isArray(C)?C[1]:typeof C=="number"?C:null,ce=Array.isArray(R)?R[0]:null,re=Array.isArray(R)?R[1]:typeof R=="number"?R:null;function De(i){let l=i*100;switch(b){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=b?[]:Array.from(e.querySelectorAll(a)),D=[],ye=[],se=0,xe=0,u=P,w=0,G=false,Y=false,O=0,he=false,we=-1,He=[],ue=-1,K=false,Ae=0,ze=0,Ve,mt=null;function wt(){mt?.destroy(),mt=null;}let _e=new Set,vt=NaN,qe=true,tt=-1,Et=performance.now(),We=NaN;function Xe(){return Te?z==="x"?Te.scrollLeft:Te.scrollTop:z==="x"?window.scrollX:window.scrollY}function St(){return Te?z==="x"?Te.clientWidth:Te.clientHeight:z==="x"?window.innerWidth:window.innerHeight}function Tt(){let i=it(e,Te,z);return Le(i,i.scroll,St(),de,Fe)}function or(){let i=xe-se,l=B.length-1,h=Te??document.documentElement,ne=z==="x"?"Width":"Height";if(u=P,P>0&&l>0&&i>0){let Ce=h[`scroll${ne}`]-h[`client${ne}`]-1-se-i/c;Ce>=0&&(u=Math.min(P,Ce/(l*i)));}w=xe+l*u*i;}function xt(){(({tStart:se,tEnd:xe}=Tt())),or(),Ee&&Ke&&(wt(),mt=vr(se,xe,z));}function ft(i,l=Tt){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let h=i.destroy;return i.destroy=()=>{h.call(i),Oe(e);},i}function sr(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),b){let h=l==="reverse"?1-i:i;e.style.clipPath=De(h);return}B.forEach((h,ne)=>{h.style.strokeDashoffset=l==="reverse"?`${D[ne]*i}`:`${D[ne]*(1-i)}`,m&&(h.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&ge?h.style.stroke=je(Pe,ge,i):ge&&(h.style.stroke=ge),te!==null&&le!==null?h.style.strokeWidth=`${te+(le-te)*i}`:le!==null&&(h.style.strokeWidth=`${le}`),ce!==null&&re!==null?h.style.fillOpacity=`${ce+(re-ce)*i}`:re!==null&&(h.style.fillOpacity=`${re}`),T&&h.tagName.toLowerCase()==="path"&&ye[ne]&&h.setAttribute("d",ht(ye[ne],T,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),b){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${D[l]}`,i.style.strokeDashoffset=$==="reverse"?"0":`${D[l]}`,m?i.style.opacity=$==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),te!==null&&(i.style.strokeWidth=`${te}`),ce!==null&&(i.style.fillOpacity=`${ce}`),T&&i.tagName.toLowerCase()==="path"&&ye[l]&&i.setAttribute("d",ye[l]);});}if(B.forEach(i=>{wr(i);let l=Ge(i);D.push(l);let h=i.tagName.toLowerCase()==="path";h?ye.push(i.getAttribute("d")??""):ye.push(""),T&&(h?Er(ye[ye.length-1],T,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=$==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),ge&&(i.style.stroke=ge),le!==null&&(i.style.strokeWidth=`${le}`),re!==null&&(i.style.fillOpacity=`${re}`),T&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",T)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=$==="reverse"?"0":`${l}`,m?i.style.opacity=$==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),te!==null&&(i.style.strokeWidth=`${te}`),ce!==null&&(i.style.fillOpacity=`${ce}`));}),b){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof p=="string"?at(p):null;function ir(){return !(fe===false||!br()||!B.length||!At||b||z!=="y"||Te||c!==1||P!==0||ee||I||x!==false||T||S||d||q>0||X||F||f||N||M||k||pe||U!=null||C!=null||R!=null||(E.start??"top bottom").trim()!=="top bottom"||(E.end??"bottom top").trim()!=="bottom top")}function ar(){let i=++hr,l=`svg-scroll-draw-${i}`,h=`svg-scroll-draw-host-${i}`,ne=`--svg-scroll-draw-${i}`,Ce=$==="reverse"?"0":"var(--ssd-len)",Ie=$==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,L=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${$==="reverse"?1:0};`,L+=`opacity:${$==="reverse"?0:1};`);let H=document.createElement("style");H.setAttribute("data-svg-scroll-draw",""),H.textContent=`@keyframes ${l}{from{${ke}}to{${L}}}.${h}{view-timeline-name:${ne};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${ne};animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(h);function be(y,oe){y.style.setProperty("--ssd-len",String(D[oe])),y.style.strokeDasharray=`${D[oe]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(be);let v=false,j=-1;function Q(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:oe,tEnd:$e}=Le({top:y.top,height:y.height},Xe(),St(),de,Fe);return W(Z(Xe(),oe,$e,c))}return {destroy(){e.classList.remove(h),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),H.remove();},replay(){v=false,j=-1,B.forEach(be);},pause(){v=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){v&&(v=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let oe=Math.min(1,Math.max(0,y));j=oe,v=true,B.forEach(($e,Me)=>{$e.classList.remove(l),$e.style.strokeDashoffset=$==="reverse"?`${D[Me]*oe}`:`${D[Me]*(1-oe)}`,m&&($e.style.opacity=$==="reverse"?`${1-oe}`:`${oe}`);});},getProgress(){return Q()},refresh(){B.forEach((y,oe)=>{D[oe]=Ge(y),y.style.setProperty("--ssd-len",String(D[oe])),y.style.strokeDasharray=`${D[oe]}`;});}}}if(ir())return ft(ar());function lr(){let i=Math.max(1,Se),l=0,h=0,ne=false;function Ce(v){let j=true;if(b){let Q=Math.min(1,Math.max(0,v/i)),y=W(Q);Ae=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De($==="reverse"?1-y:y),X?.(y),Q<1&&(j=false);}else B.forEach((Q,y)=>{let oe=y*P*i,$e=Math.min(1,Math.max(0,(v-oe)/i)),Me=W($e);Q.style.strokeDashoffset=$==="reverse"?`${D[y]*Me}`:`${D[y]*(1-Me)}`,m&&(Q.style.opacity=$==="reverse"?`${1-Me}`:`${Me}`),Pe&&ge?Q.style.stroke=je(Pe,ge,Me):ge&&(Q.style.stroke=ge),te!==null&&le!==null?Q.style.strokeWidth=`${te+(le-te)*Me}`:le!==null&&(Q.style.strokeWidth=`${le}`),ce!==null&&re!==null?Q.style.fillOpacity=`${ce+(re-ce)*Me}`:re!==null&&(Q.style.fillOpacity=`${re}`),T&&Q.tagName.toLowerCase()==="path"&&ye[y]&&Q.setAttribute("d",ht(ye[y],T,Me)),y===0&&(Ae=Me,X?.(Me),e.style.setProperty("--scroll-draw-progress",String(Me))),$e<1&&(j=false);});if(S){let Q=Math.min(1,Math.max(0,v/i)),y=W(Q);for(let oe in S){let $e=parseFloat(oe);y>=$e&&!_e.has($e)&&(_e.add($e),S[oe]?.());}}return j}function Ie(v){if(K)return;let j=v-l;Y||(Y=true,F?.());let Q=Ce(j);if(Q&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*P)),f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),O=requestAnimationFrame(Ie);},V));return}Q||(O=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(O),clearTimeout(Ve),l=performance.now(),h=0,K=false,Y=false,G=false,ze=0,ne=true,Ae=0,_e.clear(),rt(),O=requestAnimationFrame(Ie);}let L=new IntersectionObserver(v=>{v.forEach(j=>{j.isIntersecting&&!(ee&&G)?ke():!j.isIntersecting&&!ee&&!G&&(cancelAnimationFrame(O),clearTimeout(Ve),ne=false);});},{root:Te??null,threshold:A,rootMargin:g}),H;function be(){clearTimeout(H),H=setTimeout(()=>{B.forEach((v,j)=>{D[j]=Ge(v),v.style.strokeDasharray=`${D[j]}`;});},150);}return window.addEventListener("resize",be),window.addEventListener("orientationchange",be),q>0?setTimeout(()=>L.observe(e),q):L.observe(e),{destroy(){cancelAnimationFrame(O),clearTimeout(Ve),L.disconnect(),window.removeEventListener("resize",be),window.removeEventListener("orientationchange",be),clearTimeout(H);},replay(){ze=0,ke();},pause(){K||!ne||(K=true,h=performance.now()-l,cancelAnimationFrame(O));},resume(){K&&(K=false,ne=true,l=performance.now()-h,O=requestAnimationFrame(Ie));},seek(v){let j=Math.min(1,Math.max(0,v));Ae=j,K=true,h=j*i,l=performance.now()-h,cancelAnimationFrame(O),Ce(h);},getProgress(){return Ae},refresh(){clearTimeout(H),B.forEach((v,j)=>{D[j]=Ge(v),v.style.strokeDasharray=`${D[j]}`;});}}}if(ae)return ft(lr());xt();function Mt(){if(K||!Be)return;let i=performance.now(),l=Xe();if(!qe&&x===false&&l===vt){dt(l);return}qe=false,vt=l;let h=c;if(x!==false){let L=i-Et,H=L>0?Math.abs(l-(tt<0?l:tt))/L:0;h=c*Math.max(.2,1+H*(typeof x=="number"?x:1)*.04);}tt=l,Et=i;let ne=I?ue===-1||l>=ue?"forward":"reverse":$;ue=l;let Ce=xe-se,Ie=true,ke=Ce===0?0:(l-se)/Ce;if(isNaN(We)||(We<=0&&ke>0?N?.():We>0&&ke<=0&&pe?.(),We<1&&ke>=1?M?.():We>=1&&ke<1&&k?.()),We=ke,b){let L=W(Z(l,se,xe,h));ee&&!I&&(we=Math.max(we,L),L=we),Ae=L,e.style.setProperty("--scroll-draw-progress",String(L));let H=ne==="reverse"?1-L:L;e.style.clipPath=De(H),X?.(L),!Y&&Z(l,se,xe,h)>0&&(Y=true,F?.()),L>=1&&!G?(G=true,f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},V))):L<1&&!ee&&(G=false),dt(l);return}if(B.forEach((L,H)=>{let be=H*u*Ce,v=W(Z(l,se+be,xe+be,h));ee&&!I&&(v=He[H]=Math.max(He[H]??we,v)),L.style.strokeDashoffset=ne==="reverse"?`${D[H]*v}`:`${D[H]*(1-v)}`,m&&(L.style.opacity=ne==="reverse"?`${1-v}`:`${v}`),Pe&&ge?L.style.stroke=je(Pe,ge,v):ge&&(L.style.stroke=ge),te!==null&&le!==null?L.style.strokeWidth=`${te+(le-te)*v}`:le!==null&&(L.style.strokeWidth=`${le}`),ce!==null&&re!==null?L.style.fillOpacity=`${ce+(re-ce)*v}`:re!==null&&(L.style.fillOpacity=`${re}`),T&&L.tagName.toLowerCase()==="path"&&ye[H]&&L.setAttribute("d",ht(ye[H],T,v)),H===0&&(Ae=v,X?.(v),e.style.setProperty("--scroll-draw-progress",String(v))),v<1&&(Ie=false);}),S){let L=W(Z(l,se,xe,h));for(let H in S){let be=parseFloat(H);L>=be&&!_e.has(be)&&(_e.add(be),S[H]?.());}}!Y&&Z(l,se,xe,h)>0&&(Y=true,F?.()),Ie&&!G?(G=true,f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},V))):!Ie&&!ee&&(G=false),dt(l);}function pt(i){return i>=xe&&i<w}function dt(i){he||pt(i)?O=requestAnimationFrame(Mt):Be=false;}function gt(){return he||pt(Xe())}let Be=false;function nt(){Be||(Be=true,O=requestAnimationFrame(function(){Mt();}));}function ot(){Be=false,cancelAnimationFrame(O);}let yt=new IntersectionObserver(i=>{i.forEach(l=>{he=l.isIntersecting,he&&!K?(qe=true,nt()):Be&&!K&&pt(Xe())||ot();});},{root:Te??null,threshold:A,rootMargin:g});function Lt(){B.forEach((i,l)=>{D[l]=Ge(i),i.style.strokeDasharray=`${D[l]}`;}),xt(),qe=true;}let st;function Ye(){clearTimeout(st),st=setTimeout(Lt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let cr=Ne([e],Ye);return q>0?setTimeout(()=>yt.observe(e),q):yt.observe(e),ft({destroy(){cancelAnimationFrame(O),clearTimeout(Ve),ot(),yt.disconnect(),cr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(st),wt();},replay(){we=-1,He=[],ue=-1,tt=-1,Y=false,G=false,ze=0,K=false,Ae=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,gt()&&nt();},pause(){K=true,ot();},resume(){K&&(K=false,qe=true,gt()&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));Ae=l,we=l,He=[],K=true,ot(),sr(l,$),qe=true;},getProgress(){return Ae},refresh(){clearTimeout(st),Lt(),gt()&&!K&&nt();}},()=>({tStart:se,tEnd:xe}))}var qt=new WeakMap,Sr=0;function Wt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++Sr),`el#${t}`}return r})}function Bt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Tr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Gt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function xr(e,n,r){let t=Gt(e),o=Gt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,p)=>`${m}${s.units[p]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,p)=>`${m}${c.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,p)=>`${m+(c.nums[p]-m)*r}${s.units[p]}`).join(", ")})`}).join(" ")}function jt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Tr(t))return je(t,o,r);if(t.includes("("))return xr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function Ar(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Ut="--scroll-draw-progress";function Pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Xt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:p,native:E=true,velocityScale:P=false,respectReducedMotion:$=true,triggerElement:ee,onProgress:Ee,onComplete:z,onEnter:me,onLeave:I,onEnterBack:q,onLeaveBack:U}=n,C=$&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof s=="function"?s:J[s]??J["ease-out"],S=ie(o.start??"top bottom"),x=ie(o.end??"bottom top"),A=ee??e,g=typeof p=="string"?document.querySelector(p):p??null,d=Object.entries(t).map(([u,w])=>({prop:Ar(u),from:Array.isArray(w)?w[0]:"",to:Array.isArray(w)?w[1]:w}));function V(){let u=window.getComputedStyle(e);for(let w of d)w.from===""&&(w.from=u.getPropertyValue(w.prop).trim()||"0");}function T(){for(let u of d)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...d.map(w=>w.prop),Ut])_.set(u,e.style.getPropertyValue(u));function ae(){for(let[u,w]of _)w?e.style.setProperty(u,w):e.style.removeProperty(u);}if(C)return T(),z?.(),{...r,destroy:ae,getProgress:()=>1};V();let Se=typeof s=="string"?at(s):null;function fe(){if(!E||!Pr()||!Se||m!=="y"||g||A!==e||c||a!==1||Ee||z||me||I||q||U||P!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of d)if(!Mr.has(u.prop))return false;return true}function X(){let u=`ssd-a-${++Lr}`,w=d.map(ue=>`${ue.prop}:${ue.from}`).join(";"),G=d.map(ue=>`${ue.prop}:${ue.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${w}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Se};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let O=()=>m==="x"?window.scrollX:window.scrollY,he=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let ue=e.getBoundingClientRect();return Le({top:ue.top,height:ue.height},O(),he(),S,x)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ae(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ue){let K=Math.min(1,Math.max(0,ue));e.classList.remove(u);for(let Ae of d)e.style.setProperty(Ae.prop,jt(Ae.from,Ae.to,K));},getProgress(){let{tStart:ue,tEnd:K}=we();return R(Z(O(),ue,K,a))}};return He}if(fe())return X();let F=0,f=0,N=0,M=false,k=false,pe=-1,b=0,W=false,de=NaN,Fe=-1,Te=0,Pe=()=>g?m==="x"?g.scrollLeft:g.scrollTop:m==="x"?window.scrollX:window.scrollY,ge=()=>g?m==="x"?g.clientWidth:g.clientHeight:m==="x"?window.innerWidth:window.innerHeight,te=A===e?d:[],le=false;function ce(){let u=e.style,w=te.map(he=>u.getPropertyValue(he.prop)),G=u.transition;te.length&&(u.transition="none"),te.forEach(he=>u.setProperty(he.prop,_.get(he.prop)??""));let Y=it(A,g,m);te.forEach((he,we)=>u.setProperty(he.prop,w[we])),te.length&&(e.offsetWidth,u.transition=G);let O=Le(Y,Y.scroll,ge(),S,x);le&&Math.abs(O.tStart-F)<1&&Math.abs(O.tEnd-f)<1||(le=true,F=O.tStart,f=O.tEnd);}function re(u){e.style.setProperty(Ut,String(u));for(let w of d)e.style.setProperty(w.prop,jt(w.from,w.to,u));Ee?.(u);}function De(u){if(isNaN(de)){de=u;return}de<=0&&u>0?me?.():de>0&&u<=0&&U?.(),de<1&&u>=1?I?.():de>=1&&u<1&&q?.(),de=u;}function B(){if(!M||k)return;let u=performance.now(),w=Pe(),G=a;if(P!==false){let he=u-Te,we=he>0?Math.abs(w-(Fe<0?w:Fe))/he:0;G=a*Math.max(.2,1+we*(typeof P=="number"?P:1)*.04);}Fe=w,Te=u;let Y=f===F?0:(w-F)/(f-F);De(Y);let O=R(Z(w,F,f,G));c&&(pe=Math.max(pe,O),O=pe),b=O,re(O),O>=1&&!W?(W=true,z?.()):O<1&&!c&&(W=false),N=requestAnimationFrame(B);}ce(),f===F&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=R(Z(Pe(),F,f,a));c&&u>0&&(pe=u),b=u,re(u);}let D=new IntersectionObserver(u=>{u.forEach(w=>{M=w.isIntersecting,M&&!k?N=requestAnimationFrame(B):cancelAnimationFrame(N);});},{root:g??null}),ye;function se(){clearTimeout(ye),ye=setTimeout(ce,150);}window.addEventListener("resize",se),window.addEventListener("orientationchange",se);let xe=Ne([A],se);return D.observe(e),Re(e,{type:"animate",getProgress:()=>b,getTrigger:()=>({tStart:F,tEnd:f})}),{destroy(){cancelAnimationFrame(N),D.disconnect(),window.removeEventListener("resize",se),window.removeEventListener("orientationchange",se),xe(),clearTimeout(ye),ae(),Oe(e);},replay(){pe=-1,W=false,b=0,k=false,re(0);},pause(){k=true,cancelAnimationFrame(N);},resume(){k&&(k=false,M&&(N=requestAnimationFrame(B)));},seek(u){let w=Math.min(1,Math.max(0,u));b=w,pe=w,k=true,cancelAnimationFrame(N),re(w);},getProgress(){return b},refresh(){ce();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n){if(typeof window>"u")return bt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollCounter: element not found:",e),bt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:p=true,decimals:E,onComplete:P}=n,$=E!==void 0?f=>f.toFixed(E):a??(f=>String(Math.round(f))),ee=typeof c=="function"?c:J[c]??J["ease-out"],Ee=ie(m.start??"top 80%"),z=ie(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=$(s),P?.(),bt;let I=0,q=0,U=false,C=0,R=false,S=false,x=-1,A=0,g=false,d=()=>window.scrollY,V=()=>window.innerHeight;function T(){let f=t.getBoundingClientRect(),N=Le({top:f.top,height:f.height},d(),V(),Ee,z);U&&Math.abs(N.tStart-I)<1&&Math.abs(N.tEnd-q)<1||(U=true,I=N.tStart,q=N.tEnd);}function _(f){t.textContent=$(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ae(){if(!R||S)return;let f=ee(Z(d(),I,q,1));p&&(x=Math.max(x,f),f=x),A=f,_(f),f>=1&&!g?(g=true,P?.()):f<1&&!p&&(g=false),C=requestAnimationFrame(ae);}T();{let f=ee(Z(d(),I,q,1));p&&f>0&&(x=f),A=f,_(f);}let Se=new IntersectionObserver(f=>{f.forEach(N=>{R=N.isIntersecting,R&&!S?C=requestAnimationFrame(ae):cancelAnimationFrame(C);});}),fe;function X(){clearTimeout(fe),fe=setTimeout(T,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let F=Ne([t],X);return Se.observe(t),Re(t,{type:"counter",getProgress:()=>A,getTrigger:()=>({tStart:I,tEnd:q})}),{destroy(){cancelAnimationFrame(C),Se.disconnect(),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),F(),clearTimeout(fe),Oe(t);},replay(){x=-1,g=false,A=0,S=false,_(0);},pause(){S=true,cancelAnimationFrame(C);},resume(){S&&(S=false,R&&(C=requestAnimationFrame(ae)));},seek(f){let N=Math.min(1,Math.max(0,f));A=N,x=N,S=true,cancelAnimationFrame(C),_(N);},getProgress(){return A}}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Kt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:p,onReady:E,onComplete:P,onProgress:$}=n,ee=p??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,z=typeof s=="function"?s:J[s]??J.linear,me=ie(o.start??"top top"),I=ie(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let q=n.from??0,U=n.to,C=0,R=0,S=0,x=false,A=false,g=-1,d=0,V=false,T=false,_=()=>c==="x"?window.scrollX:window.scrollY,ae=()=>c==="x"?window.innerWidth:window.innerHeight;function Se(){let b=ee.getBoundingClientRect(),W=c==="x"?b.left:b.top,de=c==="x"?b.width:b.height,Fe=Le({top:W,height:de},_(),ae(),me,I);C=Fe.tStart,R=Fe.tEnd,T&&R===C&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let fe=NaN;function X(b){if(!T)return;let W=U??t.duration??0,de=q+(W-q)*b;de!==fe&&(fe=de,t.currentTime=de),t.style.setProperty("--scroll-draw-progress",String(b)),$?.(b);}function F(){if(!x||A||!T||Ee)return;let b=z(Z(_(),C,R,1));a&&(g=Math.max(g,b),b=g),d=b,X(b),b>=1&&!V?(V=true,P?.()):b<1&&!a&&(V=false),S=requestAnimationFrame(F);}function f(){if(T=true,U===void 0&&(U=t.duration),Ee){X(1),E?.();return}Se(),E?.(),x&&!A&&(S=requestAnimationFrame(F));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),T||Se();let N=new IntersectionObserver(b=>{b.forEach(W=>{x=W.isIntersecting,x&&!A&&T?S=requestAnimationFrame(F):cancelAnimationFrame(S);});}),M;function k(){clearTimeout(M),M=setTimeout(Se,150);}window.addEventListener("resize",k),window.addEventListener("orientationchange",k);let pe=Ne([ee],k);return N.observe(t),Re(t,{type:"video",getProgress:()=>d,getTrigger:()=>({tStart:C,tEnd:R})}),{destroy(){cancelAnimationFrame(S),N.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),pe(),clearTimeout(M),Oe(t);},replay(){g=-1,V=false,d=0,A=false,fe=NaN,X(0);},pause(){A=true,cancelAnimationFrame(S);},resume(){A&&(A=false,x&&T&&(S=requestAnimationFrame(F)));},seek(b){let W=Math.min(1,Math.max(0,b));d=W,g=W,A=true,cancelAnimationFrame(S),fe=NaN,X(W);},getProgress(){return d}}}function Jt(e,n){let r=document.createElement("span");r.textContent=n,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function tr(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Cr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Zt(e){let n=tr(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,p)=>{let E=m.nextElementSibling;c.appendChild(m),p<a.length-1&&E&&E.style.whiteSpace==="pre"&&c.appendChild(E);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function $r(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function kr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var er={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rr(e,n={}){if(typeof window>"u")return er;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),er;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:p=true,onComplete:E}=n,P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,$=typeof a=="function"?a:J[a]??J["ease-out"],ee=ie(m.start??"top 85%"),Ee=ie(m.end??"top 40%"),z=t.innerHTML,me=t.textContent??"",I;o==="chars"?I=Cr(t):o==="lines"?I=Zt(t):I=tr(t),Jt(t,me);let q=I.length;function U(M,k){c?.opacity!==void 0&&(M.style.opacity=String(c.opacity+(1-c.opacity)*k));let pe=kr(k,c);pe&&(M.style.transform=pe);}function C(M){t.style.setProperty("--scroll-draw-progress",String(M)),I.forEach((k,pe)=>{let b=$($r(M,pe,q,s));U(k,b);});}if(P)return C(1),E?.(),{destroy(){t.innerHTML=z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};C(0);let R=0,S=0,x=0,A=false,g=false,d=-1,V=0,T=false,_=()=>window.scrollY,ae=()=>window.innerHeight;function Se(){let M=t.getBoundingClientRect(),k=Le({top:M.top,height:M.height},_(),ae(),ee,Ee);R=k.tStart,S=k.tEnd;}function fe(){if(!A||g)return;let M=Z(_(),R,S,1);p&&(d=Math.max(d,M),M=d),V=M,C(M),M>=1&&!T?(T=true,E?.()):M<1&&!p&&(T=false),x=requestAnimationFrame(fe);}Se();let X=new IntersectionObserver(M=>{M.forEach(k=>{A=k.isIntersecting,A&&!g?x=requestAnimationFrame(fe):cancelAnimationFrame(x);});}),F;function f(){clearTimeout(F),F=setTimeout(()=>{if(o==="lines"){let M=V;t.innerHTML=z,I=Zt(t),Jt(t,me),C(M);}Se();},150);}window.addEventListener("resize",f),window.addEventListener("orientationchange",f);let N=Ne([t],f);return X.observe(t),Re(t,{type:"text",getProgress:()=>V,getTrigger:()=>({tStart:R,tEnd:S})}),{destroy(){cancelAnimationFrame(x),X.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("orientationchange",f),N(),clearTimeout(F),t.innerHTML=z,Oe(t);},replay(){d=-1,T=false,V=0,g=false,C(0);},pause(){g=true,cancelAnimationFrame(x);},resume(){g&&(g=false,A&&(x=requestAnimationFrame(fe)));},seek(M){let k=Math.min(1,Math.max(0,M));V=k,d=k,g=true,cancelAnimationFrame(x),C(k);},getProgress(){return V}}}function Ir(e,n={}){let[r,t]=Nr.useState(0),o=Nr.useRef(n);o.current=n;let s=Nr.useRef(-1);return Nr.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:p,trigger:E={}}=o.current,P=typeof p=="string"?document.querySelector(p):p??null,$=ie(E.start??"top bottom"),ee=ie(E.end??"bottom top"),Ee=0,z=0,me=false,I=0;function q(){return P?m==="x"?P.scrollLeft:P.scrollTop:m==="x"?window.scrollX:window.scrollY}function U(){return P?m==="x"?P.clientWidth:P.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function C(){let g=c.getBoundingClientRect(),d=q(),V=m==="x"?g.left:g.top,T=m==="x"?g.width:g.height,_=Le({top:V,height:T},d,U(),$,ee);Ee=_.tStart,z=_.tEnd;}function R(){if(!me)return;let{speed:g=1,easing:d="linear",once:V=false}=o.current,T=typeof d=="function"?d:J[d]??J.linear,_=Z(q(),Ee,z,g),ae=T(_);V&&(s.current=Math.max(s.current,ae),ae=s.current),t(ae),I=requestAnimationFrame(R);}let S=new IntersectionObserver(g=>{g.forEach(d=>{me=d.isIntersecting,me?I=requestAnimationFrame(R):cancelAnimationFrame(I);});},{root:P??null,threshold:0});C(),S.observe(c);let x;function A(){clearTimeout(x),x=setTimeout(C,150);}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),()=>{cancelAnimationFrame(I),clearTimeout(x),S.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A);}},[]),r}function Ze(e,n,r){let t=Nr.useRef(n);t.current=n;let o=Wt(n);Nr.useEffect(()=>{if(!e.current)return;let s=r(e.current,Bt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Dr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function et(e){let n={},r={};for(let[t,o]of Object.entries(e))(Dr.test(t)?r:n)[t]=o;return [n,r]}function Xn({children:e,className:n,style:r,...t}){let o=Nr.useRef(null),[s,a]=et(t);return Ze(o,s,_t),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Yn({children:e,className:n,style:r,...t}){let o=Nr.useRef(null),[s,a]=et(t);return Ze(o,s,Xt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Kn({className:e,style:n,...r}){let t=Nr.useRef(null),[o,s]=et(r);return Ze(t,o,Yt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Qn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Nr.useRef(null),[c,m]=et(s);return Ze(a,c,Qt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Jn({children:e,as:n="p",className:r,style:t,...o}){let s=Nr.useRef(null),[a,c]=et(o);return Ze(s,a,rr),Nr__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Yn;exports.ScrollCounter=Kn;exports.ScrollDraw=Xn;exports.ScrollText=Jn;exports.ScrollVideo=Qn;exports.useScrollDrawProgress=Ir;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-I45LCJUP.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
2
+ import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-426RAN5I.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
@@ -1,3 +1,3 @@
1
- 'use strict';var solidJs=require('solid-js');function or({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),s=0,a=[];for(let d=0;d<r;d++){let T=Math.pow(i,d);a.push(T),s+=T;}let u=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<r;T++)if(d<=u[T+1]){let R=(d-u[T])/(u[T+1]-u[T]);if(T===0)return R*(2-R);let A=1-Math.pow(t,T);return A+(1-A)*(2*R-1)*(2*R-1)}return 1}}function sr({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/t)+1}var ce={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:or(),elastic:sr()};function Ct(e,n,r){return Math.min(r,Math.max(n,e))}function be(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Pt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function kt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function te(e,n,r,t){return r===n?0:Ct((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,i){let s=Pt(e.top,e.height,n,t.element)-kt(t.viewport,r),a=Pt(e.top,e.height,n,i.element)-kt(i.viewport,r);return {tStart:s,tEnd:a}}function ot(e,n,r){let t=e.getBoundingClientRect(),i=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function 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 Ue(e,n,r){let t=Ot(e),i=Ot(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[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 Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...n){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ir="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",ar="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ft=33;function lr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function cr(e){let n=[];for(let r=0;r<Ft;r++){let t=r/(Ft-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ir;case "ease-out":return ar;case "ease-in-out":return lr()?cr(ce["ease-in-out"]):null;default:return null}}var Dt=Symbol.for("svg-scroll-draw.registry");function Rt(){let e=globalThis;return e[Dt]||(e[Dt]=new Map)}function Oe(e,n){Rt().set(e,n);}function Ie(e){Rt().delete(e);}var Ke,it=new Set,at=new WeakMap,Qe=new Map,Ht=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function ur(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ke??(Ke=new ResizeObserver(i=>{let s=false;for(let{target:a}of i)at.get(a)!==Ht(a)&&(s=true),at.set(a,"");s&&it.forEach(a=>a());})),it.add(r);let t=ur(e);return [document.body,document.documentElement].forEach(i=>i&&t.add(i)),t.forEach(i=>{at.has(i)||at.set(i,Ht(i)),Qe.set(i,(Qe.get(i)??0)+1),Ke.observe(i);}),()=>{it.delete(r)&&(t.forEach(i=>{let s=(Qe.get(i)??1)-1;if(s)return void Qe.set(i,s);Qe.delete(i),Ke?.unobserve(i);}),it.size||(Ke?.disconnect(),Ke=void 0));}}var mr=0;function fr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Nt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Vt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function pr(e){if(!Xe)return;let n=Nt(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Vt.has(r)&&!Vt.has(Nt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function dr(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 i(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,u=n-s,m=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,_t=/[MmLlHhVvCcSsQqTtAaZz]/g;function gr(e,n,r){if(!Xe)return;let t=(e.match(_t)??[]).join("").toUpperCase(),i=(n.match(_t)??[]).join("").toUpperCase(),s=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(t!==i){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ft(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=t[i++]??a;return String(+(a+(u-a)*r).toFixed(4))})}function pt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...It[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:re=false,debug:Pe=false,axis:G="y",scrollContainer:ue,autoReverse:ne=false,delay:Y=0,strokeColor:H,strokeWidth:P,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:oe=0,morphTo:L,clip:se,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:N,onStart:C,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=i,v=se===true?"left":typeof se=="string"?se:false,V=typeof d=="function"?d:ce[d]??ce.linear,me=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ue=="string"?document.querySelector(ue):ue??null,Ae=Array.isArray(H)?H[0]:null,fe=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,ie=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ae=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let l=o*100;switch(v){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let z=v?[]:Array.from(e.querySelectorAll(a)),F=[],pe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,ee=false,he=-1,Ve=[],le=-1,j=false,Te=0,ze=0,_e,lt=null;function wt(){lt?.destroy(),lt=null;}let We=new Set,vt=NaN,qe=true,Ze=-1,Et=performance.now(),Be=NaN;function Je(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function St(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Tt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,St(),me,He)}function Zt(){let o=Se-J,l=z.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=R,R>0&&l>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(R,Le/(l*o)));}h=Se+l*c*o;}function xt(){(({tStart:J,tEnd:Se}=Tt())),Zt(),Pe&&Xe&&(wt(),lt=dr(J,Se,G));}function ct(o,l=Tt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function Jt(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=l==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}z.forEach((y,Q)=>{y.style.strokeDashoffset=l==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=l==="reverse"?`${1-o}`:`${o}`),Ae&&fe?y.style.stroke=Ue(Ae,fe,o):fe&&(y.style.stroke=fe),X!==null&&ie!==null?y.style.strokeWidth=`${X+(ie-X)*o}`:ie!==null&&(y.style.strokeWidth=`${ie}`),ae!==null&&K!==null?y.style.fillOpacity=`${ae+(K-ae)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&pe[Q]&&y.setAttribute("d",ft(pe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}z.forEach((o,l)=>{o.style.strokeDasharray=`${F[l]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[l]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`),L&&o.tagName.toLowerCase()==="path"&&pe[l]&&o.setAttribute("d",pe[l]);});}if(z.forEach(o=>{pr(o);let l=je(o);F.push(l);let y=o.tagName.toLowerCase()==="path";y?pe.push(o.getAttribute("d")??""):pe.push(""),L&&(y?gr(pe[pe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?`${l}`:"0",m&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),ie!==null&&(o.style.strokeWidth=`${ie}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?"0":`${l}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`));}),v){if(s)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Mt=typeof d=="string"?st(d):null;function er(){return !(ye===false||!fr()||!z.length||!Mt||v||G!=="y"||Ee||u!==1||R!==0||re||ne||k!==false||L||w||E||Y>0||N||C||f||p||I||q||Me||H!=null||P!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function tr(){let o=++mr,l=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Mt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(l);}z.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Ce({top:g.top,height:g.height},Je(),St(),me,He);return V(te(Je(),Z,$e,u))}return {destroy(){e.classList.remove(y),z.forEach(g=>{g.classList.remove(l),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,z.forEach(de);},pause(){b=true,z.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,z.forEach(($e,xe)=>{$e.classList.remove(l),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){z.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(er())return ct(tr());function rr(){let o=Math.max(1,ge),l=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=V(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),N?.(g),U<1&&(W=false);}else z.forEach((U,g)=>{let Z=g*R*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=V($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&fe?U.style.stroke=Ue(Ae,fe,xe):fe&&(U.style.stroke=fe),X!==null&&ie!==null?U.style.strokeWidth=`${X+(ie-X)*xe}`:ie!==null&&(U.style.strokeWidth=`${ie}`),ae!==null&&K!==null?U.style.fillOpacity=`${ae+(K-ae)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&pe[g]&&U.setAttribute("d",ft(pe[g],L,xe)),g===0&&(Te=xe,N?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=V(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!We.has($e)&&(We.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-l;B||(B=true,C?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*R)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{l=performance.now(),B=false,_=false,We.clear(),et(),$=requestAnimationFrame(Fe);},oe));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(_e),l=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,We.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(re&&_)?ke():!W.isIntersecting&&!re&&!_&&(cancelAnimationFrame($),clearTimeout(_e),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-l,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,l=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,l=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(rr());xt();function At(){if(j||!Ge)return;let o=performance.now(),l=Je();if(!qe&&k===false&&l===vt){ut(l);return}qe=false,vt=l;let y=u;if(k!==false){let S=o-Et,D=S>0?Math.abs(l-(Ze<0?l:Ze))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Ze=l,Et=o;let Q=ne?le===-1||l>=le?"forward":"reverse":A;le=l;let Le=Se-J,Fe=true,ke=Le===0?0:(l-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=V(te(l,J,Se,y));re&&!ne&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),N?.(S),!B&&te(l,J,Se,y)>0&&(B=true,C?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},oe))):S<1&&!re&&(_=false),ut(l);return}if(z.forEach((S,D)=>{let de=D*c*Le,b=V(te(l,J+de,Se+de,y));re&&!ne&&(b=Ve[D]=Math.max(Ve[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&fe?S.style.stroke=Ue(Ae,fe,b):fe&&(S.style.stroke=fe),X!==null&&ie!==null?S.style.strokeWidth=`${X+(ie-X)*b}`:ie!==null&&(S.style.strokeWidth=`${ie}`),ae!==null&&K!==null?S.style.fillOpacity=`${ae+(K-ae)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&pe[D]&&S.setAttribute("d",ft(pe[D],L,b)),D===0&&(Te=b,N?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=V(te(l,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!We.has(de)&&(We.add(de),w[D]?.());}}!B&&te(l,J,Se,y)>0&&(B=true,C?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,Ve=[],B=false,_=false,We.clear(),et(),qe=true;},oe))):!Fe&&!re&&(_=false),ut(l);}function Lt(o){return o>=Se&&o<h}function ut(o){ee||Lt(o)?$=requestAnimationFrame(At):Ge=false;}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){At();}));}function rt(){Ge=false,cancelAnimationFrame($);}let mt=new IntersectionObserver(o=>{o.forEach(l=>{ee=l.isIntersecting,ee&&!j?(qe=true,tt()):Ge&&!j&&Lt(Je())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function $t(){z.forEach((o,l)=>{F[l]=je(o),o.style.strokeDasharray=`${F[l]}`;}),xt(),qe=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout($t,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let nr=De([e],Ye);return Y>0?setTimeout(()=>mt.observe(e),Y):mt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(_e),rt(),mt.disconnect(),nr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),wt();},replay(){he=-1,Ve=[],le=-1,Ze=-1,B=false,_=false,ze=0,j=false,Te=0,We.clear(),clearTimeout(_e),et(),qe=true,ee&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,qe=true,ee&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));Te=l,he=l,Ve=[],j=true,rt(),Jt(l,A),qe=true;},getProgress(){return Te},refresh(){clearTimeout(nt),$t(),ee&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var Wt=new WeakMap,yr=0;function qt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Wt.get(r);return t===void 0&&Wt.set(r,t=++yr),`el#${t}`}return r})}function Bt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function hr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Gt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],s=[],a=t[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:s});}return n}function br(e,n,r){let t=Gt(e),i=Gt(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((s,a)=>{let u=i[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function jt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(hr(t))return Ue(t,i,r);if(t.includes("("))return br(t,i,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),m=parseFloat(a[1]);return `${u+(m-u)*r}${s[2]||a[2]}`}return r<1?t:i}function wr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var vr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Er=0,Ut="--scroll-draw-progress";function Sr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function dt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:s="ease-out",speed:a=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:re,onProgress:Pe,onComplete:G,onEnter:ue,onLeave:ne,onEnterBack:Y,onLeaveBack:H}=n,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:ce[s]??ce["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=re??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:wr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function oe(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let se=new Map;for(let c of [...E.map(h=>h.prop),Ut])se.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of se)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};oe();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Sr()||!ge||m!=="y"||M||x!==e||u||a!==1||Pe||G||ue||ne||Y||H||R!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!vr.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Er}`,h=E.map(le=>`${le.prop}:${le.from}`).join(";"),_=E.map(le=>`${le.prop}:${le.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,ee=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let le=e.getBoundingClientRect();return Ce({top:le.top,height:le.height},$(),ee(),w,k)};Oe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:he});let Ve={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(le){let j=Math.min(1,Math.max(0,le));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,jt(Te.from,Te.to,j));},getProgress(){let{tStart:le,tEnd:j}=he();return O(te($(),le,j,a))}};return Ve}if(ye())return N();let C=0,f=0,p=0,I=false,q=false,Me=-1,v=0,V=false,me=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,fe=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],ie=false;function ae(){let c=e.style,h=X.map(ee=>c.getPropertyValue(ee.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(ee=>c.setProperty(ee.prop,se.get(ee.prop)??""));let B=ot(x,M,m);X.forEach((ee,he)=>c.setProperty(ee.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,fe(),w,k);ie&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(ie=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Ut,String(c));for(let h of E)e.style.setProperty(h.prop,jt(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?ue?.():me>0&&c<=0&&H?.(),me<1&&c>=1?ne?.():me>=1&&c<1&&Y?.(),me=c;}function z(){if(!I||q)return;let c=performance.now(),h=Ae(),_=a;if(R!==false){let ee=c-Ee,he=ee>0?Math.abs(h-(He<0?h:He))/ee:0;_=a*Math.max(.2,1+he*(typeof R=="number"?R:1)*.04);}He=h,Ee=c;let B=f===C?0:(h-C)/(f-C);Ne(B);let $=O(te(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ae(),f===C&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(te(Ae(),C,f,a));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(z):cancelAnimationFrame(p);});},{root:M??null}),pe;function J(){clearTimeout(pe),pe=setTimeout(ae,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(pe),ve(),Ie(e);},replay(){Me=-1,V=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ae();}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function yt(e,n){if(typeof window>"u")return gt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),gt;let t=r,{from:i=0,to:s,format:a,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:R}=n,A=T!==void 0?f=>f.toFixed(T):a??(f=>String(Math.round(f))),re=typeof u=="function"?u:ce[u]??ce["ease-out"],Pe=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),R?.(),gt;let ne=0,Y=0,H=false,P=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,oe=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),oe(),Pe,G);H&&Math.abs(p.tStart-ne)<1&&Math.abs(p.tEnd-Y)<1||(H=true,ne=p.tStart,Y=p.tEnd);}function se(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=re(te(E(),ne,Y,1));d&&(k=Math.max(k,f),f=k),x=f,se(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=re(te(E(),ne,Y,1));d&&f>0&&(k=f),x=f,se(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?P=requestAnimationFrame(ve):cancelAnimationFrame(P);});}),ye;function N(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",N),window.addEventListener("orientationchange",N);let C=De([t],N);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:ne,tEnd:Y})}),{destroy(){cancelAnimationFrame(P),ge.disconnect(),window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),C(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,se(0);},pause(){w=true,cancelAnimationFrame(P);},resume(){w&&(w=false,O&&(P=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(P),se(p);},getProgress(){return x}}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ht(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Yt;let t=r,{trigger:i={},easing:s="linear",once:a=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:R,onProgress:A}=n,re=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:ce[s]??ce.linear,ue=be(i.start??"top top"),ne=be(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,H=n.to,P=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=false,se=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=re.getBoundingClientRect(),V=u==="x"?v.left:v.top,me=u==="x"?v.width:v.height,He=Ce({top:V,height:me},se(),ve(),ue,ne);P=He.tStart,O=He.tEnd,L&&O===P&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function N(v){if(!L)return;let V=H??t.duration??0,me=Y+(V-Y)*v;me!==ye&&(ye=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(te(se(),P,O,1));a&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!oe?(oe=true,R?.()):v<1&&!a&&(oe=false),w=requestAnimationFrame(C);}function f(){if(L=true,H===void 0&&(H=t.duration),Pe){N(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(C));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(V=>{k=V.isIntersecting,k&&!x&&L?w=requestAnimationFrame(C):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([re],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,ye=NaN,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(C)));},seek(v){let V=Math.min(1,Math.max(0,v));E=V,M=V,x=true,cancelAnimationFrame(w),ye=NaN,N(V);},getProgress(){return E}}}function Qt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Tr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Xt(e){let n=Qt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],i=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of i){let a=r.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<a.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function xr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,s=n*t,a=s+(1-i);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Mr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Kt;let t=r,{split:i="words",stagger:s=.04,easing:a="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof a=="function"?a:ce[a]??ce["ease-out"],re=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ue;i==="chars"?ue=Tr(t):i==="lines"?ue=Xt(t):ue=Qt(t);let ne=ue.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Mr(I,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ue.forEach((I,q)=>{let Me=A(xr(p,q,ne,s));Y(I,Me);});}if(R)return H(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let P=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=()=>window.scrollY,se=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Ce({top:p.top,height:p.height},L(),se(),re,Pe);P=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=te(L(),P,O,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!oe?(oe=true,T?.()):p<1&&!d&&(oe=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),N;function C(){clearTimeout(N),N=setTimeout(()=>{if(i==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ue=Xt(t),H(p);}ve();},150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let f=De([t],C);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),f(),clearTimeout(N),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,H(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),H(I);},getProgress(){return E}}}function Re(e,n){let r,t,i,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=qt(s);!r||a===i||(i=a,solidJs.untrack(()=>{t?.destroy(),t=n(r,Bt(s,()=>s));}));}),solidJs.onCleanup(()=>{t?.destroy(),t=i=void 0;}),{ref:a=>{r=a;},getInstance:()=>t}}function Dn(e={}){return Re(e,pt).ref}function Rn(e={}){return Re(e,pt)}function Hn(e){return Re(e,dt).ref}function Nn(e){return Re(e,dt)}function Vn(e){return Re(e,yt).ref}function zn(e){return Re(e,yt)}function _n(e={}){return Re(e,ht).ref}function Wn(e={}){return Re(e,ht)}function qn(e={}){return Re(e,bt).ref}function Bn(e={}){return Re(e,bt)}exports.createScrollAnimate=Nn;exports.createScrollCounter=zn;exports.createScrollDraw=Rn;exports.createScrollText=Bn;exports.createScrollVideo=Wn;exports.useScrollAnimate=Hn;exports.useScrollCounter=Vn;exports.useScrollDraw=Dn;exports.useScrollText=qn;exports.useScrollVideo=_n;
1
+ 'use strict';var solidJs=require('solid-js');function ir({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),s=0,a=[];for(let p=0;p<r;p++){let S=Math.pow(i,p);a.push(S),s+=S;}let u=[0],f=0;for(let p=0;p<r;p++)f+=a[p]/s,u.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let S=0;S<r;S++)if(p<=u[S+1]){let H=(p-u[S])/(u[S+1]-u[S]);if(S===0)return H*(2-H);let C=1-Math.pow(t,S);return C+(1-C)*(2*H-1)*(2*H-1)}return 1}}function ar({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/t)+1}var le={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ir(),elastic:ar()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function he(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function kt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Ot(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ne(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,i){let s=kt(e.top,e.height,n,t.element)-Ot(t.viewport,r),a=kt(e.top,e.height,n,i.element)-Ot(i.viewport,r);return {tStart:s,tEnd:a}}function ot(e,n,r){let t=e.getBoundingClientRect(),i=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function It(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Ue(e,n,r){let t=It(e),i=It(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[2]-t[2])*r)})`}var Ft={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function be(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var lr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",cr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Dt=33;function ur(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function mr(e){let n=[];for(let r=0;r<Dt;r++){let t=r/(Dt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return lr;case "ease-out":return cr;case "ease-in-out":return ur()?mr(le["ease-in-out"]):null;default:return null}}var Rt=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Rt]||(e[Rt]=new Map)}function Oe(e,n){Ht().set(e,n);}function Ie(e){Ht().delete(e);}var Qe,it=new Set,at=new WeakMap,Ze=new Map,Nt=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 De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(i=>{let s=false;for(let{target:a}of i)at.get(a)!==Nt(a)&&(s=true),at.set(a,"");s&&it.forEach(a=>a());})),it.add(r);let t=fr(e);return [document.body,document.documentElement].forEach(i=>i&&t.add(i)),t.forEach(i=>{at.has(i)||at.set(i,Nt(i)),Ze.set(i,(Ze.get(i)??0)+1),Qe.observe(i);}),()=>{it.delete(r)&&(t.forEach(i=>{let s=(Ze.get(i)??1)-1;if(s)return void Ze.set(i,s);Ze.delete(i),Qe?.unobserve(i);}),it.size||(Qe?.disconnect(),Qe=void 0));}}var pr=0;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Vt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var zt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function gr(e){if(!Ke)return;let n=Vt(e,"stroke");if(!n||n==="none"){be("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!zt.has(r)&&!zt.has(Vt(e,"fill"))&&be("Element has a fill \u2014 it may obscure the stroke animation.",e);}function yr(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 i(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,u=n-s,f=r==="x";t.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function hr(e,n,r){if(!Ke)return;let t=(e.match(Wt)??[]).join("").toUpperCase(),i=(n.match(Wt)??[]).join("").toUpperCase(),s=(e.match(_t)??[]).length,a=(n.match(_t)??[]).length;if(t!==i){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&be(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=t[i++]??a;return String(+(a+(u-a)*r).toFixed(4))})}function gt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...Ft[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:p="linear",trigger:S={},stagger:H=0,direction:C="forward",once:oe=false,debug:Pe=false,axis:G="y",scrollContainer:Ae,autoReverse:N=false,delay:Y=0,strokeColor:X,strokeWidth:L,fillOpacity:I,waypoints:T,velocityScale:$=false,threshold:P=0,rootMargin:x="0px",repeat:w=0,repeatDelay:K=0,morphTo:M,clip:te,autoplay:xe=false,duration:we=1e3,native:ce=true,onProgress:q,onStart:F,onComplete:m,onEnter:O,onLeave:v,onEnterBack:A,onLeaveBack:ue}=i,y=te===true?"left":typeof te=="string"?te:false,V=typeof p=="function"?p:le[p]??le.linear,me=he(S.start??"top bottom"),He=he(S.end??"bottom top"),ve=typeof Ae=="string"?document.querySelector(Ae):Ae??null,Me=Array.isArray(X)?X[0]:null,fe=Array.isArray(X)?X[1]:typeof X=="string"?X:null,Q=Array.isArray(L)?L[0]:null,se=Array.isArray(L)?L[1]:typeof L=="number"?L:null,ie=Array.isArray(I)?I[0]:null,Z=Array.isArray(I)?I[1]:typeof I=="number"?I:null;function Ne(o){let l=o*100;switch(y){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let z=y?[]:Array.from(e.querySelectorAll(a)),D=[],pe=[],re=0,Ee=0,c=H,h=0,_=false,B=false,k=0,de=false,ye=-1,Ve=[],ae=-1,j=false,Se=0,ze=0,_e,lt=null;function Et(){lt?.destroy(),lt=null;}let We=new Set,St=NaN,qe=true,Je=-1,Tt=performance.now(),Be=NaN;function Ye(){return ve?G==="x"?ve.scrollLeft:ve.scrollTop:G==="x"?window.scrollX:window.scrollY}function xt(){return ve?G==="x"?ve.clientWidth:ve.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=ot(e,ve,G);return Ce(o,o.scroll,xt(),me,He)}function er(){let o=Ee-re,l=z.length-1,g=ve??document.documentElement,J=G==="x"?"Width":"Height";if(c=H,H>0&&l>0&&o>0){let Le=g[`scroll${J}`]-g[`client${J}`]-1-re-o/u;Le>=0&&(c=Math.min(H,Le/(l*o)));}h=Ee+l*c*o;}function At(){(({tStart:re,tEnd:Ee}=Mt())),er(),Pe&&Ke&&(Et(),lt=yr(re,Ee,G));}function ct(o,l=Mt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let g=o.destroy;return o.destroy=()=>{g.call(o),Ie(e);},o}function tr(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),y){let g=l==="reverse"?1-o:o;e.style.clipPath=Ne(g);return}z.forEach((g,J)=>{g.style.strokeDashoffset=l==="reverse"?`${D[J]*o}`:`${D[J]*(1-o)}`,f&&(g.style.opacity=l==="reverse"?`${1-o}`:`${o}`),Me&&fe?g.style.stroke=Ue(Me,fe,o):fe&&(g.style.stroke=fe),Q!==null&&se!==null?g.style.strokeWidth=`${Q+(se-Q)*o}`:se!==null&&(g.style.strokeWidth=`${se}`),ie!==null&&Z!==null?g.style.fillOpacity=`${ie+(Z-ie)*o}`:Z!==null&&(g.style.fillOpacity=`${Z}`),M&&g.tagName.toLowerCase()==="path"&&pe[J]&&g.setAttribute("d",dt(pe[J],M,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),y){e.style.clipPath=Ne(0);return}z.forEach((o,l)=>{o.style.strokeDasharray=`${D[l]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${D[l]}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`),M&&o.tagName.toLowerCase()==="path"&&pe[l]&&o.setAttribute("d",pe[l]);});}if(z.forEach(o=>{gr(o);let l=je(o);D.push(l);let g=o.tagName.toLowerCase()==="path";g?pe.push(o.getAttribute("d")??""):pe.push(""),M&&(g?hr(pe[pe.length-1],M,o):be(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=C==="reverse"?`${l}`:"0",f&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),se!==null&&(o.style.strokeWidth=`${se}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=C==="reverse"?"0":`${l}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),y){if(s)return e.style.clipPath=Ne(1),m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(s)return m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Lt=typeof p=="string"?st(p):null;function rr(){return !(ce===false||!dr()||!z.length||!Lt||y||G!=="y"||ve||u!==1||H!==0||oe||N||$!==false||M||T||w||Y>0||q||F||m||O||v||A||ue||X!=null||L!=null||I!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function nr(){let o=++pr,l=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,J=`--svg-scroll-draw-${o}`,Le=C==="reverse"?"0":"var(--ssd-len)",Fe=C==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,E=`stroke-dashoffset:${Fe};`;f&&(ke+=`opacity:${C==="reverse"?1:0};`,E+=`opacity:${C==="reverse"?0:1};`);let R=document.createElement("style");R.setAttribute("data-svg-scroll-draw",""),R.textContent=`@keyframes ${l}{from{${ke}}to{${E}}}.${g}{view-timeline-name:${J};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Lt};animation-fill-mode:both;animation-timeline:${J};animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(g);function ge(d,ee){d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(l);}z.forEach(ge);let b=false,W=-1;function U(){if(W>=0)return W;let d=e.getBoundingClientRect(),{tStart:ee,tEnd:$e}=Ce({top:d.top,height:d.height},Ye(),xt(),me,He);return V(ne(Ye(),ee,$e,u))}return {destroy(){e.classList.remove(g),z.forEach(d=>{d.classList.remove(l),d.style.removeProperty("--ssd-len"),d.style.animationPlayState="";}),R.remove();},replay(){b=false,W=-1,z.forEach(ge);},pause(){b=true,z.forEach(d=>{d.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(d=>{d.style.animationPlayState="running";}));},seek(d){let ee=Math.min(1,Math.max(0,d));W=ee,b=true,z.forEach(($e,Te)=>{$e.classList.remove(l),$e.style.strokeDashoffset=C==="reverse"?`${D[Te]*ee}`:`${D[Te]*(1-ee)}`,f&&($e.style.opacity=C==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return U()},refresh(){z.forEach((d,ee)=>{D[ee]=je(d),d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`;});}}}if(rr())return ct(nr());function or(){let o=Math.max(1,we),l=0,g=0,J=false;function Le(b){let W=true;if(y){let U=Math.min(1,Math.max(0,b/o)),d=V(U);Se=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=Ne(C==="reverse"?1-d:d),q?.(d),U<1&&(W=false);}else z.forEach((U,d)=>{let ee=d*H*o,$e=Math.min(1,Math.max(0,(b-ee)/o)),Te=V($e);U.style.strokeDashoffset=C==="reverse"?`${D[d]*Te}`:`${D[d]*(1-Te)}`,f&&(U.style.opacity=C==="reverse"?`${1-Te}`:`${Te}`),Me&&fe?U.style.stroke=Ue(Me,fe,Te):fe&&(U.style.stroke=fe),Q!==null&&se!==null?U.style.strokeWidth=`${Q+(se-Q)*Te}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&Z!==null?U.style.fillOpacity=`${ie+(Z-ie)*Te}`:Z!==null&&(U.style.fillOpacity=`${Z}`),M&&U.tagName.toLowerCase()==="path"&&pe[d]&&U.setAttribute("d",dt(pe[d],M,Te)),d===0&&(Se=Te,q?.(Te),e.style.setProperty("--scroll-draw-progress",String(Te))),$e<1&&(W=false);});if(T){let U=Math.min(1,Math.max(0,b/o)),d=V(U);for(let ee in T){let $e=parseFloat(ee);d>=$e&&!We.has($e)&&(We.add($e),T[ee]?.());}}return W}function Fe(b){if(j)return;let W=b-l;B||(B=true,F?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*H)),m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,_e=setTimeout(()=>{l=performance.now(),B=false,_=false,We.clear(),et(),k=requestAnimationFrame(Fe);},K));return}U||(k=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame(k),clearTimeout(_e),l=performance.now(),g=0,j=false,B=false,_=false,ze=0,J=true,Se=0,We.clear(),et(),k=requestAnimationFrame(Fe);}let E=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(oe&&_)?ke():!W.isIntersecting&&!oe&&!_&&(cancelAnimationFrame(k),clearTimeout(_e),J=false);});},{root:ve??null,threshold:P,rootMargin:x}),R;function ge(){clearTimeout(R),R=setTimeout(()=>{z.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});},150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),Y>0?setTimeout(()=>E.observe(e),Y):E.observe(e),{destroy(){cancelAnimationFrame(k),clearTimeout(_e),E.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(R);},replay(){ze=0,ke();},pause(){j||!J||(j=true,g=performance.now()-l,cancelAnimationFrame(k));},resume(){j&&(j=false,J=true,l=performance.now()-g,k=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Se=W,j=true,g=W*o,l=performance.now()-g,cancelAnimationFrame(k),Le(g);},getProgress(){return Se},refresh(){clearTimeout(R),z.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});}}}if(xe)return ct(or());At();function $t(){if(j||!Ge)return;let o=performance.now(),l=Ye();if(!qe&&$===false&&l===St){mt(l);return}qe=false,St=l;let g=u;if($!==false){let E=o-Tt,R=E>0?Math.abs(l-(Je<0?l:Je))/E:0;g=u*Math.max(.2,1+R*(typeof $=="number"?$:1)*.04);}Je=l,Tt=o;let J=N?ae===-1||l>=ae?"forward":"reverse":C;ae=l;let Le=Ee-re,Fe=true,ke=Le===0?0:(l-re)/Le;if(isNaN(Be)||(Be<=0&&ke>0?O?.():Be>0&&ke<=0&&ue?.(),Be<1&&ke>=1?v?.():Be>=1&&ke<1&&A?.()),Be=ke,y){let E=V(ne(l,re,Ee,g));oe&&!N&&(ye=Math.max(ye,E),E=ye),Se=E,e.style.setProperty("--scroll-draw-progress",String(E));let R=J==="reverse"?1-E:E;e.style.clipPath=Ne(R),q?.(E),!B&&ne(l,re,Ee,g)>0&&(B=true,F?.()),E>=1&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,_e=setTimeout(()=>{ye=-1,B=false,_=false,e.style.clipPath=Ne(0);},K))):E<1&&!oe&&(_=false),mt(l);return}if(z.forEach((E,R)=>{let ge=R*c*Le,b=V(ne(l,re+ge,Ee+ge,g));oe&&!N&&(b=Ve[R]=Math.max(Ve[R]??ye,b)),E.style.strokeDashoffset=J==="reverse"?`${D[R]*b}`:`${D[R]*(1-b)}`,f&&(E.style.opacity=J==="reverse"?`${1-b}`:`${b}`),Me&&fe?E.style.stroke=Ue(Me,fe,b):fe&&(E.style.stroke=fe),Q!==null&&se!==null?E.style.strokeWidth=`${Q+(se-Q)*b}`:se!==null&&(E.style.strokeWidth=`${se}`),ie!==null&&Z!==null?E.style.fillOpacity=`${ie+(Z-ie)*b}`:Z!==null&&(E.style.fillOpacity=`${Z}`),M&&E.tagName.toLowerCase()==="path"&&pe[R]&&E.setAttribute("d",dt(pe[R],M,b)),R===0&&(Se=b,q?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),T){let E=V(ne(l,re,Ee,g));for(let R in T){let ge=parseFloat(R);E>=ge&&!We.has(ge)&&(We.add(ge),T[R]?.());}}!B&&ne(l,re,Ee,g)>0&&(B=true,F?.()),Fe&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,_e=setTimeout(()=>{ye=-1,Ve=[],B=false,_=false,We.clear(),et(),qe=true;},K))):!Fe&&!oe&&(_=false),mt(l);}function ut(o){return o>=Ee&&o<h}function mt(o){de||ut(o)?k=requestAnimationFrame($t):Ge=false;}function ft(){return de||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,k=requestAnimationFrame(function(){$t();}));}function rt(){Ge=false,cancelAnimationFrame(k);}let pt=new IntersectionObserver(o=>{o.forEach(l=>{de=l.isIntersecting,de&&!j?(qe=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:ve??null,threshold:P,rootMargin:x});function Ct(){z.forEach((o,l)=>{D[l]=je(o),o.style.strokeDasharray=`${D[l]}`;}),At(),qe=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Ct,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let sr=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame(k),clearTimeout(_e),rt(),pt.disconnect(),sr(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),Et();},replay(){ye=-1,Ve=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Se=0,We.clear(),clearTimeout(_e),et(),qe=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,qe=true,ft()&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));Se=l,ye=l,Ve=[],j=true,rt(),tr(l,C),qe=true;},getProgress(){return Se},refresh(){clearTimeout(nt),Ct(),ft()&&!j&&tt();}},()=>({tStart:re,tEnd:Ee}))}var qt=new WeakMap,br=0;function Bt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++br),`el#${t}`}return r})}function Gt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function wr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function jt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],s=[],a=t[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(f?parseFloat(f[1]):0),s.push(f?f[2]:"");}n.push({fn:t[1],nums:i,units:s});}return n}function vr(e,n,r){let t=jt(e),i=jt(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((s,a)=>{let u=i[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((f,p)=>`${f}${s.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,p)=>`${f}${u.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((f,p)=>`${f+(u.nums[p]-f)*r}${s.units[p]}`).join(", ")})`}).join(" ")}function Ut(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(wr(t))return Ue(t,i,r);if(t.includes("("))return vr(t,i,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),f=parseFloat(a[1]);return `${u+(f-u)*r}${s[2]||a[2]}`}return r<1?t:i}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"]),Tr=0,Yt="--scroll-draw-progress";function xr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function yt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:s="ease-out",speed:a=1,once:u=false,axis:f="y",scrollContainer:p,native:S=true,velocityScale:H=false,respectReducedMotion:C=true,triggerElement:oe,onProgress:Pe,onComplete:G,onEnter:Ae,onLeave:N,onEnterBack:Y,onLeaveBack:X}=n,L=C&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof s=="function"?s:le[s]??le["ease-out"],T=he(i.start??"top bottom"),$=he(i.end??"bottom top"),P=oe??e,x=typeof p=="string"?document.querySelector(p):p??null,w=Object.entries(t).map(([c,h])=>({prop:Er(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function K(){let c=window.getComputedStyle(e);for(let h of w)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function M(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let te=new Map;for(let c of [...w.map(h=>h.prop),Yt])te.set(c,e.style.getPropertyValue(c));function xe(){for(let[c,h]of te)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(L)return M(),G?.(),{...r,destroy:xe,getProgress:()=>1};K();let we=typeof s=="string"?st(s):null;function ce(){if(!S||!xr()||!we||f!=="y"||x||P!==e||u||a!==1||Pe||G||Ae||N||Y||X||H!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Sr.has(c.prop))return false;return true}function q(){let c=`ssd-a-${++Tr}`,h=w.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=w.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${we};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let k=()=>f==="x"?window.scrollX:window.scrollY,de=()=>f==="x"?window.innerWidth:window.innerHeight,ye=()=>{let ae=e.getBoundingClientRect();return Ce({top:ae.top,height:ae.height},k(),de(),T,$)};Oe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:ye});let Ve={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",xe(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Se of w)e.style.setProperty(Se.prop,Ut(Se.from,Se.to,j));},getProgress(){let{tStart:ae,tEnd:j}=ye();return I(ne(k(),ae,j,a))}};return Ve}if(ce())return q();let F=0,m=0,O=0,v=false,A=false,ue=-1,y=0,V=false,me=NaN,He=-1,ve=0,Me=()=>x?f==="x"?x.scrollLeft:x.scrollTop:f==="x"?window.scrollX:window.scrollY,fe=()=>x?f==="x"?x.clientWidth:x.clientHeight:f==="x"?window.innerWidth:window.innerHeight,Q=P===e?w:[],se=false;function ie(){let c=e.style,h=Q.map(de=>c.getPropertyValue(de.prop)),_=c.transition;Q.length&&(c.transition="none"),Q.forEach(de=>c.setProperty(de.prop,te.get(de.prop)??""));let B=ot(P,x,f);Q.forEach((de,ye)=>c.setProperty(de.prop,h[ye])),Q.length&&(e.offsetWidth,c.transition=_);let k=Ce(B,B.scroll,fe(),T,$);se&&Math.abs(k.tStart-F)<1&&Math.abs(k.tEnd-m)<1||(se=true,F=k.tStart,m=k.tEnd);}function Z(c){e.style.setProperty(Yt,String(c));for(let h of w)e.style.setProperty(h.prop,Ut(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?Ae?.():me>0&&c<=0&&X?.(),me<1&&c>=1?N?.():me>=1&&c<1&&Y?.(),me=c;}function z(){if(!v||A)return;let c=performance.now(),h=Me(),_=a;if(H!==false){let de=c-ve,ye=de>0?Math.abs(h-(He<0?h:He))/de:0;_=a*Math.max(.2,1+ye*(typeof H=="number"?H:1)*.04);}He=h,ve=c;let B=m===F?0:(h-F)/(m-F);Ne(B);let k=I(ne(h,F,m,_));u&&(ue=Math.max(ue,k),k=ue),y=k,Z(k),k>=1&&!V?(V=true,G?.()):k<1&&!u&&(V=false),O=requestAnimationFrame(z);}ie(),m===F&&be("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=I(ne(Me(),F,m,a));u&&c>0&&(ue=c),y=c,Z(c);}let D=new IntersectionObserver(c=>{c.forEach(h=>{v=h.isIntersecting,v&&!A?O=requestAnimationFrame(z):cancelAnimationFrame(O);});},{root:x??null}),pe;function re(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",re),window.addEventListener("orientationchange",re);let Ee=De([P],re);return D.observe(e),Oe(e,{type:"animate",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:m})}),{destroy(){cancelAnimationFrame(O),D.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),Ee(),clearTimeout(pe),xe(),Ie(e);},replay(){ue=-1,V=false,y=0,A=false,Z(0);},pause(){A=true,cancelAnimationFrame(O);},resume(){A&&(A=false,v&&(O=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));y=h,ue=h,A=true,cancelAnimationFrame(O),Z(h);},getProgress(){return y},refresh(){ie();}}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n){if(typeof window>"u")return ht;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollCounter: element not found:",e),ht;let t=r,{from:i=0,to:s,format:a,easing:u="ease-out",trigger:f={},once:p=true,decimals:S,onComplete:H}=n,C=S!==void 0?m=>m.toFixed(S):a??(m=>String(Math.round(m))),oe=typeof u=="function"?u:le[u]??le["ease-out"],Pe=he(f.start??"top 80%"),G=he(f.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=C(s),H?.(),ht;let N=0,Y=0,X=false,L=0,I=false,T=false,$=-1,P=0,x=false,w=()=>window.scrollY,K=()=>window.innerHeight;function M(){let m=t.getBoundingClientRect(),O=Ce({top:m.top,height:m.height},w(),K(),Pe,G);X&&Math.abs(O.tStart-N)<1&&Math.abs(O.tEnd-Y)<1||(X=true,N=O.tStart,Y=O.tEnd);}function te(m){t.textContent=C(i+(s-i)*m),t.style.setProperty("--scroll-draw-progress",String(m));}function xe(){if(!I||T)return;let m=oe(ne(w(),N,Y,1));p&&($=Math.max($,m),m=$),P=m,te(m),m>=1&&!x?(x=true,H?.()):m<1&&!p&&(x=false),L=requestAnimationFrame(xe);}M();{let m=oe(ne(w(),N,Y,1));p&&m>0&&($=m),P=m,te(m);}let we=new IntersectionObserver(m=>{m.forEach(O=>{I=O.isIntersecting,I&&!T?L=requestAnimationFrame(xe):cancelAnimationFrame(L);});}),ce;function q(){clearTimeout(ce),ce=setTimeout(M,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let F=De([t],q);return we.observe(t),Oe(t,{type:"counter",getProgress:()=>P,getTrigger:()=>({tStart:N,tEnd:Y})}),{destroy(){cancelAnimationFrame(L),we.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),F(),clearTimeout(ce),Ie(t);},replay(){$=-1,x=false,P=0,T=false,te(0);},pause(){T=true,cancelAnimationFrame(L);},resume(){T&&(T=false,I&&(L=requestAnimationFrame(xe)));},seek(m){let O=Math.min(1,Math.max(0,m));P=O,$=O,T=true,cancelAnimationFrame(L),te(O);},getProgress(){return P}}}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function wt(e,n={}){if(typeof window>"u")return Xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),Xt;let t=r,{trigger:i={},easing:s="linear",once:a=false,axis:u="y",preload:f="auto",triggerElement:p,onReady:S,onComplete:H,onProgress:C}=n,oe=p??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:le[s]??le.linear,Ae=he(i.start??"top top"),N=he(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=f);let Y=n.from??0,X=n.to,L=0,I=0,T=0,$=false,P=false,x=-1,w=0,K=false,M=false,te=()=>u==="x"?window.scrollX:window.scrollY,xe=()=>u==="x"?window.innerWidth:window.innerHeight;function we(){let y=oe.getBoundingClientRect(),V=u==="x"?y.left:y.top,me=u==="x"?y.width:y.height,He=Ce({top:V,height:me},te(),xe(),Ae,N);L=He.tStart,I=He.tEnd,M&&I===L&&be("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function q(y){if(!M)return;let V=X??t.duration??0,me=Y+(V-Y)*y;me!==ce&&(ce=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(y)),C?.(y);}function F(){if(!$||P||!M||Pe)return;let y=G(ne(te(),L,I,1));a&&(x=Math.max(x,y),y=x),w=y,q(y),y>=1&&!K?(K=true,H?.()):y<1&&!a&&(K=false),T=requestAnimationFrame(F);}function m(){if(M=true,X===void 0&&(X=t.duration),Pe){q(1),S?.();return}we(),S?.(),$&&!P&&(T=requestAnimationFrame(F));}t.readyState>=1?m():t.addEventListener("loadedmetadata",m,{once:true}),M||we();let O=new IntersectionObserver(y=>{y.forEach(V=>{$=V.isIntersecting,$&&!P&&M?T=requestAnimationFrame(F):cancelAnimationFrame(T);});}),v;function A(){clearTimeout(v),v=setTimeout(we,150);}window.addEventListener("resize",A),window.addEventListener("orientationchange",A);let ue=De([oe],A);return O.observe(t),Oe(t,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:L,tEnd:I})}),{destroy(){cancelAnimationFrame(T),O.disconnect(),t.removeEventListener("loadedmetadata",m),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),ue(),clearTimeout(v),Ie(t);},replay(){x=-1,K=false,w=0,P=false,ce=NaN,q(0);},pause(){P=true,cancelAnimationFrame(T);},resume(){P&&(P=false,$&&M&&(T=requestAnimationFrame(F)));},seek(y){let V=Math.min(1,Math.max(0,y));w=V,x=V,P=true,cancelAnimationFrame(T),ce=NaN,q(V);},getProgress(){return w}}}function Kt(e,n){let r=document.createElement("span");r.textContent=n,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function Jt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Mr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Qt(e){let n=Jt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],i=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of i){let a=r.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((f,p)=>{let S=f.nextElementSibling;u.appendChild(f),p<a.length-1&&S&&S.style.whiteSpace==="pre"&&u.appendChild(S);}),t.push(u);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Ar(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,s=n*t,a=s+(1-i);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Lr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,n={}){if(typeof window>"u")return Zt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollText: element not found:",e),Zt;let t=r,{split:i="words",stagger:s=.04,easing:a="ease-out",from:u={opacity:0,y:24},trigger:f={},once:p=true,onComplete:S}=n,H=window.matchMedia("(prefers-reduced-motion: reduce)").matches,C=typeof a=="function"?a:le[a]??le["ease-out"],oe=he(f.start??"top 85%"),Pe=he(f.end??"top 40%"),G=t.innerHTML,Ae=t.textContent??"",N;i==="chars"?N=Mr(t):i==="lines"?N=Qt(t):N=Jt(t),Kt(t,Ae);let Y=N.length;function X(v,A){u?.opacity!==void 0&&(v.style.opacity=String(u.opacity+(1-u.opacity)*A));let ue=Lr(A,u);ue&&(v.style.transform=ue);}function L(v){t.style.setProperty("--scroll-draw-progress",String(v)),N.forEach((A,ue)=>{let y=C(Ar(v,ue,Y,s));X(A,y);});}if(H)return L(1),S?.(),{destroy(){t.innerHTML=G;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};L(0);let I=0,T=0,$=0,P=false,x=false,w=-1,K=0,M=false,te=()=>window.scrollY,xe=()=>window.innerHeight;function we(){let v=t.getBoundingClientRect(),A=Ce({top:v.top,height:v.height},te(),xe(),oe,Pe);I=A.tStart,T=A.tEnd;}function ce(){if(!P||x)return;let v=ne(te(),I,T,1);p&&(w=Math.max(w,v),v=w),K=v,L(v),v>=1&&!M?(M=true,S?.()):v<1&&!p&&(M=false),$=requestAnimationFrame(ce);}we();let q=new IntersectionObserver(v=>{v.forEach(A=>{P=A.isIntersecting,P&&!x?$=requestAnimationFrame(ce):cancelAnimationFrame($);});}),F;function m(){clearTimeout(F),F=setTimeout(()=>{if(i==="lines"){let v=K;t.innerHTML=G,N=Qt(t),Kt(t,Ae),L(v);}we();},150);}window.addEventListener("resize",m),window.addEventListener("orientationchange",m);let O=De([t],m);return q.observe(t),Oe(t,{type:"text",getProgress:()=>K,getTrigger:()=>({tStart:I,tEnd:T})}),{destroy(){cancelAnimationFrame($),q.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),O(),clearTimeout(F),t.innerHTML=G,Ie(t);},replay(){w=-1,M=false,K=0,x=false,L(0);},pause(){x=true,cancelAnimationFrame($);},resume(){x&&(x=false,P&&($=requestAnimationFrame(ce)));},seek(v){let A=Math.min(1,Math.max(0,v));K=A,w=A,x=true,cancelAnimationFrame($),L(A);},getProgress(){return K}}}function Re(e,n){let r,t,i,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=Bt(s);!r||a===i||(i=a,solidJs.untrack(()=>{t?.destroy(),t=n(r,Gt(s,()=>s));}));}),solidJs.onCleanup(()=>{t?.destroy(),t=i=void 0;}),{ref:a=>{r=a;},getInstance:()=>t}}function Hn(e={}){return Re(e,gt).ref}function Nn(e={}){return Re(e,gt)}function Vn(e){return Re(e,yt).ref}function zn(e){return Re(e,yt)}function _n(e){return Re(e,bt).ref}function Wn(e){return Re(e,bt)}function qn(e={}){return Re(e,wt).ref}function Bn(e={}){return Re(e,wt)}function Gn(e={}){return Re(e,vt).ref}function jn(e={}){return Re(e,vt)}exports.createScrollAnimate=zn;exports.createScrollCounter=Wn;exports.createScrollDraw=Nn;exports.createScrollText=jn;exports.createScrollVideo=Bn;exports.useScrollAnimate=Vn;exports.useScrollCounter=_n;exports.useScrollDraw=Hn;exports.useScrollText=Gn;exports.useScrollVideo=qn;
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-LQBXJRFY.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-426RAN5I.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};