framer-motion 12.34.2 → 12.34.4
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/README.md +3 -5
- package/dist/cjs/client.js +1 -1
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/dom-mini.js.map +1 -1
- package/dist/cjs/dom.js +8 -16
- package/dist/cjs/dom.js.map +1 -1
- package/dist/cjs/{feature-bundle-Cb13qNcx.js → feature-bundle-CUI5saed.js} +2 -5
- package/dist/cjs/feature-bundle-CUI5saed.js.map +1 -0
- package/dist/cjs/index.js +9 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/m.js +3 -9
- package/dist/cjs/m.js.map +1 -1
- package/dist/cjs/mini.js.map +1 -1
- package/dist/dom-mini.d.ts +1 -0
- package/dist/dom.d.ts +1 -0
- package/dist/dom.js +1 -1
- package/dist/es/animation/animate/index.mjs +6 -2
- package/dist/es/animation/animate/index.mjs.map +1 -1
- package/dist/es/animation/animate/resolve-subjects.mjs.map +1 -1
- package/dist/es/animation/animate/sequence.mjs.map +1 -1
- package/dist/es/animation/animate/subject.mjs.map +1 -1
- package/dist/es/animation/animators/waapi/animate-elements.mjs.map +1 -1
- package/dist/es/animation/animators/waapi/animate-sequence.mjs.map +1 -1
- package/dist/es/animation/animators/waapi/animate-style.mjs.map +1 -1
- package/dist/es/animation/hooks/animation-controls.mjs.map +1 -1
- package/dist/es/animation/optimized-appear/handoff.mjs.map +1 -1
- package/dist/es/animation/optimized-appear/start.mjs.map +1 -1
- package/dist/es/animation/optimized-appear/store-id.mjs.map +1 -1
- package/dist/es/animation/optimized-appear/store.mjs.map +1 -1
- package/dist/es/animation/sequence/create.mjs.map +1 -1
- package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map +1 -1
- package/dist/es/animation/sequence/utils/calc-time.mjs.map +1 -1
- package/dist/es/animation/sequence/utils/edit.mjs.map +1 -1
- package/dist/es/animation/sequence/utils/normalize-times.mjs.map +1 -1
- package/dist/es/animation/sequence/utils/sort.mjs.map +1 -1
- package/dist/es/animation/utils/create-visual-element.mjs.map +1 -1
- package/dist/es/animation/utils/is-dom-keyframes.mjs.map +1 -1
- package/dist/es/components/AnimatePresence/PopChild.mjs.map +1 -1
- package/dist/es/components/AnimatePresence/PresenceChild.mjs.map +1 -1
- package/dist/es/components/AnimatePresence/index.mjs.map +1 -1
- package/dist/es/components/AnimatePresence/use-presence.mjs.map +1 -1
- package/dist/es/components/AnimatePresence/utils.mjs.map +1 -1
- package/dist/es/components/Reorder/Group.mjs.map +1 -1
- package/dist/es/components/Reorder/Item.mjs.map +1 -1
- package/dist/es/components/Reorder/utils/auto-scroll.mjs.map +1 -1
- package/dist/es/components/Reorder/utils/check-reorder.mjs.map +1 -1
- package/dist/es/context/MotionContext/index.mjs.map +1 -1
- package/dist/es/context/MotionContext/utils.mjs.map +1 -1
- package/dist/es/events/add-pointer-event.mjs.map +1 -1
- package/dist/es/events/event-info.mjs.map +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -1
- package/dist/es/gestures/drag/index.mjs.map +1 -1
- package/dist/es/gestures/drag/use-drag-controls.mjs.map +1 -1
- package/dist/es/gestures/drag/utils/constraints.mjs.map +1 -1
- package/dist/es/gestures/focus.mjs.map +1 -1
- package/dist/es/gestures/hover.mjs.map +1 -1
- package/dist/es/gestures/pan/PanSession.mjs +2 -5
- package/dist/es/gestures/pan/PanSession.mjs.map +1 -1
- package/dist/es/gestures/pan/index.mjs.map +1 -1
- package/dist/es/gestures/press.mjs.map +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/m.mjs +1 -1
- package/dist/es/motion/features/animation/exit.mjs.map +1 -1
- package/dist/es/motion/features/animation/index.mjs.map +1 -1
- package/dist/es/motion/features/animations.mjs.map +1 -1
- package/dist/es/motion/features/definitions.mjs.map +1 -1
- package/dist/es/motion/features/drag.mjs.map +1 -1
- package/dist/es/motion/features/gestures.mjs.map +1 -1
- package/dist/es/motion/features/layout.mjs.map +1 -1
- package/dist/es/motion/features/load-features.mjs.map +1 -1
- package/dist/es/motion/features/viewport/index.mjs.map +1 -1
- package/dist/es/motion/features/viewport/observers.mjs.map +1 -1
- package/dist/es/motion/utils/is-motion-component.mjs.map +1 -1
- package/dist/es/motion/utils/symbol.mjs.map +1 -1
- package/dist/es/motion/utils/unwrap-motion-component.mjs.map +1 -1
- package/dist/es/motion/utils/use-visual-element.mjs.map +1 -1
- package/dist/es/motion/utils/valid-prop.mjs.map +1 -1
- package/dist/es/projection/use-instant-layout-transition.mjs.map +1 -1
- package/dist/es/projection/use-reset-projection.mjs.map +1 -1
- package/dist/es/render/components/create-proxy.mjs.map +1 -1
- package/dist/es/render/components/m/create.mjs.map +1 -1
- package/dist/es/render/components/m/elements.mjs.map +1 -1
- package/dist/es/render/components/motion/create.mjs.map +1 -1
- package/dist/es/render/components/motion/elements.mjs.map +1 -1
- package/dist/es/render/components/motion/feature-bundle.mjs.map +1 -1
- package/dist/es/render/dom/create-visual-element.mjs.map +1 -1
- package/dist/es/render/dom/features-animation.mjs.map +1 -1
- package/dist/es/render/dom/features-max.mjs.map +1 -1
- package/dist/es/render/dom/features-min.mjs.map +1 -1
- package/dist/es/render/dom/scroll/attach-animation.mjs.map +1 -1
- package/dist/es/render/dom/scroll/attach-function.mjs.map +1 -1
- package/dist/es/render/dom/scroll/index.mjs.map +1 -1
- package/dist/es/render/dom/scroll/info.mjs.map +1 -1
- package/dist/es/render/dom/scroll/offsets/edge.mjs.map +1 -1
- package/dist/es/render/dom/scroll/offsets/index.mjs.map +1 -1
- package/dist/es/render/dom/scroll/offsets/inset.mjs.map +1 -1
- package/dist/es/render/dom/scroll/offsets/offset.mjs.map +1 -1
- package/dist/es/render/dom/scroll/offsets/presets.mjs +0 -12
- package/dist/es/render/dom/scroll/offsets/presets.mjs.map +1 -1
- package/dist/es/render/dom/scroll/on-scroll-handler.mjs.map +1 -1
- package/dist/es/render/dom/scroll/track.mjs +2 -2
- package/dist/es/render/dom/scroll/track.mjs.map +1 -1
- package/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs.map +1 -1
- package/dist/es/render/dom/scroll/utils/get-timeline.mjs.map +1 -1
- package/dist/es/render/dom/utils/filter-props.mjs.map +1 -1
- package/dist/es/render/dom/utils/is-svg-component.mjs.map +1 -1
- package/dist/es/render/dom/viewport/index.mjs.map +1 -1
- package/dist/es/render/html/use-html-visual-state.mjs.map +1 -1
- package/dist/es/render/html/use-props.mjs.map +1 -1
- package/dist/es/render/html/utils/create-render-state.mjs.map +1 -1
- package/dist/es/render/svg/lowercase-elements.mjs.map +1 -1
- package/dist/es/render/svg/use-svg-visual-state.mjs.map +1 -1
- package/dist/es/render/svg/utils/create-render-state.mjs.map +1 -1
- package/dist/es/utils/distance.mjs.map +1 -1
- package/dist/es/utils/get-context-window.mjs.map +1 -1
- package/dist/es/utils/is-ref-object.mjs.map +1 -1
- package/dist/es/utils/transform-viewbox-point.mjs.map +1 -1
- package/dist/es/utils/use-composed-ref.mjs.map +1 -1
- package/dist/es/utils/use-cycle.mjs.map +1 -1
- package/dist/es/value/scroll/use-element-scroll.mjs.map +1 -1
- package/dist/es/value/scroll/use-viewport-scroll.mjs.map +1 -1
- package/dist/es/value/use-combine-values.mjs.map +1 -1
- package/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map +1 -1
- package/dist/framer-motion.dev.js +15 -9
- package/dist/framer-motion.js +1 -1
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-animate.js.map +1 -1
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js.map +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-rollup-motion.js.map +1 -1
- package/dist/size-rollup-scroll.js +1 -1
- package/dist/size-rollup-scroll.js.map +1 -1
- package/dist/size-rollup-waapi-animate.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types.d-DOCC-kZB.d.ts +223 -0
- package/package.json +3 -3
- package/dist/cjs/feature-bundle-Cb13qNcx.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=(t,e,s)=>s>e?e:s<t?t:s;function e(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let s=()=>{},n=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(s=(t,s,n)=>{t||"undefined"==typeof console||console.warn(e(s,n))},n=(t,s,n)=>{if(!t)throw new Error(e(s,n))});const i={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>/^0[^.\s]+$/u.test(t);function o(t){let e;return()=>(void 0===e&&(e=t()),e)}const h=t=>t;class l{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const u=t=>1e3*t,c=t=>t/1e3;function d(t,e){return e?t*(1e3/e):0}const p=t=>Array.isArray(t)&&"number"==typeof t[0],f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],m={value:null,addProjectionMetrics:null};function g(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=f.reduce((t,s)=>(t[s]=function(t,e){let s=new Set,n=new Set,i=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},h=0;function l(e){a.has(e)&&(u.schedule(e),t()),h++,e(o)}const u={schedule:(t,e=!1,r=!1)=>{const o=r&&i?s:n;return e&&a.add(t),o.has(t)||o.add(t),t},cancel:t=>{n.delete(t),a.delete(t)},process:t=>{o=t,i?r=!0:(i=!0,[s,n]=[n,s],s.forEach(l),e&&m.value&&m.value.frameloop[e].push(h),h=0,s.clear(),i=!1,r&&(r=!1,u.process(t)))}};return u}(a,e?s:void 0),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:g,postRender:v}=o,y=()=>{const a=i.useManualTiming?r.timestamp:performance.now();s=!1,i.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(a-r.timestamp,40),1)),r.timestamp=a,r.isProcessing=!0,h.process(r),l.process(r),u.process(r),c.process(r),d.process(r),p.process(r),g.process(r),v.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(y))};return{schedule:f.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(s||(s=!0,n=!0,r.isProcessing||t(y)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e<f.length;e++)o[f[e]].cancel(t)},state:r,steps:o}}const{schedule:v,cancel:y,state:b,steps:w}=g("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:h,!0);let V;function S(){V=void 0}const M={now:()=>(void 0===V&&M.set(b.isProcessing||i.useManualTiming?b.timestamp:performance.now()),V),set:t=>{V=t,queueMicrotask(S)}},T=t=>e=>"string"==typeof e&&e.startsWith(t),A=T("--"),C=T("var(--"),k=t=>!!C(t)&&x.test(t.split("/*")[0].trim()),x=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function F(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const E={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},B={...E,transform:e=>t(0,1,e)},P={...E,default:1},R=t=>Math.round(1e5*t)/1e5,I=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const N=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,O=(t,e)=>s=>Boolean("string"==typeof s&&N.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),$=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,r,a,o]=n.match(I);return{[t]:parseFloat(i),[e]:parseFloat(r),[s]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},L={...E,transform:e=>Math.round((e=>t(0,255,e))(e))},Y={test:O("rgb","red"),parse:$("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+L.transform(t)+", "+L.transform(e)+", "+L.transform(s)+", "+R(B.transform(n))+")"};const W={test:O("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:Y.transform},X=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),j=X("deg"),K=X("%"),U=X("px"),Z=X("vh"),z=X("vw"),D=(()=>({...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(100*t)}))(),q={test:O("hsl","hue"),parse:$("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+K.transform(R(e))+", "+K.transform(R(s))+", "+R(B.transform(n))+")"},H={test:t=>Y.test(t)||W.test(t)||q.test(t),parse:t=>Y.test(t)?Y.parse(t):q.test(t)?q.parse(t):W.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Y.transform(t):q.transform(t),getAnimatableNone:t=>{const e=H.parse(t);return e.alpha=0,H.transform(e)}},_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const G="number",J="color",Q=/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 tt(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Q,t=>(H.test(t)?(n.color.push(r),i.push(J),s.push(H.parse(t))):t.startsWith("var(")?(n.var.push(r),i.push("var"),s.push(t)):(n.number.push(r),i.push(G),s.push(parseFloat(t))),++r,"${}")).split("${}");return{values:s,split:a,indexes:n,types:i}}function et(t){return tt(t).values}function st(t){const{split:e,types:s}=tt(t),n=e.length;return t=>{let i="";for(let r=0;r<n;r++)if(i+=e[r],void 0!==t[r]){const e=s[r];i+=e===G?R(t[r]):e===J?H.transform(t[r]):t[r]}return i}}const nt=t=>"number"==typeof t?0:H.test(t)?H.getAnimatableNone(t):t;const it={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(I)?.length||0)+(t.match(_)?.length||0)>0},parse:et,createTransformer:st,getAnimatableNone:function(t){const e=et(t);return st(t)(e.map(nt))}},rt=(t,e,s)=>t+(e-t)*s,at=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;e<i;e++)n+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ot=t=>null!==t;function ht(t,{repeat:e,repeatType:s="loop"},n,i=1){const r=t.filter(ot),a=i<0||e&&"loop"!==s&&e%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}class lt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ut=t=>180*t/Math.PI,ct=t=>{const e=ut(Math.atan2(t[1],t[0]));return pt(e)},dt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ct,rotateZ:ct,skewX:t=>ut(Math.atan(t[1])),skewY:t=>ut(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},pt=t=>((t%=360)<0&&(t+=360),t),ft=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),mt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),gt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ft,scaleY:mt,scale:t=>(ft(t)+mt(t))/2,rotateX:t=>pt(ut(Math.atan2(t[6],t[5]))),rotateY:t=>pt(ut(Math.atan2(-t[2],t[0]))),rotateZ:ct,rotate:ct,skewX:t=>ut(Math.atan(t[4])),skewY:t=>ut(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function vt(t){return t.includes("scale")?1:0}function yt(t,e){if(!t||"none"===t)return vt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=gt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=dt,i=e}if(!i)return vt(e);const r=n[e],a=i[1].split(",").map(wt);return"function"==typeof r?r(a):a[r]}const bt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return yt(s,e)};function wt(t){return parseFloat(t.trim())}const Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=(()=>new Set(Vt))(),Mt=t=>t===E||t===U,Tt=new Set(["x","y","z"]),At=Vt.filter(t=>!Tt.has(t));const Ct={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),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})=>yt(e,"x"),y:(t,{transform:e})=>yt(e,"y")};Ct.translateX=Ct.x,Ct.translateY=Ct.y;const kt=new Set;let xt=!1,Ft=!1,Et=!1;function Bt(){if(Ft){const t=Array.from(kt).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return At.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ft=!1,xt=!1,kt.forEach(t=>t.complete(Et)),kt.clear()}function Pt(){kt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ft=!0)})}function Rt(){Et=!0,Pt(),Bt(),Et=!1}class It{constructor(t,e,s,n,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(kt.add(this),xt||(xt=!0,v.read(Pt),v.resolveKeyframes(Bt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),kt.delete(this)}cancel(){"scheduled"===this.state&&(kt.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Nt={};function Ot(t,e){const s=o(t);return()=>Nt[e]??s()}const $t=Ot(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Lt=Ot(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Yt=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Wt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yt([0,.65,.55,1]),circOut:Yt([.55,0,1,.45]),backIn:Yt([.31,.01,.66,-.59]),backOut:Yt([.33,1.53,.69,.99])};function Xt(t,e){return t?"function"==typeof t?Lt()?at(t,e):"ease-out":p(t)?Yt(t):Array.isArray(t)?t.map(t=>Xt(t,e)||Wt.easeOut):Wt[t]:void 0}function jt(t,e,s,{delay:n=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Xt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Kt(t){return"function"==typeof t&&"applyToOptions"in t}class Ut extends lt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,n("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Kt(t)&&Lt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=jt(e,s,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=ht(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,s){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return c(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+c(t)}get time(){return c(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=u(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$t()?(this.animation.timeline=t,h):e(this)}}function Zt(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function zt(t,e,s,n){if("function"==typeof e){const[i,r]=Zt(n);e=e(void 0!==s?s:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Zt(n);e=e(void 0!==s?s:t.custom,i,r)}return e}class Dt{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=M.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=M.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 l);const s=this.events[t].add(e);return"change"===t?()=>{s(),v.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=M.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qt(t,e){return new Dt(t,e)}const Ht=t=>Boolean(t&&t.getVelocity);function _t(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Gt="data-"+_t("framerAppearId"),Jt=t=>e=>e.test(t),Qt=[E,U,K,j,z,Z,{test:t=>"auto"===t,parse:t=>t}],te=t=>Qt.find(Jt(t)),ee=new Set(["brightness","contrast","saturate","opacity"]);function se(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match(I)||[];if(!n)return t;const i=s.replace(n,"");let r=ee.has(e)?1:0;return n!==s&&(r*=100),e+"("+r+i+")"}const ne=/\b([a-z-]*)\(.*?\)/gu,ie={...it,getAnimatableNone:t=>{const e=t.match(ne);return e?e.map(se).join(" "):t}},re={...it,getAnimatableNone:t=>{const e=it.parse(t);return it.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ae={...E,transform:Math.round},oe={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,top:U,right:U,bottom:U,left:U,inset:U,insetBlock:U,insetBlockStart:U,insetBlockEnd:U,insetInline:U,insetInlineStart:U,insetInlineEnd:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,paddingBlock:U,paddingBlockStart:U,paddingBlockEnd:U,paddingInline:U,paddingInlineStart:U,paddingInlineEnd:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,marginBlock:U,marginBlockStart:U,marginBlockEnd:U,marginInline:U,marginInlineStart:U,marginInlineEnd:U,fontSize:U,backgroundPositionX:U,backgroundPositionY:U,...{rotate:j,rotateX:j,rotateY:j,rotateZ:j,scale:P,scaleX:P,scaleY:P,scaleZ:P,skew:j,skewX:j,skewY:j,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:B,originX:D,originY:D,originZ:U},zIndex:ae,fillOpacity:B,strokeOpacity:B,numOctaves:ae},he={...oe,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:ie,WebkitFilter:ie,mask:re,WebkitMask:re},le=t=>he[t],ue=new Set([ie,re]);function ce(t,e){let s=le(t);return ue.has(s)||(s=it),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const de=new Set(["opacity","clipPath","filter","transform"]),pe=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:fe,cancel:me}=g(queueMicrotask,!1),ge=[...Qt,H,it],ve=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ye=new WeakMap;function be(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function we(t){return"string"==typeof t||Array.isArray(t)}const Ve=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Se=["initial",...Ve];function Me(t){return be(t.animate)||Se.some(e=>we(t[e]))}function Te(t){return Boolean(Me(t)||t.variants)}const Ae={current:null},Ce={current:!1},ke="undefined"!=typeof window;const xe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fe={};function Ee(t){Fe=t}function Be(){return Fe}class Pe{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=It,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=M.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,v.render(this.render,!1,!0))};const{latestValues:h,renderState:l}=a;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Me(e),this.isVariantNode=Te(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==h[t]&&Ht(e)&&e.set(h[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,ye.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ce.current||function(){if(Ce.current=!0,ke)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ae.current=t.matches;t.addEventListener("change",e),e()}else Ae.current=!1}(),this.shouldReduceMotion=Ae.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),y(this.notifyUpdate),y(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&de.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:r,duration:a}=e.accelerate,o=new Ut({element:this.current,name:t,keyframes:n,times:i,ease:r,duration:u(a)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=St.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&v.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),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 Fe){const e=Fe[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(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<xe.length;e++){const s=xe[e];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const n=t["on"+s];n&&(this.propEventSubscriptions[s]=this.on(s,n))}this.prevMotionValues=function(t,e,s){for(const n in e){const i=e[n],r=s[n];if(Ht(i))t.addValue(n,i);else if(Ht(r))t.addValue(n,qt(i,{owner:t}));else if(r!==i)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(n);t.addValue(n,qt(void 0!==e?e:i,{owner:t}))}}for(const n in s)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);e!==s&&(s&&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 s=this.values.get(t);return void 0===s&&void 0!==e&&(s=qt(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(r(s)||a(s))?s=parseFloat(s):(n=s,!ge.find(Jt(n))&&it.test(e)&&(s=ce(t,e))),this.setBaseTarget(t,Ht(s)?s.get():s)),Ht(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=zt(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Ht(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new l),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){fe.render(this.render)}}const Re={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ie=Vt.length;function Ne(t,e,s){const{style:n,vars:i,transformOrigin:r}=t;let a=!1,o=!1;for(const t in e){const s=e[t];if(St.has(t))a=!0;else if(A(t))i[t]=s;else{const e=pe(s,oe[t]);t.startsWith("origin")?(o=!0,r[t]=e):n[t]=e}}if(e.transform||(a||s?n.transform=function(t,e,s){let n="",i=!0;for(let r=0;r<Ie;r++){const a=Vt[r],o=t[a];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(a.startsWith("scale")?1:0);else{const t=parseFloat(o);h=a.startsWith("scale")?1===t:0===t}if(!h||s){const t=pe(o,oe[a]);h||(i=!1,n+=`${Re[a]||a}(${t}) `),s&&(e[a]=t)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=r;n.transformOrigin=`${t} ${e} ${s}`}}function Oe(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const $e={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!U.test(t))return t;t=parseFloat(t)}return`${Oe(t,e.target.x)}% ${Oe(t,e.target.y)}%`}},Le={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=it.parse(t);if(i.length>5)return n;const r=it.createTransformer(t),a="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+a]/=o,i[1+a]/=h;const l=rt(o,h,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}},Ye={borderRadius:{...$e,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$e,borderTopRightRadius:$e,borderBottomLeftRadius:$e,borderBottomRightRadius:$e,boxShadow:Le};function We(t,{layout:e,layoutId:s}){return St.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!Ye[t]||"opacity"===t)}function Xe(t,e,s){const n=t.style,i=e?.style,r={};if(!n)return r;for(const e in n)(Ht(n[e])||i&&Ht(i[e])||We(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(r[e]=n[e]);return r}const je={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ke={offset:"strokeDashoffset",array:"strokeDasharray"};const Ue=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ze(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...o},h,l,u){if(Ne(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of Ue)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const r=i?je:Ke;t[r.offset]=""+-n,t[r.array]=`${e} ${s}`}(c,i,r,a,!1)}const ze=t=>"string"==typeof t&&"svg"===t.toLowerCase();function De(t,e,s){const n=Xe(t,e,s);for(const s in t)if(Ht(t[s])||Ht(e[s])){n[-1!==Vt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}const qe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function He(t){return"string"==typeof t&&!t.includes("-")&&!!(qe.indexOf(t)>-1||/[A-Z]/u.test(t))}export{Ct as $,it as A,tt as B,v as C,y as D,b as E,M as F,c as G,d as H,u as I,t as J,at as K,ht as L,i as M,Ut as N,Kt as O,o as P,It as Q,Rt as R,r as S,St as T,Vt as U,qt as V,lt as W,a as X,ce as Y,te as Z,F as _,Me as a,Mt as a0,Pe as a1,vt as a2,bt as a3,A as a4,_t as a5,ve as a6,le as a7,Se as a8,Ve as a9,we as b,We as c,Ne as d,Ze as e,ze as f,He as g,Te as h,Ht as i,be as j,De as k,Be as l,Ee as m,h as n,Gt as o,p,n as q,zt as r,Xe as s,rt as t,Y as u,q as v,s as w,W as x,k as y,H as z};
|
|
1
|
+
const t=(t,e,s)=>s>e?e:s<t?t:s;function e(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let s=()=>{},n=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(s=(t,s,n)=>{t||"undefined"==typeof console||console.warn(e(s,n))},n=(t,s,n)=>{if(!t)throw new Error(e(s,n))});const i={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>/^0[^.\s]+$/u.test(t);function o(t){let e;return()=>(void 0===e&&(e=t()),e)}const h=t=>t;class l{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const u=t=>1e3*t,c=t=>t/1e3;function d(t,e){return e?t*(1e3/e):0}const p=t=>Array.isArray(t)&&"number"==typeof t[0],f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function m(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=f.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(h.schedule(e),t()),e(a)}const h={schedule:(t,i=!1,a=!1)=>{const o=a&&n?e:s;return i&&r.add(t),o.has(t)||o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{a=t,n?i=!0:(n=!0,[e,s]=[s,e],e.forEach(o),e.clear(),n=!1,i&&(i=!1,h.process(t)))}};return h}(a),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:m,postRender:g}=o,v=()=>{const a=i.useManualTiming?r.timestamp:performance.now();s=!1,i.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(a-r.timestamp,40),1)),r.timestamp=a,r.isProcessing=!0,h.process(r),l.process(r),u.process(r),c.process(r),d.process(r),p.process(r),m.process(r),g.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(v))};return{schedule:f.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(s||(s=!0,n=!0,r.isProcessing||t(v)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e<f.length;e++)o[f[e]].cancel(t)},state:r,steps:o}}const{schedule:g,cancel:v,state:y}=m("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:h,!0);let b;function w(){b=void 0}const V={now:()=>(void 0===b&&V.set(y.isProcessing||i.useManualTiming?y.timestamp:performance.now()),b),set:t=>{b=t,queueMicrotask(w)}},S=t=>e=>"string"==typeof e&&e.startsWith(t),M=S("--"),T=S("var(--"),A=t=>!!T(t)&&C.test(t.split("/*")[0].trim()),C=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function k(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},F={...x,transform:e=>t(0,1,e)},E={...x,default:1},B=t=>Math.round(1e5*t)/1e5,P=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const R=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,I=(t,e)=>s=>Boolean("string"==typeof s&&R.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),N=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,r,a,o]=n.match(P);return{[t]:parseFloat(i),[e]:parseFloat(r),[s]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},O={...x,transform:e=>Math.round((e=>t(0,255,e))(e))},$={test:I("rgb","red"),parse:N("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+O.transform(t)+", "+O.transform(e)+", "+O.transform(s)+", "+B(F.transform(n))+")"};const L={test:I("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:$.transform},Y=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=Y("deg"),X=Y("%"),j=Y("px"),K=Y("vh"),U=Y("vw"),Z=(()=>({...X,parse:t=>X.parse(t)/100,transform:t=>X.transform(100*t)}))(),z={test:I("hsl","hue"),parse:N("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+X.transform(B(e))+", "+X.transform(B(s))+", "+B(F.transform(n))+")"},D={test:t=>$.test(t)||L.test(t)||z.test(t),parse:t=>$.test(t)?$.parse(t):z.test(t)?z.parse(t):L.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?$.transform(t):z.transform(t),getAnimatableNone:t=>{const e=D.parse(t);return e.alpha=0,D.transform(e)}},q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const H="number",_="color",G=/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 J(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(G,t=>(D.test(t)?(n.color.push(r),i.push(_),s.push(D.parse(t))):t.startsWith("var(")?(n.var.push(r),i.push("var"),s.push(t)):(n.number.push(r),i.push(H),s.push(parseFloat(t))),++r,"${}")).split("${}");return{values:s,split:a,indexes:n,types:i}}function Q(t){return J(t).values}function tt(t){const{split:e,types:s}=J(t),n=e.length;return t=>{let i="";for(let r=0;r<n;r++)if(i+=e[r],void 0!==t[r]){const e=s[r];i+=e===H?B(t[r]):e===_?D.transform(t[r]):t[r]}return i}}const et=t=>"number"==typeof t?0:D.test(t)?D.getAnimatableNone(t):t;const st={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(P)?.length||0)+(t.match(q)?.length||0)>0},parse:Q,createTransformer:tt,getAnimatableNone:function(t){const e=Q(t);return tt(t)(e.map(et))}},nt=(t,e,s)=>t+(e-t)*s,it=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;e<i;e++)n+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},rt=t=>null!==t;function at(t,{repeat:e,repeatType:s="loop"},n,i=1){const r=t.filter(rt),a=i<0||e&&"loop"!==s&&e%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}class ot{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ht=t=>180*t/Math.PI,lt=t=>{const e=ht(Math.atan2(t[1],t[0]));return ct(e)},ut={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:lt,rotateZ:lt,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ct=t=>((t%=360)<0&&(t+=360),t),dt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),pt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ft={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dt,scaleY:pt,scale:t=>(dt(t)+pt(t))/2,rotateX:t=>ct(ht(Math.atan2(t[6],t[5]))),rotateY:t=>ct(ht(Math.atan2(-t[2],t[0]))),rotateZ:lt,rotate:lt,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function mt(t){return t.includes("scale")?1:0}function gt(t,e){if(!t||"none"===t)return mt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=ft,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ut,i=e}if(!i)return mt(e);const r=n[e],a=i[1].split(",").map(yt);return"function"==typeof r?r(a):a[r]}const vt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return gt(s,e)};function yt(t){return parseFloat(t.trim())}const bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wt=(()=>new Set(bt))(),Vt=t=>t===x||t===j,St=new Set(["x","y","z"]),Mt=bt.filter(t=>!St.has(t));const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),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})=>gt(e,"x"),y:(t,{transform:e})=>gt(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const At=new Set;let Ct=!1,kt=!1,xt=!1;function Ft(){if(kt){const t=Array.from(At).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return Mt.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}kt=!1,Ct=!1,At.forEach(t=>t.complete(xt)),At.clear()}function Et(){At.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kt=!0)})}function Bt(){xt=!0,Et(),Ft(),xt=!1}class Pt{constructor(t,e,s,n,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(At.add(this),Ct||(Ct=!0,g.read(Et),g.resolveKeyframes(Ft))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),At.delete(this)}cancel(){"scheduled"===this.state&&(At.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Rt={};function It(t,e){const s=o(t);return()=>Rt[e]??s()}const Nt=It(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ot=It(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),$t=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Lt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Yt(t,e){return t?"function"==typeof t?Ot()?it(t,e):"ease-out":p(t)?$t(t):Array.isArray(t)?t.map(t=>Yt(t,e)||Lt.easeOut):Lt[t]:void 0}function Wt(t,e,s,{delay:n=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Yt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Xt(t){return"function"==typeof t&&"applyToOptions"in t}class jt extends ot{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,n("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Xt(t)&&Ot()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Wt(e,s,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=at(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,s){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return c(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+c(t)}get time(){return c(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=u(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Nt()?(this.animation.timeline=t,h):e(this)}}function Kt(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Ut(t,e,s,n){if("function"==typeof e){const[i,r]=Kt(n);e=e(void 0!==s?s:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Kt(n);e=e(void 0!==s?s:t.custom,i,r)}return e}class Zt{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=V.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=V.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 l);const s=this.events[t].add(e);return"change"===t?()=>{s(),g.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=V.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zt(t,e){return new Zt(t,e)}const Dt=t=>Boolean(t&&t.getVelocity);function qt(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ht="data-"+qt("framerAppearId"),_t=t=>e=>e.test(t),Gt=[x,j,X,W,U,K,{test:t=>"auto"===t,parse:t=>t}],Jt=t=>Gt.find(_t(t)),Qt=new Set(["brightness","contrast","saturate","opacity"]);function te(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match(P)||[];if(!n)return t;const i=s.replace(n,"");let r=Qt.has(e)?1:0;return n!==s&&(r*=100),e+"("+r+i+")"}const ee=/\b([a-z-]*)\(.*?\)/gu,se={...st,getAnimatableNone:t=>{const e=t.match(ee);return e?e.map(te).join(" "):t}},ne={...st,getAnimatableNone:t=>{const e=st.parse(t);return st.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ie={...x,transform:Math.round},re={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,inset:j,insetBlock:j,insetBlockStart:j,insetBlockEnd:j,insetInline:j,insetInlineStart:j,insetInlineEnd:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,paddingBlock:j,paddingBlockStart:j,paddingBlockEnd:j,paddingInline:j,paddingInlineStart:j,paddingInlineEnd:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,marginBlock:j,marginBlockStart:j,marginBlockEnd:j,marginInline:j,marginInlineStart:j,marginInlineEnd:j,fontSize:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:W,skewX:W,skewY:W,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:F,originX:Z,originY:Z,originZ:j},zIndex:ie,fillOpacity:F,strokeOpacity:F,numOctaves:ie},ae={...re,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:se,WebkitFilter:se,mask:ne,WebkitMask:ne},oe=t=>ae[t],he=new Set([se,ne]);function le(t,e){let s=oe(t);return he.has(s)||(s=st),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const ue=new Set(["opacity","clipPath","filter","transform"]),ce=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:de}=m(queueMicrotask,!1),pe=[...Gt,D,st],fe=()=>({x:{min:0,max:0},y:{min:0,max:0}}),me=new WeakMap;function ge(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ve(t){return"string"==typeof t||Array.isArray(t)}const ye=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],be=["initial",...ye];function we(t){return ge(t.animate)||be.some(e=>ve(t[e]))}function Ve(t){return Boolean(we(t)||t.variants)}const Se={current:null},Me={current:!1},Te="undefined"!=typeof window;const Ae=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ce={};function ke(t){Ce=t}function xe(){return Ce}class Fe{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Pt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=V.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,g.render(this.render,!1,!0))};const{latestValues:h,renderState:l}=a;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=we(e),this.isVariantNode=Ve(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==h[t]&&Dt(e)&&e.set(h[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,me.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Me.current||function(){if(Me.current=!0,Te)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Se.current=t.matches;t.addEventListener("change",e),e()}else Se.current=!1}(),this.shouldReduceMotion=Se.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),v(this.notifyUpdate),v(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ue.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:r,duration:a}=e.accelerate,o=new jt({element:this.current,name:t,keyframes:n,times:i,ease:r,duration:u(a)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=wt.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&g.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),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 Ce){const e=Ce[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(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<Ae.length;e++){const s=Ae[e];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const n=t["on"+s];n&&(this.propEventSubscriptions[s]=this.on(s,n))}this.prevMotionValues=function(t,e,s){for(const n in e){const i=e[n],r=s[n];if(Dt(i))t.addValue(n,i);else if(Dt(r))t.addValue(n,zt(i,{owner:t}));else if(r!==i)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(n);t.addValue(n,zt(void 0!==e?e:i,{owner:t}))}}for(const n in s)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);e!==s&&(s&&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 s=this.values.get(t);return void 0===s&&void 0!==e&&(s=zt(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(r(s)||a(s))?s=parseFloat(s):(n=s,!pe.find(_t(n))&&st.test(e)&&(s=le(t,e))),this.setBaseTarget(t,Dt(s)?s.get():s)),Dt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=Ut(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Dt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new l),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){de.render(this.render)}}const Ee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Be=bt.length;function Pe(t,e,s){const{style:n,vars:i,transformOrigin:r}=t;let a=!1,o=!1;for(const t in e){const s=e[t];if(wt.has(t))a=!0;else if(M(t))i[t]=s;else{const e=ce(s,re[t]);t.startsWith("origin")?(o=!0,r[t]=e):n[t]=e}}if(e.transform||(a||s?n.transform=function(t,e,s){let n="",i=!0;for(let r=0;r<Be;r++){const a=bt[r],o=t[a];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(a.startsWith("scale")?1:0);else{const t=parseFloat(o);h=a.startsWith("scale")?1===t:0===t}if(!h||s){const t=ce(o,re[a]);h||(i=!1,n+=`${Ee[a]||a}(${t}) `),s&&(e[a]=t)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=r;n.transformOrigin=`${t} ${e} ${s}`}}function Re(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ie={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!j.test(t))return t;t=parseFloat(t)}return`${Re(t,e.target.x)}% ${Re(t,e.target.y)}%`}},Ne={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=st.parse(t);if(i.length>5)return n;const r=st.createTransformer(t),a="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+a]/=o,i[1+a]/=h;const l=nt(o,h,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}},Oe={borderRadius:{...Ie,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomLeftRadius:Ie,borderBottomRightRadius:Ie,boxShadow:Ne};function $e(t,{layout:e,layoutId:s}){return wt.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!Oe[t]||"opacity"===t)}function Le(t,e,s){const n=t.style,i=e?.style,r={};if(!n)return r;for(const e in n)(Dt(n[e])||i&&Dt(i[e])||$e(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(r[e]=n[e]);return r}const Ye={offset:"stroke-dashoffset",array:"stroke-dasharray"},We={offset:"strokeDashoffset",array:"strokeDasharray"};const Xe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function je(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...o},h,l,u){if(Pe(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of Xe)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const r=i?Ye:We;t[r.offset]=""+-n,t[r.array]=`${e} ${s}`}(c,i,r,a,!1)}const Ke=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ue(t,e,s){const n=Le(t,e,s);for(const s in t)if(Dt(t[s])||Dt(e[s])){n[-1!==bt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}const Ze=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ze(t){return"string"==typeof t&&!t.includes("-")&&!!(Ze.indexOf(t)>-1||/[A-Z]/u.test(t))}export{Tt as $,st as A,J as B,y as C,V as D,v as E,g as F,c as G,d as H,u as I,t as J,it as K,at as L,i as M,jt as N,Xt as O,o as P,Pt as Q,Bt as R,r as S,wt as T,bt as U,zt as V,ot as W,a as X,le as Y,Jt as Z,k as _,we as a,Vt as a0,Fe as a1,mt as a2,vt as a3,M as a4,qt as a5,fe as a6,oe as a7,be as a8,ye as a9,ve as b,$e as c,Pe as d,je as e,Ke as f,ze as g,Ve as h,Dt as i,ge as j,Ue as k,xe as l,ke as m,h as n,Ht as o,p,n as q,Ut as r,Le as s,nt as t,$ as u,z as v,L as w,s as x,A as y,D as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as t,p as e,q as n,t as i,u as s,w as r,v as o,x as a,y as u,z as l,A as c,B as h,C as d,D as p,E as m,F as f,G as y,H as v,I as g,J as w,K as T,M as b,W as A,L as x,N as S,O as k,P as M,Q as C,R as V,S as E,T as P,r as D,U as O,V as F,i as I,o as L,X as K,Y as R,Z as B,_ as j,$ as q,a0 as N,a1 as U,a2 as H,a3 as $,a4 as W,d as G,s as _,a5 as z,a6 as Y,k as X,e as J,f as Z,a7 as Q,b as tt,a8 as et,j as nt,a9 as it,g as st}from"./size-rollup-dom-animation-assets.js";import{Fragment as rt}from"react";const ot=(t,e)=>n=>e(t(n)),at=(...t)=>t.reduce(ot),ut=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},lt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ct(e,n,i,s){if(e===n&&i===s)return t;const r=t=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=lt(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(t,0,1,e,i);return t=>0===t||1===t?t:lt(r(t),n,s)}const ht=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,dt=t=>e=>1-t(1-e),pt=ct(.33,1.53,.69,.99),mt=dt(pt),ft=ht(mt),yt=t=>(t*=2)<1?.5*mt(t):.5*(2-Math.pow(2,-10*(t-1))),vt=t=>1-Math.sin(Math.acos(t)),gt=dt(vt),wt=ht(vt),Tt=ct(.42,0,1,1),bt=ct(0,0,.58,1),At=ct(.42,0,.58,1),xt={linear:t,easeIn:Tt,easeInOut:At,easeOut:bt,circIn:vt,circInOut:wt,circOut:gt,backIn:mt,backInOut:ft,backOut:pt,anticipate:yt},St=t=>{if(e(t)){n(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,i,s,r]=t;return ct(e,i,s,r)}return"string"==typeof t?(n(void 0!==xt[t],`Invalid easing type '${t}'`,"invalid-easing-type"),xt[t]):t};function kt(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 Mt(t,e){return n=>n>0?e:t}const Ct=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Vt=[a,s,o];function Et(t){const e=(n=t,Vt.find(t=>t.test(n)));var n;if(r(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===o&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),r=kt(a,i,t),o=kt(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const Pt=(t,e)=>{const n=Et(t),r=Et(e);if(!n||!r)return Mt(t,e);const o={...n};return t=>(o.red=Ct(n.red,r.red,t),o.green=Ct(n.green,r.green,t),o.blue=Ct(n.blue,r.blue,t),o.alpha=i(n.alpha,r.alpha,t),s.transform(o))},Dt=new Set(["none","hidden"]);function Ot(t,e){return n=>i(t,e,n)}function Ft(t){return"number"==typeof t?Ot:"string"==typeof t?u(t)?Mt:l.test(t)?Pt:Kt:Array.isArray(t)?It:"object"==typeof t?l.test(t)?Pt:Lt:Mt}function It(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ft(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Lt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ft(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Kt=(t,e)=>{const n=c.createTransformer(e),i=h(t),s=h(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Dt.has(t)&&!s.values.length||Dt.has(e)&&!i.values.length?function(t,e){return Dt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):at(It(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(r(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Mt(t,e))};function Rt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return i(t,e,n);return Ft(t)(t,e)}const Bt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>d.update(e,t),stop:()=>p(e),now:()=>m.isProcessing?m.timestamp:f.now()}},jt=2e4;function qt(t){let e=0;let n=t.next(e);for(;!n.done&&e<jt;)e+=50,n=t.next(e);return e>=jt?1/0:e}function Nt(t,e,n){const i=Math.max(e-5,0);return v(n-t(i),e-i)}const Ut=100,Ht=10,$t=1,Wt=0,Gt=800,_t=.3,zt=.3,Yt={granular:.01,default:2},Xt={granular:.005,default:.5},Jt=.01,Zt=10,Qt=.05,te=1,ee=.001;function ne({duration:t=Gt,bounce:e=_t,velocity:n=Wt,mass:i=$t}){let s,o;r(t<=g(Zt),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=w(Qt,te,a),t=w(Jt,Zt,y(t)),a<1?(s=e=>{const i=e*a,s=i*t,r=i-n,o=se(e,a),u=Math.exp(-s);return ee-r/o*u},o=e=>{const i=e*a*t,r=i*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=se(Math.pow(e,2),a);return(-s(e)+ee>0?-1:1)*((r-o)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let i=n;for(let n=1;n<ie;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=g(t),isNaN(u))return{stiffness:Ut,damping:Ht,duration:t};{const e=Math.pow(u,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const ie=12;function se(t,e){return t*Math.sqrt(1-e*e)}const re=["duration","bounce"],oe=["stiffness","damping","mass"];function ae(t,e){return e.some(e=>void 0!==t[e])}function ue(t=zt,e=_t){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Wt,stiffness:Ut,damping:Ht,mass:$t,isResolvedFromDuration:!1,...t};if(!ae(t,oe)&&ae(t,re))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*w(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:$t,stiffness:s,damping:r}}else{const n=ne(t);e={...e,...n,mass:$t},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),m=d||0,f=l/(2*Math.sqrt(u*c)),v=o-r,b=y(Math.sqrt(u/c)),A=Math.abs(v)<5;let x;if(i||(i=A?Yt.granular:Yt.default),s||(s=A?Xt.granular:Xt.default),f<1){const t=se(b,f);x=e=>{const n=Math.exp(-f*b*e);return o-n*((m+f*b*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===f)x=t=>o-Math.exp(-b*t)*(v+(m+b*v)*t);else{const t=b*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*b*e),i=Math.min(t*e,300);return o-n*((m+f*b*v)*Math.sinh(i)+t*v*Math.cosh(i))/t}}const S={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?g(m):Nt(x,t,e));const r=Math.abs(n)<=i,u=Math.abs(o-e)<=s;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(qt(S),jt),e=T(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function le({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=h+m,y=void 0===o?f:o(f);y!==f&&(m=y-h);const v=t=>-m*Math.exp(-t/i),g=t=>y+v(t),w=t=>{const e=v(t),n=g(t);d.done=Math.abs(e)<=l,d.value=d.done?y:n};let T,b;const A=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(T=t,b=ue({keyframes:[d.value,p(d.value)],velocity:Nt(g,t,d.value),damping:s,stiffness:r,restDelta:l,restSpeed:c}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==T||(e=!0,w(t),A(t)),void 0!==T&&t>=T?b.next(t-T):(!e&&w(t),d)}}}function ce(e,i,{clamp:s=!0,ease:r,mixer:o}={}){const a=e.length;if(n(a===i.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>i[0];if(2===a&&i[0]===i[1])return()=>i[1];const u=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),i=[...i].reverse());const l=function(e,n,i){const s=[],r=i||b.mix||Rt,o=e.length-1;for(let i=0;i<o;i++){let o=r(e[i],e[i+1]);if(n){const e=Array.isArray(n)?n[i]||t:n;o=at(e,o)}s.push(o)}return s}(i,r,o),c=l.length,h=t=>{if(u&&t<e[0])return i[0];let n=0;if(c>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const s=ut(e[n],e[n+1],t);return l[n](s)};return s?t=>h(w(e[0],e[a-1],t)):h}function he(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=ut(0,e,s);t.push(i(n,1,r))}}(e,t.length-1),e}function de({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(St):St(i),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:he(e),t),a=ce(o,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map(()=>l||At).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}ue.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(qt(i),jt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}(t,100,ue);return t.ease=e.ease,t.duration=g(e.duration),t.type="keyframes",t};const pe={decay:le,inertia:le,tween:de,keyframes:de,spring:ue};function me(t){"string"==typeof t.type&&(t.type=pe[t.type])}const fe=t=>t/100;class ye extends A{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==f.now()&&this.tick(f.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;me(t);const{type:e=de,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||de;a!==de&&"number"!=typeof o[0]&&(this.mixKeyframes=at(fe,Rt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=qt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:l,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let g=this.currentTime,T=n;if(c){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/o)):"mirror"===h&&(T=r)),g=w(0,1,n)*o}const b=v?{done:!1,value:l[0]}:T.next(g);s&&(b.value=s(b.value));let{done:A}=b;v||null===a||(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&A);return S&&p!==le&&(b.value=x(l,this.options,f,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=g(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(f.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Bt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(f.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const ve={anticipate:yt,backInOut:ft,circInOut:wt};function ge(t){"string"==typeof t.ease&&t.ease in ve&&(t.ease=ve[t.ease])}class we extends S{constructor(t){ge(t),me(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new ye({...r,autoplay:!1}),a=Math.max(10,f.now()-this.startTime),u=w(0,10,a-10);e.setWithVelocity(o.sample(Math.max(0,a-u)).value,o.sample(a).value,u),o.stop()}}const Te=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!c.test(t)&&"0"!==t||t.startsWith("url(")));function be(t){t.duration=0,t.type="keyframes"}const Ae=new Set(["opacity","clipPath","filter","transform"]),xe=M(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Se extends A{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:u,element:l,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=f.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||C;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:o,type:a,velocity:u,delay:l,isHandoff:c,onUpdate:h}=i;this.resolvedAt=f.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],a=Te(s,e),u=Te(o,e);return r(a===u,`You are trying to animate ${e} from "${s}" to "${o}". "${a?o:s}" is not an animatable value.`,"value-not-animatable"),!(!a||!u)&&(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||k(n))&&i)}(e,o,a,u)||(!b.instantAnimations&&l||h?.(x(e,i,n)),e[0]=e[e.length-1],be(i),i.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return xe()&&n&&Ae.has(n)&&("transform"!==n||!l)&&!u&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(d),m=d.motionValue?.owner?.current,y=p?new we({...d,element:m}):new ye(d);y.finished.then(()=>{this.notifyFinished()}).catch(t),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),V()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function ke(t,e,n,i=0,s=1){const r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}const Me=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ce(t,e,i=1){n(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=function(t){const e=Me.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return E(t)?parseFloat(t):t}return u(r)?Ce(r,e,i+1):r}const Ve={type:"spring",stiffness:500,damping:25,restSpeed:10},Ee={type:"keyframes",duration:.8},Pe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},De=(t,{keyframes:e})=>e.length>2?Ee:P.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ve:Pe,Oe=t=>null!==t;function Fe(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ie(t,e){const n=t?.[e]??t?.default??t;return n!==t?Fe(n,t):n}const Le=(t,e,n,i={},s,r)=>o=>{const a=Ie(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=g(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(a)||Object.assign(c,De(t,c)),c.duration&&(c.duration=g(c.duration)),c.repeatDelay&&(c.repeatDelay=g(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(be(c),0===c.delay&&(h=!0)),(b.instantAnimations||b.skipAnimations||s?.shouldSkipAnimations)&&(h=!0,be(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Oe),r=e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(c.keyframes,a);if(void 0!==t)return void d.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new ye(c):new Se(c)};function Ke(t,e,n){const i=t.getProps();return D(i,e,void 0!==n?n:i.custom,t)}const Re=new Set(["width","height","top","left","right","bottom",...O]),Be=t=>Array.isArray(t);function je(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,F(n))}function qe(t){return Be(t)?t[t.length-1]||0:t}function Ne(t,e){const n=t.getValue("willChange");if(i=n,Boolean(I(i)&&i.add))return n.add(e);if(!n&&b.WillChange){const n=new b.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Ue(t){return t.props[L]}function He({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function $e(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Fe(r,u):u;const l=r?.reduceMotion;i&&(r=i);const c=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&He(h,e))continue;const o={delay:n,...Ie(r||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!o.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const n=Ue(t);if(n){const t=window.MotionHandoffAnimation(n,e,d);null!==t&&(o.startTime=t,p=!0)}}Ne(t,e);const m=l??t.shouldReduceMotion;i.start(Le(e,i,s,m&&Re.has(e)?{type:!1}:o,t,p));const f=i.animation;f&&c.push(f)}if(o){const e=()=>d.update(()=>{o&&function(t,e){const n=Ke(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)je(t,e,qe(r[e]))}(t,o)});c.length?Promise.all(c).then(e):e()}return c}function We(t,e,n={}){const i=Ke(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all($e(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(We(u,e,{...o,delay:n+("function"==typeof i?0:i)+ke(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function Ge(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||K(t))}const _e=new Set(["auto","none","0"]);class ze extends C{constructor(t,e,n,i,s){super(t,e,n,i,s,!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 i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=Ce(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Re.has(n)||2!==t.length)return;const[i,s]=t,r=B(i),o=B(s);if(j(i)!==j(s)&&q[n])this.needsMeasurement=!0;else if(r!==o)if(N(r)&&N(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else q[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ge(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!_e.has(e)&&h(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=R(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=q[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=q[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ye=!1;function Xe(){return Ye}function Je(t,e){const n=function(t){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t).filter(t=>null!=t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ze(t,e,n={}){const[i,s,r]=Je(t,n);return i.forEach(t=>{let n,i=!1,r=!1;const o=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",u)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),r&&(r=!1,o(t))},u=t=>{"touch"!==t.pointerType&&(i?r=!0:o(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Xe())return;r=!1;const o=e(t,i);"function"==typeof o&&(n=o,t.addEventListener("pointerleave",u,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),r}const Qe=(t,e)=>!!e&&(t===e||Qe(t,e.parentElement)),tn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const en=new WeakSet;function nn(t){return e=>{"Enter"===e.key&&t(e)}}function sn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rn(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!Xe()}const on=new WeakSet;function an(t,e,n={}){const[i,s,r]=Je(t,n),o=t=>{const i=t.currentTarget;if(!rn(t))return;if(on.has(t))return;en.add(i),n.stopPropagation&&on.add(t);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),en.has(i)&&en.delete(i),rn(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||Qe(i,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach(t=>{var e,i;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),"object"==typeof(i=e=t)&&null!==i&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=nn(()=>{if(en.has(n))return;sn(n,"down");const t=nn(()=>{sn(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>sn(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return tn.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}class un extends U{constructor(){super(...arguments),this.KeyframeResolver=ze}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;I(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class ln{constructor(t){this.isMounted=!1,this.node=t}update(){}}function cn(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}class hn extends un{constructor(){super(...arguments),this.type="html",this.renderInstance=cn}readValueFromInstance(t,e){if(P.has(e))return this.projection?.isProjecting?H(e):$(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(W(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){G(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _(t,e,n)}}const dn=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"]);class pn extends un{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(P.has(e)){const t=Q(e);return t&&t.default||0}return e=dn.has(e)?e:z(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return X(t,e,n)}build(t,e,n){J(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){cn(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(dn.has(n)?n:z(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Z(t.tagName),super.mount(t)}}const mn=et.length;function fn(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&fn(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<mn;n++){const i=et[n],s=t.props[i];(tt(s)||!1===s)&&(e[i]=s)}return e}function yn(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const vn=[...it].reverse(),gn=it.length;function wn(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>We(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=We(t,e,n);else{const s="function"==typeof e?Ke(t,e,n.custom):e;i=Promise.all($e(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Tn(t){let e=wn(t),n=xn(),i=!0;const s=e=>(n,i)=>{const s=Ke(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:o}=t,a=fn(t.parent)||{},u=[],l=new Set;let c={},h=1/0;for(let e=0;e<gn;e++){const d=vn[e],p=n[d],m=void 0!==o[d]?o[d]:a[d],f=tt(m),y=d===r?p.isActive:null;!1===y&&(h=e);let v=m===a[d]&&m!==o[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||nt(m)||"boolean"==typeof m)continue;if("exit"===d&&p.isActive&&!0!==y){p.prevResolvedValues&&(c={...c,...p.prevResolvedValues});continue}const g=bn(p.prevProp,m);let w=g||d===r&&p.isActive&&!v&&f||e>h&&f,T=!1;const b=Array.isArray(m)?m:[m];let A=b.reduce(s(d),{});!1===y&&(A={});const{prevResolvedValues:x={}}=p,S={...x,...A},k=e=>{w=!0,l.has(e)&&(T=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=A[t],n=x[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Be(e)&&Be(n)?!yn(e,n):e!==n,i?null!=e?k(t):l.add(t):void 0!==e&&l.has(t)?k(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=A,p.isActive&&(c={...c,...A}),i&&t.blockInitialAnimation&&(w=!1);const M=v&&g;w&&(!M||T)&&u.push(...b.map(e=>{const n={type:d};if("string"==typeof e&&i&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Ke(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ke(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof o.initial){const n=Ke(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=xn()}}}function bn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yn(e,t)}function An(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xn(){return{animate:An(!0),whileInView:An(),whileHover:An(),whileTap:An(),whileDrag:An(),whileFocus:An(),exit:An()}}function Sn(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}let kn=0;const Mn={animation:{Feature:class extends ln{constructor(t){super(t),t.animationState||(t.animationState=Tn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();nt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ln{constructor(){super(...arguments),this.id=kn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Cn(t){return{point:{x:t.pageX,y:t.pageY}}}function Vn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&d.postRender(()=>s(e,Cn(e)))}function En(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&d.postRender(()=>s(e,Cn(e)))}const Pn=new WeakMap,Dn=new WeakMap,On=t=>{const e=Pn.get(t.target);e&&e(t)},Fn=t=>{t.forEach(On)};function In(t,e,n){const i=function({root:t,...e}){const n=t||document;Dn.has(n)||Dn.set(n,{});const i=Dn.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Fn,{root:t,...e})),i[s]}(e);return Pn.set(t,n),i.observe(t),()=>{Pn.delete(t),i.unobserve(t)}}const Ln={some:0,all:1};const Kn={renderer:(t,e)=>e.isSVG??st(t)?new pn(e):new hn(e,{allowProjection:t!==rt}),...Mn,...{inView:{Feature:class extends ln{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ln[i]};return In(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=e?n:i;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ln{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=an(t,(t,e)=>(En(this.node,e,"Start"),(t,{success:e})=>En(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends ln{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=at(Sn(this.node.current,"focus",()=>this.onFocus()),Sn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ln{mount(){const{current:t}=this.node;t&&(this.unmount=Ze(t,(t,e)=>(Vn(this.node,e,"Start"),t=>Vn(this.node,t,"End"))))}unmount(){}}}}};export{Kn as domAnimation};
|
|
1
|
+
import{n as t,p as e,q as n,t as i,u as s,v as r,w as o,x as a,y as u,z as l,A as c,B as h,C as d,D as p,E as m,F as f,G as y,H as v,I as g,J as w,K as T,M as b,W as A,L as x,N as S,O as k,P as M,Q as C,R as V,S as E,T as P,r as D,U as O,V as F,i as I,o as L,X as K,Y as R,Z as B,_ as j,$ as q,a0 as N,a1 as U,a2 as H,a3 as $,a4 as W,d as G,s as _,a5 as z,a6 as Y,k as X,e as J,f as Z,a7 as Q,b as tt,a8 as et,j as nt,a9 as it,g as st}from"./size-rollup-dom-animation-assets.js";import{Fragment as rt}from"react";const ot=(t,e)=>n=>e(t(n)),at=(...t)=>t.reduce(ot),ut=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},lt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ct(e,n,i,s){if(e===n&&i===s)return t;const r=t=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=lt(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(t,0,1,e,i);return t=>0===t||1===t?t:lt(r(t),n,s)}const ht=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,dt=t=>e=>1-t(1-e),pt=ct(.33,1.53,.69,.99),mt=dt(pt),ft=ht(mt),yt=t=>(t*=2)<1?.5*mt(t):.5*(2-Math.pow(2,-10*(t-1))),vt=t=>1-Math.sin(Math.acos(t)),gt=dt(vt),wt=ht(vt),Tt=ct(.42,0,1,1),bt=ct(0,0,.58,1),At=ct(.42,0,.58,1),xt={linear:t,easeIn:Tt,easeInOut:At,easeOut:bt,circIn:vt,circInOut:wt,circOut:gt,backIn:mt,backInOut:ft,backOut:pt,anticipate:yt},St=t=>{if(e(t)){n(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,i,s,r]=t;return ct(e,i,s,r)}return"string"==typeof t?(n(void 0!==xt[t],`Invalid easing type '${t}'`,"invalid-easing-type"),xt[t]):t};function kt(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 Mt(t,e){return n=>n>0?e:t}const Ct=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Vt=[o,s,r];function Et(t){const e=(n=t,Vt.find(t=>t.test(n)));var n;if(a(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===r&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),r=kt(a,i,t),o=kt(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const Pt=(t,e)=>{const n=Et(t),r=Et(e);if(!n||!r)return Mt(t,e);const o={...n};return t=>(o.red=Ct(n.red,r.red,t),o.green=Ct(n.green,r.green,t),o.blue=Ct(n.blue,r.blue,t),o.alpha=i(n.alpha,r.alpha,t),s.transform(o))},Dt=new Set(["none","hidden"]);function Ot(t,e){return n=>i(t,e,n)}function Ft(t){return"number"==typeof t?Ot:"string"==typeof t?u(t)?Mt:l.test(t)?Pt:Kt:Array.isArray(t)?It:"object"==typeof t?l.test(t)?Pt:Lt:Mt}function It(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ft(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Lt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ft(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Kt=(t,e)=>{const n=c.createTransformer(e),i=h(t),s=h(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Dt.has(t)&&!s.values.length||Dt.has(e)&&!i.values.length?function(t,e){return Dt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):at(It(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(a(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Mt(t,e))};function Rt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return i(t,e,n);return Ft(t)(t,e)}const Bt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>f.update(e,t),stop:()=>m(e),now:()=>d.isProcessing?d.timestamp:p.now()}},jt=2e4;function qt(t){let e=0;let n=t.next(e);for(;!n.done&&e<jt;)e+=50,n=t.next(e);return e>=jt?1/0:e}function Nt(t,e,n){const i=Math.max(e-5,0);return v(n-t(i),e-i)}const Ut=100,Ht=10,$t=1,Wt=0,Gt=800,_t=.3,zt=.3,Yt={granular:.01,default:2},Xt={granular:.005,default:.5},Jt=.01,Zt=10,Qt=.05,te=1,ee=.001;function ne({duration:t=Gt,bounce:e=_t,velocity:n=Wt,mass:i=$t}){let s,r;a(t<=g(Zt),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=w(Qt,te,o),t=w(Jt,Zt,y(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=se(e,o),u=Math.exp(-s);return ee-r/a*u},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=se(Math.pow(e,2),o);return(-s(e)+ee>0?-1:1)*((r-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let i=n;for(let n=1;n<ie;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=g(t),isNaN(u))return{stiffness:Ut,damping:Ht,duration:t};{const e=Math.pow(u,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const ie=12;function se(t,e){return t*Math.sqrt(1-e*e)}const re=["duration","bounce"],oe=["stiffness","damping","mass"];function ae(t,e){return e.some(e=>void 0!==t[e])}function ue(t=zt,e=_t){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Wt,stiffness:Ut,damping:Ht,mass:$t,isResolvedFromDuration:!1,...t};if(!ae(t,oe)&&ae(t,re))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*w(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:$t,stiffness:s,damping:r}}else{const n=ne({...t,velocity:0});e={...e,...n,mass:$t},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),m=d||0,f=l/(2*Math.sqrt(u*c)),v=o-r,b=y(Math.sqrt(u/c)),A=Math.abs(v)<5;let x;if(i||(i=A?Yt.granular:Yt.default),s||(s=A?Xt.granular:Xt.default),f<1){const t=se(b,f);x=e=>{const n=Math.exp(-f*b*e);return o-n*((m+f*b*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===f)x=t=>o-Math.exp(-b*t)*(v+(m+b*v)*t);else{const t=b*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*b*e),i=Math.min(t*e,300);return o-n*((m+f*b*v)*Math.sinh(i)+t*v*Math.cosh(i))/t}}const S={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?g(m):Nt(x,t,e));const r=Math.abs(n)<=i,u=Math.abs(o-e)<=s;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(qt(S),jt),e=T(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function le({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=h+m,y=void 0===o?f:o(f);y!==f&&(m=y-h);const v=t=>-m*Math.exp(-t/i),g=t=>y+v(t),w=t=>{const e=v(t),n=g(t);d.done=Math.abs(e)<=l,d.value=d.done?y:n};let T,b;const A=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(T=t,b=ue({keyframes:[d.value,p(d.value)],velocity:Nt(g,t,d.value),damping:s,stiffness:r,restDelta:l,restSpeed:c}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==T||(e=!0,w(t),A(t)),void 0!==T&&t>=T?b.next(t-T):(!e&&w(t),d)}}}function ce(e,i,{clamp:s=!0,ease:r,mixer:o}={}){const a=e.length;if(n(a===i.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>i[0];if(2===a&&i[0]===i[1])return()=>i[1];const u=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),i=[...i].reverse());const l=function(e,n,i){const s=[],r=i||b.mix||Rt,o=e.length-1;for(let i=0;i<o;i++){let o=r(e[i],e[i+1]);if(n){const e=Array.isArray(n)?n[i]||t:n;o=at(e,o)}s.push(o)}return s}(i,r,o),c=l.length,h=t=>{if(u&&t<e[0])return i[0];let n=0;if(c>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const s=ut(e[n],e[n+1],t);return l[n](s)};return s?t=>h(w(e[0],e[a-1],t)):h}function he(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=ut(0,e,s);t.push(i(n,1,r))}}(e,t.length-1),e}function de({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(St):St(i),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:he(e),t),a=ce(o,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map(()=>l||At).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}ue.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(qt(i),jt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}(t,100,ue);return t.ease=e.ease,t.duration=g(e.duration),t.type="keyframes",t};const pe={decay:le,inertia:le,tween:de,keyframes:de,spring:ue};function me(t){"string"==typeof t.type&&(t.type=pe[t.type])}const fe=t=>t/100;class ye extends A{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==p.now()&&this.tick(p.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;me(t);const{type:e=de,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||de;a!==de&&"number"!=typeof o[0]&&(this.mixKeyframes=at(fe,Rt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=qt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:l,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let g=this.currentTime,T=n;if(c){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/o)):"mirror"===h&&(T=r)),g=w(0,1,n)*o}const b=v?{done:!1,value:l[0]}:T.next(g);s&&(b.value=s(b.value));let{done:A}=b;v||null===a||(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&A);return S&&p!==le&&(b.value=x(l,this.options,f,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=g(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(p.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Bt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(p.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const ve={anticipate:yt,backInOut:ft,circInOut:wt};function ge(t){"string"==typeof t.ease&&t.ease in ve&&(t.ease=ve[t.ease])}class we extends S{constructor(t){ge(t),me(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new ye({...r,autoplay:!1}),a=Math.max(10,p.now()-this.startTime),u=w(0,10,a-10);e.setWithVelocity(o.sample(Math.max(0,a-u)).value,o.sample(a).value,u),o.stop()}}const Te=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!c.test(t)&&"0"!==t||t.startsWith("url(")));function be(t){t.duration=0,t.type="keyframes"}const Ae=new Set(["opacity","clipPath","filter","transform"]),xe=M(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Se extends A{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:u,element:l,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=p.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||C;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:u,delay:l,isHandoff:c,onUpdate:h}=i;this.resolvedAt=p.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=Te(s,e),u=Te(r,e);return a(o===u,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!(!o||!u)&&(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||k(n))&&i)}(e,r,o,u)||(!b.instantAnimations&&l||h?.(x(e,i,n)),e[0]=e[e.length-1],be(i),i.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return xe()&&n&&Ae.has(n)&&("transform"!==n||!l)&&!u&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(d),f=d.motionValue?.owner?.current,y=m?new we({...d,element:f}):new ye(d);y.finished.then(()=>{this.notifyFinished()}).catch(t),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),V()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function ke(t,e,n,i=0,s=1){const r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}const Me=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ce(t,e,i=1){n(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=function(t){const e=Me.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return E(t)?parseFloat(t):t}return u(r)?Ce(r,e,i+1):r}const Ve={type:"spring",stiffness:500,damping:25,restSpeed:10},Ee={type:"keyframes",duration:.8},Pe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},De=(t,{keyframes:e})=>e.length>2?Ee:P.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ve:Pe,Oe=t=>null!==t;function Fe(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ie(t,e){const n=t?.[e]??t?.default??t;return n!==t?Fe(n,t):n}const Le=(t,e,n,i={},s,r)=>o=>{const a=Ie(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=g(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(a)||Object.assign(c,De(t,c)),c.duration&&(c.duration=g(c.duration)),c.repeatDelay&&(c.repeatDelay=g(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(be(c),0===c.delay&&(h=!0)),(b.instantAnimations||b.skipAnimations||s?.shouldSkipAnimations)&&(h=!0,be(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"}){const i=t.filter(Oe);return i[e&&"loop"!==n&&e%2==1?0:i.length-1]}(c.keyframes,a);if(void 0!==t)return void f.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new ye(c):new Se(c)};function Ke(t,e,n){const i=t.getProps();return D(i,e,void 0!==n?n:i.custom,t)}const Re=new Set(["width","height","top","left","right","bottom",...O]),Be=t=>Array.isArray(t);function je(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,F(n))}function qe(t){return Be(t)?t[t.length-1]||0:t}function Ne(t,e){const n=t.getValue("willChange");if(i=n,Boolean(I(i)&&i.add))return n.add(e);if(!n&&b.WillChange){const n=new b.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Ue(t){return t.props[L]}function He({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function $e(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Fe(r,u):u;const l=r?.reduceMotion;i&&(r=i);const c=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&He(h,e))continue;const o={delay:n,...Ie(r||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=Ue(t);if(n){const t=window.MotionHandoffAnimation(n,e,f);null!==t&&(o.startTime=t,d=!0)}}Ne(t,e);const p=l??t.shouldReduceMotion;i.start(Le(e,i,s,p&&Re.has(e)?{type:!1}:o,t,d));const m=i.animation;m&&c.push(m)}if(o){const e=()=>f.update(()=>{o&&function(t,e){const n=Ke(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)je(t,e,qe(r[e]))}(t,o)});c.length?Promise.all(c).then(e):e()}return c}function We(t,e,n={}){const i=Ke(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all($e(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(We(u,e,{...o,delay:n+("function"==typeof i?0:i)+ke(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function Ge(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||K(t))}const _e=new Set(["auto","none","0"]);class ze extends C{constructor(t,e,n,i,s){super(t,e,n,i,s,!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 i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=Ce(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Re.has(n)||2!==t.length)return;const[i,s]=t,r=B(i),o=B(s);if(j(i)!==j(s)&&q[n])this.needsMeasurement=!0;else if(r!==o)if(N(r)&&N(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else q[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ge(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!_e.has(e)&&h(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=R(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=q[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=q[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ye=!1;function Xe(t,e){const n=function(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(t=>null!=t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Je(t){return!("touch"===t.pointerType||Ye)}function Ze(t,e,n={}){const[i,s,r]=Xe(t,n);return i.forEach(t=>{let n,i=!1,r=!1;const o=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",u)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),r&&(r=!1,o(t))},u=t=>{"touch"!==t.pointerType&&(i?r=!0:o(t))};t.addEventListener("pointerenter",i=>{if(!Je(i))return;r=!1;const o=e(t,i);"function"==typeof o&&(n=o,t.addEventListener("pointerleave",u,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),r}const Qe=(t,e)=>!!e&&(t===e||Qe(t,e.parentElement)),tn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const en=new WeakSet;function nn(t){return e=>{"Enter"===e.key&&t(e)}}function sn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rn(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!0}const on=new WeakSet;function an(t,e,n={}){const[i,s,r]=Xe(t,n),o=t=>{const i=t.currentTarget;if(!rn(t))return;if(on.has(t))return;en.add(i),n.stopPropagation&&on.add(t);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),en.has(i)&&en.delete(i),rn(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||Qe(i,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach(t=>{var e,i;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),"object"==typeof(i=e=t)&&null!==i&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=nn(()=>{if(en.has(n))return;sn(n,"down");const t=nn(()=>{sn(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>sn(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return tn.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}class un extends U{constructor(){super(...arguments),this.KeyframeResolver=ze}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;I(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class ln{constructor(t){this.isMounted=!1,this.node=t}update(){}}function cn(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}class hn extends un{constructor(){super(...arguments),this.type="html",this.renderInstance=cn}readValueFromInstance(t,e){if(P.has(e))return this.projection?.isProjecting?H(e):$(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(W(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){G(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _(t,e,n)}}const dn=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"]);class pn extends un{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(P.has(e)){const t=Q(e);return t&&t.default||0}return e=dn.has(e)?e:z(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return X(t,e,n)}build(t,e,n){J(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){cn(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(dn.has(n)?n:z(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Z(t.tagName),super.mount(t)}}const mn=et.length;function fn(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&fn(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<mn;n++){const i=et[n],s=t.props[i];(tt(s)||!1===s)&&(e[i]=s)}return e}function yn(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const vn=[...it].reverse(),gn=it.length;function wn(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>We(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=We(t,e,n);else{const s="function"==typeof e?Ke(t,e,n.custom):e;i=Promise.all($e(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Tn(t){let e=wn(t),n=xn(),i=!0;const s=e=>(n,i)=>{const s=Ke(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:o}=t,a=fn(t.parent)||{},u=[],l=new Set;let c={},h=1/0;for(let e=0;e<gn;e++){const d=vn[e],p=n[d],m=void 0!==o[d]?o[d]:a[d],f=tt(m),y=d===r?p.isActive:null;!1===y&&(h=e);let v=m===a[d]&&m!==o[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||nt(m)||"boolean"==typeof m)continue;if("exit"===d&&p.isActive&&!0!==y){p.prevResolvedValues&&(c={...c,...p.prevResolvedValues});continue}const g=bn(p.prevProp,m);let w=g||d===r&&p.isActive&&!v&&f||e>h&&f,T=!1;const b=Array.isArray(m)?m:[m];let A=b.reduce(s(d),{});!1===y&&(A={});const{prevResolvedValues:x={}}=p,S={...x,...A},k=e=>{w=!0,l.has(e)&&(T=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=A[t],n=x[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Be(e)&&Be(n)?!yn(e,n):e!==n,i?null!=e?k(t):l.add(t):void 0!==e&&l.has(t)?k(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=A,p.isActive&&(c={...c,...A}),i&&t.blockInitialAnimation&&(w=!1);const M=v&&g;w&&(!M||T)&&u.push(...b.map(e=>{const n={type:d};if("string"==typeof e&&i&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Ke(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ke(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof o.initial){const n=Ke(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=xn()}}}function bn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yn(e,t)}function An(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xn(){return{animate:An(!0),whileInView:An(),whileHover:An(),whileTap:An(),whileDrag:An(),whileFocus:An(),exit:An()}}function Sn(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}let kn=0;const Mn={animation:{Feature:class extends ln{constructor(t){super(t),t.animationState||(t.animationState=Tn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();nt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ln{constructor(){super(...arguments),this.id=kn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Cn(t){return{point:{x:t.pageX,y:t.pageY}}}function Vn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&f.postRender(()=>s(e,Cn(e)))}function En(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&f.postRender(()=>s(e,Cn(e)))}const Pn=new WeakMap,Dn=new WeakMap,On=t=>{const e=Pn.get(t.target);e&&e(t)},Fn=t=>{t.forEach(On)};function In(t,e,n){const i=function({root:t,...e}){const n=t||document;Dn.has(n)||Dn.set(n,{});const i=Dn.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Fn,{root:t,...e})),i[s]}(e);return Pn.set(t,n),i.observe(t),()=>{Pn.delete(t),i.unobserve(t)}}const Ln={some:0,all:1};const Kn={renderer:(t,e)=>e.isSVG??st(t)?new pn(e):new hn(e,{allowProjection:t!==rt}),...Mn,...{inView:{Feature:class extends ln{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ln[i]};return In(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=e?n:i;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ln{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=an(t,(t,e)=>(En(this.node,e,"Start"),(t,{success:e})=>En(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends ln{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=at(Sn(this.node.current,"focus",()=>this.onFocus()),Sn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ln{mount(){const{current:t}=this.node;t&&(this.unmount=Ze(t,(t,e)=>(Vn(this.node,e,"Start"),t=>Vn(this.node,t,"End"))))}unmount(){}}}}};export{Kn as domAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t}from"react";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function s(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const n=(t,e,s)=>s>e?e:s<t?t:s;function i(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let a=()=>{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(a=(t,e,s)=>{t||"undefined"==typeof console||console.warn(i(e,s))},r=(t,e,s)=>{if(!t)throw new Error(i(e,s))});const o={},h=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t;class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>s(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const p=t=>1e3*t,f=t=>t/1e3;function m(t,e){return e?t*(1e3/e):0}const g=t=>Array.isArray(t)&&"number"==typeof t[0],v=t({}),y=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],b={value:null,addProjectionMetrics:null};function w(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=y.reduce((t,s)=>(t[s]=function(t,e){let s=new Set,n=new Set,i=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},h=0;function l(e){r.has(e)&&(u.schedule(e),t()),h++,e(o)}const u={schedule:(t,e=!1,a=!1)=>{const o=a&&i?s:n;return e&&r.add(t),o.has(t)||o.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,i?a=!0:(i=!0,[s,n]=[n,s],s.forEach(l),e&&b.value&&b.value.frameloop[e].push(h),h=0,s.clear(),i=!1,a&&(a=!1,u.process(t)))}};return u}(a,e?s:void 0),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:f,postRender:m}=r,g=()=>{const a=o.useManualTiming?i.timestamp:performance.now();s=!1,o.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,h.process(i),l.process(i),u.process(i),c.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(g))};return{schedule:y.reduce((e,a)=>{const o=r[a];return e[a]=(e,a=!1,r=!1)=>(s||(s=!0,n=!0,i.isProcessing||t(g)),o.schedule(e,a,r)),e},{}),cancel:t=>{for(let e=0;e<y.length;e++)r[y[e]].cancel(t)},state:i,steps:r}}const{schedule:V,cancel:S,state:M,steps:T}=w("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let A;function C(){A=void 0}const k={now:()=>(void 0===A&&k.set(M.isProcessing||o.useManualTiming?M.timestamp:performance.now()),A),set:t=>{A=t,queueMicrotask(C)}},x=t=>e=>"string"==typeof e&&e.startsWith(t),F=x("--"),P=x("var(--"),E=t=>!!P(t)&&B.test(t.split("/*")[0].trim()),B=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function R(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const I={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},N={...I,transform:t=>n(0,1,t)},O={...I,default:1},$=t=>Math.round(1e5*t)/1e5,L=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,j=(t,e)=>s=>Boolean("string"==typeof s&&Y.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),W=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,a,r,o]=n.match(L);return{[t]:parseFloat(i),[e]:parseFloat(a),[s]:parseFloat(r),alpha:void 0!==o?parseFloat(o):1}},X={...I,transform:t=>Math.round((t=>n(0,255,t))(t))},K={test:j("rgb","red"),parse:W("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(s)+", "+$(N.transform(n))+")"};const U={test:j("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:K.transform},Z=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),z=Z("deg"),D=Z("%"),q=Z("px"),H=Z("vh"),_=Z("vw"),G=(()=>({...D,parse:t=>D.parse(t)/100,transform:t=>D.transform(100*t)}))(),J={test:j("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+D.transform($(e))+", "+D.transform($(s))+", "+$(N.transform(n))+")"},Q={test:t=>K.test(t)||U.test(t)||J.test(t),parse:t=>K.test(t)?K.parse(t):J.test(t)?J.parse(t):U.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?K.transform(t):J.transform(t),getAnimatableNone:t=>{const e=Q.parse(t);return e.alpha=0,Q.transform(e)}},tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const et="number",st="color",nt=/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 it(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let a=0;const r=e.replace(nt,t=>(Q.test(t)?(n.color.push(a),i.push(st),s.push(Q.parse(t))):t.startsWith("var(")?(n.var.push(a),i.push("var"),s.push(t)):(n.number.push(a),i.push(et),s.push(parseFloat(t))),++a,"${}")).split("${}");return{values:s,split:r,indexes:n,types:i}}function at(t){return it(t).values}function rt(t){const{split:e,types:s}=it(t),n=e.length;return t=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],void 0!==t[a]){const e=s[a];i+=e===et?$(t[a]):e===st?Q.transform(t[a]):t[a]}return i}}const ot=t=>"number"==typeof t?0:Q.test(t)?Q.getAnimatableNone(t):t;const ht={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(L)?.length||0)+(t.match(tt)?.length||0)>0},parse:at,createTransformer:rt,getAnimatableNone:function(t){const e=at(t);return rt(t)(e.map(ot))}},lt=(t,e,s)=>t+(e-t)*s,ut=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;e<i;e++)n+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ct=t=>null!==t;function dt(t,{repeat:e,repeatType:s="loop"},n,i=1){const a=t.filter(ct),r=i<0||e&&"loop"!==s&&e%2==1?0:a.length-1;return r&&void 0!==n?n:a[r]}class pt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ft=t=>180*t/Math.PI,mt=t=>{const e=ft(Math.atan2(t[1],t[0]));return vt(e)},gt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:mt,rotateZ:mt,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vt=t=>((t%=360)<0&&(t+=360),t),yt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),wt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yt,scaleY:bt,scale:t=>(yt(t)+bt(t))/2,rotateX:t=>vt(ft(Math.atan2(t[6],t[5]))),rotateY:t=>vt(ft(Math.atan2(-t[2],t[0]))),rotateZ:mt,rotate:mt,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Vt(t){return t.includes("scale")?1:0}function St(t,e){if(!t||"none"===t)return Vt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=wt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=gt,i=e}if(!i)return Vt(e);const a=n[e],r=i[1].split(",").map(Tt);return"function"==typeof a?a(r):r[a]}const Mt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return St(s,e)};function Tt(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ct=(()=>new Set(At))(),kt=t=>t===I||t===q,xt=new Set(["x","y","z"]),Ft=At.filter(t=>!xt.has(t));const Pt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),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})=>St(e,"x"),y:(t,{transform:e})=>St(e,"y")};Pt.translateX=Pt.x,Pt.translateY=Pt.y;const Et=new Set;let Bt=!1,Rt=!1,It=!1;function Nt(){if(Rt){const t=Array.from(Et).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ft.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Rt=!1,Bt=!1,Et.forEach(t=>t.complete(It)),Et.clear()}function Ot(){Et.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Rt=!0)})}function $t(){It=!0,Ot(),Nt(),It=!1}class Lt{constructor(t,e,s,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Et.add(this),Bt||(Bt=!0,V.read(Ot),V.resolveKeyframes(Nt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),a=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,a);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=a),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Et.delete(this)}cancel(){"scheduled"===this.state&&(Et.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Yt={};function jt(t,e){const s=u(t);return()=>Yt[e]??s()}const Wt=jt(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Xt=jt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Kt=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Ut={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kt([0,.65,.55,1]),circOut:Kt([.55,0,1,.45]),backIn:Kt([.31,.01,.66,-.59]),backOut:Kt([.33,1.53,.69,.99])};function Zt(t,e){return t?"function"==typeof t?Xt()?ut(t,e):"ease-out":g(t)?Kt(t):Array.isArray(t)?t.map(t=>Zt(t,e)||Ut.easeOut):Ut[t]:void 0}function zt(t,e,s,{delay:n=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Zt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===r?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Dt(t){return"function"==typeof t&&"applyToOptions"in t}class qt extends pt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=t,r("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Dt(t)&&Xt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=zt(e,s,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=dt(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,s){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Wt()?(this.animation.timeline=t,c):e(this)}}function Ht(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function _t(t,e,s,n){if("function"==typeof e){const[i,a]=Ht(n);e=e(void 0!==s?s:t.custom,i,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,a]=Ht(n);e=e(void 0!==s?s:t.custom,i,a)}return e}class Gt{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=k.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=k.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 d);const s=this.events[t].add(e);return"change"===t?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=k.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return m(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jt(t,e){return new Gt(t,e)}const Qt=t=>Boolean(t&&t.getVelocity);function te(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ee="data-"+te("framerAppearId"),se=t=>e=>e.test(t),ne=[I,q,D,z,_,H,{test:t=>"auto"===t,parse:t=>t}],ie=t=>ne.find(se(t)),ae=new Set(["brightness","contrast","saturate","opacity"]);function re(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match(L)||[];if(!n)return t;const i=s.replace(n,"");let a=ae.has(e)?1:0;return n!==s&&(a*=100),e+"("+a+i+")"}const oe=/\b([a-z-]*)\(.*?\)/gu,he={...ht,getAnimatableNone:t=>{const e=t.match(oe);return e?e.map(re).join(" "):t}},le={...ht,getAnimatableNone:t=>{const e=ht.parse(t);return ht.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ue={...I,transform:Math.round},ce={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:O,scaleX:O,scaleY:O,scaleZ:O,skew:z,skewX:z,skewY:z,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:N,originX:G,originY:G,originZ:q},zIndex:ue,fillOpacity:N,strokeOpacity:N,numOctaves:ue},de={...ce,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:he,WebkitFilter:he,mask:le,WebkitMask:le},pe=t=>de[t],fe=new Set([he,le]);function me(t,e){let s=pe(t);return fe.has(s)||(s=ht),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const ge=new Set(["opacity","clipPath","filter","transform"]),ve=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:ye,cancel:be}=w(queueMicrotask,!1),we=[...ne,Q,ht],Ve=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Se=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Me=new WeakMap;function Te(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Ae(t){return"string"==typeof t||Array.isArray(t)}const Ce=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ke=["initial",...Ce];function xe(t){return Te(t.animate)||ke.some(e=>Ae(t[e]))}function Fe(t){return Boolean(xe(t)||t.variants)}const Pe={current:null},Ee={current:!1},Be="undefined"!=typeof window;const Re=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ie={};function Ne(t){Ie=t}function Oe(){return Ie}class $e{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:a,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Lt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=k.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,V.render(this.render,!1,!0))};const{latestValues:h,renderState:l}=r;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=o,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=xe(e),this.isVariantNode=Fe(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==h[t]&&Qt(e)&&e.set(h[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Me.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ee.current||function(){if(Ee.current=!0,Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pe.current=t.matches;t.addEventListener("change",e),e()}else Pe.current=!1}(),this.shouldReduceMotion=Pe.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),S(this.notifyUpdate),S(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ge.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:a,duration:r}=e.accelerate,o=new qt({element:this.current,name:t,keyframes:n,times:i,ease:a,duration:p(r)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=Ct.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),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 Ie){const e=Ie[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(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<Re.length;e++){const s=Re[e];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const n=t["on"+s];n&&(this.propEventSubscriptions[s]=this.on(s,n))}this.prevMotionValues=function(t,e,s){for(const n in e){const i=e[n],a=s[n];if(Qt(i))t.addValue(n,i);else if(Qt(a))t.addValue(n,Jt(i,{owner:t}));else if(a!==i)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(n);t.addValue(n,Jt(void 0!==e?e:i,{owner:t}))}}for(const n in s)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);e!==s&&(s&&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 s=this.values.get(t);return void 0===s&&void 0!==e&&(s=Jt(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(h(s)||l(s))?s=parseFloat(s):(n=s,!we.find(se(n))&&ht.test(e)&&(s=me(t,e))),this.setBaseTarget(t,Qt(s)?s.get():s)),Qt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=_t(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Qt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new d),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ye.render(this.render)}}const Le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ye=At.length;function je(t,e,s){const{style:n,vars:i,transformOrigin:a}=t;let r=!1,o=!1;for(const t in e){const s=e[t];if(Ct.has(t))r=!0;else if(F(t))i[t]=s;else{const e=ve(s,ce[t]);t.startsWith("origin")?(o=!0,a[t]=e):n[t]=e}}if(e.transform||(r||s?n.transform=function(t,e,s){let n="",i=!0;for(let a=0;a<Ye;a++){const r=At[a],o=t[r];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(r.startsWith("scale")?1:0);else{const t=parseFloat(o);h=r.startsWith("scale")?1===t:0===t}if(!h||s){const t=ve(o,ce[r]);h||(i=!1,n+=`${Le[r]||r}(${t}) `),s&&(e[r]=t)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;n.transformOrigin=`${t} ${e} ${s}`}}function We(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Xe={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!q.test(t))return t;t=parseFloat(t)}return`${We(t,e.target.x)}% ${We(t,e.target.y)}%`}},Ke={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=ht.parse(t);if(i.length>5)return n;const a=ht.createTransformer(t),r="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+r]/=o,i[1+r]/=h;const l=lt(o,h,.5);return"number"==typeof i[2+r]&&(i[2+r]/=l),"number"==typeof i[3+r]&&(i[3+r]/=l),a(i)}},Ue={borderRadius:{...Xe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xe,borderTopRightRadius:Xe,borderBottomLeftRadius:Xe,borderBottomRightRadius:Xe,boxShadow:Ke};function Ze(t,{layout:e,layoutId:s}){return Ct.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!Ue[t]||"opacity"===t)}function ze(t,e,s){const n=t.style,i=e?.style,a={};if(!n)return a;for(const e in n)(Qt(n[e])||i&&Qt(i[e])||Ze(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(a[e]=n[e]);return a}const De={offset:"stroke-dashoffset",array:"stroke-dasharray"},qe={offset:"strokeDashoffset",array:"strokeDasharray"};const He=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _e(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},h,l,u){if(je(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of He)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const a=i?De:qe;t[a.offset]=""+-n,t[a.array]=`${e} ${s}`}(c,i,a,r,!1)}const Ge=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Je(t,e,s){const n=ze(t,e,s);for(const s in t)if(Qt(t[s])||Qt(e[s])){n[-1!==At.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function Qe(t){return Qt(t)?t.get():t}const ts=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function es(t){return"string"==typeof t&&!t.includes("-")&&!!(ts.indexOf(t)>-1||/[A-Z]/u.test(t))}const ss=t(null),ns=t({});function is(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}export{Jt as $,E as A,Q as B,ht as C,it as D,V as E,S as F,M as G,k as H,f as I,m as J,p as K,v as L,n as M,ut as N,o as O,ss as P,dt as Q,qt as R,ns as S,Dt as T,u as U,Lt as V,pt as W,$t as X,h as Y,Ct as Z,At as _,Ae as a,l as a0,me as a1,ie as a2,R as a3,Pt as a4,kt as a5,$e as a6,Vt as a7,Mt as a8,F as a9,te as aa,Se as ab,pe as ac,ke as ad,Ce as ae,D as af,q as ag,e as ah,s as ai,d as aj,T as ak,ye as al,Ve as am,Ue as an,Qt as b,Ze as c,je as d,_e as e,Ge as f,es as g,Fe as h,xe as i,Te as j,_t as k,Je as l,Oe as m,Ne as n,ee as o,is as p,c as q,Qe as r,ze as s,g as t,r as u,lt as v,K as w,a as x,J as y,U as z};
|
|
1
|
+
import{createContext as t}from"react";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function s(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const n=(t,e,s)=>s>e?e:s<t?t:s;function i(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let a=()=>{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(a=(t,e,s)=>{t||"undefined"==typeof console||console.warn(i(e,s))},r=(t,e,s)=>{if(!t)throw new Error(i(e,s))});const o={},h=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t;class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>s(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const p=t=>1e3*t,f=t=>t/1e3;function m(t,e){return e?t*(1e3/e):0}const g=t=>Array.isArray(t)&&"number"==typeof t[0],v=t({}),y=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function b(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=y.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const a=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function o(e){a.has(e)&&(h.schedule(e),t()),e(r)}const h={schedule:(t,i=!1,r=!1)=>{const o=r&&n?e:s;return i&&a.add(t),o.has(t)||o.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{r=t,n?i=!0:(n=!0,[e,s]=[s,e],e.forEach(o),e.clear(),n=!1,i&&(i=!1,h.process(t)))}};return h}(a),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:f,postRender:m}=r,g=()=>{const a=o.useManualTiming?i.timestamp:performance.now();s=!1,o.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,h.process(i),l.process(i),u.process(i),c.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(g))};return{schedule:y.reduce((e,a)=>{const o=r[a];return e[a]=(e,a=!1,r=!1)=>(s||(s=!0,n=!0,i.isProcessing||t(g)),o.schedule(e,a,r)),e},{}),cancel:t=>{for(let e=0;e<y.length;e++)r[y[e]].cancel(t)},state:i,steps:r}}const{schedule:w,cancel:V,state:S,steps:M}=b("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let T;function A(){T=void 0}const C={now:()=>(void 0===T&&C.set(S.isProcessing||o.useManualTiming?S.timestamp:performance.now()),T),set:t=>{T=t,queueMicrotask(A)}},k=t=>e=>"string"==typeof e&&e.startsWith(t),x=k("--"),F=k("var(--"),P=t=>!!F(t)&&E.test(t.split("/*")[0].trim()),E=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function B(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const R={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},I={...R,transform:t=>n(0,1,t)},N={...R,default:1},O=t=>Math.round(1e5*t)/1e5,$=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const L=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y=(t,e)=>s=>Boolean("string"==typeof s&&L.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),W=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,a,r,o]=n.match($);return{[t]:parseFloat(i),[e]:parseFloat(a),[s]:parseFloat(r),alpha:void 0!==o?parseFloat(o):1}},X={...R,transform:t=>Math.round((t=>n(0,255,t))(t))},j={test:Y("rgb","red"),parse:W("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(s)+", "+O(I.transform(n))+")"};const K={test:Y("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:j.transform},U=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Z=U("deg"),z=U("%"),D=U("px"),q=U("vh"),H=U("vw"),_=(()=>({...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(100*t)}))(),G={test:Y("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+z.transform(O(e))+", "+z.transform(O(s))+", "+O(I.transform(n))+")"},J={test:t=>j.test(t)||K.test(t)||G.test(t),parse:t=>j.test(t)?j.parse(t):G.test(t)?G.parse(t):K.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?j.transform(t):G.transform(t),getAnimatableNone:t=>{const e=J.parse(t);return e.alpha=0,J.transform(e)}},Q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const tt="number",et="color",st=/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 nt(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let a=0;const r=e.replace(st,t=>(J.test(t)?(n.color.push(a),i.push(et),s.push(J.parse(t))):t.startsWith("var(")?(n.var.push(a),i.push("var"),s.push(t)):(n.number.push(a),i.push(tt),s.push(parseFloat(t))),++a,"${}")).split("${}");return{values:s,split:r,indexes:n,types:i}}function it(t){return nt(t).values}function at(t){const{split:e,types:s}=nt(t),n=e.length;return t=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],void 0!==t[a]){const e=s[a];i+=e===tt?O(t[a]):e===et?J.transform(t[a]):t[a]}return i}}const rt=t=>"number"==typeof t?0:J.test(t)?J.getAnimatableNone(t):t;const ot={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match($)?.length||0)+(t.match(Q)?.length||0)>0},parse:it,createTransformer:at,getAnimatableNone:function(t){const e=it(t);return at(t)(e.map(rt))}},ht=(t,e,s)=>t+(e-t)*s,lt=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;e<i;e++)n+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ut=t=>null!==t;function ct(t,{repeat:e,repeatType:s="loop"},n,i=1){const a=t.filter(ut),r=i<0||e&&"loop"!==s&&e%2==1?0:a.length-1;return r&&void 0!==n?n:a[r]}class dt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const pt=t=>180*t/Math.PI,ft=t=>{const e=pt(Math.atan2(t[1],t[0]));return gt(e)},mt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ft,rotateZ:ft,skewX:t=>pt(Math.atan(t[1])),skewY:t=>pt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},gt=t=>((t%=360)<0&&(t+=360),t),vt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),yt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),bt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vt,scaleY:yt,scale:t=>(vt(t)+yt(t))/2,rotateX:t=>gt(pt(Math.atan2(t[6],t[5]))),rotateY:t=>gt(pt(Math.atan2(-t[2],t[0]))),rotateZ:ft,rotate:ft,skewX:t=>pt(Math.atan(t[4])),skewY:t=>pt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function wt(t){return t.includes("scale")?1:0}function Vt(t,e){if(!t||"none"===t)return wt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=bt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=mt,i=e}if(!i)return wt(e);const a=n[e],r=i[1].split(",").map(Mt);return"function"==typeof a?a(r):r[a]}const St=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return Vt(s,e)};function Mt(t){return parseFloat(t.trim())}const Tt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=(()=>new Set(Tt))(),Ct=t=>t===R||t===D,kt=new Set(["x","y","z"]),xt=Tt.filter(t=>!kt.has(t));const Ft={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),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})=>Vt(e,"x"),y:(t,{transform:e})=>Vt(e,"y")};Ft.translateX=Ft.x,Ft.translateY=Ft.y;const Pt=new Set;let Et=!1,Bt=!1,Rt=!1;function It(){if(Bt){const t=Array.from(Pt).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return xt.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Bt=!1,Et=!1,Pt.forEach(t=>t.complete(Rt)),Pt.clear()}function Nt(){Pt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bt=!0)})}function Ot(){Rt=!0,Nt(),It(),Rt=!1}class $t{constructor(t,e,s,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Pt.add(this),Et||(Et=!0,w.read(Nt),w.resolveKeyframes(It))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),a=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,a);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=a),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Pt.delete(this)}cancel(){"scheduled"===this.state&&(Pt.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Lt={};function Yt(t,e){const s=u(t);return()=>Lt[e]??s()}const Wt=Yt(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Xt=Yt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),jt=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Kt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function Ut(t,e){return t?"function"==typeof t?Xt()?lt(t,e):"ease-out":g(t)?jt(t):Array.isArray(t)?t.map(t=>Ut(t,e)||Kt.easeOut):Kt[t]:void 0}function Zt(t,e,s,{delay:n=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Ut(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===r?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function zt(t){return"function"==typeof t&&"applyToOptions"in t}class Dt extends dt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=t,r("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return zt(t)&&Xt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Zt(e,s,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=ct(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,s){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Wt()?(this.animation.timeline=t,c):e(this)}}function qt(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Ht(t,e,s,n){if("function"==typeof e){const[i,a]=qt(n);e=e(void 0!==s?s:t.custom,i,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,a]=qt(n);e=e(void 0!==s?s:t.custom,i,a)}return e}class _t{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=C.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=C.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 d);const s=this.events[t].add(e);return"change"===t?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=C.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return m(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(t,e){return new _t(t,e)}const Jt=t=>Boolean(t&&t.getVelocity);function Qt(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const te="data-"+Qt("framerAppearId"),ee=t=>e=>e.test(t),se=[R,D,z,Z,H,q,{test:t=>"auto"===t,parse:t=>t}],ne=t=>se.find(ee(t)),ie=new Set(["brightness","contrast","saturate","opacity"]);function ae(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match($)||[];if(!n)return t;const i=s.replace(n,"");let a=ie.has(e)?1:0;return n!==s&&(a*=100),e+"("+a+i+")"}const re=/\b([a-z-]*)\(.*?\)/gu,oe={...ot,getAnimatableNone:t=>{const e=t.match(re);return e?e.map(ae).join(" "):t}},he={...ot,getAnimatableNone:t=>{const e=ot.parse(t);return ot.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},le={...R,transform:Math.round},ue={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,inset:D,insetBlock:D,insetBlockStart:D,insetBlockEnd:D,insetInline:D,insetInlineStart:D,insetInlineEnd:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,paddingBlock:D,paddingBlockStart:D,paddingBlockEnd:D,paddingInline:D,paddingInlineStart:D,paddingInlineEnd:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,marginBlock:D,marginBlockStart:D,marginBlockEnd:D,marginInline:D,marginInlineStart:D,marginInlineEnd:D,fontSize:D,backgroundPositionX:D,backgroundPositionY:D,...{rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:N,scaleX:N,scaleY:N,scaleZ:N,skew:Z,skewX:Z,skewY:Z,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:I,originX:_,originY:_,originZ:D},zIndex:le,fillOpacity:I,strokeOpacity:I,numOctaves:le},ce={...ue,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:oe,WebkitFilter:oe,mask:he,WebkitMask:he},de=t=>ce[t],pe=new Set([oe,he]);function fe(t,e){let s=de(t);return pe.has(s)||(s=ot),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const me=new Set(["opacity","clipPath","filter","transform"]),ge=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:ve}=b(queueMicrotask,!1),ye=[...se,J,ot],be=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),we=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Ve=new WeakMap;function Se(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Me(t){return"string"==typeof t||Array.isArray(t)}const Te=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ae=["initial",...Te];function Ce(t){return Se(t.animate)||Ae.some(e=>Me(t[e]))}function ke(t){return Boolean(Ce(t)||t.variants)}const xe={current:null},Fe={current:!1},Pe="undefined"!=typeof window;const Ee=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Be={};function Re(t){Be=t}function Ie(){return Be}class Ne{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:a,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=$t,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=C.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,w.render(this.render,!1,!0))};const{latestValues:h,renderState:l}=r;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=o,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=Ce(e),this.isVariantNode=ke(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==h[t]&&Jt(e)&&e.set(h[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Ve.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Fe.current||function(){if(Fe.current=!0,Pe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xe.current=t.matches;t.addEventListener("change",e),e()}else xe.current=!1}(),this.shouldReduceMotion=xe.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),V(this.notifyUpdate),V(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&me.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:a,duration:r}=e.accelerate,o=new Dt({element:this.current,name:t,keyframes:n,times:i,ease:a,duration:p(r)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=At.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),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 Be){const e=Be[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(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<Ee.length;e++){const s=Ee[e];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const n=t["on"+s];n&&(this.propEventSubscriptions[s]=this.on(s,n))}this.prevMotionValues=function(t,e,s){for(const n in e){const i=e[n],a=s[n];if(Jt(i))t.addValue(n,i);else if(Jt(a))t.addValue(n,Gt(i,{owner:t}));else if(a!==i)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(n);t.addValue(n,Gt(void 0!==e?e:i,{owner:t}))}}for(const n in s)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);e!==s&&(s&&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 s=this.values.get(t);return void 0===s&&void 0!==e&&(s=Gt(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(h(s)||l(s))?s=parseFloat(s):(n=s,!ye.find(ee(n))&&ot.test(e)&&(s=fe(t,e))),this.setBaseTarget(t,Jt(s)?s.get():s)),Jt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=Ht(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Jt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new d),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ve.render(this.render)}}const Oe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$e=Tt.length;function Le(t,e,s){const{style:n,vars:i,transformOrigin:a}=t;let r=!1,o=!1;for(const t in e){const s=e[t];if(At.has(t))r=!0;else if(x(t))i[t]=s;else{const e=ge(s,ue[t]);t.startsWith("origin")?(o=!0,a[t]=e):n[t]=e}}if(e.transform||(r||s?n.transform=function(t,e,s){let n="",i=!0;for(let a=0;a<$e;a++){const r=Tt[a],o=t[r];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(r.startsWith("scale")?1:0);else{const t=parseFloat(o);h=r.startsWith("scale")?1===t:0===t}if(!h||s){const t=ge(o,ue[r]);h||(i=!1,n+=`${Oe[r]||r}(${t}) `),s&&(e[r]=t)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;n.transformOrigin=`${t} ${e} ${s}`}}function Ye(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const We={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!D.test(t))return t;t=parseFloat(t)}return`${Ye(t,e.target.x)}% ${Ye(t,e.target.y)}%`}},Xe={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=ot.parse(t);if(i.length>5)return n;const a=ot.createTransformer(t),r="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+r]/=o,i[1+r]/=h;const l=ht(o,h,.5);return"number"==typeof i[2+r]&&(i[2+r]/=l),"number"==typeof i[3+r]&&(i[3+r]/=l),a(i)}},je={borderRadius:{...We,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomLeftRadius:We,borderBottomRightRadius:We,boxShadow:Xe};function Ke(t,{layout:e,layoutId:s}){return At.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!je[t]||"opacity"===t)}function Ue(t,e,s){const n=t.style,i=e?.style,a={};if(!n)return a;for(const e in n)(Jt(n[e])||i&&Jt(i[e])||Ke(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(a[e]=n[e]);return a}const Ze={offset:"stroke-dashoffset",array:"stroke-dasharray"},ze={offset:"strokeDashoffset",array:"strokeDasharray"};const De=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qe(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},h,l,u){if(Le(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of De)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const a=i?Ze:ze;t[a.offset]=""+-n,t[a.array]=`${e} ${s}`}(c,i,a,r,!1)}const He=t=>"string"==typeof t&&"svg"===t.toLowerCase();function _e(t,e,s){const n=Ue(t,e,s);for(const s in t)if(Jt(t[s])||Jt(e[s])){n[-1!==Tt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function Ge(t){return Jt(t)?t.get():t}const Je=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qe(t){return"string"==typeof t&&!t.includes("-")&&!!(Je.indexOf(t)>-1||/[A-Z]/u.test(t))}const ts=t(null),es=t({});function ss(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}export{Gt as $,P as A,J as B,ot as C,nt as D,S as E,C as F,V as G,w as H,f as I,m as J,p as K,v as L,n as M,lt as N,o as O,ts as P,ct as Q,Dt as R,es as S,zt as T,u as U,$t as V,dt as W,Ot as X,h as Y,At as Z,Tt as _,Me as a,l as a0,fe as a1,ne as a2,B as a3,Ft as a4,Ct as a5,Ne as a6,wt as a7,St as a8,x as a9,Qt as aa,we as ab,de as ac,Ae as ad,Te as ae,z as af,D as ag,e as ah,s as ai,d as aj,M as ak,ve as al,be as am,je as an,Jt as b,Ke as c,Le as d,qe as e,He as f,Qe as g,ke as h,Ce as i,Se as j,Ht as k,_e as l,Ie as m,Re as n,te as o,ss as p,c as q,Ge as r,Ue as s,g as t,r as u,ht as v,j as w,G as x,K as y,a as z};
|