motion-dom 14.7.0 → 14.7.1
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.
- package/dist/cjs/index.js +10 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/animation/waapi/transforms/TransformAnimation.mjs +1 -0
- package/dist/es/animation/waapi/transforms/TransformAnimation.mjs.map +1 -1
- package/dist/es/animation/waapi/transforms/groups.mjs.map +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +9 -1
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -1
- package/dist/motion-dom.dev.js +10 -1
- package/dist/motion-dom.js +1 -1
- package/package.json +2 -2
package/dist/motion-dom.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n={delta:0,timestamp:0,isProcessing:!1};let i;function s(){i=void 0}const o={now:()=>(void 0===i&&o.set(n.isProcessing||e.MotionGlobalConfig.useManualTiming?n.timestamp:performance.now()),i),set:t=>{i=t,queueMicrotask(s)}},r=t=>Math.round(1e5*t)/1e5,a=t=>e=>"string"==typeof e&&e.startsWith(t),l=a("--"),c=a("var(--"),u=t=>!!c(t)&&h.test(t.split("/*")[0].trim()),h=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function d(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const p={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...p,transform:t=>e.clamp(0,1,t)},f={...p,default:1},g=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v=(t,e)=>n=>Boolean("string"==typeof n&&y.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),x=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(g);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},w={...p,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},T={test:v("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+w.transform(t)+", "+w.transform(e)+", "+w.transform(n)+", "+r(m.transform(i))+")"},S=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const b={test:v("#"),parse:function(t){const e=t.length>5?2:1,n=S(t,3,e);return{red:parseInt(S(t,0,e),16),green:parseInt(S(t,1,e),16),blue:parseInt(S(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:T.transform},P=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=P("deg"),M=P("%"),E=P("px"),V=P("vh"),D=P("vw"),k=(()=>({...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)}))(),C={test:v("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+M.transform(r(e))+", "+M.transform(r(n))+", "+r(m.transform(i))+")"},R={test:t=>T.test(t)||b.test(t)||C.test(t),parse:t=>T.test(t)?T.parse(t):C.test(t)?C.parse(t):b.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?T.transform(t):C.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},B=new RegExp(g.source),L=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const j="number",O="color",F=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function I(t){const e=t.toString();return B.test(e)||L.test(e)}function N(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(F,t=>(R.test(t)?(i.color.push(o),s.push(O),n.push(R.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(j),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function U({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===j?r(i[o]):t===O?R.transform(i[o]):i[o]}return s}}const W=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:R.test(n)?R.getAnimatableNone(n):n;var n};const $={test:function(t){return isNaN(t)&&"string"==typeof t&&(B.test(t)||L.test(t))},parse:function(t){return N(t).values},createTransformer:function(t){return U(N(t))},getAnimatableNone:function(t){const e=N(t);return U(e)(e.values.map((t,n)=>W(t,e.split[n])))}};function z(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function K({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=z(a,i,t+1/3),o=z(a,i,t),r=z(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function G(t,e){return n=>n>0?e:t}const Y=(t,e,n)=>t+(e-t)*n,X=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},H=[b,T,C];function q(t){const e=(n=t,H.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===C&&(i=K(i)),i}const _=(t,e)=>{const n=q(t),i=q(e);if(!n||!i)return G(t,e);const s={...n};return t=>(s.red=X(n.red,i.red,t),s.green=X(n.green,i.green,t),s.blue=X(n.blue,i.blue,t),s.alpha=Y(n.alpha,i.alpha,t),T.transform(s))},Z=new Set(["none","hidden"]);function J(t,e){return Z.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Q(t,e){return n=>Y(t,e,n)}function tt(t){return"number"==typeof t?Q:"string"==typeof t?u(t)?G:R.test(t)?_:it:Array.isArray(t)?et:"object"==typeof t?R.test(t)?_:nt:G}function et(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>tt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function nt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=tt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const it=(t,n)=>{const i=N(t),s=N(n);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Z.has(t)&&!s.values.length||Z.has(n)&&!i.values.length?J(t,n):e.pipe(et(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),U(s)):G(t,n)},st=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ot(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Y(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=st.exec(t);if(!n)return;const i=st.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),a=parseFloat(i[1]);return t=>r(Y(o,a,t))+s}(t,e);if(n)return n}return tt(t)(t,e)}const rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function at(t,n,i={delta:0,timestamp:0,isProcessing:!1}){let s=!1,o=!0;const r=()=>s=!0,a=rt.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=e.MotionGlobalConfig.useManualTiming,a=r?i.timestamp:performance.now();s=!1,r||(i.delta=o?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),m.process(i),f.process(i),i.isProcessing=!1,s&&n&&(o=!1,t(g))};return{schedule:rt.reduce((e,n)=>{const r=a[n];return e[n]=(e,n=!1,a=!1)=>(s||(s=!0,o=!0,i.isProcessing||t(g)),r.schedule(e,n,a)),e},{}),cancel:t=>{for(let e=0;e<rt.length;e++)a[rt[e]].cancel(t)},state:i,steps:a}}const{schedule:lt,cancel:ct,steps:ut}=at("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0,n),ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>lt.update(e,t),stop:()=>ct(e),now:()=>n.isProcessing?n.timestamp:o.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pt=2e4;function mt(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function ft(t,n=100,i){const{keyframes:s,velocity:o}=t,r=s&&s[s.length-1]-s[0],a=i({...t,velocity:o&&r?o*n/r:o,keyframes:[0,n]}),l=Math.min(mt(a),pt);return{type:"keyframes",ease:t=>a.next(l*t).value/n,duration:e.millisecondsToSeconds(l)}}const gt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function yt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return wt(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function vt(t,e){return t*Math.sqrt(1-e*e)}const xt=12;function wt(t,e,n){let i=n;for(let n=1;n<xt;n++)i-=t(i)/e(i);return i}const Tt=.001;const St=(t,e)=>(e?t>=0:t>0)&&t<1/0;function bt(t,e){if(St(t,e))return t}function Pt(t){const n=bt(t.stiffness),i=bt(t.damping,!0),s=bt(t.mass),o={...t,stiffness:n??100,damping:i??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??i??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=gt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*yt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:n=.3}){let i,s;const o=gt(n);t=e.clamp(.01,10,e.millisecondsToSeconds(t)),o<1?(i=e=>{const n=e*o,i=n*t,s=vt(e,o),r=Math.exp(-i);return Tt-n/s*r},s=e=>{const n=e*o*t,s=o*o*e*e*t,r=Math.exp(-n),a=vt(e*e,o);return(-i(e)+Tt>0?-1:1)*-s*r/a}):(i=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=wt(i,s,5/t),a=r*yt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:e.secondsToMilliseconds(t)}}(o)),o.isResolvedFromDuration=!0;St(o.stiffness)&&St(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function At(t=.3,n=.3){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,isResolvedFromDuration:h,isTimeDefined:d}=Pt({...i}),p=t=>d?0:-e.millisecondsToSeconds(t),m=l/(2*Math.sqrt(a*c)),f=e.millisecondsToSeconds(Math.sqrt(a/c)),g=m*f,y={target:o,delta:o-s,velocity:p(i.velocity||0)||0,restSpeed:0,restDelta:0},v=()=>{const t=Math.abs(y.delta)<5;y.restSpeed=i.restSpeed||(t?.01:2),y.restDelta=i.restDelta||(t?.005:.5)};let x,w,T;if(v(),m<1){const t=vt(f,m),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=()=>{e.A=(y.velocity+g*y.delta)/t,e.sinC=g*e.A+y.delta*t,e.cosC=g*y.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-g*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};x=t=>(n(t),y.target-e.env*(e.A*e.sin+y.delta*e.cos)),w=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===m){x=t=>y.target-Math.exp(-f*t)*(y.delta+(y.velocity+f*y.delta)*t);const t={C:0};T=()=>{t.C=y.velocity+f*y.delta},w=e=>Math.exp(-f*e)*(f*t.C*e-y.velocity)}else{const t=f*Math.sqrt(m*m-1),e=g-t,n=g+t,i=t<1||d?1/0:300/t,s=(t,e)=>Math.exp(e>i?(g-t)*i-g*e:-t*e),o={S:0,F:0};T=()=>{const e=(y.velocity+g*y.delta)/t;o.S=(y.delta+e)/2,o.F=(y.delta-e)/2},x=t=>y.target-o.S*s(e,t)-o.F*s(n,t),w=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}T();const S=h&&u||null,b={calculatedDuration:S,retarget:(t,e)=>{y.target=t[t.length-1],y.delta=y.target-t[0],y.velocity=p(e),i.restSpeed&&i.restDelta||v(),b.calculatedDuration=S,r.done=!1,T()},velocity:t=>e.secondsToMilliseconds(w(t)),next:t=>{const n=x(t);if(h)r.done=t>=u;else{const i=e.secondsToMilliseconds(w(t));r.done=Math.abs(i)<=y.restSpeed&&Math.abs(y.target-n)<=y.restDelta}return r.value=r.done?y.target:n,r},toString:()=>{const t=Math.min(mt(b),pt),e=dt(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}const Mt=Object.assign(At,{applyToOptions:t=>{const n=ft(t,100,At);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t}});function Et({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=Mt({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function Vt(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=i||e.MotionGlobalConfig.mix||ot,r=t.length-1;for(let i=0;i<r;i++){let r=o(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),c=l.length,u=i=>{if(a&&i<t[0])return n[0];let s=0;if(c>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>u(e.clamp(t[0],t[r-1],n)):u}function Dt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(Y(i,1,o))}}function kt(t){const e=[0];return Dt(e,t.length-1),e}function Ct(t,e){return t.map(t=>t*e)}function Rt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const o=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s)||e.easeInOut,r={done:!1,value:n[0]};if(2===n.length&&!Array.isArray(o)&&(!i||2!==i.length||0===i[0]&&1===i[1])){const[i,s]=n,a=i===s?void 0:(e.MotionGlobalConfig.mix||ot)(i,s);return{calculatedDuration:t,next:n=>(r.value=a?a(o(t>0?e.clamp(0,1,n/t):1)):s,r.done=n>=t,r)}}const a=Vt(Ct(i&&i.length===n.length?i:kt(n),t),n,{ease:Array.isArray(o)?o:Rt(n,o)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}function Lt(t,n,i=0){return n<=0?i:t.velocity?t.velocity(n):function(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}(e=>t.next(e).value,n,t.next(n).value)}const jt=t=>null!==t;function Ot(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(jt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ft={decay:Et,inertia:Et,tween:Bt,keyframes:Bt,spring:Mt};function It(t){"string"==typeof t.type&&(t.type=Ft[t.type])}const Nt=(t,n)=>n-t>40&&!e.MotionGlobalConfig.useManualTiming?n:t;function Ut(t,e){return{kind:t,animation:e,timestamp:o.now(),frameTimestamp:n.timestamp,frameIsProcessing:n.isProcessing}}function Wt(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Ut("animation-start",t),options:n?{...e,...n}:e})}catch{}}class $t{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const zt=t=>t/100,Kt=t=>Math.round(1e4*t)/1e4;class Gt extends $t{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==o.now()&&this.tick(o.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Wt(this,this.options)}initAnimation(){const{options:t}=this;It(t);const{type:n=Bt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Bt;l!==Bt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(zt,ot(a[0],a[1])),a=[0,100]);const c=l(a===t.keyframes?t:{...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===c.calculatedDuration&&(c.calculatedDuration=mt(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Nt(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==Et&&(d.value=Ot(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Kt((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==Et?Ot(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,n){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=i;if(c){const n=Math.min(t,s)/a;let i=Math.floor(n),o=n%1;!o&&n>=1&&(o=1),1===o&&i--,i=Math.min(i,c+1);Boolean(i%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=e.clamp(0,1,o)*a}return n?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!n&&(d.value=o(d.value)),d}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){return this.duration+e.millisecondsToSeconds(this.options.delay??0)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Lt(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(o.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(o.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Yt=new Set(["brightness","contrast","saturate","opacity"]);function Xt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(g)||[];if(!i)return t;const s=n.replace(i,"");let o=Yt.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ht=/\b([a-z-]*)\(.*?\)/gu,qt={...$,getAnimatableNone:t=>{const e=t.match(Ht);return e?e.map(Xt).join(" "):t}},_t={...$,getAnimatableNone:t=>{const e=$.parse(t);return $.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Zt={...p,transform:Math.round},Jt={rotate:A,pathRotation:A,rotateX:A,rotateY:A,rotateZ:A,scale:f,scaleX:f,scaleY:f,scaleZ:f,skew:A,skewX:A,skewY:A,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:m,originX:k,originY:k,originZ:E},Qt={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...Jt,zIndex:Zt,fillOpacity:m,strokeOpacity:m,numOctaves:Zt},te={...Qt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:qt,WebkitFilter:qt,mask:_t,WebkitMask:_t},ee=t=>te[t],ne=new Set([qt,_t]);function ie(t,e){let n=ee(t);return ne.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function se(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const oe=t=>180*t/Math.PI,re=t=>{const e=oe(Math.atan2(t[1],t[0]));return le(e)},ae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:re,rotateZ:re,skewX:t=>oe(Math.atan(t[1])),skewY:t=>oe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},le=t=>((t%=360)<0&&(t+=360),t),ce=t=>Math.hypot(t[0],t[1]),ue=t=>Math.hypot(t[4],t[5]),he={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ce,scaleY:ue,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(ce(t)+ue(t))/2,rotateX:t=>le(oe(Math.atan2(t[6],t[5]))),rotateY:t=>le(oe(Math.atan2(-t[2],t[0]))),rotateZ:re,rotate:re,skewX:t=>oe(Math.atan(t[4])),skewY:t=>oe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function de(t){return t.includes("scale")?1:0}function pe(t,e){if(!t||"none"===t)return de(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return de(e);const i=(n[1]?he:ae)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const me=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return pe(n,e)},fe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=(()=>new Set([...fe,"pathRotation"]))(),ye=t=>t===p||t===E,ve=new Set(["x","y","z"]),xe=fe.filter(t=>!ve.has(t));const we=new Set(["bottom","right"]);function Te(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const Se=({transform:t})=>pe(t,"x"),be=({transform:t})=>pe(t,"y"),Pe={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>Te(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>Te(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:Se,y:be,translateX:Se,translateY:be},Ae=new Set;let Me=!1,Ee=!1,Ve=!1;function De(){if(Ee){const t=[],e=new Set,n=new Set;Ae.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),we.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return xe.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ee=!1,Me=!1,Ae.forEach(t=>t.complete(Ve)),Ae.clear()}function ke(){Ae.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function Ce(){Ve=!0,ke(),De(),Ve=!1}class Re{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ae.add(this),Me||(Me=!0,lt.read(ke),lt.resolveKeyframes(De))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(null===t[0]){const o=s?.get(),r=t[t.length-1];if(void 0!==o)t[0]=o;else if(i&&n){const s=function(t,n,i){if("string"==typeof t){if(e.isNumericalString(t)||e.isZeroValueString(t))return parseFloat(t);if(!$.test(t)&&$.test(i))return ie(n,i)}return t??void 0}(i.readValue(n,r),n,r);void 0!==s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===o&&s.set(t[0])}se(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ae.delete(this)}cancel(){"scheduled"===this.state&&(Ae.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Be=t=>t.startsWith("--");function Le(t,e,n){Be(e)?t.style.setProperty(e,n):t.style[e]=n}const je={};function Oe(t,n){const i=e.memo(t);return()=>je[n]??i()}const Fe=Oe(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ie=Oe(()=>void 0!==window.ViewTimeline,"viewTimeline"),Ne=Oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ue=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,We={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ue([0,.65,.55,1]),circOut:Ue([.55,0,1,.45]),backIn:Ue([.31,.01,.66,-.59]),backOut:Ue([.33,1.53,.69,.99])};function $e(t,n){return t?"function"==typeof t?Ne()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ue(t):Array.isArray(t)?t.map(t=>$e(t,n)||We.easeOut):We[t]:void 0}function ze(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=$e(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function Ke(t){return"function"==typeof t&&"applyToOptions"in t}function Ge({type:t,...e}){return Ke(t)&&Ne()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ye extends $t{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=Ge(t);this.animation=ze(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ot(i,this.options,r,this.speed);this.updateMotionValue?.(t),Le(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Wt(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){const n=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Fe()?(this.animation.timeline=t,n?.(this.animation),e.noop):i(this)}}const Xe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function He(t){"string"==typeof t.ease&&t.ease in Xe&&(t.ease=Xe[t.ease])}const qe=10;class _e extends Ye{constructor(t){He(t),It(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(o.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Gt({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:n,element:i,name:s}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?e.clamp(0,10,r):0,l=this.sample(r);i&&s&&Le(i,s,l),n.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Ze=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$.test(t)&&"0"!==t||t.startsWith("url(")));function Je(t){t.duration=0,t.type="keyframes"}const Qe=new Set(["opacity","clipPath","filter","transform"]),tn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const en=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nn=()=>!e.MotionGlobalConfig.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function sn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Qe.has(n)&&!en.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return nn()&&(Qe.has(n)||en.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&tn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const on=(t,e)=>e&&"number"==typeof t?e.transform(t):t,rn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},an=fe.length,ln={},cn=(t,e,n=on(e,Jt[t]))=>(ln[t]||(ln[t]=(rn[t]||t)+"("))+n+")",un=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function hn(t,e,n){let i="";for(let s=0;s<an;s++){const o=fe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=on(r,Qt[o]));un(o,r)||(i+=cn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=cn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const dn=new WeakMap,pn=.001,mn=(t,e)=>t-e,fn=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Y(t,e,s/n));return i},gn=t=>t.motionValue.owner,yn=t=>dn.get(t),vn=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class xn extends Gt{constructor(t){const e=gn(t).current,{driver:n=ht}=t;let i;const s=function(t){const e=gn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(vn(e,"transform")||"none")||vn(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=yn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=yn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return yn(gn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(o.now()):void 0}tween(){const{keyframes:t,type:n,ease:i,times:s,repeat:o,delay:r=0}=this.options,a=e.isBezierDefinition(i)?Ue(i):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(i)&&We[i];if(a&&!o&&!s&&2===t.length&&n===Bt&&null===this.holdTime){const t=this.startTime+r/this.speed;return[t,t+this.resolvedDuration/this.speed,a]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||Bt)===Bt?u||kt(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=o.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const i=t.current,s=new Set,r=new Map;let a={},l=[],c=new Map,u=[],h=!1,d=!1,p=!1,m=!1,f=-1/0;const g=t=>{for(const e of s)if(e.name===t)return!0},y=(e,n)=>{const i={};for(const s of void 0===e?fe:l){const o=r.get(s),l=void 0===e?vn(t,s):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):a[s];void 0!==l&&(i[s]=l)}return i},v=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&un(i,s)||(n+=cn(i,s)+" ")}return(e?n.trim():n)||"none"},x=(t,e)=>v(y(t,e)),w=(t=y())=>{i.style.transform=v(t,!0)},T=(t=!0)=>{t&&w(),u.forEach(({animation:t})=>t.cancel()),u=[]},S=(t,e)=>new Animation(new KeyframeEffect(i,t,e)),b=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=o.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,u.some(t=>t.end===1/0)&&(t.cancel(),u=u.filter(t=>t!==i)),B.schedule(!1)}),t.oncancel=()=>u.includes(i)&&B.demote(),u.push(i)},P=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},A=(t,n,i,s)=>{const o=Math.min(200,Math.max(2,Math.ceil((i-n)/qe)));if(4*s.length>o)return;const r=fn(n,i,o).concat(s).sort(mn),a=t=>e.progress(n,i,t);let l,c;for(const e of t){const t=r.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],o=i.some(t=>Math.abs(t)*pn>Math.abs(s))?0:s,a=i.map(t=>o?t/o:t);if(o)if(l){if(a.some((t,e)=>!(Math.abs(t-l[e])<=pn)))return}else l=a,c=t=>(e.numberAt(t)-n)/o;else if(a.some(t=>!(Math.abs(t)<=pn)))return}if(!l||l.every((t,e)=>Math.abs(t-a(r[e]))<=pn))return"linear";const u=[],h=(t,e=c(t))=>u.push(Kt(e)+" "+Kt(100*a(t))+"%");return l.forEach((t,e)=>{e&&Math.abs(t-l[e-1])>.2&&P(c,r[e-1],r[e]).forEach(t=>h(t)),h(r[e],t)}),"linear("+u+")"},M=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...P(t=>i.numberAt(t),e,n));s.push(n)}},a=fn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(mn))t>l&&r(l,t,0),l=t;return s.sort(mn)},E=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},V=(t,n,i,s={fill:"both"},o,r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=r||A(t,n,i,a),c=l?[n,i]:M(t,n,i,a),u=c.map(t=>x(t,o));let h={transform:u};return l||(h.offset=c.map(t=>e.progress(n,i,t))),u.every(t=>t===u[0])&&(w(y(n,o)),h=null),S(h,{...s,duration:i-n,easing:l||"linear"})},D=e=>{let n=e,i=0,o=0;const h=[],d=[],p=new Set;r.clear(),c=new Map;for(const t of s){r.set(t.name,t);const[s,a]=t.timing(),l=s===1/0;if(c.set(t,[t.at(e),t.speed,l]),l)t.sync();else{if(t.speed<0)return;if(a){if(i){const t=(s-o)/a;if(Math.abs(a-i)>1||Math.abs(t-Math.round(t))*i>1)return}else i=a,o=s;d.push(t)}else p.add(s);h.push(t),n=Math.max(n,s)}}a={},l=fe.filter(e=>{if(r.has(e))return!0;const n=a[e]=vn(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),T(!1);const m=!i&&E(h);try{if(m&&m[1]>e){const[t,n,i]=m;b(V(h,t,n,void 0,void 0,i),t-e,n-t)}else n>e&&(b(V(h,e,n),0,n-e),p.forEach(t=>t<n-1&&b(S(null,{duration:t-e}),0,t-e)));if(i){const t=o+Math.floor((n-o)/i)*i;b(V(d,t,t+i,{iterations:1/0,iterationStart:(n-t)/i,fill:"forwards"},n),n-e)}}catch{return}return u.length||T(),!0},k=t=>{let e,n=0;for(const i of s){const s=c.get(i);if(!s)return!1;const[o,r,a]=s,l=i.at(t),u=i.timing()[0]===1/0;if(a){if(u&&l===o)continue;return!1}const h=(l-o)/r,d=u?0:i.speed/r;if(void 0===e)e=h,n=d;else if(Math.abs(h-e)>1||d!==n)return!1}if(void 0===e)return!0;if(!u.length)return!1;for(const{offset:t,end:n,isDone:i}of u){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:i,offset:s,isDone:o}of u){if(o)continue;const r=e-s;n&&i.updatePlaybackRate&&"running"===i.playState&&Math.abs(Number(i.currentTime)-r)<20?i.playbackRate!==n&&i.updatePlaybackRate(n):n?(i.playbackRate=n,i.startTime=t-r/n):(i.startTime=null,i.currentTime=r)}return!0},C=()=>!s.size&&(p=!0,yn(i)===B&&dn.delete(i),B.isJS||T(),!0),R=()=>{const e=o.now();if(B.isJS||(B.isFinishing=!0,s.forEach(n=>{const[i,s]=n.timing();"running"===n.state&&n.speed>0&&!s&&i<=e+1&&(n.complete(),a[n.name]=vn(t,n.name),c.has(n)||(h=!0))}),B.isFinishing=!1),d=!1,p)return;if(s.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||s.delete(e)}),C())return;for(const t of s)if(!t.canAccelerate)return B.demote(!0);B.isJS&&(B.isJS=!1,h=!0,s.forEach(t=>t.js?.stop()));const n=h,i=m;if(h=m=!1,n||!k(e)){if(i){if(e-f<100)return B.demote();f=e}if(!D(e))return B.demote()}},B={tracks:s,isJS:!1,isFinishing:!1,schedule(t,e){p||(h||(h=t),m||(m=!!e),d||(d=!0,n.isProcessing?lt.render(R,!1,!0):queueMicrotask(R)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||s.delete(t),C()||B.schedule(!0)},check(){if(!B.isJS)for(const e in a)if(vn(t,e)!==a[e]&&!g(e))return B.schedule(!0,!0)},demote(t){B.isJS||p||(s.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),B.isJS=!0,c=new Map,T(),s.forEach(t=>"running"===t.state&&t.js?.start()))}};return dn.set(i,B),B}(gn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(o.now())}get time(){return this.isAccelerated()?e.millisecondsToSeconds(e.clamp(0,this.totalDuration,this.at(o.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class wn extends $t{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=o.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,r=t;r.autoplay??(r.autoplay=!0),r.delay??(r.delay=0),r.type??(r.type="keyframes"),r.repeat??(r.repeat=0),r.repeatDelay??(r.repeatDelay=0),r.repeatType??(r.repeatType="loop");const a=s?.KeyframeResolver||Re;this.keyframeResolver=new a(e,(t,e,n)=>this.onKeyframesResolved(t,e,r,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=o.now();const d=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Ze(s,e),a=Ze(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Ke(n))&&i)}(t,r,a,l);d||(!e.MotionGlobalConfig.instantAnimations&&c||h?.(Ot(t,i,n)),t[0]=t[t.length-1],Je(i),i.repeat=0);const{onComplete:p}=i;i.finalKeyframe=n,i.keyframes=t,i.onComplete=()=>{p?.(),this.notifyFinished()};const m=d&&!u&&sn(i),f=!m&&(({name:t,motionValue:e})=>t&&fe.includes(t)&&e?.owner?.current instanceof HTMLElement&&nn()&&Ne())(i);let g;if(s&&(m||f||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=Nt(this.createdAt,this.resolvedAt))),m){i.element=i.motionValue?.owner?.current;try{g=new _e(i)}catch{g=new Gt(i)}}else g=f?new xn(i):new Gt(i);this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ce()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class Tn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Sn(this.animations,"duration")}get iterationDuration(){return Sn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Sn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class bn extends Ye{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Wt(this,{})}}const Pn=new WeakMap;function An(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Mn={current:void 0};class En{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=o.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=o.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){var i;return"change"===t?this.onChangeSubscribe(n):((i=this.events)[t]||(i[t]=new e.SubscriptionManager)).add(n)}onChangeSubscribe(t){const{events:n}=this;return n.change||this.changeSubscriber?(n.change||(n.change=new e.SubscriptionManager,n.change.add(this.changeSubscriber),this.changeSubscriber=void 0),n.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:n.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){lt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){Mn.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=o.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Vn(t,e){return new En(t,e)}function Dn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function kn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Dn(n,t):n}const Cn={type:"spring",stiffness:500,damping:25,restSpeed:10},Rn={type:"keyframes",duration:.8},Bn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ln=(t,{keyframes:e})=>e.length>2?Rn:ge.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Cn:Bn,jn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]);function On(t){for(const e in t)if(!jn.has(e))return!0;return!1}const Fn=(t,n,i,s={},o,r)=>a=>{const l=kn(s,t)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u-=e.secondsToMilliseconds(c);const h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...l,delay:-u,onUpdate:t=>{n.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:n,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};On(l)||Object.assign(h,Ln(t,h)),h.duration&&(h.duration=e.secondsToMilliseconds(h.duration)),h.repeatDelay&&(h.repeatDelay=e.secondsToMilliseconds(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Je(h),0===h.delay&&(d=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Je(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==n.get()){const t=Ot(h.keyframes,l);if(void 0!==t)return void lt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Gt(h):new wn(h)};function In(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Nn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Un(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $n(t){const e=Wn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function zn(t,n,i=1){const[s,o]=$n(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return u(o)?zn(o,n,i+1):o}function Kn(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Gn(t,e,n){return Kn(t.getProps(),e,n,t)}const Yn=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Xn=new Set(["width","height","top","left","right","bottom",...fe]),Hn=t=>Array.isArray(t);function qn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vn(n))}function _n(t){return Hn(t)?t[t.length-1]||0:t}function Zn(t,e){const n=Gn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){qn(t,e,_n(o[e]))}}const Jn=t=>Boolean(t&&t.getVelocity);function Qn(t){return Boolean(Jn(t)&&t.add)}function ti(t,n){const i=t.getValue("willChange");if(Qn(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}const ei="data-framer-appear-id";function ni(t){return t.props[ei]}const ii="undefined"!=typeof window;function si({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function oi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Dn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&si(d,e))continue;const r={delay:n,...kn(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){lt.update(()=>i.set(s));continue}let p=!1;if(ii&&window.MotionHandoffAnimation){const n=ni(t);if(n){const t=window.MotionHandoffAnimation(n,e,lt);null!==t&&(r.startTime=t,p=!0)}}ti(t,e);const m=c??t.shouldReduceMotion;i.start(Fn(e,i,s,m&&Xn.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>lt.update(()=>{r&&Zn(t,r)});h.length?Promise.all(h).then(e):e()}return h}function ri(t,e,n={}){const i=Gn(t,e,Yn(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?oi(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(ri(t,e,{...n,delay:i+("function"==typeof r?0:r)+An(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ai(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>ri(t,e,n))):"string"==typeof e?ri(t,e,n):Promise.all(oi(t,Gn(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const li=t=>e=>e.test(t),ci=[p,E,M,A,D,V,{test:t=>"auto"===t,parse:t=>t}],ui=t=>ci.find(li(t));function hi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const di=new Set(["auto","none","0"]);class pi extends Re{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(d(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=zn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Xn.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=ui(i),r=ui(s);if(d(i)!==d(s)&&Pe[n])this.needsMeasurement=!0;else if(o!==r)if(ye(o)&&ye(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Pe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||hi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!di.has(e)&&I(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=ie(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return Pe[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const mi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],fi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...mi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);const gi=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),yi=[];function vi(t){e.removeItem(yi,t)}function xi(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Fn(r,c,l,a&&Xn.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):lt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>lt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function wi(t,e,n,i,s){return xi(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=Vn(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function Ti(t){return e.isObject(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function Si(t){return e.isObject(t)&&"ownerSVGElement"in t}const bi={};function Pi(t){return bi.current?.add(t),t}function Ai(t){const e=bi.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const Mi=t=>bi.current?bi.current.bind(t):t;function Ei(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:bi.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Vi(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=Ei(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Di{constructor(t=lt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function ki(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Di(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const Ci=new Set(["originX","originY","originZ"]),Ri=(t,e)=>on(t.get(e)?.get(),Qt[e]),Bi=(t,e,n,i)=>{let s,o;if(ge.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>fe.indexOf(t)-fe.indexOf(e)))}e.get("transform")||(Ti(t)||e.get("transformBox")||Bi(t,e,"transformBox",new En("fill-box")),e.set("transform",new En("none"),()=>{dn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(un(s,o)||(e+=(e&&" ")+cn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+cn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else Ci.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new En(""),()=>{const n=Ri(e,"originX")??"50%",i=Ri(e,"originY")??"50%",s=Ri(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Be(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=on(i.getCurrent(),Qt[n])};return e.set(n,i,s,o)},Li=(t,e)=>{if(ge.has(e))return me(t,e);const n=getComputedStyle(t),i=Be(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},ji=ki(Bi,{test:t=>Ti(t)||Si(t),read:Li}),Oi=Vi(ji);function Fi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Ii(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ge.has(t))r=!0;else if(l(t))s[t]=n;else{const e=on(n,Qt[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=hn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Ni={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ui={offset:"strokeDashoffset",array:"strokeDasharray"};function Wi(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ni:Ui;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const $i=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zi(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ii(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of $i)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Wi(h,s,o,r,!1)}const Ki=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Fi(s));const r=Qt[n]||Qt[s],a=o?()=>{t[s]=on(i.get(),Qt[n])}:()=>{const e=on(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Gi=Vi(ki(Ki));const Yi=(t,e,n,i)=>{if(n.startsWith("path")&&!ge.has(n))return function(t,e,n,i){return lt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new En("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ki(t,e,n,i,_i(n));return(ge.has(n)||Ci.has(n)||Be(n)||n in t.style?Bi:Ki)(t,e,n,i)},Xi=(t,e)=>ge.has(e)?Qt[e]?.default||0:Be(e)||$i.includes(e)?Li(t,e)||t.getAttribute(Fi(e))||0:(e=_i(e),t.getAttribute(Fi(e))??t.getAttribute(e)??void 0),Hi=ki(Yi,{test:Si,read:Xi}),qi=Vi(Hi);function _i(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Zi({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ji({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Qi(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ts(t){return void 0===t||1===t}function es({scale:t,scaleX:e,scaleY:n}){return!ts(t)||!ts(e)||!ts(n)}const ns=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function is(t){return es(t)||os(t)||ss(t)}function ss(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function os(t){return rs(t.x)||rs(t.y)}function rs(t){return t&&"0%"!==t}function as(t,e,n){return n+e*(t-n)}function ls(t,e,n,i,s){return void 0!==s&&(t=as(t,s,i)),as(t,n,i)+e}function cs(t,e=0,n=1,i,s){t.min=ls(t.min,e,n,i,s),t.max=ls(t.max,e,n,i,s)}function us(t,{x:e,y:n}){cs(t.x,e.translate,e.scale,e.originPoint),cs(t.y,n.translate,n.scale,n.originPoint)}const hs=.999999999999,ds=1.0000000000001;function ps(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++)o=n[a],r=o.projectionDelta,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ms(t.x,-o.scroll.offset.x),ms(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,us(t,r)),i&&(i.path?.[a]||i)!==o&&is(o.latestValues)&&ys(t,o.latestValues,o.layout?.layoutBox));e.x<ds&&e.x>hs&&(e.x=1),e.y<ds&&e.y>hs&&(e.y=1)}function ms(t,e){t.min+=e,t.max+=e}function fs(t,e,n,i,s=.5){cs(t,e,n,Y(t.min,t.max,s),i)}function gs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ys(t,e,n){const i=n??t;fs(t.x,gs(e.x,i.x),e.scaleX,e.scale,e.originX),fs(t.y,gs(e.y,i.y),e.scaleY,e.scale,e.originY)}function vs(t,e){return Zi(Qi(t.getBoundingClientRect(),e))}function xs(t,e,n){const i=vs(t,n),{scroll:s}=e;return s&&(ms(i.x,s.offset.x),ms(i.y,s.offset.y)),i}const ws={},Ts=t=>Si(t)?Hi:ji;class Ss{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=pi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return vs(this.current)}getProps(){return ws}}const bs=t=>Ts(t).state(t)?.release();function Ps(t,e){const n=Ts(t).state(t);if(!n)return;const i=dn.get(t);i&&(i.demote(),dn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const As=ki((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>e.isObject(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:Ms,cancel:Es}=at(queueMicrotask,!1);function Vs(t,e,n){const i=Jn(t)?t:Vn(t);return i.start(Fn("",i,e,n)),i.animation}const Ds={};function ks(t,{layout:e,layoutId:n}){return ge.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ds[t]||"opacity"===t)}const Cs={value:null,addProjectionMetrics:null};function Rs(t,e){const n=o.now();t=Mi(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(ct(i),t(o-e))};return lt.setup(i,!0),Pi(()=>ct(i))}function Bs(t){return Si(t)&&"svg"===t.tagName}function Ls(t){return Jn(t)?t.get():t}const js=t=>"number"==typeof t?t:parseFloat(t),Os=mi.length,Fs=t=>"number"==typeof t||E.test(t);function Is(t,e,n,i,s,o){s?(t.opacity=Y(0,n.opacity??1,Us(i)),t.opacityExit=Y(e.opacity??1,0,Ws(i))):o&&(t.opacity=Y(e.opacity??1,n.opacity??1,i));for(let s=0;s<Os;s++){const o=mi[s];let r=Ns(e,o),a=Ns(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Fs(r)===Fs(a)?(t[o]=Math.max(Y(js(r),js(a),i),0),(M.test(a)||M.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<ns.length;s++){const o=ns[s];(e[o]||n[o])&&(t[o]=Y(e[o]||0,n[o]||0,i))}}function Ns(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Us=$s(0,.5,e.circOut),Ws=$s(.5,.95,e.noop);function $s(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function zs(t,e){t.min=e.min,t.max=e.max}function Ks(t,e){zs(t.x,e.x),zs(t.y,e.y)}function Gs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ys(t){return t.max-t.min}function Xs(t,e,n){return Math.abs(t-e)<=n}function Hs(t,e,n,i=.5){t.origin=i,t.originPoint=Y(e.min,e.max,t.origin),t.scale=Ys(n)/Ys(e),t.translate=Y(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function qs(t,e,n,i){Hs(t.x,e.x,n.x,i?.originX),Hs(t.y,e.y,n.y,i?.originY)}function _s(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Ys(e)}function Zs(t,e,n,i){_s(t.x,e.x,n.x,i?.x),_s(t.y,e.y,n.y,i?.y)}function Js(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Ys(e)}function Qs(t,e,n,i){Js(t.x,e.x,n.x,i?.x),Js(t.y,e.y,n.y,i?.y)}function to(t,e,n,i,s){return t=as(t-=e,1/n,i),void 0!==s&&(t=as(t,1/s,i)),t}function eo(t,e=0,n=1,i=.5,s,o=t,r=t){if(M.test(e)){e=parseFloat(e);e=Y(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Y(o.min,o.max,i);t===o&&(a-=e),t.min=to(t.min,e,n,a,s),t.max=to(t.max,e,n,a,s)}function no(t,e,[n,i,s],o,r){eo(t,e[n],e[i],e[s],e.scale,o,r)}const io=["x","scaleX","originX"],so=["y","scaleY","originY"];function oo(t,e,n,i){no(t.x,e,io,n?.x,i?.x),no(t.y,e,so,n?.y,i?.y)}const ro=()=>({translate:0,scale:1,origin:0,originPoint:0}),ao=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),lo=()=>({min:0,max:0}),co=()=>({x:{min:0,max:0},y:{min:0,max:0}});function uo(t){return 0===t.translate&&1===t.scale}function ho(t){return uo(t.x)&&uo(t.y)}function po(t,e){return t.min===e.min&&t.max===e.max}function mo(t,e){return po(t.x,e.x)&&po(t.y,e.y)}function fo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function go(t,e){return fo(t.x,e.x)&&fo(t.y,e.y)}function yo(t){return Ys(t.x)/Ys(t.y)}function vo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class xo{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(e.removeItem(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function wo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const To={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!E.test(t))return t;t=parseFloat(t)}return`${wo(t,e.target.x)}% ${wo(t,e.target.y)}%`}},So={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$.parse(t);if(s.length>5)return i;const o=$.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Y(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},bo={borderRadius:Object.assign({},To,{applyTo:mi.slice()}),borderTopLeftRadius:To,borderTopRightRadius:To,borderBottomLeftRadius:To,borderBottomRightRadius:To,boxShadow:So};function Po(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<ns.length;t++){const e=ns[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function Ao(t){return[t("x"),t("y")]}const Mo=(t,e)=>t.depth-e.depth;class Eo{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mo),this.isDirty=!1,this.children.forEach(t)}}const Vo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Do={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ko=["z","skew","skewZ"];let Co=0;function Ro(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const Bo=({instance:t})=>t&&dn.get(t)?.demote();function Lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ni(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Lo(i)}function jo({attachResizeListener:t,defaultParent:i,measureScroll:s,checkIsScrollRoot:r,resetTransform:a}){return Object.assign(Ds,{...bo,...Ds}),class{constructor(t={},e=i?.()){this.id=Co++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cs.value&&(Do.nodes=Do.calculatedTargetDeltas=Do.calculatedProjections=0),this.nodes.forEach(Io),this.nodes.forEach(Ho),this.nodes.forEach(qo),this.nodes.forEach(No),Cs.addProjectionMetrics&&Cs.addProjectionMetrics(Do)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Eo)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Si(e)&&!Bs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;lt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Rs(s,250),Vo.hasAnimatedSinceResize&&(Vo.hasAnimatedSinceResize=!1,this.nodes.forEach(Xo)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||tr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!go(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...kn(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Xo(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,ct(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(_o),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Bo(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,Bo(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach($o),void this.nodes.forEach(Wo)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(zo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ko),this.nodes.forEach(Go),this.nodes.forEach(Yo),this.nodes.forEach(Oo),this.nodes.forEach(Fo)):this.nodes.forEach(zo),this.clearAllSnapshots();const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ms.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uo),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ys(this.snapshot.measuredBox.x)||Ys(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:n}=this,{animationId:i}=this.root;if(this.options.layoutScroll&&n&&(!e||e.animationId!==i||e.phase!==t)){const o=r(n);this.scroll={animationId:i,phase:t,isRoot:o,offset:s(n),wasRoot:e?e.isRoot:o}}}resetTransform(){if(!a)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&Bo(this);const e=this.projectionDelta&&!ho(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||is(this.latestValues)||s)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),ir((i=n).x),ir(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rr))){const{scroll:t}=this.root;t&&(ms(e.x,t.offset.x),ms(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ks(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ks(e,t),ms(e.x,s.offset.x),ms(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Ks(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ms(o.x,-n.scroll.offset.x),ms(o.y,-n.scroll.offset.y)),is(n.latestValues)&&ys(o,n.latestValues,n.layout?.layoutBox)}return!i&&is(this.latestValues)&&ys(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ks(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!is(n.latestValues))continue;let i;n.instance&&(es(n.latestValues)&&n.updateSnapshot(),i=co(),Ks(i,n.measurePageBox())),oo(e,n.latestValues,n.snapshot?.layoutBox,i)}return is(this.latestValues)&&oo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=n.timestamp;const r=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zs(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Ks(this.target,this.layout.layoutBox),us(this.target,this.targetDelta)):Ks(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&(!r.resumingFrom==!this.resumingFrom||r.options.layoutRoot&&!r.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),Cs.value&&Do.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!es(this.parent.latestValues)&&!os(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Qs(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Ks(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===n.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Ks(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;ps(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Gs(this.prevProjectionDelta.x,this.projectionDelta.x),Gs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),qs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&vo(this.projectionDelta.x,this.prevProjectionDelta.x)&&vo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Cs.value&&Do.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Qo));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;Zo(r.x,t.x,n),Zo(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qs(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,Jo(c.x,m.x,f.x,g),Jo(c.y,m.y,f.y,g),d&&mo(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ks(d,this.relativeTarget)),l&&(this.animationValues=o,Is(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Vo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vs(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Ut("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&or(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},sr(s.x,e.x,t.x),sr(s.y,e.y,t.y)}Ks(e,s),ys(e,i),qs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new xo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!ss(e))return;const n={};for(let e=0;e<ko.length;e++)Ro(ko[e],t,n,this.animationValues);for(let e=0;e<ns.length;e++)Ro(ns[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ls(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ls(e?.pointerEvents)||""),void(this.hasProjected&&!is(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Po(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ds){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=Ds[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Ls(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Wo),this.root.sharedNodes.clear()}}}function Oo(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Ao(t=>ms(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Fo(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)Ao(t=>{const e=Ys(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";zs(i[t],o[t])}else or(s,e.layoutBox,n)&&Ao(e=>{const n=Ys(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};qs(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};qs(c,o?t.applyTransform(i,!0):n,a);const u=!ho(l);let h=!1;const d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};Qs(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};Qs(c,n,s.layoutBox,a),o&&r(l,c),go(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Io(t){Cs.value&&Do.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function No(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Uo(t){t.clearSnapshot()}function Wo(t){t.clearMeasurements()}function $o(t){t.isLayoutDirty=!0,t.updateLayout()}function zo(t){t.isLayoutDirty=!1}function Ko(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Go(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function Yo(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ho(t){t.resolveTargetDelta()}function qo(t){t.calcProjection()}function _o(t){t.resetSkewAndRotation()}function Zo(t,e,n){t.translate=Y(e.translate,0,n),t.scale=Y(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Jo(t,e,n,i){t.min=Y(e.min,n.min,i),t.max=Y(e.max,n.max,i)}function Qo(t){return void 0!==t.animationValues?.opacityExit}const tr={duration:.45,ease:[.4,0,.1,1]},er=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),nr=er("applewebkit/")&&!er("chrome/")?Math.round:e.noop;function ir(t){t.min=nr(t.min),t.max=nr(t.max)}function sr(t,e,n){t.max=Ys(n)+(t.min=e.min)}function or(t,e,n){return"position"===t||"preserve-aspect"===t&&!Xs(yo(e),yo(n),.2)}function rr(t){return t!==t.root&&t.scroll?.wasRoot}function ar(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const lr=jo({attachResizeListener:(t,e)=>ar(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cr={current:void 0},ur=jo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cr.current){const t=new lr({});t.mount(window),t.setOptions({layoutScroll:!0}),cr.current=t}return cr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),hr=new WeakMap;function dr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function pr(t){return"string"==typeof t||Array.isArray(t)}const mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fr=["initial"].concat(mr);function gr(t){if(dr(t.animate))return!0;for(let e=0;e<fr.length;e++)if(pr(t[fr[e]]))return!0;return!1}function yr(t){return Boolean(gr(t)||t.variants)}function vr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Jn(s))t.addValue(i,s);else if(Jn(o))t.addValue(i,Vn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Vn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const xr={current:null},wr={current:!1},Tr="undefined"!=typeof window;function Sr(){if(wr.current=!0,Tr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xr.current=t.matches;t.addEventListener("change",e),e()}else xr.current=!1}const br=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Pr={};class Ar{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Re,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=o.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,lt.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=e.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=gr(e),this.isVariantNode=yr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==c[t]&&Jn(e)&&e.set(c[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,hr.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(wr.current||Sr(),this.shouldReduceMotion=xr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.get(t)?.(),n.accelerate&&Qe.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:s,times:o,ease:r,duration:a}=n.accelerate,l=new Ye({element:this.current,name:t,keyframes:s,times:o,ease:r,duration:e.secondsToMilliseconds(a)}),c=i(l);return void this.valueSubscriptions.set(t,()=>{c(),l.cancel()})}const i=ge.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&<.preRender(this.notifyUpdate),i&&(this.projection&&(this.projection.isTransformDirty=!0),dn.get(this.current)?.check()),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Pr){const e=Pr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&dn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<br.length;e++){const n=br[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=vr(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=Vn(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):"number"!=typeof i&&!$.test(i)&&$.test(n)&&(i=ie(t,n)),this.setBaseTarget(t,Jn(i)?i.get():i)),Jn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,n){return(this.events[t]||(this.events[t]=new e.SubscriptionManager)).add(n)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){Ms.render(this.render)}}class Mr extends Ar{constructor(){super(...arguments),this.KeyframeResolver=pi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Er(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function Vr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Jn(i[e])||s&&Jn(s[e])||ks(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Dr extends Mr{constructor(){super(...arguments),this.type="html",this.renderInstance=Er}mount(t){super.mount(t)}readValueFromInstance(t,e){if(ge.has(e))return this.projection?.isProjecting?de(e):me(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(l(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return vs(t,e)}build(t,e,n){Ii(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Vr(t,e,n)}}const kr="[data-layout],[data-layout-id]",Cr=new WeakMap;let Rr;function Br(t){const e=[];return t instanceof HTMLElement&&t.matches(kr)&&e.push(t),t.querySelectorAll(kr).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Lr(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function jr(t,e){let n=Cr.get(t);if(n)n.setOptions(Lr(t,e));else{let i=hr.get(t);i||(i=new Dr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Ps(t,i)),t.style.transform&&!is(i.latestValues)&&(t.style.transform=""),n=new ur(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Cr.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Lr(t,e),visualElement:i}),n.mount(t),Cr.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Or(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Cr.delete(t)}function Fr(){const t=Rr;Rr=void 0,function(){if(n.isProcessing)return;const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}();const i=new Map;for(const e of t)for(const t of e.collectTargets()){const n=i.get(t);n?n.push(e):i.set(t,[e])}const s=new Map;for(const t of(r=i.keys(),[...r].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const e=i.get(t),n=jr(t,e[e.length-1].transitionFor(t));for(const i of e)i.adopt(t,n);s.set(t,n)}var r;s.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const a=[];for(const e of t){const t=e.runUpdate();t&&a.push(t)}const l=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let n;s.forEach(t=>n||(n=t.root));for(const e of t)n||(n=e.getRoot());n?.didUpdate(),Ms.render(()=>{for(const e of t)e.finalize()})};a.length?Promise.all(a).then(l):l()}class Ir{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Rr||(Rr=[],queueMicrotask(Fr)),Rr.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Br(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Br(this.scope)){if(this.tracked.has(e))continue;const n=jr(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Or(n,e)}}),e.relegate())return;n.remove()}Or(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Tn([...t]))}}function Nr(t,e,n){if("function"==typeof t)return{scope:bi.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:Ei(t)[0]??document,updateDom:e,defaultOptions:n}}const Ur=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Wr(t){return{point:{x:t.pageX,y:t.pageY}}}const $r=t=>e=>Ur(e)&&t(e,Wr(e));function zr(t,e,n,i){return ar(t,e,$r(n),i)}const Kr=new WeakMap;let Gr;const Yr=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Si(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Xr=Yr("inline","width","offsetWidth"),Hr=Yr("block","height","offsetHeight");function qr({target:t,borderBoxSize:e}){Kr.get(t)?.forEach(n=>{n(t,{get width(){return Xr(t,e)},get height(){return Hr(t,e)}})})}function _r(t){t.forEach(qr)}function Zr(t,e){Gr||"undefined"!=typeof ResizeObserver&&(Gr=new ResizeObserver(_r));const n=Ei(t);return n.forEach(t=>{let n=Kr.get(t);n||(n=new Set,Kr.set(t,n)),n.add(e),Gr?.observe(t)}),()=>{n.forEach(t=>{const n=Kr.get(t);n?.delete(e),n?.size||Gr?.unobserve(t)})}}const Jr=new Set;let Qr;function ta(t){return Jr.add(t),Qr||(Qr=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Jr.forEach(e=>e(t))},window.addEventListener("resize",Qr)),()=>{Jr.delete(t),Jr.size||"function"!=typeof Qr||(window.removeEventListener("resize",Qr),Qr=void 0)}}function ea(t,e){return Pi("function"==typeof t?ta(t):Zr(t,e))}const na=(t,e)=>Math.abs(t-e);function ia(t,e){const n=na(t.x,e.x),i=na(t.y,e.y);return Math.sqrt(n**2+i**2)}const sa=new Set(["auto","scroll"]);class oa{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=aa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=ca(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ia(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:o.now()});const{onStart:s,onMove:r}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=aa(e,this.transformPagePoint),this.hasPendingMove=!0,lt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ca("pointercancel"===t.type?this.lastMoveEventInfo:aa(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Ur(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const c=aa(Wr(t),this.transformPagePoint),{point:u}=c;this.history=[{...u,timestamp:o.now()}];const{onSessionStart:h}=n;h&&h(t,ca(c,this.history));const d={passive:!0,capture:!0};this.removeListeners=e.pipe(zr(this.contextWindow,"pointermove",this.handlePointerMove,d),zr(this.contextWindow,"pointerup",this.handlePointerUp,d),zr(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const t=getComputedStyle(n);(sa.has(t.overflowX)||sa.has(t.overflowY))&&this.scrollPositions.set(n,ra(n)),n=n.parentElement}this.scrollPositions.set(window,ra(window)),this.removeScrollListeners=e.pipe(ar(window,"scroll",this.onElementScroll,{capture:!0}),ar(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=ra(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),lt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),ct(this.updatePoint)}}const ra=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function aa(t,e){return e?{point:e(t.point)}:t}function la(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ca({point:t},e){return{point:t,delta:la(t,ha(e)),offset:la(t,ua(e)),velocity:da(e,.1)}}function ua(t){return t[0]}function ha(t){return t[t.length-1]}function da(t,n){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=ha(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>e.secondsToMilliseconds(n)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>2*e.secondsToMilliseconds(n)&&(s=t[1]);const r=e.millisecondsToSeconds(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const pa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ma(t){return pa.has(t.tagName)||!0===t.isContentEditable}const fa=new Set(["INPUT","SELECT","TEXTAREA"]);function ga(t){return fa.has(t.tagName)||!0===t.isContentEditable}const ya={x:!1,y:!1};function va(){return ya.x||ya.y}function xa(t){return"x"===t||"y"===t?ya[t]?null:(ya[t]=!0,()=>{ya[t]=!1}):ya.x||ya.y?null:(ya.x=ya.y=!0,()=>{ya.x=ya.y=!1})}function wa(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ta(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Sa=.35;function ba(t,e,n){return{min:Pa(t,e),max:Pa(t,n)}}function Pa(t,e){return"number"==typeof t?t:t[e]||0}function Aa(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const Ma=new WeakMap;class Ea{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new oa(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=xa(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),Ao(t=>{let e=this.getAxisMotionValue(t).get()||0;if(u(e)&&(e=zn(e,this.visualElement.current)||0),E.test(e))e=parseFloat(e);else if(M.test(e)){const n=o?.layout?.layoutBox[t];n&&(e=Ys(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),s&<.update(()=>s(t,e),!1,!0),ti(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.visualElement.render(),o&<.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&<.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Ca(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Y(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Y(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Va(t)?this.constraints&&this.scroll===Aa(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:wa(t.x,n,s),y:wa(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Sa){return!1===t?t=0:!0===t&&(t=Sa),{x:ba(t,"left","right"),y:ba(t,"top","bottom")}}(e),s!==this.constraints&&!Va(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Ao(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Va(t))return!1;const n=Da(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Aa(i);const s=xs(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ta(t.x,e.x),y:Ta(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Ji(o));this.hasMutatedConstraints=!!t,t&&(o=Zi(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ao(a=>{if(!Ca(a,e||n,this.currentDirection))return;let c=l[a]||{};!0!==r&&r!==a||(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d={type:"inertia",velocity:i?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,d)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return ti(this.visualElement,t),n.start(Fn(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ao(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();Ao(t=>{if(!Ca(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Y(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Va(n)||!i||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};Ao(t=>{const n=this.getAxisMotionValue(t).get();o[t]=function(t,n){let i=.5;const s=Ys(t),o=Ys(n);return o>s?i=e.progress(n.min,n.max-s,t.min):s>o&&(i=e.progress(t.min,t.max-o,n.min)),e.clamp(0,1,i)}({min:n,max:n},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ao(e=>{const n=this.getAxisMotionValue(e);if(!Ca(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Y(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ma.set(this.visualElement,this);const t=this.visualElement.current,e=zr(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&ga(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Va(e)&&Da(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=ea(t,ka(n)),s=ea(e,ka(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),lt.read(i);const r=ar(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ao(e=>{if(!Ca(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=Sa,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Va(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Da=t=>"current"in t?t.current:t;function ka(t){let e=!0;return()=>{e?e=!1:t()}}function Ca(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ra=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Ba(t,e){const n=Ei(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},Pi(()=>i.abort())]}const La=(t,e)=>!!e&&(t===e||La(t,e.parentElement)),ja=new WeakSet;function Oa(t){return e=>{"Enter"===e.key&&t(e)}}function Fa(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ia(t){return Ur(t)&&!va()}const Na=new WeakSet;const Ua={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Wa(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Ua[t]||t;return e?`(not (${i}))`:i}).join(" and ")}function $a(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Vt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const za=new Set,Ka=({timestamp:t})=>{za.forEach(e=>e.tick(t))};class Ga extends $t{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(za.size||lt.update(Ka,!0),za.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Nt(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Lt(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():o.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(za.delete(this),za.size||ct(Ka))}}function Ya(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=js(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=js(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ga({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Jn(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Xa(e,r),!1)):t.set(Xa(e,r))},o=e.on("change",s),a=e.get();js(a)-js(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Xa(t,e){return e?t+e:t}function Ha(t,e,n={}){const i={type:"spring",...n};return It(i),i.type=i.type||Bt,Ya(t,e,i)}function qa(t){const e=[];Mn.current=e;const n=t();Mn.current=void 0;const i=Vn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>lt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),ct(i)})}(e,i,t),i}function _a(t,e,n){return Ya(t,e,{...n,type:Mt})}const Za=[...ci,R,$];let Ja=0;const Qa=()=>"motion-view-"+Ja++;function tl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function el(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function nl(t,e,n,i,s,o=[],r,a=[],l){const c=Ei(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Qa();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),tl(t,s,o),el(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Qa(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),tl(t,s,o),el(t,d,r,a,l),d})}function il(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let sl={},ol=null;const rl=(t,e)=>{sl[t]=e},al=()=>{ol||(ol=document.createElement("style"),ol.id="motion-view");let t="";for(const e in sl){const n=sl[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ol.textContent=t,document.head.appendChild(ol),sl={}},ll=()=>{ol&&ol.parentElement&&ol.parentElement.removeChild(ol)};function cl(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function ul(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const hl=["layout","enter","exit","new","old"],dl=t=>t.split(" ").every(t=>0===parseFloat(t)),pl={group:["layout"],new:["new","enter"],old:["old","exit"]},ml={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function fl(t){const{update:n,targets:i,resolveDefs:s,cropOverride:o,pairs:r,classNames:a,flatGroups:l,options:c}=t;if(!document.startViewTransition)return(async()=>(await n(),new Tn([])))();const u=new Map,h=[],d=[],p=[],m=new Set,f=new Map,g=new Set,y=new Map,v=new Map,x=new Map,w=new Map,T=t=>{i.forEach((e,n)=>{const i=a.get(n),c="root"!==n&&s.has(n)?l.has(n)?"none":"contain":void 0;let g;if("root"!==n&&s.has(n))if(r.has(n))if("old"===t)w.set(n,Ei(n)),g=nl(n,u,h,void 0,i,d,c,p,m),x.set(n,g);else{for(const t of w.get(n)??[])t.style?.removeProperty("view-transition-name"),u.delete(t);g=nl(r.get(n),u,h,x.get(n),i,d,c,p,m)}else g=nl(n,u,h,void 0,i,d,c,p,m);else g=[n];const T=o.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==T&&y.set(n,T);const o=v.get(n)??{};o[t]=[i,g.length],v.set(n,o)})})},S=(t,e)=>{const n=v.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},b=(t,e,n,i,s)=>{const o=gl(kn(c,n),kn(function(t,e){for(const n of pl[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[n,i]=S(t,"group"),s=b(f.get(t),"group","layout",-1===n?0:n,i);s.duration&&(s.duration=e.secondsToMilliseconds(s.duration));const{delay:o=0,duration:r,ease:a}=Ge(s);return{delay:e.secondsToMilliseconds(o),duration:r,ease:a}},A=new Map,M=t=>u.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of mi)o[t]=n[t];const r=A.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},A.set(e,r)}}),E=t=>{const e=A.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||rl(":root",{"view-transition-name":"none"}),rl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{rl(`::view-transition-group(${t})`,{overflow:"clip"}),rl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{rl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),al()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(h,d,p),ll()},k=async()=>{await n(),T("new"),M("new"),(()=>{g.clear();for(const t of v.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),V()};let C;try{T("old"),M("old"),V(),C=document.startViewTransition(k)}catch(t){return D(),Promise.reject(t)}return C.finished.finally(D),new Promise((t,n)=>{C.ready.then(()=>{const n=ul(),i=[],s=new Set,o=new Set;f.forEach((t,n)=>{const r=v.get(n),a=!!r?.new&&!r?.old,l=!!r?.old&&!r?.new;for(const r of hl){if(!t[r])continue;if("enter"===r&&!a)continue;if("exit"===r&&!l)continue;const u=il(r),[h,d]=S(n,u);if(-1===h)continue;const{keyframes:p,options:m}=t[r];for(let[f,g]of Object.entries(p)){if(null==g)continue;if("x"===f||"y"===f){e.warnOnce(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===r&&a&&null!=t.enter?.keyframes[f])continue;if("old"===r&&l&&null!=t.exit?.keyframes[f])continue;const p=gl(kn(c,f),kn(m,f));if(!Array.isArray(g)){const e="enter"===r?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===u?a:l),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?ml[u]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof p.delay&&(p.delay=p.delay(h,d)),p.duration&&(p.duration=e.secondsToMilliseconds(p.duration)),p.delay&&(p.delay=e.secondsToMilliseconds(p.delay)),i.push(new Ye({...p,element:document.documentElement,name:f,pseudoElement:`::view-transition-${u}(${n})`,keyframes:g})),s.add(`${n}:${u}`),"opacity"===f&&o.add(`${n}:${u}`)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=cl(r);if(!a)continue;const l=f.get(a.layer);if(s.has(`${a.layer}:${a.type}`)){o.has(`${a.layer}:new`)&&o.has(`${a.layer}:old`)&&n.getKeyframes().some(t=>t.mixBlendMode)?i.push(new bn(t)):t.cancel();continue}const c="old"===a.type?"new":"new"===a.type?"old":void 0;if(c&&s.has(`${a.layer}:${c}`)&&!o.has(`${a.layer}:${c}`)){t.cancel();continue}const u=v.get(a.layer),h=!("old"!==a.type&&"new"!==a.type||!u?.old||!u?.new);let d;if(a.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(a.layer);d={delay:t,duration:e,easing:$e(n,e)}}else{const t=h?"group":a.type,[n,i]=S(a.layer,t);let s=b(l,t,"group"===t?"layout":"",-1===n?0:n,i);const o=s.visualDuration;s.duration&&(s.duration=e.secondsToMilliseconds(s.duration)),s=Ge(s),d={delay:e.secondsToMilliseconds(s.delay??0),duration:h&&void 0!==o?e.secondsToMilliseconds(o):s.duration,easing:h?"linear":$e(s.ease,s.duration)}}n.updateTiming(d),i.push(new bn(t))}A.forEach((t,e)=>{if(!g.has(e))return;const{delay:n,duration:s,ease:o}=P(e);for(const r of mi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";dl(a)&&dl(l)||i.push(new Ye({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:n,duration:s,ease:o}))}}),t(new Tn(i))}).catch(()=>C.updateCallbackDone.then(()=>t(new Tn([])),n))})}function gl(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let yl=[],vl=null;function xl(){vl=null;const[t]=yl;var n;t&&(n=t,e.removeItem(yl,n),vl=n,fl(n).then(t=>(n.notifyReady(t),t.finished)).catch(t=>n.notifyReject(t)).finally(xl))}function wl(){for(let t=yl.length-1;t>=0;t--){const e=yl[t],{interrupt:n}=e.options;if("immediate"===n){const n=yl.slice(0,t+1).map(t=>t.update),i=yl.slice(t+1);e.update=()=>{n.forEach(t=>t())},yl=[e,...i];break}}vl&&"immediate"!==yl[0]?.options.interrupt||xl()}class Tl{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=e.noop,this.notifyReject=e.noop,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...n},this.readyPromise.catch(e.noop),i=this,yl.push(i),Ms.render(wl)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Sl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),bl=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Pl(t,e,n,i){Er(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Sl.has(n)?n:Fi(n),e.attrs[n])}function Al(t,e,n){const i=Vr(t,e,n);for(const n in t)if("children"!==n&&(Jn(t[n])||Jn(e[n]))){i[-1!==fe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Ml(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const El=[...mr].reverse(),Vl=t=>!0===t?.out?t:t?.out;function Dl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ml(e,t)}function kl(){const t={};for(const e of mr)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const Cl=fr.length;const Rl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Bl=lt,Ll=rt.reduce((t,e)=>(t[e]=t=>ct(t),t),{});t.AsyncMotionValueAnimation=wn,t.DOMKeyframesResolver=pi,t.DOMVisualElement=Mr,t.DocumentProjectionNode=lr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Eo,t.GroupAnimation=Tn,t.GroupAnimationWithThen=class extends Tn{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=ur,t.HTMLVisualElement=Dr,t.JSAnimation=Gt,t.KeyframeResolver=Re,t.LayoutAnimationBuilder=Ir,t.MotionValue=En,t.MotionValueState=Di,t.NativeAnimation=Ye,t.NativeAnimationExtended=_e,t.NativeAnimationWrapper=bn,t.NodeStack=xo,t.ObjectVisualElement=class extends Ar{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=oa,t.SVGVisualElement=class extends Mr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=co}getBaseTargetFromProps(t,e){return ge.has(e)?super.getBaseTargetFromProps(t,e)??de(e):t[e]}getDefaultValue(t){return ge.has(t)?this.latestValues[t]??de(t):void 0}readValueFromInstance(t,e){if(ge.has(e)){const t=ee(e);return t&&t.default||0}if($i.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Sl.has(e)?e:Fi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Al(t,e,n)}build(t,e,n){zi(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Pl(t,e,0,i)}mount(t){this.isSVGTag=bl(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=Tl,t.VisualElement=Ar,t.VisualElementDragControls=Ea,t.acceleratedValues=Qe,t.activeScope=bi,t.addAttrValue=Ki,t.addBuilderToScope=Ai,t.addDomEvent=ar,t.addEffect=function(t){vi(t),yi.unshift(t)},t.addPointerEvent=zr,t.addPointerInfo=$r,t.addSVGValue=Yi,t.addScaleCorrector=function(t){for(const e in t)Ds[e]=t[e],l(e)&&(Ds[e].isCSSVariable=!0)},t.addStyleValue=Bi,t.addToScope=Pi,t.addValueToWillChange=ti,t.alpha=m,t.analyseComplexValue=N,t.animateEffectSubject=wi,t.animateElement=function(t,e,n,i){if(bi.current?.track(t),i)return xi(t=>i.getValue(t,null),e,n,i);const s=Ts(t);return wi(s,t,e,n,new Ss(s,t))},t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Nr(t,e,n),r=new Ir(i,s,{...bi.current?.transition,...o});return Ai(r),r},t.animateMotionValue=Fn,t.animateSingleValue=Vs,t.animateTarget=oi,t.animateValue=function(t){return new Gt(t)},t.animateValues=xi,t.animateVariant=ri,t.animateView=function(t,e={}){const n=new Tl(t,e);return Ai(n),n},t.animateVisualElement=ai,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=cs,t.applyBoxDelta=us,t.applyGeneratorOptions=Ge,t.applyPointDelta=ls,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&fi.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=ps,t.arc=function(t={}){const n=function({strength:t=.5,peak:n=.5,direction:i,rotate:s=!1}={}){const o=!0===s?1:"number"==typeof s?s:0;let r;return(s,a)=>{const l=a.x-s.x,c=a.y-s.y;let u;u="cw"===i?-t:"ccw"===i?t:(Math.abs(l)>=Math.abs(c)?l:c)<0?-t:t;let h=Un(s.x,s.y,a.x,a.y,u,n);if(void 0===i){const t=Math.abs(l)<Math.abs(c),e=s.x+l*n,i=s.y+c*n,o=t?Math.sign(h.x-e):Math.sign(h.y-i);void 0!==r&&0!==o&&o!==r?(u=-u,h=Un(s.x,s.y,a.x,a.y,u,n)):0!==o&&(r=o)}const d=o?Nn(0,s.x,h.x,a.x,s.y,h.y,a.y):0,p=o?Nn(1,s.x,h.x,a.x,s.y,h.y,a.y):0,m=o?e.wrap(-180,180,p-d):0;return t=>{const n={x:In(t,s.x,h.x,a.x),y:In(t,s.y,h.y,a.y)};if(o){const i=Nn(t,s.x,h.x,a.x,s.y,h.y,a.y),r=d+m*t;n.rotate=e.wrap(-180,180,i-r)*o}return n}}}(t),i={interpolateProjection(t){const e=t.x.translate,i=t.y.translate;if(!(Math.sqrt(e*e+i*i)<20))return n({x:e,y:i},{x:0,y:0})},animateValues(t,e,i,s,o){if(!("x"in e)&&!("y"in e))return;const r=t("x"),a=t("y"),l=e.x,c=e.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=n({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...kn(i||{},"x")};delete g.path;const y=Vn(0);y.start(Fn("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete e.x,delete e.y}};return i},t.aspectRatio=yo,t.attachFollow=Ha,t.attachSpring=_a,t.attrEffect=Gi,t.axisDeltaEquals=vo,t.axisEquals=po,t.axisEqualsRounded=fo,t.bindToScope=Mi,t.boxEquals=mo,t.boxEqualsRounded=go,t.buildHTMLStyles=Ii,t.buildProjectionTransform=Po,t.buildSVGAttrs=zi,t.buildSVGPath=Wi,t.buildTransform=hn,t.buildTransformer=U,t.calcAxisDelta=Hs,t.calcBoxDelta=qs,t.calcChildStagger=An,t.calcGeneratorDuration=mt,t.calcLength=Ys,t.calcRelativeAxis=_s,t.calcRelativeAxisPosition=Js,t.calcRelativeBox=Zs,t.calcRelativePosition=Qs,t.camelCaseAttributes=Sl,t.camelToDash=Fi,t.cancelFrame=ct,t.cancelMicrotask=Es,t.cancelSync=Ll,t.checkVariantsDidChange=Dl,t.cleanDirtyNodes=No,t.collectMotionValues=Mn,t.color=R,t.compareByDepth=Mo,t.complex=$,t.containsCSSVariable=d,t.convertBoundingBoxToBox=Zi,t.convertBoxToBoundingBox=Ji,t.convertOffsetToTimes=Ct,t.copyAxisDeltaInto=Gs,t.copyAxisInto=zs,t.copyBoxInto=Ks,t.correctBorderRadius=To,t.correctBoxShadow=So,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ai(t,e,n))),n=kl(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&Gn(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&Vl(d(c??(g&&g.props.initial))?.transition);if(El.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:pr(d)||!1===d?d:void 0,x=pr(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||dr(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const S=Dl(s.prevProp,v);let b=S||x&&(w&&!T||i>f),P=!1;const A=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of A){const{transition:i,transitionEnd:s,...o}=Gn(t,n,Yn(t,e))||{};E={...E,...o,...s},M=Vl(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!Ml(n,i)||S:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){b=!0,r=p.get(e)||y,p.delete(e)&&(P=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),b&&(!T||!S||P))for(const n of A){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=Gn(a,n)?.transition?.delayChildren;i.delay=An(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||Jn(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=kl(),s=!0}}},t.createAxis=lo,t.createAxisDelta=ro,t.createBox=co,t.createDelta=ao,t.createEffect=ki,t.createGeneratorEasing=ft,t.createProjectionNode=jo,t.createRenderBatcher=at,t.cubicBezierAsString=Ue,t.defaultEasing=Rt,t.defaultOffset=kt,t.defaultTransformValue=de,t.defaultValueTypes=te,t.degrees=A,t.delay=Rs,t.delayInSeconds=function(t,n){return Rs(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=ci,t.distance=na,t.distance2D=ia,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=bi.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=Ei(t).map(t=>{i?.track(t);const[s,o]=function(t){const e=Cr.get(t)||hr.get(t)?.projection;if(e?.instance)return[e,()=>{}];const n=jr(t);return[n,()=>Cr.get(t)===n&&Or(t,n)]}(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Ea(s.options.visualElement,()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=Ra.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return Ra.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{Ra.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return Pi(()=>s.forEach(t=>t()))},t.eachAxis=Ao,t.elementDragControls=Ma,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Va(t)&&!!e},t.extractEventInfo=Wr,t.fillOffset=Dt,t.fillWildcards=se,t.findDimensionValueType=ui,t.findEffect=function(t){return yi.find(e=>e.test(t))},t.findValueType=t=>Za.find(li(t)),t.flushKeyframeResolvers=Ce,t.followValue=function(t,e){const n=Vn(Jn(t)?t.get():t);return Ha(n,t,e),n},t.frame=lt,t.frameData=n,t.frameSteps=ut,t.generateLinearEasing=dt,t.getAnimatableNone=ie,t.getAnimationMap=function(t){let e=Pn.get(t);return e||(e=new Map,Pn.set(t,e)),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Be(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=Ln,t.getDefaultValueType=ee,t.getFeatureDefinitions=function(){return Pr},t.getFinalKeyframe=Ot,t.getMixer=tt,t.getOptimisedAppearId=ni,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=on,t.getValueTransition=kn,t.getVariableValue=zn,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<Cl;t++){const i=fr[t],s=e.props[i];(pr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=cl,t.getViewAnimations=ul,t.globalProjectionState=Vo,t.handOffElementState=Ps,t.has2DTranslate=os,t.hasComplexValues=I,t.hasReducedMotionListener=wr,t.hasScale=es,t.hasTransform=is,t.hex=b,t.hover=function(t,e,n={}){e=Mi(e);const[i,s,o]=Ba(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||va())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=C,t.hslaToRgba=K,t.inertia=Et,t.initPrefersReducedMotion=Sr,t.interpolate=Vt,t.invisibleValues=Z,t.isAnimationControls=dr,t.isCSSVariableName=l,t.isCSSVariableToken=u,t.isControllingVariants=gr,t.isDeltaZero=ho,t.isDragActive=va,t.isDragging=ya,t.isElementKeyboardAccessible=ma,t.isElementTextInput=ga,t.isForcedMotionValue=ks,t.isGenerator=Ke,t.isHTMLElement=Ti,t.isKeyframesTarget=Hn,t.isMotionValue=Jn,t.isNear=Xs,t.isNodeOrChild=La,t.isPrimaryPointer=Ur,t.isSVGElement=Si,t.isSVGSVGElement=Bs,t.isSVGTag=bl,t.isTransitionDefined=On,t.isVariantLabel=pr,t.isVariantNode=yr,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ne()||!n||"string"==typeof n&&(n in We||Ne())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=Qn,t.keyframes=Bt,t.makeAnimationInstant=Je,t.mapEasingToNativeEasing=$e,t.mapValue=function(t,e,n,i){const s=$a(e,n,i);return qa(()=>s(t.get()))},t.maxGeneratorDuration=pt,t.measurePageBox=xs,t.measureViewportBox=vs,t.microtask=Ms,t.mix=ot,t.mixArray=et,t.mixColor=_,t.mixComplex=it,t.mixImmediate=G,t.mixLinearColor=X,t.mixNumber=Y,t.mixObject=nt,t.mixValues=Is,t.mixVisibility=J,t.motionValue=Vn,t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Rl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.number=p,t.numberValueTypes=Qt,t.optimizedAppearDataAttribute=ei,t.optimizedAppearDataId="framerAppearId",t.originProps=Ci,t.parseAnimateLayoutArgs=Nr,t.parseCSSVariable=$n,t.parseValueFromTransform=pe,t.percent=M,t.pixelsToPercent=wo,t.positionalKeys=Xn,t.prefersReducedMotion=xr,t.press=function(t,e,n={}){e=Mi(e);const[i,s,o]=Ba(t,n),r=t=>{const i=t.currentTarget;if(!Ia(t))return;if(Na.has(t))return;ja.add(i),n.stopPropagation&&Na.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),ja.has(i)&&ja.delete(i),Ia(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||La(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Ti(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Oa(()=>{ja.has(t)||(n=!0,Fa(t,"down"))}),s=Oa(()=>{n&&(n=!1,Fa(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Fa(t,"cancel")},{...e,once:!0})})(t,s),s),ma(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=o.now())=>{if(n.isProcessing)return;const i=t-n.timestamp;n.delta=e.MotionGlobalConfig.useManualTiming?i:Math.max(Math.min(i,40),1),o.set(n.timestamp=t),n.isProcessing=!0;for(const t in ut)ut[t].process(n);n.isProcessing=!1},t.progressPercentage=k,t.propEffect=As,t.propagateDirtyNodes=Io,t.px=E,t.readSVGValue=Xi,t.readStyleValue=Li,t.readTransformValue=me,t.recordStats=function(){if(Cs.value)throw Cs.value=null,Cs.addProjectionMetrics=null,new Error("Stats are already being measured");const t=Cs;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.releaseElement=bs,t.removeAxisDelta=eo,t.removeAxisTransforms=no,t.removeBoxTransforms=oo,t.removeEffect=vi,t.removePointDelta=to,t.renderHTML=Er,t.renderSVG=Pl,t.resize=ea,t.resolveElements=Ei,t.resolveMotionValue=Ls,t.resolveTransition=Dn,t.resolveVariant=Gn,t.resolveVariantFromProps=Kn,t.rgbUnit=w,t.rgba=T,t.rootProjectionNode=cr,t.round=Kt,t.sampleDelta=qe,t.scale=f,t.scaleCorrectors=Ds,t.scalePoint=as,t.scopeMotion=function(...t){const n="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:Ei(n)[0],transition:o,add:t=>(c.push(t),()=>e.removeItem(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{bs(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=bi.current;bi.current=t;try{return e()}finally{bi.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Wa(t[e]));n.addEventListener("change",m),a.push([e,n])}}return Pi(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=Vr,t.scrapeSVGMotionValuesFromProps=Al,t.setDragLock=xa,t.setFeatureDefinitions=function(t){Pr=t},t.setStyle=Le,t.setTarget=Zn,t.spring=Mt,t.springValue=function(t,e){const n=Vn(Jn(t)?t.get():t);return _a(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s,grid:o}={}){const r={};return(a,l)=>{let c=r[l];if(!c){const[t,e]=o||[1/0,1],n=Math.min(t,l)-1,s=Math.max(e,Math.ceil(l/t))-1,a="number"==typeof i,u="first"===i?0:"last"===i?1:.5,h=a?i%t:n*u,d=a?Math.floor(i/t):s*u;c=r[l]=[];for(let e=0;e<l;e++){const o=e%t,r=Math.floor(e/t),a=Math.min(o,n-o),l=Math.min(r,s-r);if("random"===i){const t=Math.random()*(e+1)|0;c[e]=c[t],c[t]=e}else c[e]="edges"===i?Math.min(n?a:l,s?l:a):Math.hypot(o-h,r-d)}c.push(o?Math.max(...c):l)}let u=t*c[a];const h=t*c[l];if(s&&h){u=e.easingDefinitionToFunction(s)(u/h)*h}return n+u}},t.startWaapiAnimation=ze,t.statsBuffer=Cs,t.styleEffect=Oi,t.styleSubjectEffect=ji,t.supportedWaapiEasing=We,t.supportsBrowserAnimation=sn,t.supportsFlags=je,t.supportsLinearEasing=Ne,t.supportsPartialKeyframes=gi,t.supportsScrollTimeline=Fe,t.supportsViewTimeline=Ie,t.supportsWaapi=nn,t.svgEffect=qi,t.svgSubjectEffect=Hi,t.sync=Bl,t.testValueType=li,t.time=o,t.toMediaQuery=Wa,t.transform=$a,t.transformAxis=fs,t.transformBox=ys,t.transformBoxPoints=Qi,t.transformPropOrder=fe,t.transformProps=ge,t.transformValue=qa,t.transformValueTypes=Jt,t.translateAxis=ms,t.updateMotionValuesFromProps=vr,t.variantPriorityOrder=mr,t.variantProps=fr,t.vh=V,t.visualElementStore=hr,t.vw=D});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n={delta:0,timestamp:0,isProcessing:!1};let i;function s(){i=void 0}const o={now:()=>(void 0===i&&o.set(n.isProcessing||e.MotionGlobalConfig.useManualTiming?n.timestamp:performance.now()),i),set:t=>{i=t,queueMicrotask(s)}},r=t=>Math.round(1e5*t)/1e5,a=t=>e=>"string"==typeof e&&e.startsWith(t),l=a("--"),c=a("var(--"),u=t=>!!c(t)&&h.test(t.split("/*")[0].trim()),h=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function d(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const p={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...p,transform:t=>e.clamp(0,1,t)},f={...p,default:1},g=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v=(t,e)=>n=>Boolean("string"==typeof n&&y.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),x=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(g);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},w={...p,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},T={test:v("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+w.transform(t)+", "+w.transform(e)+", "+w.transform(n)+", "+r(m.transform(i))+")"},S=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const b={test:v("#"),parse:function(t){const e=t.length>5?2:1,n=S(t,3,e);return{red:parseInt(S(t,0,e),16),green:parseInt(S(t,1,e),16),blue:parseInt(S(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:T.transform},P=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=P("deg"),M=P("%"),E=P("px"),V=P("vh"),D=P("vw"),k=(()=>({...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)}))(),C={test:v("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+M.transform(r(e))+", "+M.transform(r(n))+", "+r(m.transform(i))+")"},R={test:t=>T.test(t)||b.test(t)||C.test(t),parse:t=>T.test(t)?T.parse(t):C.test(t)?C.parse(t):b.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?T.transform(t):C.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},B=new RegExp(g.source),L=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const j="number",O="color",F=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function I(t){const e=t.toString();return B.test(e)||L.test(e)}function N(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(F,t=>(R.test(t)?(i.color.push(o),s.push(O),n.push(R.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(j),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function U({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===j?r(i[o]):t===O?R.transform(i[o]):i[o]}return s}}const W=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:R.test(n)?R.getAnimatableNone(n):n;var n};const $={test:function(t){return isNaN(t)&&"string"==typeof t&&(B.test(t)||L.test(t))},parse:function(t){return N(t).values},createTransformer:function(t){return U(N(t))},getAnimatableNone:function(t){const e=N(t);return U(e)(e.values.map((t,n)=>W(t,e.split[n])))}};function z(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function K({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=z(a,i,t+1/3),o=z(a,i,t),r=z(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function G(t,e){return n=>n>0?e:t}const Y=(t,e,n)=>t+(e-t)*n,X=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},H=[b,T,C];function q(t){const e=(n=t,H.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===C&&(i=K(i)),i}const _=(t,e)=>{const n=q(t),i=q(e);if(!n||!i)return G(t,e);const s={...n};return t=>(s.red=X(n.red,i.red,t),s.green=X(n.green,i.green,t),s.blue=X(n.blue,i.blue,t),s.alpha=Y(n.alpha,i.alpha,t),T.transform(s))},Z=new Set(["none","hidden"]);function J(t,e){return Z.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Q(t,e){return n=>Y(t,e,n)}function tt(t){return"number"==typeof t?Q:"string"==typeof t?u(t)?G:R.test(t)?_:it:Array.isArray(t)?et:"object"==typeof t?R.test(t)?_:nt:G}function et(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>tt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function nt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=tt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const it=(t,n)=>{const i=N(t),s=N(n);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Z.has(t)&&!s.values.length||Z.has(n)&&!i.values.length?J(t,n):e.pipe(et(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),U(s)):G(t,n)},st=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ot(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Y(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=st.exec(t);if(!n)return;const i=st.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),a=parseFloat(i[1]);return t=>r(Y(o,a,t))+s}(t,e);if(n)return n}return tt(t)(t,e)}const rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function at(t,n,i={delta:0,timestamp:0,isProcessing:!1}){let s=!1,o=!0;const r=()=>s=!0,a=rt.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=e.MotionGlobalConfig.useManualTiming,a=r?i.timestamp:performance.now();s=!1,r||(i.delta=o?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),m.process(i),f.process(i),i.isProcessing=!1,s&&n&&(o=!1,t(g))};return{schedule:rt.reduce((e,n)=>{const r=a[n];return e[n]=(e,n=!1,a=!1)=>(s||(s=!0,o=!0,i.isProcessing||t(g)),r.schedule(e,n,a)),e},{}),cancel:t=>{for(let e=0;e<rt.length;e++)a[rt[e]].cancel(t)},state:i,steps:a}}const{schedule:lt,cancel:ct,steps:ut}=at("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0,n),ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>lt.update(e,t),stop:()=>ct(e),now:()=>n.isProcessing?n.timestamp:o.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pt=2e4;function mt(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function ft(t,n=100,i){const{keyframes:s,velocity:o}=t,r=s&&s[s.length-1]-s[0],a=i({...t,velocity:o&&r?o*n/r:o,keyframes:[0,n]}),l=Math.min(mt(a),pt);return{type:"keyframes",ease:t=>a.next(l*t).value/n,duration:e.millisecondsToSeconds(l)}}const gt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function yt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return wt(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function vt(t,e){return t*Math.sqrt(1-e*e)}const xt=12;function wt(t,e,n){let i=n;for(let n=1;n<xt;n++)i-=t(i)/e(i);return i}const Tt=.001;const St=(t,e)=>(e?t>=0:t>0)&&t<1/0;function bt(t,e){if(St(t,e))return t}function Pt(t){const n=bt(t.stiffness),i=bt(t.damping,!0),s=bt(t.mass),o={...t,stiffness:n??100,damping:i??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??i??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=gt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*yt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:n=.3}){let i,s;const o=gt(n);t=e.clamp(.01,10,e.millisecondsToSeconds(t)),o<1?(i=e=>{const n=e*o,i=n*t,s=vt(e,o),r=Math.exp(-i);return Tt-n/s*r},s=e=>{const n=e*o*t,s=o*o*e*e*t,r=Math.exp(-n),a=vt(e*e,o);return(-i(e)+Tt>0?-1:1)*-s*r/a}):(i=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=wt(i,s,5/t),a=r*yt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:e.secondsToMilliseconds(t)}}(o)),o.isResolvedFromDuration=!0;St(o.stiffness)&&St(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function At(t=.3,n=.3){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,isResolvedFromDuration:h,isTimeDefined:d}=Pt({...i}),p=t=>d?0:-e.millisecondsToSeconds(t),m=l/(2*Math.sqrt(a*c)),f=e.millisecondsToSeconds(Math.sqrt(a/c)),g=m*f,y={target:o,delta:o-s,velocity:p(i.velocity||0)||0,restSpeed:0,restDelta:0},v=()=>{const t=Math.abs(y.delta)<5;y.restSpeed=i.restSpeed||(t?.01:2),y.restDelta=i.restDelta||(t?.005:.5)};let x,w,T;if(v(),m<1){const t=vt(f,m),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=()=>{e.A=(y.velocity+g*y.delta)/t,e.sinC=g*e.A+y.delta*t,e.cosC=g*y.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-g*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};x=t=>(n(t),y.target-e.env*(e.A*e.sin+y.delta*e.cos)),w=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===m){x=t=>y.target-Math.exp(-f*t)*(y.delta+(y.velocity+f*y.delta)*t);const t={C:0};T=()=>{t.C=y.velocity+f*y.delta},w=e=>Math.exp(-f*e)*(f*t.C*e-y.velocity)}else{const t=f*Math.sqrt(m*m-1),e=g-t,n=g+t,i=t<1||d?1/0:300/t,s=(t,e)=>Math.exp(e>i?(g-t)*i-g*e:-t*e),o={S:0,F:0};T=()=>{const e=(y.velocity+g*y.delta)/t;o.S=(y.delta+e)/2,o.F=(y.delta-e)/2},x=t=>y.target-o.S*s(e,t)-o.F*s(n,t),w=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}T();const S=h&&u||null,b={calculatedDuration:S,retarget:(t,e)=>{y.target=t[t.length-1],y.delta=y.target-t[0],y.velocity=p(e),i.restSpeed&&i.restDelta||v(),b.calculatedDuration=S,r.done=!1,T()},velocity:t=>e.secondsToMilliseconds(w(t)),next:t=>{const n=x(t);if(h)r.done=t>=u;else{const i=e.secondsToMilliseconds(w(t));r.done=Math.abs(i)<=y.restSpeed&&Math.abs(y.target-n)<=y.restDelta}return r.value=r.done?y.target:n,r},toString:()=>{const t=Math.min(mt(b),pt),e=dt(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}const Mt=Object.assign(At,{applyToOptions:t=>{const n=ft(t,100,At);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t}});function Et({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=Mt({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function Vt(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=i||e.MotionGlobalConfig.mix||ot,r=t.length-1;for(let i=0;i<r;i++){let r=o(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),c=l.length,u=i=>{if(a&&i<t[0])return n[0];let s=0;if(c>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>u(e.clamp(t[0],t[r-1],n)):u}function Dt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(Y(i,1,o))}}function kt(t){const e=[0];return Dt(e,t.length-1),e}function Ct(t,e){return t.map(t=>t*e)}function Rt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const o=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s)||e.easeInOut,r={done:!1,value:n[0]};if(2===n.length&&!Array.isArray(o)&&(!i||2!==i.length||0===i[0]&&1===i[1])){const[i,s]=n,a=i===s?void 0:(e.MotionGlobalConfig.mix||ot)(i,s);return{calculatedDuration:t,next:n=>(r.value=a?a(o(t>0?e.clamp(0,1,n/t):1)):s,r.done=n>=t,r)}}const a=Vt(Ct(i&&i.length===n.length?i:kt(n),t),n,{ease:Array.isArray(o)?o:Rt(n,o)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}function Lt(t,n,i=0){return n<=0?i:t.velocity?t.velocity(n):function(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}(e=>t.next(e).value,n,t.next(n).value)}const jt=t=>null!==t;function Ot(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(jt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ft={decay:Et,inertia:Et,tween:Bt,keyframes:Bt,spring:Mt};function It(t){"string"==typeof t.type&&(t.type=Ft[t.type])}const Nt=(t,n)=>n-t>40&&!e.MotionGlobalConfig.useManualTiming?n:t;function Ut(t,e){return{kind:t,animation:e,timestamp:o.now(),frameTimestamp:n.timestamp,frameIsProcessing:n.isProcessing}}function Wt(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Ut("animation-start",t),options:n?{...e,...n}:e})}catch{}}class $t{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const zt=t=>t/100,Kt=t=>Math.round(1e4*t)/1e4;class Gt extends $t{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==o.now()&&this.tick(o.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Wt(this,this.options)}initAnimation(){const{options:t}=this;It(t);const{type:n=Bt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Bt;l!==Bt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(zt,ot(a[0],a[1])),a=[0,100]);const c=l(a===t.keyframes?t:{...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===c.calculatedDuration&&(c.calculatedDuration=mt(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Nt(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==Et&&(d.value=Ot(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Kt((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==Et?Ot(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,n){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=i;if(c){const n=Math.min(t,s)/a;let i=Math.floor(n),o=n%1;!o&&n>=1&&(o=1),1===o&&i--,i=Math.min(i,c+1);Boolean(i%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=e.clamp(0,1,o)*a}return n?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!n&&(d.value=o(d.value)),d}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){return this.duration+e.millisecondsToSeconds(this.options.delay??0)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Lt(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(o.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(o.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Yt=new Set(["brightness","contrast","saturate","opacity"]);function Xt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(g)||[];if(!i)return t;const s=n.replace(i,"");let o=Yt.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ht=/\b([a-z-]*)\(.*?\)/gu,qt={...$,getAnimatableNone:t=>{const e=t.match(Ht);return e?e.map(Xt).join(" "):t}},_t={...$,getAnimatableNone:t=>{const e=$.parse(t);return $.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Zt={...p,transform:Math.round},Jt={rotate:A,pathRotation:A,rotateX:A,rotateY:A,rotateZ:A,scale:f,scaleX:f,scaleY:f,scaleZ:f,skew:A,skewX:A,skewY:A,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:m,originX:k,originY:k,originZ:E},Qt={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...Jt,zIndex:Zt,fillOpacity:m,strokeOpacity:m,numOctaves:Zt},te={...Qt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:qt,WebkitFilter:qt,mask:_t,WebkitMask:_t},ee=t=>te[t],ne=new Set([qt,_t]);function ie(t,e){let n=ee(t);return ne.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function se(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const oe=t=>180*t/Math.PI,re=t=>{const e=oe(Math.atan2(t[1],t[0]));return le(e)},ae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:re,rotateZ:re,skewX:t=>oe(Math.atan(t[1])),skewY:t=>oe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},le=t=>((t%=360)<0&&(t+=360),t),ce=t=>Math.hypot(t[0],t[1]),ue=t=>Math.hypot(t[4],t[5]),he={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ce,scaleY:ue,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(ce(t)+ue(t))/2,rotateX:t=>le(oe(Math.atan2(t[6],t[5]))),rotateY:t=>le(oe(Math.atan2(-t[2],t[0]))),rotateZ:re,rotate:re,skewX:t=>oe(Math.atan(t[4])),skewY:t=>oe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function de(t){return t.includes("scale")?1:0}function pe(t,e){if(!t||"none"===t)return de(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return de(e);const i=(n[1]?he:ae)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const me=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return pe(n,e)},fe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=(()=>new Set([...fe,"pathRotation"]))(),ye=t=>t===p||t===E,ve=new Set(["x","y","z"]),xe=fe.filter(t=>!ve.has(t));const we=new Set(["bottom","right"]);function Te(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const Se=({transform:t})=>pe(t,"x"),be=({transform:t})=>pe(t,"y"),Pe={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>Te(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>Te(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:Se,y:be,translateX:Se,translateY:be},Ae=new Set;let Me=!1,Ee=!1,Ve=!1;function De(){if(Ee){const t=[],e=new Set,n=new Set;Ae.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),we.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return xe.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ee=!1,Me=!1,Ae.forEach(t=>t.complete(Ve)),Ae.clear()}function ke(){Ae.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function Ce(){Ve=!0,ke(),De(),Ve=!1}class Re{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ae.add(this),Me||(Me=!0,lt.read(ke),lt.resolveKeyframes(De))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(null===t[0]){const o=s?.get(),r=t[t.length-1];if(void 0!==o)t[0]=o;else if(i&&n){const s=function(t,n,i){if("string"==typeof t){if(e.isNumericalString(t)||e.isZeroValueString(t))return parseFloat(t);if(!$.test(t)&&$.test(i))return ie(n,i)}return t??void 0}(i.readValue(n,r),n,r);void 0!==s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===o&&s.set(t[0])}se(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ae.delete(this)}cancel(){"scheduled"===this.state&&(Ae.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Be=t=>t.startsWith("--");function Le(t,e,n){Be(e)?t.style.setProperty(e,n):t.style[e]=n}const je={};function Oe(t,n){const i=e.memo(t);return()=>je[n]??i()}const Fe=Oe(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ie=Oe(()=>void 0!==window.ViewTimeline,"viewTimeline"),Ne=Oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ue=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,We={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ue([0,.65,.55,1]),circOut:Ue([.55,0,1,.45]),backIn:Ue([.31,.01,.66,-.59]),backOut:Ue([.33,1.53,.69,.99])};function $e(t,n){return t?"function"==typeof t?Ne()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ue(t):Array.isArray(t)?t.map(t=>$e(t,n)||We.easeOut):We[t]:void 0}function ze(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=$e(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function Ke(t){return"function"==typeof t&&"applyToOptions"in t}function Ge({type:t,...e}){return Ke(t)&&Ne()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ye extends $t{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=Ge(t);this.animation=ze(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ot(i,this.options,r,this.speed);this.updateMotionValue?.(t),Le(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Wt(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){const n=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Fe()?(this.animation.timeline=t,n?.(this.animation),e.noop):i(this)}}const Xe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function He(t){"string"==typeof t.ease&&t.ease in Xe&&(t.ease=Xe[t.ease])}const qe=10;class _e extends Ye{constructor(t){He(t),It(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(o.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Gt({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:n,element:i,name:s}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?e.clamp(0,10,r):0,l=this.sample(r);i&&s&&Le(i,s,l),n.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Ze=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$.test(t)&&"0"!==t||t.startsWith("url(")));function Je(t){t.duration=0,t.type="keyframes"}const Qe=new Set(["opacity","clipPath","filter","transform"]),tn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const en=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nn=()=>!e.MotionGlobalConfig.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function sn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Qe.has(n)&&!en.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return nn()&&(Qe.has(n)||en.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&tn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const on=(t,e)=>e&&"number"==typeof t?e.transform(t):t,rn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},an=fe.length,ln={},cn=(t,e,n=on(e,Jt[t]))=>(ln[t]||(ln[t]=(rn[t]||t)+"("))+n+")",un=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function hn(t,e,n){let i="";for(let s=0;s<an;s++){const o=fe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=on(r,Qt[o]));un(o,r)||(i+=cn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=cn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const dn=new WeakMap,pn=.001,mn=(t,e)=>t-e,fn=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Y(t,e,s/n));return i},gn=t=>t.motionValue.owner,yn=t=>dn.get(t),vn=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class xn extends Gt{constructor(t){const e=gn(t).current,{driver:n=ht}=t;let i;const s=function(t){const e=gn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(vn(e,"transform")||"none")||vn(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=yn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=yn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return yn(gn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(o.now()):void 0}tween(){const{keyframes:t,type:n,ease:i,times:s,repeat:o,delay:r=0}=this.options,a=e.isBezierDefinition(i)?Ue(i):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(i)&&We[i];if(a&&!o&&!s&&2===t.length&&n===Bt&&null===this.holdTime){const t=this.startTime+r/this.speed;return[t,t+this.resolvedDuration/this.speed,a]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||Bt)===Bt?u||kt(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=o.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const i=t.current,s=new Set,r=new Map;let a={},l=[],c=new Map,u=[],h=!1,d=!1,p=!1,m=!1,f=-1/0;const g=t=>{for(const e of s)if(e.name===t)return!0},y=(e,n)=>{const i={};for(const s of void 0===e?fe:l){const o=r.get(s),l=void 0===e?vn(t,s):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):a[s];void 0!==l&&(i[s]=l)}return i},v=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&un(i,s)||(n+=cn(i,s)+" ")}return(e?n.trim():n)||"none"},x=(t,e)=>v(y(t,e)),w=(t=y())=>{i.style.transform=v(t,!0)},T=(t=!0)=>{t&&w(),u.forEach(({animation:t})=>t.cancel()),u=[]},S=(t,e)=>new Animation(new KeyframeEffect(i,t,e)),b=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=o.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,u.some(t=>t.end===1/0)&&(t.cancel(),u=u.filter(t=>t!==i)),B.schedule(!1)}),t.oncancel=()=>u.includes(i)&&B.demote(),u.push(i)},P=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},A=(t,n,i,s)=>{const o=Math.min(200,Math.max(2,Math.ceil((i-n)/qe)));if(4*s.length>o)return;const r=fn(n,i,o).concat(s).sort(mn),a=t=>e.progress(n,i,t);let l,c;for(const e of t){const t=r.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],o=i.some(t=>Math.abs(t)*pn>Math.abs(s))?0:s,a=i.map(t=>o?t/o:t);if(o)if(l){if(a.some((t,e)=>!(Math.abs(t-l[e])<=pn)))return}else l=a,c=t=>(e.numberAt(t)-n)/o;else if(a.some(t=>!(Math.abs(t)<=pn)))return}if(!l||l.every((t,e)=>Math.abs(t-a(r[e]))<=pn))return"linear";const u=[],h=(t,e=c(t))=>u.push(Kt(e)+" "+Kt(100*a(t))+"%");return l.forEach((t,e)=>{e&&Math.abs(t-l[e-1])>.2&&P(c,r[e-1],r[e]).forEach(t=>h(t)),h(r[e],t)}),"linear("+u+")"},M=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...P(t=>i.numberAt(t),e,n));s.push(n)}},a=fn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(mn))t>l&&r(l,t,0),l=t;return s.sort(mn)},E=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},V=(t,n,i,s={fill:"both"},o,r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=r||A(t,n,i,a),c=l?[n,i]:M(t,n,i,a),u=c.map(t=>x(t,o));let h={transform:u};return l||(h.offset=c.map(t=>e.progress(n,i,t))),u.every(t=>t===u[0])&&(w(y(n,o)),h=null),S(h,{...s,duration:i-n,easing:l||"linear"})},D=e=>{let n=e,i=0,o=0;const h=[],d=[],p=new Set;r.clear(),c=new Map;for(const t of s){r.set(t.name,t);const[s,a]=t.timing(),l=s===1/0;if(c.set(t,[t.at(e),t.speed,l]),l)t.sync();else{if(t.speed<0)return;if(a){if(i){const t=(s-o)/a;if(Math.abs(a-i)>1||Math.abs(t-Math.round(t))*i>1)return}else i=a,o=s;d.push(t)}else p.add(s);h.push(t),n=Math.max(n,s)}}a={},l=fe.filter(e=>{if(r.has(e))return!0;const n=a[e]=vn(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),T(!1);const m=!i&&E(h);try{if(m&&m[1]>e){const[t,n,i]=m;b(V(h,t,n,void 0,void 0,i),t-e,n-t)}else n>e&&(b(V(h,e,n),0,n-e),p.forEach(t=>t<n-1&&b(S(null,{duration:t-e}),0,t-e)));if(i){const t=o+Math.floor((n-o)/i)*i;b(V(d,t,t+i,{iterations:1/0,iterationStart:(n-t)/i,fill:"forwards"},n),n-e)}}catch{return}return u.length||T(),!0},k=t=>{let e,n=0;for(const i of s){const s=c.get(i);if(!s)return!1;const[o,r,a]=s,l=i.at(t),u=i.timing()[0]===1/0;if(a){if(u&&l===o)continue;return!1}const h=(l-o)/r,d=u?0:i.speed/r;if(void 0===e)e=h,n=d;else if(Math.abs(h-e)>1||d!==n)return!1}if(void 0===e)return!0;if(!u.length)return!1;for(const{offset:t,end:n,isDone:i}of u){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:i,offset:s,isDone:o}of u){if(o)continue;const r=e-s;n&&i.updatePlaybackRate&&"running"===i.playState&&Math.abs(Number(i.currentTime)-r)<20?i.playbackRate!==n&&i.updatePlaybackRate(n):n?(i.playbackRate=n,i.startTime=t-r/n):(i.startTime=null,i.currentTime=r)}return!0},C=()=>!s.size&&(p=!0,yn(i)===B&&dn.delete(i),B.isJS||T(),!0),R=()=>{const e=o.now();if(B.isJS||(B.isFinishing=!0,s.forEach(n=>{const[i,s]=n.timing();"running"===n.state&&n.speed>0&&!s&&i<=e+1&&(n.complete(),a[n.name]=vn(t,n.name),c.has(n)||(h=!0))}),B.isFinishing=!1),d=!1,p)return;if(s.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||s.delete(e)}),C())return;for(const t of s)if(!t.canAccelerate)return B.demote(!0);B.isJS&&(B.isJS=!1,h=!0,s.forEach(t=>t.js?.stop()));const n=h,i=m;if(h=m=!1,n||!k(e)){if(i){if(e-f<100)return B.demote();f=e}if(!D(e))return B.demote()}},B={tracks:s,isJS:!1,isFinishing:!1,schedule(t,e){p||(h||(h=t),m||(m=!!e),d||(d=!0,n.isProcessing?lt.render(R,!1,!0):queueMicrotask(R)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||s.delete(t),C()||B.schedule(!0)},check(){if(!B.isJS)for(const e in a)if(vn(t,e)!==a[e]&&!g(e))return B.schedule(!0,!0)},demote(t){if(!B.isJS&&!p)return s.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),B.isJS=!0,c=new Map,T(),s.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return dn.set(i,B),B}(gn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(o.now())}get time(){return this.isAccelerated()?e.millisecondsToSeconds(e.clamp(0,this.totalDuration,this.at(o.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class wn extends $t{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=o.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,r=t;r.autoplay??(r.autoplay=!0),r.delay??(r.delay=0),r.type??(r.type="keyframes"),r.repeat??(r.repeat=0),r.repeatDelay??(r.repeatDelay=0),r.repeatType??(r.repeatType="loop");const a=s?.KeyframeResolver||Re;this.keyframeResolver=new a(e,(t,e,n)=>this.onKeyframesResolved(t,e,r,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=o.now();const d=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Ze(s,e),a=Ze(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Ke(n))&&i)}(t,r,a,l);d||(!e.MotionGlobalConfig.instantAnimations&&c||h?.(Ot(t,i,n)),t[0]=t[t.length-1],Je(i),i.repeat=0);const{onComplete:p}=i;i.finalKeyframe=n,i.keyframes=t,i.onComplete=()=>{p?.(),this.notifyFinished()};const m=d&&!u&&sn(i),f=!m&&(({name:t,motionValue:e})=>t&&fe.includes(t)&&e?.owner?.current instanceof HTMLElement&&nn()&&Ne())(i);let g;if(s&&(m||f||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=Nt(this.createdAt,this.resolvedAt))),m){i.element=i.motionValue?.owner?.current;try{g=new _e(i)}catch{g=new Gt(i)}}else g=f?new xn(i):new Gt(i);this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ce()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class Tn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Sn(this.animations,"duration")}get iterationDuration(){return Sn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Sn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class bn extends Ye{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Wt(this,{})}}const Pn=new WeakMap;function An(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Mn={current:void 0};class En{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=o.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=o.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){var i;return"change"===t?this.onChangeSubscribe(n):((i=this.events)[t]||(i[t]=new e.SubscriptionManager)).add(n)}onChangeSubscribe(t){const{events:n}=this;return n.change||this.changeSubscriber?(n.change||(n.change=new e.SubscriptionManager,n.change.add(this.changeSubscriber),this.changeSubscriber=void 0),n.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:n.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){lt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){Mn.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=o.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Vn(t,e){return new En(t,e)}function Dn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function kn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Dn(n,t):n}const Cn={type:"spring",stiffness:500,damping:25,restSpeed:10},Rn={type:"keyframes",duration:.8},Bn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ln=(t,{keyframes:e})=>e.length>2?Rn:ge.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Cn:Bn,jn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]);function On(t){for(const e in t)if(!jn.has(e))return!0;return!1}const Fn=(t,n,i,s={},o,r)=>a=>{const l=kn(s,t)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u-=e.secondsToMilliseconds(c);const h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...l,delay:-u,onUpdate:t=>{n.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:n,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};On(l)||Object.assign(h,Ln(t,h)),h.duration&&(h.duration=e.secondsToMilliseconds(h.duration)),h.repeatDelay&&(h.repeatDelay=e.secondsToMilliseconds(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Je(h),0===h.delay&&(d=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Je(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==n.get()){const t=Ot(h.keyframes,l);if(void 0!==t)return void lt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Gt(h):new wn(h)};function In(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Nn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Un(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $n(t){const e=Wn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function zn(t,n,i=1){const[s,o]=$n(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return u(o)?zn(o,n,i+1):o}function Kn(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Gn(t,e,n){return Kn(t.getProps(),e,n,t)}const Yn=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Xn=new Set(["width","height","top","left","right","bottom",...fe]),Hn=t=>Array.isArray(t);function qn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vn(n))}function _n(t){return Hn(t)?t[t.length-1]||0:t}function Zn(t,e){const n=Gn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){qn(t,e,_n(o[e]))}}const Jn=t=>Boolean(t&&t.getVelocity);function Qn(t){return Boolean(Jn(t)&&t.add)}function ti(t,n){const i=t.getValue("willChange");if(Qn(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}const ei="data-framer-appear-id";function ni(t){return t.props[ei]}const ii="undefined"!=typeof window;function si({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function oi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Dn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&si(d,e))continue;const r={delay:n,...kn(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){lt.update(()=>i.set(s));continue}let p=!1;if(ii&&window.MotionHandoffAnimation){const n=ni(t);if(n){const t=window.MotionHandoffAnimation(n,e,lt);null!==t&&(r.startTime=t,p=!0)}}ti(t,e);const m=c??t.shouldReduceMotion;i.start(Fn(e,i,s,m&&Xn.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>lt.update(()=>{r&&Zn(t,r)});h.length?Promise.all(h).then(e):e()}return h}function ri(t,e,n={}){const i=Gn(t,e,Yn(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?oi(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(ri(t,e,{...n,delay:i+("function"==typeof r?0:r)+An(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ai(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>ri(t,e,n))):"string"==typeof e?ri(t,e,n):Promise.all(oi(t,Gn(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const li=t=>e=>e.test(t),ci=[p,E,M,A,D,V,{test:t=>"auto"===t,parse:t=>t}],ui=t=>ci.find(li(t));function hi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const di=new Set(["auto","none","0"]);class pi extends Re{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(d(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=zn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Xn.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=ui(i),r=ui(s);if(d(i)!==d(s)&&Pe[n])this.needsMeasurement=!0;else if(o!==r)if(ye(o)&&ye(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Pe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||hi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!di.has(e)&&I(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=ie(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return Pe[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const mi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],fi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...mi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);const gi=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),yi=[];function vi(t){e.removeItem(yi,t)}function xi(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Fn(r,c,l,a&&Xn.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):lt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>lt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function wi(t,e,n,i,s){return xi(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=Vn(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function Ti(t){return e.isObject(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function Si(t){return e.isObject(t)&&"ownerSVGElement"in t}const bi={};function Pi(t){return bi.current?.add(t),t}function Ai(t){const e=bi.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const Mi=t=>bi.current?bi.current.bind(t):t;function Ei(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:bi.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Vi(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=Ei(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Di{constructor(t=lt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function ki(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Di(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const Ci=new Set(["originX","originY","originZ"]),Ri=(t,e)=>on(t.get(e)?.get(),Qt[e]),Bi=(t,e,n,i)=>{let s,o;if(ge.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>fe.indexOf(t)-fe.indexOf(e)))}e.get("transform")||(Ti(t)||e.get("transformBox")||Bi(t,e,"transformBox",new En("fill-box")),e.set("transform",new En("none"),()=>{dn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(un(s,o)||(e+=(e&&" ")+cn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+cn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else Ci.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new En(""),()=>{const n=Ri(e,"originX")??"50%",i=Ri(e,"originY")??"50%",s=Ri(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Be(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=on(i.getCurrent(),Qt[n])};return e.set(n,i,s,o)},Li=(t,e)=>{if(ge.has(e))return me(t,e);const n=getComputedStyle(t),i=Be(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},ji=ki(Bi,{test:t=>Ti(t)||Si(t),read:Li}),Oi=Vi(ji);function Fi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Ii(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ge.has(t))r=!0;else if(l(t))s[t]=n;else{const e=on(n,Qt[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=hn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Ni={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ui={offset:"strokeDashoffset",array:"strokeDasharray"};function Wi(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ni:Ui;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const $i=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zi(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ii(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of $i)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Wi(h,s,o,r,!1)}const Ki=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Fi(s));const r=Qt[n]||Qt[s],a=o?()=>{t[s]=on(i.get(),Qt[n])}:()=>{const e=on(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Gi=Vi(ki(Ki));const Yi=(t,e,n,i)=>{if(n.startsWith("path")&&!ge.has(n))return function(t,e,n,i){return lt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new En("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ki(t,e,n,i,_i(n));return(ge.has(n)||Ci.has(n)||Be(n)||n in t.style?Bi:Ki)(t,e,n,i)},Xi=(t,e)=>ge.has(e)?Qt[e]?.default||0:Be(e)||$i.includes(e)?Li(t,e)||t.getAttribute(Fi(e))||0:(e=_i(e),t.getAttribute(Fi(e))??t.getAttribute(e)??void 0),Hi=ki(Yi,{test:Si,read:Xi}),qi=Vi(Hi);function _i(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Zi({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ji({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Qi(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ts(t){return void 0===t||1===t}function es({scale:t,scaleX:e,scaleY:n}){return!ts(t)||!ts(e)||!ts(n)}const ns=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function is(t){return es(t)||os(t)||ss(t)}function ss(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function os(t){return rs(t.x)||rs(t.y)}function rs(t){return t&&"0%"!==t}function as(t,e,n){return n+e*(t-n)}function ls(t,e,n,i,s){return void 0!==s&&(t=as(t,s,i)),as(t,n,i)+e}function cs(t,e=0,n=1,i,s){t.min=ls(t.min,e,n,i,s),t.max=ls(t.max,e,n,i,s)}function us(t,{x:e,y:n}){cs(t.x,e.translate,e.scale,e.originPoint),cs(t.y,n.translate,n.scale,n.originPoint)}const hs=.999999999999,ds=1.0000000000001;function ps(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++)o=n[a],r=o.projectionDelta,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ms(t.x,-o.scroll.offset.x),ms(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,us(t,r)),i&&(i.path?.[a]||i)!==o&&is(o.latestValues)&&ys(t,o.latestValues,o.layout?.layoutBox));e.x<ds&&e.x>hs&&(e.x=1),e.y<ds&&e.y>hs&&(e.y=1)}function ms(t,e){t.min+=e,t.max+=e}function fs(t,e,n,i,s=.5){cs(t,e,n,Y(t.min,t.max,s),i)}function gs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ys(t,e,n){const i=n??t;fs(t.x,gs(e.x,i.x),e.scaleX,e.scale,e.originX),fs(t.y,gs(e.y,i.y),e.scaleY,e.scale,e.originY)}function vs(t,e){return Zi(Qi(t.getBoundingClientRect(),e))}function xs(t,e,n){const i=vs(t,n),{scroll:s}=e;return s&&(ms(i.x,s.offset.x),ms(i.y,s.offset.y)),i}const ws={},Ts=t=>Si(t)?Hi:ji;class Ss{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=pi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return vs(this.current)}getProps(){return ws}}const bs=t=>Ts(t).state(t)?.release();function Ps(t,e){const n=Ts(t).state(t);if(!n)return;const i=dn.get(t);i&&(i.demote(),dn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const As=ki((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>e.isObject(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:Ms,cancel:Es}=at(queueMicrotask,!1);function Vs(t,e,n){const i=Jn(t)?t:Vn(t);return i.start(Fn("",i,e,n)),i.animation}const Ds={};function ks(t,{layout:e,layoutId:n}){return ge.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ds[t]||"opacity"===t)}const Cs={value:null,addProjectionMetrics:null};function Rs(t,e){const n=o.now();t=Mi(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(ct(i),t(o-e))};return lt.setup(i,!0),Pi(()=>ct(i))}function Bs(t){return Si(t)&&"svg"===t.tagName}function Ls(t){return Jn(t)?t.get():t}const js=t=>"number"==typeof t?t:parseFloat(t),Os=mi.length,Fs=t=>"number"==typeof t||E.test(t);function Is(t,e,n,i,s,o){s?(t.opacity=Y(0,n.opacity??1,Us(i)),t.opacityExit=Y(e.opacity??1,0,Ws(i))):o&&(t.opacity=Y(e.opacity??1,n.opacity??1,i));for(let s=0;s<Os;s++){const o=mi[s];let r=Ns(e,o),a=Ns(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Fs(r)===Fs(a)?(t[o]=Math.max(Y(js(r),js(a),i),0),(M.test(a)||M.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<ns.length;s++){const o=ns[s];(e[o]||n[o])&&(t[o]=Y(e[o]||0,n[o]||0,i))}}function Ns(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Us=$s(0,.5,e.circOut),Ws=$s(.5,.95,e.noop);function $s(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function zs(t,e){t.min=e.min,t.max=e.max}function Ks(t,e){zs(t.x,e.x),zs(t.y,e.y)}function Gs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ys(t){return t.max-t.min}function Xs(t,e,n){return Math.abs(t-e)<=n}function Hs(t,e,n,i=.5){t.origin=i,t.originPoint=Y(e.min,e.max,t.origin),t.scale=Ys(n)/Ys(e),t.translate=Y(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function qs(t,e,n,i){Hs(t.x,e.x,n.x,i?.originX),Hs(t.y,e.y,n.y,i?.originY)}function _s(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Ys(e)}function Zs(t,e,n,i){_s(t.x,e.x,n.x,i?.x),_s(t.y,e.y,n.y,i?.y)}function Js(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Ys(e)}function Qs(t,e,n,i){Js(t.x,e.x,n.x,i?.x),Js(t.y,e.y,n.y,i?.y)}function to(t,e,n,i,s){return t=as(t-=e,1/n,i),void 0!==s&&(t=as(t,1/s,i)),t}function eo(t,e=0,n=1,i=.5,s,o=t,r=t){if(M.test(e)){e=parseFloat(e);e=Y(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Y(o.min,o.max,i);t===o&&(a-=e),t.min=to(t.min,e,n,a,s),t.max=to(t.max,e,n,a,s)}function no(t,e,[n,i,s],o,r){eo(t,e[n],e[i],e[s],e.scale,o,r)}const io=["x","scaleX","originX"],so=["y","scaleY","originY"];function oo(t,e,n,i){no(t.x,e,io,n?.x,i?.x),no(t.y,e,so,n?.y,i?.y)}const ro=()=>({translate:0,scale:1,origin:0,originPoint:0}),ao=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),lo=()=>({min:0,max:0}),co=()=>({x:{min:0,max:0},y:{min:0,max:0}});function uo(t){return 0===t.translate&&1===t.scale}function ho(t){return uo(t.x)&&uo(t.y)}function po(t,e){return t.min===e.min&&t.max===e.max}function mo(t,e){return po(t.x,e.x)&&po(t.y,e.y)}function fo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function go(t,e){return fo(t.x,e.x)&&fo(t.y,e.y)}function yo(t){return Ys(t.x)/Ys(t.y)}function vo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class xo{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(e.removeItem(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function wo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const To={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!E.test(t))return t;t=parseFloat(t)}return`${wo(t,e.target.x)}% ${wo(t,e.target.y)}%`}},So={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$.parse(t);if(s.length>5)return i;const o=$.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Y(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},bo={borderRadius:Object.assign({},To,{applyTo:mi.slice()}),borderTopLeftRadius:To,borderTopRightRadius:To,borderBottomLeftRadius:To,borderBottomRightRadius:To,boxShadow:So};function Po(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<ns.length;t++){const e=ns[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function Ao(t){return[t("x"),t("y")]}const Mo=(t,e)=>t.depth-e.depth;class Eo{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mo),this.isDirty=!1,this.children.forEach(t)}}const Vo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Do={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ko=["z","skew","skewZ"];let Co=0;function Ro(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const Bo=t=>t.instance&&dn.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ni(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Lo(i)}function jo({attachResizeListener:t,defaultParent:i,measureScroll:s,checkIsScrollRoot:r,resetTransform:a}){return Object.assign(Ds,{...bo,...Ds}),class{constructor(t={},e=i?.()){this.id=Co++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cs.value&&(Do.nodes=Do.calculatedTargetDeltas=Do.calculatedProjections=0),this.nodes.forEach(Io),this.nodes.forEach(Ho),this.nodes.forEach(qo),this.nodes.forEach(No),Cs.addProjectionMetrics&&Cs.addProjectionMetrics(Do)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Eo)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Si(e)&&!Bs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;lt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Rs(s,250),Vo.hasAnimatedSinceResize&&(Vo.hasAnimatedSinceResize=!1,this.nodes.forEach(Xo)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||tr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!go(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...kn(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Xo(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,ct(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(_o),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Bo(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,Bo(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach($o),void this.nodes.forEach(Wo)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(zo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ko),this.nodes.forEach(Go),this.nodes.forEach(Yo),this.nodes.forEach(Oo),this.nodes.forEach(Fo)):this.nodes.forEach(zo),this.clearAllSnapshots();const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ms.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uo),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ys(this.snapshot.measuredBox.x)||Ys(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:n}=this,{animationId:i}=this.root;if(this.options.layoutScroll&&n&&(!e||e.animationId!==i||e.phase!==t)){const o=r(n);this.scroll={animationId:i,phase:t,isRoot:o,offset:s(n),wasRoot:e?e.isRoot:o}}}resetTransform(){if(!a)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&Bo(this);const e=this.projectionDelta&&!ho(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||is(this.latestValues)||s)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),ir((i=n).x),ir(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rr))){const{scroll:t}=this.root;t&&(ms(e.x,t.offset.x),ms(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ks(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ks(e,t),ms(e.x,s.offset.x),ms(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Ks(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ms(o.x,-n.scroll.offset.x),ms(o.y,-n.scroll.offset.y)),is(n.latestValues)&&ys(o,n.latestValues,n.layout?.layoutBox)}return!i&&is(this.latestValues)&&ys(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ks(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!is(n.latestValues))continue;let i;n.instance&&(es(n.latestValues)&&n.updateSnapshot(),i=co(),Ks(i,n.measurePageBox())),oo(e,n.latestValues,n.snapshot?.layoutBox,i)}return is(this.latestValues)&&oo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=n.timestamp;const r=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zs(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Ks(this.target,this.layout.layoutBox),us(this.target,this.targetDelta)):Ks(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&(!r.resumingFrom==!this.resumingFrom||r.options.layoutRoot&&!r.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),Cs.value&&Do.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!es(this.parent.latestValues)&&!os(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Qs(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Ks(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===n.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Ks(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;ps(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Gs(this.prevProjectionDelta.x,this.projectionDelta.x),Gs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),qs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&vo(this.projectionDelta.x,this.prevProjectionDelta.x)&&vo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Cs.value&&Do.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Qo));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;Zo(r.x,t.x,n),Zo(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qs(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,Jo(c.x,m.x,f.x,g),Jo(c.y,m.y,f.y,g),d&&mo(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ks(d,this.relativeTarget)),l&&(this.animationValues=o,Is(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Vo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vs(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Ut("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&or(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},sr(s.x,e.x,t.x),sr(s.y,e.y,t.y)}Ks(e,s),ys(e,i),qs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new xo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!ss(e))return;const n={};for(let e=0;e<ko.length;e++)Ro(ko[e],t,n,this.animationValues);for(let e=0;e<ns.length;e++)Ro(ns[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ls(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ls(e?.pointerEvents)||""),void(this.hasProjected&&!is(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Po(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ds){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=Ds[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Ls(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Wo),this.root.sharedNodes.clear()}}}function Oo(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Ao(t=>ms(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Fo(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)Ao(t=>{const e=Ys(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";zs(i[t],o[t])}else or(s,e.layoutBox,n)&&Ao(e=>{const n=Ys(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};qs(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};qs(c,o?t.applyTransform(i,!0):n,a);const u=!ho(l);let h=!1;const d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};Qs(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};Qs(c,n,s.layoutBox,a),o&&r(l,c),go(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Io(t){Cs.value&&Do.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function No(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Uo(t){t.clearSnapshot()}function Wo(t){t.clearMeasurements()}function $o(t){t.isLayoutDirty=!0,t.updateLayout()}function zo(t){t.isLayoutDirty=!1}function Ko(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Go(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function Yo(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ho(t){t.resolveTargetDelta()}function qo(t){t.calcProjection()}function _o(t){t.resetSkewAndRotation()}function Zo(t,e,n){t.translate=Y(e.translate,0,n),t.scale=Y(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Jo(t,e,n,i){t.min=Y(e.min,n.min,i),t.max=Y(e.max,n.max,i)}function Qo(t){return void 0!==t.animationValues?.opacityExit}const tr={duration:.45,ease:[.4,0,.1,1]},er=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),nr=er("applewebkit/")&&!er("chrome/")?Math.round:e.noop;function ir(t){t.min=nr(t.min),t.max=nr(t.max)}function sr(t,e,n){t.max=Ys(n)+(t.min=e.min)}function or(t,e,n){return"position"===t||"preserve-aspect"===t&&!Xs(yo(e),yo(n),.2)}function rr(t){return t!==t.root&&t.scroll?.wasRoot}function ar(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const lr=jo({attachResizeListener:(t,e)=>ar(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cr={current:void 0},ur=jo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cr.current){const t=new lr({});t.mount(window),t.setOptions({layoutScroll:!0}),cr.current=t}return cr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),hr=new WeakMap;function dr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function pr(t){return"string"==typeof t||Array.isArray(t)}const mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fr=["initial"].concat(mr);function gr(t){if(dr(t.animate))return!0;for(let e=0;e<fr.length;e++)if(pr(t[fr[e]]))return!0;return!1}function yr(t){return Boolean(gr(t)||t.variants)}function vr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Jn(s))t.addValue(i,s);else if(Jn(o))t.addValue(i,Vn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Vn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const xr={current:null},wr={current:!1},Tr="undefined"!=typeof window;function Sr(){if(wr.current=!0,Tr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xr.current=t.matches;t.addEventListener("change",e),e()}else xr.current=!1}const br=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Pr={};class Ar{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Re,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=o.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,lt.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=e.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=gr(e),this.isVariantNode=yr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==c[t]&&Jn(e)&&e.set(c[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,hr.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(wr.current||Sr(),this.shouldReduceMotion=xr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.get(t)?.(),n.accelerate&&Qe.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:s,times:o,ease:r,duration:a}=n.accelerate,l=new Ye({element:this.current,name:t,keyframes:s,times:o,ease:r,duration:e.secondsToMilliseconds(a)}),c=i(l);return void this.valueSubscriptions.set(t,()=>{c(),l.cancel()})}const i=ge.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&<.preRender(this.notifyUpdate),i&&(this.projection&&(this.projection.isTransformDirty=!0),dn.get(this.current)?.check()),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Pr){const e=Pr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&dn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<br.length;e++){const n=br[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=vr(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=Vn(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):"number"!=typeof i&&!$.test(i)&&$.test(n)&&(i=ie(t,n)),this.setBaseTarget(t,Jn(i)?i.get():i)),Jn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,n){return(this.events[t]||(this.events[t]=new e.SubscriptionManager)).add(n)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){Ms.render(this.render)}}class Mr extends Ar{constructor(){super(...arguments),this.KeyframeResolver=pi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Er(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function Vr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Jn(i[e])||s&&Jn(s[e])||ks(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Dr extends Mr{constructor(){super(...arguments),this.type="html",this.renderInstance=Er}mount(t){super.mount(t)}readValueFromInstance(t,e){if(ge.has(e))return this.projection?.isProjecting?de(e):me(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(l(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return vs(t,e)}build(t,e,n){Ii(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Vr(t,e,n)}}const kr="[data-layout],[data-layout-id]",Cr=new WeakMap;let Rr;function Br(t){const e=[];return t instanceof HTMLElement&&t.matches(kr)&&e.push(t),t.querySelectorAll(kr).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Lr(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function jr(t,e){let n=Cr.get(t);if(n)n.setOptions(Lr(t,e));else{let i=hr.get(t);i||(i=new Dr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Ps(t,i)),t.style.transform&&!is(i.latestValues)&&(t.style.transform=""),n=new ur(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Cr.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Lr(t,e),visualElement:i}),n.mount(t),Cr.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Or(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Cr.delete(t)}function Fr(){const t=Rr;Rr=void 0,function(){if(n.isProcessing)return;const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}();const i=new Map;for(const e of t)for(const t of e.collectTargets()){const n=i.get(t);n?n.push(e):i.set(t,[e])}const s=new Map;for(const t of(r=i.keys(),[...r].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const e=i.get(t),n=jr(t,e[e.length-1].transitionFor(t));for(const i of e)i.adopt(t,n);s.set(t,n)}var r;s.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const a=[];for(const e of t){const t=e.runUpdate();t&&a.push(t)}const l=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let n;s.forEach(t=>n||(n=t.root));for(const e of t)n||(n=e.getRoot());n?.didUpdate(),Ms.render(()=>{for(const e of t)e.finalize()})};a.length?Promise.all(a).then(l):l()}class Ir{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Rr||(Rr=[],queueMicrotask(Fr)),Rr.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Br(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Br(this.scope)){if(this.tracked.has(e))continue;const n=jr(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Or(n,e)}}),e.relegate())return;n.remove()}Or(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Tn([...t]))}}function Nr(t,e,n){if("function"==typeof t)return{scope:bi.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:Ei(t)[0]??document,updateDom:e,defaultOptions:n}}const Ur=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Wr(t){return{point:{x:t.pageX,y:t.pageY}}}const $r=t=>e=>Ur(e)&&t(e,Wr(e));function zr(t,e,n,i){return ar(t,e,$r(n),i)}const Kr=new WeakMap;let Gr;const Yr=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Si(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Xr=Yr("inline","width","offsetWidth"),Hr=Yr("block","height","offsetHeight");function qr({target:t,borderBoxSize:e}){Kr.get(t)?.forEach(n=>{n(t,{get width(){return Xr(t,e)},get height(){return Hr(t,e)}})})}function _r(t){t.forEach(qr)}function Zr(t,e){Gr||"undefined"!=typeof ResizeObserver&&(Gr=new ResizeObserver(_r));const n=Ei(t);return n.forEach(t=>{let n=Kr.get(t);n||(n=new Set,Kr.set(t,n)),n.add(e),Gr?.observe(t)}),()=>{n.forEach(t=>{const n=Kr.get(t);n?.delete(e),n?.size||Gr?.unobserve(t)})}}const Jr=new Set;let Qr;function ta(t){return Jr.add(t),Qr||(Qr=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Jr.forEach(e=>e(t))},window.addEventListener("resize",Qr)),()=>{Jr.delete(t),Jr.size||"function"!=typeof Qr||(window.removeEventListener("resize",Qr),Qr=void 0)}}function ea(t,e){return Pi("function"==typeof t?ta(t):Zr(t,e))}const na=(t,e)=>Math.abs(t-e);function ia(t,e){const n=na(t.x,e.x),i=na(t.y,e.y);return Math.sqrt(n**2+i**2)}const sa=new Set(["auto","scroll"]);class oa{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=aa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=ca(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ia(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:o.now()});const{onStart:s,onMove:r}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=aa(e,this.transformPagePoint),this.hasPendingMove=!0,lt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ca("pointercancel"===t.type?this.lastMoveEventInfo:aa(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Ur(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const c=aa(Wr(t),this.transformPagePoint),{point:u}=c;this.history=[{...u,timestamp:o.now()}];const{onSessionStart:h}=n;h&&h(t,ca(c,this.history));const d={passive:!0,capture:!0};this.removeListeners=e.pipe(zr(this.contextWindow,"pointermove",this.handlePointerMove,d),zr(this.contextWindow,"pointerup",this.handlePointerUp,d),zr(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const t=getComputedStyle(n);(sa.has(t.overflowX)||sa.has(t.overflowY))&&this.scrollPositions.set(n,ra(n)),n=n.parentElement}this.scrollPositions.set(window,ra(window)),this.removeScrollListeners=e.pipe(ar(window,"scroll",this.onElementScroll,{capture:!0}),ar(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=ra(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),lt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),ct(this.updatePoint)}}const ra=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function aa(t,e){return e?{point:e(t.point)}:t}function la(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ca({point:t},e){return{point:t,delta:la(t,ha(e)),offset:la(t,ua(e)),velocity:da(e,.1)}}function ua(t){return t[0]}function ha(t){return t[t.length-1]}function da(t,n){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=ha(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>e.secondsToMilliseconds(n)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>2*e.secondsToMilliseconds(n)&&(s=t[1]);const r=e.millisecondsToSeconds(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const pa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ma(t){return pa.has(t.tagName)||!0===t.isContentEditable}const fa=new Set(["INPUT","SELECT","TEXTAREA"]);function ga(t){return fa.has(t.tagName)||!0===t.isContentEditable}const ya={x:!1,y:!1};function va(){return ya.x||ya.y}function xa(t){return"x"===t||"y"===t?ya[t]?null:(ya[t]=!0,()=>{ya[t]=!1}):ya.x||ya.y?null:(ya.x=ya.y=!0,()=>{ya.x=ya.y=!1})}function wa(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ta(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Sa=.35;function ba(t,e,n){return{min:Pa(t,e),max:Pa(t,n)}}function Pa(t,e){return"number"==typeof t?t:t[e]||0}function Aa(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const Ma=new WeakMap;class Ea{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new oa(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=xa(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),Ao(t=>{let e=this.getAxisMotionValue(t).get()||0;if(u(e)&&(e=zn(e,this.visualElement.current)||0),E.test(e))e=parseFloat(e);else if(M.test(e)){const n=o?.layout?.layoutBox[t];n&&(e=Ys(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),s&<.update(()=>s(t,e),!1,!0),ti(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.visualElement.render(),o&<.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&<.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Ca(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Y(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Y(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Va(t)?this.constraints&&this.scroll===Aa(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:wa(t.x,n,s),y:wa(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Sa){return!1===t?t=0:!0===t&&(t=Sa),{x:ba(t,"left","right"),y:ba(t,"top","bottom")}}(e),s!==this.constraints&&!Va(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Ao(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Va(t))return!1;const n=Da(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Aa(i);const s=xs(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ta(t.x,e.x),y:Ta(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Ji(o));this.hasMutatedConstraints=!!t,t&&(o=Zi(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ao(a=>{if(!Ca(a,e||n,this.currentDirection))return;let c=l[a]||{};!0!==r&&r!==a||(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d={type:"inertia",velocity:i?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,d)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return ti(this.visualElement,t),n.start(Fn(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ao(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();Ao(t=>{if(!Ca(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Y(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Va(n)||!i||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};Ao(t=>{const n=this.getAxisMotionValue(t).get();o[t]=function(t,n){let i=.5;const s=Ys(t),o=Ys(n);return o>s?i=e.progress(n.min,n.max-s,t.min):s>o&&(i=e.progress(t.min,t.max-o,n.min)),e.clamp(0,1,i)}({min:n,max:n},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ao(e=>{const n=this.getAxisMotionValue(e);if(!Ca(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Y(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ma.set(this.visualElement,this);const t=this.visualElement.current,e=zr(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&ga(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Va(e)&&Da(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=ea(t,ka(n)),s=ea(e,ka(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),lt.read(i);const r=ar(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ao(e=>{if(!Ca(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=Sa,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Va(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Da=t=>"current"in t?t.current:t;function ka(t){let e=!0;return()=>{e?e=!1:t()}}function Ca(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ra=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Ba(t,e){const n=Ei(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},Pi(()=>i.abort())]}const La=(t,e)=>!!e&&(t===e||La(t,e.parentElement)),ja=new WeakSet;function Oa(t){return e=>{"Enter"===e.key&&t(e)}}function Fa(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ia(t){return Ur(t)&&!va()}const Na=new WeakSet;const Ua={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Wa(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Ua[t]||t;return e?`(not (${i}))`:i}).join(" and ")}function $a(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Vt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const za=new Set,Ka=({timestamp:t})=>{za.forEach(e=>e.tick(t))};class Ga extends $t{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(za.size||lt.update(Ka,!0),za.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Nt(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Lt(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():o.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(za.delete(this),za.size||ct(Ka))}}function Ya(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=js(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=js(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ga({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Jn(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Xa(e,r),!1)):t.set(Xa(e,r))},o=e.on("change",s),a=e.get();js(a)-js(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Xa(t,e){return e?t+e:t}function Ha(t,e,n={}){const i={type:"spring",...n};return It(i),i.type=i.type||Bt,Ya(t,e,i)}function qa(t){const e=[];Mn.current=e;const n=t();Mn.current=void 0;const i=Vn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>lt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),ct(i)})}(e,i,t),i}function _a(t,e,n){return Ya(t,e,{...n,type:Mt})}const Za=[...ci,R,$];let Ja=0;const Qa=()=>"motion-view-"+Ja++;function tl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function el(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function nl(t,e,n,i,s,o=[],r,a=[],l){const c=Ei(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Qa();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),tl(t,s,o),el(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Qa(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),tl(t,s,o),el(t,d,r,a,l),d})}function il(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let sl={},ol=null;const rl=(t,e)=>{sl[t]=e},al=()=>{ol||(ol=document.createElement("style"),ol.id="motion-view");let t="";for(const e in sl){const n=sl[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ol.textContent=t,document.head.appendChild(ol),sl={}},ll=()=>{ol&&ol.parentElement&&ol.parentElement.removeChild(ol)};function cl(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function ul(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const hl=["layout","enter","exit","new","old"],dl=t=>t.split(" ").every(t=>0===parseFloat(t)),pl={group:["layout"],new:["new","enter"],old:["old","exit"]},ml={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function fl(t){const{update:n,targets:i,resolveDefs:s,cropOverride:o,pairs:r,classNames:a,flatGroups:l,options:c}=t;if(!document.startViewTransition)return(async()=>(await n(),new Tn([])))();const u=new Map,h=[],d=[],p=[],m=new Set,f=new Map,g=new Set,y=new Map,v=new Map,x=new Map,w=new Map,T=t=>{i.forEach((e,n)=>{const i=a.get(n),c="root"!==n&&s.has(n)?l.has(n)?"none":"contain":void 0;let g;if("root"!==n&&s.has(n))if(r.has(n))if("old"===t)w.set(n,Ei(n)),g=nl(n,u,h,void 0,i,d,c,p,m),x.set(n,g);else{for(const t of w.get(n)??[])t.style?.removeProperty("view-transition-name"),u.delete(t);g=nl(r.get(n),u,h,x.get(n),i,d,c,p,m)}else g=nl(n,u,h,void 0,i,d,c,p,m);else g=[n];const T=o.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==T&&y.set(n,T);const o=v.get(n)??{};o[t]=[i,g.length],v.set(n,o)})})},S=(t,e)=>{const n=v.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},b=(t,e,n,i,s)=>{const o=gl(kn(c,n),kn(function(t,e){for(const n of pl[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[n,i]=S(t,"group"),s=b(f.get(t),"group","layout",-1===n?0:n,i);s.duration&&(s.duration=e.secondsToMilliseconds(s.duration));const{delay:o=0,duration:r,ease:a}=Ge(s);return{delay:e.secondsToMilliseconds(o),duration:r,ease:a}},A=new Map,M=t=>u.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of mi)o[t]=n[t];const r=A.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},A.set(e,r)}}),E=t=>{const e=A.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||rl(":root",{"view-transition-name":"none"}),rl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{rl(`::view-transition-group(${t})`,{overflow:"clip"}),rl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{rl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),al()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(h,d,p),ll()},k=async()=>{await n(),T("new"),M("new"),(()=>{g.clear();for(const t of v.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),V()};let C;try{T("old"),M("old"),V(),C=document.startViewTransition(k)}catch(t){return D(),Promise.reject(t)}return C.finished.finally(D),new Promise((t,n)=>{C.ready.then(()=>{const n=ul(),i=[],s=new Set,o=new Set;f.forEach((t,n)=>{const r=v.get(n),a=!!r?.new&&!r?.old,l=!!r?.old&&!r?.new;for(const r of hl){if(!t[r])continue;if("enter"===r&&!a)continue;if("exit"===r&&!l)continue;const u=il(r),[h,d]=S(n,u);if(-1===h)continue;const{keyframes:p,options:m}=t[r];for(let[f,g]of Object.entries(p)){if(null==g)continue;if("x"===f||"y"===f){e.warnOnce(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===r&&a&&null!=t.enter?.keyframes[f])continue;if("old"===r&&l&&null!=t.exit?.keyframes[f])continue;const p=gl(kn(c,f),kn(m,f));if(!Array.isArray(g)){const e="enter"===r?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===u?a:l),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?ml[u]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof p.delay&&(p.delay=p.delay(h,d)),p.duration&&(p.duration=e.secondsToMilliseconds(p.duration)),p.delay&&(p.delay=e.secondsToMilliseconds(p.delay)),i.push(new Ye({...p,element:document.documentElement,name:f,pseudoElement:`::view-transition-${u}(${n})`,keyframes:g})),s.add(`${n}:${u}`),"opacity"===f&&o.add(`${n}:${u}`)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=cl(r);if(!a)continue;const l=f.get(a.layer);if(s.has(`${a.layer}:${a.type}`)){o.has(`${a.layer}:new`)&&o.has(`${a.layer}:old`)&&n.getKeyframes().some(t=>t.mixBlendMode)?i.push(new bn(t)):t.cancel();continue}const c="old"===a.type?"new":"new"===a.type?"old":void 0;if(c&&s.has(`${a.layer}:${c}`)&&!o.has(`${a.layer}:${c}`)){t.cancel();continue}const u=v.get(a.layer),h=!("old"!==a.type&&"new"!==a.type||!u?.old||!u?.new);let d;if(a.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(a.layer);d={delay:t,duration:e,easing:$e(n,e)}}else{const t=h?"group":a.type,[n,i]=S(a.layer,t);let s=b(l,t,"group"===t?"layout":"",-1===n?0:n,i);const o=s.visualDuration;s.duration&&(s.duration=e.secondsToMilliseconds(s.duration)),s=Ge(s),d={delay:e.secondsToMilliseconds(s.delay??0),duration:h&&void 0!==o?e.secondsToMilliseconds(o):s.duration,easing:h?"linear":$e(s.ease,s.duration)}}n.updateTiming(d),i.push(new bn(t))}A.forEach((t,e)=>{if(!g.has(e))return;const{delay:n,duration:s,ease:o}=P(e);for(const r of mi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";dl(a)&&dl(l)||i.push(new Ye({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:n,duration:s,ease:o}))}}),t(new Tn(i))}).catch(()=>C.updateCallbackDone.then(()=>t(new Tn([])),n))})}function gl(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let yl=[],vl=null;function xl(){vl=null;const[t]=yl;var n;t&&(n=t,e.removeItem(yl,n),vl=n,fl(n).then(t=>(n.notifyReady(t),t.finished)).catch(t=>n.notifyReject(t)).finally(xl))}function wl(){for(let t=yl.length-1;t>=0;t--){const e=yl[t],{interrupt:n}=e.options;if("immediate"===n){const n=yl.slice(0,t+1).map(t=>t.update),i=yl.slice(t+1);e.update=()=>{n.forEach(t=>t())},yl=[e,...i];break}}vl&&"immediate"!==yl[0]?.options.interrupt||xl()}class Tl{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=e.noop,this.notifyReject=e.noop,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...n},this.readyPromise.catch(e.noop),i=this,yl.push(i),Ms.render(wl)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Sl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),bl=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Pl(t,e,n,i){Er(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Sl.has(n)?n:Fi(n),e.attrs[n])}function Al(t,e,n){const i=Vr(t,e,n);for(const n in t)if("children"!==n&&(Jn(t[n])||Jn(e[n]))){i[-1!==fe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Ml(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const El=[...mr].reverse(),Vl=t=>!0===t?.out?t:t?.out;function Dl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ml(e,t)}function kl(){const t={};for(const e of mr)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const Cl=fr.length;const Rl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Bl=lt,Ll=rt.reduce((t,e)=>(t[e]=t=>ct(t),t),{});t.AsyncMotionValueAnimation=wn,t.DOMKeyframesResolver=pi,t.DOMVisualElement=Mr,t.DocumentProjectionNode=lr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Eo,t.GroupAnimation=Tn,t.GroupAnimationWithThen=class extends Tn{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=ur,t.HTMLVisualElement=Dr,t.JSAnimation=Gt,t.KeyframeResolver=Re,t.LayoutAnimationBuilder=Ir,t.MotionValue=En,t.MotionValueState=Di,t.NativeAnimation=Ye,t.NativeAnimationExtended=_e,t.NativeAnimationWrapper=bn,t.NodeStack=xo,t.ObjectVisualElement=class extends Ar{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=oa,t.SVGVisualElement=class extends Mr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=co}getBaseTargetFromProps(t,e){return ge.has(e)?super.getBaseTargetFromProps(t,e)??de(e):t[e]}getDefaultValue(t){return ge.has(t)?this.latestValues[t]??de(t):void 0}readValueFromInstance(t,e){if(ge.has(e)){const t=ee(e);return t&&t.default||0}if($i.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Sl.has(e)?e:Fi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Al(t,e,n)}build(t,e,n){zi(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Pl(t,e,0,i)}mount(t){this.isSVGTag=bl(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=Tl,t.VisualElement=Ar,t.VisualElementDragControls=Ea,t.acceleratedValues=Qe,t.activeScope=bi,t.addAttrValue=Ki,t.addBuilderToScope=Ai,t.addDomEvent=ar,t.addEffect=function(t){vi(t),yi.unshift(t)},t.addPointerEvent=zr,t.addPointerInfo=$r,t.addSVGValue=Yi,t.addScaleCorrector=function(t){for(const e in t)Ds[e]=t[e],l(e)&&(Ds[e].isCSSVariable=!0)},t.addStyleValue=Bi,t.addToScope=Pi,t.addValueToWillChange=ti,t.alpha=m,t.analyseComplexValue=N,t.animateEffectSubject=wi,t.animateElement=function(t,e,n,i){if(bi.current?.track(t),i)return xi(t=>i.getValue(t,null),e,n,i);const s=Ts(t);return wi(s,t,e,n,new Ss(s,t))},t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Nr(t,e,n),r=new Ir(i,s,{...bi.current?.transition,...o});return Ai(r),r},t.animateMotionValue=Fn,t.animateSingleValue=Vs,t.animateTarget=oi,t.animateValue=function(t){return new Gt(t)},t.animateValues=xi,t.animateVariant=ri,t.animateView=function(t,e={}){const n=new Tl(t,e);return Ai(n),n},t.animateVisualElement=ai,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=cs,t.applyBoxDelta=us,t.applyGeneratorOptions=Ge,t.applyPointDelta=ls,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&fi.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=ps,t.arc=function(t={}){const n=function({strength:t=.5,peak:n=.5,direction:i,rotate:s=!1}={}){const o=!0===s?1:"number"==typeof s?s:0;let r;return(s,a)=>{const l=a.x-s.x,c=a.y-s.y;let u;u="cw"===i?-t:"ccw"===i?t:(Math.abs(l)>=Math.abs(c)?l:c)<0?-t:t;let h=Un(s.x,s.y,a.x,a.y,u,n);if(void 0===i){const t=Math.abs(l)<Math.abs(c),e=s.x+l*n,i=s.y+c*n,o=t?Math.sign(h.x-e):Math.sign(h.y-i);void 0!==r&&0!==o&&o!==r?(u=-u,h=Un(s.x,s.y,a.x,a.y,u,n)):0!==o&&(r=o)}const d=o?Nn(0,s.x,h.x,a.x,s.y,h.y,a.y):0,p=o?Nn(1,s.x,h.x,a.x,s.y,h.y,a.y):0,m=o?e.wrap(-180,180,p-d):0;return t=>{const n={x:In(t,s.x,h.x,a.x),y:In(t,s.y,h.y,a.y)};if(o){const i=Nn(t,s.x,h.x,a.x,s.y,h.y,a.y),r=d+m*t;n.rotate=e.wrap(-180,180,i-r)*o}return n}}}(t),i={interpolateProjection(t){const e=t.x.translate,i=t.y.translate;if(!(Math.sqrt(e*e+i*i)<20))return n({x:e,y:i},{x:0,y:0})},animateValues(t,e,i,s,o){if(!("x"in e)&&!("y"in e))return;const r=t("x"),a=t("y"),l=e.x,c=e.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=n({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...kn(i||{},"x")};delete g.path;const y=Vn(0);y.start(Fn("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete e.x,delete e.y}};return i},t.aspectRatio=yo,t.attachFollow=Ha,t.attachSpring=_a,t.attrEffect=Gi,t.axisDeltaEquals=vo,t.axisEquals=po,t.axisEqualsRounded=fo,t.bindToScope=Mi,t.boxEquals=mo,t.boxEqualsRounded=go,t.buildHTMLStyles=Ii,t.buildProjectionTransform=Po,t.buildSVGAttrs=zi,t.buildSVGPath=Wi,t.buildTransform=hn,t.buildTransformer=U,t.calcAxisDelta=Hs,t.calcBoxDelta=qs,t.calcChildStagger=An,t.calcGeneratorDuration=mt,t.calcLength=Ys,t.calcRelativeAxis=_s,t.calcRelativeAxisPosition=Js,t.calcRelativeBox=Zs,t.calcRelativePosition=Qs,t.camelCaseAttributes=Sl,t.camelToDash=Fi,t.cancelFrame=ct,t.cancelMicrotask=Es,t.cancelSync=Ll,t.checkVariantsDidChange=Dl,t.cleanDirtyNodes=No,t.collectMotionValues=Mn,t.color=R,t.compareByDepth=Mo,t.complex=$,t.containsCSSVariable=d,t.convertBoundingBoxToBox=Zi,t.convertBoxToBoundingBox=Ji,t.convertOffsetToTimes=Ct,t.copyAxisDeltaInto=Gs,t.copyAxisInto=zs,t.copyBoxInto=Ks,t.correctBorderRadius=To,t.correctBoxShadow=So,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ai(t,e,n))),n=kl(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&Gn(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&Vl(d(c??(g&&g.props.initial))?.transition);if(El.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:pr(d)||!1===d?d:void 0,x=pr(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||dr(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const S=Dl(s.prevProp,v);let b=S||x&&(w&&!T||i>f),P=!1;const A=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of A){const{transition:i,transitionEnd:s,...o}=Gn(t,n,Yn(t,e))||{};E={...E,...o,...s},M=Vl(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!Ml(n,i)||S:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){b=!0,r=p.get(e)||y,p.delete(e)&&(P=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),b&&(!T||!S||P))for(const n of A){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=Gn(a,n)?.transition?.delayChildren;i.delay=An(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||Jn(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=kl(),s=!0}}},t.createAxis=lo,t.createAxisDelta=ro,t.createBox=co,t.createDelta=ao,t.createEffect=ki,t.createGeneratorEasing=ft,t.createProjectionNode=jo,t.createRenderBatcher=at,t.cubicBezierAsString=Ue,t.defaultEasing=Rt,t.defaultOffset=kt,t.defaultTransformValue=de,t.defaultValueTypes=te,t.degrees=A,t.delay=Rs,t.delayInSeconds=function(t,n){return Rs(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=ci,t.distance=na,t.distance2D=ia,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=bi.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=Ei(t).map(t=>{i?.track(t);const[s,o]=function(t){const e=Cr.get(t)||hr.get(t)?.projection;if(e?.instance)return[e,()=>{}];const n=jr(t);return[n,()=>Cr.get(t)===n&&Or(t,n)]}(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Ea(s.options.visualElement,()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=Ra.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return Ra.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{Ra.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return Pi(()=>s.forEach(t=>t()))},t.eachAxis=Ao,t.elementDragControls=Ma,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Va(t)&&!!e},t.extractEventInfo=Wr,t.fillOffset=Dt,t.fillWildcards=se,t.findDimensionValueType=ui,t.findEffect=function(t){return yi.find(e=>e.test(t))},t.findValueType=t=>Za.find(li(t)),t.flushKeyframeResolvers=Ce,t.followValue=function(t,e){const n=Vn(Jn(t)?t.get():t);return Ha(n,t,e),n},t.frame=lt,t.frameData=n,t.frameSteps=ut,t.generateLinearEasing=dt,t.getAnimatableNone=ie,t.getAnimationMap=function(t){let e=Pn.get(t);return e||(e=new Map,Pn.set(t,e)),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Be(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=Ln,t.getDefaultValueType=ee,t.getFeatureDefinitions=function(){return Pr},t.getFinalKeyframe=Ot,t.getMixer=tt,t.getOptimisedAppearId=ni,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=on,t.getValueTransition=kn,t.getVariableValue=zn,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<Cl;t++){const i=fr[t],s=e.props[i];(pr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=cl,t.getViewAnimations=ul,t.globalProjectionState=Vo,t.handOffElementState=Ps,t.has2DTranslate=os,t.hasComplexValues=I,t.hasReducedMotionListener=wr,t.hasScale=es,t.hasTransform=is,t.hex=b,t.hover=function(t,e,n={}){e=Mi(e);const[i,s,o]=Ba(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||va())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=C,t.hslaToRgba=K,t.inertia=Et,t.initPrefersReducedMotion=Sr,t.interpolate=Vt,t.invisibleValues=Z,t.isAnimationControls=dr,t.isCSSVariableName=l,t.isCSSVariableToken=u,t.isControllingVariants=gr,t.isDeltaZero=ho,t.isDragActive=va,t.isDragging=ya,t.isElementKeyboardAccessible=ma,t.isElementTextInput=ga,t.isForcedMotionValue=ks,t.isGenerator=Ke,t.isHTMLElement=Ti,t.isKeyframesTarget=Hn,t.isMotionValue=Jn,t.isNear=Xs,t.isNodeOrChild=La,t.isPrimaryPointer=Ur,t.isSVGElement=Si,t.isSVGSVGElement=Bs,t.isSVGTag=bl,t.isTransitionDefined=On,t.isVariantLabel=pr,t.isVariantNode=yr,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ne()||!n||"string"==typeof n&&(n in We||Ne())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=Qn,t.keyframes=Bt,t.makeAnimationInstant=Je,t.mapEasingToNativeEasing=$e,t.mapValue=function(t,e,n,i){const s=$a(e,n,i);return qa(()=>s(t.get()))},t.maxGeneratorDuration=pt,t.measurePageBox=xs,t.measureViewportBox=vs,t.microtask=Ms,t.mix=ot,t.mixArray=et,t.mixColor=_,t.mixComplex=it,t.mixImmediate=G,t.mixLinearColor=X,t.mixNumber=Y,t.mixObject=nt,t.mixValues=Is,t.mixVisibility=J,t.motionValue=Vn,t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Rl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.number=p,t.numberValueTypes=Qt,t.optimizedAppearDataAttribute=ei,t.optimizedAppearDataId="framerAppearId",t.originProps=Ci,t.parseAnimateLayoutArgs=Nr,t.parseCSSVariable=$n,t.parseValueFromTransform=pe,t.percent=M,t.pixelsToPercent=wo,t.positionalKeys=Xn,t.prefersReducedMotion=xr,t.press=function(t,e,n={}){e=Mi(e);const[i,s,o]=Ba(t,n),r=t=>{const i=t.currentTarget;if(!Ia(t))return;if(Na.has(t))return;ja.add(i),n.stopPropagation&&Na.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),ja.has(i)&&ja.delete(i),Ia(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||La(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Ti(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Oa(()=>{ja.has(t)||(n=!0,Fa(t,"down"))}),s=Oa(()=>{n&&(n=!1,Fa(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Fa(t,"cancel")},{...e,once:!0})})(t,s),s),ma(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=o.now())=>{if(n.isProcessing)return;const i=t-n.timestamp;n.delta=e.MotionGlobalConfig.useManualTiming?i:Math.max(Math.min(i,40),1),o.set(n.timestamp=t),n.isProcessing=!0;for(const t in ut)ut[t].process(n);n.isProcessing=!1},t.progressPercentage=k,t.propEffect=As,t.propagateDirtyNodes=Io,t.px=E,t.readSVGValue=Xi,t.readStyleValue=Li,t.readTransformValue=me,t.recordStats=function(){if(Cs.value)throw Cs.value=null,Cs.addProjectionMetrics=null,new Error("Stats are already being measured");const t=Cs;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.releaseElement=bs,t.removeAxisDelta=eo,t.removeAxisTransforms=no,t.removeBoxTransforms=oo,t.removeEffect=vi,t.removePointDelta=to,t.renderHTML=Er,t.renderSVG=Pl,t.resize=ea,t.resolveElements=Ei,t.resolveMotionValue=Ls,t.resolveTransition=Dn,t.resolveVariant=Gn,t.resolveVariantFromProps=Kn,t.rgbUnit=w,t.rgba=T,t.rootProjectionNode=cr,t.round=Kt,t.sampleDelta=qe,t.scale=f,t.scaleCorrectors=Ds,t.scalePoint=as,t.scopeMotion=function(...t){const n="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:Ei(n)[0],transition:o,add:t=>(c.push(t),()=>e.removeItem(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{bs(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=bi.current;bi.current=t;try{return e()}finally{bi.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Wa(t[e]));n.addEventListener("change",m),a.push([e,n])}}return Pi(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=Vr,t.scrapeSVGMotionValuesFromProps=Al,t.setDragLock=xa,t.setFeatureDefinitions=function(t){Pr=t},t.setStyle=Le,t.setTarget=Zn,t.spring=Mt,t.springValue=function(t,e){const n=Vn(Jn(t)?t.get():t);return _a(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s,grid:o}={}){const r={};return(a,l)=>{let c=r[l];if(!c){const[t,e]=o||[1/0,1],n=Math.min(t,l)-1,s=Math.max(e,Math.ceil(l/t))-1,a="number"==typeof i,u="first"===i?0:"last"===i?1:.5,h=a?i%t:n*u,d=a?Math.floor(i/t):s*u;c=r[l]=[];for(let e=0;e<l;e++){const o=e%t,r=Math.floor(e/t),a=Math.min(o,n-o),l=Math.min(r,s-r);if("random"===i){const t=Math.random()*(e+1)|0;c[e]=c[t],c[t]=e}else c[e]="edges"===i?Math.min(n?a:l,s?l:a):Math.hypot(o-h,r-d)}c.push(o?Math.max(...c):l)}let u=t*c[a];const h=t*c[l];if(s&&h){u=e.easingDefinitionToFunction(s)(u/h)*h}return n+u}},t.startWaapiAnimation=ze,t.statsBuffer=Cs,t.styleEffect=Oi,t.styleSubjectEffect=ji,t.supportedWaapiEasing=We,t.supportsBrowserAnimation=sn,t.supportsFlags=je,t.supportsLinearEasing=Ne,t.supportsPartialKeyframes=gi,t.supportsScrollTimeline=Fe,t.supportsViewTimeline=Ie,t.supportsWaapi=nn,t.svgEffect=qi,t.svgSubjectEffect=Hi,t.sync=Bl,t.testValueType=li,t.time=o,t.toMediaQuery=Wa,t.transform=$a,t.transformAxis=fs,t.transformBox=ys,t.transformBoxPoints=Qi,t.transformPropOrder=fe,t.transformProps=ge,t.transformValue=qa,t.transformValueTypes=Jt,t.translateAxis=ms,t.updateMotionValuesFromProps=vr,t.variantPriorityOrder=mr,t.variantProps=fr,t.vh=V,t.visualElementStore=hr,t.vw=D});
|