svg-scroll-draw 2.20.1 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +17 -15
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +1 -1
  4. package/dist/angular/index.d.ts +1 -1
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -1
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.mjs +1 -1
  10. package/dist/astro/index.cjs +3 -3
  11. package/dist/astro/index.mjs +1 -1
  12. package/dist/cdn/aos.global.js +2 -2
  13. package/dist/cdn/scrollreveal.global.js +2 -2
  14. package/dist/cdn/svg-scroll-draw.dev.global.js +83 -29
  15. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  16. package/dist/cdn/vivus.global.js +1 -1
  17. package/dist/chunk-2PYLM3E7.mjs +1 -0
  18. package/dist/chunk-DWK6XXY6.mjs +2 -0
  19. package/dist/chunk-DY5JCXVR.mjs +1 -0
  20. package/dist/chunk-EAWFBJUR.mjs +2 -0
  21. package/dist/{chunk-MTEGM4RR.mjs → chunk-GVBO5GRD.mjs} +1 -1
  22. package/dist/chunk-HX4SP5WN.mjs +3 -0
  23. package/dist/chunk-JCXMBI4G.mjs +2 -0
  24. package/dist/chunk-KV3WCPQ5.mjs +1 -0
  25. package/dist/chunk-LTCJVVSC.mjs +1 -0
  26. package/dist/{chunk-SMRTRZSD.mjs → chunk-OTDD2ROH.mjs} +1 -1
  27. package/dist/{chunk-ECHMYVSK.mjs → chunk-VMUJMXKO.mjs} +1 -1
  28. package/dist/chunk-WXUOF4NM.mjs +1 -0
  29. package/dist/chunk-YNNA33A5.mjs +2 -0
  30. package/dist/cinematic/index.cjs +2 -2
  31. package/dist/cinematic/index.mjs +1 -1
  32. package/dist/{engine-DQyBzZDl.d.ts → engine-B7UpB4fT.d.ts} +2 -1
  33. package/dist/{engine-P8u6OK4m.d.mts → engine-o1VSQ1lX.d.mts} +2 -1
  34. package/dist/group/index.cjs +3 -3
  35. package/dist/group/index.d.mts +2 -2
  36. package/dist/group/index.d.ts +2 -2
  37. package/dist/group/index.mjs +1 -1
  38. package/dist/horizontal/index.cjs +1 -1
  39. package/dist/horizontal/index.d.mts +2 -1
  40. package/dist/horizontal/index.d.ts +2 -1
  41. package/dist/horizontal/index.mjs +1 -1
  42. package/dist/{index-CMqK0GCT.d.mts → index-BY-CNE8c.d.mts} +1 -1
  43. package/dist/{index-DPqPEnO-.d.ts → index-DqXXiDIk.d.ts} +1 -1
  44. package/dist/index.cjs +4 -4
  45. package/dist/index.d.mts +2 -2
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.mjs +1 -1
  48. package/dist/nuxt/index.cjs +3 -3
  49. package/dist/nuxt/index.d.mts +1 -1
  50. package/dist/nuxt/index.d.ts +1 -1
  51. package/dist/nuxt/index.mjs +1 -1
  52. package/dist/react/index.cjs +3 -3
  53. package/dist/react/index.d.mts +1 -1
  54. package/dist/react/index.d.ts +1 -1
  55. package/dist/react/index.mjs +1 -1
  56. package/dist/reveal/index.cjs +1 -1
  57. package/dist/reveal/index.mjs +1 -1
  58. package/dist/scrollreveal/index.cjs +2 -2
  59. package/dist/scrollreveal/index.mjs +1 -1
  60. package/dist/scrollreveal/react/index.cjs +2 -2
  61. package/dist/scrollreveal/react/index.mjs +1 -1
  62. package/dist/snap/index.mjs +1 -1
  63. package/dist/solid/index.cjs +3 -3
  64. package/dist/solid/index.d.mts +1 -1
  65. package/dist/solid/index.d.ts +1 -1
  66. package/dist/solid/index.mjs +1 -1
  67. package/dist/svelte/index.cjs +3 -3
  68. package/dist/svelte/index.d.mts +1 -1
  69. package/dist/svelte/index.d.ts +1 -1
  70. package/dist/svelte/index.mjs +1 -1
  71. package/dist/text/index.cjs +1 -1
  72. package/dist/text/index.mjs +1 -1
  73. package/dist/timeline/index.mjs +1 -1
  74. package/dist/video/index.cjs +1 -1
  75. package/dist/video/index.mjs +1 -1
  76. package/dist/vivus/index.cjs +2 -2
  77. package/dist/vivus/index.d.mts +3 -0
  78. package/dist/vivus/index.d.ts +3 -0
  79. package/dist/vivus/index.mjs +1 -1
  80. package/dist/vivus/react/index.cjs +2 -2
  81. package/dist/vivus/react/index.mjs +1 -1
  82. package/dist/vue/index.cjs +3 -3
  83. package/dist/vue/index.d.mts +1 -1
  84. package/dist/vue/index.d.ts +1 -1
  85. package/dist/vue/index.mjs +1 -1
  86. package/dist/web-component/index.cjs +3 -3
  87. package/dist/web-component/index.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/chunk-4T5R3ZTL.mjs +0 -2
  90. package/dist/chunk-7SBTYJGH.mjs +0 -1
  91. package/dist/chunk-BFX2CSQ3.mjs +0 -1
  92. package/dist/chunk-ENACACPZ.mjs +0 -3
  93. package/dist/chunk-I45LCJUP.mjs +0 -1
  94. package/dist/chunk-KGAJQP2N.mjs +0 -2
  95. package/dist/chunk-KHQ7OGQK.mjs +0 -1
  96. package/dist/chunk-OMI46IXL.mjs +0 -2
  97. package/dist/chunk-WQZKXAXK.mjs +0 -2
@@ -1 +1 @@
1
- 'use strict';function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,c=[];for(let l=0;l<n;l++){let p=Math.pow(s,l);c.push(p),i+=p;}let m=[0],u=0;for(let l=0;l<n;l++)u+=c[l]/i,m.push(u);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=m[p+1]){let g=(l-m[p])/(m[p+1]-m[p]);if(p===0)return g*(2-g);let T=1-Math.pow(r,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var H={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Xe(),elastic:Ye()};function Ee(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ve(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function we(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function G(e,t,n,r){return n===t?0:Ee((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,s){let i=ve(e.top,e.height,t,r.element)-we(r.viewport,n),c=ve(e.top,e.height,t,s.element)-we(s.viewport,n);return {tStart:i,tEnd:c}}function Se(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Me(e,t,n){let r=xe(e),s=xe(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var je="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Re=33;function Ge(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ue(e){let t=[];for(let n=0;n<Re;n++){let r=n/(Re-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Te(e){switch(e){case "linear":return "linear";case "ease-in":return je;case "ease-out":return qe;case "ease-in-out":return Ge()?Ue(H["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Pe(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Pe().set(e,t);}function le(e){Pe().delete(e);}var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function U(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var z,Q=new Set,K=new WeakMap,k=new Map,$e=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Ae(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();z??(z=new ResizeObserver(s=>{let i=false;for(let{target:c}of s)K.get(c)!==$e(c)&&(i=true),K.set(c,"");i&&Q.forEach(c=>c());})),Q.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{K.has(s)||K.set(s,$e(s)),k.set(s,(k.get(s)??0)+1),z.observe(s);}),()=>{Q.delete(n)&&(r.forEach(s=>{let i=(k.get(s)??1)-1;if(i)return void k.set(s,i);k.delete(s),z?.unobserve(s);}),Q.size||(z?.disconnect(),z=void 0));}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],c=r[2].trim();if(c)for(let m of c.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Je(e,t,n){let r=Ie(e),s=Ie(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,c)=>{let m=s[c];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((u,l)=>`${u}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,l)=>`${u}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,l)=>`${u+(m.nums[l]-u)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function _e(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(Ze(r))return Me(r,s,n);if(r.includes("("))return Je(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),c=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&c){let m=parseFloat(i[1]),u=parseFloat(c[1]);return `${m+(u-m)*n}${i[2]||c[2]}`}return n<1?r:s}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:s={},easing:i="ease-out",speed:c=1,once:m=false,axis:u="y",scrollContainer:l,native:p=true,velocityScale:g=false,respectReducedMotion:T=true,triggerElement:N,onProgress:L,onComplete:P,onEnter:F,onLeave:B,onEnterBack:W,onLeaveBack:$}=t,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof i=="function"?i:H[i]??H["ease-out"],pe=ae(s.start??"top bottom"),fe=ae(s.end??"bottom top"),X=N??e,h=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([o,a])=>({prop:et(o),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function Ve(){let o=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=o.getPropertyValue(a.prop).trim()||"0");}function De(){for(let o of y)e.style.setProperty(o.prop,String(o.to));}let Z=new Map;for(let o of [...y.map(a=>a.prop),Ce])Z.set(o,e.style.getPropertyValue(o));function J(){for(let[o,a]of Z)a?e.style.setProperty(o,a):e.style.removeProperty(o);}if(O)return De(),P?.(),{...n,destroy:J,getProgress:()=>1};Ve();let de=typeof i=="string"?Te(i):null;function He(){if(!p||!rt()||!de||u!=="y"||h||X!==e||m||c!==1||L||P||F||B||W||$||g!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let o of y)if(!tt.has(o.prop))return false;return true}function ze(){let o=`ssd-a-${++nt}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${o}{from{${a}}to{${_}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(o);let f=()=>u==="x"?window.scrollX:window.scrollY,b=()=>u==="x"?window.innerWidth:window.innerHeight,C=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},f(),b(),pe,fe)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:C});let oe={refresh(){},destroy(){e.classList.remove(o),v.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(o);for(let ie of y)e.style.setProperty(ie.prop,_e(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=C();return S(G(f(),d,se,c))}};return oe}if(He())return ze();let E=0,w=0,x=0,Y=false,M=false,A=-1,I=0,j=false,R=NaN,ee=-1,ge=0,be=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,ke=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,V=X===e?y:[],he=false;function te(){let o=e.style,a=V.map(b=>o.getPropertyValue(b.prop)),_=o.transition;V.length&&(o.transition="none"),V.forEach(b=>o.setProperty(b.prop,Z.get(b.prop)??""));let v=Se(X,h,u);V.forEach((b,C)=>o.setProperty(b.prop,a[C])),V.length&&(e.offsetWidth,o.transition=_);let f=ue(v,v.scroll,ke(),pe,fe);he&&Math.abs(f.tStart-E)<1&&Math.abs(f.tEnd-w)<1||(he=true,E=f.tStart,w=f.tEnd);}function q(o){e.style.setProperty(Ce,String(o));for(let a of y)e.style.setProperty(a.prop,_e(a.from,a.to,o));L?.(o);}function Be(o){if(isNaN(R)){R=o;return}R<=0&&o>0?F?.():R>0&&o<=0&&$?.(),R<1&&o>=1?B?.():R>=1&&o<1&&W?.(),R=o;}function ne(){if(!Y||M)return;let o=performance.now(),a=be(),_=c;if(g!==false){let b=o-ge,C=b>0?Math.abs(a-(ee<0?a:ee))/b:0;_=c*Math.max(.2,1+C*(typeof g=="number"?g:1)*.04);}ee=a,ge=o;let v=w===E?0:(a-E)/(w-E);Be(v);let f=S(G(a,E,w,_));m&&(A=Math.max(A,f),f=A),I=f,q(f),f>=1&&!j?(j=true,P?.()):f<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===E&&U("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 o=S(G(be(),E,w,c));m&&o>0&&(A=o),I=o,q(o);}let ye=new IntersectionObserver(o=>{o.forEach(a=>{Y=a.isIntersecting,Y&&!M?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:h??null}),re;function D(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let We=Ae([X],D);return ye.observe(e),ce(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:E,tEnd:w})}),{destroy(){cancelAnimationFrame(x),ye.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),We(),clearTimeout(re),J(),le(e);},replay(){A=-1,j=false,I=0,M=false,q(0);},pause(){M=true,cancelAnimationFrame(x);},resume(){M&&(M=false,Y&&(x=requestAnimationFrame(ne)));},seek(o){let a=Math.min(1,Math.max(0,o));I=a,A=a,M=true,cancelAnimationFrame(x),q(a);},getProgress(){return I},refresh(){te();}}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Fe(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(s=>{let i=s.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Oe={destroy:()=>{}};function At(e,t={}){if(typeof window>"u")return Oe;let n=it(e);if(!n.length)return U("scrollReveal: no elements found:",e),Oe;let{preset:r="fadeUp",from:s,stagger:i=.15,easing:c="ease-out",once:m=true,trigger:u,onEnter:l,onLeave:p}=t,g={...ot[r],...s},T=st(g),N=u?.start??"top 88%",L=u?.end??"top 53%",P=Math.abs(me(N)[1]-me(L)[1]),F=Math.min(Math.max(i,0),1)*P,B=F>0?at(n):n.map(()=>0),W=n.map(($,O)=>{let S=Math.min(B[O]*F,P);return Ne($,{props:T,easing:c,once:m,native:false,trigger:S>0?{start:Fe(N,S),end:Fe(L,S)}:{start:N,end:L},onEnter:O===0?l:void 0,onLeave:O===n.length-1?p:void 0})});return {destroy(){W.forEach($=>$.destroy());}}}exports.scrollReveal=At;
1
+ 'use strict';function je({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),i=0,u=[];for(let l=0;l<n;l++){let f=Math.pow(o,l);u.push(f),i+=f;}let m=[0],c=0;for(let l=0;l<n;l++)c+=u[l]/i,m.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let f=0;f<n;f++)if(l<=m[f+1]){let g=(l-m[f])/(m[f+1]-m[f]);if(f===0)return g*(2-g);let T=1-Math.pow(r,f);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1}var D={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:je(),elastic:Ye()};function be(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ye(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function ve(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function q(e,t,n,r){return n===t?0:be((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,o){let i=ye(e.top,e.height,t,r.element)-ve(r.viewport,n),u=ye(e.top,e.height,t,o.element)-ve(o.viewport,n);return {tStart:i,tEnd:u}}function Ee(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function we(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Se(e,t,n){let r=we(e),o=we(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var qe="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ge="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Me=33;function Ue(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ke(e){let t=[];for(let n=0;n<Me;n++){let r=n/(Me-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function xe(e){switch(e){case "linear":return "linear";case "ease-in":return qe;case "ease-out":return Ge;case "ease-in-out":return Ue()?Ke(D["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Re(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Re().set(e,t);}function le(e){Re().delete(e);}var Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function G(e,...t){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var H,U=new Set,K=new WeakMap,W=new Map,Te=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Je(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Pe(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();H??(H=new ResizeObserver(o=>{let i=false;for(let{target:u}of o)K.get(u)!==Te(u)&&(i=true),K.set(u,"");i&&U.forEach(u=>u());})),U.add(n);let r=Je(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{K.has(o)||K.set(o,Te(o)),W.set(o,(W.get(o)??0)+1),H.observe(o);}),()=>{U.delete(n)&&(r.forEach(o=>{let i=(W.get(o)??1)-1;if(i)return void W.set(o,i);W.delete(o),H?.unobserve(o);}),U.size||(H?.disconnect(),H=void 0));}}function $e(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function Ae(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=$e(i=>{if(!i)return;r();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=t(u?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(n))o[i]=(...u)=>n[i]?.(...u);return o.destroy=()=>{r(),n.destroy();},o}function et(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],i=[],u=r[2].trim();if(u)for(let m of u.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:i});}return t}function tt(e,t,n){let r=Ie(e),o=Ie(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((i,u)=>{let m=o[u];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((c,l)=>`${c}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,l)=>`${c}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,l)=>`${c+(m.nums[l]-c)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function Ce(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(et(r))return Se(r,o,n);if(r.includes("("))return tt(r,o,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),u=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&u){let m=parseFloat(i[1]),c=parseFloat(u[1]);return `${m+(c-m)*n}${i[2]||u[2]}`}return n<1?r:o}function nt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var rt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),ot=0,_e="--scroll-draw-progress";function st(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Oe={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Fe(e,t){return typeof window>"u"?Oe:t.respectReducedMotion===false?Ne(e,t,false):Ae(t,(n,r)=>Ne(e,n,r))}function Ne(e,t,n){let{props:r,trigger:o={},easing:i="ease-out",speed:u=1,once:m=false,axis:c="y",scrollContainer:l,native:f=true,velocityScale:g=false,triggerElement:T,onProgress:P,onComplete:S,onEnter:O,onLeave:F,onEnterBack:z,onLeaveBack:B}=t,M=typeof i=="function"?i:D[i]??D["ease-out"],$=ae(o.start??"top bottom"),A=ae(o.end??"bottom top"),X=T??e,b=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([s,a])=>({prop:nt(s),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function De(){let s=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=s.getPropertyValue(a.prop).trim()||"0");}function He(){for(let s of y)e.style.setProperty(s.prop,String(s.to));}let Z=new Map;for(let s of [...y.map(a=>a.prop),_e])Z.set(s,e.style.getPropertyValue(s));function J(){for(let[s,a]of Z)a?e.style.setProperty(s,a):e.style.removeProperty(s);}if(n)return He(),S?.(),{...Oe,destroy:J,getProgress:()=>1};De();let fe=typeof i=="string"?xe(i):null;function We(){if(!f||!st()||!fe||c!=="y"||b||X!==e||m||u!==1||P||S||O||F||z||B||g!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let s of y)if(!rt.has(s.prop))return false;return true}function ze(){let s=`ssd-a-${++ot}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),E=document.createElement("style");E.setAttribute("data-ssd-animate",""),E.textContent=`@keyframes ${s}{from{${a}}to{${_}}}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(E),e.classList.add(s);let p=()=>c==="x"?window.scrollX:window.scrollY,h=()=>c==="x"?window.innerWidth:window.innerHeight,N=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},p(),h(),$,A)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:N});let oe={refresh(){},destroy(){e.classList.remove(s),E.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(s),e.offsetWidth,e.classList.add(s);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(s);for(let ie of y)e.style.setProperty(ie.prop,Ce(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=N();return M(q(p(),d,se,u))}};return oe}if(We())return ze();let v=0,w=0,x=0,Q=false,L=false,I=-1,C=0,j=false,R=NaN,ee=-1,pe=0,de=()=>b?c==="x"?b.scrollLeft:b.scrollTop:c==="x"?window.scrollX:window.scrollY,Be=()=>b?c==="x"?b.clientWidth:b.clientHeight:c==="x"?window.innerWidth:window.innerHeight,k=X===e?y:[],ge=false;function te(){let s=e.style,a=k.map(h=>s.getPropertyValue(h.prop)),_=s.transition;k.length&&(s.transition="none"),k.forEach(h=>s.setProperty(h.prop,Z.get(h.prop)??""));let E=Ee(X,b,c);k.forEach((h,N)=>s.setProperty(h.prop,a[N])),k.length&&(e.offsetWidth,s.transition=_);let p=ue(E,E.scroll,Be(),$,A);ge&&Math.abs(p.tStart-v)<1&&Math.abs(p.tEnd-w)<1||(ge=true,v=p.tStart,w=p.tEnd);}function Y(s){e.style.setProperty(_e,String(s));for(let a of y)e.style.setProperty(a.prop,Ce(a.from,a.to,s));P?.(s);}function Xe(s){if(isNaN(R)){R=s;return}R<=0&&s>0?O?.():R>0&&s<=0&&B?.(),R<1&&s>=1?F?.():R>=1&&s<1&&z?.(),R=s;}function ne(){if(!Q||L)return;let s=performance.now(),a=de(),_=u;if(g!==false){let h=s-pe,N=h>0?Math.abs(a-(ee<0?a:ee))/h:0;_=u*Math.max(.2,1+N*(typeof g=="number"?g:1)*.04);}ee=a,pe=s;let E=w===v?0:(a-v)/(w-v);Xe(E);let p=M(q(a,v,w,_));m&&(I=Math.max(I,p),p=I),C=p,Y(p),p>=1&&!j?(j=true,S?.()):p<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===v&&G("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 s=M(q(de(),v,w,u));m&&s>0&&(I=s),C=s,Y(s);}let he=new IntersectionObserver(s=>{s.forEach(a=>{Q=a.isIntersecting,Q&&!L?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:b??null}),re;function V(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",V),window.addEventListener("orientationchange",V);let Qe=Pe([X],V);return he.observe(e),ce(e,{type:"animate",getProgress:()=>C,getTrigger:()=>({tStart:v,tEnd:w})}),{destroy(){cancelAnimationFrame(x),he.disconnect(),window.removeEventListener("resize",V),window.removeEventListener("orientationchange",V),Qe(),clearTimeout(re),J(),le(e);},replay(){I=-1,j=false,C=0,L=false,Y(0);},pause(){L=true,cancelAnimationFrame(x);},resume(){L&&(L=false,Q&&(x=requestAnimationFrame(ne)));},seek(s){let a=Math.min(1,Math.max(0,s));C=a,I=a,L=true,cancelAnimationFrame(x),Y(a);},getProgress(){return C},refresh(){te();}}}var it={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function at(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function ut(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function ke(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function ct(e){let t=NaN,n=0,r=0;return e.map(o=>{let i=o.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Ve={destroy:()=>{}};function Ft(e,t={}){if(typeof window>"u")return Ve;let n=ut(e);if(!n.length)return G("scrollReveal: no elements found:",e),Ve;let{preset:r="fadeUp",from:o,stagger:i=.15,easing:u="ease-out",once:m=true,trigger:c,onEnter:l,onLeave:f}=t,g={...it[r],...o},T=at(g),P=c?.start??"top 88%",S=c?.end??"top 53%",O=Math.abs(me(P)[1]-me(S)[1]),F=Math.min(Math.max(i,0),1)*O,z=F>0?ct(n):n.map(()=>0),B=n.map((M,$)=>{let A=Math.min(z[$]*F,O);return Fe(M,{props:T,easing:u,once:m,native:false,trigger:A>0?{start:ke(P,A),end:ke(S,A)}:{start:P,end:S},onEnter:$===0?l:void 0,onLeave:$===n.length-1?f:void 0})});return {destroy(){B.forEach(M=>M.destroy());}}}exports.scrollReveal=Ft;
@@ -1 +1 @@
1
- import {a}from'../chunk-BFX2CSQ3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-LTCJVVSC.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});function V(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var K="4.0.9",G=()=>typeof window<"u"&&typeof document<"u",C=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(C(t))for(let o of Object.keys(t)){let i=t[o];C(i)?(C(e[o])||(e[o]={}),q(e[o],i)):e[o]=i;}return e}function L(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return []}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var $=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),F=false;function P(e,...n){F&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
2
- \u2014 ${t}`).join("")}`,"color: #ea654b;");}var T=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function oe(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r;}return t}function ie(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return T();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=T();return [o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function z(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=T(),[s,a,c,h]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[a]=o,r[c]=i,r[h]=-i,r}function re(e,n){let t=T();return t[e==="X"?12:13]=n,t}function se(e){let n=T();return n[0]=n[5]=e,n}function v(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r);}}function ae(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,a=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),h=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==h?{computed:`opacity: ${c};`,generated:`opacity: ${h};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let E=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(E[0]),A=E[1],I;if(A==="em")I=parseInt(o.fontSize,10)*m;else if(A==="px")I=m;else if(A==="%"){let Y=n.getBoundingClientRect();I=(d==="Y"?Y.height:Y.width)*m/100;}else throw new RangeError("Unrecognized or missing distance unit.");u.push(re(d,I));}t.rotate.x&&u.push(z("x",t.rotate.x)),t.rotate.y&&u.push(z("y",t.rotate.y)),t.rotate.z&&u.push(z("z",t.rotate.z)),t.scale!==1&&u.push(se(t.scale===0?2e-4:t.scale));let g={initial:"",final:""};if(u.length){let d=ie(o.transform);g={initial:`transform: matrix3d(${u.reduce(oe,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`};}let w={delayed:"",instant:""};if(b.generated||g.initial){let d=m=>`${m/1e3}s`,f=[],E=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(E("opacity")),g.initial&&f.push(E("transform")),w={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`};}return {inline:{computed:s,generated:a},opacity:b,position:o.position,transform:g,transition:w}}var x=(...e)=>e.filter(n=>n!=="").join(" "),le=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:false,container:document.documentElement,desktop:true,mobile:true,reset:false,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),p=null,M=null,l={containers:{},elements:{},history:[],sequences:{}},W=true,j=null,R=0,D=false,ce=0,H=()=>ce++;function U(e,n=false){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,a=t;for(;a;)isNaN(a.offsetTop)||(r+=a.offsetTop),isNaN(a.offsetLeft)||(s+=a.offsetLeft),a=a.offsetParent;return {bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var de=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function ue(e){let n=l.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return false;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function Q(e,n=false){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&B(e.node);},t-o)};}function fe(e,n){let t=e.styles;e.revealed=e.seen=true,v(e.node,x(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),Q(e,n);}function me(e){let n=e.styles;e.revealed=false,v(e.node,x(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),Q(e);}function k(e,n={}){let t=n.pristine||W,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return fe(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return me(e)}function J(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{l.elements[r]?.[n]&&o.push(s);}),o.length&&e.members.forEach((r,s)=>{let a=l.elements[r];a&&!a[n]&&(s<o[0]?t:i).push(s);}),{head:t,body:o,foot:i}}function O(e,n,t,o){let i=t<0?"head":"foot",r=l.elements[e.members[n+t]];e.blocked[i]=true,setTimeout(()=>{e.blocked[i]=false,r&&Z(r,o);},e.interval);}function Z(e,n=W){if(!e.visible&&e.revealed&&e.config.reset)return k(e,{reset:true});let t=e.sequence&&l.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=J(t,"visible"),r=J(t,"revealed");if(!r.body.length){let a=i.body[0],c=l.elements[t.members[a]];if(c)return O(t,a,-1,n),O(t,a,1,n),k(c,{reveal:true,pristine:n})}let s=a=>a[a.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return O(t,o,-1,n),k(e,{reveal:true,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return O(t,o,1,n),k(e,{reveal:true,pristine:n})}function be(){R=0;let e=D;D=false;for(let t of Object.values(l.containers))(e||!t.geometry)&&(t.geometry=U(t.node,true)),t.scroll=de(t);let n=Object.values(l.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=U(t.node)),t.visible=ue(t);for(let t of n)t.sequence?Z(t):k(t);W=false;}function y(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(D=true),R||(R=requestAnimationFrame(be));}var S=e=>e.node===document.documentElement?window:e.node;function _(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(l.elements))e.has(o.id)||delete l.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(l.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(l.containers))n.has(o.id)||(S(o).removeEventListener("scroll",y),S(o).removeEventListener("resize",y),delete l.containers[o.id]);for(let o of Object.values(l.sequences))t.has(o.id)||delete l.sequences[o.id];}function ee(){j=null,_();let e=V();for(let n of Object.values(l.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=true,v(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=true,v(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=false,v(n.node,x(t.inline.generated,t.opacity.generated,t.transform.initial)));}if(!e){for(let n of Object.values(l.containers))S(n).addEventListener("scroll",y),S(n).addEventListener("resize",y);y();}}function te(e,n={},t=false){if(!p)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:H(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}};}let a=L(e);if(!a.length)throw new Error("Invalid reveal target.");s=[];for(let c of a){let h=c.getAttribute("data-sr-id"),b=h!==null?l.elements[Number(h)]:void 0,u=b?q({},b):{id:H(),node:c,seen:!1,revealed:!1,visible:!1};b&&v(c,b.styles.inline.computed);let g=q({},b?b.config:p,n);if(!g.mobile&&$()||!g.desktop&&!$()){b&&B(c);continue}let w=L(g.container)[0];if(!w)throw new Error("Invalid container.");if(!w.contains(c))continue;let d=[...o,...Object.values(l.containers)].find(f=>f.node===w)?.id;d===void 0&&(d=H(),o.push({id:d,node:w})),u.config=g,u.containerId=d,u.styles=ae(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u);}for(let c of s)l.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id));}catch(a){return P("Reveal failed.",a.message)}for(let a of o)l.containers[a.id]=a;r&&(l.sequences[r.id]=r),t||(l.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(ee,0));}function B(e){let n=false;for(let t of L(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=true;let i=l.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),v(i.node,i.styles.inline.generated),delete l.elements[i.id]),t.removeAttribute("data-sr-id");}n&&_();}function ge(){for(let e of Object.values(l.elements))v(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(l.containers))S(e).removeEventListener("scroll",y),S(e).removeEventListener("resize",y);R&&cancelAnimationFrame(R),R=0,l={containers:{},elements:{},history:[],sequences:{}};}function pe(){for(let e of l.history)te(e.target,e.options,true);ee();}var N=()=>(G()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:K,noop:true});function ne(){if(!G())return false;let e=document.documentElement.style;return ("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function ve(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%";},{once:true});}function ye(e={}){if(!G()||!ne())return N();let n;try{if(n=q({},p??le(),e),!L(n.container)[0])throw new Error("Invalid container.")}catch(t){return P("Invalid configuration.",t.message),N()}return p=n,!p.mobile&&$()||!p.desktop&&!$()?(P("This device is disabled.",`desktop: ${p.desktop}`,`mobile: ${p.mobile}`),N()):(ve(),M||(M={reveal:(t,o)=>te(t,o),clean:B,destroy:ge,sync:pe,get defaults(){return p},version:K,noop:false},Object.defineProperty(M,"delegate",{value:y})),M)}var X=ye;X.isSupported=ne;Object.defineProperty(X,"debug",{get:()=>F,set:e=>{typeof e=="boolean"&&(F=e);}});var Re=X;exports.ScrollReveal=X;exports.default=Re;
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});function F(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function K(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let o=n;return o.addListener?.(t),()=>o.removeListener?.(t)}var ee="4.0.9",B=()=>typeof window<"u"&&typeof document<"u",H=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(H(t))for(let o of Object.keys(t)){let i=t[o];H(i)?(H(e[o])||(e[o]={}),q(e[o],i)):e[o]=i;}return e}function $(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return []}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var A=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),D=false;function G(e,...n){D&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
2
+ \u2014 ${t}`).join("")}`,"color: #ea654b;");}var L=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function se(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r;}return t}function ae(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return L();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=L();return [o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function N(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=L(),[s,l,c,R]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[l]=o,r[c]=i,r[R]=-i,r}function le(e,n){let t=L();return t[e==="X"?12:13]=n,t}function ce(e){let n=L();return n[0]=n[5]=e,n}function w(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r);}}function de(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,l=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),R=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==R?{computed:`opacity: ${c};`,generated:`opacity: ${R};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let M=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(M[0]),z=M[1],T;if(z==="em")T=parseInt(o.fontSize,10)*m;else if(z==="px")T=m;else if(z==="%"){let J=n.getBoundingClientRect();T=(d==="Y"?J.height:J.width)*m/100;}else throw new RangeError("Unrecognized or missing distance unit.");u.push(le(d,T));}t.rotate.x&&u.push(N("x",t.rotate.x)),t.rotate.y&&u.push(N("y",t.rotate.y)),t.rotate.z&&u.push(N("z",t.rotate.z)),t.scale!==1&&u.push(ce(t.scale===0?2e-4:t.scale));let g={initial:"",final:""};if(u.length){let d=ae(o.transform);g={initial:`transform: matrix3d(${u.reduce(se,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`};}let E={delayed:"",instant:""};if(b.generated||g.initial){let d=m=>`${m/1e3}s`,f=[],M=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(M("opacity")),g.initial&&f.push(M("transform")),E={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`};}return {inline:{computed:s,generated:l},opacity:b,position:o.position,transform:g,transition:E}}var k=(...e)=>e.filter(n=>n!=="").join(" "),ue=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:false,container:document.documentElement,desktop:true,mobile:true,reset:false,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),p=null,I=null,a={containers:{},elements:{},history:[],sequences:{}},X=true,j=null,y=0,C=false,S=null,W=false,fe=0,P=()=>fe++;function Z(e,n=false){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,l=t;for(;l;)isNaN(l.offsetTop)||(r+=l.offsetTop),isNaN(l.offsetLeft)||(s+=l.offsetLeft),l=l.offsetParent;return {bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var me=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function be(e){let n=a.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return false;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function te(e,n=false){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&V(e.node);},t-o)};}function ve(e,n){let t=e.styles;e.revealed=e.seen=true,w(e.node,k(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),te(e,n);}function ge(e){let n=e.styles;e.revealed=false,w(e.node,k(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),te(e);}function x(e,n={}){let t=n.pristine||X,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return ve(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return ge(e)}function _(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{a.elements[r]?.[n]&&o.push(s);}),o.length&&e.members.forEach((r,s)=>{let l=a.elements[r];l&&!l[n]&&(s<o[0]?t:i).push(s);}),{head:t,body:o,foot:i}}function O(e,n,t,o){let i=t<0?"head":"foot",r=a.elements[e.members[n+t]];e.blocked[i]=true,setTimeout(()=>{e.blocked[i]=false,r&&ne(r,o);},e.interval);}function ne(e,n=X){if(!e.visible&&e.revealed&&e.config.reset)return x(e,{reset:true});let t=e.sequence&&a.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=_(t,"visible"),r=_(t,"revealed");if(!r.body.length){let l=i.body[0],c=a.elements[t.members[l]];if(c)return O(t,l,-1,n),O(t,l,1,n),x(c,{reveal:true,pristine:n})}let s=l=>l[l.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return O(t,o,-1,n),x(e,{reveal:true,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return O(t,o,1,n),x(e,{reveal:true,pristine:n})}function pe(){y=0;let e=W;W=false;for(let t of Object.values(a.containers))(e||!t.geometry)&&(t.geometry=Z(t.node,true)),t.scroll=me(t);let n=Object.values(a.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=Z(t.node)),t.visible=be(t);for(let t of n)t.sequence?ne(t):x(t);X=false;}function v(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(W=true),y||(y=requestAnimationFrame(pe));}var h=e=>e.node===document.documentElement?window:e.node;function oe(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(a.elements))e.has(o.id)||delete a.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(a.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(a.containers))n.has(o.id)||(h(o).removeEventListener("scroll",v),h(o).removeEventListener("resize",v),delete a.containers[o.id]);for(let o of Object.values(a.sequences))t.has(o.id)||delete a.sequences[o.id];}function Y(){j=null,oe();let e=C||F();for(let n of Object.values(a.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=true,w(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=true,w(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=false,w(n.node,k(t.inline.generated,t.opacity.generated,t.transform.initial)));}if(e){for(let n of Object.values(a.containers))h(n).removeEventListener("scroll",v),h(n).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0;return}for(let n of Object.values(a.containers))h(n).addEventListener("scroll",v),h(n).addEventListener("resize",v);v();}function ie(e,n={},t=false){if(!p)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:P(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}};}let l=$(e);if(!l.length)throw new Error("Invalid reveal target.");s=[];for(let c of l){let R=c.getAttribute("data-sr-id"),b=R!==null?a.elements[Number(R)]:void 0,u=b?q({},b):{id:P(),node:c,seen:!1,revealed:!1,visible:!1};b&&w(c,b.styles.inline.computed);let g=q({},b?b.config:p,n);if(!g.mobile&&A()||!g.desktop&&!A()){b&&V(c);continue}let E=$(g.container)[0];if(!E)throw new Error("Invalid container.");if(!E.contains(c))continue;let d=[...o,...Object.values(a.containers)].find(f=>f.node===E)?.id;d===void 0&&(d=P(),o.push({id:d,node:E})),u.config=g,u.containerId=d,u.styles=de(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u);}for(let c of s)a.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id));}catch(l){return G("Reveal failed.",l.message)}for(let l of o)a.containers[l.id]=l;r&&(a.sequences[r.id]=r),t||(a.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(Y,0));}function V(e){let n=false;for(let t of $(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=true;let i=a.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),w(i.node,i.styles.inline.generated),delete a.elements[i.id]),t.removeAttribute("data-sr-id");}n&&oe();}function ye(){for(let e of Object.values(a.elements))w(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(a.containers))h(e).removeEventListener("scroll",v),h(e).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0,a={containers:{},elements:{},history:[],sequences:{}},S?.(),S=null,C=false;}function he(){for(let e of a.history)ie(e.target,e.options,true);Y();}var Q=()=>(B()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:ee,noop:true});function re(){if(!B())return false;let e=document.documentElement.style;return ("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function we(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%";},{once:true});}function Re(e={}){if(!B()||!re())return Q();let n;try{if(n=q({},p??ue(),e),!$(n.container)[0])throw new Error("Invalid container.")}catch(t){return G("Invalid configuration.",t.message),Q()}return p=n,!p.mobile&&A()||!p.desktop&&!A()?(G("This device is disabled.",`desktop: ${p.desktop}`,`mobile: ${p.mobile}`),Q()):(we(),!S&&!C&&!F()&&(S=K(t=>{t&&(S?.(),S=null,C=true,Y());})),I||(I={reveal:(t,o)=>ie(t,o),clean:V,destroy:ye,sync:he,get defaults(){return p},version:ee,noop:false},Object.defineProperty(I,"delegate",{value:v})),I)}var U=Re;U.isSupported=re;Object.defineProperty(U,"debug",{get:()=>D,set:e=>{typeof e=="boolean"&&(D=e);}});var ke=U;exports.ScrollReveal=U;exports.default=ke;
@@ -1 +1 @@
1
- export{a as ScrollReveal,b as default}from'../chunk-OMI46IXL.mjs';import'../chunk-AJ22VSHC.mjs';
1
+ export{a as ScrollReveal,b as default}from'../chunk-DWK6XXY6.mjs';import'../chunk-AJ22VSHC.mjs';import'../chunk-5PJEKEEP.mjs';
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var react=require('react');function U(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var K="4.0.9",G=()=>typeof window<"u"&&typeof document<"u",C=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(C(t))for(let o of Object.keys(t)){let r=t[o];C(r)?(C(e[o])||(e[o]={}),q(e[o],r)):e[o]=r;}return e}function L(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return []}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var A=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),F=false;function P(e,...n){F&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
3
- \u2014 ${t}`).join("")}`,"color: #ea654b;");}var T=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function ie(e,n){let t=[];for(let o=0;o<4;o++)for(let r=0;r<4;r++){let i=0;for(let s=0;s<4;s++)i+=e[r+4*s]*n[4*o+s];t[r+4*o]=i;}return t}function se(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return T();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=T();return [o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function z(e,n){let t=Math.PI/180*n,o=Math.cos(t),r=Math.sin(t),i=T(),[s,l,c,h]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return i[s]=i[l]=o,i[c]=r,i[h]=-r,i}function le(e,n){let t=T();return t[e==="X"?12:13]=n,t}function ae(e){let n=T();return n[0]=n[5]=e,n}function v(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let r=t.slice(0,o).trim(),i=t.slice(o+1).trim();r&&i&&e.style.setProperty(r,i);}}function ce(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),r=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],i=r.map(d=>d.trim()),s=`${i.join("; ")};`,l=r.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...i,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),h=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==h?{computed:`opacity: ${c};`,generated:`opacity: ${h};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let E=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(E[0]),$=E[1],O;if($==="em")O=parseInt(o.fontSize,10)*m;else if($==="px")O=m;else if($==="%"){let Y=n.getBoundingClientRect();O=(d==="Y"?Y.height:Y.width)*m/100;}else throw new RangeError("Unrecognized or missing distance unit.");u.push(le(d,O));}t.rotate.x&&u.push(z("x",t.rotate.x)),t.rotate.y&&u.push(z("y",t.rotate.y)),t.rotate.z&&u.push(z("z",t.rotate.z)),t.scale!==1&&u.push(ae(t.scale===0?2e-4:t.scale));let g={initial:"",final:""};if(u.length){let d=se(o.transform);g={initial:`transform: matrix3d(${u.reduce(ie,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`};}let w={delayed:"",instant:""};if(b.generated||g.initial){let d=m=>`${m/1e3}s`,f=[],E=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(E("opacity")),g.initial&&f.push(E("transform")),w={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`};}return {inline:{computed:s,generated:l},opacity:b,position:o.position,transform:g,transition:w}}var k=(...e)=>e.filter(n=>n!=="").join(" "),de=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:false,container:document.documentElement,desktop:true,mobile:true,reset:false,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),p=null,M=null,a={containers:{},elements:{},history:[],sequences:{}},W=true,j=null,R=0,D=false,ue=0,H=()=>ue++;function V(e,n=false){let t=e,o=n?t.clientHeight:t.offsetHeight,r=n?t.clientWidth:t.offsetWidth,i=0,s=0,l=t;for(;l;)isNaN(l.offsetTop)||(i+=l.offsetTop),isNaN(l.offsetLeft)||(s+=l.offsetLeft),l=l.offsetParent;return {bounds:{top:i,right:s+r,bottom:i+o,left:s},height:o,width:r}}var fe=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function me(e){let n=a.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return false;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,r=e.geometry,i={top:r.bounds.top+r.height*t,right:r.bounds.right-r.width*t,bottom:r.bounds.bottom-r.height*t,left:r.bounds.left+r.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return i.top<s.bottom&&i.right>s.left&&i.bottom>s.top&&i.left<s.right||e.styles.position==="fixed"}function Q(e,n=false){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&B(e.node);},t-o)};}function be(e,n){let t=e.styles;e.revealed=e.seen=true,v(e.node,k(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),Q(e,n);}function ge(e){let n=e.styles;e.revealed=false,v(e.node,k(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),Q(e);}function x(e,n={}){let t=n.pristine||W,o=e.config.useDelay,r=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return be(e,r);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return ge(e)}function J(e,n){let t=[],o=[],r=[];return e.members.forEach((i,s)=>{a.elements[i]?.[n]&&o.push(s);}),o.length&&e.members.forEach((i,s)=>{let l=a.elements[i];l&&!l[n]&&(s<o[0]?t:r).push(s);}),{head:t,body:o,foot:r}}function I(e,n,t,o){let r=t<0?"head":"foot",i=a.elements[e.members[n+t]];e.blocked[r]=true,setTimeout(()=>{e.blocked[r]=false,i&&Z(i,o);},e.interval);}function Z(e,n=W){if(!e.visible&&e.revealed&&e.config.reset)return x(e,{reset:true});let t=e.sequence&&a.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,r=J(t,"visible"),i=J(t,"revealed");if(!i.body.length){let l=r.body[0],c=a.elements[t.members[l]];if(c)return I(t,l,-1,n),I(t,l,1,n),x(c,{reveal:true,pristine:n})}let s=l=>l[l.length-1];if(!t.blocked.head&&o===s(i.head)&&o>=(r.body[0]??1/0))return I(t,o,-1,n),x(e,{reveal:true,pristine:n});if(!t.blocked.foot&&o===i.foot[0]&&o<=(s(r.body)??-1/0))return I(t,o,1,n),x(e,{reveal:true,pristine:n})}function pe(){R=0;let e=D;D=false;for(let t of Object.values(a.containers))(e||!t.geometry)&&(t.geometry=V(t.node,true)),t.scroll=fe(t);let n=Object.values(a.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=V(t.node)),t.visible=me(t);for(let t of n)t.sequence?Z(t):x(t);W=false;}function y(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(D=true),R||(R=requestAnimationFrame(pe));}var S=e=>e.node===document.documentElement?window:e.node;function _(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(a.elements))e.has(o.id)||delete a.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(a.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(a.containers))n.has(o.id)||(S(o).removeEventListener("scroll",y),S(o).removeEventListener("resize",y),delete a.containers[o.id]);for(let o of Object.values(a.sequences))t.has(o.id)||delete a.sequences[o.id];}function ee(){j=null,_();let e=U();for(let n of Object.values(a.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=true,v(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=true,v(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=false,v(n.node,k(t.inline.generated,t.opacity.generated,t.transform.initial)));}if(!e){for(let n of Object.values(a.containers))S(n).addEventListener("scroll",y),S(n).addEventListener("resize",y);y();}}function te(e,n={},t=false){if(!p)return;let o=[],r=n.interval||0,i,s;try{if(r){let c=Math.abs(r);if(isNaN(c))throw new RangeError("Invalid sequence interval.");i={id:H(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}};}let l=L(e);if(!l.length)throw new Error("Invalid reveal target.");s=[];for(let c of l){let h=c.getAttribute("data-sr-id"),b=h!==null?a.elements[Number(h)]:void 0,u=b?q({},b):{id:H(),node:c,seen:!1,revealed:!1,visible:!1};b&&v(c,b.styles.inline.computed);let g=q({},b?b.config:p,n);if(!g.mobile&&A()||!g.desktop&&!A()){b&&B(c);continue}let w=L(g.container)[0];if(!w)throw new Error("Invalid container.");if(!w.contains(c))continue;let d=[...o,...Object.values(a.containers)].find(f=>f.node===w)?.id;d===void 0&&(d=H(),o.push({id:d,node:w})),u.config=g,u.containerId=d,u.styles=ce(u),i&&(u.sequence={id:i.id,index:i.members.length},i.members.push(u.id)),s.push(u);}for(let c of s)a.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id));}catch(l){return P("Reveal failed.",l.message)}for(let l of o)a.containers[l.id]=l;i&&(a.sequences[i.id]=i),t||(a.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(ee,0));}function B(e){let n=false;for(let t of L(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=true;let r=a.elements[Number(o)];r&&(r.timer&&clearTimeout(r.timer.clock),v(r.node,r.styles.inline.generated),delete a.elements[r.id]),t.removeAttribute("data-sr-id");}n&&_();}function ve(){for(let e of Object.values(a.elements))v(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(a.containers))S(e).removeEventListener("scroll",y),S(e).removeEventListener("resize",y);R&&cancelAnimationFrame(R),R=0,a={containers:{},elements:{},history:[],sequences:{}};}function ye(){for(let e of a.history)te(e.target,e.options,true);ee();}var N=()=>(G()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:K,noop:true});function ne(){if(!G())return false;let e=document.documentElement.style;return ("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function he(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%";},{once:true});}function we(e={}){if(!G()||!ne())return N();let n;try{if(n=q({},p??de(),e),!L(n.container)[0])throw new Error("Invalid container.")}catch(t){return P("Invalid configuration.",t.message),N()}return p=n,!p.mobile&&A()||!p.desktop&&!A()?(P("This device is disabled.",`desktop: ${p.desktop}`,`mobile: ${p.mobile}`),N()):(he(),M||(M={reveal:(t,o)=>te(t,o),clean:B,destroy:ve,sync:ye,get defaults(){return p},version:K,noop:false},Object.defineProperty(M,"delegate",{value:y})),M)}var X=we;X.isSupported=ne;Object.defineProperty(X,"debug",{get:()=>F,set:e=>{typeof e=="boolean"&&(F=e);}});var oe=X;function Oe(e={}){let n=react.useRef(null),t=react.useRef(e);return t.current=e,react.useEffect(()=>{let o=n.current;if(!o)return;let{selector:r,...i}=t.current,s=r?Array.from(o.querySelectorAll(r)):o,l=oe();return l.reveal(s,i),()=>l.clean(s)},[]),n}exports.useScrollReveal=Oe;
2
+ 'use strict';var react=require('react');function H(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function K(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let o=n;return o.addListener?.(t),()=>o.removeListener?.(t)}var ee="4.0.9",B=()=>typeof window<"u"&&typeof document<"u",F=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(F(t))for(let o of Object.keys(t)){let i=t[o];F(i)?(F(e[o])||(e[o]={}),q(e[o],i)):e[o]=i;}return e}function A(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return []}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var $=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),D=false;function G(e,...n){D&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
3
+ \u2014 ${t}`).join("")}`,"color: #ea654b;");}var L=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function le(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r;}return t}function ce(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return L();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=L();return [o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function N(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=L(),[s,a,c,R]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[a]=o,r[c]=i,r[R]=-i,r}function de(e,n){let t=L();return t[e==="X"?12:13]=n,t}function ue(e){let n=L();return n[0]=n[5]=e,n}function w(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r);}}function fe(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,a=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),R=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==R?{computed:`opacity: ${c};`,generated:`opacity: ${R};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let x=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(x[0]),z=x[1],T;if(z==="em")T=parseInt(o.fontSize,10)*m;else if(z==="px")T=m;else if(z==="%"){let J=n.getBoundingClientRect();T=(d==="Y"?J.height:J.width)*m/100;}else throw new RangeError("Unrecognized or missing distance unit.");u.push(de(d,T));}t.rotate.x&&u.push(N("x",t.rotate.x)),t.rotate.y&&u.push(N("y",t.rotate.y)),t.rotate.z&&u.push(N("z",t.rotate.z)),t.scale!==1&&u.push(ue(t.scale===0?2e-4:t.scale));let p={initial:"",final:""};if(u.length){let d=ce(o.transform);p={initial:`transform: matrix3d(${u.reduce(le,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`};}let E={delayed:"",instant:""};if(b.generated||p.initial){let d=m=>`${m/1e3}s`,f=[],x=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(x("opacity")),p.initial&&f.push(x("transform")),E={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`};}return {inline:{computed:s,generated:a},opacity:b,position:o.position,transform:p,transition:E}}var k=(...e)=>e.filter(n=>n!=="").join(" "),me=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:false,container:document.documentElement,desktop:true,mobile:true,reset:false,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),g=null,O=null,l={containers:{},elements:{},history:[],sequences:{}},X=true,j=null,y=0,C=false,S=null,W=false,be=0,P=()=>be++;function Z(e,n=false){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,a=t;for(;a;)isNaN(a.offsetTop)||(r+=a.offsetTop),isNaN(a.offsetLeft)||(s+=a.offsetLeft),a=a.offsetParent;return {bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var ve=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function pe(e){let n=l.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return false;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function te(e,n=false){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&U(e.node);},t-o)};}function ge(e,n){let t=e.styles;e.revealed=e.seen=true,w(e.node,k(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),te(e,n);}function ye(e){let n=e.styles;e.revealed=false,w(e.node,k(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),te(e);}function M(e,n={}){let t=n.pristine||X,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return ge(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return ye(e)}function _(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{l.elements[r]?.[n]&&o.push(s);}),o.length&&e.members.forEach((r,s)=>{let a=l.elements[r];a&&!a[n]&&(s<o[0]?t:i).push(s);}),{head:t,body:o,foot:i}}function I(e,n,t,o){let i=t<0?"head":"foot",r=l.elements[e.members[n+t]];e.blocked[i]=true,setTimeout(()=>{e.blocked[i]=false,r&&ne(r,o);},e.interval);}function ne(e,n=X){if(!e.visible&&e.revealed&&e.config.reset)return M(e,{reset:true});let t=e.sequence&&l.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=_(t,"visible"),r=_(t,"revealed");if(!r.body.length){let a=i.body[0],c=l.elements[t.members[a]];if(c)return I(t,a,-1,n),I(t,a,1,n),M(c,{reveal:true,pristine:n})}let s=a=>a[a.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return I(t,o,-1,n),M(e,{reveal:true,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return I(t,o,1,n),M(e,{reveal:true,pristine:n})}function he(){y=0;let e=W;W=false;for(let t of Object.values(l.containers))(e||!t.geometry)&&(t.geometry=Z(t.node,true)),t.scroll=ve(t);let n=Object.values(l.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=Z(t.node)),t.visible=pe(t);for(let t of n)t.sequence?ne(t):M(t);X=false;}function v(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(W=true),y||(y=requestAnimationFrame(he));}var h=e=>e.node===document.documentElement?window:e.node;function oe(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(l.elements))e.has(o.id)||delete l.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(l.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(l.containers))n.has(o.id)||(h(o).removeEventListener("scroll",v),h(o).removeEventListener("resize",v),delete l.containers[o.id]);for(let o of Object.values(l.sequences))t.has(o.id)||delete l.sequences[o.id];}function Y(){j=null,oe();let e=C||H();for(let n of Object.values(l.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=true,w(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=true,w(n.node,k(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=false,w(n.node,k(t.inline.generated,t.opacity.generated,t.transform.initial)));}if(e){for(let n of Object.values(l.containers))h(n).removeEventListener("scroll",v),h(n).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0;return}for(let n of Object.values(l.containers))h(n).addEventListener("scroll",v),h(n).addEventListener("resize",v);v();}function ie(e,n={},t=false){if(!g)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:P(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}};}let a=A(e);if(!a.length)throw new Error("Invalid reveal target.");s=[];for(let c of a){let R=c.getAttribute("data-sr-id"),b=R!==null?l.elements[Number(R)]:void 0,u=b?q({},b):{id:P(),node:c,seen:!1,revealed:!1,visible:!1};b&&w(c,b.styles.inline.computed);let p=q({},b?b.config:g,n);if(!p.mobile&&$()||!p.desktop&&!$()){b&&U(c);continue}let E=A(p.container)[0];if(!E)throw new Error("Invalid container.");if(!E.contains(c))continue;let d=[...o,...Object.values(l.containers)].find(f=>f.node===E)?.id;d===void 0&&(d=P(),o.push({id:d,node:E})),u.config=p,u.containerId=d,u.styles=fe(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u);}for(let c of s)l.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id));}catch(a){return G("Reveal failed.",a.message)}for(let a of o)l.containers[a.id]=a;r&&(l.sequences[r.id]=r),t||(l.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(Y,0));}function U(e){let n=false;for(let t of A(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=true;let i=l.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),w(i.node,i.styles.inline.generated),delete l.elements[i.id]),t.removeAttribute("data-sr-id");}n&&oe();}function we(){for(let e of Object.values(l.elements))w(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(l.containers))h(e).removeEventListener("scroll",v),h(e).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0,l={containers:{},elements:{},history:[],sequences:{}},S?.(),S=null,C=false;}function Re(){for(let e of l.history)ie(e.target,e.options,true);Y();}var Q=()=>(B()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:ee,noop:true});function re(){if(!B())return false;let e=document.documentElement.style;return ("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function Ee(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%";},{once:true});}function Se(e={}){if(!B()||!re())return Q();let n;try{if(n=q({},g??me(),e),!A(n.container)[0])throw new Error("Invalid container.")}catch(t){return G("Invalid configuration.",t.message),Q()}return g=n,!g.mobile&&$()||!g.desktop&&!$()?(G("This device is disabled.",`desktop: ${g.desktop}`,`mobile: ${g.mobile}`),Q()):(Ee(),!S&&!C&&!H()&&(S=K(t=>{t&&(S?.(),S=null,C=true,Y());})),O||(O={reveal:(t,o)=>ie(t,o),clean:U,destroy:we,sync:Re,get defaults(){return g},version:ee,noop:false},Object.defineProperty(O,"delegate",{value:v})),O)}var V=Se;V.isSupported=re;Object.defineProperty(V,"debug",{get:()=>D,set:e=>{typeof e=="boolean"&&(D=e);}});var se=V;function qe(e={}){let n=react.useRef(null),t=react.useRef(e);return t.current=e,react.useEffect(()=>{let o=n.current;if(!o)return;let{selector:i,...r}=t.current,s=i?Array.from(o.querySelectorAll(i)):o,a=se();return a.reveal(s,r),()=>a.clean(s)},[]),n}exports.useScrollReveal=qe;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b}from'../../chunk-OMI46IXL.mjs';import'../../chunk-AJ22VSHC.mjs';import {useRef,useEffect}from'react';function m(t={}){let r=useRef(null),l=useRef(t);return l.current=t,useEffect(()=>{let e=r.current;if(!e)return;let{selector:n,...f}=l.current,o=n?Array.from(e.querySelectorAll(n)):e,c=b();return c.reveal(o,f),()=>c.clean(o)},[]),r}export{m as useScrollReveal};
2
+ import {b}from'../../chunk-DWK6XXY6.mjs';import'../../chunk-AJ22VSHC.mjs';import'../../chunk-5PJEKEEP.mjs';import {useRef,useEffect}from'react';function m(t={}){let r=useRef(null),l=useRef(t);return l.current=t,useEffect(()=>{let e=r.current;if(!e)return;let{selector:n,...f}=l.current,o=n?Array.from(e.querySelectorAll(n)):e,c=b();return c.reveal(o,f),()=>c.clean(o)},[]),r}export{m as useScrollReveal};
@@ -1 +1 @@
1
- import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var O={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function G(s){return typeof s=="string"?Array.from(document.querySelectorAll(s)):s instanceof NodeList?Array.from(s):s}function Q(s,q={}){if(typeof window>"u")return O;let r=G(s);if(!r.length)return b("scrollSnap: no sections found"),O;let{direction:z="vertical",duration:B=600,easing:m="ease-in-out",threshold:b$2=.3,scrollContainer:d$1,onSnap:p,respectReducedMotion:y=true}=q,E=y&&a(),P=y?a$1(e=>{E=e;}):()=>{},X=typeof m=="function"?m:d[m]??d["ease-in-out"],i=z==="horizontal",o=typeof d$1=="string"?document.querySelector(d$1):d$1??null,n=0,l=false,f=0;function L(){return o?i?o.scrollLeft:o.scrollTop:i?window.scrollX:window.scrollY}function M(e){o?i?o.scrollLeft=e:o.scrollTop=e:window.scrollTo(i?{left:e}:{top:e});}function g(){return r.map(e=>{let t=e.getBoundingClientRect();if(o){let c=o.getBoundingClientRect();return i?t.left-c.left+o.scrollLeft:t.top-c.top+o.scrollTop}return i?t.left+window.scrollX:t.top+window.scrollY})}function u(e){let t=a$3(e,0,r.length-1);l&&(cancelAnimationFrame(f),l=false),l=true;let c=g(),a=L(),T=c[t];if(Math.abs(a-T)<1){l=false,n=t,p?.(t);return}if(E){M(T),l=false,n=t,p?.(t);return}let Y=performance.now();function I(_){let A=a$3((_-Y)/B,0,1);M(a+(T-a)*X(A)),A<1?f=requestAnimationFrame(I):(l=false,n=t,p?.(t));}f=requestAnimationFrame(I);}let S;function v(){l||(clearTimeout(S),S=setTimeout(()=>{let e=L(),t=g();if(Math.abs(e-t[n])<1)return;let c=i?r[n].offsetWidth:r[n].offsetHeight,a=e-t[n];a>c*b$2&&n<r.length-1?u(n+1):a<-(c*b$2)&&n>0?u(n-1):u(n);},100));}let x=o??window;return x.addEventListener("scroll",v,{passive:true}),a$2(r[0],{type:"snap",getProgress:()=>n/(r.length-1||1),getTrigger:()=>{let e=g();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(f),clearTimeout(S),x.removeEventListener("scroll",v),P(),b$1(r[0]);},snapTo:u,getCurrentIndex(){return n}}}export{Q as scrollSnap};
1
+ import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var O={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function G(s){return typeof s=="string"?Array.from(document.querySelectorAll(s)):s instanceof NodeList?Array.from(s):s}function Q(s,q={}){if(typeof window>"u")return O;let r=G(s);if(!r.length)return b("scrollSnap: no sections found"),O;let{direction:z="vertical",duration:B=600,easing:m="ease-in-out",threshold:b$2=.3,scrollContainer:d$1,onSnap:p,respectReducedMotion:y=true}=q,E=y&&a(),P=y?a$1(e=>{E=e;}):()=>{},X=typeof m=="function"?m:d[m]??d["ease-in-out"],i=z==="horizontal",o=typeof d$1=="string"?document.querySelector(d$1):d$1??null,n=0,l=false,f=0;function L(){return o?i?o.scrollLeft:o.scrollTop:i?window.scrollX:window.scrollY}function M(e){o?i?o.scrollLeft=e:o.scrollTop=e:window.scrollTo(i?{left:e}:{top:e});}function g(){return r.map(e=>{let t=e.getBoundingClientRect();if(o){let c=o.getBoundingClientRect();return i?t.left-c.left+o.scrollLeft:t.top-c.top+o.scrollTop}return i?t.left+window.scrollX:t.top+window.scrollY})}function u(e){let t=a$3(e,0,r.length-1);l&&(cancelAnimationFrame(f),l=false),l=true;let c=g(),a=L(),T=c[t];if(Math.abs(a-T)<1){l=false,n=t,p?.(t);return}if(E){M(T),l=false,n=t,p?.(t);return}let Y=performance.now();function I(_){let A=a$3((_-Y)/B,0,1);M(a+(T-a)*X(A)),A<1?f=requestAnimationFrame(I):(l=false,n=t,p?.(t));}f=requestAnimationFrame(I);}let S;function v(){l||(clearTimeout(S),S=setTimeout(()=>{let e=L(),t=g();if(Math.abs(e-t[n])<1)return;let c=i?r[n].offsetWidth:r[n].offsetHeight,a=e-t[n];a>c*b$2&&n<r.length-1?u(n+1):a<-(c*b$2)&&n>0?u(n-1):u(n);},100));}let x=o??window;return x.addEventListener("scroll",v,{passive:true}),a$2(r[0],{type:"snap",getProgress:()=>n/(r.length-1||1),getTrigger:()=>{let e=g();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(f),clearTimeout(S),x.removeEventListener("scroll",v),P(),b$1(r[0]);},snapTo:u,getCurrentIndex(){return n}}}export{Q as scrollSnap};
@@ -1,3 +1,3 @@
1
- 'use strict';var solidJs=require('solid-js');function sr({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 ir({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:sr(),elastic:ir()};function Pt(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 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 ee(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 we(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Dt=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let n=[];for(let r=0;r<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 ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(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 mr(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=mr(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 fr=0;function pr(){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 dr(e){if(!Ke)return;let n=Vt(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&&!zt.has(r)&&!zt.has(Vt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function 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 _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(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){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 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:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:te=false,debug:Pe=false,axis:G="y",scrollContainer:ce,autoReverse:re=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:ne=0,morphTo:L,clip:oe,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=oe===true?"left":typeof oe=="string"?oe:false,V=typeof d=="function"?d:le[d]??le.linear,ue=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ce=="string"?document.querySelector(ce):ce??null,Ae=Array.isArray(H)?H[0]:null,me=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,se=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ie=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=[],fe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,pe=false,he=-1,Ve=[],ae=-1,j=false,Te=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 Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function xt(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,xt(),ue,He)}function Jt(){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 At(){(({tStart:J,tEnd:Se}=Mt())),Jt(),Pe&&Ke&&(Et(),lt=gr(J,Se,G));}function ct(o,l=Mt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function er(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&&me?y.style.stroke=Ue(Ae,me,o):me&&(y.style.stroke=me),X!==null&&se!==null?y.style.strokeWidth=`${X+(se-X)*o}`:se!==null&&(y.style.strokeWidth=`${se}`),ie!==null&&K!==null?y.style.fillOpacity=`${ie+(K-ie)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&fe[Q]&&y.setAttribute("d",dt(fe[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}`),ie!==null&&(o.style.fillOpacity=`${ie}`),L&&o.tagName.toLowerCase()==="path"&&fe[l]&&o.setAttribute("d",fe[l]);});}if(z.forEach(o=>{dr(o);let l=je(o);F.push(l);let y=o.tagName.toLowerCase()==="path";y?fe.push(o.getAttribute("d")??""):fe.push(""),L&&(y?yr(fe[fe.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"),me&&(o.style.stroke=me),se!==null&&(o.style.strokeWidth=`${se}`),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}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),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 Lt=typeof d=="string"?st(d):null;function tr(){return !(ye===false||!pr()||!z.length||!Lt||v||G!=="y"||Ee||u!==1||R!==0||te||re||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 rr(){let o=++fr,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:${Lt};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},Ye(),xt(),ue,He);return V(ee(Ye(),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(tr())return ct(rr());function nr(){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&&me?U.style.stroke=Ue(Ae,me,xe):me&&(U.style.stroke=me),X!==null&&se!==null?U.style.strokeWidth=`${X+(se-X)*xe}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&K!==null?U.style.fillOpacity=`${ie+(K-ie)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&fe[g]&&U.setAttribute("d",dt(fe[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);},ne));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&&!(te&&_)?ke():!W.isIntersecting&&!te&&!_&&(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(nr());At();function $t(){if(j||!Ge)return;let o=performance.now(),l=Ye();if(!qe&&k===false&&l===St){mt(l);return}qe=false,St=l;let y=u;if(k!==false){let S=o-Tt,D=S>0?Math.abs(l-(Je<0?l:Je))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Je=l,Tt=o;let Q=re?ae===-1||l>=ae?"forward":"reverse":A;ae=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(ee(l,J,Se,y));te&&!re&&(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&&ee(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);},ne))):S<1&&!te&&(_=false),mt(l);return}if(z.forEach((S,D)=>{let de=D*c*Le,b=V(ee(l,J+de,Se+de,y));te&&!re&&(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&&me?S.style.stroke=Ue(Ae,me,b):me&&(S.style.stroke=me),X!==null&&se!==null?S.style.strokeWidth=`${X+(se-X)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&K!==null?S.style.fillOpacity=`${ie+(K-ie)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&fe[D]&&S.setAttribute("d",dt(fe[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(ee(l,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!We.has(de)&&(We.add(de),w[D]?.());}}!B&&ee(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;},ne))):!Fe&&!te&&(_=false),mt(l);}function ut(o){return o>=Se&&o<h}function mt(o){pe||ut(o)?$=requestAnimationFrame($t):Ge=false;}function ft(){return pe||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){$t();}));}function rt(){Ge=false,cancelAnimationFrame($);}let pt=new IntersectionObserver(o=>{o.forEach(l=>{pe=l.isIntersecting,pe&&!j?(qe=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function Ct(){z.forEach((o,l)=>{F[l]=je(o),o.style.strokeDasharray=`${F[l]}`;}),At(),qe=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Ct,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let or=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(_e),rt(),pt.disconnect(),or(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),Et();},replay(){he=-1,Ve=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Te=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));Te=l,he=l,Ve=[],j=true,rt(),er(l,A),qe=true;},getProgress(){return Te},refresh(){clearTimeout(nt),Ct(),ft()&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var qt=new WeakMap,hr=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=++hr),`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 br(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 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 wr(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((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 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(br(t))return Ue(t,i,r);if(t.includes("("))return wr(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 vr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Er=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Sr=0,Yt="--scroll-draw-progress";function Tr(){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:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:te,onProgress:Pe,onComplete:G,onEnter:ce,onLeave:re,onEnterBack:Y,onLeaveBack:H}=n,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:le[s]??le["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=te??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:vr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function ne(){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 oe=new Map;for(let c of [...E.map(h=>h.prop),Yt])oe.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of oe)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};ne();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Tr()||!ge||m!=="y"||M||x!==e||u||a!==1||Pe||G||ce||re||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(!Er.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Sr}`,h=E.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=E.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:${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,pe=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let ae=e.getBoundingClientRect();return Ce({top:ae.top,height:ae.height},$(),pe(),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(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,Ut(Te.from,Te.to,j));},getProgress(){let{tStart:ae,tEnd:j}=he();return O(ee($(),ae,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,ue=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],se=false;function ie(){let c=e.style,h=X.map(pe=>c.getPropertyValue(pe.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(pe=>c.setProperty(pe.prop,oe.get(pe.prop)??""));let B=ot(x,M,m);X.forEach((pe,he)=>c.setProperty(pe.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,me(),w,k);se&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(se=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Yt,String(c));for(let h of E)e.style.setProperty(h.prop,Ut(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(ue)){ue=c;return}ue<=0&&c>0?ce?.():ue>0&&c<=0&&H?.(),ue<1&&c>=1?re?.():ue>=1&&c<1&&Y?.(),ue=c;}function z(){if(!I||q)return;let c=performance.now(),h=Ae(),_=a;if(R!==false){let pe=c-Ee,he=pe>0?Math.abs(h-(He<0?h:He))/pe: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(ee(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ie(),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(ee(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}),fe;function J(){clearTimeout(fe),fe=setTimeout(ie,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(fe),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(){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 we("scrollCounter: element not found:",e),ht;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))),te=typeof u=="function"?u:le[u]??le["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?.(),ht;let re=0,Y=0,H=false,P=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,ne=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),ne(),Pe,G);H&&Math.abs(p.tStart-re)<1&&Math.abs(p.tEnd-Y)<1||(H=true,re=p.tStart,Y=p.tEnd);}function oe(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=te(ee(E(),re,Y,1));d&&(k=Math.max(k,f),f=k),x=f,oe(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=te(ee(E(),re,Y,1));d&&f>0&&(k=f),x=f,oe(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:re,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,oe(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),oe(p);},getProgress(){return x}}}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 we("scrollVideo: <video> element not found:",e),Xt;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,te=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:le[s]??le.linear,ce=be(i.start??"top top"),re=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,ne=false,L=false,oe=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=te.getBoundingClientRect(),V=u==="x"?v.left:v.top,ue=u==="x"?v.width:v.height,He=Ce({top:V,height:ue},oe(),ve(),ce,re);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,ue=Y+(V-Y)*v;ue!==ye&&(ye=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(ee(oe(),P,O,1));a&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!ne?(ne=true,R?.()):v<1&&!a&&(ne=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([te],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,ne=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 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 xr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Kt(e){let n=Zt(e),r=new Map;for(let 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 Mr(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 Ar(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,n={}){if(typeof window>"u")return Qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Qt;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:le[a]??le["ease-out"],te=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ce;i==="chars"?ce=xr(t):i==="lines"?ce=Kt(t):ce=Zt(t);let re=ce.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Ar(I,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ce.forEach((I,q)=>{let Me=A(Mr(p,q,re,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,ne=false,L=()=>window.scrollY,oe=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Ce({top:p.top,height:p.height},L(),oe(),te,Pe);P=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=ee(L(),P,O,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!ne?(ne=true,T?.()):p<1&&!d&&(ne=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??""),ce=Kt(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,ne=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=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 Rn(e={}){return Re(e,gt).ref}function Hn(e={}){return Re(e,gt)}function Nn(e){return Re(e,yt).ref}function Vn(e){return Re(e,yt)}function zn(e){return Re(e,bt).ref}function _n(e){return Re(e,bt)}function Wn(e={}){return Re(e,wt).ref}function qn(e={}){return Re(e,wt)}function Bn(e={}){return Re(e,vt).ref}function Gn(e={}){return Re(e,vt)}exports.createScrollAnimate=Vn;exports.createScrollCounter=_n;exports.createScrollDraw=Hn;exports.createScrollText=Gn;exports.createScrollVideo=qn;exports.useScrollAnimate=Nn;exports.useScrollCounter=zn;exports.useScrollDraw=Rn;exports.useScrollText=Bn;exports.useScrollVideo=Wn;
1
+ 'use strict';var solidJs=require('solid-js');function mn({bounces:e=3,decay:r=.5}={}){let t=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(n),i=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(s,d);a.push(x),i+=x;}let m=[0],f=0;for(let d=0;d<t;d++)f+=a[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let R=(d-m[x])/(m[x+1]-m[x]);if(x===0)return R*(2-R);let C=1-Math.pow(n,x);return C+(1-C)*(2*R-1)*(2*R-1)}return 1}}function fn({amplitude:e=1,period:r=.4}={}){let t=Math.max(1,e),n=Math.max(.1,r),s=t<=1?n/4:n/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)+1}var oe={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:mn(),elastic:fn()};function Ot(e,r,t){return Math.min(t,Math.max(r,e))}function ye(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[t="top",n="bottom"]=r.split(/\s+/).filter(Boolean);return {element:t,viewport:n}}function It(e,r,t,n){switch(n){case "top":return e+t;case "center":return e+t+r/2;case "bottom":return e+t+r;default:return e+t}}function Dt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function ee(e,r,t,n){return t===r?0:Ot((e-r)/(t-r)*n,0,1)}function Le(e,r,t,n,s){let i=It(e.top,e.height,r,n.element)-Dt(n.viewport,t),a=It(e.top,e.height,r,s.element)-Dt(s.viewport,t);return {tStart:i,tEnd:a}}function st(e,r,t){let n=e.getBoundingClientRect(),s=t==="x"?n.width:n.height;return r?{top:t==="x"?n.left-r.getBoundingClientRect().left+r.scrollLeft:n.top-r.getBoundingClientRect().top+r.scrollTop,height:s,scroll:0}:{top:t==="x"?n.left:n.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function Qe(e){let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(t+n)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ft(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ue(e,r,t){let n=Ft(e),s=Ft(r);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*t)},${Math.round(n[1]+(s[1]-n[1])*t)},${Math.round(n[2]+(s[2]-n[2])*t)})`}var 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 he(e,...r){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var pn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",dn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ht=33;function gn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function yn(e){let r=[];for(let t=0;t<Ht;t++){let n=t/(Ht-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return pn;case "ease-out":return dn;case "ease-in-out":return gn()?yn(oe["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function Vt(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Pe(e,r){Vt().set(e,r);}function ke(e){Vt().delete(e);}var Ze,at=new Set,lt=new WeakMap,Je=new Map,zt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function hn(e){let r=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling)r.add(n);return r}function Fe(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>r();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==zt(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(t);let n=hn(e);return [document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{lt.has(s)||lt.set(s,zt(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{at.delete(t)&&(n.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),at.size||(Ze?.disconnect(),Ze=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",t),()=>r.removeEventListener("change",t);let n=r;return n.addListener?.(t),()=>n.removeListener?.(t)}function Be(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let t=r(e,false),n=ct(i=>{if(!i)return;n();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=r(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...a)=>t[i]?.(...a);return s.destroy=()=>{n(),t.destroy();},s}var bn=0;function wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function _t(e,r){let t="";try{t=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return t||(e.getAttribute(r)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function vn(e){if(!Ke)return;let r=_t(e,"stroke");if(!r||r==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Wt.has(t)&&!Wt.has(_t(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function En(e,r,t){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=t==="x"?window.scrollX:window.scrollY,a=e-i,m=r-i,f=t==="x";n.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(n),window.addEventListener("scroll",s,{passive:true}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove();}}}var qt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Bt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sn(e,r,t){if(!Ke)return;let n=(e.match(Bt)??[]).join("").toUpperCase(),s=(r.match(Bt)??[]).join("").toUpperCase(),i=(e.match(qt)??[]).length,a=(r.match(qt)??[]).length;if(n!==s){he(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}i!==a&&he(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function yt(e,r,t){let n=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=n[s++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function ht(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Be(r,(t,n)=>Tn(e,t,n))}function Tn(e,r,t){let{preset:n,...s}=r,i=n?{...Rt[n],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:x={},stagger:R=0,direction:C="forward",once:Q=false,debug:me=false,axis:I="y",scrollContainer:se,autoReverse:be=false,delay:D=0,strokeColor:H,strokeWidth:k,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Ee=false,duration:ie=1e3,native:z=true,onProgress:u,onStart:A,onComplete:h,onEnter:O,onLeave:te,onEnterBack:pe,onLeaveBack:Se}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,E=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(H)?H[0]:null,ne=Array.isArray(H)?H[1]:typeof H=="string"?H:null,re=Array.isArray(k)?k[0]:null,Y=Array.isArray(k)?k[1]:typeof k=="number"?k:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let c=o*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),P=[],we=[],l=0,p=0,$e=R,Te=0,$=false,V=false,G=0,Ve=false,q=-1,He=[],ze=-1,ce=false,Ie=0,Ne=0,_e,ut=null;function Tt(){ut?.destroy(),ut=null;}let We=new Set,xt=NaN,qe=true,et=-1,Mt=performance.now(),Ge=NaN;function Ye(){return ae?I==="x"?ae.scrollLeft:ae.scrollTop:I==="x"?window.scrollX:window.scrollY}function Lt(){return ae?I==="x"?ae.clientWidth:ae.clientHeight:I==="x"?window.innerWidth:window.innerHeight}function At(){let o=st(e,ae,I);return Le(o,o.scroll,Lt(),de,Ae)}function on(){let o=p-l,c=_.length-1,y=ae??document.documentElement,X=I==="x"?"Width":"Height";if($e=R,R>0&&c>0&&o>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-o/m;xe>=0&&($e=Math.min(R,xe/(c*o)));}Te=p+c*$e*o;}function $t(){(({tStart:l,tEnd:p}=At())),on(),me&&Ke&&(Tt(),ut=En(l,p,I));}function mt(o,c=At){Pe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),ke(e);},o}function sn(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),Z){let y=c==="reverse"?1-o:o;e.style.clipPath=Oe(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${P[X]*o}`:`${P[X]*(1-o)}`,f&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),le&&ne?y.style.stroke=Ue(le,ne,o):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*o}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",yt(we[X],L,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=Oe(0);return}_.forEach((o,c)=>{o.style.strokeDasharray=`${P[c]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${P[c]}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`),L&&o.tagName.toLowerCase()==="path"&&we[c]&&o.setAttribute("d",we[c]);});}if(_.forEach(o=>{vn(o);let c=Qe(o);P.push(c);let y=o.tagName.toLowerCase()==="path";y?we.push(o.getAttribute("d")??""):we.push(""),L&&(y?Sn(we[we.length-1],L,o):he(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?`${c}`:"0",f&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Y!==null&&(o.style.strokeWidth=`${Y}`),J!==null&&(o.style.fillOpacity=`${J}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=C==="reverse"?"0":`${c}`,f?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),Z){if(t)return e.style.clipPath=Oe(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(t)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Ct=typeof d=="string"?it(d):null;function an(){return !(z===false||!wn()||!_.length||!Ct||Z||I!=="y"||ae||m!==1||R!==0||Q||be||v!==false||L||w||N||D>0||u||A||h||O||te||pe||Se||H!=null||k!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function ln(){let o=++bn,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,X=`--svg-scroll-draw-${o}`,xe=C==="reverse"?"0":"var(--ssd-len)",De=C==="reverse"?"var(--ssd-len)":"0",Ce=`stroke-dashoffset:${xe};`,S=`stroke-dashoffset:${De};`;f&&(Ce+=`opacity:${C==="reverse"?1:0};`,S+=`opacity:${C==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${c}{from{${Ce}}to{${S}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Ye(),Lt(),de,Ae);return E(ee(Ye(),K,Me,m))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),F.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=C==="reverse"?`${P[ve]*K}`:`${P[ve]*(1-K)}`,f&&(Me.style.opacity=C==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{P[K]=Qe(g),g.style.setProperty("--ssd-len",String(P[K])),g.style.strokeDasharray=`${P[K]}`;});}}}if(an())return mt(ln());function cn(){let o=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/o)),g=E(j);Ie=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Oe(C==="reverse"?1-g:g),u?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*R*o,Me=Math.min(1,Math.max(0,(b-K)/o)),ve=E(Me);j.style.strokeDashoffset=C==="reverse"?`${P[g]*ve}`:`${P[g]*(1-ve)}`,f&&(j.style.opacity=C==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Ue(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",yt(we[g],L,ve)),g===0&&(Ie=ve,u?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/o)),g=E(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!We.has(Me)&&(We.add(Me),w[K]?.());}}return W}function De(b){if(ce)return;let W=b-c;V||(V=true,A?.());let j=xe(W);if(j&&!$){$=true,xe(o*(1+Math.max(0,_.length-1)*R)),h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{c=performance.now(),V=false,$=false,We.clear(),tt(),G=requestAnimationFrame(De);},B));return}j||(G=requestAnimationFrame(De));}function Ce(){cancelAnimationFrame(G),clearTimeout(_e),c=performance.now(),y=0,ce=false,V=false,$=false,Ne=0,X=true,Ie=0,We.clear(),tt(),G=requestAnimationFrame(De);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&$)?Ce():!W.isIntersecting&&!Q&&!$&&(cancelAnimationFrame(G),clearTimeout(_e),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),F;function ue(){clearTimeout(F),F=setTimeout(()=>{_.forEach((b,W)=>{P[W]=Qe(b),b.style.strokeDasharray=`${P[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),D>0?setTimeout(()=>S.observe(e),D):S.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(F);},replay(){Ne=0,Ce();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(De));},seek(b){let W=Math.min(1,Math.max(0,b));Ie=W,ce=true,y=W*o,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Ie},refresh(){clearTimeout(F),_.forEach((b,W)=>{P[W]=Qe(b),b.style.strokeDasharray=`${P[W]}`;});}}}if(Ee)return mt(cn());$t();function Pt(){if(ce||!je)return;let o=performance.now(),c=Ye();if(!qe&&v===false&&c===xt){pt(c);return}qe=false,xt=c;let y=m;if(v!==false){let S=o-Mt,F=S>0?Math.abs(c-(et<0?c:et))/S:0;y=m*Math.max(.2,1+F*(typeof v=="number"?v:1)*.04);}et=c,Mt=o;let X=be?ze===-1||c>=ze?"forward":"reverse":C;ze=c;let xe=p-l,De=true,Ce=xe===0?0:(c-l)/xe;if(isNaN(Ge)||(Ge<=0&&Ce>0?O?.():Ge>0&&Ce<=0&&Se?.(),Ge<1&&Ce>=1?te?.():Ge>=1&&Ce<1&&pe?.()),Ge=Ce,Z){let S=E(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,S),S=q),Ie=S,e.style.setProperty("--scroll-draw-progress",String(S));let F=X==="reverse"?1-S:S;e.style.clipPath=Oe(F),u?.(S),!V&&ee(c,l,p,y)>0&&(V=true,A?.()),S>=1&&!$?($=true,h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{q=-1,V=false,$=false,e.style.clipPath=Oe(0);},B))):S<1&&!Q&&($=false),pt(c);return}if(_.forEach((S,F)=>{let ue=F*$e*xe,b=E(ee(c,l+ue,p+ue,y));Q&&!be&&(b=He[F]=Math.max(He[F]??q,b)),S.style.strokeDashoffset=X==="reverse"?`${P[F]*b}`:`${P[F]*(1-b)}`,f&&(S.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?S.style.stroke=Ue(le,ne,b):ne&&(S.style.stroke=ne),re!==null&&Y!==null?S.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(S.style.strokeWidth=`${Y}`),ge!==null&&J!==null?S.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(S.style.fillOpacity=`${J}`),L&&S.tagName.toLowerCase()==="path"&&we[F]&&S.setAttribute("d",yt(we[F],L,b)),F===0&&(Ie=b,u?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),w){let S=E(ee(c,l,p,y));for(let F in w){let ue=parseFloat(F);S>=ue&&!We.has(ue)&&(We.add(ue),w[F]?.());}}!V&&ee(c,l,p,y)>0&&(V=true,A?.()),De&&!$?($=true,h?.(),Ne<(N==="infinite"?1/0:N??0)&&(Ne++,_e=setTimeout(()=>{q=-1,He=[],V=false,$=false,We.clear(),tt(),qe=true;},B))):!De&&!Q&&($=false),pt(c);}function ft(o){return o>=p&&o<Te}function pt(o){Ve||ft(o)?G=requestAnimationFrame(Pt):je=false;}function dt(){return Ve||ft(Ye())}let je=false;function nt(){je||(je=true,G=requestAnimationFrame(function(){Pt();}));}function rt(){je=false,cancelAnimationFrame(G);}let gt=new IntersectionObserver(o=>{o.forEach(c=>{Ve=c.isIntersecting,Ve&&!ce?(qe=true,nt()):je&&!ce&&ft(Ye())||rt();});},{root:ae??null,threshold:T,rootMargin:U});function kt(){_.forEach((o,c)=>{P[c]=Qe(o),o.style.strokeDasharray=`${P[c]}`;}),$t(),qe=true;}let ot;function Xe(){clearTimeout(ot),ot=setTimeout(kt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let un=Fe([e],Xe);return D>0?setTimeout(()=>gt.observe(e),D):gt.observe(e),mt({destroy(){cancelAnimationFrame(G),clearTimeout(_e),rt(),gt.disconnect(),un(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(ot),Tt();},replay(){q=-1,He=[],ze=-1,et=-1,V=false,$=false,Ne=0,ce=false,Ie=0,We.clear(),clearTimeout(_e),tt(),qe=true,dt()&&nt();},pause(){ce=true,rt();},resume(){ce&&(ce=false,qe=true,dt()&&nt());},seek(o){let c=Math.min(1,Math.max(0,o));Ie=c,q=c,He=[],ce=true,rt(),sn(c,C),qe=true;},getProgress(){return Ie},refresh(){clearTimeout(ot),kt(),dt()&&!ce&&nt();}},()=>({tStart:l,tEnd:p}))}var Gt=new WeakMap,xn=0;function jt(e){return JSON.stringify(e,(r,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let n=Gt.get(t);return n===void 0&&Gt.set(t,n=++xn),`el#${n}`}return t})}function Qt(e,r){let t={...e};for(let n of Object.keys(t))typeof t[n]=="function"&&(t[n]=(...s)=>r()[n]?.(...s));return t}function Mn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ut(e){let r=[],t=/([\w]+)\(([^)]*)\)/g,n;for(;(n=t.exec(e))!==null;){let s=[],i=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}r.push({fn:n[1],nums:s,units:i});}return r}function Ln(e,r,t){let n=Ut(e),s=Ut(r);return n.length===0||n.length!==s.length?t<1?e:r:n.map((i,a)=>{let m=s[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function Yt(e,r,t){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*t);let n=String(e),s=String(r);if(Mn(n))return Ue(n,s,t);if(n.includes("("))return Ln(n,s,t);let i=n.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),f=parseFloat(a[1]);return `${m+(f-m)*t}${i[2]||a[2]}`}return t<1?n:s}function An(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var $n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Cn=0,Xt="--scroll-draw-progress";function Pn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,r){return typeof window>"u"?Zt:r.respectReducedMotion===false?Kt(e,r,false):Be(r,(t,n)=>Kt(e,t,n))}function Kt(e,r,t){let{props:n,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:R=false,triggerElement:C,onProgress:Q,onComplete:me,onEnter:I,onLeave:se,onEnterBack:be,onLeaveBack:D}=r,H=typeof i=="function"?i:oe[i]??oe["ease-out"],k=ye(s.start??"top bottom"),M=ye(s.end??"bottom top"),w=C??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(n).map(([l,p])=>({prop:An(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),Xt])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return N(),me?.(),{...Zt,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?it(i):null;function Ee(){if(!x||!Pn()||!fe||f!=="y"||v||w!==e||m||a!==1||Q||me||I||se||be||D||R!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!$n.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++Cn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),$e=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${$e}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let $=()=>f==="x"?window.scrollX:window.scrollY,V=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},$(),V(),k,M)};Pe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:G});let Ve={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let He=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let ze of T)e.style.setProperty(ze.prop,Yt(ze.from,ze.to,He));},getProgress(){let{tStart:q,tEnd:He}=G();return H(ee($(),q,He,a))}};return Ve}if(Ee())return ie();let z=0,u=0,A=0,h=false,O=false,te=-1,pe=0,Se=false,Z=NaN,E=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(V=>l.getPropertyValue(V.prop)),$e=l.transition;le.length&&(l.transition="none"),le.forEach(V=>l.setProperty(V.prop,B.get(V.prop)??""));let Te=st(w,v,f);le.forEach((V,G)=>l.setProperty(V.prop,p[G])),le.length&&(e.offsetWidth,l.transition=$e);let $=Le(Te,Te.scroll,ae(),k,M);ne&&Math.abs($.tStart-z)<1&&Math.abs($.tEnd-u)<1||(ne=true,z=$.tStart,u=$.tEnd);}function Y(l){e.style.setProperty(Xt,String(l));for(let p of T)e.style.setProperty(p.prop,Yt(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?I?.():Z>0&&l<=0&&D?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||O)return;let l=performance.now(),p=Ae(),$e=a;if(R!==false){let V=l-de,G=V>0?Math.abs(p-(E<0?p:E))/V:0;$e=a*Math.max(.2,1+G*(typeof R=="number"?R:1)*.04);}E=p,de=l;let Te=u===z?0:(p-z)/(u-z);ge(Te);let $=H(ee(p,z,u,$e));m&&(te=Math.max(te,$),$=te),pe=$,Y($),$>=1&&!Se?(Se=true,me?.()):$<1&&!m&&(Se=false),A=requestAnimationFrame(J);}re(),u===z&&he("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=H(ee(Ae(),z,u,a));m&&l>0&&(te=l),pe=l,Y(l);}let Oe=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!O?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function P(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",P),window.addEventListener("orientationchange",P);let we=Fe([w],P);return Oe.observe(e),Pe(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:z,tEnd:u})}),{destroy(){cancelAnimationFrame(A),Oe.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),we(),clearTimeout(_),L(),ke(e);},replay(){te=-1,Se=false,pe=0,O=false,Y(0);},pause(){O=true,cancelAnimationFrame(A);},resume(){O&&(O=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,O=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,r){if(typeof window>"u")return wt;let t=typeof e=="string"?document.querySelector(e):e;return t?Be(r,(n,s)=>kn(t,n,s)):(he("scrollCounter: element not found:",e),wt)}function kn(e,r,t){let{from:n=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:x}=r,R=d!==void 0?u=>u.toFixed(d):i??(u=>String(Math.round(u))),C=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(m.start??"top 80%"),me=ye(m.end??"top 20%");if(t)return e.textContent=R(s),x?.(),{...wt,getProgress:()=>1};let I=0,se=0,be=false,D=0,H=false,k=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let u=e.getBoundingClientRect(),A=Le({top:u.top,height:u.height},T(),U(),Q,me);be&&Math.abs(A.tStart-I)<1&&Math.abs(A.tEnd-se)<1||(be=true,I=A.tStart,se=A.tEnd);}function B(u){e.textContent=R(n+(s-n)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function L(){if(!H||k)return;let u=C(ee(T(),I,se,1));f&&(M=Math.max(M,u),u=M),w=u,B(u),u>=1&&!v?(v=true,x?.()):u<1&&!f&&(v=false),D=requestAnimationFrame(L);}N();{let u=C(ee(T(),I,se,1));f&&u>0&&(M=u),w=u,B(u);}let fe=new IntersectionObserver(u=>{u.forEach(A=>{H=A.isIntersecting,H&&!k?D=requestAnimationFrame(L):cancelAnimationFrame(D);});}),Ee;function ie(){clearTimeout(Ee),Ee=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let z=Fe([e],ie);return fe.observe(e),Pe(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:se})}),{destroy(){cancelAnimationFrame(D),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),z(),clearTimeout(Ee),ke(e);},replay(){M=-1,v=false,w=0,k=false,B(0);},pause(){k=true,cancelAnimationFrame(D);},resume(){k&&(k=false,H&&(D=requestAnimationFrame(L)));},seek(u){let A=Math.min(1,Math.max(0,u));w=A,M=A,k=true,cancelAnimationFrame(D),B(A);},getProgress(){return w}}}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,r={}){if(typeof window>"u")return Jt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),Jt;let n=t,{trigger:s={},easing:i="linear",once:a=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:R,onProgress:C}=r,Q=d??n,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:oe[i]??oe.linear,se=ye(s.start??"top top"),be=ye(s.end??"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=f);let D=r.from??0,H=r.to,k=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>m==="x"?window.scrollX:window.scrollY,Ee=()=>m==="x"?window.innerWidth:window.innerHeight;function ie(){let E=Q.getBoundingClientRect(),de=m==="x"?E.left:E.top,Ae=m==="x"?E.width:E.height,ae=Le({top:de,height:Ae},fe(),Ee(),se,be);k=ae.tStart,M=ae.tEnd,L&&M===k&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let z=NaN;function u(E){if(!L)return;let de=H??n.duration??0,Ae=D+(de-D)*E;Ae!==z&&(z=Ae,n.currentTime=Ae),n.style.setProperty("--scroll-draw-progress",String(E)),C?.(E);}function A(){if(!v||T||!L||me)return;let E=I(ee(fe(),k,M,1));a&&(U=Math.max(U,E),E=U),N=E,u(E),E>=1&&!B?(B=true,R?.()):E<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,H===void 0&&(H=n.duration),me){u(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}n.readyState>=1?h():n.addEventListener("loadedmetadata",h,{once:true}),L||ie();let O=me?()=>{}:ct(E=>{E&&(O(),me=true,cancelAnimationFrame(w),u(1));}),te=new IntersectionObserver(E=>{E.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Se(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Z=Fe([Q],Se);return te.observe(n),Pe(n,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:k,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),n.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),Z(),O(),clearTimeout(pe),ke(n);},replay(){U=-1,B=false,N=0,T=false,z=NaN,u(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(E){let de=Math.min(1,Math.max(0,E));N=de,U=de,T=true,cancelAnimationFrame(w),z=NaN,u(de);},getProgress(){return N}}}function en(e,r){let t=document.createElement("span");t.textContent=r,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function rn(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(n.textContent=t,n.style.whiteSpace="pre"):(n.textContent=t,n.style.display="inline-block"),e.appendChild(n),/^\s+$/.test(t)?null:n}).filter(t=>t!==null)}function On(e){let r=e.textContent??"";return e.textContent="",r.split("").map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=t,t===" "?n.style.whiteSpace="pre":n.style.display="inline-block",e.appendChild(n),t===" "?null:n}).filter(t=>t!==null)}function tn(e){let r=rn(e),t=new Map;for(let i of r){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let n=[],s=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of s){let a=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;m.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),n.push(m);}return e.textContent="",n.forEach((i,a)=>{e.appendChild(i),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function In(e,r,t,n){if(t<=1||n===0)return e;let s=(t-1)*n,i=r*n,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Dn(e,r){let t=[];if(r?.y!==void 0&&t.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&t.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&t.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let n=r.scale+(1-r.scale)*e;t.push(`scale(${n})`);}return t.join(" ")||""}var nn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,r={}){if(typeof window>"u")return nn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return he("scrollText: element not found:",e),nn;let n=t;return Be(r,(s,i)=>Fn(n,s,i))}function Fn(e,r,t){let{split:n="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=r,x=typeof i=="function"?i:oe[i]??oe["ease-out"],R=ye(m.start??"top 85%"),C=ye(m.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",I;n==="chars"?I=On(e):n==="lines"?I=tn(e):I=rn(e),en(e,me);let se=I.length;function be(h,O){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*O));let te=Dn(O,a);te&&(h.style.transform=te);}function D(h){e.style.setProperty("--scroll-draw-progress",String(h)),I.forEach((O,te)=>{let pe=x(In(h,te,se,s));be(O,pe);});}if(t)return D(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let H=0,k=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),O=Le({top:h.top,height:h.height},B(),L(),R,C);H=O.tStart,k=O.tEnd;}function Ee(){if(!w||v)return;let h=ee(B(),H,k,1);f&&(T=Math.max(T,h),h=T),U=h,D(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Ee);}fe();let ie=new IntersectionObserver(h=>{h.forEach(O=>{w=O.isIntersecting,w&&!v?M=requestAnimationFrame(Ee):cancelAnimationFrame(M);});}),z;function u(){clearTimeout(z),z=setTimeout(()=>{if(n==="lines"){let h=U;e.innerHTML=Q,I=tn(e),en(e,me),D(h);}fe();},150);}window.addEventListener("resize",u),window.addEventListener("orientationchange",u);let A=Fe([e],u);return ie.observe(e),Pe(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:H,tEnd:k})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",u),A(),clearTimeout(z),e.innerHTML=Q,ke(e);},replay(){T=-1,N=false,U=0,v=false,D(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Ee)));},seek(h){let O=Math.min(1,Math.max(0,h));U=O,T=O,v=true,cancelAnimationFrame(M),D(O);},getProgress(){return U}}}function Re(e,r){let t,n,s,i;return solidJs.createEffect(()=>{i=typeof e=="function"?e():e;let a=jt(i);!t||a===s||(s=a,solidJs.untrack(()=>{n?.destroy(),n=r(t,Qt(i,()=>i));}));}),solidJs.onCleanup(()=>{n?.destroy(),n=s=void 0;}),{ref:a=>{t=a;},getInstance:()=>n}}function Zr(e={}){return Re(e,ht).ref}function Jr(e={}){return Re(e,ht)}function eo(e){return Re(e,bt).ref}function to(e){return Re(e,bt)}function no(e){return Re(e,vt).ref}function ro(e){return Re(e,vt)}function oo(e={}){return Re(e,Et).ref}function so(e={}){return Re(e,Et)}function io(e={}){return Re(e,St).ref}function ao(e={}){return Re(e,St)}exports.createScrollAnimate=to;exports.createScrollCounter=ro;exports.createScrollDraw=Jr;exports.createScrollText=ao;exports.createScrollVideo=so;exports.useScrollAnimate=eo;exports.useScrollCounter=no;exports.useScrollDraw=Zr;exports.useScrollText=io;exports.useScrollVideo=oo;
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
- import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
2
+ import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
3
3
  import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
4
4
  import { ScrollVideoOptions } from '../video/index.mjs';
5
5
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
- import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
2
+ import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
3
3
  import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
4
4
  import { ScrollVideoOptions } from '../video/index.js';
5
5
  import { ScrollTextOptions } from '../text/index.js';
@@ -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-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};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-KV3WCPQ5.mjs';import {a as a$4}from'../chunk-DY5JCXVR.mjs';import {a as a$2}from'../chunk-WXUOF4NM.mjs';import {a as a$1}from'../chunk-LTCJVVSC.mjs';import {b as b$1}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';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};