motion 12.6.3-alpha.0 → 12.6.3
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/debug.js +12 -12
- package/dist/cjs/index.js +402 -352
- package/dist/cjs/mini.js +339 -352
- package/dist/cjs/react-client.js +169 -181
- package/dist/cjs/react-m.js +18 -22
- package/dist/cjs/react-mini.js +275 -336
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +2 -2
- package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +7 -4
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +8 -6
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +10 -8
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +2 -2
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
- package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +11 -1
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +3 -3
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +1 -2
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +1 -2
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +2 -4
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/start.mjs +4 -6
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +3 -3
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +1 -2
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/index.mjs +2 -2
- package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +5 -10
- package/dist/es/framer-motion/dist/es/motion/features/animation/index.mjs +1 -2
- package/dist/es/framer-motion/dist/es/motion/index.mjs +2 -3
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +3 -5
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +19 -27
- package/dist/es/framer-motion/dist/es/projection/styles/transform.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +3 -4
- package/dist/es/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +1 -2
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +5 -6
- package/dist/es/framer-motion/dist/es/render/dom/scroll/track.mjs +1 -2
- package/dist/es/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/dom/utils/filter-props.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +1 -2
- package/dist/es/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +2 -3
- package/dist/es/framer-motion/dist/es/render/utils/animation-state.mjs +3 -5
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/utils/resolve-variants.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/mix/complex.mjs +1 -2
- package/dist/es/framer-motion/dist/es/value/types/complex/index.mjs +2 -3
- package/dist/es/framer-motion/dist/es/value/use-scroll.mjs +2 -2
- package/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -7
- package/dist/es/motion/lib/react.mjs +0 -1
- package/dist/es/motion-dom/dist/es/animation/{controls/BaseGroup.mjs → GroupAnimation.mjs} +4 -5
- package/dist/es/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +9 -0
- package/dist/es/motion-dom/dist/es/animation/NativeAnimation.mjs +161 -0
- package/dist/es/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +1 -1
- package/dist/es/motion-dom/dist/es/animation/keyframes/get-final.mjs +12 -0
- package/dist/es/motion-dom/dist/es/animation/keyframes/hydrate.mjs +26 -0
- package/dist/es/motion-dom/dist/es/animation/utils/get-value-transition.mjs +3 -5
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +3 -0
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +14 -0
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +26 -0
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/supported.mjs +15 -0
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/index.mjs → motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs} +8 -6
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs → motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs} +2 -2
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +14 -0
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs +1 -4
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +39 -0
- package/dist/es/motion-dom/dist/es/gestures/press/index.mjs +1 -1
- package/dist/es/motion-dom/dist/es/render/dom/style.mjs +15 -0
- package/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs +2 -7
- package/dist/es/motion-dom/dist/es/utils/supports/flags.mjs +1 -3
- package/dist/es/motion-dom/dist/es/utils/supports/memo.mjs +1 -1
- package/dist/es/motion-dom/dist/es/value/index.mjs +1 -1
- package/dist/es/motion-utils/dist/es/errors.mjs +2 -4
- package/dist/motion.dev.js +402 -352
- package/dist/motion.js +1 -1
- package/package.json +3 -3
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +0 -116
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -8
- package/dist/es/motion-dom/dist/es/animation/controls/Group.mjs +0 -13
- package/dist/es/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +0 -85
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -44
package/dist/motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const n=t=>t;let s=n;const i={skipAnimations:!1,useManualTiming:!1};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r(()=>void 0!==window.ScrollTimeline);class d extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,e){const n=this.animations.map(n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function p(t,e){return t?t[e]||t.default||t:void 0}function f(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function m(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(f(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:u(i)}}function g(t){return"function"==typeof t}function v(t,e){t.timeline=e,t.onfinish=null}const y=t=>Array.isArray(t)&&"number"==typeof t[0],w={linearEasing:void 0};function b(t,e){const n=r(t);return()=>{var t;return null!==(t=w[e])&&void 0!==t?t:n()}}const T=b(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),x=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=t(o(0,i-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function S(t){return Boolean("function"==typeof t&&T()||!t||"string"==typeof t&&(t in A||T())||y(t)||Array.isArray(t)&&t.every(S))}const M=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,A={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M([0,.65,.55,1]),circOut:M([.55,0,1,.45]),backIn:M([.31,.01,.66,-.59]),backOut:M([.33,1.53,.69,.99])};const V=["read","resolveKeyframes","update","preRender","render","postRender"],k={value:null,addProjectionMetrics:null};function P(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=V.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,r=!1)=>{const a=r&&i?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[n,s]=[s,n],n.forEach(u),e&&k.value&&k.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(r,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:V.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<V.length;e++)o[V[e]].cancel(t)},state:i,steps:o}}const{schedule:E,cancel:C,state:F,steps:O}=P("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:n,!0);let B;function I(){B=void 0}const L={now:()=>(void 0===B&&L.set(F.isProcessing||i.useManualTiming?F.timestamp:performance.now()),B),set:t=>{B=t,queueMicrotask(I)}},R=!1,D=!1;function W(){return R||D}function N(t,e,n){var s;if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function K(t,e){const n=N(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function j(t){return!("touch"===t.pointerType||W())}const z=(t,e)=>!!e&&(t===e||z(t,e.parentElement)),U=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Y=new WeakSet;function $(t){return e=>{"Enter"===e.key&&t(e)}}function X(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function H(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!W()}class q{constructor(t,e={}){this.version="12.6.3-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=L.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=L.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,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),E.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}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&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=L.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function G(t,e){return new q(t,e)}const Z=(t,e,n)=>n>e?e:n<t?t:n;function _(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const J=100,Q=10,tt=1,et=0,nt=800,st=.3,it=.3,rt={granular:.01,default:2},ot={granular:.005,default:.5},at=.01,lt=10,ut=.05,ct=1;function ht({duration:t=nt,bounce:e=st,velocity:n=et,mass:s=tt}){let i,r,o=1-e;o=Z(ut,ct,o),t=Z(at,lt,u(t)),o<1?(i=e=>{const s=e*o,i=s*t;return.001-(s-n)/dt(e,o)*Math.exp(-i)},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=dt(Math.pow(e,2),o);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,r,5/t);if(t=l(t),isNaN(a))return{stiffness:J,damping:Q,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function dt(t,e){return t*Math.sqrt(1-e*e)}const pt=["duration","bounce"],ft=["stiffness","damping","mass"];function mt(t,e){return e.some(e=>void 0!==t[e])}function gt(t=it,e=st){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:h,mass:d,duration:p,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:et,stiffness:J,damping:Q,mass:tt,isResolvedFromDuration:!1,...t};if(!mt(t,ft)&&mt(t,pt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*Z(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:tt,stiffness:i,damping:r}}else{const n=ht(t);e={...e,...n,mass:tt},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),v=m||0,y=h/(2*Math.sqrt(c*d)),w=o-r,b=u(Math.sqrt(c/d)),T=Math.abs(w)<5;let S;if(s||(s=T?rt.granular:rt.default),i||(i=T?ot.granular:ot.default),y<1){const t=dt(b,y);S=e=>{const n=Math.exp(-y*b*e);return o-n*((v+y*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===y)S=t=>o-Math.exp(-b*t)*(w+(v+b*w)*t);else{const t=b*Math.sqrt(y*y-1);S=e=>{const n=Math.exp(-y*b*e),s=Math.min(t*e,300);return o-n*((v+y*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const M={calculatedDuration:g&&p||null,next:t=>{const e=S(t);if(g)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(v):_(S,t,e));const r=Math.abs(n)<=s,u=Math.abs(o-e)<=i;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(f(M),2e4),e=x(e=>M.next(t*e).value,t,30);return t+"ms "+e}};return M}const vt=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},yt=t=>Array.isArray(t)&&"number"!=typeof t[0];function wt(t,e){return yt(t)?t[vt(0,t.length,e)]:t}const bt=(t,e,n)=>t+(e-t)*n;function Tt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=o(0,e,s);t.push(bt(n,1,i))}}function xt(t){const e=[0];return Tt(e,t.length-1),e}const St=t=>Boolean(t&&t.getVelocity);function Mt(t){return"object"==typeof t&&!Array.isArray(t)}function At(t,e,n,s){return"string"==typeof t&&Mt(e)?N(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Vt(t,e,n){return t*(e+1)}function kt(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function Pt(t,n,s,i,r,o){!function(t,n,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>n&&r.at<s&&(e(t,r),i--)}}(t,r,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:bt(r,o,i[e]),easing:wt(s,e)})}function Et(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Ct(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ft(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ot(t,e){return e[t]||(e[t]=[]),e[t]}function Bt(t){return Array.isArray(t)?t:[t]}function It(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Lt=t=>"number"==typeof t,Rt=t=>t.every(Lt),Dt=new WeakMap,Wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(Wt),Kt=new Set(["width","height","top","left","right","bottom",...Wt]),jt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function zt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ut(t,e,n,s){if("function"==typeof e){const[i,r]=zt(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=zt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Yt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,G(n))}function $t(t,e){const n=function(t,e,n){const s=t.getProps();return Ut(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Yt(t,e,jt(r[e]))}}function Xt(t,e){const n=t.getValue("willChange");if(s=n,Boolean(St(s)&&s.add))return n.add(e);if(!n&&i.WillChange){const n=new i.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const Ht=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),qt="data-"+Ht("framerAppearId");function Gt(t){return t.props[qt]}const Zt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function _t(t,e,s,i){if(t===e&&s===i)return n;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=Zt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:Zt(r(t),e,i)}const Jt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qt=t=>e=>1-t(1-e),te=_t(.33,1.53,.69,.99),ee=Qt(te),ne=Jt(ee),se=t=>(t*=2)<1?.5*ee(t):.5*(2-Math.pow(2,-10*(t-1))),ie=t=>1-Math.sin(Math.acos(t)),re=Qt(ie),oe=Jt(ie),ae=t=>/^0[^.\s]+$/u.test(t);const le={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ue={...le,transform:t=>Z(0,1,t)},ce={...le,default:1},he=t=>Math.round(1e5*t)/1e5,de=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const pe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fe=(t,e)=>n=>Boolean("string"==typeof n&&pe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),me=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(de);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ge={...le,transform:t=>Math.round((t=>Z(0,255,t))(t))},ve={test:fe("rgb","red"),parse:me("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ge.transform(t)+", "+ge.transform(e)+", "+ge.transform(n)+", "+he(ue.transform(s))+")"};const ye={test:fe("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:ve.transform},we=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),be=we("deg"),Te=we("%"),xe=we("px"),Se=we("vh"),Me=we("vw"),Ae={...Te,parse:t=>Te.parse(t)/100,transform:t=>Te.transform(100*t)},Ve={test:fe("hsl","hue"),parse:me("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Te.transform(he(e))+", "+Te.transform(he(n))+", "+he(ue.transform(s))+")"},ke={test:t=>ve.test(t)||ye.test(t)||Ve.test(t),parse:t=>ve.test(t)?ve.parse(t):Ve.test(t)?Ve.parse(t):ye.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ve.transform(t):Ve.transform(t)},Pe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Ee=/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+)/giu;function Ce(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Ee,t=>(ke.test(t)?(s.color.push(r),i.push("color"),n.push(ke.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function Fe(t){return Ce(t).values}function Oe(t){const{split:e,types:n}=Ce(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+="number"===e?he(t[r]):"color"===e?ke.transform(t[r]):t[r]}return i}}const Be=t=>"number"==typeof t?0:t;const Ie={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(de))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Pe))||void 0===n?void 0:n.length)||0)>0},parse:Fe,createTransformer:Oe,getAnimatableNone:function(t){const e=Fe(t);return Oe(t)(e.map(Be))}},Le=new Set(["brightness","contrast","saturate","opacity"]);function Re(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(de)||[];if(!s)return t;const i=n.replace(s,"");let r=Le.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const De=/\b([a-z-]*)\(.*?\)/gu,We={...Ie,getAnimatableNone:t=>{const e=t.match(De);return e?e.map(Re).join(" "):t}},Ne={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,backgroundPositionX:xe,backgroundPositionY:xe},Ke={rotate:be,rotateX:be,rotateY:be,rotateZ:be,scale:ce,scaleX:ce,scaleY:ce,scaleZ:ce,skew:be,skewX:be,skewY:be,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:ue,originX:Ae,originY:Ae,originZ:xe},je={...le,transform:Math.round},ze={...Ne,...Ke,zIndex:je,size:xe,fillOpacity:ue,strokeOpacity:ue,numOctaves:je},Ue={...ze,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:We,WebkitFilter:We},Ye=t=>Ue[t];function $e(t,e){let n=Ye(t);return n!==We&&(n=Ie),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Xe=new Set(["auto","none","0"]);const He=t=>180*t/Math.PI,qe=t=>{const e=He(Math.atan2(t[1],t[0]));return Ze(e)},Ge={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:qe,rotateZ:qe,skewX:t=>He(Math.atan(t[1])),skewY:t=>He(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ze=t=>((t%=360)<0&&(t+=360),t),_e=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Je=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Qe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_e,scaleY:Je,scale:t=>(_e(t)+Je(t))/2,rotateX:t=>Ze(He(Math.atan2(t[6],t[5]))),rotateY:t=>Ze(He(Math.atan2(-t[2],t[0]))),rotateZ:qe,rotate:qe,skewX:t=>He(Math.atan(t[4])),skewY:t=>He(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tn(t){return t.includes("scale")?1:0}function en(t,e){if(!t||"none"===t)return tn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Qe,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ge,i=e}if(!i)return tn(e);const r=s[e],o=i[1].split(",").map(nn);return"function"==typeof r?r(o):o[r]}function nn(t){return parseFloat(t.trim())}const sn=t=>t===le||t===xe,rn=new Set(["x","y","z"]),on=Wt.filter(t=>!rn.has(t));const an={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>en(e,"x"),y:(t,{transform:e})=>en(e,"y")};an.translateX=an.x,an.translateY=an.y;const ln=new Set;let un=!1,cn=!1;function hn(){if(cn){const t=Array.from(ln).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return on.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}cn=!1,un=!1,ln.forEach(t=>t.complete()),ln.clear()}function dn(){ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(cn=!0)})}class pn{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ln.add(this),un||(un=!0,E.read(dn),E.resolveKeyframes(hn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ln.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ln.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const fn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),mn=t=>e=>"string"==typeof e&&e.startsWith(t),gn=mn("--"),vn=mn("var(--"),yn=t=>!!vn(t)&&wn.test(t.split("/*")[0].trim()),wn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tn(t,e,n=1){const[s,i]=function(t){const e=bn.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return fn(t)?parseFloat(t):t}return yn(i)?Tn(i,e,n+1):i}const xn=t=>e=>e.test(t),Sn=[le,xe,Te,be,Me,Se,{test:t=>"auto"===t,parse:t=>t}],Mn=t=>Sn.find(xn(t));class An extends pn{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),yn(s))){const i=Tn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Kt.has(n)||2!==t.length)return;const[s,i]=t,r=Mn(s),o=Mn(i);if(r!==o)if(sn(r)&&sn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||ae(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Xe.has(e)&&Ce(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=$e(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=an[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=an[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Vn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ie.test(t)&&"0"!==t||t.startsWith("url(")));function kn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=Vn(i,e),a=Vn(r,e);return!(!o||!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||g(n))&&s)}const Pn=t=>null!==t;function En(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Pn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class Cn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=L.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(dn(),hn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=L.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!kn(t,n,s,i)){if(!r)return a&&a(En(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Fn(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 On(t,e){return n=>n>0?e:t}const Bn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},In=[ye,ve,Ve];function Ln(t){const e=(n=t,In.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ve&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Fn(a,s,t+1/3),r=Fn(a,s,t),o=Fn(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(s)),s}const Rn=(t,e)=>{const n=Ln(t),s=Ln(e);if(!n||!s)return On(t,e);const i={...n};return t=>(i.red=Bn(n.red,s.red,t),i.green=Bn(n.green,s.green,t),i.blue=Bn(n.blue,s.blue,t),i.alpha=bt(n.alpha,s.alpha,t),ve.transform(i))},Dn=(t,e)=>n=>e(t(n)),Wn=(...t)=>t.reduce(Dn),Nn=new Set(["none","hidden"]);function Kn(t,e){return n=>bt(t,e,n)}function jn(t){return"number"==typeof t?Kn:"string"==typeof t?yn(t)?On:ke.test(t)?Rn:Yn:Array.isArray(t)?zn:"object"==typeof t?ke.test(t)?Rn:Un:On}function zn(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>jn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function Un(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=jn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Yn=(t,e)=>{const n=Ie.createTransformer(e),s=Ce(t),i=Ce(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Nn.has(t)&&!i.values.length||Nn.has(e)&&!s.values.length?function(t,e){return Nn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Wn(zn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):On(t,e)};function $n(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return bt(t,e,n);return jn(t)(t,e)}function Xn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){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 f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=gt({keyframes:[d.value,p(d.value)],velocity:_(y,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const Hn=_t(.42,0,1,1),qn=_t(0,0,.58,1),Gn=_t(.42,0,.58,1),Zn={linear:n,easeIn:Hn,easeInOut:Gn,easeOut:qn,circIn:ie,circInOut:oe,circOut:re,backIn:ee,backInOut:ne,backOut:te,anticipate:se},_n=t=>{if(y(t)){s(4===t.length);const[e,n,i,r]=t;return _t(e,n,i,r)}return"string"==typeof t?Zn[t]:t};function Jn(t,e,{clamp:i=!0,ease:r,mixer:a}={}){const l=t.length;if(s(l===e.length),1===l)return()=>e[0];if(2===l&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,s){const i=[],r=s||$n,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||n:e;o=Wn(t,o)}i.push(o)}return i}(e,r,a),h=c.length,d=n=>{if(u&&n<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const i=o(t[s],t[s+1],n);return c[s](i)};return i?e=>d(Z(t[0],t[l-1],e)):d}function Qn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=yt(s)?s.map(_n):_n(s),r={done:!1,value:e[0]},o=Jn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:xt(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Gn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const ts=t=>{const e=({timestamp:e})=>t(e);return{start:()=>E.update(e,!0),stop:()=>C(e),now:()=>F.isProcessing?F.timestamp:L.now()}},es={decay:Xn,inertia:Xn,tween:Qn,keyframes:Qn,spring:gt},ns=t=>t/100;class ss extends Cn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||pn;this.resolver=new r(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=g(e)?e:es[e]||Qn;let a,l;o!==Qn&&"number"!=typeof t[0]&&(a=Wn(ns,$n(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=f(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=r)),y=Z(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=En(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ts,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const is=new Set(["opacity","clipPath","filter","transform"]);function rs(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&T()?x(e,n):y(e)?M(e):Array.isArray(e)?e.map(e=>t(e,n)||A.easeOut):A[e]:void 0}(a,i);Array.isArray(c)&&(u.easing=c);return t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const os=r(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const as={anticipate:se,backInOut:ne,circInOut:oe};class ls extends Cn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new An(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&T()&&i in as&&(i=as[i]),g((u=this.options).type)||"spring"===u.type||!S(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ss({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=rs(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(v(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(En(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return n;const{animation:s}=e;v(s,t)}else this.pendingTimeline=t;return n}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new ss({...c,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return os()&&n&&is.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const us={type:"spring",stiffness:500,damping:25,restSpeed:10},cs={type:"keyframes",duration:.8},hs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ds=(t,{keyframes:e})=>e.length>2?cs:Nt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:us:hs;const ps=(t,e,n,s={},i,r)=>o=>{const a=p(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(h={...h,...ds(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let f=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(f=!0)),h.allowFlatten=!a.type&&!a.ease,f&&!r&&void 0!==e.get()){const t=En(h.keyframes,a);if(void 0!==t)return E.update(()=>{h.onUpdate(t),h.onComplete()}),new d([])}return!r&&ls.supports(h)?new ls(h):new ss(h)};function fs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function ms(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||c&&fs(c,e))continue;const a={delay:n,...p(o||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Gt(t);if(n){const t=window.MotionHandoffAnimation(n,e,E);null!==t&&(a.startTime=t,h=!0)}}Xt(t,e),s.start(ps(e,s,i,t.shouldReduceMotion&&Kt.has(e)?{type:!1}:a,t,h));const d=s.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{E.update(()=>{a&&$t(t,a)})}),u}const gs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),vs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ys={};for(const t in vs)ys[t]={isEnabled:e=>vs[t].some(t=>!!e[t])};const ws="undefined"!=typeof window,bs={current:null},Ts={current:!1};const xs=[...Sn,ke,Ie];const Ss=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ms(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Ss.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const As=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vs{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=L.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,E.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Ms(e),this.isVariantNode=function(t){return Boolean(Ms(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&St(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Dt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ts.current||function(){if(Ts.current=!0,ws)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>bs.current=t.matches;t.addListener(e),e()}else bs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||bs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),C(this.notifyUpdate),C(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Nt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ys){const e=ys[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(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){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<As.length;e++){const n=As[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const i=e[s],r=n[s];if(St(i))t.addValue(s,i);else if(St(r))t.addValue(s,G(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,G(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=G(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(fn(s)||ae(s))?s=parseFloat(s):(i=s,!xs.find(xn(i))&&Ie.test(e)&&(s=$e(t,e))),this.setBaseTarget(t,St(s)?s.get():s)),St(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=Ut(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||St(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class ks extends Vs{constructor(){super(...arguments),this.KeyframeResolver=An}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[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;St(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const Ps=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Es={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cs=Wt.length;function Fs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Nt.has(t))o=!0;else if(gn(t))i[t]=n;else{const e=Ps(n,ze[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<Cs;r++){const o=Wt[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Ps(a,ze[o]);if(!l){i=!1;s+=`${Es[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}const Os={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bs={offset:"strokeDashoffset",array:"strokeDasharray"};function Is(t,e,n){return"string"==typeof t?t:xe.transform(e+n*t)}function Ls(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Fs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Is(e,t.x,t.width)} ${Is(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Os:Bs;t[r.offset]=xe.transform(-s);const o=xe.transform(e),a=xe.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Rs=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"]);function Ds(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Ws={};function Ns(t,{layout:e,layoutId:n}){return Nt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ws[t]||"opacity"===t)}function Ks(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(St(i[o])||e.style&&St(e.style[o])||Ns(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class js extends ks{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gs,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Nt.has(e)){const t=Ye(e);return t&&t.default||0}return e=Rs.has(e)?e:Ht(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Ks(t,e,n);for(const n in t)if(St(t[n])||St(e[n])){s[-1!==Wt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&E.postRender(this.updateDimensions)}build(t,e,n){Ls(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Ds(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Rs.has(n)?n:Ht(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class zs extends ks{constructor(){super(...arguments),this.type="html",this.renderInstance=Ds}readValueFromInstance(t,e){if(Nt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return en(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(gn(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Fs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ks(t,e,n)}}class Us extends Vs{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}}function Ys(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new js(e):new zs(e);n.mount(t),Dt.set(t,n)}function $s(t){const e=new Us({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Dt.set(t,e)}function Xs(t,e,n,s){const i=[];if(function(t,e){return St(t)||"number"==typeof t||"string"==typeof t&&!Mt(e)}(t,e))i.push(function(t,e,n){const s=St(t)?t:G(t);return s.start(ps("",s,e,n)),s.animation}(t,Mt(e)&&e.default||e,n&&n.default||n));else{const r=At(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Ys:$s;Dt.has(s)||a(s);const l=Dt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...ms(l,{...e,transition:u},{}))}}return i}function Hs(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,kt(p,o.at,d,h));continue}let[a,v,y={}]=o;void 0!==y.at&&(p=kt(p,y.at,d,h));let w=0;const b=(t,n,s,o=0,a=0)=>{const u=Bt(t),{delay:c=0,times:h=xt(u),type:d="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const M="function"==typeof c?c(o,a):c,A=u.length,V=g(d)?d:null==i?void 0:i[d];if(A<=2&&V){let t=100;if(2===A&&Rt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=l(S));const n=m(e,t,V);x=n.ease,S=n.duration}null!=S||(S=r);const k=p+M;1===h.length&&0===h[0]&&(h[1]=1);const P=h.length-u.length;if(P>0&&Tt(h,P),1===u.length&&u.unshift(null),v){S=Vt(S,v);const t=[...u],e=[...h];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)h.push(e[i]+(s+1)),x.push(0===i?"linear":wt(n,i-1))}Et(h,v)}const E=k+S;Pt(s,u,x,h,k,E),w=Math.max(M+S,w),f=Math.max(E,f)};if(St(a)){b(v,y,Ot("default",Ft(a,u)))}else{const t=At(a,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=Ft(t[n],u);for(const t in v)b(v[t],It(y,t),Ot(t,s),n,e)}}d=p,p+=w}return u.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Ct);const l=[],u=[],c=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[i]=l,h.transition[i]={...e,duration:f,ease:c,times:u,...n}}}),a}(t,e,n,{spring:gt}).forEach(({keyframes:t,transition:e},n)=>{s.push(...Xs(n,t,e))}),s}function qs(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Hs(e,n,t):Xs(e,n,s,t);const o=new d(i);return t&&t.animations.push(o),o}}const Gs=qs();function Zs(t,e,n){t.style.setProperty(e,n)}function _s(t,e,n){t.style[e]=n}const Js=r(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Qs=new WeakMap;function ti(t){const e=Qs.get(t)||new Map;return Qs.set(t,e),Qs.get(t)}class ei extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return u(Number(s))}get time(){var t;return this.animation?u((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=l(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t,e;this.animation&&(null===(t=this.options)||void 0===t?void 0:t.allowFlatten)&&(null===(e=this.animation.effect)||void 0===e||e.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&v(this.animation,t),n}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const r=e.startsWith("--");s("string"!=typeof i.type);const o=ti(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&Ne[t]&&(e[s]=Ne[t].transform(e[s]));!Js()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),g(i.type)){const t=m(i,100,i.type);i.ease=T()?t.ease:"easeOut",i.duration=l(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const a=()=>{this.setValue(t,e,En(n,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=r?Zs:_s,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Qs.get(t);n&&n.delete(e)}};os()?(super(rs(t,e,n,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=a,ti(t).set(e,this)):(super(),u(),a())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const ni=(t=>function(e,n,s){return new d(function(t,e,n,s){const i=N(t,s),r=i.length,o=[];for(let t=0;t<r;t++){const s=i[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,r));for(const t in e){const n=e[t],i={...p(a,t)};i.duration=i.duration?l(i.duration):i.duration,i.delay=l(i.delay||0),i.allowFlatten=!a.type&&!a.ease,o.push(new ei(s,t,n,i))}}return o}(e,n,s,t))})();function si(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return E.update(s,!0),()=>C(s)}const ii=new WeakMap;let ri;function oi({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=ii.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function ai(t){t.forEach(oi)}function li(t,e){ri||"undefined"!=typeof ResizeObserver&&(ri=new ResizeObserver(ai));const n=N(t);return n.forEach(t=>{let n=ii.get(t);n||(n=new Set,ii.set(t,n)),n.add(e),null==ri||ri.observe(t)}),()=>{n.forEach(t=>{const n=ii.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ri||ri.unobserve(t)})}}const ui=new Set;let ci;function hi(t){return ui.add(t),ci||(ci=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ui.forEach(t=>t(e))},window.addEventListener("resize",ci)),()=>{ui.delete(t),!ui.size&&ci&&(ci=void 0)}}const di={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function pi(t,e,n,s){const i=n[e],{length:r,position:a}=di[e],l=i.current,u=n.time;i.current=t["scroll"+a],i.scrollLength=t["scroll"+r]-t["client"+r],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=o(0,i.scrollLength,i.current);const h=s-u;i.velocity=h>50?0:c(i.current-l,h)}const fi={start:0,center:.5,end:1};function mi(t,e,n=0){let s=0;if(t in fi&&(t=fi[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const gi=[0,0];function vi(t,e,n,s){let i=Array.isArray(t)?t:gi,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,fi[t]?t:"0"]),r=mi(i[0],n,s),o=mi(i[1],e),r-o}const yi={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},wi={x:0,y:0};function bi(t,e,n){const{offset:s=yi.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):wi,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=vi(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=Jn(e[r].offset,xt(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=Z(0,1,e[r].interpolate(e[r].current))}function Ti(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){pi(t,"x",e,n),pi(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&bi(t,n,s)},notify:()=>e(n)}}const xi=new WeakMap,Si=new WeakMap,Mi=new WeakMap,Ai=t=>t===document.documentElement?window:t;function Vi(t,{container:e=document.documentElement,...n}={}){let s=Mi.get(e);s||(s=new Set,Mi.set(e,s));const i=Ti(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!xi.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(F.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{E.read(t,!1,!0),E.read(n,!1,!0),E.update(i,!1,!0)};xi.set(e,a);const l=Ai(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Si.set(e,(o=a,"function"==typeof(r=e)?hi(r):li(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=xi.get(e);return E.read(a,!1,!0),()=>{var t;C(a);const n=Mi.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=xi.get(e);xi.delete(e),s&&(Ai(e).removeEventListener("scroll",s),null===(t=Si.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const ki=new Map;function Pi({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),ki.has(e)||ki.set(e,{});const s=ki.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=Vi(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function Ei(t){return t&&(t.target||t.offset)}const Ci={some:0,all:1};const Fi=(t,e)=>Math.abs(t-e);t.MotionValue=q,t.animate=Gs,t.animateMini=ni,t.anticipate=se,t.backIn=ee,t.backInOut=ne,t.backOut=te,t.cancelFrame=C,t.circIn=ie,t.circInOut=oe,t.circOut=re,t.clamp=Z,t.createScopedAnimate=qs,t.cubicBezier=_t,t.delay=function(t,e){return function(t,e){const n=L.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(C(s),t(r-e))};return E.read(s,!0),()=>C(s)}(t,l(e))},t.distance=Fi,t.distance2D=function(t,e){const n=Fi(t.x,e.x),s=Fi(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Hn,t.easeInOut=Gn,t.easeOut=qn,t.frame=E,t.frameData=F,t.hover=function(t,e,n={}){const[s,i,r]=K(t,n),o=t=>{if(!j(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{j(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=N(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:Ci[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Xn,t.interpolate=Jn,t.invariant=s,t.isDragActive=W,t.keyframes=Qn,t.mirrorEasing=Jt,t.mix=$n,t.motionValue=G,t.noop=n,t.pipe=Wn,t.press=function(t,e,n={}){const[s,i,r]=K(t,n),o=t=>{const s=t.currentTarget;if(!H(t)||Y.has(s))return;Y.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),H(t)&&Y.has(s)&&(Y.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||z(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t instanceof HTMLElement&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=$(()=>{if(Y.has(n))return;X(n,"down");const t=$(()=>{X(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>X(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,U.has(e.tagName)||-1!==e.tabIndex||null!==t.tabIndex||(t.tabIndex=0))}),r},t.progress=o,t.reverseEasing=Qt,t.scroll=function(t,{axis:e="y",...s}={}){const i={axis:e,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Ei(e)?Vi(n=>{t(n[e.axis].progress,n)},e):si(t,Pi(e))}(t,i):function(t,e){if(t.flatten(),Ei(e))return t.pause(),Vi(n=>{t.time=t.duration*n[e.axis].progress},e);{const s=Pi(e);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),si(e=>{t.time=t.duration*e},s))):n}}(t,i)},t.scrollInfo=Vi,t.spring=gt,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=_n(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return Z(0,1,i/t)}},t.time=L,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Jn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=vt}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let n=()=>{};const s=!1;function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r((()=>void 0!==window.ScrollTimeline));class d{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,e){const n=this.animations.map((n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class p extends d{then(t,e){return this.finished.finally(t).then((()=>{}))}}const f=t=>t.startsWith("--"),m=(t,e,n)=>{f(e)?t.style.setProperty(e,n):t.style[e]=n},g=(t,e)=>f(e)?t.style.getPropertyValue(e):t.style[e],y=t=>null!==t;const v=r((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),w=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const b={value:null,addProjectionMetrics:null},T=t=>Array.isArray(t)&&"number"==typeof t[0],x={};function S(t,e){const n=r(t);return()=>x[e]??n()}const M=S((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),A=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(e/(r-1))+", ";return`linear(${s.substring(0,s.length-2)})`},V=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,k={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:V([0,.65,.55,1]),circOut:V([.55,0,1,.45]),backIn:V([.31,.01,.66,-.59]),backOut:V([.33,1.53,.69,.99])};function P(t,e){return t?"function"==typeof t&&M()?A(t,e):T(t)?V(t):Array.isArray(t)?t.map((t=>P(t,e)||k.easeOut)):k[t]:void 0}function E(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=P(a,r);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal",pseudoElement:u})}function C(t){return"function"==typeof t&&"applyToOptions"in t}const F=new WeakMap;class O{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1}=t;let{transition:o}=t;this.allowFlatten=i;const a=function(t){const e=F.get(t)||new Map;return F.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,r||""),u=a.get(l);u&&u.stop();const c=function(t,e,n,s){Array.isArray(n)||(n=[n]);for(let r=0;r<n.length;r++)null===n[r]&&(n[r]=0!==r||s?n[r-1]:g(t,e)),"number"==typeof n[r]&&w.has(e)&&(n[r]=n[r]+"px");return!s&&!v()&&n.length<2&&n.unshift(g(t,e)),n}(e,n,s,r);o.type,o=function({type:t,...e}){return C(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(o),this.animation=E(e,n,c,o,r),!1===o.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(l),this.animation.onfinish=()=>{r?this.commitStyles():m(e,n,function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(y),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(c,o)),this.cancel()},a.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.animation.commitStyles?.()}get duration(){console.log(this.animation.effect?.getComputedTiming());const t=this.animation.effect?.getComputedTiming().duration||0;return u(Number(t))}get time(){return u(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=l(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}function R(t,e){return t?.[e]??t?.default??t}const B=2e4;function L(t){let e=0;let n=t.next(e);for(;!n.done&&e<B;)e+=50,n=t.next(e);return e>=B?1/0:e}function I(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(L(s),B);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:u(r)}}function D(t){return Boolean("function"==typeof t&&M()||!t||"string"==typeof t&&(t in k||M())||T(t)||Array.isArray(t)&&t.every(D))}function W(t,e){t.timeline=e,t.onfinish=null}const N=["read","resolveKeyframes","update","preRender","render","postRender"];function K(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=N.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&b.value&&b.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(i,e?n:void 0),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const i=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(i-r.timestamp,40),1),r.timestamp=i,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),c.process(r),h.process(r),d.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:N.reduce(((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(p)),a.schedule(e,i,o)),e}),{}),cancel:t=>{for(let e=0;e<N.length;e++)o[N[e]].cancel(t)},state:r,steps:o}}const{schedule:$,cancel:j,state:z,steps:Y}=K("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:i,!0);let U;function X(){U=void 0}const H={now:()=>(void 0===U&&H.set(z.isProcessing||s?z.timestamp:performance.now()),U),set:t=>{U=t,queueMicrotask(X)}},q=!1,G=!1;function Z(){return q||G}function _(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const r=n?.[t]??s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function J(t,e){const n=_(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function Q(t){return!("touch"===t.pointerType||Z())}const tt=(t,e)=>!!e&&(t===e||tt(t,e.parentElement)),et=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const nt=new WeakSet;function st(t){return e=>{"Enter"===e.key&&t(e)}}function rt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function it(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!Z()}class ot{constructor(t,e={}){this.version="12.6.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=H.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.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,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}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&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function at(t,e){return new ot(t,e)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function ut(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const ct=100,ht=10,dt=1,pt=0,ft=800,mt=.3,gt=.3,yt={granular:.01,default:2},vt={granular:.005,default:.5},wt=.01,bt=10,Tt=.05,xt=1,St=.001;function Mt({duration:t=ft,bounce:e=mt,velocity:n=pt,mass:s=dt}){let r,i,o=1-e;o=lt(Tt,xt,o),t=lt(wt,bt,u(t)),o<1?(r=e=>{const s=e*o,r=s*t,i=s-n,a=Vt(e,o),l=Math.exp(-r);return St-i/a*l},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Vt(Math.pow(e,2),o);return(-r(e)+St>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<At;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=l(t),isNaN(a))return{stiffness:ct,damping:ht,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const At=12;function Vt(t,e){return t*Math.sqrt(1-e*e)}const kt=["duration","bounce"],Pt=["stiffness","damping","mass"];function Et(t,e){return e.some((e=>void 0!==t[e]))}function Ct(t=gt,e=mt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=function(t){let e={velocity:pt,stiffness:ct,damping:ht,mass:dt,isResolvedFromDuration:!1,...t};if(!Et(t,Pt)&&Et(t,kt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:dt,stiffness:r,damping:i}}else{const n=Mt(t);e={...e,...n,mass:dt},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),g=f||0,y=h/(2*Math.sqrt(c*d)),v=o-i,w=u(Math.sqrt(c/d)),b=Math.abs(v)<5;let T;if(s||(s=b?yt.granular:yt.default),r||(r=b?vt.granular:vt.default),y<1){const t=Vt(w,y);T=e=>{const n=Math.exp(-y*w*e);return o-n*((g+y*w*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)T=t=>o-Math.exp(-w*t)*(v+(g+w*v)*t);else{const t=w*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*w*e),s=Math.min(t*e,300);return o-n*((g+y*w*v)*Math.sinh(s)+t*v*Math.cosh(s))/t}}const x={calculatedDuration:m&&p||null,next:t=>{const e=T(t);if(m)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(g):ut(T,t,e));const i=Math.abs(n)<=s,u=Math.abs(o-e)<=r;a.done=i&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(L(x),B),e=A((e=>x.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return x}Ct.applyToOptions=t=>{const e=I(t,100,Ct);return t.ease=M()?e.ease:"easeOut",t.duration=l(e.duration),t.type="keyframes",t};const Ft=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ot=t=>Array.isArray(t)&&"number"!=typeof t[0];function Rt(t,e){return Ot(t)?t[Ft(0,t.length,e)]:t}const Bt=(t,e,n)=>t+(e-t)*n;function Lt(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=o(0,e,s);t.push(Bt(n,1,r))}}function It(t){const e=[0];return Lt(e,t.length-1),e}const Dt=t=>Boolean(t&&t.getVelocity);function Wt(t){return"object"==typeof t&&!Array.isArray(t)}function Nt(t,e,n,s){return"string"==typeof t&&Wt(e)?_(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Kt(t,e,n){return t*(e+1)}function $t(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}function jt(t,n,s,r,i,o){!function(t,n,s){for(let r=0;r<t.length;r++){const i=t[r];i.at>n&&i.at<s&&(e(t,i),r--)}}(t,i,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:Bt(i,o,r[e]),easing:Rt(s,e)})}function zt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Yt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ut(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Xt(t,e){return e[t]||(e[t]=[]),e[t]}function Ht(t){return Array.isArray(t)?t:[t]}function qt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Gt=t=>"number"==typeof t,Zt=t=>t.every(Gt),_t=new WeakMap,Jt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qt=new Set(Jt),te=new Set(["width","height","top","left","right","bottom",...Jt]),ee=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function ne(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function se(t,e,n,s){if("function"==typeof e){const[r,i]=ne(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=ne(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function re(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,at(n))}function ie(t,e){const n=function(t,e,n){const s=t.getProps();return se(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){re(t,e,ee(i[e]))}}function oe(t,e){const n=t.getValue("willChange");if(s=n,Boolean(Dt(s)&&s.add))return n.add(e);var s}const ae=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),le="data-"+ae("framerAppearId");function ue(t){return t.props[le]}const ce=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function he(t,e,n,s){if(t===e&&n===s)return i;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ce(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:ce(r(t),e,s)}const de=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pe=t=>e=>1-t(1-e),fe=he(.33,1.53,.69,.99),me=pe(fe),ge=de(me),ye=t=>(t*=2)<1?.5*me(t):.5*(2-Math.pow(2,-10*(t-1))),ve=t=>1-Math.sin(Math.acos(t)),we=pe(ve),be=de(ve),Te=t=>/^0[^.\s]+$/u.test(t);const xe={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Se={...xe,transform:t=>lt(0,1,t)},Me={...xe,default:1},Ae=t=>Math.round(1e5*t)/1e5,Ve=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ke=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Pe=(t,e)=>n=>Boolean("string"==typeof n&&ke.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ee=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(Ve);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ce={...xe,transform:t=>Math.round((t=>lt(0,255,t))(t))},Fe={test:Pe("rgb","red"),parse:Ee("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ce.transform(t)+", "+Ce.transform(e)+", "+Ce.transform(n)+", "+Ae(Se.transform(s))+")"};const Oe={test:Pe("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:Fe.transform},Re=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Be=Re("deg"),Le=Re("%"),Ie=Re("px"),De=Re("vh"),We=Re("vw"),Ne={...Le,parse:t=>Le.parse(t)/100,transform:t=>Le.transform(100*t)},Ke={test:Pe("hsl","hue"),parse:Ee("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Le.transform(Ae(e))+", "+Le.transform(Ae(n))+", "+Ae(Se.transform(s))+")"},$e={test:t=>Fe.test(t)||Oe.test(t)||Ke.test(t),parse:t=>Fe.test(t)?Fe.parse(t):Ke.test(t)?Ke.parse(t):Oe.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Fe.transform(t):Ke.transform(t)},je=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ze="number",Ye="color",Ue=/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+)/giu;function Xe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ue,(t=>($e.test(t)?(s.color.push(i),r.push(Ye),n.push($e.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(ze),n.push(parseFloat(t))),++i,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:r}}function He(t){return Xe(t).values}function qe(t){const{split:e,types:n}=Xe(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+=e===ze?Ae(t[i]):e===Ye?$e.transform(t[i]):t[i]}return r}}const Ge=t=>"number"==typeof t?0:t;const Ze={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Ve)?.length||0)+(t.match(je)?.length||0)>0},parse:He,createTransformer:qe,getAnimatableNone:function(t){const e=He(t);return qe(t)(e.map(Ge))}},_e=new Set(["brightness","contrast","saturate","opacity"]);function Je(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Ve)||[];if(!s)return t;const r=n.replace(s,"");let i=_e.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Qe=/\b([a-z-]*)\(.*?\)/gu,tn={...Ze,getAnimatableNone:t=>{const e=t.match(Qe);return e?e.map(Je).join(" "):t}},en={borderWidth:Ie,borderTopWidth:Ie,borderRightWidth:Ie,borderBottomWidth:Ie,borderLeftWidth:Ie,borderRadius:Ie,radius:Ie,borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomRightRadius:Ie,borderBottomLeftRadius:Ie,width:Ie,maxWidth:Ie,height:Ie,maxHeight:Ie,top:Ie,right:Ie,bottom:Ie,left:Ie,padding:Ie,paddingTop:Ie,paddingRight:Ie,paddingBottom:Ie,paddingLeft:Ie,margin:Ie,marginTop:Ie,marginRight:Ie,marginBottom:Ie,marginLeft:Ie,backgroundPositionX:Ie,backgroundPositionY:Ie},nn={rotate:Be,rotateX:Be,rotateY:Be,rotateZ:Be,scale:Me,scaleX:Me,scaleY:Me,scaleZ:Me,skew:Be,skewX:Be,skewY:Be,distance:Ie,translateX:Ie,translateY:Ie,translateZ:Ie,x:Ie,y:Ie,z:Ie,perspective:Ie,transformPerspective:Ie,opacity:Se,originX:Ne,originY:Ne,originZ:Ie},sn={...xe,transform:Math.round},rn={...en,...nn,zIndex:sn,size:Ie,fillOpacity:Se,strokeOpacity:Se,numOctaves:sn},on={...rn,color:$e,backgroundColor:$e,outlineColor:$e,fill:$e,stroke:$e,borderColor:$e,borderTopColor:$e,borderRightColor:$e,borderBottomColor:$e,borderLeftColor:$e,filter:tn,WebkitFilter:tn},an=t=>on[t];function ln(t,e){let n=an(t);return n!==tn&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const un=new Set(["auto","none","0"]);const cn=t=>180*t/Math.PI,hn=t=>{const e=cn(Math.atan2(t[1],t[0]));return pn(e)},dn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:hn,rotateZ:hn,skewX:t=>cn(Math.atan(t[1])),skewY:t=>cn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},pn=t=>((t%=360)<0&&(t+=360),t),fn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),mn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),gn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fn,scaleY:mn,scale:t=>(fn(t)+mn(t))/2,rotateX:t=>pn(cn(Math.atan2(t[6],t[5]))),rotateY:t=>pn(cn(Math.atan2(-t[2],t[0]))),rotateZ:hn,rotate:hn,skewX:t=>cn(Math.atan(t[4])),skewY:t=>cn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function yn(t){return t.includes("scale")?1:0}function vn(t,e){if(!t||"none"===t)return yn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=gn,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=dn,r=e}if(!r)return yn(e);const i=s[e],o=r[1].split(",").map(wn);return"function"==typeof i?i(o):o[i]}function wn(t){return parseFloat(t.trim())}const bn=t=>t===xe||t===Ie,Tn=new Set(["x","y","z"]),xn=Jt.filter((t=>!Tn.has(t)));const Sn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>vn(e,"x"),y:(t,{transform:e})=>vn(e,"y")};Sn.translateX=Sn.x,Sn.translateY=Sn.y;const Mn=new Set;let An=!1,Vn=!1;function kn(){if(Vn){const t=Array.from(Mn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return xn.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.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)}))}Vn=!1,An=!1,Mn.forEach((t=>t.complete())),Mn.clear()}function Pn(){Mn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Vn=!0)}))}class En{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Mn.add(this),An||(An=!0,$.read(Pn),$.resolveKeyframes(kn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=s?.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Mn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Mn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Fn=t=>e=>"string"==typeof e&&e.startsWith(t),On=Fn("--"),Rn=Fn("var(--"),Bn=t=>!!Rn(t)&&Ln.test(t.split("/*")[0].trim()),Ln=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,In=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dn(t,e,n=1){const[s,r]=function(t){const e=In.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return Cn(t)?parseFloat(t):t}return Bn(r)?Dn(r,e,n+1):r}const Wn=t=>e=>e.test(t),Nn=[xe,Ie,Le,Be,We,De,{test:t=>"auto"===t,parse:t=>t}],Kn=t=>Nn.find(Wn(t));class $n extends En{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),Bn(s))){const r=Dn(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!te.has(n)||2!==t.length)return;const[s,r]=t,i=Kn(s),o=Kn(r);if(i!==o)if(bn(i)&&bn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||Te(s))&&n.push(e);var s;n.length&&function(t,e,n){let s,r=0;for(;r<t.length&&!s;){const e=t[r];"string"==typeof e&&!un.has(e)&&Xe(e).values.length&&(s=t[r]),r++}if(s&&n)for(const r of e)t[r]=ln(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,i=n[r];n[r]=Sn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const jn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ze.test(t)&&"0"!==t||t.startsWith("url(")));function zn(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=jn(r,e),a=jn(i,e);return!(!o||!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||C(n))&&s)}const Yn=t=>null!==t;function Un(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(Yn),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class Xn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=H.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Pn(),kn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=H.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!zn(t,n,s,r)){if(!i)return a&&a(Un(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Hn(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 qn(t,e){return n=>n>0?e:t}const Gn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Zn=[Oe,Fe,Ke];function _n(t){const e=(n=t,Zn.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ke&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Hn(a,s,t+1/3),i=Hn(a,s,t),o=Hn(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(s)),s}const Jn=(t,e)=>{const n=_n(t),s=_n(e);if(!n||!s)return qn(t,e);const r={...n};return t=>(r.red=Gn(n.red,s.red,t),r.green=Gn(n.green,s.green,t),r.blue=Gn(n.blue,s.blue,t),r.alpha=Bt(n.alpha,s.alpha,t),Fe.transform(r))},Qn=(t,e)=>n=>e(t(n)),ts=(...t)=>t.reduce(Qn),es=new Set(["none","hidden"]);function ns(t,e){return n=>Bt(t,e,n)}function ss(t){return"number"==typeof t?ns:"string"==typeof t?Bn(t)?qn:$e.test(t)?Jn:os:Array.isArray(t)?rs:"object"==typeof t?$e.test(t)?Jn:is:qn}function rs(t,e){const n=[...t],s=n.length,r=t.map(((t,n)=>ss(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function is(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=ss(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const os=(t,e)=>{const n=Ze.createTransformer(e),s=Xe(t),r=Xe(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?es.has(t)&&!r.values.length||es.has(e)&&!s.values.length?function(t,e){return es.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):ts(rs(function(t,e){const n=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],o=t.indexes[i][s[i]],a=t.values[o]??0;n[r]=a,s[i]++}return n}(s,r),r.values),n):qn(t,e)};function as(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Bt(t,e,n);return ss(t)(t,e)}function ls({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){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 f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=Ct({keyframes:[d.value,p(d.value)],velocity:ut(v,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const us=he(.42,0,1,1),cs=he(0,0,.58,1),hs=he(.42,0,.58,1),ds={linear:i,easeIn:us,easeInOut:hs,easeOut:cs,circIn:ve,circInOut:be,circOut:we,backIn:me,backInOut:ge,backOut:fe,anticipate:ye},ps=t=>{if(T(t)){t.length;const[e,n,s,r]=t;return he(e,n,s,r)}return"string"==typeof t?ds[t]:t};function fs(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=function(t,e,n){const s=[],r=n||as,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||i:e;o=ts(t,o)}s.push(o)}return s}(e,s,r),c=u.length,h=n=>{if(l&&n<t[0])return e[0];let s=0;if(c>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const r=o(t[s],t[s+1],n);return u[s](r)};return n?e=>h(lt(t[0],t[a-1],e)):h}function ms({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=Ot(s)?s.map(ps):ps(s),i={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:It(e),t),a=fs(o,e,{ease:Array.isArray(r)?r:(l=e,u=r,l.map((()=>u||hs)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(i.value=a(e),i.done=e>=t,i)}}const gs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$.update(e,!0),stop:()=>j(e),now:()=>z.isProcessing?z.timestamp:H.now()}},ys={decay:ls,inertia:ls,tween:ms,keyframes:ms,spring:Ct},vs=t=>t/100;class ws extends Xn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=s?.KeyframeResolver||En;this.resolver=new i(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=C(e)?e:ys[e]||ms;let a,l;o!==ms&&"number"!=typeof t[0]&&(a=ts(vs,as(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=L(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),v=lt(0,1,n)*c}const b=y?{done:!1,value:a[0]}:w.next(v);o&&(b.value=o(b.value));let{done:T}=b;y||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Un(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=gs,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const bs=new Set(["opacity","clipPath","filter","transform"]),Ts=r((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const xs={anticipate:ye,backInOut:ge,circInOut:be};class Ss extends Xn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new $n(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:r,type:i,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof r&&M()&&r in xs&&(r=xs[r]),C((u=this.options).type)||"spring"===u.type||!D(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ws({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,r=c.ease,i="keyframes"}const c=E(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return c.startTime=l??this.calcStartTime(),this.pendingTimeline?(W(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Un(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:i,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return i;const{animation:n}=e;W(n,t)}else this.pendingTimeline=t;return i}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new ws({...c,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Ts()&&n&&bs.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const Ms={type:"spring",stiffness:500,damping:25,restSpeed:10},As={type:"keyframes",duration:.8},Vs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ks=(t,{keyframes:e})=>e.length>2?As:Qt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ms:Vs;const Ps=(t,e,n,s={},r,i)=>o=>{const a=R(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(h={...h,...ks(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),h.allowFlatten=!a.type&&!a.ease,d&&!i&&void 0!==e.get()){const t=Un(h.keyframes,a);if(void 0!==t)return $.update((()=>{h.onUpdate(t),h.onComplete()})),new p([])}return!i&&Ss.supports(h)?new Ss(h):new ws(h)};function Es({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Cs(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const l=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||u&&Es(u,e))continue;const o={delay:n,...R(i||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=ue(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,c=!0)}}oe(t,e),s.start(Ps(e,s,r,t.shouldReduceMotion&&te.has(e)?{type:!1}:o,t,c));const h=s.animation;h&&l.push(h)}return o&&Promise.all(l).then((()=>{$.update((()=>{o&&ie(t,o)}))})),l}const Fs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Os={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Rs={};for(const t in Os)Rs[t]={isEnabled:e=>Os[t].some((t=>!!e[t]))};const Bs="undefined"!=typeof window,Ls={current:null},Is={current:!1};const Ds=[...Nn,$e,Ze];const Ws=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ns(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Ws.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $s{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=H.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=i;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Ns(e),this.isVariantNode=function(t){return Boolean(Ns(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&Dt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,_t.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Is.current||function(){if(Is.current=!0,Bs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ls.current=t.matches;t.addListener(e),e()}else Ls.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ls.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Qt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),r(),i&&i(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Rs){const e=Rs[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(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){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ks.length;e++){const n=Ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(Dt(r))t.addValue(s,r);else if(Dt(i))t.addValue(s,at(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,at(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=at(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=n&&("string"==typeof n&&(Cn(n)||Te(n))?n=parseFloat(n):(s=n,!Ds.find(Wn(s))&&Ze.test(e)&&(n=ln(t,e))),this.setBaseTarget(t,Dt(n)?n.get():n)),Dt(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=se(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Dt(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class js extends $s{constructor(){super(...arguments),this.KeyframeResolver=$n}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[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;Dt(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const zs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Us=Jt.length;function Xs(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Qt.has(t))o=!0;else if(On(t))r[t]=n;else{const e=zs(n,rn[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<Us;i++){const o=Jt[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=zs(a,rn[o]);l||(r=!1,s+=`${Ys[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}const Hs={offset:"stroke-dashoffset",array:"stroke-dasharray"},qs={offset:"strokeDashoffset",array:"strokeDasharray"};function Gs(t,e,n){return"string"==typeof t?t:Ie.transform(e+n*t)}function Zs(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Xs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Gs(e,t.x,t.width)} ${Gs(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Hs:qs;t[i.offset]=Ie.transform(-s);const o=Ie.transform(e),a=Ie.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const _s=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"]);function Js(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Qs={};function tr(t,{layout:e,layoutId:n}){return Qt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Qs[t]||"opacity"===t)}function er(t,e,n){const{style:s}=t,r={};for(const i in s)(Dt(s[i])||e.style&&Dt(e.style[i])||tr(i,t)||void 0!==n?.getValue(i)?.liveStyle)&&(r[i]=s[i]);return r}class nr extends js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fs,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Qt.has(e)){const t=an(e);return t&&t.default||0}return e=_s.has(e)?e:ae(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=er(t,e,n);for(const n in t)(Dt(t[n])||Dt(e[n]))&&(s[-1!==Jt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,e,n){Zs(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Js(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(_s.has(n)?n:ae(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class sr extends js{constructor(){super(...arguments),this.type="html",this.renderInstance=Js}readValueFromInstance(t,e){if(Qt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return vn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(On(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Xs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return er(t,e,n)}}class rr extends $s{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}}function ir(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new nr(e):new sr(e);n.mount(t),_t.set(t,n)}function or(t){const e=new rr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),_t.set(t,e)}function ar(t,e,n,s){const r=[];if(function(t,e){return Dt(t)||"number"==typeof t||"string"==typeof t&&!Wt(e)}(t,e))r.push(function(t,e,n){const s=Dt(t)?t:at(t);return s.start(Ps("",s,e,n)),s.animation}(t,Wt(e)&&e.default||e,n&&n.default||n));else{const i=Nt(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?ir:or;_t.has(s)||a(s);const l=_t.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...Cs(l,{...e,transition:u},{}))}}return r}function lr(t,e,n){const s=[],r=function(t,{defaultTransition:e={},...n}={},s,r){const i=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,$t(p,o.at,d,h));continue}let[a,m,g={}]=o;void 0!==g.at&&(p=$t(p,g.at,d,h));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=Ht(t),{delay:c=0,times:h=It(u),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof c?c(o,a):c,S=u.length,M=C(d)?d:r?.[d];if(S<=2&&M){let t=100;if(2===S&&Zt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=l(T));const n=I(e,t,M);b=n.ease,T=n.duration}T??(T=i);const A=p+x;1===h.length&&0===h[0]&&(h[1]=1);const V=h.length-u.length;if(V>0&&Lt(h,V),1===u.length&&u.unshift(null),m){T=Kt(T,m);const t=[...u],e=[...h];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<m;s++){u.push(...t);for(let r=0;r<t.length;r++)h.push(e[r]+(s+1)),b.push(0===r?"linear":Rt(n,r-1))}zt(h,m)}const k=A+T;jt(s,u,b,h,A,k),y=Math.max(x+T,y),f=Math.max(k,f)};if(Dt(a))v(m,g,Xt("default",Ut(a,u)));else{const t=Nt(a,m,s,c),e=t.length;for(let n=0;n<e;n++){const s=Ut(t[n],u);for(const t in m)v(m[t],qt(g,t),Xt(t,s),n,e)}}d=p,p+=y}return u.forEach(((t,s)=>{for(const r in t){const i=t[r];i.sort(Yt);const l=[],u=[],c=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:s}=i[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[r]=l,h.transition[r]={...e,duration:f,ease:c,times:u,...n}}})),a}(t,e,n,{spring:Ct});return r.forEach((({keyframes:t,transition:e},n)=>{s.push(...ar(n,t,e))})),s}function ur(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?lr(e,n,t):ar(e,n,s,t);const o=new p(r);return t&&t.animations.push(o),o}}const cr=ur();const hr=t=>function(e,n,s){return new p(function(t,e,n,s){const r=_(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,i));for(const t in e){const n=e[t],r={...R(a,t)};r.duration&&(r.duration=l(r.duration)),r.delay&&(r.delay=l(r.delay)),o.push(new O({element:s,name:t,keyframes:n,transition:r,allowFlatten:!a.type&&!a.ease}))}}return o}(e,n,s,t))},dr=hr();function pr(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return $.update(s,!0),()=>j(s)}const fr=new WeakMap;let mr;function gr({target:t,contentRect:e,borderBoxSize:n}){fr.get(t)?.forEach((s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function yr(t){t.forEach(gr)}function vr(t,e){mr||"undefined"!=typeof ResizeObserver&&(mr=new ResizeObserver(yr));const n=_(t);return n.forEach((t=>{let n=fr.get(t);n||(n=new Set,fr.set(t,n)),n.add(e),mr?.observe(t)})),()=>{n.forEach((t=>{const n=fr.get(t);n?.delete(e),n?.size||mr?.unobserve(t)}))}}const wr=new Set;let br;function Tr(t){return wr.add(t),br||(br=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};wr.forEach((t=>t(e)))},window.addEventListener("resize",br)),()=>{wr.delete(t),!wr.size&&br&&(br=void 0)}}const xr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Sr(t,e,n,s){const r=n[e],{length:i,position:a}=xr[e],l=r.current,u=n.time;r.current=t[`scroll${a}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=o(0,r.scrollLength,r.current);const h=s-u;r.velocity=h>50?0:c(r.current-l,h)}const Mr={start:0,center:.5,end:1};function Ar(t,e,n=0){let s=0;if(t in Mr&&(t=Mr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Vr=[0,0];function kr(t,e,n,s){let r=Array.isArray(t)?t:Vr,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Mr[t]?t:"0"]),i=Ar(r[0],n,s),o=Ar(r[1],e),i-o}const Pr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Er={x:0,y:0};function Cr(t,e,n){const{offset:s=Pr.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Er,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=kr(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=fs(e[i].offset,It(s),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=lt(0,1,e[i].interpolate(e[i].current))}function Fr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){Sr(t,"x",e,n),Sr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Cr(t,n,s)},notify:()=>e(n)}}const Or=new WeakMap,Rr=new WeakMap,Br=new WeakMap,Lr=t=>t===document.documentElement?window:t;function Ir(t,{container:e=document.documentElement,...n}={}){let s=Br.get(e);s||(s=new Set,Br.set(e,s));const r=Fr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(r),!Or.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(z.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{$.read(t,!1,!0),$.read(n,!1,!0),$.update(r,!1,!0)};Or.set(e,a);const l=Lr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Rr.set(e,(o=a,"function"==typeof(i=e)?Tr(i):vr(i,o))),l.addEventListener("scroll",a,{passive:!0})}var i,o;const a=Or.get(e);return $.read(a,!1,!0),()=>{j(a);const t=Br.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=Or.get(e);Or.delete(e),n&&(Lr(e).removeEventListener("scroll",n),Rr.get(e)?.(),window.removeEventListener("resize",n))}}const Dr=new Map;function Wr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Dr.has(e)||Dr.set(e,{});const s=Dr.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Ir((t=>{s.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Nr(t){return t&&(t.target||t.offset)}const Kr={some:0,all:1};const $r=(t,e)=>Math.abs(t-e);t.MotionValue=ot,t.animate=cr,t.animateMini=dr,t.anticipate=ye,t.backIn=me,t.backInOut=ge,t.backOut=fe,t.cancelFrame=j,t.circIn=ve,t.circInOut=be,t.circOut=we,t.clamp=lt,t.createScopedAnimate=ur,t.cubicBezier=he,t.delay=function(t,e){return function(t,e){const n=H.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(j(s),t(i-e))};return $.read(s,!0),()=>j(s)}(t,l(e))},t.distance=$r,t.distance2D=function(t,e){const n=$r(t.x,e.x),s=$r(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=us,t.easeInOut=hs,t.easeOut=cs,t.frame=$,t.frameData=z,t.hover=function(t,e,n={}){const[s,r,i]=J(t,n),o=t=>{if(!Q(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{Q(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach((t=>{t.addEventListener("pointerenter",o,r)})),i},t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=_(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof r?r:Kr[r]});return i.forEach((t=>a.observe(t))),()=>a.disconnect()},t.inertia=ls,t.interpolate=fs,t.invariant=n,t.isDragActive=Z,t.keyframes=ms,t.mirrorEasing=de,t.mix=as,t.motionValue=at,t.noop=i,t.pipe=ts,t.press=function(t,e,n={}){const[s,r,i]=J(t,n),o=t=>{const s=t.currentTarget;if(!it(t)||nt.has(s))return;nt.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),it(t)&&nt.has(s)&&(nt.delete(s),"function"==typeof i&&i(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||tt(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=st((()=>{if(nt.has(n))return;rt(n,"down");const t=st((()=>{rt(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>rt(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,r))),e=t,et.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),i},t.progress=o,t.reverseEasing=pe,t.scroll=function(t,{axis:e="y",...n}={}){const s={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Nr(e)?Ir((n=>{t(n[e.axis].progress,n)}),e):pr(t,Wr(e))}(t,s):function(t,e){if(t.flatten(),Nr(e))return t.pause(),Ir((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=Wr(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),pr((e=>{t.time=t.duration*e}),n)))):i}}(t,s)},t.scrollInfo=Ir,t.spring=Ct,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=ps(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(s):Math.ceil(s);return lt(0,1,r/t)}},t.time=H,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=fs(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=Ft}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion",
|
|
3
|
-
"version": "12.6.3
|
|
3
|
+
"version": "12.6.3",
|
|
4
4
|
"description": "An animation library for JavaScript and React.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/motion/lib/index.mjs",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"postpublish": "git push --tags"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"framer-motion": "^12.6.3
|
|
79
|
+
"framer-motion": "^12.6.3",
|
|
80
80
|
"tslib": "^2.4.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"optional": true
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "490a378259dcfb7bb8486b460da4c367002bc598"
|
|
99
99
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { invariant } from '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
-
import { secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
3
|
-
import { createGeneratorEasing } from '../../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';
|
|
4
|
-
import { isGenerator } from '../../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';
|
|
5
|
-
import { NativeAnimationControls } from '../../../../../../motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs';
|
|
6
|
-
import { supportsLinearEasing } from '../../../../../../motion-dom/dist/es/utils/supports/linear-easing.mjs';
|
|
7
|
-
import { startWaapiAnimation } from './index.mjs';
|
|
8
|
-
import { browserNumberValueTypes } from '../../../render/dom/value-types/number-browser.mjs';
|
|
9
|
-
import { getFinalKeyframe } from './utils/get-final-keyframe.mjs';
|
|
10
|
-
import { setCSSVar, setStyle } from './utils/style.mjs';
|
|
11
|
-
import { supportsPartialKeyframes } from './utils/supports-partial-keyframes.mjs';
|
|
12
|
-
import { supportsWaapi } from './utils/supports-waapi.mjs';
|
|
13
|
-
|
|
14
|
-
const state = new WeakMap();
|
|
15
|
-
function hydrateKeyframes(valueName, keyframes, read) {
|
|
16
|
-
for (let i = 0; i < keyframes.length; i++) {
|
|
17
|
-
if (keyframes[i] === null) {
|
|
18
|
-
keyframes[i] = i === 0 ? read() : keyframes[i - 1];
|
|
19
|
-
}
|
|
20
|
-
if (typeof keyframes[i] === "number" &&
|
|
21
|
-
browserNumberValueTypes[valueName]) {
|
|
22
|
-
keyframes[i] = browserNumberValueTypes[valueName].transform(keyframes[i]);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (!supportsPartialKeyframes() && keyframes.length < 2) {
|
|
26
|
-
keyframes.unshift(read());
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const defaultEasing = "easeOut";
|
|
30
|
-
function getElementAnimationState(element) {
|
|
31
|
-
const animationState = state.get(element) || new Map();
|
|
32
|
-
state.set(element, animationState);
|
|
33
|
-
return state.get(element);
|
|
34
|
-
}
|
|
35
|
-
class NativeAnimation extends NativeAnimationControls {
|
|
36
|
-
constructor(element, valueName, valueKeyframes, options) {
|
|
37
|
-
const isCSSVar = valueName.startsWith("--");
|
|
38
|
-
invariant(typeof options.type !== "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
39
|
-
const existingAnimation = getElementAnimationState(element).get(valueName);
|
|
40
|
-
existingAnimation && existingAnimation.stop();
|
|
41
|
-
const readInitialKeyframe = () => {
|
|
42
|
-
return valueName.startsWith("--")
|
|
43
|
-
? element.style.getPropertyValue(valueName)
|
|
44
|
-
: window.getComputedStyle(element)[valueName];
|
|
45
|
-
};
|
|
46
|
-
if (!Array.isArray(valueKeyframes)) {
|
|
47
|
-
valueKeyframes = [valueKeyframes];
|
|
48
|
-
}
|
|
49
|
-
hydrateKeyframes(valueName, valueKeyframes, readInitialKeyframe);
|
|
50
|
-
// TODO: Replace this with toString()?
|
|
51
|
-
if (isGenerator(options.type)) {
|
|
52
|
-
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
|
53
|
-
options.ease = supportsLinearEasing()
|
|
54
|
-
? generatorOptions.ease
|
|
55
|
-
: defaultEasing;
|
|
56
|
-
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
57
|
-
options.type = "keyframes";
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
options.ease = options.ease || defaultEasing;
|
|
61
|
-
}
|
|
62
|
-
const onFinish = () => {
|
|
63
|
-
this.setValue(element, valueName, getFinalKeyframe(valueKeyframes, options));
|
|
64
|
-
this.cancel();
|
|
65
|
-
this.resolveFinishedPromise();
|
|
66
|
-
};
|
|
67
|
-
const init = () => {
|
|
68
|
-
this.setValue = isCSSVar ? setCSSVar : setStyle;
|
|
69
|
-
this.options = options;
|
|
70
|
-
this.updateFinishedPromise();
|
|
71
|
-
this.removeAnimation = () => {
|
|
72
|
-
const elementState = state.get(element);
|
|
73
|
-
elementState && elementState.delete(valueName);
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
if (!supportsWaapi()) {
|
|
77
|
-
super();
|
|
78
|
-
init();
|
|
79
|
-
onFinish();
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
super(startWaapiAnimation(element, valueName, valueKeyframes, options));
|
|
83
|
-
init();
|
|
84
|
-
if (options.autoplay === false) {
|
|
85
|
-
this.animation.pause();
|
|
86
|
-
}
|
|
87
|
-
this.animation.onfinish = onFinish;
|
|
88
|
-
getElementAnimationState(element).set(valueName, this);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
93
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
94
|
-
* reject if its cancels.
|
|
95
|
-
*/
|
|
96
|
-
then(resolve, reject) {
|
|
97
|
-
return this.currentFinishedPromise.then(resolve, reject);
|
|
98
|
-
}
|
|
99
|
-
updateFinishedPromise() {
|
|
100
|
-
this.currentFinishedPromise = new Promise((resolve) => {
|
|
101
|
-
this.resolveFinishedPromise = resolve;
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
play() {
|
|
105
|
-
if (this.state === "finished") {
|
|
106
|
-
this.updateFinishedPromise();
|
|
107
|
-
}
|
|
108
|
-
super.play();
|
|
109
|
-
}
|
|
110
|
-
cancel() {
|
|
111
|
-
this.removeAnimation();
|
|
112
|
-
super.cancel();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export { NativeAnimation };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseGroupPlaybackControls } from './BaseGroup.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* TODO: This is a temporary class to support the legacy
|
|
5
|
-
* thennable API
|
|
6
|
-
*/
|
|
7
|
-
class GroupPlaybackControls extends BaseGroupPlaybackControls {
|
|
8
|
-
then(onResolve, onReject) {
|
|
9
|
-
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { GroupPlaybackControls };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
-
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
3
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
4
|
-
import { attachTimeline } from './utils/attach-timeline.mjs';
|
|
5
|
-
|
|
6
|
-
class NativeAnimationControls {
|
|
7
|
-
constructor(animation) {
|
|
8
|
-
this.animation = animation;
|
|
9
|
-
}
|
|
10
|
-
get duration() {
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) ||
|
|
13
|
-
((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) ||
|
|
14
|
-
300;
|
|
15
|
-
return millisecondsToSeconds(Number(durationInMs));
|
|
16
|
-
}
|
|
17
|
-
get time() {
|
|
18
|
-
var _a;
|
|
19
|
-
if (this.animation) {
|
|
20
|
-
return millisecondsToSeconds(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
21
|
-
}
|
|
22
|
-
return 0;
|
|
23
|
-
}
|
|
24
|
-
set time(newTime) {
|
|
25
|
-
if (this.animation) {
|
|
26
|
-
this.animation.currentTime = secondsToMilliseconds(newTime);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
get speed() {
|
|
30
|
-
return this.animation ? this.animation.playbackRate : 1;
|
|
31
|
-
}
|
|
32
|
-
set speed(newSpeed) {
|
|
33
|
-
if (this.animation) {
|
|
34
|
-
this.animation.playbackRate = newSpeed;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
get state() {
|
|
38
|
-
return this.animation ? this.animation.playState : "finished";
|
|
39
|
-
}
|
|
40
|
-
get startTime() {
|
|
41
|
-
return this.animation ? this.animation.startTime : null;
|
|
42
|
-
}
|
|
43
|
-
get finished() {
|
|
44
|
-
return this.animation ? this.animation.finished : Promise.resolve();
|
|
45
|
-
}
|
|
46
|
-
play() {
|
|
47
|
-
this.animation && this.animation.play();
|
|
48
|
-
}
|
|
49
|
-
pause() {
|
|
50
|
-
this.animation && this.animation.pause();
|
|
51
|
-
}
|
|
52
|
-
stop() {
|
|
53
|
-
if (!this.animation ||
|
|
54
|
-
this.state === "idle" ||
|
|
55
|
-
this.state === "finished") {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (this.animation.commitStyles) {
|
|
59
|
-
this.animation.commitStyles();
|
|
60
|
-
}
|
|
61
|
-
this.cancel();
|
|
62
|
-
}
|
|
63
|
-
flatten() {
|
|
64
|
-
var _a, _b;
|
|
65
|
-
if (!this.animation || !((_a = this.options) === null || _a === void 0 ? void 0 : _a.allowFlatten))
|
|
66
|
-
return;
|
|
67
|
-
(_b = this.animation.effect) === null || _b === void 0 ? void 0 : _b.updateTiming({ easing: "linear" });
|
|
68
|
-
}
|
|
69
|
-
attachTimeline(timeline) {
|
|
70
|
-
if (this.animation)
|
|
71
|
-
attachTimeline(this.animation, timeline);
|
|
72
|
-
return noop;
|
|
73
|
-
}
|
|
74
|
-
complete() {
|
|
75
|
-
this.animation && this.animation.finish();
|
|
76
|
-
}
|
|
77
|
-
cancel() {
|
|
78
|
-
try {
|
|
79
|
-
this.animation && this.animation.cancel();
|
|
80
|
-
}
|
|
81
|
-
catch (e) { }
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { NativeAnimationControls };
|