svg-scroll-draw 2.15.2 → 2.16.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 (128) hide show
  1. package/README.md +19 -16
  2. package/dist/angular/index.cjs +2 -2
  3. package/dist/angular/index.d.mts +7 -238
  4. package/dist/angular/index.d.ts +7 -238
  5. package/dist/angular/index.mjs +1 -3
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -2
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.d.mts +1 -33
  10. package/dist/aos/react/index.d.ts +1 -33
  11. package/dist/aos/react/index.mjs +1 -2
  12. package/dist/astro/index.cjs +2 -2
  13. package/dist/astro/index.d.mts +4 -146
  14. package/dist/astro/index.d.ts +4 -146
  15. package/dist/astro/index.mjs +1 -3
  16. package/dist/cdn/aos.global.js +2 -2
  17. package/dist/cdn/scrollreveal.global.js +2 -2
  18. package/dist/cdn/svg-scroll-draw.dev.global.js +51 -39
  19. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  20. package/dist/cdn/vivus.global.js +1 -1
  21. package/dist/chunk-4DOJSIEQ.mjs +1 -0
  22. package/dist/chunk-4MH5SQTH.mjs +1 -0
  23. package/dist/chunk-4T5R3ZTL.mjs +2 -0
  24. package/dist/chunk-5PJEKEEP.mjs +1 -0
  25. package/dist/chunk-AJ22VSHC.mjs +1 -0
  26. package/dist/chunk-BCV4RAIX.mjs +1 -0
  27. package/dist/chunk-DM6EDKWH.mjs +1 -0
  28. package/dist/chunk-E4M2PB7B.mjs +1 -0
  29. package/dist/chunk-JC5BD4RB.mjs +1 -0
  30. package/dist/chunk-KBFWDHF4.mjs +1 -0
  31. package/dist/chunk-KGAJQP2N.mjs +2 -0
  32. package/dist/chunk-LFSU6LR3.mjs +1 -0
  33. package/dist/chunk-OJFWQ6CU.mjs +1 -0
  34. package/dist/chunk-OMI46IXL.mjs +2 -0
  35. package/dist/chunk-OWMO2S3V.mjs +1 -0
  36. package/dist/chunk-PEFR3ZB7.mjs +1 -0
  37. package/dist/chunk-QJ4H2HW3.mjs +1 -0
  38. package/dist/chunk-SNCRC6BA.mjs +1 -0
  39. package/dist/chunk-WDIHLRZZ.mjs +3 -0
  40. package/dist/chunk-WQZKXAXK.mjs +2 -0
  41. package/dist/chunk-YWKPTYSG.mjs +1 -0
  42. package/dist/chunk-YZV4Z3EQ.mjs +1 -0
  43. package/dist/cinematic/index.cjs +1 -1
  44. package/dist/cinematic/index.mjs +1 -2
  45. package/dist/devtools/index.mjs +1 -1
  46. package/dist/engine-6AXEX8CL.d.ts +57 -0
  47. package/dist/engine-Ci08nM91.d.mts +57 -0
  48. package/dist/group/index.cjs +2 -2
  49. package/dist/group/index.d.mts +4 -205
  50. package/dist/group/index.d.ts +4 -205
  51. package/dist/group/index.mjs +1 -3
  52. package/dist/horizontal/index.cjs +1 -1
  53. package/dist/horizontal/index.d.mts +1 -33
  54. package/dist/horizontal/index.d.ts +1 -33
  55. package/dist/horizontal/index.mjs +1 -1
  56. package/dist/index-BDGQEK6X.d.mts +15 -0
  57. package/dist/index-BVuNgQSd.d.ts +14 -0
  58. package/dist/index-CGR7pSOR.d.mts +14 -0
  59. package/dist/index-DxjUOIbK.d.ts +15 -0
  60. package/dist/index.cjs +3 -3
  61. package/dist/index.d.mts +8 -292
  62. package/dist/index.d.ts +8 -292
  63. package/dist/index.mjs +1 -4
  64. package/dist/nuxt/index.cjs +2 -2
  65. package/dist/nuxt/index.d.mts +7 -505
  66. package/dist/nuxt/index.d.ts +7 -505
  67. package/dist/nuxt/index.mjs +1 -3
  68. package/dist/pin/index.cjs +1 -1
  69. package/dist/pin/index.mjs +1 -1
  70. package/dist/progress/index.cjs +1 -1
  71. package/dist/progress/index.d.mts +1 -33
  72. package/dist/progress/index.d.ts +1 -33
  73. package/dist/progress/index.mjs +1 -1
  74. package/dist/react/index.cjs +2 -2
  75. package/dist/react/index.d.mts +5 -210
  76. package/dist/react/index.d.ts +5 -210
  77. package/dist/react/index.mjs +1 -3
  78. package/dist/reveal/index.cjs +1 -1
  79. package/dist/reveal/index.d.mts +10 -8
  80. package/dist/reveal/index.d.ts +10 -8
  81. package/dist/reveal/index.mjs +1 -1
  82. package/dist/scroll-draw-BlJfbTDv.d.ts +5 -0
  83. package/dist/scroll-draw-CNlq4Z_L.d.mts +5 -0
  84. package/dist/scrollreveal/index.cjs +2 -2
  85. package/dist/scrollreveal/index.mjs +1 -2
  86. package/dist/scrollreveal/react/index.cjs +2 -2
  87. package/dist/scrollreveal/react/index.d.mts +1 -36
  88. package/dist/scrollreveal/react/index.d.ts +1 -36
  89. package/dist/scrollreveal/react/index.mjs +1 -2
  90. package/dist/snap/index.cjs +1 -1
  91. package/dist/snap/index.d.mts +1 -1
  92. package/dist/snap/index.d.ts +1 -1
  93. package/dist/snap/index.mjs +1 -1
  94. package/dist/solid/index.cjs +2 -2
  95. package/dist/solid/index.d.mts +6 -238
  96. package/dist/solid/index.d.ts +6 -238
  97. package/dist/solid/index.mjs +1 -3
  98. package/dist/svelte/index.cjs +2 -2
  99. package/dist/svelte/index.d.mts +6 -238
  100. package/dist/svelte/index.d.ts +6 -238
  101. package/dist/svelte/index.mjs +1 -3
  102. package/dist/text/index.cjs +1 -1
  103. package/dist/text/index.d.mts +1 -33
  104. package/dist/text/index.d.ts +1 -33
  105. package/dist/text/index.mjs +1 -1
  106. package/dist/timeline/index.cjs +7 -7
  107. package/dist/timeline/index.d.mts +1 -29
  108. package/dist/timeline/index.d.ts +1 -29
  109. package/dist/timeline/index.mjs +11 -11
  110. package/dist/types-DHU1zNEw.d.mts +147 -0
  111. package/dist/types-DHU1zNEw.d.ts +147 -0
  112. package/dist/video/index.cjs +1 -1
  113. package/dist/video/index.d.mts +1 -33
  114. package/dist/video/index.d.ts +1 -33
  115. package/dist/video/index.mjs +1 -1
  116. package/dist/vivus/index.cjs +2 -2
  117. package/dist/vivus/index.mjs +1 -2
  118. package/dist/vivus/react/index.cjs +2 -1
  119. package/dist/vivus/react/index.d.mts +1 -99
  120. package/dist/vivus/react/index.d.ts +1 -99
  121. package/dist/vivus/react/index.mjs +1 -1
  122. package/dist/vue/index.cjs +2 -2
  123. package/dist/vue/index.d.mts +6 -211
  124. package/dist/vue/index.d.ts +6 -211
  125. package/dist/vue/index.mjs +1 -3
  126. package/dist/web-component/index.cjs +2 -2
  127. package/dist/web-component/index.mjs +1 -3
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";(()=>{function g(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function m(r,...t){}var E=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],L=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function V(r){if(typeof window>"u")return!1;let t=window,e=i=>typeof t[i]=="function"&&r instanceof t[i];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var y=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],$=["line","ellipse","circle","polygon","polyline","rect"],S="http://www.w3.org/2000/svg";function v(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let i=[];for(let s=0;s<t.length;s+=2)i.push(`${t[s]},${t[s+1]}`);t=i}let e=`M${t[0]}`;for(let i=1;i<t.length;i++)t[i].indexOf(",")!==-1&&(e+=`L${t[i]}`);return e}function b(r,t,e,i){let s=parseFloat(e)||0,a=parseFloat(i)||0,n=parseFloat(r)||0,o=parseFloat(t)||0,l=n-s,h=n+s;return`M${l},${o}A${s},${a} 0,1,1 ${h},${o}A${s},${a} 0,1,1 ${l},${o}`}var x={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,i=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,n=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?n:a,0),i/2),n=Math.min(Math.max(n<0?a:n,0),s/2);let o=`A ${a},${n},0,0,1,`;return`M ${t+a},${e} L ${t+i-a},${e} ${o}${t+i},${e+n} L ${t+i},${e+s-n} ${o}${t+i-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-n} L ${t},${e+n} ${o}${t+a},${e}`}return`M${t} ${e} L${t+i} ${e} L${t+i} ${e+s} L${t} ${e+s} Z`},polyline:v,polygon:r=>`${v(r)}Z`,ellipse:r=>b(r.cx,r.cy,r.rx,r.ry),circle:r=>b(r.cx,r.cy,r.r,r.r)};function A(r){for(let t of Array.from(r.querySelectorAll($.join(",")))){let e={};for(let{name:a,value:n}of Array.from(t.attributes)){if(y.indexOf(a)!==-1&&n.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=n}let i=x[t.tagName.toLowerCase()](e),s=document.createElementNS(S,"path");for(let{name:a,value:n}of Array.from(t.attributes))y.indexOf(a)===-1&&s.setAttribute(a,n);s.setAttribute("d",i),t.parentNode?.replaceChild(s,t)}}var c=class c{constructor(t,e,i){this.isReady=!1;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=!1;this.reverseStack=!1;this.selfDestroy=!1;this.ignoreInvisible=!1;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.setElement(t,e),this.setOptions(e),this.setCallback(i),this.isReady&&this.init()}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let i=t;if(typeof i=="string"){let s=document.getElementById(i);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');i=s}if(this.parentEl=i,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let n=a.querySelector("svg");if(!n)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=n,n.setAttribute("width","100%"),n.setAttribute("height","100%"),this.parentEl.appendChild(n),this.isReady=!0,this.init()}),s.open("GET",e.file),s.send();return}if(V(i)){this.el=i,this.isReady=!0;return}if(i instanceof HTMLObjectElement){let s=i,a=n=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&n)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=!0,this.init())};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&E.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&L.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let i=navigator.userAgent,s=i.indexOf("MSIE")!==-1||i.indexOf("Trident/")!==-1||i.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:!1,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{})}mapping(){let t=0,e=0,i=0,s=!1,a=Array.from(this.el.querySelectorAll("path"));a.forEach((n,o)=>{if(this.isInvisible(n))return;let l={el:n,length:0,startAt:0,duration:0,isResizeSensitive:!1},h=1;if(n.getAttribute("vector-effect")==="non-scaling-stroke"){let d=n.getBoundingClientRect(),f=n.getBBox();h=Math.max(d.width/f.width,d.height/f.height),l.isResizeSensitive=!0,s=!0}if(l.length=Math.ceil(n.getTotalLength()*h),isNaN(l.length)){m("vivus: cannot retrieve a path element length",n);return}this.map.push(l),n.style.strokeDasharray=`${l.length} ${l.length+this.dashGap*2}`,n.style.strokeDashoffset=String(l.length+this.dashGap),l.length+=this.dashGap,e+=l.length,this.renderPath(o)}),s&&m("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((n,o)=>{let l=()=>{let h={};for(let{name:d,value:f}of Array.from(n.el.attributes))h[d]=f;return h};switch(this.type){case"delayed":n.startAt=this.delayUnit*o,n.duration=this.duration-this.delay;break;case"oneByOne":n.startAt=i/e*this.duration,n.duration=n.length/e*this.duration;break;case"sync":case"async":case"nsync":n.startAt=0,n.duration=this.duration;break;case"scenario-sync":{let h=l();n.startAt=t+(u(h["data-delay"],this.delayUnit)||0),n.duration=u(h["data-duration"],this.duration),t=h["data-async"]!==void 0?n.startAt:n.startAt+n.duration,this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}case"scenario":{let h=l();n.startAt=u(h["data-start"],this.delayUnit)||0,n.duration=u(h["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}}i+=n.length,this.frameLength=this.frameLength||this.duration})}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()))}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),i=t.el.getBBox(),s=Math.max(e.width/i.width,e.height/i.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`}this.trace(),this.mustRecalcScale=null}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else{this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished()}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this)}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,i)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(i))})}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let i=e.el.cloneNode(!0);e.el.parentNode?.replaceChild(i,e.el),e.el=i}init(){this.frameLength=0,this.currentFrame=0,this.map=[],A(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null)};this.viewportListener=t,window.addEventListener("scroll",t),t()}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let i=t;if(i&&typeof i=="function")this.instanceCallback=i,i=void 0;else if(i&&typeof i!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=i||1,g()?(this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e)})}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let i=t.getBoundingClientRect();return!i.width&&!i.height}return!1}isInViewport(t,e=0){let i=window.pageYOffset||document.documentElement.scrollTop,s=i+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),n=i+a.top;return n+a.height*(e||0)<=s&&n+a.height>=i}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,i=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(i*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,w=p;globalThis.Vivus=w;})();
1
+ "use strict";(()=>{function g(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function m(r,...t){}var E=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],V=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function $(r){if(typeof window>"u")return!1;let t=window,e=n=>typeof t[n]=="function"&&r instanceof t[n];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var y=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],S=["line","ellipse","circle","polygon","polyline","rect"],A="http://www.w3.org/2000/svg";function v(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let n=[];for(let s=0;s<t.length;s+=2)n.push(`${t[s]},${t[s+1]}`);t=n}let e=`M${t[0]}`;for(let n=1;n<t.length;n++)t[n].indexOf(",")!==-1&&(e+=`L${t[n]}`);return e}function b(r,t,e,n){let s=parseFloat(e)||0,a=parseFloat(n)||0,i=parseFloat(r)||0,o=parseFloat(t)||0,l=i-s,h=i+s;return`M${l},${o}A${s},${a} 0,1,1 ${h},${o}A${s},${a} 0,1,1 ${l},${o}`}var x={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,i=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?i:a,0),n/2),i=Math.min(Math.max(i<0?a:i,0),s/2);let o=`A ${a},${i},0,0,1,`;return`M ${t+a},${e} L ${t+n-a},${e} ${o}${t+n},${e+i} L ${t+n},${e+s-i} ${o}${t+n-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-i} L ${t},${e+i} ${o}${t+a},${e}`}return`M${t} ${e} L${t+n} ${e} L${t+n} ${e+s} L${t} ${e+s} Z`},polyline:v,polygon:r=>`${v(r)}Z`,ellipse:r=>b(r.cx,r.cy,r.rx,r.ry),circle:r=>b(r.cx,r.cy,r.r,r.r)};function L(r){for(let t of Array.from(r.querySelectorAll(S.join(",")))){let e={};for(let{name:a,value:i}of Array.from(t.attributes)){if(y.indexOf(a)!==-1&&i.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=i}let n=x[t.tagName.toLowerCase()](e),s=document.createElementNS(A,"path");for(let{name:a,value:i}of Array.from(t.attributes))y.indexOf(a)===-1&&s.setAttribute(a,i);s.setAttribute("d",n),t.parentNode?.replaceChild(s,t)}}var c=class c{constructor(t,e,n){this.isReady=!1;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=!1;this.reverseStack=!1;this.selfDestroy=!1;this.ignoreInvisible=!1;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.setElement(t,e),this.setOptions(e),this.setCallback(n),this.isReady&&this.init()}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let n=t;if(typeof n=="string"){let s=document.getElementById(n);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');n=s}if(this.parentEl=n,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let i=a.querySelector("svg");if(!i)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=i,i.setAttribute("width","100%"),i.setAttribute("height","100%"),this.parentEl.appendChild(i),this.isReady=!0,this.init()}),s.open("GET",e.file),s.send();return}if($(n)){this.el=n,this.isReady=!0;return}if(n instanceof HTMLObjectElement){let s=n,a=i=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&i)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=!0,this.init())};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&E.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&V.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let n=navigator.userAgent,s=n.indexOf("MSIE")!==-1||n.indexOf("Trident/")!==-1||n.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:!1,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{})}mapping(){let t=0,e=0,n=0,s=!1,a=Array.from(this.el.querySelectorAll("path"));a.forEach((i,o)=>{if(this.isInvisible(i))return;let l={el:i,length:0,startAt:0,duration:0,isResizeSensitive:!1},h=1;if(i.getAttribute("vector-effect")==="non-scaling-stroke"){let d=i.getBoundingClientRect(),f=i.getBBox();h=Math.max(d.width/f.width,d.height/f.height),l.isResizeSensitive=!0,s=!0}if(l.length=Math.ceil(i.getTotalLength()*h),isNaN(l.length)){m("vivus: cannot retrieve a path element length",i);return}this.map.push(l),i.style.strokeDasharray=`${l.length} ${l.length+this.dashGap*2}`,i.style.strokeDashoffset=String(l.length+this.dashGap),l.length+=this.dashGap,e+=l.length,this.renderPath(o)}),s&&m("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((i,o)=>{let l=()=>{let h={};for(let{name:d,value:f}of Array.from(i.el.attributes))h[d]=f;return h};switch(this.type){case"delayed":i.startAt=this.delayUnit*o,i.duration=this.duration-this.delay;break;case"oneByOne":i.startAt=n/e*this.duration,i.duration=i.length/e*this.duration;break;case"sync":case"async":case"nsync":i.startAt=0,i.duration=this.duration;break;case"scenario-sync":{let h=l();i.startAt=t+(u(h["data-delay"],this.delayUnit)||0),i.duration=u(h["data-duration"],this.duration),t=h["data-async"]!==void 0?i.startAt:i.startAt+i.duration,this.frameLength=Math.max(this.frameLength,i.startAt+i.duration);break}case"scenario":{let h=l();i.startAt=u(h["data-start"],this.delayUnit)||0,i.duration=u(h["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,i.startAt+i.duration);break}}n+=i.length,this.frameLength=this.frameLength||this.duration})}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()))}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),n=t.el.getBBox(),s=Math.max(e.width/n.width,e.height/n.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`}this.trace(),this.mustRecalcScale=null}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else{this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished()}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this)}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,n)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(n))})}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let n=e.el.cloneNode(!0);e.el.parentNode?.replaceChild(n,e.el),e.el=n}init(){this.frameLength=0,this.currentFrame=0,this.map=[],L(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null)};this.viewportListener=t,window.addEventListener("scroll",t),t()}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let n=t;if(n&&typeof n=="function")this.instanceCallback=n,n=void 0;else if(n&&typeof n!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=n||1,g()?(this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e)})}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let n=t.getBoundingClientRect();return!n.width&&!n.height}return!1}isInViewport(t,e=0){let n=window.pageYOffset||document.documentElement.scrollTop,s=n+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),i=n+a.top;return i+a.height*(e||0)<=s&&i+a.height>=n}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,n=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(n*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,w=p;globalThis.Vivus=w;})();
@@ -0,0 +1 @@
1
+ function e(n,m,r){return Math.min(r,Math.max(m,n))}export{e as a};
@@ -0,0 +1 @@
1
+ import {a,b as b$1,c}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var S={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function K(a$2,D){if(typeof window>"u")return S;let T=typeof a$2=="string"?document.querySelector(a$2):a$2;if(!T)return b("scrollCounter: element not found:",a$2),S;let r=T,{from:A=0,to:E,format:k,easing:g="ease-out",trigger:F={},once:p=true,decimals:x,onComplete:I}=D,P=x!==void 0?e=>e.toFixed(x):k??(e=>String(Math.round(e))),z=typeof g=="function"?g:d[g]??d["ease-out"],H=a(F.start??"top 80%"),_=a(F.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r.textContent=P(E),I?.(),S;let c$1=0,l=0,n=0,m=false,o=false,i=-1,s=0,u=false,w=()=>window.scrollY,B=()=>window.innerHeight;function M(){let e=r.getBoundingClientRect(),t=c({top:e.top,height:e.height},w(),B(),H,_);c$1=t.tStart,l=t.tEnd;}function f(e){r.textContent=P(A+(E-A)*e),r.style.setProperty("--scroll-draw-progress",String(e));}function h(){if(!m||o)return;let e=z(b$1(w(),c$1,l,1));p&&(i=Math.max(i,e),e=i),s=e,f(e),e>=1&&!u?(u=true,I?.()):e<1&&!p&&(u=false),n=requestAnimationFrame(h);}M();{let e=z(b$1(w(),c$1,l,1));p&&e>0&&(i=e),s=e,f(e);}let L=new IntersectionObserver(e=>{e.forEach(t=>{m=t.isIntersecting,m&&!o?n=requestAnimationFrame(h):cancelAnimationFrame(n);});}),b$3;function d$1(){clearTimeout(b$3),b$3=setTimeout(M,150);}return window.addEventListener("resize",d$1),window.addEventListener("orientationchange",d$1),L.observe(r),a$1(r,{type:"counter",getProgress:()=>s,getTrigger:()=>({tStart:c$1,tEnd:l})}),{destroy(){cancelAnimationFrame(n),L.disconnect(),window.removeEventListener("resize",d$1),window.removeEventListener("orientationchange",d$1),clearTimeout(b$3),b$2(r);},replay(){i=-1,u=false,s=0,o=false,f(0);},pause(){o=true,cancelAnimationFrame(n);},resume(){o&&(o=false,m&&(n=requestAnimationFrame(h)));},seek(e){let t=Math.min(1,Math.max(0,e));s=t,i=t,o=true,cancelAnimationFrame(n),f(t);},getProgress(){return s}}}export{K as a};
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-AJ22VSHC.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var w=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],E=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function $(r){if(typeof window>"u")return false;let t=window,e=i=>typeof t[i]=="function"&&r instanceof t[i];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var y=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],V=["line","ellipse","circle","polygon","polyline","rect"],A="http://www.w3.org/2000/svg";function v(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let i=[];for(let s=0;s<t.length;s+=2)i.push(`${t[s]},${t[s+1]}`);t=i;}let e=`M${t[0]}`;for(let i=1;i<t.length;i++)t[i].indexOf(",")!==-1&&(e+=`L${t[i]}`);return e}function b(r,t,e,i){let s=parseFloat(e)||0,a=parseFloat(i)||0,n=parseFloat(r)||0,o=parseFloat(t)||0,l=n-s,h=n+s;return `M${l},${o}A${s},${a} 0,1,1 ${h},${o}A${s},${a} 0,1,1 ${l},${o}`}var x={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,i=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,n=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?n:a,0),i/2),n=Math.min(Math.max(n<0?a:n,0),s/2);let o=`A ${a},${n},0,0,1,`;return `M ${t+a},${e} L ${t+i-a},${e} ${o}${t+i},${e+n} L ${t+i},${e+s-n} ${o}${t+i-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-n} L ${t},${e+n} ${o}${t+a},${e}`}return `M${t} ${e} L${t+i} ${e} L${t+i} ${e+s} L${t} ${e+s} Z`},polyline:v,polygon:r=>`${v(r)}Z`,ellipse:r=>b(r.cx,r.cy,r.rx,r.ry),circle:r=>b(r.cx,r.cy,r.r,r.r)};function L(r){for(let t of Array.from(r.querySelectorAll(V.join(",")))){let e={};for(let{name:a,value:n}of Array.from(t.attributes)){if(y.indexOf(a)!==-1&&n.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=n;}let i=x[t.tagName.toLowerCase()](e),s=document.createElementNS(A,"path");for(let{name:a,value:n}of Array.from(t.attributes))y.indexOf(a)===-1&&s.setAttribute(a,n);s.setAttribute("d",i),t.parentNode?.replaceChild(s,t);}}var c=class c{constructor(t,e,i){this.isReady=false;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=false;this.reverseStack=false;this.selfDestroy=false;this.ignoreInvisible=false;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.setElement(t,e),this.setOptions(e),this.setCallback(i),this.isReady&&this.init();}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let i=t;if(typeof i=="string"){let s=document.getElementById(i);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');i=s;}if(this.parentEl=i,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let n=a.querySelector("svg");if(!n)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=n,n.setAttribute("width","100%"),n.setAttribute("height","100%"),this.parentEl.appendChild(n),this.isReady=true,this.init();}),s.open("GET",e.file),s.send();return}if($(i)){this.el=i,this.isReady=true;return}if(i instanceof HTMLObjectElement){let s=i,a=n=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&n)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=true,this.init());};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&w.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&E.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let i=navigator.userAgent,s=i.indexOf("MSIE")!==-1||i.indexOf("Trident/")!==-1||i.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:false,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{});}mapping(){let t=0,e=0,i=0,s=false,a=Array.from(this.el.querySelectorAll("path"));a.forEach((n,o)=>{if(this.isInvisible(n))return;let l={el:n,length:0,startAt:0,duration:0,isResizeSensitive:false},h=1;if(n.getAttribute("vector-effect")==="non-scaling-stroke"){let d=n.getBoundingClientRect(),m=n.getBBox();h=Math.max(d.width/m.width,d.height/m.height),l.isResizeSensitive=true,s=true;}if(l.length=Math.ceil(n.getTotalLength()*h),isNaN(l.length)){b$1("vivus: cannot retrieve a path element length",n);return}this.map.push(l),n.style.strokeDasharray=`${l.length} ${l.length+this.dashGap*2}`,n.style.strokeDashoffset=String(l.length+this.dashGap),l.length+=this.dashGap,e+=l.length,this.renderPath(o);}),s&&b$1("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((n,o)=>{let l=()=>{let h={};for(let{name:d,value:m}of Array.from(n.el.attributes))h[d]=m;return h};switch(this.type){case "delayed":n.startAt=this.delayUnit*o,n.duration=this.duration-this.delay;break;case "oneByOne":n.startAt=i/e*this.duration,n.duration=n.length/e*this.duration;break;case "sync":case "async":case "nsync":n.startAt=0,n.duration=this.duration;break;case "scenario-sync":{let h=l();n.startAt=t+(u(h["data-delay"],this.delayUnit)||0),n.duration=u(h["data-duration"],this.duration),t=h["data-async"]!==void 0?n.startAt:n.startAt+n.duration,this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}case "scenario":{let h=l();n.startAt=u(h["data-start"],this.delayUnit)||0,n.duration=u(h["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}}i+=n.length,this.frameLength=this.frameLength||this.duration;});}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()));}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),i=t.el.getBBox(),s=Math.max(e.width/i.width,e.height/i.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`;}this.trace(),this.mustRecalcScale=null;}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else {this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished();}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this);}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,i)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(i));});}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let i=e.el.cloneNode(true);e.el.parentNode?.replaceChild(i,e.el),e.el=i;}init(){this.frameLength=0,this.currentFrame=0,this.map=[],L(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this);}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null);};this.viewportListener=t,window.addEventListener("scroll",t),t();}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let i=t;if(i&&typeof i=="function")this.instanceCallback=i,i=void 0;else if(i&&typeof i!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=i||1,a()?(this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e);});}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let i=t.getBoundingClientRect();return !i.width&&!i.height}return false}isInViewport(t,e=0){let i=window.pageYOffset||document.documentElement.scrollTop,s=i+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),n=i+a.top;return n+a.height*(e||0)<=s&&n+a.height>=i}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,i=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(i*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,T=p;
2
+ export{p as a,T as b};
@@ -0,0 +1 @@
1
+ function o(t){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let e=window.matchMedia("(prefers-reduced-motion: reduce)"),i=n=>t(!!n.matches);if(typeof e.addEventListener=="function")return e.addEventListener("change",i),()=>e.removeEventListener("change",i);let d=e;return d.addListener?.(i),()=>d.removeListener?.(i)}export{o as a};
@@ -0,0 +1 @@
1
+ function e(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}export{e as a};
@@ -0,0 +1 @@
1
+ var n=Symbol.for("svg-scroll-draw.registry");function t(){let e=globalThis;return e[n]||(e[n]=new Map)}function o(e,r){t().set(e,r);}function s(e){t().delete(e);}function i(){return t()}export{o as a,s as b,i as c};
@@ -0,0 +1 @@
1
+ function f({tension:n=2.5,friction:a=2.2}={}){return t=>1-Math.cos(t*Math.PI*n)*Math.pow(1-t,a)}function M({bounces:n=3,decay:a=.5}={}){let t=Math.max(1,Math.round(n)),o=Math.max(.01,Math.min(.99,a)),c=Math.sqrt(o),u=0,m=[];for(let r=0;r<t;r++){let e=Math.pow(c,r);m.push(e),u+=e;}let s=[0],h=0;for(let r=0;r<t;r++)h+=m[r]/u,s.push(h);return r=>{if(r<=0)return 0;if(r>=1)return 1;for(let e=0;e<t;e++)if(r<=s[e+1]){let i=(r-s[e])/(s[e+1]-s[e]);if(e===0)return i*(2-i);let b=1-Math.pow(o,e);return b+(1-b)*(2*i-1)*(2*i-1)}return 1}}function p({amplitude:n=1,period:a=.4}={}){let t=Math.max(1,n),o=Math.max(.1,a),c=t<=1?o/4:o/(2*Math.PI)*Math.asin(1/t);return u=>u<=0?0:u>=1?1:t*Math.pow(2,-10*u)*Math.sin((u-c)*(2*Math.PI)/o)+1}var l={linear:n=>n,"ease-in":n=>n*n,"ease-out":n=>n*(2-n),"ease-in-out":n=>n<.5?2*n*n:-1+(4-2*n)*n,spring:n=>1-Math.cos(n*Math.PI*2.5)*Math.pow(1-n,2.2),bounce:M(),elastic:p()};export{f as a,M as b,p as c,l as d};
@@ -0,0 +1 @@
1
+ import {a as a$2}from'./chunk-JC5BD4RB.mjs';import {a as a$3}from'./chunk-SNCRC6BA.mjs';import {a as a$1}from'./chunk-4MH5SQTH.mjs';import {a}from'./chunk-QJ4H2HW3.mjs';import {b as b$1}from'./chunk-WDIHLRZZ.mjs';import {defineComponent,ref,onMounted,onUnmounted,h}from'vue';function x(e={}){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=b$1(t.value,e);onUnmounted(()=>n.destroy());}),t}var T=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:t}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let o={};e.selector!=null&&(o.selector=e.selector),e.speed!=null&&(o.speed=e.speed),e.fade!=null&&(o.fade=e.fade),e.stagger!=null&&(o.stagger=e.stagger),e.easing!=null&&(o.easing=e.easing),e.direction!=null&&(o.direction=e.direction),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.debug!=null&&(o.debug=e.debug),e.onProgress!=null&&(o.onProgress=e.onProgress),e.onStart!=null&&(o.onStart=e.onStart),e.onComplete!=null&&(o.onComplete=e.onComplete);let g=b$1(n.value,o);onUnmounted(()=>g.destroy());}),()=>h("div",{ref:n},t.default?.())}});function b(e){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=a(t.value,e);onUnmounted(()=>n.destroy());}),t}var w=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let o=a(n.value,e.options);onUnmounted(()=>o.destroy());}),()=>h("div",{ref:n},t.default?.())}});function D(e){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=a$1(t.value,e);onUnmounted(()=>n.destroy());}),t}var E=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let o=a$1(t.value,n);onUnmounted(()=>o.destroy());}),()=>h("span",{ref:t})}});function M(e={}){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=a$2(t.value,e);onUnmounted(()=>n.destroy());}),t}var H=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=a$2(t.value,e.options??{});onUnmounted(()=>n.destroy());}),()=>h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function L(e={}){let t=ref(null);return onMounted(()=>{if(!t.value)return;let n=a$3(t.value,e);onUnmounted(()=>n.destroy());}),t}var R=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let o=a$3(n.value,e.options??{});onUnmounted(()=>o.destroy());}),()=>h(e.tag,{ref:n},t.default?.())}});export{x as a,T as b,b as c,w as d,D as e,E as f,M as g,H as h,L as i,R as j};
@@ -0,0 +1 @@
1
+ import {a,c,b as b$2}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var _={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function $(c$1,v={}){if(typeof window>"u")return _;let y=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!y||y.tagName.toLowerCase()!=="video")return b("scrollVideo: <video> element not found:",c$1),_;let t=y,{trigger:F={},easing:h="linear",once:P=false,axis:m="y",preload:B="auto",onReady:C,onComplete:G,onProgress:W}=v,z=window.matchMedia("(prefers-reduced-motion: reduce)").matches,X=typeof h=="function"?h:d[h]??d.linear,Y=a(F.start??"top top"),j=a(F.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=B);let I=v.from??0,T=v.to,b$3=0,E=0,o=0,a$2=false,n=false,s=-1,l=0,u=false,i=false,M=()=>m==="x"?window.scrollX:window.scrollY,J=()=>m==="x"?window.innerWidth:window.innerHeight;function A(){let e=t.getBoundingClientRect(),r=m==="x"?e.left:e.top,d=m==="x"?e.width:e.height,R=c({top:r,height:d},M(),J(),Y,j);b$3=R.tStart,E=R.tEnd;}let f=NaN;function p(e){if(!i)return;let r=T??t.duration??0,d=I+(r-I)*e;d!==f&&(f=d,t.currentTime=d),t.style.setProperty("--scroll-draw-progress",String(e)),W?.(e);}function g(){if(!a$2||n||!i||z)return;let e=X(b$2(M(),b$3,E,1));P&&(s=Math.max(s,e),e=s),l=e,p(e),e>=1&&!u?(u=true,G?.()):e<1&&!P&&(u=false),o=requestAnimationFrame(g);}function S(){if(i=true,T===void 0&&(T=t.duration),z){p(1),C?.();return}A(),C?.(),a$2&&!n&&(o=requestAnimationFrame(g));}t.readyState>=1?S():t.addEventListener("loadedmetadata",S,{once:true}),i||A();let V=new IntersectionObserver(e=>{e.forEach(r=>{a$2=r.isIntersecting,a$2&&!n&&i?o=requestAnimationFrame(g):cancelAnimationFrame(o);});}),x;function w(){clearTimeout(x),x=setTimeout(A,150);}return window.addEventListener("resize",w),window.addEventListener("orientationchange",w),V.observe(t),a$1(t,{type:"video",getProgress:()=>l,getTrigger:()=>({tStart:b$3,tEnd:E})}),{destroy(){cancelAnimationFrame(o),V.disconnect(),t.removeEventListener("loadedmetadata",S),window.removeEventListener("resize",w),window.removeEventListener("orientationchange",w),clearTimeout(x),b$1(t);},replay(){s=-1,u=false,l=0,n=false,f=NaN,p(0);},pause(){n=true,cancelAnimationFrame(o);},resume(){n&&(n=false,a$2&&i&&(o=requestAnimationFrame(g)));},seek(e){let r=Math.min(1,Math.max(0,e));l=r,s=r,n=true,cancelAnimationFrame(o),f=NaN,p(r);},getProgress(){return l}}}export{$ as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-QJ4H2HW3.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var t={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(e,o){if(typeof window>"u")return t;let n=typeof e=="string"?document.querySelector(e):e;return n?a(n,o):(b("scrollAnimate: element not found:",e),t)}function S(e,o={}){if(typeof window>"u")return t;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return b("scrollParallax: element not found:",e),t;let{speed:c=.3,axis:a$1="y",easing:p="linear",trigger:m,onProgress:f}=o,l=n.getBoundingClientRect(),g=a$1==="x"?l.width:l.height,s=c*g;return a(n,{props:a$1==="x"?{transform:["translateX(0px)",`translateX(${-s}px)`]}:{transform:["translateY(0px)",`translateY(${-s}px)`]},trigger:m??{start:"top bottom",end:"bottom top"},easing:p,native:false,onProgress:f})}export{y as a,S as b};
@@ -0,0 +1,2 @@
1
+ import {d}from'./chunk-DM6EDKWH.mjs';import {a,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var C="http://www.w3.org/2000/svg",M="cinematic-photo",y=a=>a<0?0:a>1?1:a;function u(a){let i=parseFloat(a);return Number.isFinite(i)?y(i/100):0}function I(a){return d[a]??d.linear}var P={destroy:()=>{},getProgress:()=>0},H=class{constructor(i){if(typeof document>"u"){this.mount=null;return}this.mount=typeof i.wrapper=="string"?document.querySelector(i.wrapper):i.wrapper,this.mount||b("Cinematic: wrapper not found:",i.wrapper);}loadStory(i){let s=this.mount;if(typeof window>"u"||!s)return P;s.style.position="relative",s.style.height=i.totalHeight,s.style.display="block";let c=document.createElement("div");c.setAttribute("data-cinematic-stage",""),c.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",s.appendChild(c);let p=[];for(let n of i.scenes){if(n.background){let t=document.createElement("img");t.id=M,t.src=n.background,t.alt="",t.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",c.appendChild(t);}let e=n.animations.filter(t=>t.type==="draw");if(e.length){let t=document.createElementNS(C,"svg");t.setAttribute("viewBox",`0 0 ${i.canvas.width} ${i.canvas.height}`),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",c.appendChild(t);for(let o of e){let r=document.createElementNS(C,"path");r.id=o.target.replace(/^#/,""),r.setAttribute("d",o.d),r.setAttribute("fill","none"),r.setAttribute("stroke",o.stroke),r.setAttribute("stroke-width",String(o.strokeWidth)),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round");let h=o.length||r.getTotalLength?.()||0;r.style.strokeDasharray=String(h),r.style.strokeDashoffset=String(h),t.appendChild(r),p.push({kind:"draw",el:r,start:u(o.start),end:u(o.end),ease:I(o.easing),length:h});}}for(let t of n.animations){if(t.type!=="fade")continue;let o=c.querySelector(t.target)??document.querySelector(t.target);o&&(o.style.opacity=String(t.from),p.push({kind:"fade",el:o,start:u(t.start),end:u(t.end),ease:d["ease-in-out"]??d.linear,from:t.from,to:t.to}));}}let d$1=0,b=()=>{let n=s.offsetHeight-window.innerHeight;return n<=0?s.getBoundingClientRect().top<=0?1:0:y(-s.getBoundingClientRect().top/n)},f=n=>{for(let e of p){let t=e.end-e.start,o=t<=0?n>=e.end?1:0:y((n-e.start)/t),r=e.ease(o);e.kind==="draw"?e.el.style.strokeDashoffset=String(e.length*(1-r)):e.el.style.opacity=String(e.from+(e.to-e.from)*r);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return f(1),{destroy:()=>{},getProgress:()=>1};let g=0,m=false,w=false,S=()=>{d$1=b(),f(d$1),m&&(g=requestAnimationFrame(S));},T=()=>{m||(m=true,g=requestAnimationFrame(S));},v=()=>{m=false,cancelAnimationFrame(g);},A=new IntersectionObserver(n=>{for(let e of n)w=e.isIntersecting,w?T():v();},{threshold:0});return A.observe(c),d$1=b(),f(d$1),a(s,{type:"draw",getProgress:()=>d$1,getTrigger:()=>{let n=s.getBoundingClientRect().top+window.scrollY;return {tStart:n,tEnd:n+Math.max(0,s.offsetHeight-window.innerHeight)}}}),{destroy(){v(),A.disconnect(),b$1(s);},getProgress:()=>d$1}}};
2
+ export{H as a};
@@ -0,0 +1 @@
1
+ var o=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function e(_,...n){o&&console.warn(`[svg-scroll-draw] ${_}`,...n);}export{o as a,e as b};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-DM6EDKWH.mjs';function u(t){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(t);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let e=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(e)return [parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(t);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function l(t,r,e){let n=u(t),s=u(r);return !n||!s?t:`rgb(${Math.round(n[0]+(s[0]-n[0])*e)},${Math.round(n[1]+(s[1]-n[1])*e)},${Math.round(n[2]+(s[2]-n[2])*e)})`}var o="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",c="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",a=33;function p(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function f(t){let r=[];for(let e=0;e<a;e++){let n=e/(a-1);r.push(String(Math.round(t(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function g(t){switch(t){case "linear":return "linear";case "ease-in":return o;case "ease-out":return c;case "ease-in-out":return p()?f(d["ease-in-out"]):null;default:return null}}export{l as a,g as b};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-AJ22VSHC.mjs';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,l,c,h]=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[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 le(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),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:l},opacity:b,position:o.position,transform:g,transition:w}}var x=(...e)=>e.filter(n=>n!=="").join(" "),ae=()=>({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,O=null,a={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,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 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=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 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)=>{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 M(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&&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&&a.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 l=i.body[0],c=a.elements[t.members[l]];if(c)return M(t,l,-1,n),M(t,l,1,n),k(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 M(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 M(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(a.containers))(e||!t.geometry)&&(t.geometry=U(t.node,true)),t.scroll=de(t);let n=Object.values(a.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(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=a$1();for(let n of Object.values(a.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(a.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 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&&$()||!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(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=le(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 P("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(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=a.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),v(i.node,i.styles.inline.generated),delete a.elements[i.id]),t.removeAttribute("data-sr-id");}n&&_();}function ge(){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 pe(){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 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??ae(),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(),O||(O={reveal:(t,o)=>te(t,o),clean:B,destroy:ge,sync:pe,get defaults(){return p},version:K,noop:false},Object.defineProperty(O,"delegate",{value:y})),O)}var X=ye;X.isSupported=ne;Object.defineProperty(X,"debug",{get:()=>F,set:e=>{typeof e=="boolean"&&(F=e);}});var we=X;export{X as a,we as b};
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-WDIHLRZZ.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-4DOJSIEQ.mjs';function c(t="top bottom"){let e=t.trim();if(/^\d+(\.\d+)?%$/.test(e))return {element:"top",viewport:e};let[r="top",n="bottom"]=e.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}function o(t,e,r,n){switch(n){case "top":return t+r;case "center":return t+r+e/2;case "bottom":return t+r+e;default:return t+r}}function i(t,e){if(/^\d+(\.\d+)?%$/.test(t))return e*(parseFloat(t)/100);switch(t){case "top":return 0;case "center":return e/2;case "bottom":return e;default:return e}}function a(t,e,r,n){return r===e?0:a$1((t-e)/(r-e)*n,0,1)}function f(t,e,r,n,u){let s=o(t.top,t.height,e,n.element)-i(n.viewport,r),b=o(t.top,t.height,e,u.element)-i(u.viewport,r);return {tStart:s,tEnd:b}}export{c as a,a as b,f as c};
@@ -0,0 +1 @@
1
+ import {b,a as a$3}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a,b as b$2,c}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$3}from'./chunk-BCV4RAIX.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function Le(t){return t.startsWith("#")||t.startsWith("rgb")||t.startsWith("hsl")}function ue(t){let c=[],l=/([\w]+)\(([^)]*)\)/g,s;for(;(s=l.exec(t))!==null;){let a=[],o=[],m=s[2].trim();if(m)for(let i of m.split(/[\s,]+/)){let r=i.match(/^([-+]?[\d.eE]+)(.*)$/);a.push(r?parseFloat(r[1]):0),o.push(r?r[2]:"");}c.push({fn:s[1],nums:a,units:o});}return c}function Pe(t,c,l){let s=ue(t),a=ue(c);return s.length===0||s.length!==a.length?l<1?t:c:s.map((o,m)=>{let i=a[m];return o.fn!==i.fn||o.nums.length!==i.nums.length?l<1?`${o.fn}(${o.nums.map((r,f)=>`${r}${o.units[f]}`).join(", ")})`:`${i.fn}(${i.nums.map((r,f)=>`${r}${i.units[f]}`).join(", ")})`:`${o.fn}(${o.nums.map((r,f)=>`${r+(i.nums[f]-r)*l}${o.units[f]}`).join(", ")})`}).join(" ")}function fe(t,c,l){if(typeof t=="number"&&typeof c=="number")return String(t+(c-t)*l);let s=String(t),a=String(c);if(Le(s))return a$3(s,a,l);if(s.includes("("))return Pe(s,a,l);let o=s.match(/^([-+]?[\d.]+)(.*)$/),m=a.match(/^([-+]?[\d.]+)(.*)$/);if(o&&m){let i=parseFloat(o[1]),r=parseFloat(m[1]);return `${i+(r-i)*l}${o[2]||m[2]}`}return l<1?s:a}function $e(t){return t.replace(/([A-Z])/g,c=>`-${c.toLowerCase()}`)}var Ae=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Me=0,pe="--scroll-draw-progress";function xe(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ve(t,c$1){let l={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return l;let{props:s,trigger:a$3={},easing:o="ease-out",speed:m=1,once:i=false,axis:r="y",scrollContainer:f,native:ge=true,velocityScale:L=false,respectReducedMotion:de=true,triggerElement:ye,onProgress:X,onComplete:N,onEnter:Y,onLeave:U,onEnterBack:Z,onLeaveBack:J}=c$1,he=de&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof o=="function"?o:d[o]??d["ease-out"],K=a(a$3.start??"top bottom"),Q=a(a$3.end??"bottom top"),ee=ye??t,p=typeof f=="string"?document.querySelector(f):f??null,d$1=Object.entries(s).map(([e,n])=>({prop:$e(e),from:Array.isArray(n)?n[0]:"",to:Array.isArray(n)?n[1]:n}));function ve(){let e=window.getComputedStyle(t);for(let n of d$1)n.from===""&&(n.from=e.getPropertyValue(n.prop).trim()||"0");}function be(){for(let e of d$1)t.style.setProperty(e.prop,String(e.to));}let te=new Map;for(let e of [...d$1.map(n=>n.prop),pe])te.set(e,t.style.getPropertyValue(e));function R(){for(let[e,n]of te)n?t.style.setProperty(e,n):t.style.removeProperty(e);}if(he)return be(),N?.(),{...l,destroy:R,getProgress:()=>1};ve();let ne=typeof o=="string"?b(o):null;function Ee(){if(!ge||!xe()||!ne||r!=="y"||p||ee!==t||i||m!==1||X||N||Y||U||Z||J||L!==false||(a$3.start??"top bottom").trim()!=="top bottom"||(a$3.end??"bottom top").trim()!=="bottom top")return false;for(let e of d$1)if(!Ae.has(e.prop))return false;return true}function we(){let e=`ssd-a-${++Me}`,n=d$1.map(u=>`${u.prop}:${u.from}`).join(";"),x=d$1.map(u=>`${u.prop}:${u.to}`).join(";"),T=document.createElement("style");T.setAttribute("data-ssd-animate",""),T.textContent=`@keyframes ${e}{from{${n}}to{${x}}}.${e}{animation-name:${e};animation-duration:auto;animation-timing-function:${ne};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(T),t.classList.add(e);let g=()=>r==="x"?window.scrollX:window.scrollY,C=()=>r==="x"?window.innerWidth:window.innerHeight,H=()=>{let u=t.getBoundingClientRect();return c({top:u.top,height:u.height},g(),C(),K,Q)};a$1(t,{type:"animate",getProgress:()=>O.getProgress(),getTrigger:H});let O={destroy(){t.classList.remove(e),T.remove(),t.style.animationPlayState="",R(),b$3(t);},replay(){t.classList.remove(e),t.offsetWidth,t.classList.add(e);},pause(){t.style.animationPlayState="paused";},resume(){t.style.animationPlayState="";},seek(u){let B=Math.min(1,Math.max(0,u));t.classList.remove(e);for(let W of d$1)t.style.setProperty(W.prop,fe(W.from,W.to,B));},getProgress(){let{tStart:u,tEnd:B}=H();return I(b$2(g(),u,B,m))}};return O}if(Ee())return we();let y=0,h=0,v=0,P=false,b$4=false,w=-1,S=0,$=false,E=NaN,k=-1,re=0,oe=()=>p?r==="x"?p.scrollLeft:p.scrollTop:r==="x"?window.scrollX:window.scrollY,Se=()=>p?r==="x"?p.clientWidth:p.clientHeight:r==="x"?window.innerWidth:window.innerHeight;function se(){let e=a$2(ee,p,r),n=c(e,e.scroll,Se(),K,Q);y=n.tStart,h=n.tEnd;}function A(e){t.style.setProperty(pe,String(e));for(let n of d$1)t.style.setProperty(n.prop,fe(n.from,n.to,e));X?.(e);}function Te(e){if(isNaN(E)){E=e;return}E<=0&&e>0?Y?.():E>0&&e<=0&&J?.(),E<1&&e>=1?U?.():E>=1&&e<1&&Z?.(),E=e;}function V(){if(!P||b$4)return;let e=performance.now(),n=oe(),x=m;if(L!==false){let C=e-re,H=C>0?Math.abs(n-(k<0?n:k))/C:0;x=m*Math.max(.2,1+H*(typeof L=="number"?L:1)*.04);}k=n,re=e;let T=h===y?0:(n-y)/(h-y);Te(T);let g=I(b$2(n,y,h,x));i&&(w=Math.max(w,g),g=w),S=g,A(g),g>=1&&!$?($=true,N?.()):g<1&&!i&&($=false),v=requestAnimationFrame(V);}se(),h===y&&b$1("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`.",t);{let e=I(b$2(oe(),y,h,m));i&&e>0&&(w=e),S=e,A(e);}let ie=new IntersectionObserver(e=>{e.forEach(n=>{P=n.isIntersecting,P&&!b$4?v=requestAnimationFrame(V):cancelAnimationFrame(v);});},{root:p??null}),z;function M(){clearTimeout(z),z=setTimeout(se,150);}return window.addEventListener("resize",M),window.addEventListener("orientationchange",M),ie.observe(t),a$1(t,{type:"animate",getProgress:()=>S,getTrigger:()=>({tStart:y,tEnd:h})}),{destroy(){cancelAnimationFrame(v),ie.disconnect(),window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),clearTimeout(z),R(),b$3(t);},replay(){w=-1,$=false,S=0,b$4=false,A(0);},pause(){b$4=true,cancelAnimationFrame(v);},resume(){b$4&&(b$4=false,P&&(v=requestAnimationFrame(V)));},seek(e){let n=Math.min(1,Math.max(0,e));S=n,w=n,b$4=true,cancelAnimationFrame(v),A(n);},getProgress(){return S}}}export{Ve as a};
@@ -0,0 +1 @@
1
+ import {a,c,b as b$2}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';function R(n){let i=n.textContent??"";return n.textContent="",i.split(/(\s+)/).filter(Boolean).map(t=>{let e=document.createElement("span");return e.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(e.textContent=t,e.style.whiteSpace="pre"):(e.textContent=t,e.style.display="inline-block"),n.appendChild(e),/^\s+$/.test(t)?null:e}).filter(t=>t!==null)}function X(n){let i=n.textContent??"";return n.textContent="",i.split("").map(t=>{let e=document.createElement("span");return e.setAttribute("aria-hidden","true"),e.textContent=t,t===" "?e.style.whiteSpace="pre":e.style.display="inline-block",n.appendChild(e),t===" "?null:e}).filter(t=>t!==null)}function q(n){let i=R(n),t=new Map;for(let s of i){let o=s.offsetTop;t.has(o)||t.set(o,[]),t.get(o).push(s);}let e=[],c=Array.from(t.keys()).sort((s,o)=>s-o);for(let s of c){let o=t.get(s),l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",o.forEach((y,h)=>{let m=y.nextElementSibling;l.appendChild(y),h<o.length-1&&m&&m.style.whiteSpace==="pre"&&l.appendChild(m);}),e.push(l);}return n.textContent="",e.forEach((s,o)=>{n.appendChild(s),o<e.length-1&&n.appendChild(document.createTextNode(" "));}),e}function J(n,i,t,e){if(t<=1||e===0)return n;let c=(t-1)*e,s=i*e,o=s+(1-c);return o<=s?n>=s?1:0:Math.min(1,Math.max(0,(n-s)/(o-s)))}function K(n,i){let t=[];if(i?.y!==void 0&&t.push(`translateY(${i.y*(1-n)}px)`),i?.x!==void 0&&t.push(`translateX(${i.x*(1-n)}px)`),i?.rotate!==void 0&&t.push(`rotate(${i.rotate*(1-n)}deg)`),i?.scale!==void 0){let e=i.scale+(1-i.scale)*n;t.push(`scale(${e})`);}return t.join(" ")||""}var D={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ne(n,i={}){if(typeof window>"u")return D;let t=typeof n=="string"?document.querySelector(n):n;if(!t)return b("scrollText: element not found:",n),D;let e=t,{split:c$1="words",stagger:s=.04,easing:o="ease-out",from:l={opacity:0,y:24},trigger:y={},once:h=true,onComplete:m}=i,B=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Y=typeof o=="function"?o:d[o]??d["ease-out"],_=a(y.start??"top 85%"),j=a(y.end??"top 40%"),S=e.innerHTML;e.setAttribute("aria-label",e.textContent??"");let d$1;c$1==="chars"?d$1=X(e):c$1==="lines"?d$1=q(e):d$1=R(e);let G=d$1.length;function U(r,a){l?.opacity!==void 0&&(r.style.opacity=String(l.opacity+(1-l.opacity)*a));let w=K(a,l);w&&(r.style.transform=w);}function f(r){e.style.setProperty("--scroll-draw-progress",String(r)),d$1.forEach((a,w)=>{let W=Y(J(r,w,G,s));U(a,W);});}if(B)return f(1),m?.(),{destroy(){e.innerHTML=S,e.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};f(0);let C=0,M=0,p=0,T=false,u=false,b$3=-1,g=0,E=false,I=()=>window.scrollY,V=()=>window.innerHeight;function F(){let r=e.getBoundingClientRect(),a=c({top:r.top,height:r.height},I(),V(),_,j);C=a.tStart,M=a.tEnd;}function L(){if(!T||u)return;let r=b$2(I(),C,M,1);h&&(b$3=Math.max(b$3,r),r=b$3),g=r,f(r),r>=1&&!E?(E=true,m?.()):r<1&&!h&&(E=false),p=requestAnimationFrame(L);}F();let P=new IntersectionObserver(r=>{r.forEach(a=>{T=a.isIntersecting,T&&!u?p=requestAnimationFrame(L):cancelAnimationFrame(p);});}),v;function x(){clearTimeout(v),v=setTimeout(()=>{if(c$1==="lines"){let r=g;e.innerHTML=S,e.setAttribute("aria-label",e.textContent??""),d$1=q(e),f(r);}F();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),P.observe(e),a$1(e,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:C,tEnd:M})}),{destroy(){cancelAnimationFrame(p),P.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(v),e.innerHTML=S,e.removeAttribute("aria-label"),b$1(e);},replay(){b$3=-1,E=false,g=0,u=false,f(0);},pause(){u=true,cancelAnimationFrame(p);},resume(){u&&(u=false,T&&(p=requestAnimationFrame(L)));},seek(r){let a=Math.min(1,Math.max(0,r));g=a,b$3=a,u=true,cancelAnimationFrame(p),f(a);},getProgress(){return g}}}export{ne as a};
@@ -0,0 +1,3 @@
1
+ import {b as b$1,a as a$5}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a as a$1}from'./chunk-YZV4Z3EQ.mjs';import {a,c,b as b$3}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';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 $t=0;function Tt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function ct(r,b){let p="";try{p=getComputedStyle(r).getPropertyValue(b).trim();}catch{}return p||(r.getAttribute(b)??"").trim()}var ut=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function kt(r){if(!a$3)return;let b$1=ct(r,"stroke");if(!b$1||b$1==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let p=(r.getAttribute("fill")??"").trim();p&&!ut.has(p)&&!ut.has(ct(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function St(r,b,p){let E=document.createElement("div");E.setAttribute("data-svg-scroll-draw-debug",""),E.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 R(){let D=p==="x"?window.scrollX:window.scrollY,O=r-D,G=b-D,C=p==="x";E.innerHTML=`
2
+ <div style="position:absolute;${C?`left:${O}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${O}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;${C?`left:${G}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${G}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(E),window.addEventListener("scroll",R,{passive:true}),R(),{el:E,destroy(){window.removeEventListener("scroll",R),E.remove();}}}var mt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,pt=/[MmLlHhVvCcSsQqTtAaZz]/g;function At(r,b$1,p){if(!a$3)return;let E=(r.match(pt)??[]).join("").toUpperCase(),R=(b$1.match(pt)??[]).join("").toUpperCase(),D=(r.match(mt)??[]).length,O=(b$1.match(mt)??[]).length;if(E!==R){b(`morphTo: command sequence differs (${E||"\u2205"} \u2192 ${R||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,p);return}D!==O&&b(`morphTo: coordinate count differs (${D} \u2192 ${O}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,p);}function Ve(r,b,p){let E=(b.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),R=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,D=>{let O=parseFloat(D),G=E[R++]??O;return String(+(O+(G-O)*p).toFixed(4))})}function Ht(r,b$4={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:p,...E}=b$4,R=p?{...ft[p],...E}:E,D=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:O="path, polyline, line, polygon, rect, circle",speed:G=1,fade:C=false,easing:me="linear",trigger:ve={},stagger:we=0,direction:d$1="forward",once:Z=false,debug:dt=false,axis:J="y",scrollContainer:De,autoReverse:be=false,delay:pe=0,strokeColor:K,strokeWidth:ee,fillOpacity:te,waypoints:re,velocityScale:de=false,threshold:Ge=0,rootMargin:Be="0px",repeat:se=0,repeatDelay:Oe=0,morphTo:P,clip:Ce,autoplay:yt=false,duration:ht=1e3,native:gt=true,onProgress:ye,onStart:Ee,onComplete:ae,onEnter:_e,onLeave:Ue,onEnterBack:je,onLeaveBack:Xe}=R,j=Ce===true?"left":typeof Ce=="string"?Ce:false,oe=typeof me=="function"?me:d[me]??d.linear,Ye=a(ve.start??"top bottom"),Qe=a(ve.end??"bottom top"),H=typeof De=="string"?document.querySelector(De):De??null,I=Array.isArray(K)?K[0]:null,$=Array.isArray(K)?K[1]:typeof K=="string"?K:null,A=Array.isArray(ee)?ee[0]:null,T=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null,x=Array.isArray(te)?te[0]:null,k=Array.isArray(te)?te[1]:typeof te=="number"?te:null;function ne(e){let t=e*100;switch(j){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let m=j?[]:Array.from(r.querySelectorAll(O)),l=[],L=[],z=0,B=0,g=false,F=false,v=0,le=false,W=-1,$e=-1,w=false,q=0,_=0,X,Fe=null;function Ze(){Fe?.destroy(),Fe=null;}let Y=new Set,Je=NaN,Q=true,Te=-1,Ke=performance.now(),fe=NaN;function Ne(){return H?J==="x"?H.scrollLeft:H.scrollTop:J==="x"?window.scrollX:window.scrollY}function et(){return H?J==="x"?H.clientWidth:H.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function tt(){let e=a$2(r,H,J);return c(e,e.scroll,et(),Ye,Qe)}function rt(){(({tStart:z,tEnd:B}=tt())),dt&&a$3&&(Ze(),Fe=St(z,B,J));}function Re(e,t=tt){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let n=e.destroy;return e.destroy=()=>{n.call(e),b$2(r);},e}function vt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),j){let n=t==="reverse"?1-e:e;r.style.clipPath=ne(n);return}m.forEach((n,y)=>{n.style.strokeDashoffset=t==="reverse"?`${l[y]*e}`:`${l[y]*(1-e)}`,C&&(n.style.opacity=t==="reverse"?`${1-e}`:`${e}`),I&&$?n.style.stroke=a$5(I,$,e):$&&(n.style.stroke=$),A!==null&&T!==null?n.style.strokeWidth=`${A+(T-A)*e}`:T!==null&&(n.style.strokeWidth=`${T}`),x!==null&&k!==null?n.style.fillOpacity=`${x+(k-x)*e}`:k!==null&&(n.style.fillOpacity=`${k}`),P&&n.tagName.toLowerCase()==="path"&&L[y]&&n.setAttribute("d",Ve(L[y],P,e));});}function ke(){if(r.style.setProperty("--scroll-draw-progress","0"),j){r.style.clipPath=ne(0);return}m.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=d$1==="reverse"?"0":`${l[t]}`,C?e.style.opacity=d$1==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(m.forEach(e=>{kt(e);let t=a$1(e);l.push(t);let n=e.tagName.toLowerCase()==="path";n?L.push(e.getAttribute("d")??""):L.push(""),P&&(n?At(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),D?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$1==="reverse"?`${t}`:"0",C&&(e.style.opacity="1"),$&&(e.style.stroke=$),T!==null&&(e.style.strokeWidth=`${T}`),k!==null&&(e.style.fillOpacity=`${k}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$1==="reverse"?"0":`${t}`,C?e.style.opacity=d$1==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`));}),j){if(D)return r.style.clipPath=ne(1),ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ne(0);}else if(D)return ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let st=typeof me=="string"?b$1(me):null;function wt(){return !(gt===false||!Tt()||!m.length||!st||j||J!=="y"||H||G!==1||we!==0||Z||be||de!==false||P||re||se||pe>0||ye||Ee||ae||_e||Ue||je||Xe||K!=null||ee!=null||te!=null||(ve.start??"top bottom").trim()!=="top bottom"||(ve.end??"bottom top").trim()!=="bottom top")}function bt(){let e=++$t,t=`svg-scroll-draw-${e}`,n=`svg-scroll-draw-host-${e}`,y=`--svg-scroll-draw-${e}`,U=d$1==="reverse"?"0":"var(--ssd-len)",V=d$1==="reverse"?"var(--ssd-len)":"0",N=`stroke-dashoffset:${U};`,i=`stroke-dashoffset:${V};`;C&&(N+=`opacity:${d$1==="reverse"?1:0};`,i+=`opacity:${d$1==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${N}}to{${i}}}.${n}{view-timeline-name:${y};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${st};animation-fill-mode:both;animation-timeline:${y};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(n);function h(s,u){s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}m.forEach(h);let o=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:u,tEnd:M}=c({top:s.top,height:s.height},Ne(),et(),Ye,Qe);return oe(b$3(Ne(),u,M,G))}return {destroy(){r.classList.remove(n),m.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){o=false,f=-1,m.forEach(h);},pause(){o=true,m.forEach(s=>{s.style.animationPlayState="paused";});},resume(){o&&(o=false,m.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let u=Math.min(1,Math.max(0,s));f=u,o=true,m.forEach((M,S)=>{M.classList.remove(t),M.style.strokeDashoffset=d$1==="reverse"?`${l[S]*u}`:`${l[S]*(1-u)}`,C&&(M.style.opacity=d$1==="reverse"?`${1-u}`:`${u}`);});},getProgress(){return c$1()},refresh(){m.forEach((s,u)=>{l[u]=a$1(s),s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`;});}}}if(wt())return Re(bt());function Et(){let e=Math.max(1,ht),t=0,n=0,y=false;function U(o){let f=true;if(j){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);q=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ne(d$1==="reverse"?1-s:s),ye?.(s),c<1&&(f=false);}else m.forEach((c,s)=>{let u=s*we*e,M=Math.min(1,Math.max(0,(o-u)/e)),S=oe(M);c.style.strokeDashoffset=d$1==="reverse"?`${l[s]*S}`:`${l[s]*(1-S)}`,C&&(c.style.opacity=d$1==="reverse"?`${1-S}`:`${S}`),I&&$?c.style.stroke=a$5(I,$,S):$&&(c.style.stroke=$),A!==null&&T!==null?c.style.strokeWidth=`${A+(T-A)*S}`:T!==null&&(c.style.strokeWidth=`${T}`),x!==null&&k!==null?c.style.fillOpacity=`${x+(k-x)*S}`:k!==null&&(c.style.fillOpacity=`${k}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",Ve(L[s],P,S)),s===0&&(q=S,ye?.(S),r.style.setProperty("--scroll-draw-progress",String(S))),M<1&&(f=false);});if(re){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);for(let u in re){let M=parseFloat(u);s>=M&&!Y.has(M)&&(Y.add(M),re[u]?.());}}return f}function V(o){if(w)return;let f=o-t;F||(F=true,Ee?.());let c=U(f);if(c&&!g){g=true,U(e*(1+Math.max(0,m.length-1)*we)),ae?.(),_<(se==="infinite"?1/0:se??0)&&(_++,X=setTimeout(()=>{t=performance.now(),F=false,g=false,Y.clear(),ke(),v=requestAnimationFrame(V);},Oe));return}c||(v=requestAnimationFrame(V));}function N(){cancelAnimationFrame(v),clearTimeout(X),t=performance.now(),n=0,w=false,F=false,g=false,_=0,y=true,q=0,Y.clear(),ke(),v=requestAnimationFrame(V);}let i=new IntersectionObserver(o=>{o.forEach(f=>{f.isIntersecting&&!(Z&&g)?N():!f.isIntersecting&&!Z&&!g&&(cancelAnimationFrame(v),clearTimeout(X),y=false);});},{root:H??null,threshold:Ge,rootMargin:Be}),a;function h(){clearTimeout(a),a=setTimeout(()=>{m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",h),window.addEventListener("orientationchange",h),pe>0?setTimeout(()=>i.observe(r),pe):i.observe(r),{destroy(){cancelAnimationFrame(v),clearTimeout(X),i.disconnect(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),clearTimeout(a);},replay(){_=0,N();},pause(){w||!y||(w=true,n=performance.now()-t,cancelAnimationFrame(v));},resume(){w&&(w=false,y=true,t=performance.now()-n,v=requestAnimationFrame(V));},seek(o){let f=Math.min(1,Math.max(0,o));q=f,w=true,n=f*e,t=performance.now()-n,cancelAnimationFrame(v),U(n);},getProgress(){return q},refresh(){clearTimeout(a),m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});}}}if(yt)return Re(Et());rt();function Se(){if(!le||w)return;let e=performance.now(),t=Ne();if(!Q&&de===false&&t===Je){v=requestAnimationFrame(Se);return}Q=false,Je=t;let n=G;if(de!==false){let i=e-Ke,a=i>0?Math.abs(t-(Te<0?t:Te))/i:0;n=G*Math.max(.2,1+a*(typeof de=="number"?de:1)*.04);}Te=t,Ke=e;let y=be?$e===-1||t>=$e?"forward":"reverse":d$1;$e=t;let U=B-z,V=true,N=U===0?0:(t-z)/U;if(isNaN(fe)||(fe<=0&&N>0?_e?.():fe>0&&N<=0&&Xe?.(),fe<1&&N>=1?Ue?.():fe>=1&&N<1&&je?.()),fe=N,j){let i=oe(b$3(t,z,B,n));Z&&!be&&(W=Math.max(W,i),i=W),q=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=y==="reverse"?1-i:i;r.style.clipPath=ne(a),ye?.(i),!F&&b$3(t,z,B,n)>0&&(F=true,Ee?.()),i>=1&&!g?(g=true,ae?.(),_<(se==="infinite"?1/0:se??0)&&(_++,X=setTimeout(()=>{W=-1,F=false,g=false,r.style.clipPath=ne(0);},Oe))):i<1&&!Z&&(g=false),v=requestAnimationFrame(Se);return}if(m.forEach((i,a)=>{let h=a*we*U,o=oe(b$3(t,z+h,B+h,n));Z&&!be&&(W=Math.max(W,o),o=W),q=o,i.style.strokeDashoffset=y==="reverse"?`${l[a]*o}`:`${l[a]*(1-o)}`,C&&(i.style.opacity=y==="reverse"?`${1-o}`:`${o}`),I&&$?i.style.stroke=a$5(I,$,o):$&&(i.style.stroke=$),A!==null&&T!==null?i.style.strokeWidth=`${A+(T-A)*o}`:T!==null&&(i.style.strokeWidth=`${T}`),x!==null&&k!==null?i.style.fillOpacity=`${x+(k-x)*o}`:k!==null&&(i.style.fillOpacity=`${k}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",Ve(L[a],P,o)),a===0&&(ye?.(o),r.style.setProperty("--scroll-draw-progress",String(o))),o<1&&(V=false);}),re){let i=oe(b$3(t,z,B,n));for(let a in re){let h=parseFloat(a);i>=h&&!Y.has(h)&&(Y.add(h),re[a]?.());}}!F&&b$3(t,z,B,n)>0&&(F=true,Ee?.()),V&&!g?(g=true,ae?.(),_<(se==="infinite"?1/0:se??0)&&(_++,X=setTimeout(()=>{W=-1,F=false,g=false,Y.clear(),ke(),Q=true;},Oe))):!V&&!Z&&(g=false),v=requestAnimationFrame(Se);}let He=false;function Ae(){He||(He=true,v=requestAnimationFrame(function(){Se();}));}function xe(){He=false,cancelAnimationFrame(v);}let Ie=new IntersectionObserver(e=>{e.forEach(t=>{le=t.isIntersecting,le&&!w?(Q=true,Ae()):xe();});},{root:H??null,threshold:Ge,rootMargin:Be});function ot(){m.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),rt(),Q=true;}let Pe;function he(){clearTimeout(Pe),Pe=setTimeout(ot,150);}window.addEventListener("resize",he),window.addEventListener("orientationchange",he);let ge;return typeof ResizeObserver<"u"&&(ge=new ResizeObserver(()=>he()),ge.observe(document.body),ge.observe(document.documentElement),ge.observe(r)),pe>0?setTimeout(()=>Ie.observe(r),pe):Ie.observe(r),Re({destroy(){cancelAnimationFrame(v),clearTimeout(X),xe(),Ie.disconnect(),ge?.disconnect(),window.removeEventListener("resize",he),window.removeEventListener("orientationchange",he),clearTimeout(Pe),Ze();},replay(){W=-1,$e=-1,Te=-1,F=false,g=false,_=0,w=false,q=0,Y.clear(),clearTimeout(X),ke(),Q=true,le&&Ae();},pause(){w=true,xe();},resume(){w&&(w=false,Q=true,le&&Ae());},seek(e){let t=Math.min(1,Math.max(0,e));q=t,W=t,w=true,xe(),vt(t,d$1),Q=true;},getProgress(){return q},refresh(){clearTimeout(Pe),ot(),le&&!w&&Ae();}},()=>({tStart:z,tEnd:B}))}export{ft as a,Ht as b};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-AJ22VSHC.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var S={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},X={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},y="svg-scroll-draw-aos",r=(e,t)=>`translate3d(${e},${t},0)`,Z=[["fade-up",r("0","100px")],["fade-down",r("0","-100px")],["fade-right",r("-100px","0")],["fade-left",r("100px","0")],["fade-up-right",r("-100px","100px")],["fade-up-left",r("100px","100px")],["fade-down-right",r("-100px","-100px")],["fade-down-left",r("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${r("0","100px")} scale(.6)`],["zoom-in-down",`${r("0","-100px")} scale(.6)`],["zoom-in-right",`${r("-100px","0")} scale(.6)`],["zoom-in-left",`${r("100px","0")} scale(.6)`],["zoom-out-up",`${r("0","100px")} scale(1.2)`],["zoom-out-down",`${r("0","-100px")} scale(1.2)`],["zoom-out-right",`${r("-100px","0")} scale(1.2)`],["zoom-out-left",`${r("100px","0")} scale(1.2)`],["slide-up",r("0","100%")],["slide-down",r("0","-100%")],["slide-right",r("-100%","0")],["slide-left",r("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function j(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...Z.map(([o,l])=>`[data-aos=${o}]{transform:${l}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
2
+ `)}var a={...S},c=[],m=false,f=0,h,p=null,s=null,E=false,M=()=>typeof window<"u"&&typeof document<"u";function C(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var N=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function d(e,t){return e.getAttribute(`data-aos-${t}`)}function A(e,t,n){let o=d(e,t);return o==="true"?true:o==="false"?false:n}function H(e,t){let n=d(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function U(e){let t=window.innerHeight,n=d(e,"anchor-placement"),o=H(e,n),l=d(e,"anchor"),$=l?document.querySelector(l):null;l&&!$&&b$1(`aos: data-aos-anchor="${l}" matches nothing; using the element itself`);let x=$||e,u=N(x),i=C(x)-t;switch(n||a.anchorPlacement){case "center-bottom":i+=u/2;break;case "bottom-bottom":i+=u;break;case "top-center":i+=t/2;break;case "center-center":i+=t/2+u/2;break;case "bottom-center":i+=t/2+u;break;case "top-top":i+=t;break;case "bottom-top":i+=t+u;break;case "center-top":i+=t+u/2;break;}return i+o}function G(e){return C(e)+N(e)-H(e,null)}function W(e){let t=d(e,"duration")??String(a.duration),n=d(e,"delay")??String(a.delay),o=d(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",X[o]??o);}function k(){c=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=c.find(n=>n.node===e);return {node:e,in:0,out:0,once:A(e,"once",a.once),mirror:A(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:d(e,"id")}});for(let e of c)W(e.node),e.node.classList.add(a.initClassName);}function q(){for(let e of c)e.in=U(e.node),e.out=G(e.node);}function D(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function T(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),D("in",e));}function O(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),D("out",e));}function w(){f=0;let e=window.scrollY;for(let t of c){if(E){T(t);continue}t.mirror&&!t.once&&e>t.out?O(t):e>t.in?T(t):t.once||O(t);}}var I=()=>{f||(f=requestAnimationFrame(w));};function b(){clearTimeout(h),h=setTimeout(v,50);}var P=()=>v();function F(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function R(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function _(){if(document.getElementById(y))return;let e=document.createElement("style");e.id=y,e.textContent=j(a.animatedClassName),document.head.appendChild(e);}function g(){if(!m){if(m=true,s=null,k(),E)for(let e of c)e.node.setAttribute("data-aos-instant","");q(),w(),window.addEventListener("scroll",I,{passive:true}),window.addEventListener("resize",b),window.addEventListener("orientationchange",b),window.addEventListener("load",P),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(p=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&Y();}),p.observe(document.documentElement,{childList:true,subtree:true}));}}function J(e={}){if(!M())return [];if((m||s)&&B(),a={...S,...e},F())return R(),[];E=a$1(),_();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)g();else if(a.startEvent==="load"&&document.readyState==="complete")g();else {let n=a.startEvent==="load"?window:document,o=()=>g();n.addEventListener(a.startEvent,o,{once:true}),s={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function v(){m&&(q(),w());}function Y(){if(m){if(F()){R();return}k(),v();}}function B(){if(M()){s&&s.target.removeEventListener(s.type,s.fn),s=null,cancelAnimationFrame(f),f=0,clearTimeout(h),window.removeEventListener("scroll",I),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),window.removeEventListener("load",P),p?.disconnect(),p=null;for(let e of c)e.node.removeAttribute("data-aos-instant");c=[],m=false,document.getElementById(y)?.remove();}}var K={init:J,refresh:v,refreshHard:Y,destroy:B},ee=K;export{J as a,v as b,Y as c,B as d,ee as e};
@@ -0,0 +1 @@
1
+ function g(r,e,n){let t=r.getBoundingClientRect(),o=n==="x"?t.width:t.height;return e?{top:n==="x"?t.left-e.getBoundingClientRect().left+e.scrollLeft:t.top-e.getBoundingClientRect().top+e.scrollTop,height:o,scroll:0}:{top:n==="x"?t.left:t.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}export{g as a};
@@ -0,0 +1 @@
1
+ function a(t){let r=t.tagName.toLowerCase();if(r==="rect"){let e=parseFloat(t.getAttribute("width")??"0"),n=parseFloat(t.getAttribute("height")??"0");return 2*(e+n)}if(r==="circle"){let e=parseFloat(t.getAttribute("r")??"0");return 2*Math.PI*e}return t.getTotalLength()}export{a};
@@ -1,2 +1,2 @@
1
- 'use strict';function C({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),u=Math.max(.01,Math.min(.99,n)),d=Math.sqrt(u),c=0,b=[];for(let o=0;o<r;o++){let m=Math.pow(d,o);b.push(m),c+=m;}let l=[0],f=0;for(let o=0;o<r;o++)f+=b[o]/c,l.push(f);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let m=0;m<r;m++)if(o<=l[m+1]){let g=(o-l[m])/(l[m+1]-l[m]);if(m===0)return g*(2-g);let y=1-Math.pow(u,m);return y+(1-y)*(2*g-1)*(2*g-1)}return 1}}function L({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),u=Math.max(.1,n),d=r<=1?u/4:u/(2*Math.PI)*Math.asin(1/r);return c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-d)*(2*Math.PI)/u)+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:C(),elastic:L()};var P=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function v(e,...n){P&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var A=Symbol.for("svg-scroll-draw.registry");function _(){let e=globalThis;return e[A]||(e[A]=new Map)}function I(e,n){_().set(e,n);}function R(e){_().delete(e);}var k="http://www.w3.org/2000/svg",D="cinematic-photo",x=e=>e<0?0:e>1?1:e;function w(e){let n=parseFloat(e);return Number.isFinite(n)?x(n/100):0}function V(e){return h[e]??h.linear}var F={destroy:()=>{},getProgress:()=>0},T=class{constructor(n){if(typeof document>"u"){this.mount=null;return}this.mount=typeof n.wrapper=="string"?document.querySelector(n.wrapper):n.wrapper,this.mount||v("Cinematic: wrapper not found:",n.wrapper);}loadStory(n){let r=this.mount;if(typeof window>"u"||!r)return F;r.style.position="relative",r.style.height=n.totalHeight,r.style.display="block";let u=document.createElement("div");u.setAttribute("data-cinematic-stage",""),u.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(u);let d=[];for(let s of n.scenes){if(s.background){let t=document.createElement("img");t.id=D,t.src=s.background,t.alt="",t.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",u.appendChild(t);}let i=s.animations.filter(t=>t.type==="draw");if(i.length){let t=document.createElementNS(k,"svg");t.setAttribute("viewBox",`0 0 ${n.canvas.width} ${n.canvas.height}`),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",u.appendChild(t);for(let p of i){let a=document.createElementNS(k,"path");a.id=p.target.replace(/^#/,""),a.setAttribute("d",p.d),a.setAttribute("fill","none"),a.setAttribute("stroke",p.stroke),a.setAttribute("stroke-width",String(p.strokeWidth)),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round");let S=p.length||a.getTotalLength?.()||0;a.style.strokeDasharray=String(S),a.style.strokeDashoffset=String(S),t.appendChild(a),d.push({kind:"draw",el:a,start:w(p.start),end:w(p.end),ease:V(p.easing),length:S});}}for(let t of s.animations){if(t.type!=="fade")continue;let p=u.querySelector(t.target)??document.querySelector(t.target);p&&(p.style.opacity=String(t.from),d.push({kind:"fade",el:p,start:w(t.start),end:w(t.end),ease:h["ease-in-out"]??h.linear,from:t.from,to:t.to}));}}let c=0,b=()=>{let s=r.offsetHeight-window.innerHeight;return s<=0?r.getBoundingClientRect().top<=0?1:0:x(-r.getBoundingClientRect().top/s)},l=s=>{for(let i of d){let t=i.end-i.start,p=t<=0?s>=i.end?1:0:x((s-i.start)/t),a=i.ease(p);i.kind==="draw"?i.el.style.strokeDashoffset=String(i.length*(1-a)):i.el.style.opacity=String(i.from+(i.to-i.from)*a);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l(1),{destroy:()=>{},getProgress:()=>1};let f=0,o=false,m=false,g=()=>{c=b(),l(c),o&&(f=requestAnimationFrame(g));},y=()=>{o||(o=true,f=requestAnimationFrame(g));},E=()=>{o=false,cancelAnimationFrame(f);},M=new IntersectionObserver(s=>{for(let i of s)m=i.isIntersecting,m?y():E();},{threshold:0});return M.observe(u),c=b(),l(c),I(r,{type:"draw",getProgress:()=>c,getTrigger:()=>{let s=r.getBoundingClientRect().top+window.scrollY;return {tStart:s,tEnd:s+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){E(),M.disconnect(),R(r);},getProgress:()=>c}}};
1
+ 'use strict';function C({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),c=Math.max(.01,Math.min(.99,n)),p=Math.sqrt(c),u=0,h=[];for(let o=0;o<r;o++){let m=Math.pow(p,o);h.push(m),u+=m;}let l=[0],g=0;for(let o=0;o<r;o++)g+=h[o]/u,l.push(g);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let m=0;m<r;m++)if(o<=l[m+1]){let f=(o-l[m])/(l[m+1]-l[m]);if(m===0)return f*(2-f);let b=1-Math.pow(c,m);return b+(1-b)*(2*f-1)*(2*f-1)}return 1}}function D({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),c=Math.max(.1,n),p=r<=1?c/4:c/(2*Math.PI)*Math.asin(1/r);return u=>u<=0?0:u>=1?1:r*Math.pow(2,-10*u)*Math.sin((u-p)*(2*Math.PI)/c)+1}var y={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:C(),elastic:D()};var L=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function _(e,...n){L&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var x=Symbol.for("svg-scroll-draw.registry");function A(){let e=globalThis;return e[x]||(e[x]=new Map)}function k(e,n){A().set(e,n);}function R(e){A().delete(e);}var I="http://www.w3.org/2000/svg",P="cinematic-photo",E=e=>e<0?0:e>1?1:e;function w(e){let n=parseFloat(e);return Number.isFinite(n)?E(n/100):0}function H(e){return y[e]??y.linear}var V={destroy:()=>{},getProgress:()=>0},T=class{constructor(n){if(typeof document>"u"){this.mount=null;return}this.mount=typeof n.wrapper=="string"?document.querySelector(n.wrapper):n.wrapper,this.mount||_("Cinematic: wrapper not found:",n.wrapper);}loadStory(n){let r=this.mount;if(typeof window>"u"||!r)return V;r.style.position="relative",r.style.height=n.totalHeight,r.style.display="block";let c=document.createElement("div");c.setAttribute("data-cinematic-stage",""),c.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(c);let p=[];for(let i of n.scenes){if(i.background){let t=document.createElement("img");t.id=P,t.src=i.background,t.alt="",t.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",c.appendChild(t);}let s=i.animations.filter(t=>t.type==="draw");if(s.length){let t=document.createElementNS(I,"svg");t.setAttribute("viewBox",`0 0 ${n.canvas.width} ${n.canvas.height}`),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",c.appendChild(t);for(let d of s){let a=document.createElementNS(I,"path");a.id=d.target.replace(/^#/,""),a.setAttribute("d",d.d),a.setAttribute("fill","none"),a.setAttribute("stroke",d.stroke),a.setAttribute("stroke-width",String(d.strokeWidth)),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round");let S=d.length||a.getTotalLength?.()||0;a.style.strokeDasharray=String(S),a.style.strokeDashoffset=String(S),t.appendChild(a),p.push({kind:"draw",el:a,start:w(d.start),end:w(d.end),ease:H(d.easing),length:S});}}for(let t of i.animations){if(t.type!=="fade")continue;let d=c.querySelector(t.target)??document.querySelector(t.target);d&&(d.style.opacity=String(t.from),p.push({kind:"fade",el:d,start:w(t.start),end:w(t.end),ease:y["ease-in-out"]??y.linear,from:t.from,to:t.to}));}}let u=0,h=()=>{let i=r.offsetHeight-window.innerHeight;return i<=0?r.getBoundingClientRect().top<=0?1:0:E(-r.getBoundingClientRect().top/i)},l=i=>{for(let s of p){let t=s.end-s.start,d=t<=0?i>=s.end?1:0:E((i-s.start)/t),a=s.ease(d);s.kind==="draw"?s.el.style.strokeDashoffset=String(s.length*(1-a)):s.el.style.opacity=String(s.from+(s.to-s.from)*a);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l(1),{destroy:()=>{},getProgress:()=>1};let g=0,o=false,m=false,f=()=>{u=h(),l(u),o&&(g=requestAnimationFrame(f));},b=()=>{o||(o=true,g=requestAnimationFrame(f));},M=()=>{o=false,cancelAnimationFrame(g);},v=new IntersectionObserver(i=>{for(let s of i)m=s.isIntersecting,m?b():M();},{threshold:0});return v.observe(c),u=h(),l(u),k(r,{type:"draw",getProgress:()=>u,getTrigger:()=>{let i=r.getBoundingClientRect().top+window.scrollY;return {tStart:i,tEnd:i+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){M(),v.disconnect(),R(r);},getProgress:()=>u}}};
2
2
  exports.Cinematic=T;
@@ -1,2 +1 @@
1
- function C({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),u=Math.max(.01,Math.min(.99,n)),d=Math.sqrt(u),c=0,b=[];for(let o=0;o<r;o++){let m=Math.pow(d,o);b.push(m),c+=m;}let l=[0],f=0;for(let o=0;o<r;o++)f+=b[o]/c,l.push(f);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let m=0;m<r;m++)if(o<=l[m+1]){let g=(o-l[m])/(l[m+1]-l[m]);if(m===0)return g*(2-g);let y=1-Math.pow(u,m);return y+(1-y)*(2*g-1)*(2*g-1)}return 1}}function L({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),u=Math.max(.1,n),d=r<=1?u/4:u/(2*Math.PI)*Math.asin(1/r);return c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-d)*(2*Math.PI)/u)+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:C(),elastic:L()};var P=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function v(e,...n){P&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var A=Symbol.for("svg-scroll-draw.registry");function _(){let e=globalThis;return e[A]||(e[A]=new Map)}function I(e,n){_().set(e,n);}function R(e){_().delete(e);}var k="http://www.w3.org/2000/svg",D="cinematic-photo",x=e=>e<0?0:e>1?1:e;function w(e){let n=parseFloat(e);return Number.isFinite(n)?x(n/100):0}function V(e){return h[e]??h.linear}var F={destroy:()=>{},getProgress:()=>0},T=class{constructor(n){if(typeof document>"u"){this.mount=null;return}this.mount=typeof n.wrapper=="string"?document.querySelector(n.wrapper):n.wrapper,this.mount||v("Cinematic: wrapper not found:",n.wrapper);}loadStory(n){let r=this.mount;if(typeof window>"u"||!r)return F;r.style.position="relative",r.style.height=n.totalHeight,r.style.display="block";let u=document.createElement("div");u.setAttribute("data-cinematic-stage",""),u.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(u);let d=[];for(let s of n.scenes){if(s.background){let t=document.createElement("img");t.id=D,t.src=s.background,t.alt="",t.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",u.appendChild(t);}let i=s.animations.filter(t=>t.type==="draw");if(i.length){let t=document.createElementNS(k,"svg");t.setAttribute("viewBox",`0 0 ${n.canvas.width} ${n.canvas.height}`),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",u.appendChild(t);for(let p of i){let a=document.createElementNS(k,"path");a.id=p.target.replace(/^#/,""),a.setAttribute("d",p.d),a.setAttribute("fill","none"),a.setAttribute("stroke",p.stroke),a.setAttribute("stroke-width",String(p.strokeWidth)),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round");let S=p.length||a.getTotalLength?.()||0;a.style.strokeDasharray=String(S),a.style.strokeDashoffset=String(S),t.appendChild(a),d.push({kind:"draw",el:a,start:w(p.start),end:w(p.end),ease:V(p.easing),length:S});}}for(let t of s.animations){if(t.type!=="fade")continue;let p=u.querySelector(t.target)??document.querySelector(t.target);p&&(p.style.opacity=String(t.from),d.push({kind:"fade",el:p,start:w(t.start),end:w(t.end),ease:h["ease-in-out"]??h.linear,from:t.from,to:t.to}));}}let c=0,b=()=>{let s=r.offsetHeight-window.innerHeight;return s<=0?r.getBoundingClientRect().top<=0?1:0:x(-r.getBoundingClientRect().top/s)},l=s=>{for(let i of d){let t=i.end-i.start,p=t<=0?s>=i.end?1:0:x((s-i.start)/t),a=i.ease(p);i.kind==="draw"?i.el.style.strokeDashoffset=String(i.length*(1-a)):i.el.style.opacity=String(i.from+(i.to-i.from)*a);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l(1),{destroy:()=>{},getProgress:()=>1};let f=0,o=false,m=false,g=()=>{c=b(),l(c),o&&(f=requestAnimationFrame(g));},y=()=>{o||(o=true,f=requestAnimationFrame(g));},E=()=>{o=false,cancelAnimationFrame(f);},M=new IntersectionObserver(s=>{for(let i of s)m=i.isIntersecting,m?y():E();},{threshold:0});return M.observe(u),c=b(),l(c),I(r,{type:"draw",getProgress:()=>c,getTrigger:()=>{let s=r.getBoundingClientRect().top+window.scrollY;return {tStart:s,tEnd:s+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){E(),M.disconnect(),R(r);},getProgress:()=>c}}};
2
- export{T as Cinematic};
1
+ export{a as Cinematic}from'../chunk-KGAJQP2N.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1 +1 @@
1
- var E=Symbol.for("svg-scroll-draw.registry");function L(){let e=globalThis;return e[E]||(e[E]=new Map)}function g(){return L()}var h=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";var v={draw:"#60a5fa",animate:"#4ade80",counter:"#fbbf24",video:"#c084fc",text:"#fb923c",pin:"#f43f5e",snap:"#22d3ee"},n=null,o=null,b=0,p=false,m=null;function R(){o?.remove(),o=document.createElement("div"),o.setAttribute("data-ssd-devtools-overlay",""),o.style.cssText="position:fixed;pointer-events:none;z-index:99998;inset:0;overflow:hidden;",document.body.appendChild(o);}function M(){if(!o)return;o.innerHTML="";let e=window.scrollY,l=window.innerHeight;for(let[,t]of g()){let{tStart:i,tEnd:r}=t.getTrigger(),d=v[t.type]??"#60a5fa",f=i-e,s=r-e;if(s<-100||f>l+100)continue;let c=(u,y)=>{let a=document.createElement("div");a.style.cssText=`position:absolute;left:0;right:0;top:${u}px;height:2px;background:${d};opacity:0.85;`;let x=document.createElement("span");return x.textContent=y,x.style.cssText=`position:absolute;right:8px;top:-18px;font:bold 9px/1 monospace;color:#fff;background:${d};padding:2px 5px;border-radius:3px;white-space:nowrap;`,a.appendChild(x),a};o.appendChild(c(f,`\u25B6 ${t.type}:start`)),o.appendChild(c(s,`\u25A0 ${t.type}:end`));}}function $(){n?.remove(),n=document.createElement("div"),n.setAttribute("data-ssd-devtools-panel",""),n.style.cssText="position:fixed;bottom:12px;right:12px;z-index:99999;background:rgba(10,10,10,0.92);color:#e8e8e3;border-radius:10px;border:1px solid #333;font:12px/1.5 monospace;padding:10px 14px;min-width:220px;max-width:280px;pointer-events:none;backdrop-filter:blur(4px);";let e=document.createElement("div");e.style.cssText="font-weight:bold;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#888;margin-bottom:8px;",e.textContent="\u26A1 svg-scroll-draw devtools",n.appendChild(e),document.body.appendChild(n);}function S(){if(!n)return;for(;n.children.length>1;)n.removeChild(n.lastChild);let e=g();if(e.size===0){let t=document.createElement("div");t.style.cssText="color:#555;font-size:11px;",t.textContent="No active instances.",n.appendChild(t);return}for(let[t,i]of e){let r=i.getProgress(),d=v[i.type]??"#60a5fa",f=t.id?`#${t.id}`:t.className?`.${t.className.split(" ")[0]}`:i.type,s=document.createElement("div");s.style.cssText="margin-bottom:6px;";let c=document.createElement("div");c.style.cssText=`font-size:10px;color:${d};margin-bottom:2px;`,c.textContent=`${i.type} ${f}`;let u=document.createElement("div");u.style.cssText="height:6px;background:#222;border-radius:3px;overflow:hidden;";let y=document.createElement("div");y.style.cssText=`height:100%;width:${Math.round(r*100)}%;background:${d};border-radius:3px;transition:width 0.1s;`,u.appendChild(y),s.appendChild(c),s.appendChild(u);let a=document.createElement("div");a.style.cssText="font-size:9px;color:#555;text-align:right;margin-top:1px;",a.textContent=`${Math.round(r*100)}%`,s.appendChild(a),n.appendChild(s);}}function w(){M(),S(),b=requestAnimationFrame(w);}function T(){h&&(p||(p=true,R(),$(),b=requestAnimationFrame(w),m=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key.toLowerCase()==="s"&&(e.preventDefault(),C());},window.addEventListener("keydown",m)));}function _(){p&&(p=false,cancelAnimationFrame(b),n?.remove(),n=null,o?.remove(),o=null,m&&(window.removeEventListener("keydown",m),m=null));}function C(){p?_():T();}function k(e){if(!p)return;let l=typeof e=="string"?document.querySelector(e):e;if(!l)return;let t=g().get(l);if(!t)return;let i=v[t.type]??"#60a5fa",r=l,d=r.style.outline;r.style.outline=`2px solid ${i}`,r.style.outlineOffset="2px",setTimeout(()=>{r.style.outline=d,r.style.outlineOffset="";},2e3);}var A={enable:T,disable:_,toggle:C,highlight:k};export{A as devtools};
1
+ import {c}from'../chunk-BCV4RAIX.mjs';import {a}from'../chunk-LFSU6LR3.mjs';var v={draw:"#60a5fa",animate:"#4ade80",counter:"#fbbf24",video:"#c084fc",text:"#fb923c",pin:"#f43f5e",snap:"#22d3ee"},n=null,o=null,h=0,p=false,m=null;function L(){o?.remove(),o=document.createElement("div"),o.setAttribute("data-ssd-devtools-overlay",""),o.style.cssText="position:fixed;pointer-events:none;z-index:99998;inset:0;overflow:hidden;",document.body.appendChild(o);}function $(){if(!o)return;o.innerHTML="";let e=window.scrollY,l=window.innerHeight;for(let[,t]of c()){let{tStart:r,tEnd:i}=t.getTrigger(),d=v[t.type]??"#60a5fa",f=r-e,s=i-e;if(s<-100||f>l+100)continue;let c=(u,x)=>{let a=document.createElement("div");a.style.cssText=`position:absolute;left:0;right:0;top:${u}px;height:2px;background:${d};opacity:0.85;`;let g=document.createElement("span");return g.textContent=x,g.style.cssText=`position:absolute;right:8px;top:-18px;font:bold 9px/1 monospace;color:#fff;background:${d};padding:2px 5px;border-radius:3px;white-space:nowrap;`,a.appendChild(g),a};o.appendChild(c(f,`\u25B6 ${t.type}:start`)),o.appendChild(c(s,`\u25A0 ${t.type}:end`));}}function M(){n?.remove(),n=document.createElement("div"),n.setAttribute("data-ssd-devtools-panel",""),n.style.cssText="position:fixed;bottom:12px;right:12px;z-index:99999;background:rgba(10,10,10,0.92);color:#e8e8e3;border-radius:10px;border:1px solid #333;font:12px/1.5 monospace;padding:10px 14px;min-width:220px;max-width:280px;pointer-events:none;backdrop-filter:blur(4px);";let e=document.createElement("div");e.style.cssText="font-weight:bold;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#888;margin-bottom:8px;",e.textContent="\u26A1 svg-scroll-draw devtools",n.appendChild(e),document.body.appendChild(n);}function k(){if(!n)return;for(;n.children.length>1;)n.removeChild(n.lastChild);let e=c();if(e.size===0){let t=document.createElement("div");t.style.cssText="color:#555;font-size:11px;",t.textContent="No active instances.",n.appendChild(t);return}for(let[t,r]of e){let i=r.getProgress(),d=v[r.type]??"#60a5fa",f=t.id?`#${t.id}`:t.className?`.${t.className.split(" ")[0]}`:r.type,s=document.createElement("div");s.style.cssText="margin-bottom:6px;";let c=document.createElement("div");c.style.cssText=`font-size:10px;color:${d};margin-bottom:2px;`,c.textContent=`${r.type} ${f}`;let u=document.createElement("div");u.style.cssText="height:6px;background:#222;border-radius:3px;overflow:hidden;";let x=document.createElement("div");x.style.cssText=`height:100%;width:${Math.round(i*100)}%;background:${d};border-radius:3px;transition:width 0.1s;`,u.appendChild(x),s.appendChild(c),s.appendChild(u);let a=document.createElement("div");a.style.cssText="font-size:9px;color:#555;text-align:right;margin-top:1px;",a.textContent=`${Math.round(i*100)}%`,s.appendChild(a),n.appendChild(s);}}function E(){$(),k(),h=requestAnimationFrame(E);}function T(){a&&(p||(p=true,L(),M(),h=requestAnimationFrame(E),m=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key.toLowerCase()==="s"&&(e.preventDefault(),C());},window.addEventListener("keydown",m)));}function w(){p&&(p=false,cancelAnimationFrame(h),n?.remove(),n=null,o?.remove(),o=null,m&&(window.removeEventListener("keydown",m),m=null));}function C(){p?w():T();}function H(e){if(!p)return;let l=typeof e=="string"?document.querySelector(e):e;if(!l)return;let t=c().get(l);if(!t)return;let r=v[t.type]??"#60a5fa",i=l,d=i.style.outline;i.style.outline=`2px solid ${r}`,i.style.outlineOffset="2px",setTimeout(()=>{i.style.outline=d,i.style.outlineOffset="";},2e3);}var K={enable:T,disable:w,toggle:C,highlight:H};export{K as devtools};
@@ -0,0 +1,57 @@
1
+ import { T as TriggerConfig, E as EasingName } from './types-DHU1zNEw.js';
2
+
3
+ interface ScrollAnimateOptions {
4
+ props: Record<string, string | number | [string | number, string | number]>;
5
+ trigger?: TriggerConfig;
6
+ easing?: EasingName | ((t: number) => number);
7
+ speed?: number;
8
+ once?: boolean;
9
+ axis?: 'x' | 'y';
10
+ scrollContainer?: string | Element;
11
+ native?: boolean;
12
+ /**
13
+ * Scale animation speed by scroll velocity — faster scrolling = faster animation.
14
+ * Pass `true` for default sensitivity (1) or a number to control it.
15
+ * Higher values = more dramatic speed-up. Default sensitivity: 1.
16
+ */
17
+ velocityScale?: boolean | number;
18
+ /**
19
+ * Honour `prefers-reduced-motion: reduce` by applying the final state and not
20
+ * animating. Default: `true`.
21
+ *
22
+ * Set to `false` only when the movement is *scroll-linked scrubbing* rather
23
+ * than autonomous motion — it advances solely as the user scrolls, 1:1 with
24
+ * their input, so it is direct manipulation rather than something that plays at
25
+ * them. `scrollHorizontal` sets this, because jumping to the final state there
26
+ * would leave every panel but the last unreachable inside the sticky
27
+ * `overflow: hidden` container.
28
+ */
29
+ respectReducedMotion?: boolean;
30
+ /**
31
+ * Element whose geometry defines the trigger window, when that is not the
32
+ * element being animated. Defaults to the animated element.
33
+ *
34
+ * Needed whenever the animated element cannot supply the scroll length itself —
35
+ * the case that matters is a `position: sticky` stage, where the pinned element
36
+ * is exactly one viewport tall and all of the scroll room belongs to its
37
+ * container. Resolving `top top` → `bottom bottom` against the pinned element
38
+ * there yields tStart === tEnd, a zero-length window, and no movement at all.
39
+ *
40
+ * Setting this disables the native CSS fast path: `animation-timeline: view()`
41
+ * always measures the element the animation is attached to, so it cannot express
42
+ * a separate subject.
43
+ */
44
+ triggerElement?: Element;
45
+ onProgress?: (alpha: number) => void;
46
+ onComplete?: () => void;
47
+ /** Fires when scroll enters the trigger zone (scrolling forward). */
48
+ onEnter?: () => void;
49
+ /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
50
+ onLeave?: () => void;
51
+ /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
52
+ onEnterBack?: () => void;
53
+ /** Fires when scroll exits the trigger zone at the start (scrolling back). */
54
+ onLeaveBack?: () => void;
55
+ }
56
+
57
+ export type { ScrollAnimateOptions as S };
@@ -0,0 +1,57 @@
1
+ import { T as TriggerConfig, E as EasingName } from './types-DHU1zNEw.mjs';
2
+
3
+ interface ScrollAnimateOptions {
4
+ props: Record<string, string | number | [string | number, string | number]>;
5
+ trigger?: TriggerConfig;
6
+ easing?: EasingName | ((t: number) => number);
7
+ speed?: number;
8
+ once?: boolean;
9
+ axis?: 'x' | 'y';
10
+ scrollContainer?: string | Element;
11
+ native?: boolean;
12
+ /**
13
+ * Scale animation speed by scroll velocity — faster scrolling = faster animation.
14
+ * Pass `true` for default sensitivity (1) or a number to control it.
15
+ * Higher values = more dramatic speed-up. Default sensitivity: 1.
16
+ */
17
+ velocityScale?: boolean | number;
18
+ /**
19
+ * Honour `prefers-reduced-motion: reduce` by applying the final state and not
20
+ * animating. Default: `true`.
21
+ *
22
+ * Set to `false` only when the movement is *scroll-linked scrubbing* rather
23
+ * than autonomous motion — it advances solely as the user scrolls, 1:1 with
24
+ * their input, so it is direct manipulation rather than something that plays at
25
+ * them. `scrollHorizontal` sets this, because jumping to the final state there
26
+ * would leave every panel but the last unreachable inside the sticky
27
+ * `overflow: hidden` container.
28
+ */
29
+ respectReducedMotion?: boolean;
30
+ /**
31
+ * Element whose geometry defines the trigger window, when that is not the
32
+ * element being animated. Defaults to the animated element.
33
+ *
34
+ * Needed whenever the animated element cannot supply the scroll length itself —
35
+ * the case that matters is a `position: sticky` stage, where the pinned element
36
+ * is exactly one viewport tall and all of the scroll room belongs to its
37
+ * container. Resolving `top top` → `bottom bottom` against the pinned element
38
+ * there yields tStart === tEnd, a zero-length window, and no movement at all.
39
+ *
40
+ * Setting this disables the native CSS fast path: `animation-timeline: view()`
41
+ * always measures the element the animation is attached to, so it cannot express
42
+ * a separate subject.
43
+ */
44
+ triggerElement?: Element;
45
+ onProgress?: (alpha: number) => void;
46
+ onComplete?: () => void;
47
+ /** Fires when scroll enters the trigger zone (scrolling forward). */
48
+ onEnter?: () => void;
49
+ /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
50
+ onLeave?: () => void;
51
+ /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
52
+ onEnterBack?: () => void;
53
+ /** Fires when scroll exits the trigger zone at the start (scrolling back). */
54
+ onLeaveBack?: () => void;
55
+ }
56
+
57
+ export type { ScrollAnimateOptions as S };