@wix/interact 2.5.11 → 2.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";function kt(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function _(e,t){const n=kt(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function Pt(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&V(e)===V(t)}function V(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}function Ye(e){let t=0,n=0;for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t=(t<<5)-t+i|0,n=n<<3^n>>>2^i|0}return((t>>>0)*1048576+(n>>>0)%1048576).toString(36)}class K{animations;options;ready;isCSS;longestAnimation;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation,this.longestAnimation=this._getAnimationWithLongestEndTime()}_getAnimationWithLongestEndTime(){return this.animations.reduce((t,n)=>{const s=t.effect?.getComputedTiming().endTime??0,i=n.effect?.getComputedTiming().endTime??0;return s>i?t:n},this.animations[0])}getProgress(){return this.longestAnimation?.effect?.getComputedTiming().progress||0}async play(t){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}pause(){for(const t of this.animations)t.pause()}async reverse(t){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}progress(t){for(const n of this.animations){const{delay:s,duration:i,iterations:r}=n.effect.getTiming(),o=(Number.isFinite(i)?i:0)*(Number.isFinite(r)?r:1);n.currentTime=((s||0)+o)*t}}cancel(){for(const t of this.animations)t.cancel()}setPlaybackRate(t){for(const n of this.animations)n.playbackRate=t}async onFinish(t){try{await Promise.all(this.animations.map(s=>s.finished));const n=this.animations[0];if(n&&!this.isCSS){const s=n.effect?.target;if(s){const i=this.options?.effectId||n.id,r=new CustomEvent("animationend",{detail:{effectId:i}});s.dispatchEvent(r)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}async onAbort(t){try{await Promise.all(this.animations.map(n=>n.finished))}catch(n){if(n.name==="AbortError"){const s=this.animations[0];if(s&&!this.isCSS){const i=s.effect?.target;if(i){const r=new Event("animationcancel");i.dispatchEvent(r)}}t()}}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations.some(t=>t.playState==="running")?"running":this.animations[0]?.playState}hasAnimationName(t){return this.animations.some(n=>n.animationName===t)}hasAnimationId(t){return this.animations.some(n=>n.id===t)}getTimingOptions(){return this.animations.map(t=>{const n=t.effect?.getTiming(),s=n?.delay??0,i=Number(n?.duration)||0,r=n?.iterations??1;return{delay:s,duration:i,iterations:r}})}}const Be=e=>e,Mt=e=>1-Math.cos(e*Math.PI/2),xt=e=>Math.sin(e*Math.PI/2),Lt=e=>-(Math.cos(Math.PI*e)-1)/2,Ft=e=>e**2,Rt=e=>1-(1-e)**2,Nt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,zt=e=>e**3,jt=e=>1-(1-e)**3,Dt=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Gt=e=>e**4,Ht=e=>1-(1-e)**4,Wt=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Vt=e=>e**5,Yt=e=>1-(1-e)**5,Bt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Kt=e=>e===0?0:2**(10*e-10),Ut=e=>e===1?1:1-2**(-10*e),Qt=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Xt=e=>1-Math.sqrt(1-e**2),Zt=e=>Math.sqrt(1-(e-1)**2),Jt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,en=e=>2.70158*e**3-1.70158*e**2,tn=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,nn=(e,t=1.70158*1.525)=>e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2,qe={linear:Be,sineIn:Mt,sineOut:xt,sineInOut:Lt,quadIn:Ft,quadOut:Rt,quadInOut:Nt,cubicIn:zt,cubicOut:jt,cubicInOut:Dt,quartIn:Gt,quartOut:Ht,quartInOut:Wt,quintIn:Vt,quintOut:Yt,quintInOut:Bt,expoIn:Kt,expoOut:Ut,expoInOut:Qt,circIn:Xt,circOut:Zt,circInOut:Jt,backIn:en,backOut:tn,backInOut:nn},j=(e,t,n,s,i)=>{const r=3*t,o=3*(s-2*t),c=1-3*s+3*t,a=3*n,f=3*(i-2*n),u=1-3*i+3*n;let l;if(c===0)l=o===0?`(${e} / ${r})`:`((sqrt(max(0, ${r*r} + ${4*o} * ${e})) - ${r}) / ${2*o})`;else{const d=o/(3*c),v=2*Math.pow(o,3)-9*r*o*c,h=54*Math.pow(c,3),m=(3*c*r-o*o)/(9*c*c),p=`((${v} - ${27*c*c} * ${e}) / ${h})`;if(m<0){const g=2*Math.sqrt(-m);let E=0;for(const w of[0,1,2])[0,.25,.5,.75,1].every(S=>{const I=Math.min(Math.max(2*(v-27*c*c*S)/(h*m*g),-1),1),T=g*Math.cos((Math.acos(I)-w*2*Math.PI)/3)-d;return T>=-1e-6&&T<=1.000001})&&(E=w);const y=`(acos(clamp(-1, ${2/(m*g)} * ${p}, 1)) - ${360*E}deg) / 3`;l=`(${g} * cos(${y}) - ${d})`}else{const g=`sqrt(pow(${p}, 2) + ${Math.pow(m,3)})`;l=`(pow(${g} - ${p}, 1 / 3) - pow(${g} + ${p}, 1 / 3) - ${d})`}}return`(${u} * pow(${l}, 3) + ${f} * pow(${l}, 2) + ${a} * ${l})`},_e={linear:e=>e,ease:e=>j(e,.25,.1,.25,1),easeIn:e=>j(e,.42,0,1,1),easeOut:e=>j(e,0,0,.58,1),easeInOut:e=>j(e,.42,0,.58,1),sineIn:e=>`(1 - cos(${e} * 90deg))`,sineOut:e=>`(sin(${e} * 90deg))`,sineInOut:e=>`((1 - cos(${e} * 180deg)) / 2)`,quadIn:e=>`(${e} * ${e})`,quadOut:e=>`(1 - (1 - ${e}) * (1 - ${e}))`,quadInOut:e=>`(round(${e}) * (1 - (-2 * ${e} + 2) * (-2 * ${e} + 2) / 2) + (1 - round(${e})) * 2 * ${e} * ${e})`,cubicIn:e=>`pow(${e}, 3)`,cubicOut:e=>`(1 - pow(1 - ${e}, 3))`,cubicInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 3) / 2) + (1 - round(${e})) * 4 * pow(${e}, 3))`,quartIn:e=>`pow(${e}, 4)`,quartOut:e=>`(1 - pow(1 - ${e}, 4))`,quartInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 4) / 2) + (1 - round(${e})) * 8 * pow(${e}, 4))`,quintIn:e=>`pow(${e}, 5)`,quintOut:e=>`(1 - pow(1 - ${e}, 5))`,quintInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 5) / 2) + (1 - round(${e})) * 16 * pow(${e}, 5))`,expoIn:e=>`(pow(2, 10 * ${e} - 10) - pow(2, -10) * (1 - ${e}))`,expoOut:e=>`(1 - pow(2, -10 * ${e}) + pow(2, -10) * ${e})`,expoInOut:e=>`((round(${e}) * (2 - pow(2, -20 * ${e} + 10)) + (1 - round(${e})) * pow(2, 20 * ${e} - 10)) / 2)`,circIn:e=>`(1 - sqrt(1 - ${e} * ${e}))`,circOut:e=>`sqrt(1 - (${e} - 1) * (${e} - 1))`,circInOut:e=>`((round(${e}) * (sqrt(max(0, (3 - 2 * ${e}) * (2 * ${e} - 1))) + 1) + (1 - round(${e})) * (1 - sqrt(max(0, 1 - 4 * ${e} * ${e})))) / 2)`,backIn:e=>`(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,backOut:e=>`(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,backInOut:e=>`((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`},ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function sn(e){return e==="percentage"?"%":e||"px"}const rn=/^(webkit|moz|ms|o)(?=[A-Z])/,on=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function ue(e){return e.startsWith("--")?e:(rn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function cn(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Ke(e){return on[e]||cn(e)}function an(e){for(const t in e)if(Object.hasOwn(e,t)&&Ke(t)!==t)return!0;return!1}function un(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!an(n))return;t??=e.slice();const i={};for(const r in n)Object.hasOwn(n,r)&&(i[Ke(r)]=n[r]);t[s]=i}),t||e}function se(e){return e?ke[e]||e:ke.linear}function fn(e,t,n,s){const i=3*e,r=3*(n-e)-i,o=1-i-r,c=3*t,a=3*(s-t)-c,f=1-c-a,u=h=>((o*h+r)*h+i)*h,l=h=>((f*h+a)*h+c)*h,d=h=>(3*o*h+2*r)*h+i;function v(h){let m=h;for(let E=0;E<8;E++){const y=u(m)-h;if(Math.abs(y)<1e-7)return m;const w=d(m);if(Math.abs(w)<1e-6)break;m-=y/w}let p=0,g=1;for(m=(p+g)/2;g-p>1e-7;){const E=u(m);if(Math.abs(E-h)<1e-7)return m;h>E?p=m:g=m,m=(p+g)/2}return m}return h=>h<=0?0:h>=1?1:l(v(h))}function Ue(e){const t=e.match(/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);if(!t)return;const n=parseFloat(t[1]),s=parseFloat(t[2]),i=parseFloat(t[3]),r=parseFloat(t[4]);if(![n,s,i,r].some(isNaN))return[n,s,i,r]}function ln(e){const t=Ue(e);if(!(!t||t.some(isNaN)))return fn(...t)}function dn(e){const t=Ue(e);if(!(!t||t.some(isNaN)))return n=>j(n,...t)}function Qe(e){const t=e.match(/^linear\((.+)\)$/);if(!t)return;const n=t[1].split(",").map(r=>r.trim()).filter(Boolean);if(n.length===0)return;const s=[];for(const r of n){const o=r.split(/\s+/),c=parseFloat(o[0]);if(isNaN(c))return;const a=[];for(let f=1;f<o.length;f++)if(o[f].endsWith("%")){const u=parseFloat(o[f])/100;if(isNaN(u))return;a.push(u)}a.length===0?s.push({output:c,pos:null}):a.length===1?s.push({output:c,pos:a[0]}):(s.push({output:c,pos:a[0]}),s.push({output:c,pos:a[1]}))}if(s.length===0)return;s[0].pos===null&&(s[0].pos=0),s[s.length-1].pos===null&&(s[s.length-1].pos=1);let i=0;for(;i<s.length;)if(s[i].pos===null){const r=i-1;let o=i;for(;o<s.length&&s[o].pos===null;)o++;const c=s[r].pos,a=s[o].pos,f=o-r;for(let u=r+1;u<o;u++)s[u].pos=c+(a-c)*(u-r)/f;i=o+1}else i++;for(let r=1;r<s.length;r++)s[r].pos<s[r-1].pos&&(s[r].pos=s[r-1].pos);return s}function hn(e){const t=Qe(e);if(t)return n=>{if(n<=t[0].pos)return t[0].output;const s=t[t.length-1];if(n>=s.pos)return s.output;let i=0,r=t.length-1;for(;i<r-1;){const a=i+r>>>1;t[a].pos<=n?i=a:r=a}const o=t[i],c=t[r];return c.pos===o.pos?c.output:o.output+(c.output-o.output)*(n-o.pos)/(c.pos-o.pos)}}function mn(e){const t=Qe(e);if(t)return n=>{const s=[`${t[0].output}`];for(let i=1;i<t.length;i++){const r=t[i].pos-t[i-1].pos,o=t[i].output-t[i-1].output;if(r===0&&t[i-1].pos===0)s.push(`${o}`);else{const c=r===0?`round(${n} / ${2*t[i-1].pos})`:`(${n} - ${t[i-1].pos}) / ${r}`;s.push(`clamp(0, ${c}, 1) * ${o}`)}}return`(${s.join(" + ")})`}}function Xe(e){if(!e)return;const t=qe[e];return t||(ln(e)??hn(e)??qe.linear)}function pn(e){if(!e)return;const t=_e[e];return t||(dn(e)??mn(e)??_e.linear)}class gn extends K{animationGroups;delay;offset;offsetEasing;sequenceId;timingOptions;constructor(t,n={}){const s=t.flatMap(i=>[...i.animations]);super(s),this.animationGroups=t,this.delay=n.delay??0,this.offset=n.offset??0,this.sequenceId=n.sequenceId,this.offsetEasing=typeof n.offsetEasing=="function"?n.offsetEasing:Xe(n.offsetEasing)??Be,this.timingOptions=this.animationGroups.map(i=>i.getTimingOptions().map(({delay:r,duration:o,iterations:c})=>({delay:r,duration:Number.isFinite(o)?o:0,iterations:Number.isFinite(c)?c:1}))),this.applyOffsets(),this.ready=Promise.all(t.map(i=>i.ready)).then(()=>{})}calculateOffsets(){const t=this.animationGroups.length;if(t<=1)return[0];const n=t-1;return Array.from({length:t},(s,i)=>this.offsetEasing(i/n)*n*this.offset|0)}applyOffsets(){if(this.animationGroups.length===0||this.animations.length===0)return;const t=this.calculateOffsets(),n=this.getSequenceActiveDuration(t),s=this.animationGroups.length-1;this.animationGroups.forEach((i,r)=>{i.animations.forEach((o,c)=>{const a=o.effect;if(!a)return;const{delay:f,duration:u,iterations:l}=this.timingOptions[r][c],d=f+t[r],v=n-(d+u*l);if(i.isCSS&&this.sequenceId){const{target:h}=a;h instanceof HTMLElement&&(h.style.setProperty(`--motion-${this.sequenceId}-index`,`${r}`),h.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),a.updateTiming({endDelay:v})}else a.updateTiming({delay:d+this.delay,endDelay:v})})})}getSequenceActiveDuration(t){const n=[];for(let s=0;s<this.timingOptions.length;s++){const i=this.timingOptions[s].reduce((r,o)=>{if(!o)return r;const{delay:c,duration:a,iterations:f}=o;return Math.max(r,c+a*f)},0);n.push(t[s]+i)}return Math.max(...n)}addGroups(t){if(t.length===0)return;const n=[...t].sort((s,i)=>i.index-s.index);for(const{index:s,group:i}of n){const r=Math.min(s,this.animationGroups.length);this.animationGroups.splice(r,0,i),this.timingOptions.splice(r,0,i.getTimingOptions());const o=[...i.animations],c=this.animationGroups.slice(0,r).reduce((a,f)=>a+f.animations.length,0);this.animations.splice(c,0,...o)}this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(s=>s.ready)).then(()=>{})}removeGroups(t){const n=[],s=[],i=[];for(let r=0;r<this.animationGroups.length;r++)t(this.animationGroups[r])?n.push(this.animationGroups[r]):(s.push(this.animationGroups[r]),i.push(this.timingOptions[r]));if(n.length===0)return n;for(const r of n)r.cancel();return this.animationGroups=s,this.timingOptions=i,this.animations=s.flatMap(r=>[...r.animations]),this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(r=>r.ready)).then(()=>{}),n}async onFinish(t){try{await Promise.all(this.animationGroups.map(n=>n.finished)),t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}}class vn{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,i){const r=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:o}=i;this._animation=new Animation(r,o),this._tickCbId=null,this.progress=null,this.customEffect=c=>t(r.target,c),this._finishHandler=c=>{this.effect.target?.getAnimations().find(a=>a===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const t=this.effect?.getComputedTiming().progress??null;t!==this.progress&&(this.customEffect?.(t),this.progress=t),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(t){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${t instanceof Error?t.message:t}`)}}get currentTime(){return this._animation.currentTime}set currentTime(t){this._animation.currentTime=t}get startTime(){return this._animation.startTime}set startTime(t){this._animation.startTime=t}get playbackRate(){return this._animation.playbackRate}set playbackRate(t){this._animation.playbackRate=t}get id(){return this._animation.id}set id(t){this._animation.id=t}get effect(){return this._animation.effect}set effect(t){this._animation.effect=t}get timeline(){return this._animation.timeline}set timeline(t){this._animation.timeline=t}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(t){this._animation.oncancel=t}get onfinish(){return this._animation.onfinish}set onfinish(t){this._animation.onfinish=t}get onremove(){return this._animation.onremove}set onremove(t){this._animation.onremove=t}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(t){this._animation.updatePlaybackRate(t)}addEventListener(t,n,s){this._animation.addEventListener(t,n,s)}removeEventListener(t,n,s){this._animation.removeEventListener(t,n,s)}dispatchEvent(t){return this._animation.dispatchEvent(t)}}function yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie={exports:{}},Pe=ie.exports,Me;function En(){return Me||(Me=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function i(){var u=this;u.reads=[],u.writes=[],u.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(u){for(var l;l=u.shift();)l()},measure:function(u,l){var d=l?u.bind(l):u;return this.reads.push(d),r(this),d},mutate:function(u,l){var d=l?u.bind(l):u;return this.writes.push(d),r(this),d},clear:function(u){return c(this.reads,u)||c(this.writes,u)},extend:function(u){if(typeof u!="object")throw new Error("expected object");var l=Object.create(this);return a(l,u),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function r(u){u.scheduled||(u.scheduled=!0,u.raf(o.bind(null,u)))}function o(u){var l=u.writes,d=u.reads,v;try{n("flushing reads",d.length),u.runTasks(d),n("flushing writes",l.length),u.runTasks(l)}catch(h){v=h}if(u.scheduled=!1,(d.length||l.length)&&r(u),v)if(n("task errored",v.message),u.catch)u.catch(v);else throw v}function c(u,l){var d=u.indexOf(l);return!!~d&&!!u.splice(d,1)}function a(u,l){for(var d in l)l.hasOwnProperty(d)&&(u[d]=l[d])}var f=t.fastdom=t.fastdom||new i;e.exports=f})(typeof window<"u"?window:typeof Pe<"u"?Pe:globalThis)})(ie)),ie.exports}var wn=En();const O=yn(wn),Ee={};function bn(e){Object.assign(Ee,e)}function $n(e){return e in Ee?Ee[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function z(e,t){return e?(t||document).getElementById(e):null}function Sn(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function In(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function pe(e){return`${e.value}${sn(e.unit)}`}function xe(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${pe(e.offset)}${t?` + ${t}`:""})`:t?`calc(${pe(e.offset)} + ${t})`:pe(e.offset)}`}function Ze(e){return{start:xe(e.startOffset,e.startOffsetAdd),end:xe(e.endOffset,e.endOffsetAdd,!0)}}function Je(e){return t=>O.measure(()=>t(e))}function et(e){return t=>O.mutate(()=>t(e))}function Y(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?$n(t):null}else if(e.keyframeEffect){const t=s=>{const{name:i,keyframes:r}=s.keyframeEffect;return[{...s,name:i,keyframes:r}]};return{web:t,style:t,getNames:s=>{const{effectId:i}=s,{name:r}=s.keyframeEffect,o=r||i;return o?[o]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function tt(e,t,n,s){return e.map((i,r)=>{const o={fill:i.fill,easing:se(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:In(i)};Ae(t)?(o.duration=i.duration,o.delay=i.delay||0):t?.trigger==="view-progress"&&(s||window.ViewTimeline)?o.duration="auto":(o.duration=99.99,o.delay=.01);const c=un(i.keyframes);return{effect:c===i.keyframes?i:{...i,keyframes:c},options:o,id:n&&`${n}-${r+1}`,part:i.part}})}function Ae(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function Le(e,t,n,s,i){if(e){if(Ae(s)&&(t.duration=t.duration||1,i?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let r;return n instanceof HTMLElement&&(r={measure:Je(n),mutate:et(n)}),e.web?e.web(t,r,i):e(t,r,i)}return[]}function nt(e,t,n,s,i){const r=typeof e=="string"?z(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const v=Y(d),h=Le(v,t,r,n,s);return typeof h!="function"?null:h(r)}const o=Y(t),c=Le(o,t,r,n,s);if(!c||c.length===0)return null;const a=tt(c,n,t.effectId);let f;const u=n?.trigger==="view-progress";u&&window.ViewTimeline&&(f=new ViewTimeline({subject:n.element||z(n.componentId)}));const l=a.map(({effect:d,options:v,id:h,part:m})=>{const p=m?Sn(r,m):r,g=new KeyframeEffect(p||null,[],v);O.mutate(()=>{"timing"in d&&g.updateTiming(d.timing),g.setKeyframes(d.keyframes)});const E=u&&f?{timeline:f}:{},y=typeof d.customEffect=="function"?new vn(d.customEffect,p||null,v,E):new Animation(g,E.timeline);if(u)if(f)O.mutate(()=>{const{start:w,end:$}=Ze(d);y.rangeStart=w,y.rangeEnd=$,y.play()});else{const{startOffset:w,endOffset:$}=t;O.mutate(()=>{const S=d.startOffset||w,I=d.endOffset||$;Object.assign(y,{start:{name:S.name,offset:S.offset?.value,add:d.startOffsetAdd},end:{name:I.name,offset:I.offset?.value,add:d.endOffsetAdd}})})}return h&&(y.id=h),y});return new K(l,{...t,trigger:{...n||{}},measured:new Promise(d=>O.mutate(d))})}function Tn(e,t){return e?`#${e}${t?`[data-motion-part~="${t}"]`:""}`:""}function On(e,t,n){const{duration:s,delay:i,iterations:r=1,fill:o,easing:c="linear",direction:a}=e.options,f=e.effect.name,u=s==="auto",{sequenceId:l,delay:d,offset:v,offsetEasing:h="linear"}=n||{};let m=`${i??0}ms`;if(l&&typeof h=="string"){const p=pn(h);if(p){const g=(i??0)+(d??0);if(v){const E=p(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);m=`calc(${`(${g} + ${E} * ${v} * var(--motion-${l}-last, 1))`} * 1ms)`}else m=`${g}ms`}}return`${f} ${u?"auto":`${s}ms`}${u?" ":` ${m} `}${c}${o&&o!=="none"?` ${o}`:""} ${!r||r===1/0?"infinite":r}${a==="normal"?"":` ${a}`} ${t?"":"paused"}`}function Cn(e,t,n){return e?.style?(Ae(n)&&(t.duration=t.duration||1),e.style(t)):[]}function An(e,t,n,s){const i=Y(t),r=Cn(i,t),o=tt(r,n,t.effectId,!0),c=n?.trigger==="view-progress";return o.map((a,f)=>{const{start:u,end:l}=c?Ze(a.effect):{};return{target:Tn(e,a.part),animation:On(a,c,s),composition:a.options.composite,custom:a.effect.custom,name:a.effect.name,keyframes:a.effect.keyframes,id:a.id&&`${a.id}-${f+1}`,animationTimeline:c?`--${n?.id}`:"",animationRange:u||l?`${u} ${l}`:""}})}function qn(e,t,n){const s=Y(t),i=e instanceof HTMLElement?e:z(e);if(s&&s.prepare&&i){const r={measure:Je(i),mutate:et(i)};s.prepare(t,r)}n&&O.mutate(n)}function st(e,t){const n=Y(t);if(!n)return null;if(!n.style)return t.effectId&&e?_n(e,t.effectId):null;const s=n.getNames(t),r=(typeof e=="string"?z(e):e)?.getAnimations(),o=r?.map(a=>a.animationName)||[],c=[];return s.forEach(a=>{o.includes(a)&&c.push(r?.find(f=>f.animationName===a))}),c?.length?new K(c):null}function _n(e,t){const s=(typeof e=="string"?z(e):e)?.getAnimations().filter(i=>{const r=i.id||i.animationName;return r?r.startsWith(t):!0});return s?.length?new K(s):null}function it(e,t,n,s={}){const{disabled:i,allowActiveEvent:r,...o}=s,c=nt(e,t,n,o);if(!c)return null;let a={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const f=n.element||z(n.componentId),{ready:u}=c;return c.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:f,ready:u,getProgress(){return c.getProgress()},effect(d,v){const{activeDuration:h}=l.effect.getComputedTiming(),{delay:m}=l.effect.getTiming();l.currentTime=((m||0)+(h||0))*v},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const f=t,{centeredToTarget:u,transitionDuration:l,transitionEasing:d}=f,v=n.axis;if(f.keyframeEffect){const h=c;return h.animations?.length===0?null:{target:void 0,centeredToTarget:u,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(p,g){const E=v==="x"?g.x:g.y;this._currentProgress=E,h.progress(E)},disabled:i??!1,destroy(){h.cancel()}}}a={centeredToTarget:u,allowActiveEvent:r},t.customEffect&&l&&(a.transitionDuration=l,a.transitionEasing=Xe(d)),a.target=c.target}return{...a,getProgress(){return c.getProgress()},effect(f,u,l,d){c.progress(l?{...u,v:l,active:d}:u)},disabled:i,destroy(){c.cancel()}}}function U(e,t,n,s=!1){const i=st(e,t);return i?(i.ready=new Promise(r=>{qn(e,t,r)}),i):nt(e,t,n,{reducedMotion:s})}function kn(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function rt(e,t){const n=[];for(const{target:s,options:i}of e){const r=kn(s);for(const o of r){const c=U(o,i,void 0,t?.reducedMotion);c instanceof K&&n.push(c)}}return n}function Pn(e,t,n){const s=rt(t,n);return new gn(s,e)}const Z={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Mn(e,t){const n=e?.name??Z.rangeStart.name,s=t?.name??e?.name??Z.rangeEnd.name,i={name:n,offset:e?.offset||Z.rangeStart.offset},r={name:s,offset:t?.offset||Z.rangeEnd.offset};return{startOffset:i,endOffset:r}}function M(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:i,endOffset:r}=Mn(t,n);return{id:"",startOffset:i,endOffset:r,...s}}function q(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function Q(e,t){e.get(t)?.forEach(s=>{const{source:i,target:r,cleanup:o}=s;o();const c=i===t?r:i;e.get(c)?.delete(s)}),e.delete(t)}const xn={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},Ln={root:null,rootMargin:"0px",threshold:[0]},Fn=.2;function Rn(e){const t=e.trim().split(/\s+/),n=t[0],s=t.length>1?t[1]:t[0],i=r=>r.startsWith("-")?r.slice(1):parseFloat(r)?`-${r}`:r;return`${i(n)} 0px ${i(s)}`}const W={},x=new WeakMap,fe=new WeakSet,D=new WeakMap;let ot={},G=null;function Nn(e){ot=e}function ct(e,t,n){x.get(e)?.forEach(({source:i,handler:r})=>{i===e&&r(t,n)})}function Fe(){return G||(G=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||ct(n,!1,!0)})},Ln),G)}function at(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(W[n])return W[n];const s=e.threshold??Fn,i=t?xn:{root:null,rootMargin:e.inset?Rn(e.inset):"0px",threshold:s},r=new IntersectionObserver(o=>{o.forEach(c=>{const a=c.target,f=!fe.has(a);if(f&&(fe.add(a),e.useSafeViewEnter&&!c.isIntersecting)){O.measure(()=>{const u=c.boundingClientRect.height,l=c.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&u*d>l&&O.mutate(()=>{r.unobserve(a);const h=at(e,!0);D.set(a,h),h.observe(a)})});return}(c.isIntersecting||!f)&&ct(a,c.isIntersecting)})},i);return W[n]=r,r}function zn(e,t,n,s={},{reducedMotion:i,selectorCondition:r,animation:o}={}){const c={...ot,...s},a=n.triggerType||"once",f=o||U(t,M(n),void 0,i);if(!f)return;const u=at(c);a!=="once"&&f.persist?.();let l=!0,d=!1,v;v={source:e,target:t,handler:(p,g)=>{if(!(r&&!t.matches(r)))if(a==="once"){if(p&&!d){d=!0,x.get(e)?.delete(v),x.get(t)?.delete(v);const E=x.get(e);(!E||E.size===0)&&((D.get(e)||u).unobserve(e),fe.delete(e)),f.play(()=>{const y=()=>{t.dataset.interactEnter="start"};if(f.isCSS){O.mutate(()=>{requestAnimationFrame(y)});const w=()=>{O.mutate(()=>{t.dataset.interactEnter="done"})};f.onFinish(w),f.onAbort(w)}else O.mutate(y)})}}else a==="alternate"?l&&p?(l=!1,f.play()):l||f.reverse():a==="repeat"?p?(f.progress(0),f.play()):g&&(f.pause(),f.progress(0)):a==="state"&&(p?f.play():g&&f.pause())},cleanup:()=>{(D.get(e)||u).unobserve(e),(a==="repeat"||a==="state")&&Fe().unobserve(e),f.cancel(),fe.delete(e),D.delete(e)}},q(x,e,v),q(x,t,v),D.set(e,u),u.observe(e),(a==="repeat"||a==="state")&&Fe().observe(e)}function jn(e){Q(x,e)}function Dn(){G=null,Object.keys(W).forEach(e=>delete W[e])}const Gn={add:zn,remove:jn,setOptions:Nn,reset:Dn};function ut(e,t){return Object.assign(Object.create(t),e)}function Hn(e,t,n,s){let i=e*(1-n)+t*n;if(s){const r=i-e;Math.abs(r)<s&&(i=e+s*Math.sign(r));const o=t-i;if(Math.abs(o)<s)return t}return i}function Wn(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function Re(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Vn(e,t){const n=e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);return le(n[1],t)+le(n[6],t)}function le(e,t){return e?/^-?\d+px$/.test(e)?parseInt(e):/^-?\d+[lsd]?vh$/.test(e)?parseInt(e)*t.viewportHeight/100:/^-?\d+[lsd]?vw$/.test(e)?parseInt(e)*t.viewportWidth/100:/^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e)?Vn(e,t):parseInt(e)||0:0}function F(e,t,n){const{name:s,offset:i=0}=e,{start:r,end:o}=n,c=o-r,a=i/100;let f,u;return s==="entry"?(f=r-t,u=Math.min(t,c)):s==="entry-crossing"?(f=r-t,u=c):s==="contain"?(f=Math.min(o-t,r),u=Math.abs(t-c)):s==="exit"?(f=Math.max(r,o-t),u=Math.min(t,c)):s==="exit-crossing"?(f=r,u=c):s==="cover"&&(f=r-t,u=c+t),f+a*u|0}function ge(e,t,n,s,i){let r=0;const o={start:t,end:n};return e.forEach((c,a)=>{r+=c.offset;const f=c.sticky;if(f){if("end"in f&&e[a-1]?.element){const d=((i?c.element.offsetWidth:c.element.offsetHeight)||0)+f.end-s,v=r+d-c.offset,h=v<o.start,m=!h&&v<=n;let p=0;(h||m)&&(p=c.offset,o.end+=p),h&&(o.start+=p)}if("start"in f){const u=r-f.start,l=u<o.start,d=!l&&u<=o.end;let v=0;const h=e[a-1]?.element;if(h){if(l||d){const m=(i?h.offsetWidth:h.offsetHeight)||0,p=c.offset,g=(i?c.element.offsetWidth:c.element.offsetHeight)||0;v=m-(p+g),r+=v,o.end+=v}l&&(o.start+=v)}}}}),o}function Yn(e,t,n,s,i,r){const{start:o,end:c,duration:a}=e;let f=o,u=c,l=e.startRange,d=e.endRange,v;if(typeof a=="string"){l={name:a,offset:0},d={name:a,offset:100},f=F(l,n,t),u=F(d,n,t),v=u-f;const h=ge(r,f,u,n,s);f=h.start,u=h.end}else{if(l||o?.name){l=l||o;const h=le(l.add,i),m=F({...l,offset:0},n,t),p=F({...l,offset:100},n,t),g=ge(r,m,p,n,s);f=g.start+l.offset/100*(g.end-g.start)+h}if(d||c?.name){d=d||c;const h=le(d.add,i),m=F({...d,offset:0},n,t),p=F({...d,offset:100},n,t),g=ge(r,m,p,n,s);u=g.start+d.offset/100*(g.end-g.start)+h}else typeof a=="number"&&(u=f+a)}return!v&&!a&&(v=u-f),{...e,start:f,end:u,startRange:l,endRange:d,duration:v||a}}function Bn(e){return e.position==="sticky"}function Kn(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Un(e,t){return parseInt(t?e.left:e.top)}function Qn(e,t){return parseInt(t?e.right:e.bottom)}function Xn(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function Zn(e,t){let n;const s=Un(e,t),i=Qn(e,t),r=!isNaN(s),o=!isNaN(i);return(r||o)&&(n={},r&&(n.start=s),o&&(n.end=i)),n}function J(e,t,n,s,i){const r=e[0].viewSource,o=[];let c=(s?r.offsetWidth:r.offsetHeight)||0,a=0,f=r;for(;f;){const l=window.getComputedStyle(f),d=Bn(l),v=d?Zn(l,s):void 0,h=Xn(f,s,d);if((!v||!("end"in v))&&(a+=h),o.push({element:f,offset:h,sticky:v}),f=f.offsetParent,Kn(l,f,t))break;if(f===t){o.push({element:f,offset:0});break}}return o.reverse(),e.map(l=>({...Yn(l,{start:a,end:a+c},n,s,i,o)}))}const Ne=100,Jn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function es(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function ze(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function ts(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function ns(e){const t=ut(e,Jn),n=t.root,s=t.horizontal,i=new WeakMap;let r=ze(n,s),o,c,a,f,u;const l=[],d=ts();if(t.scenes=Object.values(e.scenes.reduce((m,p,g)=>{const E=p.groupId?`group-${p.groupId}`:String(g);return m[E]?m[E].push(p):m[E]=[p],m},{})).flatMap(m=>(m.every(p=>p.viewSource&&(typeof p.duration=="string"||p.start?.name))?(m=J(m,n,r,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(m)):m.forEach(p=>{p.end==null&&(p.end=p.start+p.duration),p.duration==null&&(p.duration=p.end-p.start)}),m)),t.scenes.forEach((m,p)=>{m.index=p}),l.length){const m=new Map;window.ResizeObserver&&(a=new window.ResizeObserver(function(p){p.forEach(g=>{const E=m.get(g.target),y=J(E,n,r,s,d);y.forEach((w,$)=>{t.scenes[w.index]=y[$]}),l.splice(l.indexOf(E),1,y)})}),l.forEach(p=>{a.observe(p[0].viewSource,{box:"border-box"}),m.set(p[0].viewSource,p)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(Re(()=>{const g=l.map(E=>{const y=J(E,n,r,s,d);return y.forEach((w,$)=>{t.scenes[w.index]=y[$]}),y});l.length=0,l.push(...g),l.forEach(E=>{m.set(E[0].viewSource,E)})},Ne)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(f=Re(function(){r=ze(n,s);const p=l.map(g=>{const E=J(g,n,r,s,d);return E.forEach((y,w)=>{t.scenes[y.index]=E[w]}),E});l.length=0,l.push(...p),l.forEach(g=>{m.set(g[0].viewSource,g)})},Ne),n===window?window.addEventListener("resize",f):window.ResizeObserver&&(u=new window.ResizeObserver(f),u.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(c=new window.IntersectionObserver(function(m){m.forEach(p=>{(i.get(p.target)||[]).forEach(g=>{g.disabled=!p.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(m=>{if(m.viewSource){let p=i.get(m.viewSource);p||(p=[],i.set(m.viewSource,p),c.observe(m.viewSource)),p.push(m)}}));function v({p:m,vp:p}){m=+m.toFixed(1);const g=+p.toFixed(4);if(m!==o){for(let E of t.scenes)if(!E.disabled){const{start:y,end:w,duration:$}=E,S=es(m,y,w,$);E.effect(E,S,g)}o=m}}function h(){t.scenes.forEach(m=>m.destroy?.()),c&&(c.disconnect(),c=null),a&&(a.disconnect(),a=null),f&&(u?(u.disconnect(),u=null):window.removeEventListener("resize",f))}return{tick:v,destroy:h}}const ss={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class is{constructor(t={}){this.config=ut(t,ss),this.progress={p:0,prevP:0,vp:0},this.currentProgress={p:0,prevP:0,vp:0},this._lerpFrameId=0,this.effect=null;const n=!this.config.root||this.config.root===window.document.body;this.config.root=n?window:this.config.root,this.config.contentRoot=this.config.contentRoot||(n?window.document.body:this.config.root.firstElementChild),this.config.resetProgress=this.config.resetProgress||this.resetProgress.bind(this),this._measure=this.config.measure||(()=>{const s=this.config.root;this.progress.p=this.config.horizontal?s.scrollX||s.scrollLeft||0:s.scrollY||s.scrollTop||0}),this._trigger=Wn(()=>{this._measure?.(),this.tick(!0)})}start(){this.setupEffect(),this.setupEvent(),this.resetProgress(),this.tick()}pause(){this.removeEvent()}resetProgress(t={}){const n=this.config.root,s=t.x||t.x===0?t.x:n.scrollX||n.scrollLeft||0,i=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,r=this.config.horizontal?s:i;this.progress.p=r,this.progress.prevP=r,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=r,this.currentProgress.prevP=r,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,i)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const i=s.p-s.prevP,r=i<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(i))/this.config.velocityMax*r}this.effect.tick(s),n&&s.p!==this.progress.p&&(t&&this._lerpFrameId&&window.cancelAnimationFrame(this._lerpFrameId),this._lerpFrameId=window.requestAnimationFrame(()=>this.tick())),s.prevP=s.p}lerp(){this.currentProgress.p=Hn(this.currentProgress.p,this.progress.p,+(1-this.config.transitionFriction).toFixed(3),this.config.transitionEpsilon)}destroy(){this.pause(),this.removeEffect()}setupEvent(){this.removeEvent(),this.config.root.addEventListener("scroll",this._trigger)}removeEvent(){this.config.root.removeEventListener("scroll",this._trigger)}setupEffect(){this.removeEffect(),this.effect=ns(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const we=new WeakMap;let ft=()=>({});function rs(e){ft=e}function os(e,t,n,s,{reducedMotion:i}){if(i)return;const r={trigger:"view-progress",element:e},o=M(n);let c;if("ViewTimeline"in window){const f=U(t,o,r);f&&!f.isCSS&&(f.play(),c=()=>{f.ready.then(()=>{f.cancel()})})}else{const f=it(t,o,r);if(f){const u=Array.isArray(f)?f:[f],l=new is({viewSource:e,scenes:u,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...ft()});c=()=>{l.destroy()},Promise.all(u.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!c)return;const a={source:e,target:t,cleanup:c};q(we,e,a),q(we,t,a)}function cs(e){Q(we,e)}const as={add:os,remove:cs,registerOptionsGetter:rs};function je(e,t,n){return Math.min(Math.max(e,n),t)}function De(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function us(e){let t=e,n=0,s=0;if(t.offsetParent)do n+=t.offsetLeft,s+=t.offsetTop,t=t.offsetParent;while(t);return{left:n,top:s,width:e.offsetWidth,height:e.offsetHeight}}function fs(){const e=window.devicePixelRatio;let t=!1;if(e===1)return!1;document.body.addEventListener("pointerdown",s=>{t=s.offsetX!==10},{once:!0});const n=new PointerEvent("pointerdown",{clientX:10});return document.body.dispatchEvent(n),t}function ls(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function i(){document.body.addEventListener("pointerdown",c=>{s===void 0?s=c.offsetY:n=c.offsetY===s},{once:!0});const o=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(o)}function r(){window.scrollY!==t&&(window.removeEventListener("scroll",r),i(),e(n))}i(),window.addEventListener("scroll",r),window.scrollY>0&&window.scrollBy(0,-1)})}function ds(e){ls().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let ee=0;const re=new Set;function hs(){const e=n=>{for(let s of n.changedTouches)re.add(s.identifier)},t=n=>{for(let s of n.changedTouches)re.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){re.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function ms(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;ee||(s=hs()),ee+=1;function i(r){clearTimeout(n),n=setTimeout(()=>{re.size?setTimeout(i,100):(t(r),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),ee-=1,ee||s()}}function ps(e,t,n){return{x(s){const i=e.left-n.x+e.width/2,r=i>=t.width/2,o=(r?i:t.width-i)*2,c=r?0:i-o/2;return(s-c)/o},y(s){const i=e.top-n.y+e.height/2,r=i>=t.height/2,o=(r?i:t.height-i)*2,c=r?0:i-o/2;return(s-c)/o}}}function gs(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function vs(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function ys(e){const t=new ResizeObserver(n=>{n.forEach(s=>{e.rect.width=s.borderBoxSize[0].inlineSize,e.rect.height=s.borderBoxSize[0].blockSize})});return t.observe(e.root,{box:"border-box"}),t}function Es(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,i,r,o,c;const a={x:0,y:0};e.scenes.forEach(u=>{u.target&&u.centeredToTarget&&(u.transform=ps(us(u.target),e.rect,a),t=!0),e.root?i=ys(e):(r=vs.bind(null,e),window.addEventListener("resize",r))}),s=function(u){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(u.x)||u.x/e.rect.width,v=l.transform?.y(u.y)||u.y/e.rect.height,h=+je(0,1,d).toPrecision(4),m=+je(0,1,v).toPrecision(4),p={x:u.vx,y:u.vy};e.allowActiveEvent&&(u.active=d<=1&&v<=1&&d>=0&&v>=0),l.effect(l,{x:h,y:m},p,u.active)}Object.assign(n,u)},t&&(o=gs.bind(a,s,n),c=ms(document,o));function f(){e.scenes.forEach(u=>u.destroy?.()),c?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",r),r=null),s=null,n=null}return{tick:s,destroy:f}}const ws=1e3/60*3;let te;function bs(){R.x=window.scrollX,R.y=window.scrollY}const R={x:0,y:0,scrollHandler:bs,fixRequired:void 0};class $s{constructor(t={}){this.config={...t},this.effect=null,this._nextTick=null,this._nextTransitionTick=null,this._startTime=0;let n;this.config.transitionDuration?n=this.config.noThrottle?()=>this.transition():De(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):De(()=>{this.tick()}),this.config.rect=this.config.root?{width:this.config.root.offsetWidth,height:this.config.root.offsetHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight},this.progress={x:this.config.rect.width/2,y:this.config.rect.height/2,vx:0,vy:0},this.previousProgress={...this.progress},this.currentProgress=null;const s=i=>{const r=this.config.root?i.offsetX:i.x,o=this.config.root?i.offsetY:i.y;this.progress.vx=r-this.progress.x,this.progress.vy=o-this.progress.y,this.progress.x=r,this.progress.y=o,this._nextTick=n()};if(this._pointerLeave=()=>{this.progress.active=!1,this.progress.vx=0,this.progress.vy=0,this._nextTick=n()},this._pointerEnter=()=>{this.progress.active=!0,this._nextTick=n()},this.config.root){te=typeof te=="boolean"?te:fs();const i=te?window.devicePixelRatio:1;typeof R.fixRequired>"u"&&ds(R),this._measure=r=>{if(r.target!==this.config.root){const o=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:r.x*i+R.x,clientY:r.y*i+R.y});r.stopPropagation(),this.config.root.dispatchEvent(o)}else s(r)}}else this._measure=s}start(){this.setupEffect(),this.setupEvent()}pause(){this.removeEvent()}tick(){this.effect.tick(this.progress)}transition(){const t=this.config.transitionDuration,n=this.config.transitionEasing||(o=>o),s=performance.now();let i=!1;const r=o=>{const c=(o-this._startTime)/t,a=n(Math.min(1,c));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((f,[u,l])=>(u==="active"?f[u]=l:f[u]=this.previousProgress[u]+(l-this.previousProgress[u])*a,f),this.currentProgress||{}),c<1&&(this._nextTransitionTick=requestAnimationFrame(r),i=o-this._startTime>ws),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,r(s)):this._startTime=s,this._nextTransitionTick}destroy(){this.pause(),this.removeEffect(),this._nextTick&&cancelAnimationFrame(this._nextTick),this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick)}setupEvent(){this.removeEvent();const t=this.config.root||window;t.addEventListener("pointermove",this._measure,{passive:!0}),this.config.eventSource&&this.config.eventSource.addEventListener("pointermove",this._measure,{passive:!0}),this.config.allowActiveEvent&&(t.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),t.addEventListener("pointerenter",this._pointerEnter,{passive:!0}),this.config.eventSource&&(this.config.eventSource.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),this.config.eventSource.addEventListener("pointerenter",this._pointerEnter,{passive:!0})))}removeEvent(){const t=this.config.root||window;t.removeEventListener("pointermove",this._measure),this.config.eventSource&&this.config.eventSource.removeEventListener("pointermove",this._measure),this.config.allowActiveEvent&&(t.removeEventListener("pointerleave",this._pointerLeave),t.removeEventListener("pointerenter",this._pointerEnter),this.config.eventSource&&(this.config.eventSource.removeEventListener("pointerleave",this._pointerLeave),this.config.eventSource.removeEventListener("pointerenter",this._pointerEnter)))}setupEffect(){this.removeEffect(),this.effect=Es(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const be=new WeakMap;let lt=()=>({});function Ss(e){lt=e}function Is(e,t,n,s={},{reducedMotion:i}){if(i)return;const r={trigger:"pointer-move",element:e,axis:s.axis??"y"},o=it(t,M(n),r);if(o){const c=Array.isArray(o)?o:[o],a=new $s({root:s.hitArea==="self"?e:void 0,scenes:c,...lt()}),u={source:e,target:t,cleanup:()=>{a.destroy()}};q(be,e,u),q(be,t,u),Promise.all(c.map(l=>l.ready||Promise.resolve())).then(()=>{a.start()})}}function Ts(e){Q(be,e)}const Os={add:Is,remove:Ts,registerOptionsGetter:Ss},$e=new WeakMap;function Cs(e,t,n,s,{reducedMotion:i,selectorCondition:r,animation:o,sourceAnimationOptions:c}){const a=o||U(t,M(n),void 0,i);if(!a)return;const{effectId:f}=s,u=v=>{if(r&&!t.matches(r))return;const h=v.animationName,m=v.detail?.effectId,p=c?st(e,c):null;if(p){if(p.playState==="running"||h&&!p.hasAnimationName(h))return;if(m&&m!==f&&!p.hasAnimationId(m))return}a.play()},d={source:e,target:t,cleanup:()=>{a.cancel(),e.removeEventListener("animationend",u)}};q($e,e,d),q($e,t,d),e.addEventListener("animationend",u)}function As(e){Q($e,e)}const qs={add:Cs,remove:As};function _s(e,t,n=!1,s,i,r){const o=r||U(e,M(t),void 0,n);if(!o)return null;let c=!0;const a=t.triggerType||"alternate";return f=>{if(s&&!e.matches(s))return;const u=!i,l=i?.enter?.includes(f.type),d=i?.leave?.includes(f.type);if(l||u){if(a==="alternate"||a==="state")c?(c=!1,o.play()):a==="alternate"?o.reverse():a==="state"&&(o.playState==="running"?o.pause():o.playState!=="finished"&&o.play());else{if(o.progress(0),delete e.dataset.interactEnter,o.isCSS){const v=()=>{O.mutate(()=>{e.dataset.interactEnter="done"})};o.onFinish(v),o.onAbort(v)}o.play()}return}d&&(a==="alternate"?o.reverse():a==="repeat"?(o.cancel(),O.mutate(()=>{delete e.dataset.interactEnter})):a==="state"&&o.playState==="running"&&o.pause())}}function ks(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:r},o,c){const a=!!s,f=r??"toggle",u=f==="toggle";return l=>{if(o&&!e.matches(o))return;const d=a?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,v=!c,h=c?.enter?.includes(l.type),m=c?.leave?.includes(l.type);v?t.toggleEffect(n,f,d):(h&&t.toggleEffect(n,u?"add":f,d),m&&u&&t.toggleEffect(n,"remove",d))}}const Se=new WeakMap;function Ge(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function Ps(e){return t=>{const n=t;n.pointerType&&e(n)}}function Ms(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const xs={focusin:(e,t)=>Ge(e,t),focusout:(e,t)=>Ge(e,t),click:(e,t)=>Ps(t),keydown:(e,t)=>Ms(t)};function Ls(e,t,n){const s=xs[e];return s?s(t,n):i=>n(i)}function Fs(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function Rs(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(Fs(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function Ns(e){return!!(e.enter?.length||e.leave?.length)}function zs(e){return Ns(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function js(e,t,n,s,{reducedMotion:i,targetController:r,selectorCondition:o,animation:c}){const a=Rs(s.eventConfig),f=n.transition||n.transitionProperties,u=zs(a);let l,d=!1;if(f?l=ks(t,r,n,o,u):(l=_s(t,n,i,o,u,c),d=n.triggerType==="once"),!l)return;const v=l,h=new AbortController;function m(E,y,w){const $=Ls(y,e,v);E.addEventListener(y,$,{...w,signal:h.signal})}const g={source:e,target:t,cleanup:()=>{h.abort()}};if(q(Se,e,g),q(Se,t,g),u){const E=a.enter,y=a.leave;E.forEach(S=>{S==="focusin"&&(e.tabIndex=0),m(e,S,{passive:!0,once:d})});const w=!n.stateAction||n.stateAction==="toggle";(f?w:n.triggerType!=="once")&&y.forEach(S=>{if(S==="focusout"){m(e,S,{once:d});return}m(e,S,{passive:!0})})}else(a.toggle??[]).forEach(y=>{m(e,y,{once:d,passive:y!=="keydown"})})}function Ds(e){Q(Se,e)}const H={add:js,remove:Ds},Ie={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},He={click:Ie.activate,hover:Ie.interest};function ne(e){const t=Ie[e];return(n,s,i,r,o)=>{const c=o?.allowA11yTriggers&&e in He?He[e]:t;H.add(n,s,i,{eventConfig:c},o??{})}}const N={viewEnter:Gn,hover:{add:ne("hover"),remove:H.remove},click:{add:ne("click"),remove:H.remove},animationEnd:qs,viewProgress:as,pointerMove:Os,activate:{add:ne("activate"),remove:H.remove},interest:{add:ne("interest"),remove:H.remove}};function Gs(e){return e.replace(/\[([-\w]+)]/g,"[]")}class b{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;constructor(){this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},this.addedInteractions={},this.mediaQueryListeners=new Map,this.listInteractionsCache={},this.controllers=new Set}init(t,n){if(typeof window>"u"||!window.customElements)return;const s=n?.useCustomElement??!!b.defineInteractElement;this.dataCache=Ws(t,s);const i=b.defineInteractElement?.();s&&i===!1?document.querySelectorAll("interact-element").forEach(r=>{r.connect()}):b.controllerCache.forEach((r,o)=>r.connect(o))}destroy(){for(const t of this.controllers)t.disconnect();for(const[,t]of this.mediaQueryListeners.entries())t.mql.removeEventListener("change",t.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},b.instances.splice(b.instances.indexOf(this),1)}setController(t,n){this.controllers.add(n),b.setController(t,n)}deleteController(t,n=!1){const s=b.controllerCache.get(t);this.clearInteractionStateForKey(t),this.clearMediaQueryListenersForKey(t),s&&n&&(this.controllers.delete(s),b.deleteController(t))}has(t){return!!this.get(t)}get(t){const n=Gs(t);return this.dataCache.interactions[n]}clearMediaQueryListenersForKey(t){for(const[n,s]of this.mediaQueryListeners.entries())s.key===t&&(s.mql.removeEventListener("change",s.handler),this.mediaQueryListeners.delete(n))}clearInteractionStateForKey(t){(this.get(t)?.interactionIds||[]).forEach(i=>{const r=_(i,t);delete this.addedInteractions[r]});const s=`${t}::seq::`;for(const i of b.sequenceCache.keys())i.startsWith(s)&&(b.sequenceCache.delete(i),delete this.addedInteractions[i])}setupMediaQueryListener(t,n,s,i){this.mediaQueryListeners.has(t)||(n.addEventListener("change",i),this.mediaQueryListeners.set(t,{mql:n,handler:i,key:s}))}static create(t,n){const s=new b;return b.instances.push(s),s.init(t,n),s}static destroy(){b.controllerCache.forEach(t=>{t.disconnect()}),b.instances.length=0,b.controllerCache.clear(),b.sequenceCache.clear(),b.elementSequenceMap=new WeakMap}static setup(t){t.scrollOptionsGetter&&N.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&N.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&N.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(b.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){const n=b.instances.find(s=>s.has(t));return n||console.warn(`Interact: Instance for key "${t}" not found`),n}static getController(t){const n=t?b.controllerCache.get(t):void 0;return n||console.warn(`Interact: Controller for key "${t}" not found`),n}static setController(t,n){b.controllerCache.set(t,n)}static deleteController(t){b.controllerCache.delete(t)}static registerEffects=bn;static use(t,n){b.plugins.set(t,n)}static getPlugin(t){return b.plugins.get(t)}static getPluginsNames(){return new Set(b.plugins.keys())}static getSequence(t,n,s,i){const r=b.sequenceCache.get(t);if(r)return r;const o=Pn(n,s,i);return b.sequenceCache.set(t,o),b._registerSequenceElements(s,o),o}static addToSequence(t,n,s,i){const r=b.sequenceCache.get(t);if(!r)return!1;const c=rt(n,i).map((a,f)=>({index:s[f]??r.animationGroups.length,group:a}));return r.addGroups(c),b._registerSequenceElements(n,r),!0}static _registerSequenceElements(t,n){for(const{target:s}of t){const i=Array.isArray(s)?s:s instanceof HTMLElement?[s]:[];for(const r of i){let o=b.elementSequenceMap.get(r);o||(o=new Set,b.elementSequenceMap.set(r,o)),o.add(n)}}}static removeFromSequences(t){for(const n of t){const s=b.elementSequenceMap.get(n);if(s){for(const i of s)i.removeGroups(r=>r.animations.some(o=>o.effect?.target===n));b.elementSequenceMap.delete(n)}}}}let Hs=0;function L(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const i=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${i} ${e.selector}`:`${e.listContainer}${i||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function We(e){return"sequenceId"in e&&!("effects"in e)}function ve(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function Ws(e,t=!1){const{effects:n={},sequences:s={},conditions:i={}}=e,r={};return e.interactions?.forEach((o,c)=>{const a=o.key,f=++Hs,{effects:u,sequences:l,...d}=o;if(!a){console.error(`Interaction ${f} is missing a key for source element.`);return}ve(r,a);const v=u?Array.from(u):[];v.reverse();const h=l?.map((g,E)=>{if(We(g)){const w=s[g.sequenceId];return w?{...w,...g}:(console.warn(`Interact: Sequence "${g.sequenceId}" not found in config`),g)}const y=g;return y.sequenceId||(y.sequenceId=`seq-${c}-${E}`),y}),m={...d,effects:v.length>0?v:void 0,sequences:h};r[a].triggers.push(m),r[a].selectors.add(L(m,{useFirstChild:t}));const p=m.listContainer;v.forEach((g,E)=>{let y=g.key;if(!y&&g.effectId){const I=n[g.effectId];I&&(y=I.key)}g.effectId||(g.effectId=`eff-${c}-${v.length-1-E}`),y=y||a,g.key=y;const w=g.effectId;if(p&&g.listContainer&&(y!==a||g.listContainer!==p))return;const $=`${a}::${y}::${w}::${f}`;if(g.interactionId=$,r[a].interactionIds.add($),y===a)return;const S=ve(r,y);S.effects[$]||(S.effects[$]=[],S.interactionIds.add($)),S.effects[$].push({...d,effect:g}),S.selectors.add(L(g,{useFirstChild:t}))}),h?.forEach(g=>{if(!g||We(g))return;const E=g,y=E.sequenceId;E.effects.forEach(($,S)=>{$.effectId||($.effectId=`eff-${y}-${S}`);let I=$.key;if(!I&&$.effectId){const C=n[$.effectId];C&&(I=C.key)}I=I||a;const T=L($,{useFirstChild:t});if(T&&r[a].selectors.add(T),I!==a){const C=ve(r,I),A=`${I}::seq::${y}::${f}`;C.sequences[A]||(C.sequences[A]=[],C.interactionIds.add(A)),C.sequences[A].push({...d,sequence:E}),C.selectors.add(T)}})})}),{effects:n,sequences:s,conditions:i,interactions:r}}const dt="$";function Vs(e,t=2){return parseFloat(e.toFixed(t))}function Ys(e){return/\[]/g.test(e)}function Bs(e){return`--${e.join("-")}`}function Ks(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function oe(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function B(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function ht(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:ue(i.name)}))}function mt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:r,delay:o}=t;i&&(t.styleProperties.some(a=>a.name.startsWith("--"))?s=[`all ${i}ms ${se(r||"ease")}${o?` ${o}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(a=>`${ue(a.name)} ${i}ms ${se(r||"ease")}${o?` ${o}ms`:""}`))}else s=n?.filter(i=>i.duration).map(i=>`${ue(i.name)} ${i.duration}ms ${se(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function Us({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:r}){const o=mt({transition:n,transitionProperties:s}),c=ht({transition:n,transitionProperties:s}).map(h=>`${h.name}: ${h.value};`),a=e.replace(/"/g,"'"),f=`:is(:state(${t}), :--${t}) ${i}`,u=`[data-interact-effect~="${t}"] ${i}`,l=r?oe(f,r):f,d=r?oe(u,r):u,v=[`${l},
1
+ "use strict";function kt(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function _(e,t){const n=kt(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function Pt(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&V(e)===V(t)}function V(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}function Ye(e){let t=0,n=0;for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);t=(t<<5)-t+i|0,n=n<<3^n>>>2^i|0}return((t>>>0)*1048576+(n>>>0)%1048576).toString(36)}class K{animations;options;ready;isCSS;longestAnimation;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation,this.longestAnimation=this._getAnimationWithLongestEndTime()}_getAnimationWithLongestEndTime(){return this.animations.reduce((t,n)=>{const s=t.effect?.getComputedTiming().endTime??0,i=n.effect?.getComputedTiming().endTime??0;return s>i?t:n},this.animations[0])}getProgress(){return this.longestAnimation?.effect?.getComputedTiming().progress||0}async play(t){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}pause(){for(const t of this.animations)t.pause()}async reverse(t){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}progress(t){for(const n of this.animations){const{delay:s,duration:i,iterations:r}=n.effect.getTiming(),o=(Number.isFinite(i)?i:0)*(Number.isFinite(r)?r:1);n.currentTime=((s||0)+o)*t}}cancel(){for(const t of this.animations)t.cancel()}setPlaybackRate(t){for(const n of this.animations)n.playbackRate=t}async onFinish(t){try{await Promise.all(this.animations.map(s=>s.finished));const n=this.animations[0];if(n&&!this.isCSS){const s=n.effect?.target;if(s){const i=this.options?.effectId||n.id,r=new CustomEvent("animationend",{detail:{effectId:i}});s.dispatchEvent(r)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}async onAbort(t){try{await Promise.all(this.animations.map(n=>n.finished))}catch(n){if(n.name==="AbortError"){const s=this.animations[0];if(s&&!this.isCSS){const i=s.effect?.target;if(i){const r=new Event("animationcancel");i.dispatchEvent(r)}}t()}}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations.some(t=>t.playState==="running")?"running":this.animations[0]?.playState}hasAnimationName(t){return this.animations.some(n=>n.animationName===t)}hasAnimationId(t){return this.animations.some(n=>n.id===t)}getTimingOptions(){return this.animations.map(t=>{const n=t.effect?.getTiming(),s=n?.delay??0,i=Number(n?.duration)||0,r=n?.iterations??1;return{delay:s,duration:i,iterations:r}})}}const Be=e=>e,Mt=e=>1-Math.cos(e*Math.PI/2),xt=e=>Math.sin(e*Math.PI/2),Lt=e=>-(Math.cos(Math.PI*e)-1)/2,Ft=e=>e**2,Rt=e=>1-(1-e)**2,Nt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,zt=e=>e**3,jt=e=>1-(1-e)**3,Dt=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Gt=e=>e**4,Ht=e=>1-(1-e)**4,Wt=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Vt=e=>e**5,Yt=e=>1-(1-e)**5,Bt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Kt=e=>e===0?0:2**(10*e-10),Ut=e=>e===1?1:1-2**(-10*e),Qt=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Xt=e=>1-Math.sqrt(1-e**2),Zt=e=>Math.sqrt(1-(e-1)**2),Jt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,en=e=>2.70158*e**3-1.70158*e**2,tn=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,nn=(e,t=1.70158*1.525)=>e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2,qe={linear:Be,sineIn:Mt,sineOut:xt,sineInOut:Lt,quadIn:Ft,quadOut:Rt,quadInOut:Nt,cubicIn:zt,cubicOut:jt,cubicInOut:Dt,quartIn:Gt,quartOut:Ht,quartInOut:Wt,quintIn:Vt,quintOut:Yt,quintInOut:Bt,expoIn:Kt,expoOut:Ut,expoInOut:Qt,circIn:Xt,circOut:Zt,circInOut:Jt,backIn:en,backOut:tn,backInOut:nn},j=(e,t,n,s,i)=>{const r=3*t,o=3*(s-2*t),c=1-3*s+3*t,a=3*n,f=3*(i-2*n),u=1-3*i+3*n;let l;if(c===0)l=o===0?`(${e} / ${r})`:`((sqrt(max(0, ${r*r} + ${4*o} * ${e})) - ${r}) / ${2*o})`;else{const d=o/(3*c),v=2*Math.pow(o,3)-9*r*o*c,h=54*Math.pow(c,3),m=(3*c*r-o*o)/(9*c*c),p=`((${v} - ${27*c*c} * ${e}) / ${h})`;if(m<0){const g=2*Math.sqrt(-m);let E=0;for(const w of[0,1,2])[0,.25,.5,.75,1].every(S=>{const I=Math.min(Math.max(2*(v-27*c*c*S)/(h*m*g),-1),1),T=g*Math.cos((Math.acos(I)-w*2*Math.PI)/3)-d;return T>=-1e-6&&T<=1.000001})&&(E=w);const y=`(acos(clamp(-1, ${2/(m*g)} * ${p}, 1)) - ${360*E}deg) / 3`;l=`(${g} * cos(${y}) - ${d})`}else{const g=`sqrt(pow(${p}, 2) + ${Math.pow(m,3)})`;l=`(pow(${g} - ${p}, 1 / 3) - pow(${g} + ${p}, 1 / 3) - ${d})`}}return`(${u} * pow(${l}, 3) + ${f} * pow(${l}, 2) + ${a} * ${l})`},_e={linear:e=>e,ease:e=>j(e,.25,.1,.25,1),easeIn:e=>j(e,.42,0,1,1),easeOut:e=>j(e,0,0,.58,1),easeInOut:e=>j(e,.42,0,.58,1),sineIn:e=>`(1 - cos(${e} * 90deg))`,sineOut:e=>`(sin(${e} * 90deg))`,sineInOut:e=>`((1 - cos(${e} * 180deg)) / 2)`,quadIn:e=>`(${e} * ${e})`,quadOut:e=>`(1 - (1 - ${e}) * (1 - ${e}))`,quadInOut:e=>`(round(${e}) * (1 - (-2 * ${e} + 2) * (-2 * ${e} + 2) / 2) + (1 - round(${e})) * 2 * ${e} * ${e})`,cubicIn:e=>`pow(${e}, 3)`,cubicOut:e=>`(1 - pow(1 - ${e}, 3))`,cubicInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 3) / 2) + (1 - round(${e})) * 4 * pow(${e}, 3))`,quartIn:e=>`pow(${e}, 4)`,quartOut:e=>`(1 - pow(1 - ${e}, 4))`,quartInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 4) / 2) + (1 - round(${e})) * 8 * pow(${e}, 4))`,quintIn:e=>`pow(${e}, 5)`,quintOut:e=>`(1 - pow(1 - ${e}, 5))`,quintInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 5) / 2) + (1 - round(${e})) * 16 * pow(${e}, 5))`,expoIn:e=>`(pow(2, 10 * ${e} - 10) - pow(2, -10) * (1 - ${e}))`,expoOut:e=>`(1 - pow(2, -10 * ${e}) + pow(2, -10) * ${e})`,expoInOut:e=>`((round(${e}) * (2 - pow(2, -20 * ${e} + 10)) + (1 - round(${e})) * pow(2, 20 * ${e} - 10)) / 2)`,circIn:e=>`(1 - sqrt(1 - ${e} * ${e}))`,circOut:e=>`sqrt(1 - (${e} - 1) * (${e} - 1))`,circInOut:e=>`((round(${e}) * (sqrt(max(0, (3 - 2 * ${e}) * (2 * ${e} - 1))) + 1) + (1 - round(${e})) * (1 - sqrt(max(0, 1 - 4 * ${e} * ${e})))) / 2)`,backIn:e=>`(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,backOut:e=>`(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,backInOut:e=>`((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`},ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function sn(e){return e==="percentage"?"%":e||"px"}const rn=/^(webkit|moz|ms|o)(?=[A-Z])/,on=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function ue(e){return e.startsWith("--")?e:(rn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function cn(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Ke(e){return on[e]||cn(e)}function an(e){for(const t in e)if(Object.hasOwn(e,t)&&Ke(t)!==t)return!0;return!1}function un(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!an(n))return;t??=e.slice();const i={};for(const r in n)Object.hasOwn(n,r)&&(i[Ke(r)]=n[r]);t[s]=i}),t||e}function se(e){return e?ke[e]||e:ke.linear}function fn(e,t,n,s){const i=3*e,r=3*(n-e)-i,o=1-i-r,c=3*t,a=3*(s-t)-c,f=1-c-a,u=h=>((o*h+r)*h+i)*h,l=h=>((f*h+a)*h+c)*h,d=h=>(3*o*h+2*r)*h+i;function v(h){let m=h;for(let E=0;E<8;E++){const y=u(m)-h;if(Math.abs(y)<1e-7)return m;const w=d(m);if(Math.abs(w)<1e-6)break;m-=y/w}let p=0,g=1;for(m=(p+g)/2;g-p>1e-7;){const E=u(m);if(Math.abs(E-h)<1e-7)return m;h>E?p=m:g=m,m=(p+g)/2}return m}return h=>h<=0?0:h>=1?1:l(v(h))}function Ue(e){const t=e.match(/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);if(!t)return;const n=parseFloat(t[1]),s=parseFloat(t[2]),i=parseFloat(t[3]),r=parseFloat(t[4]);if(![n,s,i,r].some(isNaN))return[n,s,i,r]}function ln(e){const t=Ue(e);if(!(!t||t.some(isNaN)))return fn(...t)}function dn(e){const t=Ue(e);if(!(!t||t.some(isNaN)))return n=>j(n,...t)}function Qe(e){const t=e.match(/^linear\((.+)\)$/);if(!t)return;const n=t[1].split(",").map(r=>r.trim()).filter(Boolean);if(n.length===0)return;const s=[];for(const r of n){const o=r.split(/\s+/),c=parseFloat(o[0]);if(isNaN(c))return;const a=[];for(let f=1;f<o.length;f++)if(o[f].endsWith("%")){const u=parseFloat(o[f])/100;if(isNaN(u))return;a.push(u)}a.length===0?s.push({output:c,pos:null}):a.length===1?s.push({output:c,pos:a[0]}):(s.push({output:c,pos:a[0]}),s.push({output:c,pos:a[1]}))}if(s.length===0)return;s[0].pos===null&&(s[0].pos=0),s[s.length-1].pos===null&&(s[s.length-1].pos=1);let i=0;for(;i<s.length;)if(s[i].pos===null){const r=i-1;let o=i;for(;o<s.length&&s[o].pos===null;)o++;const c=s[r].pos,a=s[o].pos,f=o-r;for(let u=r+1;u<o;u++)s[u].pos=c+(a-c)*(u-r)/f;i=o+1}else i++;for(let r=1;r<s.length;r++)s[r].pos<s[r-1].pos&&(s[r].pos=s[r-1].pos);return s}function hn(e){const t=Qe(e);if(t)return n=>{if(n<=t[0].pos)return t[0].output;const s=t[t.length-1];if(n>=s.pos)return s.output;let i=0,r=t.length-1;for(;i<r-1;){const a=i+r>>>1;t[a].pos<=n?i=a:r=a}const o=t[i],c=t[r];return c.pos===o.pos?c.output:o.output+(c.output-o.output)*(n-o.pos)/(c.pos-o.pos)}}function mn(e){const t=Qe(e);if(t)return n=>{const s=[`${t[0].output}`];for(let i=1;i<t.length;i++){const r=t[i].pos-t[i-1].pos,o=t[i].output-t[i-1].output;if(r===0&&t[i-1].pos===0)s.push(`${o}`);else{const c=r===0?`round(${n} / ${2*t[i-1].pos})`:`(${n} - ${t[i-1].pos}) / ${r}`;s.push(`clamp(0, ${c}, 1) * ${o}`)}}return`(${s.join(" + ")})`}}function Xe(e){if(!e)return;const t=qe[e];return t||(ln(e)??hn(e)??qe.linear)}function pn(e){if(!e)return;const t=_e[e];return t||(dn(e)??mn(e)??_e.linear)}class gn extends K{animationGroups;delay;offset;offsetEasing;sequenceId;timingOptions;constructor(t,n={}){const s=t.flatMap(i=>[...i.animations]);super(s),this.animationGroups=t,this.delay=n.delay??0,this.offset=n.offset??0,this.sequenceId=n.sequenceId,this.offsetEasing=typeof n.offsetEasing=="function"?n.offsetEasing:Xe(n.offsetEasing)??Be,this.timingOptions=this.animationGroups.map(i=>i.getTimingOptions().map(({delay:r,duration:o,iterations:c})=>({delay:r,duration:Number.isFinite(o)?o:0,iterations:Number.isFinite(c)?c:1}))),this.applyOffsets(),this.ready=Promise.all(t.map(i=>i.ready)).then(()=>{})}calculateOffsets(){const t=this.animationGroups.length;if(t<=1)return[0];const n=t-1;return Array.from({length:t},(s,i)=>this.offsetEasing(i/n)*n*this.offset|0)}applyOffsets(){if(this.animationGroups.length===0||this.animations.length===0)return;const t=this.calculateOffsets(),n=this.getSequenceActiveDuration(t),s=this.animationGroups.length-1;this.animationGroups.forEach((i,r)=>{i.animations.forEach((o,c)=>{const a=o.effect;if(!a)return;const{delay:f,duration:u,iterations:l}=this.timingOptions[r][c],d=f+t[r],v=n-(d+u*l);if(i.isCSS&&this.sequenceId){const{target:h}=a;h instanceof HTMLElement&&(h.style.setProperty(`--motion-${this.sequenceId}-index`,`${r}`),h.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),a.updateTiming({endDelay:v})}else a.updateTiming({delay:d+this.delay,endDelay:v})})})}getSequenceActiveDuration(t){const n=[];for(let s=0;s<this.timingOptions.length;s++){const i=this.timingOptions[s].reduce((r,o)=>{if(!o)return r;const{delay:c,duration:a,iterations:f}=o;return Math.max(r,c+a*f)},0);n.push(t[s]+i)}return Math.max(...n)}addGroups(t){if(t.length===0)return;const n=[...t].sort((s,i)=>i.index-s.index);for(const{index:s,group:i}of n){const r=Math.min(s,this.animationGroups.length);this.animationGroups.splice(r,0,i),this.timingOptions.splice(r,0,i.getTimingOptions());const o=[...i.animations],c=this.animationGroups.slice(0,r).reduce((a,f)=>a+f.animations.length,0);this.animations.splice(c,0,...o)}this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(s=>s.ready)).then(()=>{})}removeGroups(t){const n=[],s=[],i=[];for(let r=0;r<this.animationGroups.length;r++)t(this.animationGroups[r])?n.push(this.animationGroups[r]):(s.push(this.animationGroups[r]),i.push(this.timingOptions[r]));if(n.length===0)return n;for(const r of n)r.cancel();return this.animationGroups=s,this.timingOptions=i,this.animations=s.flatMap(r=>[...r.animations]),this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(r=>r.ready)).then(()=>{}),n}async onFinish(t){try{await Promise.all(this.animationGroups.map(n=>n.finished)),t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}}class vn{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,i){const r=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:o}=i;this._animation=new Animation(r,o),this._tickCbId=null,this.progress=null,this.customEffect=c=>t(r.target,c),this._finishHandler=c=>{this.effect.target?.getAnimations().find(a=>a===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const t=this.effect?.getComputedTiming().progress??null;t!==this.progress&&(this.customEffect?.(t),this.progress=t),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(t){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${t instanceof Error?t.message:t}`)}}get currentTime(){return this._animation.currentTime}set currentTime(t){this._animation.currentTime=t}get startTime(){return this._animation.startTime}set startTime(t){this._animation.startTime=t}get playbackRate(){return this._animation.playbackRate}set playbackRate(t){this._animation.playbackRate=t}get id(){return this._animation.id}set id(t){this._animation.id=t}get effect(){return this._animation.effect}set effect(t){this._animation.effect=t}get timeline(){return this._animation.timeline}set timeline(t){this._animation.timeline=t}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(t){this._animation.oncancel=t}get onfinish(){return this._animation.onfinish}set onfinish(t){this._animation.onfinish=t}get onremove(){return this._animation.onremove}set onremove(t){this._animation.onremove=t}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(t){this._animation.updatePlaybackRate(t)}addEventListener(t,n,s){this._animation.addEventListener(t,n,s)}removeEventListener(t,n,s){this._animation.removeEventListener(t,n,s)}dispatchEvent(t){return this._animation.dispatchEvent(t)}}function yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie={exports:{}},Pe=ie.exports,Me;function En(){return Me||(Me=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function i(){var u=this;u.reads=[],u.writes=[],u.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(u){for(var l;l=u.shift();)l()},measure:function(u,l){var d=l?u.bind(l):u;return this.reads.push(d),r(this),d},mutate:function(u,l){var d=l?u.bind(l):u;return this.writes.push(d),r(this),d},clear:function(u){return c(this.reads,u)||c(this.writes,u)},extend:function(u){if(typeof u!="object")throw new Error("expected object");var l=Object.create(this);return a(l,u),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function r(u){u.scheduled||(u.scheduled=!0,u.raf(o.bind(null,u)))}function o(u){var l=u.writes,d=u.reads,v;try{n("flushing reads",d.length),u.runTasks(d),n("flushing writes",l.length),u.runTasks(l)}catch(h){v=h}if(u.scheduled=!1,(d.length||l.length)&&r(u),v)if(n("task errored",v.message),u.catch)u.catch(v);else throw v}function c(u,l){var d=u.indexOf(l);return!!~d&&!!u.splice(d,1)}function a(u,l){for(var d in l)l.hasOwnProperty(d)&&(u[d]=l[d])}var f=t.fastdom=t.fastdom||new i;e.exports=f})(typeof window<"u"?window:typeof Pe<"u"?Pe:globalThis)})(ie)),ie.exports}var wn=En();const O=yn(wn),Ee={};function bn(e){Object.assign(Ee,e)}function $n(e){return e in Ee?Ee[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function z(e,t){return e?(t||document).getElementById(e):null}function Sn(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function In(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function pe(e){return`${e.value}${sn(e.unit)}`}function xe(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${pe(e.offset)}${t?` + ${t}`:""})`:t?`calc(${pe(e.offset)} + ${t})`:pe(e.offset)}`}function Ze(e){return{start:xe(e.startOffset,e.startOffsetAdd),end:xe(e.endOffset,e.endOffsetAdd,!0)}}function Je(e){return t=>O.measure(()=>t(e))}function et(e){return t=>O.mutate(()=>t(e))}function Y(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?$n(t):null}else if(e.keyframeEffect){const t=s=>{const{name:i,keyframes:r}=s.keyframeEffect;return[{...s,name:i,keyframes:r}]};return{web:t,style:t,getNames:s=>{const{effectId:i}=s,{name:r}=s.keyframeEffect,o=r||i;return o?[o]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function tt(e,t,n,s){return e.map((i,r)=>{const o={fill:i.fill,easing:se(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:In(i)};Ae(t)?(o.duration=i.duration,o.delay=i.delay||0):t?.trigger==="view-progress"&&(s||window.ViewTimeline)?o.duration="auto":(o.duration=99.99,o.delay=.01);const c=un(i.keyframes);return{effect:c===i.keyframes?i:{...i,keyframes:c},options:o,id:n&&`${n}-${r+1}`,part:i.part}})}function Ae(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function Le(e,t,n,s,i){if(e){if(Ae(s)&&(t.duration=t.duration||1,i?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let r;return n instanceof HTMLElement&&(r={measure:Je(n),mutate:et(n)}),e.web?e.web(t,r,i):e(t,r,i)}return[]}function nt(e,t,n,s,i){const r=typeof e=="string"?z(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const v=Y(d),h=Le(v,t,r,n,s);return typeof h!="function"?null:h(r)}const o=Y(t),c=Le(o,t,r,n,s);if(!c||c.length===0)return null;const a=tt(c,n,t.effectId);let f;const u=n?.trigger==="view-progress";u&&window.ViewTimeline&&(f=new ViewTimeline({subject:n.element||z(n.componentId)}));const l=a.map(({effect:d,options:v,id:h,part:m})=>{const p=m?Sn(r,m):r,g=new KeyframeEffect(p||null,[],v);O.mutate(()=>{"timing"in d&&g.updateTiming(d.timing),g.setKeyframes(d.keyframes)});const E=u&&f?{timeline:f}:{},y=typeof d.customEffect=="function"?new vn(d.customEffect,p||null,v,E):new Animation(g,E.timeline);if(u)if(f)O.mutate(()=>{const{start:w,end:$}=Ze(d);y.rangeStart=w,y.rangeEnd=$,y.play()});else{const{startOffset:w,endOffset:$}=t;O.mutate(()=>{const S=d.startOffset||w,I=d.endOffset||$;Object.assign(y,{start:{name:S.name,offset:S.offset?.value,add:d.startOffsetAdd},end:{name:I.name,offset:I.offset?.value,add:d.endOffsetAdd}})})}return h&&(y.id=h),y});return new K(l,{...t,trigger:{...n||{}},measured:new Promise(d=>O.mutate(d))})}function Tn(e,t){return e?`#${e}${t?`[data-motion-part~="${t}"]`:""}`:""}function On(e,t,n){const{duration:s,delay:i,iterations:r=1,fill:o,easing:c="linear",direction:a}=e.options,f=e.effect.name,u=s==="auto",{sequenceId:l,delay:d,offset:v,offsetEasing:h="linear"}=n||{};let m=`${i??0}ms`;if(l&&typeof h=="string"){const p=pn(h);if(p){const g=(i??0)+(d??0);if(v){const E=p(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);m=`calc(${`(${g} + ${E} * ${v} * var(--motion-${l}-last, 1))`} * 1ms)`}else m=`${g}ms`}}return`${f} ${u?"auto":`${s}ms`}${u?" ":` ${m} `}${c}${o&&o!=="none"?` ${o}`:""} ${!r||r===1/0?"infinite":r}${a==="normal"?"":` ${a}`} ${t?"":"paused"}`}function Cn(e,t,n){return e?.style?(Ae(n)&&(t.duration=t.duration||1),e.style(t)):[]}function An(e,t,n,s){const i=Y(t),r=Cn(i,t),o=tt(r,n,t.effectId,!0),c=n?.trigger==="view-progress";return o.map((a,f)=>{const{start:u,end:l}=c?Ze(a.effect):{};return{target:Tn(e,a.part),animation:On(a,c,s),composition:a.options.composite,custom:a.effect.custom,name:a.effect.name,keyframes:a.effect.keyframes,id:a.id&&`${a.id}-${f+1}`,animationTimeline:c?`--${n?.id}`:"",animationRange:u||l?`${u} ${l}`:""}})}function qn(e,t,n){const s=Y(t),i=e instanceof HTMLElement?e:z(e);if(s&&s.prepare&&i){const r={measure:Je(i),mutate:et(i)};s.prepare(t,r)}n&&O.mutate(n)}function st(e,t){const n=Y(t);if(!n)return null;if(!n.style)return t.effectId&&e?_n(e,t.effectId):null;const s=n.getNames(t),r=(typeof e=="string"?z(e):e)?.getAnimations(),o=r?.map(a=>a.animationName)||[],c=[];return s.forEach(a=>{o.includes(a)&&c.push(r?.find(f=>f.animationName===a))}),c?.length?new K(c):null}function _n(e,t){const s=(typeof e=="string"?z(e):e)?.getAnimations().filter(i=>{const r=i.id||i.animationName;return r?r.startsWith(t):!0});return s?.length?new K(s):null}function it(e,t,n,s={}){const{disabled:i,allowActiveEvent:r,...o}=s,c=nt(e,t,n,o);if(!c)return null;let a={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const f=n.element||z(n.componentId),{ready:u}=c;return c.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:f,ready:u,getProgress(){return c.getProgress()},effect(d,v){const{activeDuration:h}=l.effect.getComputedTiming(),{delay:m}=l.effect.getTiming();l.currentTime=((m||0)+(h||0))*v},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const f=t,{centeredToTarget:u,transitionDuration:l,transitionEasing:d}=f,v=n.axis;if(f.keyframeEffect){const h=c;return h.animations?.length===0?null:{target:void 0,centeredToTarget:u,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(p,g){const E=v==="x"?g.x:g.y;this._currentProgress=E,h.progress(E)},disabled:i??!1,destroy(){h.cancel()}}}a={centeredToTarget:u,allowActiveEvent:r},t.customEffect&&l&&(a.transitionDuration=l,a.transitionEasing=Xe(d)),a.target=c.target}return{...a,getProgress(){return c.getProgress()},effect(f,u,l,d){c.progress(l?{...u,v:l,active:d}:u)},disabled:i,destroy(){c.cancel()}}}function U(e,t,n,s=!1){const i=st(e,t);return i?(i.ready=new Promise(r=>{qn(e,t,r)}),i):nt(e,t,n,{reducedMotion:s})}function kn(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function rt(e,t){const n=[];for(const{target:s,options:i}of e){const r=kn(s);for(const o of r){const c=U(o,i,void 0,t?.reducedMotion);c instanceof K&&n.push(c)}}return n}function Pn(e,t,n){const s=rt(t,n);return new gn(s,e)}const Z={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Mn(e,t){const n=e?.name??Z.rangeStart.name,s=t?.name??e?.name??Z.rangeEnd.name,i={name:n,offset:e?.offset||Z.rangeStart.offset},r={name:s,offset:t?.offset||Z.rangeEnd.offset};return{startOffset:i,endOffset:r}}function M(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:i,endOffset:r}=Mn(t,n);return{id:"",startOffset:i,endOffset:r,...s}}function q(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function Q(e,t){e.get(t)?.forEach(s=>{const{source:i,target:r,cleanup:o}=s;o();const c=i===t?r:i;e.get(c)?.delete(s)}),e.delete(t)}const xn={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},Ln={root:null,rootMargin:"0px",threshold:[0]},Fn=.2;function Rn(e){const t=e.trim().split(/\s+/),n=t[0],s=t.length>1?t[1]:t[0],i=r=>r.startsWith("-")?r.slice(1):parseFloat(r)?`-${r}`:r;return`${i(n)} 0px ${i(s)}`}const W={},x=new WeakMap,fe=new WeakSet,D=new WeakMap;let ot={},G=null;function Nn(e){ot=e}function ct(e,t,n){x.get(e)?.forEach(({source:i,handler:r})=>{i===e&&r(t,n)})}function Fe(){return G||(G=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||ct(n,!1,!0)})},Ln),G)}function at(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(W[n])return W[n];const s=e.threshold??Fn,i=t?xn:{root:null,rootMargin:e.inset?Rn(e.inset):"0px",threshold:s},r=new IntersectionObserver(o=>{o.forEach(c=>{const a=c.target,f=!fe.has(a);if(f&&(fe.add(a),e.useSafeViewEnter&&!c.isIntersecting)){O.measure(()=>{const u=c.boundingClientRect.height,l=c.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&u*d>l&&O.mutate(()=>{r.unobserve(a);const h=at(e,!0);D.set(a,h),h.observe(a)})});return}(c.isIntersecting||!f)&&ct(a,c.isIntersecting)})},i);return W[n]=r,r}function zn(e,t,n,s={},{reducedMotion:i,selectorCondition:r,animation:o}={}){const c={...ot,...s},a=n.triggerType||"once",f=o||U(t,M(n),void 0,i);if(!f)return;const u=at(c);a!=="once"&&f.persist?.();let l=!0,d=!1,v;v={source:e,target:t,handler:(p,g)=>{if(!(r&&!t.matches(r)))if(a==="once"){if(p&&!d){d=!0,x.get(e)?.delete(v),x.get(t)?.delete(v);const E=x.get(e);(!E||E.size===0)&&((D.get(e)||u).unobserve(e),fe.delete(e)),f.play(()=>{const y=()=>{t.dataset.interactEnter="start"};if(f.isCSS){O.mutate(()=>{requestAnimationFrame(y)});const w=()=>{O.mutate(()=>{t.dataset.interactEnter="done"})};f.onFinish(w),f.onAbort(w)}else O.mutate(y)})}}else a==="alternate"?l&&p?(l=!1,f.play()):l||f.reverse():a==="repeat"?p?(f.progress(0),f.play()):g&&(f.pause(),f.progress(0)):a==="state"&&(p?f.play():g&&f.pause())},cleanup:()=>{(D.get(e)||u).unobserve(e),(a==="repeat"||a==="state")&&Fe().unobserve(e),f.cancel(),fe.delete(e),D.delete(e)}},q(x,e,v),q(x,t,v),D.set(e,u),u.observe(e),(a==="repeat"||a==="state")&&Fe().observe(e)}function jn(e){Q(x,e)}function Dn(){G=null,Object.keys(W).forEach(e=>delete W[e])}const Gn={add:zn,remove:jn,setOptions:Nn,reset:Dn};function ut(e,t){return Object.assign(Object.create(t),e)}function Hn(e,t,n,s){let i=e*(1-n)+t*n;if(s){const r=i-e;Math.abs(r)<s&&(i=e+s*Math.sign(r));const o=t-i;if(Math.abs(o)<s)return t}return i}function Wn(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function Re(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Vn(e,t){const n=e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);return le(n[1],t)+le(n[6],t)}function le(e,t){return e?/^-?\d+px$/.test(e)?parseInt(e):/^-?\d+[lsd]?vh$/.test(e)?parseInt(e)*t.viewportHeight/100:/^-?\d+[lsd]?vw$/.test(e)?parseInt(e)*t.viewportWidth/100:/^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e)?Vn(e,t):parseInt(e)||0:0}function F(e,t,n){const{name:s,offset:i=0}=e,{start:r,end:o}=n,c=o-r,a=i/100;let f,u;return s==="entry"?(f=r-t,u=Math.min(t,c)):s==="entry-crossing"?(f=r-t,u=c):s==="contain"?(f=Math.min(o-t,r),u=Math.abs(t-c)):s==="exit"?(f=Math.max(r,o-t),u=Math.min(t,c)):s==="exit-crossing"?(f=r,u=c):s==="cover"&&(f=r-t,u=c+t),f+a*u|0}function ge(e,t,n,s,i){let r=0;const o={start:t,end:n};return e.forEach((c,a)=>{r+=c.offset;const f=c.sticky;if(f){if("end"in f&&e[a-1]?.element){const d=((i?c.element.offsetWidth:c.element.offsetHeight)||0)+f.end-s,v=r+d-c.offset,h=v<o.start,m=!h&&v<=n;let p=0;(h||m)&&(p=c.offset,o.end+=p),h&&(o.start+=p)}if("start"in f){const u=r-f.start,l=u<o.start,d=!l&&u<=o.end;let v=0;const h=e[a-1]?.element;if(h){if(l||d){const m=(i?h.offsetWidth:h.offsetHeight)||0,p=c.offset,g=(i?c.element.offsetWidth:c.element.offsetHeight)||0;v=m-(p+g),r+=v,o.end+=v}l&&(o.start+=v)}}}}),o}function Yn(e,t,n,s,i,r){const{start:o,end:c,duration:a}=e;let f=o,u=c,l=e.startRange,d=e.endRange,v;if(typeof a=="string"){l={name:a,offset:0},d={name:a,offset:100},f=F(l,n,t),u=F(d,n,t),v=u-f;const h=ge(r,f,u,n,s);f=h.start,u=h.end}else{if(l||o?.name){l=l||o;const h=le(l.add,i),m=F({...l,offset:0},n,t),p=F({...l,offset:100},n,t),g=ge(r,m,p,n,s);f=g.start+l.offset/100*(g.end-g.start)+h}if(d||c?.name){d=d||c;const h=le(d.add,i),m=F({...d,offset:0},n,t),p=F({...d,offset:100},n,t),g=ge(r,m,p,n,s);u=g.start+d.offset/100*(g.end-g.start)+h}else typeof a=="number"&&(u=f+a)}return!v&&!a&&(v=u-f),{...e,start:f,end:u,startRange:l,endRange:d,duration:v||a}}function Bn(e){return e.position==="sticky"}function Kn(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Un(e,t){return parseInt(t?e.left:e.top)}function Qn(e,t){return parseInt(t?e.right:e.bottom)}function Xn(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function Zn(e,t){let n;const s=Un(e,t),i=Qn(e,t),r=!isNaN(s),o=!isNaN(i);return(r||o)&&(n={},r&&(n.start=s),o&&(n.end=i)),n}function J(e,t,n,s,i){const r=e[0].viewSource,o=[];let c=(s?r.offsetWidth:r.offsetHeight)||0,a=0,f=r;for(;f;){const l=window.getComputedStyle(f),d=Bn(l),v=d?Zn(l,s):void 0,h=Xn(f,s,d);if((!v||!("end"in v))&&(a+=h),o.push({element:f,offset:h,sticky:v}),f=f.offsetParent,Kn(l,f,t))break;if(f===t){o.push({element:f,offset:0});break}}return o.reverse(),e.map(l=>({...Yn(l,{start:a,end:a+c},n,s,i,o)}))}const Ne=100,Jn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function es(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function ze(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function ts(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function ns(e){const t=ut(e,Jn),n=t.root,s=t.horizontal,i=new WeakMap;let r=ze(n,s),o,c,a,f,u;const l=[],d=ts();if(t.scenes=Object.values(e.scenes.reduce((m,p,g)=>{const E=p.groupId?`group-${p.groupId}`:String(g);return m[E]?m[E].push(p):m[E]=[p],m},{})).flatMap(m=>(m.every(p=>p.viewSource&&(typeof p.duration=="string"||p.start?.name))?(m=J(m,n,r,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(m)):m.forEach(p=>{p.end==null&&(p.end=p.start+p.duration),p.duration==null&&(p.duration=p.end-p.start)}),m)),t.scenes.forEach((m,p)=>{m.index=p}),l.length){const m=new Map;window.ResizeObserver&&(a=new window.ResizeObserver(function(p){p.forEach(g=>{const E=m.get(g.target),y=J(E,n,r,s,d);y.forEach((w,$)=>{t.scenes[w.index]=y[$]}),l.splice(l.indexOf(E),1,y)})}),l.forEach(p=>{a.observe(p[0].viewSource,{box:"border-box"}),m.set(p[0].viewSource,p)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(Re(()=>{const g=l.map(E=>{const y=J(E,n,r,s,d);return y.forEach((w,$)=>{t.scenes[w.index]=y[$]}),y});l.length=0,l.push(...g),l.forEach(E=>{m.set(E[0].viewSource,E)})},Ne)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(f=Re(function(){r=ze(n,s);const p=l.map(g=>{const E=J(g,n,r,s,d);return E.forEach((y,w)=>{t.scenes[y.index]=E[w]}),E});l.length=0,l.push(...p),l.forEach(g=>{m.set(g[0].viewSource,g)})},Ne),n===window?window.addEventListener("resize",f):window.ResizeObserver&&(u=new window.ResizeObserver(f),u.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(c=new window.IntersectionObserver(function(m){m.forEach(p=>{(i.get(p.target)||[]).forEach(g=>{g.disabled=!p.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(m=>{if(m.viewSource){let p=i.get(m.viewSource);p||(p=[],i.set(m.viewSource,p),c.observe(m.viewSource)),p.push(m)}}));function v({p:m,vp:p}){m=+m.toFixed(1);const g=+p.toFixed(4);if(m!==o){for(let E of t.scenes)if(!E.disabled){const{start:y,end:w,duration:$}=E,S=es(m,y,w,$);E.effect(E,S,g)}o=m}}function h(){t.scenes.forEach(m=>m.destroy?.()),c&&(c.disconnect(),c=null),a&&(a.disconnect(),a=null),f&&(u?(u.disconnect(),u=null):window.removeEventListener("resize",f))}return{tick:v,destroy:h}}const ss={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class is{constructor(t={}){this.config=ut(t,ss),this.progress={p:0,prevP:0,vp:0},this.currentProgress={p:0,prevP:0,vp:0},this._lerpFrameId=0,this.effect=null;const n=!this.config.root||this.config.root===window.document.body;this.config.root=n?window:this.config.root,this.config.contentRoot=this.config.contentRoot||(n?window.document.body:this.config.root.firstElementChild),this.config.resetProgress=this.config.resetProgress||this.resetProgress.bind(this),this._measure=this.config.measure||(()=>{const s=this.config.root;this.progress.p=this.config.horizontal?s.scrollX||s.scrollLeft||0:s.scrollY||s.scrollTop||0}),this._trigger=Wn(()=>{this._measure?.(),this.tick(!0)})}start(){this.setupEffect(),this.setupEvent(),this.resetProgress(),this.tick()}pause(){this.removeEvent()}resetProgress(t={}){const n=this.config.root,s=t.x||t.x===0?t.x:n.scrollX||n.scrollLeft||0,i=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,r=this.config.horizontal?s:i;this.progress.p=r,this.progress.prevP=r,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=r,this.currentProgress.prevP=r,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,i)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const i=s.p-s.prevP,r=i<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(i))/this.config.velocityMax*r}this.effect.tick(s),n&&s.p!==this.progress.p&&(t&&this._lerpFrameId&&window.cancelAnimationFrame(this._lerpFrameId),this._lerpFrameId=window.requestAnimationFrame(()=>this.tick())),s.prevP=s.p}lerp(){this.currentProgress.p=Hn(this.currentProgress.p,this.progress.p,+(1-this.config.transitionFriction).toFixed(3),this.config.transitionEpsilon)}destroy(){this.pause(),this.removeEffect()}setupEvent(){this.removeEvent(),this.config.root.addEventListener("scroll",this._trigger)}removeEvent(){this.config.root.removeEventListener("scroll",this._trigger)}setupEffect(){this.removeEffect(),this.effect=ns(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const we=new WeakMap;let ft=()=>({});function rs(e){ft=e}function os(e,t,n,s,{reducedMotion:i}){if(i)return;const r={trigger:"view-progress",element:e},o=M(n);let c;if("ViewTimeline"in window){const f=U(t,o,r);f&&!f.isCSS&&(f.play(),c=()=>{f.ready.then(()=>{f.cancel()})})}else{const f=it(t,o,r);if(f){const u=Array.isArray(f)?f:[f],l=new is({viewSource:e,scenes:u,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...ft()});c=()=>{l.destroy()},Promise.all(u.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!c)return;const a={source:e,target:t,cleanup:c};q(we,e,a),q(we,t,a)}function cs(e){Q(we,e)}const as={add:os,remove:cs,registerOptionsGetter:rs};function je(e,t,n){return Math.min(Math.max(e,n),t)}function De(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function us(e){let t=e,n=0,s=0;if(t.offsetParent)do n+=t.offsetLeft,s+=t.offsetTop,t=t.offsetParent;while(t);return{left:n,top:s,width:e.offsetWidth,height:e.offsetHeight}}function fs(){const e=window.devicePixelRatio;let t=!1;if(e===1)return!1;document.body.addEventListener("pointerdown",s=>{t=s.offsetX!==10},{once:!0});const n=new PointerEvent("pointerdown",{clientX:10});return document.body.dispatchEvent(n),t}function ls(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function i(){document.body.addEventListener("pointerdown",c=>{s===void 0?s=c.offsetY:n=c.offsetY===s},{once:!0});const o=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(o)}function r(){window.scrollY!==t&&(window.removeEventListener("scroll",r),i(),e(n))}i(),window.addEventListener("scroll",r),window.scrollY>0&&window.scrollBy(0,-1)})}function ds(e){ls().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let ee=0;const re=new Set;function hs(){const e=n=>{for(let s of n.changedTouches)re.add(s.identifier)},t=n=>{for(let s of n.changedTouches)re.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){re.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function ms(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;ee||(s=hs()),ee+=1;function i(r){clearTimeout(n),n=setTimeout(()=>{re.size?setTimeout(i,100):(t(r),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),ee-=1,ee||s()}}function ps(e,t,n){return{x(s){const i=e.left-n.x+e.width/2,r=i>=t.width/2,o=(r?i:t.width-i)*2,c=r?0:i-o/2;return(s-c)/o},y(s){const i=e.top-n.y+e.height/2,r=i>=t.height/2,o=(r?i:t.height-i)*2,c=r?0:i-o/2;return(s-c)/o}}}function gs(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function vs(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function ys(e){const t=new ResizeObserver(n=>{n.forEach(s=>{e.rect.width=s.borderBoxSize[0].inlineSize,e.rect.height=s.borderBoxSize[0].blockSize})});return t.observe(e.root,{box:"border-box"}),t}function Es(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,i,r,o,c;const a={x:0,y:0};e.scenes.forEach(u=>{u.target&&u.centeredToTarget&&(u.transform=ps(us(u.target),e.rect,a),t=!0),e.root?i=ys(e):(r=vs.bind(null,e),window.addEventListener("resize",r))}),s=function(u){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(u.x)||u.x/e.rect.width,v=l.transform?.y(u.y)||u.y/e.rect.height,h=+je(0,1,d).toPrecision(4),m=+je(0,1,v).toPrecision(4),p={x:u.vx,y:u.vy};e.allowActiveEvent&&(u.active=d<=1&&v<=1&&d>=0&&v>=0),l.effect(l,{x:h,y:m},p,u.active)}Object.assign(n,u)},t&&(o=gs.bind(a,s,n),c=ms(document,o));function f(){e.scenes.forEach(u=>u.destroy?.()),c?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",r),r=null),s=null,n=null}return{tick:s,destroy:f}}const ws=1e3/60*3;let te;function bs(){R.x=window.scrollX,R.y=window.scrollY}const R={x:0,y:0,scrollHandler:bs,fixRequired:void 0};class $s{constructor(t={}){this.config={...t},this.effect=null,this._nextTick=null,this._nextTransitionTick=null,this._startTime=0;let n;this.config.transitionDuration?n=this.config.noThrottle?()=>this.transition():De(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):De(()=>{this.tick()}),this.config.rect=this.config.root?{width:this.config.root.offsetWidth,height:this.config.root.offsetHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight},this.progress={x:this.config.rect.width/2,y:this.config.rect.height/2,vx:0,vy:0},this.previousProgress={...this.progress},this.currentProgress=null;const s=i=>{const r=this.config.root?i.offsetX:i.x,o=this.config.root?i.offsetY:i.y;this.progress.vx=r-this.progress.x,this.progress.vy=o-this.progress.y,this.progress.x=r,this.progress.y=o,this._nextTick=n()};if(this._pointerLeave=()=>{this.progress.active=!1,this.progress.vx=0,this.progress.vy=0,this._nextTick=n()},this._pointerEnter=()=>{this.progress.active=!0,this._nextTick=n()},this.config.root){te=typeof te=="boolean"?te:fs();const i=te?window.devicePixelRatio:1;typeof R.fixRequired>"u"&&ds(R),this._measure=r=>{if(r.target!==this.config.root){const o=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:r.x*i+R.x,clientY:r.y*i+R.y});r.stopPropagation(),this.config.root.dispatchEvent(o)}else s(r)}}else this._measure=s}start(){this.setupEffect(),this.setupEvent()}pause(){this.removeEvent()}tick(){this.effect.tick(this.progress)}transition(){const t=this.config.transitionDuration,n=this.config.transitionEasing||(o=>o),s=performance.now();let i=!1;const r=o=>{const c=(o-this._startTime)/t,a=n(Math.min(1,c));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((f,[u,l])=>(u==="active"?f[u]=l:f[u]=this.previousProgress[u]+(l-this.previousProgress[u])*a,f),this.currentProgress||{}),c<1&&(this._nextTransitionTick=requestAnimationFrame(r),i=o-this._startTime>ws),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,r(s)):this._startTime=s,this._nextTransitionTick}destroy(){this.pause(),this.removeEffect(),this._nextTick&&cancelAnimationFrame(this._nextTick),this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick)}setupEvent(){this.removeEvent();const t=this.config.root||window;t.addEventListener("pointermove",this._measure,{passive:!0}),this.config.eventSource&&this.config.eventSource.addEventListener("pointermove",this._measure,{passive:!0}),this.config.allowActiveEvent&&(t.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),t.addEventListener("pointerenter",this._pointerEnter,{passive:!0}),this.config.eventSource&&(this.config.eventSource.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),this.config.eventSource.addEventListener("pointerenter",this._pointerEnter,{passive:!0})))}removeEvent(){const t=this.config.root||window;t.removeEventListener("pointermove",this._measure),this.config.eventSource&&this.config.eventSource.removeEventListener("pointermove",this._measure),this.config.allowActiveEvent&&(t.removeEventListener("pointerleave",this._pointerLeave),t.removeEventListener("pointerenter",this._pointerEnter),this.config.eventSource&&(this.config.eventSource.removeEventListener("pointerleave",this._pointerLeave),this.config.eventSource.removeEventListener("pointerenter",this._pointerEnter)))}setupEffect(){this.removeEffect(),this.effect=Es(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const be=new WeakMap;let lt=()=>({});function Ss(e){lt=e}function Is(e,t,n,s={},{reducedMotion:i}){if(i)return;const r={trigger:"pointer-move",element:e,axis:s.axis??"y"},o=it(t,M(n),r);if(o){const c=Array.isArray(o)?o:[o],a=new $s({root:s.hitArea==="self"?e:void 0,scenes:c,...lt()}),u={source:e,target:t,cleanup:()=>{a.destroy()}};q(be,e,u),q(be,t,u),Promise.all(c.map(l=>l.ready||Promise.resolve())).then(()=>{a.start()})}}function Ts(e){Q(be,e)}const Os={add:Is,remove:Ts,registerOptionsGetter:Ss},$e=new WeakMap;function Cs(e,t,n,s,{reducedMotion:i,selectorCondition:r,animation:o,sourceAnimationOptions:c}){const a=o||U(t,M(n),void 0,i);if(!a)return;const{effectId:f}=s,u=v=>{if(r&&!t.matches(r))return;const h=v.animationName,m=v.detail?.effectId,p=c?st(e,c):null;if(p){if(p.playState==="running"||h&&!p.hasAnimationName(h))return;if(m&&m!==f&&!p.hasAnimationId(m))return}a.play()},d={source:e,target:t,cleanup:()=>{a.cancel(),e.removeEventListener("animationend",u)}};q($e,e,d),q($e,t,d),e.addEventListener("animationend",u)}function As(e){Q($e,e)}const qs={add:Cs,remove:As};function _s(e,t,n=!1,s,i,r){const o=r||U(e,M(t),void 0,n);if(!o)return null;let c=!0;const a=t.triggerType||"alternate";return f=>{if(s&&!e.matches(s))return;const u=!i,l=i?.enter?.includes(f.type),d=i?.leave?.includes(f.type);if(l||u){if(a==="alternate"||a==="state")c?(c=!1,o.play()):a==="alternate"?o.reverse():a==="state"&&(o.playState==="running"?o.pause():o.playState!=="finished"&&o.play());else{if(o.progress(0),delete e.dataset.interactEnter,o.isCSS){const v=()=>{O.mutate(()=>{e.dataset.interactEnter="done"})};o.onFinish(v),o.onAbort(v)}o.play()}return}d&&(a==="alternate"?o.reverse():a==="repeat"?(o.cancel(),O.mutate(()=>{delete e.dataset.interactEnter})):a==="state"&&o.playState==="running"&&o.pause())}}function ks(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:r},o,c){const a=!!s,f=r??"toggle",u=f==="toggle";return l=>{if(o&&!e.matches(o))return;const d=a?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,v=!c,h=c?.enter?.includes(l.type),m=c?.leave?.includes(l.type);v?t.toggleEffect(n,f,d):(h&&t.toggleEffect(n,u?"add":f,d),m&&u&&t.toggleEffect(n,"remove",d))}}const Se=new WeakMap;function Ge(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function Ps(e){return t=>{const n=t;n.pointerType&&e(n)}}function Ms(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const xs={focusin:(e,t)=>Ge(e,t),focusout:(e,t)=>Ge(e,t),click:(e,t)=>Ps(t),keydown:(e,t)=>Ms(t)};function Ls(e,t,n){const s=xs[e];return s?s(t,n):i=>n(i)}function Fs(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function Rs(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(Fs(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function Ns(e){return!!(e.enter?.length||e.leave?.length)}function zs(e){return Ns(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function js(e,t,n,s,{reducedMotion:i,targetController:r,selectorCondition:o,animation:c}){const a=Rs(s.eventConfig),f=n.transition||n.transitionProperties,u=zs(a);let l,d=!1;if(f?l=ks(t,r,n,o,u):(l=_s(t,n,i,o,u,c),d=n.triggerType==="once"),!l)return;const v=l,h=new AbortController;function m(E,y,w){const $=Ls(y,e,v);E.addEventListener(y,$,{...w,signal:h.signal})}const g={source:e,target:t,cleanup:()=>{h.abort()}};if(q(Se,e,g),q(Se,t,g),u){const E=a.enter,y=a.leave;E.forEach(S=>{S==="focusin"&&(e.tabIndex=0),m(e,S,{passive:!0,once:d})});const w=!n.stateAction||n.stateAction==="toggle";(f?w:n.triggerType!=="once")&&y.forEach(S=>{if(S==="focusout"){m(e,S,{once:d});return}m(e,S,{passive:!0})})}else(a.toggle??[]).forEach(y=>{m(e,y,{once:d,passive:y!=="keydown"})})}function Ds(e){Q(Se,e)}const H={add:js,remove:Ds},Ie={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},He={click:Ie.activate,hover:Ie.interest};function ne(e){const t=Ie[e];return(n,s,i,r,o)=>{const c=o?.allowA11yTriggers&&e in He?He[e]:t;H.add(n,s,i,{eventConfig:c},o??{})}}const N={viewEnter:Gn,hover:{add:ne("hover"),remove:H.remove},click:{add:ne("click"),remove:H.remove},animationEnd:qs,viewProgress:as,pointerMove:Os,activate:{add:ne("activate"),remove:H.remove},interest:{add:ne("interest"),remove:H.remove}};function Gs(e){return e.replace(/\[([-\w]+)]/g,"[]")}class b{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;constructor(){this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},this.addedInteractions={},this.mediaQueryListeners=new Map,this.listInteractionsCache={},this.controllers=new Set}init(t,n){if(typeof window>"u"||!window.customElements)return;const s=n?.useCustomElement??!!b.defineInteractElement;this.dataCache=Ws(t,s);const i=b.defineInteractElement?.();s&&i===!1?document.querySelectorAll("interact-element").forEach(r=>{r.connect()}):b.controllerCache.forEach((r,o)=>r.connect(o))}destroy({clearCache:t=!1}={}){for(const n of this.controllers)n.disconnect({removeFromCache:t});for(const[,n]of this.mediaQueryListeners.entries())n.mql.removeEventListener("change",n.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},b.instances.splice(b.instances.indexOf(this),1)}setController(t,n){this.controllers.add(n),b.setController(t,n)}deleteController(t,n=!1){const s=b.controllerCache.get(t);this.clearInteractionStateForKey(t),this.clearMediaQueryListenersForKey(t),s&&n&&(this.controllers.delete(s),b.deleteController(t))}has(t){return!!this.get(t)}get(t){const n=Gs(t);return this.dataCache.interactions[n]}clearMediaQueryListenersForKey(t){for(const[n,s]of this.mediaQueryListeners.entries())s.key===t&&(s.mql.removeEventListener("change",s.handler),this.mediaQueryListeners.delete(n))}clearInteractionStateForKey(t){(this.get(t)?.interactionIds||[]).forEach(i=>{const r=_(i,t);delete this.addedInteractions[r]});const s=`${t}::seq::`;for(const i of b.sequenceCache.keys())i.startsWith(s)&&(b.sequenceCache.delete(i),delete this.addedInteractions[i])}setupMediaQueryListener(t,n,s,i){this.mediaQueryListeners.has(t)||(n.addEventListener("change",i),this.mediaQueryListeners.set(t,{mql:n,handler:i,key:s}))}static create(t,n){const s=new b;return b.instances.push(s),s.init(t,n),s}static destroy(){b.controllerCache.forEach(t=>{t.disconnect()}),b.instances.length=0,b.controllerCache.clear(),b.sequenceCache.clear(),b.elementSequenceMap=new WeakMap}static setup(t){t.scrollOptionsGetter&&N.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&N.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&N.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(b.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){const n=b.instances.find(s=>s.has(t));return n||console.warn(`Interact: Instance for key "${t}" not found`),n}static getController(t){const n=t?b.controllerCache.get(t):void 0;return n||console.warn(`Interact: Controller for key "${t}" not found`),n}static setController(t,n){b.controllerCache.set(t,n)}static deleteController(t){b.controllerCache.delete(t)}static registerEffects=bn;static use(t,n){b.plugins.set(t,n)}static getPlugin(t){return b.plugins.get(t)}static getPluginsNames(){return new Set(b.plugins.keys())}static getSequence(t,n,s,i){const r=b.sequenceCache.get(t);if(r)return r;const o=Pn(n,s,i);return b.sequenceCache.set(t,o),b._registerSequenceElements(s,o),o}static addToSequence(t,n,s,i){const r=b.sequenceCache.get(t);if(!r)return!1;const c=rt(n,i).map((a,f)=>({index:s[f]??r.animationGroups.length,group:a}));return r.addGroups(c),b._registerSequenceElements(n,r),!0}static _registerSequenceElements(t,n){for(const{target:s}of t){const i=Array.isArray(s)?s:s instanceof HTMLElement?[s]:[];for(const r of i){let o=b.elementSequenceMap.get(r);o||(o=new Set,b.elementSequenceMap.set(r,o)),o.add(n)}}}static removeFromSequences(t){for(const n of t){const s=b.elementSequenceMap.get(n);if(s){for(const i of s)i.removeGroups(r=>r.animations.some(o=>o.effect?.target===n));b.elementSequenceMap.delete(n)}}}}let Hs=0;function L(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const i=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${i} ${e.selector}`:`${e.listContainer}${i||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function We(e){return"sequenceId"in e&&!("effects"in e)}function ve(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function Ws(e,t=!1){const{effects:n={},sequences:s={},conditions:i={}}=e,r={};return e.interactions?.forEach((o,c)=>{const a=o.key,f=++Hs,{effects:u,sequences:l,...d}=o;if(!a){console.error(`Interaction ${f} is missing a key for source element.`);return}ve(r,a);const v=u?Array.from(u):[];v.reverse();const h=l?.map((g,E)=>{if(We(g)){const w=s[g.sequenceId];return w?{...w,...g}:(console.warn(`Interact: Sequence "${g.sequenceId}" not found in config`),g)}const y=g;return y.sequenceId||(y.sequenceId=`seq-${c}-${E}`),y}),m={...d,effects:v.length>0?v:void 0,sequences:h};r[a].triggers.push(m),r[a].selectors.add(L(m,{useFirstChild:t}));const p=m.listContainer;v.forEach((g,E)=>{let y=g.key;if(!y&&g.effectId){const I=n[g.effectId];I&&(y=I.key)}g.effectId||(g.effectId=`eff-${c}-${v.length-1-E}`),y=y||a,g.key=y;const w=g.effectId;if(p&&g.listContainer&&(y!==a||g.listContainer!==p))return;const $=`${a}::${y}::${w}::${f}`;if(g.interactionId=$,r[a].interactionIds.add($),y===a)return;const S=ve(r,y);S.effects[$]||(S.effects[$]=[],S.interactionIds.add($)),S.effects[$].push({...d,effect:g}),S.selectors.add(L(g,{useFirstChild:t}))}),h?.forEach(g=>{if(!g||We(g))return;const E=g,y=E.sequenceId;E.effects.forEach(($,S)=>{$.effectId||($.effectId=`eff-${y}-${S}`);let I=$.key;if(!I&&$.effectId){const C=n[$.effectId];C&&(I=C.key)}I=I||a;const T=L($,{useFirstChild:t});if(T&&r[a].selectors.add(T),I!==a){const C=ve(r,I),A=`${I}::seq::${y}::${f}`;C.sequences[A]||(C.sequences[A]=[],C.interactionIds.add(A)),C.sequences[A].push({...d,sequence:E}),C.selectors.add(T)}})})}),{effects:n,sequences:s,conditions:i,interactions:r}}const dt="$";function Vs(e,t=2){return parseFloat(e.toFixed(t))}function Ys(e){return/\[]/g.test(e)}function Bs(e){return`--${e.join("-")}`}function Ks(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function oe(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function B(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function ht(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:ue(i.name)}))}function mt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:r,delay:o}=t;i&&(t.styleProperties.some(a=>a.name.startsWith("--"))?s=[`all ${i}ms ${se(r||"ease")}${o?` ${o}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(a=>`${ue(a.name)} ${i}ms ${se(r||"ease")}${o?` ${o}ms`:""}`))}else s=n?.filter(i=>i.duration).map(i=>`${ue(i.name)} ${i.duration}ms ${se(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function Us({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:r}){const o=mt({transition:n,transitionProperties:s}),c=ht({transition:n,transitionProperties:s}).map(h=>`${h.name}: ${h.value};`),a=e.replace(/"/g,"'"),f=`:is(:state(${t}), :--${t}) ${i}`,u=`[data-interact-effect~="${t}"] ${i}`,l=r?oe(f,r):f,d=r?oe(u,r):u,v=[`${l},
2
2
  ${d} {
3
3
  ${c.join(`
4
4
  `)}
@@ -18,4 +18,4 @@ ${f}
18
18
  ${u}
19
19
  }`:u}function Tt(e,t,n,s){const{key:i,childSelector:r,properties:o}=e,c=Object.entries(o).filter(f=>f[1]&&f[1].varNames.length).map(([f,{fallback:u,varNames:l}])=>({name:f,value:l.map(d=>`var(${d}, ${u})`).join(", ")})),a={key:i,childSelector:r,declarations:c};return t&&a.declarations.forEach(f=>{f.name=t[f.name]}),n&&(a.media=X(n,s||{},"media"),a.selectorCondition=P(n,s||{})),a}const fi=[{name:"visibility",value:"hidden"},{name:"transform",value:"none",important:!0},{name:"translate",value:"none",important:!0},{name:"scale",value:"none",important:!0},{name:"rotate",value:"none",important:!0}],ce=["animation","animation-composition","animation-timeline","animation-range"],Ce=["transition",...ce],li={animation:"animation","animation-composition":"composition","animation-timeline":"animationTimeline","animation-range":"animationRange"},ae={animation:"none","animation-composition":"replace",transition:"_","animation-timeline":"auto","animation-range":"normal"};function Ot(e,t,n){const s=e.get(t);s?n.forEach(i=>s.add(i)):e.set(t,new Set(n))}function Ct(e,t,n,s){const{key:i,childSelector:r}=n,o=s?Ce.filter(a=>s.has(a)):Ce;e.has(t)||e.set(t,{key:i,childSelector:r,properties:{}});const{properties:c}=e.get(t);for(const a of o)c[a]||(c[a]={fallback:ae[a],varNames:[]}),c[a].varNames.push(n[a])}function At(e,t){return Ce.reduce((n,s)=>(n[s]=Bs([s,...e,t]),n),{})}function di(e,t,n,s,i){return s.has(e)||s.set(e,{key:t,childSelector:i,...At([n],Ye(e))}),s.get(e)}function hi(e,t,n){return At([t,n],Ye(e))}function mi(e,t,n,s=!0){const{key:i,conditions:r}=e,o=X(r,t,"media"),c=P(r,t),a=L(e,{asCombinator:!0,useFirstChild:s,addItemFilter:!0});return{key:i,media:o,selectorCondition:c,childSelector:a,declarations:[{name:"view-timeline",value:`--${n}`}]}}function qt(e,t,n,s,i){const r=[];for(const o of Object.keys(i)){const c=`${dt}${o}`;c in t&&r.push(...i[o](t[c],{key:n,scope:e,config:t}).map(a=>({...a,key:n,media:s})))}return r}function pi(e,t,n,s,i,r,o){const{key:c,effectId:a,conditions:f,namedEffect:u,keyframeEffect:l,transition:d,transitionProperties:v,initial:h}=e,m=X(f,t,"media"),p=P(f,t),g=[{key:c,media:m,selectorCondition:p,childSelector:i,declarations:[]}];let E=[];const{declarations:y}=g[0];let w=[];if(r&&g.push(...qt("effect",e,c,m,r)),u||l){w=[...ce];const $=M(e),S=An(null,$,s,o).filter(T=>T.name);E=S.map(T=>({name:T.name,keyframes:T.keyframes})),y.push(...S.flatMap(({custom:T})=>Object.entries(T||{}).filter(([C,A])=>A!==void 0).map(([C,A])=>({name:C,value:A}))));const I=ce.map(T=>({name:n[T],value:S.map(C=>{const A=li[T];return C[A]}).join(", ")||ae[T]}));h?(g.push({key:c,media:m,selectorCondition:p,childSelector:i,declarations:fi,selectorSuffix:":not([data-interact-enter])"}),g.push({key:c,media:m,selectorCondition:p,childSelector:i,declarations:I,selectorSuffix:':not([data-interact-enter="done"])'})):y.push(...I)}else if(d||v){w=["transition"];const $=ht(e),S=mt(e);y.push({name:n.transition,value:S.join(", ")||ae.transition}),g.push({key:c,media:m,selectorCondition:p,childSelector:i,states:[a],declarations:$})}else y.push(...ce.map($=>({name:n[$],value:ae[$]})));return{rules:g.filter($=>$.declarations.length),keyframes:E,usedProperties:w}}function _t(e,t,n,s,i,r,o=!0,c,a,f,u){const{key:l}=n,d=f??V(n),v=L(n,{asCombinator:!0,useFirstChild:o,addItemFilter:!0}),m={...di(d,l,t,s,v)};a&&Object.assign(m,a);const{rules:p,keyframes:g,usedProperties:E}=pi(n,e,m,r,v,c,u);return g.forEach(({name:y,keyframes:w})=>i.set(y,w)),{rules:p,usedProperties:E}}function gi(e,t,n,s,i,r,o=!0,c,a){const f=new Map,u=new Map,l=[];for(const v of n.effects){const h=V(v),{key:m}=v,p=L(v,{asCombinator:!0,useFirstChild:o,addItemFilter:!0}),g=u.get(h)||0;u.set(h,g+1);const E=hi(h,t,g),{rules:y,usedProperties:w}=_t(e,t,v,s,i,r,o,a,E,h,n);l.push(...y);const $=new Set(w);Ct(f,h,{key:m,childSelector:p,...E},$),c&&Ot(c,h,w)}const{conditions:d}=n;return f.forEach((v,h)=>{const m=s.get(h);l.push(Tt(v,m,d,e))}),l}function vi(e,t,n,s,i,r=!0,o){const{key:c,conditions:a,effects:f=[],sequences:u=[]}=t,l=e.conditions||{},d=new Map,v=new Map,h=f.map((y,w)=>It(y,t,e,`eff-${n}-${w}`)).filter(y=>y!==null),m=o?qt("interaction",t,c,X(a,l,"media"),o):[],{trigger:p}=t,g={trigger:Ks(p),id:["trigger",n].join("-")};p==="viewProgress"&&m.push(mi(t,l,g.id,r));for(const y of h){const w=V(y),{rules:$,usedProperties:S}=_t(l,n,y,d,i,g,r,o);m.push(...$),Ot(v,w,S)}const E=u.map((y,w)=>ii(y,t,e,`seq-${n}-${w}`)).filter(y=>y!==null);return m.push(...E.flatMap(y=>gi(l,n,y,d,i,g,r,v,o))),d.forEach((y,w)=>{Ct(s,w,y,v.get(w))}),m}function yi(e={}){const{useFirstChild:t=!0,plugins:n}=typeof e=="boolean"?{useFirstChild:e,plugins:void 0}:e;return{useFirstChild:t,plugins:n}}function Ei(e,t){const{useFirstChild:n,plugins:s}=yi(t),i=new Map,r=new Map,o=e.interactions.flatMap((c,a)=>vi(e,c,a,i,r,n,s));return i.forEach(c=>{o.push(Tt(c))}),{keyframes:r,cssRules:o}}function wi(e,t){const{cssRules:n,keyframes:s}=Ei(e,t);return[...[...s.entries()].map(([r,o])=>ai(r,o)),...n.map(ui)].join(`
20
20
  `)}exports.I=$t;exports.a=b;exports.b=ni;exports.g=wi;exports.r=si;
21
- //# sourceMappingURL=index-Bt4pzwx1.js.map
21
+ //# sourceMappingURL=index-HNTNHMdH.js.map