text: !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,n){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(n),o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function i(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var a=function(){return(a=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function u(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function s(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}var f="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},l="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(f())}),1/60*1e3)};var d=!0,v=!1,p=!1,m={delta:0,timestamp:0},h=["read","update","preRender","render","postRender"],y=h.reduce((function(t,n){return t[n]=function(t){var n=[],e=[],r=0,o=!1,i=new WeakSet,a={schedule:function(t,a,u){void 0===a&&(a=!1),void 0===u&&(u=!1);var s=u&&o,c=s?n:e;return a&&i.add(t),-1===c.indexOf(t)&&(c.push(t),s&&o&&(r=n.length)),t},cancel:function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),i.delete(t)},process:function(u){var s;if(o=!0,n=(s=[e,n])[0],(e=s[1]).length=0,r=n.length)for(var c=0;c<r;c++){var f=n[c];f(u),i.has(f)&&(a.schedule(f),t())}o=!1}};return a}((function(){return v=!0})),t}),{}),g=h.reduce((function(t,n){var e=y[n];return t[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),v||w(),e.schedule(t,n,r)},t}),{}),x=h.reduce((function(t,n){return t[n]=y[n].cancel,t}),{}),b=function(t){return y[t].process(m)},E=function(t){v=!1,m.delta=d?1/60*1e3:Math.max(Math.min(t-m.timestamp,40),1),m.timestamp=t,p=!0,h.forEach(b),p=!1,v&&(d=!1,l(E))},w=function(){v=!0,d=!0,p||l(E)},A=function(){return m},P=function(t,n,e){return Math.min(Math.max(e,t),n)};function C(t){var n,e,r=t.duration,o=void 0===r?800:r,i=t.bounce,a=void 0===i?.25:i,u=t.velocity,s=void 0===u?0:u,c=t.mass,f=void 0===c?1:c,l=1-a;l=P(.05,1,l),o=P(.01,10,o/1e3),l<1?(n=function(t){var n=t*l,e=n*o;return.001-(n-s)/S(t,l)*Math.exp(-e)},e=function(t){var e=t*l*o,r=e*s+s,i=Math.pow(l,2)*Math.pow(t,2)*o,a=Math.exp(-e),u=S(Math.pow(t,2),l);return(.001-n(t)>0?-1:1)*((r-i)*a)/u}):(n=function(t){return Math.exp(-t*o)*((t-s)*o+1)-.001},e=function(t){return Math.exp(-t*o)*(o*o*(s-t))});var d=function(t,n,e){for(var r=e,o=1;o<12;o++)r-=t(r)/n(r);return r}(n,e,5/o);if(isNaN(d))return{stiffness:100,damping:10};var v=Math.pow(d,2)*f;return{stiffness:v,damping:2*l*Math.sqrt(f*v)}}function S(t,n){return t*Math.sqrt(1-n*n)}var M=["duration","bounce"],T=["stiffness","damping","mass"];function V(t,n){return n.some((function(n){return void 0!==t[n]}))}function L(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.restSpeed,s=void 0===i?2:i,c=t.restDelta,f=u(t,["from","to","restSpeed","restDelta"]),l={done:!1,value:e},d=function(t){var n=a({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!V(t,T)&&V(t,M)){var e=C(t);(n=a(a(a({},n),e),{velocity:0,mass:1})).isResolvedFromDuration=!0}return n}(f),v=d.stiffness,p=d.damping,m=d.mass,h=d.velocity,y=d.isResolvedFromDuration,g=k,x=k;function b(){var t=h?-h/1e3:0,n=o-e,r=p/(2*Math.sqrt(v*m)),i=Math.sqrt(v/m)/1e3;if(null!=c||(c=Math.abs(o-e)<=1?.01:.4),r<1){var a=S(i,r);g=function(e){var u=Math.exp(-r*i*e);return o-u*((t+r*i*n)/a*Math.sin(a*e)+n*Math.cos(a*e))},x=function(e){var o=Math.exp(-r*i*e);return r*i*o*(Math.sin(a*e)*(t+r*i*n)/a+n*Math.cos(a*e))-o*(Math.cos(a*e)*(t+r*i*n)-a*n*Math.sin(a*e))}}else if(1===r)g=function(e){return o-Math.exp(-i*e)*(n+(t+i*n)*e)};else{var u=i*Math.sqrt(r*r-1);g=function(e){var a=Math.exp(-r*i*e),s=Math.min(u*e,300);return o-a*((t+r*i*n)*Math.sinh(s)+u*n*Math.cosh(s))/u}}}return b(),{next:function(t){var n=g(t);if(y)l.done=t>=f.duration;else{var e=1e3*x(t),r=Math.abs(e)<=s,i=Math.abs(o-n)<=c;l.done=r&&i}return l.value=l.done?o:n,l},flipTarget:function(){var t;h=-h,e=(t=[o,e])[0],o=t[1],b()}}}L.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n};var k=function(t){return 0},R=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},D=function(t,n,e){return-e*t+e*n+t},O=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},B=function(t){return t%1?Number(t.toFixed(5)):t},F=/(-)?([\d]*\.?[\d])+/g,j=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,I=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function U(t){return"string"==typeof t}var H={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},X=a(a({},H),{transform:O(0,1)}),Y=a(a({},H),{default:1}),z=function(t){return{test:function(n){return U(n)&&n.endsWith(t)&&1===n.split(" ").length},parse:parseFloat,transform:function(n){return""+n+t}}},W=z("deg"),N=z("%"),_=z("px"),G=z("vh"),q=z("vw"),Z=a(a({},N),{parse:function(t){return N.parse(t)/100},transform:function(t){return N.transform(100*t)}}),$=function(t,n){return function(e){return U(e)&&I.test(e)&&e.startsWith(t)||n&&Object.prototype.hasOwnProperty.call(e,n)}},K=function(t,n,e){return function(r){var o;if(!U(r))return r;var i=r.match(F),a=i[0],u=i[1],s=i[2],c=i[3];return(o={})[t]=parseFloat(a),o[n]=parseFloat(u),o[e]=parseFloat(s),o.alpha=void 0!==c?parseFloat(c):1,o}},J={test:$("hsl","hue"),parse:K("hue","saturation","lightness"),transform:function(t){var n=t.hue,e=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return"hsla("+Math.round(n)+", "+N.transform(B(e))+", "+N.transform(B(r))+", "+B(X.transform(i))+")"}},Q=O(0,255),tt=a(a({},H),{transform:function(t){return Math.round(Q(t))}}),nt={test:$("rgb","red"),parse:K("red","green","blue"),transform:function(t){var n=t.red,e=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return"rgba("+tt.transform(n)+", "+tt.transform(e)+", "+tt.transform(r)+", "+B(X.transform(i))+")"}};var et={test:$("#"),parse:function(t){var n="",e="",r="",o="";return t.length>5?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),n+=n,e+=e,r+=r,o+=o),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:nt.transform},rt={test:function(t){return nt.test(t)||et.test(t)||J.test(t)},parse:function(t){return nt.test(t)?nt.parse(t):J.test(t)?J.parse(t):et.parse(t)},transform:function(t){return U(t)?t:t.hasOwnProperty("red")?nt.transform(t):J.transform(t)}};function ot(t){var n=[],e=0,r=t.match(j);r&&(e=r.length,t=t.replace(j,"${c}"),n.push.apply(n,r.map(rt.parse)));var o=t.match(F);return o&&(t=t.replace(F,"${n}"),n.push.apply(n,o.map(H.parse))),{values:n,numColors:e,tokenised:t}}function it(t){return ot(t).values}function at(t){var n=ot(t),e=n.values,r=n.numColors,o=n.tokenised,i=e.length;return function(t){for(var n=o,e=0;e<i;e++)n=n.replace(e<r?"${c}":"${n}",e<r?rt.transform(t[e]):B(t[e]));return n}}var ut=function(t){return"number"==typeof t?0:t};var st={test:function(t){var n,e,r,o;return isNaN(t)&&U(t)&&(null!==(e=null===(n=t.match(F))||void 0===n?void 0:n.length)&&void 0!==e?e:0)+(null!==(o=null===(r=t.match(j))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:it,createTransformer:at,getAnimatableNone:function(t){var n=it(t);return at(t)(n.map(ut))}},ct=new Set(["brightness","contrast","saturate","opacity"]);function ft(t){var n=t.slice(0,-1).split("("),e=n[0],r=n[1];if("drop-shadow"===e)return t;var o=(r.match(F)||[])[0];if(!o)return t;var i=r.replace(o,""),a=ct.has(e)?1:0;return o!==r&&(a*=100),e+"("+a+i+")"}var lt=/([a-z-]*)\(.*?\)/g,dt=a(a({},st),{getAnimatableNone:function(t){var n=t.match(lt);return n?n.map(ft).join(" "):t}}),vt=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},pt=[et,nt,J],mt=function(t){return pt.find((function(n){return n.test(t)}))},ht=function(t,n){var e=mt(t),r=mt(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),u=a({},o),s=e===J?D:vt;return function(t){for(var n in u)"alpha"!==n&&(u[n]=s(o[n],i[n],t));return u.alpha=D(o.alpha,i.alpha,t),e.transform(u)}},yt=function(t){return"number"==typeof t},gt=function(t,n){return function(e){return n(t(e))}},xt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(gt)};function bt(t,n){return yt(t)?function(e){return D(t,n,e)}:rt.test(t)?ht(t,n):Pt(t,n)}var Et=function(t,n){var e=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(t),r=e.length,o=t.map((function(t,e){return bt(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},wt=function(t,n){var e=a(a({},t),n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=bt(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function At(t){for(var n=st.parse(t),e=n.length,r=0,o=0,i=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?i++:o++;return{parsed:n,numNumbers:r,numRGB:o,numHSL:i}}var Pt=function(t,n){var e=st.createTransformer(n),r=At(t),o=At(n);return xt(Et(r.parsed,o.parsed),e)},Ct=function(t,n){return function(e){return D(t,n,e)}};function St(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?Ct:"string"==typeof r?rt.test(r)?ht:Pt:Array.isArray(r)?Et:"object"==typeof r?wt:void 0),a=t.length-1,u=0;u<a;u++){var s=i(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=xt(c,s)}o.push(s)}return o}function Mt(t,n,e){var r=void 0===e?{}:e,o=r.clamp,i=void 0===o||o,a=r.ease,u=r.mixer,s=t.length;n.length,!a||!Array.isArray(a)||a.length,t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c=St(n,a,u),f=2===s?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(R(e,r,t))}}(t,c):function(t,n){var e=t.length,r=e-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var u=1;u<e&&!(t[u]>o||u===r);u++);i=u-1}var s=R(t[i],t[i+1],o);return n[i](s)}}(t,c);return i?function(n){return f(P(t[0],t[s-1],n))}:f}var Tt,Vt=function(t){return function(n){return 1-t(1-n)}},Lt=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},kt=function(t){return function(n){return n*n*((t+1)*n-t)}},Rt=function(t){return t},Dt=(Tt=2,function(t){return Math.pow(t,Tt)}),Ot=Vt(Dt),Bt=Lt(Dt),Ft=function(t){return 1-Math.sin(Math.acos(t))},jt=Vt(Ft),It=Lt(jt),Ut=kt(1.525),Ht=Vt(Ut),Xt=Lt(Ut),Yt=function(t){var n=kt(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),zt=function(t){if(1===t||0===t)return t;var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Wt=Vt(zt);function Nt(t,n){return t.map((function(){return n||Bt})).splice(0,t.length-1)}function _t(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,u=t.duration,s=void 0===u?300:u,c={done:!1,value:e},f=Array.isArray(o)?o:[e,o],l=function(t,n){return t.map((function(t){return t*n}))}(a&&a.length===f.length?a:function(t){var n=t.length;return t.map((function(t,e){return 0!==e?e/(n-1):0}))}(f),s);function d(){return Mt(l,f,{ease:Array.isArray(i)?i:Nt(f,i)})}var v=d();return{next:function(t){return c.value=v(t),c.done=t>=s,c},flipTarget:function(){f.reverse(),v=d()}}}var Gt={keyframes:_t,spring:L,decay:function(t){var n=t.velocity,e=void 0===n?0:n,r=t.from,o=void 0===r?0:r,i=t.power,a=void 0===i?.8:i,u=t.timeConstant,s=void 0===u?350:u,c=t.restDelta,f=void 0===c?.5:c,l=t.modifyTarget,d={done:!1,value:o},v=a*e,p=o+v,m=void 0===l?p:l(p);return m!==p&&(v=m-o),{next:function(t){var n=-v*Math.exp(-t/s);return d.done=!(n>f||n<-f),d.value=d.done?m:m+n,d},flipTarget:function(){}}}};function qt(t,n,e){return void 0===e&&(e=0),t-n-e}var Zt=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return g.update(n,!0,!0)},stop:function(){return x.update(n)}}};function $t(t){var n,e,r,o,i,s=t.from,c=t.autoplay,f=void 0===c||c,l=t.driver,d=void 0===l?Zt:l,v=t.elapsed,p=void 0===v?0:v,m=t.repeat,h=void 0===m?0:m,y=t.repeatType,g=void 0===y?"loop":y,x=t.repeatDelay,b=void 0===x?0:x,E=t.onPlay,w=t.onStop,A=t.onComplete,P=t.onRepeat,C=t.onUpdate,S=u(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),M=S.to,T=0,V=S.duration,k=!1,R=!0,D=function(t){if(Array.isArray(t.to))return _t;if(Gt[t.type])return Gt[t.type];var n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?_t:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?L:_t}(S);(null===(e=(n=D).needsInterpolation)||void 0===e?void 0:e.call(n,s,M))&&(i=Mt([0,100],[s,M],{clamp:!1}),s=0,M=100);var O=D(a(a({},S),{from:s,to:M}));function B(){T++,"reverse"===g?p=function(t,n,e,r){return void 0===e&&(e=0),void 0===r&&(r=!0),r?qt(n+-t,n,e):n-(t-n)+e}(p,V,b,R=T%2==0):(p=qt(p,V,b),"mirror"===g&&O.flipTarget()),k=!1,P&&P()}function F(t){if(R||(t=-t),p+=t,!k){var n=O.next(Math.max(0,p));o=n.value,i&&(o=i(o)),k=R?n.done:p<=0}null==C||C(o),k&&(0===T&&(null!=V||(V=p)),T<h?function(t,n,e,r){return r?t>=n+e:t<=-e}(p,V,b,R)&&B():(r.stop(),A&&A()))}return f&&(null==E||E(),(r=d(F)).start()),{stop:function(){null==w||w(),r.stop()}}}function Kt(t,n){return n?t*(1e3/n):0}var Jt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Qt=function(t){return Jt(t)&&t.hasOwnProperty("z")},tn=function(t,n){return Math.abs(t-n)};function nn(t,n){if(yt(t)&&yt(n))return tn(t,n);if(Jt(t)&&Jt(n)){var e=tn(t.x,n.x),r=tn(t.y,n.y),o=Qt(t)&&Qt(n)?tn(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var en=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},rn=function(t,n){return 1-3*n+3*t},on=function(t,n){return 3*n-6*t},an=function(t){return 3*t},un=function(t,n,e){return((rn(n,e)*t+on(n,e))*t+an(n))*t},sn=function(t,n,e){return 3*rn(n,e)*t*t+2*on(n,e)*t+an(n)};var cn,fn;function ln(t,n,e,r){if(t===n&&e===r)return Rt;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=un(.1*i,t,e);function a(n){for(var r=0,i=1;10!==i&&o[i]<=n;++i)r+=.1;--i;var a=r+.1*((n-o[i])/(o[i+1]-o[i])),u=sn(a,t,e);return u>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=sn(n,e,r);if(0===i)return n;n-=(un(n,e,r)-t)/i}return n}(n,a,t,e):0===u?a:function(t,n,e,r,o){var i,a,u=0;do{(i=un(a=n+(e-n)/2,r,o)-t)>0?e=a:n=a}while(Math.abs(i)>1e-7&&++u<10);return a}(n,r,r+.1,t,e)}return function(t){return 0===t||1===t?t:un(a(t),n,r)}}function dn(t){return[t("x"),t("y")]}function vn(t){return t}function pn(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function mn(){return{x:{min:0,max:1},y:{min:0,max:1}}}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(cn||(cn={})),(fn=t.VisibilityAction||(t.VisibilityAction={}))[fn.Hide=0]="Hide",fn[fn.Show=1]="Show";var hn={translate:0,scale:1,origin:0,originPoint:0};function yn(){return{x:a({},hn),y:a({},hn)}}function gn(t,n){t.min=n.min,t.max=n.max}function xn(t,n,e){return e+n*(t-e)}function bn(t,n,e,r,o){return void 0!==o&&(t=xn(t,o,r)),xn(t,e,r)+n}function En(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=bn(t.min,n,e,r,o),t.max=bn(t.max,n,e,r,o)}function wn(t,n){var e=n.x,r=n.y;En(t.x,e.translate,e.scale,e.originPoint),En(t.y,r.translate,r.scale,r.originPoint)}function An(t,n,e,r){var o=s(r,3),i=o[0],a=o[1],u=o[2];t.min=n.min,t.max=n.max;var c=void 0!==e[u]?e[u]:.5,f=D(n.min,n.max,c);En(t,e[i],e[a],f,e.scale)}var Pn=["x","scaleX","originX"],Cn=["y","scaleY","originY"];function Sn(t,n,e,r,o){return t=xn(t-=n,1/e,r),void 0!==o&&(t=xn(t,1/o,r)),t}function Mn(t,n,e){var r=s(e,3),o=r[0],i=r[1],a=r[2];!function(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),void 0===r&&(r=.5);var i=D(t.min,t.max,r)-n;t.min=Sn(t.min,n,e,i,o),t.max=Sn(t.max,n,e,i,o)}(t,n[o],n[i],n[a],n.scale)}function Tn(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),nn(t,n)<e}function Vn(t){return t.max-t.min}function Ln(t,n){var e=.5,r=Vn(t),o=Vn(n);return o>r?e=R(n.min,n.max-r,t.min):r>o&&(e=R(t.min,t.max-o,n.min)),P(0,1,e)}function kn(t,n,e,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=D(n.min,n.max,t.origin),t.scale=Vn(e)/Vn(n),Tn(t.scale,1,1e-4)&&(t.scale=1),t.translate=D(e.min,e.max,t.origin)-t.originPoint,Tn(t.translate)&&(t.translate=0)}function Rn(t,n,e,r){kn(t.x,n.x,e.x,Dn(r.originX)),kn(t.y,n.y,e.y,Dn(r.originY))}function Dn(t){return"number"==typeof t?t:.5}function On(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Bn(){var t=[];return{add:function(n){var e,r;return r=n,-1===(e=t).indexOf(r)&&e.push(r),function(){return function(t,n){var e=t.indexOf(n);e>-1&&t.splice(e,1)}(t,n)}},notify:function(n,e,r){var o=t.length;if(o)if(1===o)t[0](n,e,r);else for(var i=0;i<o;i++){var a=t[i];a&&a(n,e,r)}},getSize:function(){return t.length},clear:function(){t.length=0}}}var Fn=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=Bn(),this.renderSubscribers=Bn(),this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t,e.prev!==e.current&&e.updateSubscribers.notify(e.current),n&&e.renderSubscribers.notify(e.current);var r=A(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,g.postRender(e.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return g.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current)},this.hasAnimated=!1,this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Kt(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var n=this;return this.stop(),new Promise((function(e){n.hasAnimated=!0,n.stopAnimation=t(e)})).then((function(){return n.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function jn(t){return new Fn(t)}var In=function(t){return t instanceof Fn},Un=["","X","Y","Z"],Hn=["transformPerspective","x","y","z"];function Xn(t,n){return Hn.indexOf(t)-Hn.indexOf(n)}["perspective","translate","scale","rotate","skew"].forEach((function(t){Un.forEach((function(n){var e=t+n;Hn.push(e)}))}));var Yn=new Set(Hn);function zn(t){return Yn.has(t)}var Wn=new Set(["originX","originY","originZ"]);function Nn(t){return Wn.has(t)}var _n=function(t){return 1e3*t},Gn={linear:Rt,easeIn:Dt,easeInOut:Bt,easeOut:Ot,circIn:Ft,circInOut:It,circOut:jt,backIn:Ut,backInOut:Xt,backOut:Ht,anticipate:Yt,bounceIn:Wt,bounceInOut:function(t){return t<.5?.5*(1-zt(1-2*t)):.5*zt(2*t-1)+.5},bounceOut:zt},qn=function(t){if(Array.isArray(t)){t.length;var n=s(t,4);return ln(n[0],n[1],n[2],n[3])}return"string"==typeof t?Gn[t]:t},Zn=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!st.test(n)||n.startsWith("url(")))},$n=function(t){return Array.isArray(t)},Kn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Jn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Qn=function(){return{type:"keyframes",ease:"linear",duration:.3}},te=function(t){return{type:"keyframes",duration:.8,values:t}},ne={x:Kn,y:Kn,z:Kn,rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scaleX:Jn,scaleY:Jn,scale:Jn,opacity:Qn,backgroundColor:Qn,color:Qn,default:Jn},ee=a(a({},H),{transform:Math.round}),re={color:rt,backgroundColor:rt,outlineColor:rt,fill:rt,stroke:rt,borderColor:rt,borderTopColor:rt,borderRightColor:rt,borderBottomColor:rt,borderLeftColor:rt,borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,size:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:Y,scaleX:Y,scaleY:Y,scaleZ:Y,skew:W,skewX:W,skewY:W,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:X,originX:Z,originY:Z,originZ:_,zIndex:ee,filter:dt,WebkitFilter:dt,fillOpacity:X,strokeOpacity:X,numOctaves:ee},oe=[H,_,N,W,q,G,{test:function(t){return"auto"===t},parse:function(t){return t}}],ie=function(t){return function(n){return n.test(t)}},ae=function(t){return oe.find(ie(t))},ue=c(oe,[rt,st]),se=function(t){return ue.find(ie(t))},ce=function(t){return re[t]},fe=function(t,n){return n&&"number"==typeof t?n.transform(t):t};function le(t,n){var e,r=ce(t);return r!==dt&&(r=st),null===(e=r.getAnimatableNone)||void 0===e?void 0:e.call(r,n)}function de(t){var n=t.ease,e=t.times,r=t.yoyo,o=t.flip,i=t.loop,s=u(t,["ease","times","yoyo","flip","loop"]),c=a({},s);return e&&(c.offset=e),s.duration&&(c.duration=_n(s.duration)),s.repeatDelay&&(c.repeatDelay=_n(s.repeatDelay)),n&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(n)?n.map(qn):qn(n)),"tween"===s.type&&(c.type="keyframes"),(r||i||o)&&(r?c.repeatType="reverse":i?c.repeatType="loop":o&&(c.repeatType="mirror"),c.repeat=i||r||o||s.repeat),"spring"!==s.type&&(c.type="keyframes"),c}function ve(t,n,e){var r,o,i,s;return Array.isArray(n.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=c(t.to),t.to[0]=t.from)}(n),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var n=u(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=a(a({},t),(o=e,i=n.to,s=$n(i)?te:ne[o]||ne.default,a({to:i},s(i))))),a(a({},n),de(t))}function pe(t,n,e,r,o){var i,u=function(t,n){return t[n]||t.default||t}(r,t),s=null!==(i=u.from)&&void 0!==i?i:n.get(),c=Zn(t,e);return"none"===s&&c&&"string"==typeof e&&(s=le(t,e)),Zn(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===u.type||"decay"===u.type?function(t){var n,e=t.from,r=void 0===e?0:e,o=t.velocity,i=void 0===o?0:o,u=t.min,s=t.max,c=t.power,f=void 0===c?.8:c,l=t.timeConstant,d=void 0===l?750:l,v=t.bounceStiffness,p=void 0===v?500:v,m=t.bounceDamping,h=void 0===m?10:m,y=t.restDelta,g=void 0===y?1:y,x=t.modifyTarget,b=t.driver,E=t.onUpdate,w=t.onComplete;function P(t){return void 0!==u&&t<u||void 0!==s&&t>s}function C(t){return void 0===u?s:void 0===s||Math.abs(u-t)<Math.abs(s-t)?u:s}function S(t){null==n||n.stop(),n=$t(a(a({},t),{driver:b,onUpdate:function(n){var e;null==E||E(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:w}))}function M(t){S(a({type:"spring",stiffness:p,damping:h,restDelta:g},t))}if(P(r))M({from:r,velocity:i,to:C(r)});else{var T=f*i+r;void 0!==x&&(T=x(T));var V,L,k=C(T),R=k===u?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:d,power:f,restDelta:g,modifyTarget:x,onUpdate:P(T)?function(t){V=L,L=t,i=Kt(t-V,A().delta),(1===R&&t>k||-1===R&&t<k)&&M({from:t,to:k,velocity:i})}:void 0})}return{stop:function(){return null==n?void 0:n.stop()}}}(a(a({},r),u)):$t(a(a({},ve(u,r,t)),{onUpdate:function(t){var n;r.onUpdate(t),null===(n=u.onUpdate)||void 0===n||n.call(u,t)},onComplete:function(){var t;r.onComplete(),null===(t=u.onComplete)||void 0===t||t.call(u)}}))}:function(){var t;return n.set(e),o(),null===(t=null==u?void 0:u.onComplete)||void 0===t||t.call(u),{stop:function(){}}}}function me(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a,u=pe(t,n,e,r,o),s=function(t,n){var e,r,o,i,a;return null!==(a=null!==(i=null!==(r=null===(e=t[n])||void 0===e?void 0:e.delay)&&void 0!==r?r:null===(o=t.default)||void 0===o?void 0:o.delay)&&void 0!==i?i:t.delay)&&void 0!==a?a:0}(r,t),c=function(){return a=u()};return s?i=setTimeout(c,_n(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}function he(t){return Array.isArray(t)}function ye(t){return"string"==typeof t||he(t)}function ge(t,n,e,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"string"==typeof n&&(n=null===(i=t.variants)||void 0===i?void 0:i[n]),"function"==typeof n?n(null!=e?e:t.custom,r,o):n}function xe(t,n,e){var r=t.getProps();return ge(r,n,null!=e?e:r.custom,function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.get()})),n}(t),function(t){var n={};return t.forEachValue((function(t,e){return n[e]=t.getVelocity()})),n}(t))}function be(t){var n;return"function"==typeof(null===(n=t.animate)||void 0===n?void 0:n.start)||ye(t.animate)||ye(t.whileHover)||ye(t.whileDrag)||ye(t.whileTap)||ye(t.whileFocus)||ye(t.exit)}function Ee(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,jn(e))}function we(t,n){var e,r=xe(t,n),o=r?t.makeTargetAnimatable(r,!1):{},i=o.transitionEnd,s=void 0===i?{}:i,c=(o.transition,u(o,["transitionEnd","transition"]));for(var f in c=a(a({},c),s)){Ee(t,f,(e=c[f],$n(e)?e[e.length-1]||0:e))}}function Ae(t,n){c(n).reverse().forEach((function(e){var r,o=t.getVariant(e);o&&we(t,o),null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){Ae(t,n)}))}))}function Pe(t,n,e){var r,o,i,a,u=Object.keys(n).filter((function(n){return!t.hasValue(n)})),s=u.length;if(s)for(var c=0;c<s;c++){var f=u[c],l=n[f],d=null;Array.isArray(l)&&(d=l[0]),null===d&&(d=null!==(o=null!==(r=e[f])&&void 0!==r?r:t.readValue(f))&&void 0!==o?o:n[f]),null!=d&&("string"==typeof d&&/^\-?\d*\.?\d+$/.test(d)?d=parseFloat(d):!se(d)&&st.test(l)&&(d=le(f,l)),t.addValue(f,jn(d)),null!==(i=(a=e)[f])&&void 0!==i||(a[f]=d),t.setBaseTarget(f,d))}}function Ce(t,n){if(n)return(n[t]||n.default||n).from}function Se(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Ce(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}function Me(t,n,e){var r;if(t.notifyAnimationStart(),Array.isArray(n)){var o=n.map((function(n){return Te(t,n,e)}));r=Promise.all(o)}else r="string"==typeof n?Te(t,n,e):Ve(t,n,e);return r.then((function(){return t.notifyAnimationComplete(n)}))}function Te(t,n,e){var r;void 0===e&&(e={});var o=xe(t,n,e.custom),i=(o||{}).transition,u=void 0===i?t.getDefaultTransition()||{}:i;e.transitionOverride&&(u=e.transitionOverride);var c=o?function(){return Ve(t,o,e)}:function(){return Promise.resolve()},f=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=u.delayChildren,i=void 0===o?0:o,s=u.staggerChildren,c=u.staggerDirection;return function(t,n,e,r,o,i){void 0===e&&(e=0);void 0===r&&(r=0);void 0===o&&(o=1);var u=[],s=(t.variantChildren.size-1)*r,c=1===o?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),s-t*r};return Array.from(t.variantChildren).sort(Le).forEach((function(t,r){u.push(Te(t,n,a(a({},i),{delay:e+c(r)})).then((function(){return t.notifyAnimationComplete(n)})))})),Promise.all(u)}(t,n,i+r,s,c,e)}:function(){return Promise.resolve()},l=u.when;if(l){var d=s("beforeChildren"===l?[c,f]:[f,c],2),v=d[0],p=d[1];return v().then(p)}return Promise.all([c(),f(e.delay)])}function Ve(t,n,e){var r,o=void 0===e?{}:e,i=o.delay,s=void 0===i?0:i,c=o.transitionOverride,f=o.type,l=t.makeTargetAnimatable(n),d=l.transition,v=void 0===d?t.getDefaultTransition():d,p=l.transitionEnd,m=u(l,["transition","transitionEnd"]);c&&(v=c);var h=[],y=f&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[f]);for(var g in m){var x=t.getValue(g),b=m[g];if(!(!x||void 0===b||y&&ke(y,g))){var E=me(g,x,b,a({delay:s},v));h.push(E)}}return Promise.all(h).then((function(){p&&we(t,p)}))}function Le(t,n){return t.sortNodePosition(n)}function ke(t,n){var e=t.protectedKeys,r=t.needsAnimating,o=e.hasOwnProperty(n)&&!0!==r[n];return r[n]=!1,o}function Re(){var t=!1,n=[],e=new Set,r={subscribe:function(t){return e.add(t),function(){e.delete(t)}},start:function(r,o){if(t){var i=[];return e.forEach((function(t){i.push(Me(t,r,{transitionOverride:o}))})),Promise.all(i)}return new Promise((function(t){n.push({animation:[r,o],resolve:t})}))},set:function(t){return e.forEach((function(n){!function(t,n){Array.isArray(n)?Ae(t,n):"string"==typeof n?Ae(t,[n]):we(t,n)}(n,t)}))},stop:function(){e.forEach((function(t){!function(t){t.forEachValue((function(t){return t.stop()}))}(t)}))},mount:function(){return t=!0,n.forEach((function(t){var n=t.animation,e=t.resolve;r.start.apply(r,c(n)).then(e)})),function(){t=!1,r.stop()}}};return r}function De(t){return"object"==typeof t&&"function"==typeof t.start}function Oe(t){return"string"==typeof t&&t.startsWith("var(--")}var Be=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Fe(t,n,e){var r=s(function(t){var n=Be.exec(t);if(!n)return[,];var e=s(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(n).getPropertyValue(o);return a?a.trim():Oe(i)?Fe(i,n):i}}function je(t,n){return t/(n.max-n.min)*100}var Ie={process:function(t,n,e){var r=e.target;if("string"==typeof t){if(!_.test(t))return t;t=parseFloat(t)}return je(t,r.x)+"% "+je(t,r.y)+"%"}},Ue={borderRadius:a(a({},Ie),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomLeftRadius:Ie,borderBottomRightRadius:Ie,boxShadow:{process:function(t,n){var e=n.delta,r=n.treeScale,o=t,i=t.includes("var("),a=[];i&&(t=t.replace(Be,(function(t){return a.push(t),"_$css"})));var u=st.parse(t);if(u.length>5)return o;var s=st.createTransformer(t),c="number"!=typeof u[0]?1:0,f=e.x.scale*r.x,l=e.y.scale*r.y;u[0+c]/=f,u[1+c]/=l;var d=D(f,l,.5);"number"==typeof u[2+c]&&(u[2+c]/=d),"number"==typeof u[3+c]&&(u[3+c]/=d);var v=s(u);if(i){var p=0;v=v.replace("_$css",(function(){var t=a[p];return p++,t}))}return v}}};function He(t,n){var e=n.layout,r=n.layoutId;return zn(t)||Nn(t)||(e||void 0!==r)&&!!Ue[t]}function Xe(t,n,e){var r=t.style,o={};for(var i in r)In(r[i])?o[i]=r[i].get():He(i,t)&&(o[i]=r[i]);var a=t.initial,s=t.animate,c=be(t);if((c||t.variants)&&!c&&!1!==t.inherit){var f=null==n?void 0:n.getVariantContext();f&&(null!=a||(a=f.initial),null!=s||(s=f.animate))}var l=e||!1===a?s:a;l&&"boolean"!=typeof l&&!De(l)&&(Array.isArray(l)?l:[l]).forEach((function(n){var e=ge(t,n);if(e){var r=e.transitionEnd,i=(e.transition,u(e,["transitionEnd","transition"]));for(var a in i)o[a]=i[a];for(var a in r)o[a]=r[a]}}));return o}function Ye(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:yn(),deltaFinal:yn(),deltaTransform:""}}var ze=Ye(),We={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Ne(t,n,e){var r=t.x,o=t.y,i="translate3d("+r.translate/n.x+"px, "+o.translate/n.y+"px, 0) ";if(e){var a=e.rotate,u=e.rotateX,s=e.rotateY;a&&(i+="rotate("+a+") "),u&&(i+="rotateX("+u+") "),s&&(i+="rotateY("+s+") ")}return i+="scale("+r.scale+", "+o.scale+")",e||i!==Ge?i:""}var _e,Ge=Ne(ze.delta,ze.treeScale,{x:1,y:1});function qe(t,n){if(!Array.isArray(n))return!1;var e=n.length;if(e!==t.length)return!1;for(var r=0;r<e;r++)if(n[r]!==t[r])return!1;return!0}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(_e||(_e={}));var Ze=[_e.Animate,_e.Hover,_e.Tap,_e.Drag,_e.Focus,_e.Exit],$e=c(Ze).reverse(),Ke=Ze.length;function Je(t){var n,e=function(t){return function(n){return Promise.all(n.map((function(n){var e=n.animation,r=n.options;return Me(t,e,r)})))}}(t),r=((n={})[_e.Animate]=Qe(!0),n[_e.Hover]=Qe(),n[_e.Tap]=Qe(),n[_e.Drag]=Qe(),n[_e.Focus]=Qe(),n[_e.Exit]=Qe(),n),o={},i=!0,s=function(n,e){var r=xe(t,e);if(r){r.transition;var o=r.transitionEnd,i=u(r,["transition","transitionEnd"]);n=a(a(a({},n),i),o)}return n};function f(n,u){for(var f=t.getProps(),l=t.getVariantContext(!0)||{},d=[],v=new Set,p={},m=1/0,h=function(e){var o=$e[e],h=r[o],y=null!==(P=f[o])&&void 0!==P?P:l[o],g=ye(y),x=o===u?h.isActive:null;!1===x&&(m=e);var b=y===l[o]&&y!==f[o]&&g;if(b&&i&&t.manuallyAnimateOnMount&&(b=!1),h.protectedKeys=a({},p),!h.isActive&&null===x||!y&&!h.prevProp||De(y)||"boolean"==typeof y)return"continue";var E=function(t,n){if("string"==typeof n)return n!==t;if(he(n))return!qe(n,t);return!1}(h.prevProp,y)||o===u&&h.isActive&&!b&&g||e>m&&g,w=Array.isArray(y)?y:[y],A=w.reduce(s,{});!1===x&&(A={});var P=h.prevResolvedValues,C=void 0===P?{}:P,S=a(a({},C),A),M=function(t){E=!0,v.delete(t),h.needsAnimating[t]=!0};for(var T in S){var V=A[T],L=C[T];p.hasOwnProperty(T)||(V!==L?$n(V)&&$n(L)?qe(V,L)?h.protectedKeys[T]=!0:M(T):void 0!==V?M(T):v.add(T):void 0!==V&&v.has(T)?M(T):h.protectedKeys[T]=!0)}h.prevProp=y,h.prevResolvedValues=A,h.isActive&&(p=a(a({},p),A)),i&&t.blockInitialAnimation&&(E=!1),E&&!b&&d.push.apply(d,c(w.map((function(t){return{animation:t,options:a({type:o},n)}}))))},y=0;y<Ke;y++)h(y);if(o=a({},p),v.size){var g={};v.forEach((function(n){var e=t.getBaseTarget(n);void 0!==e&&(g[n]=e)})),d.push({animation:g})}var x=Boolean(d.length);return i&&!1===f.initial&&!t.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(d):Promise.resolve()}return{isAnimated:function(t){return void 0!==o[t]},animateChanges:f,setActive:function(n,e,o){var i;return r[n].isActive===e?Promise.resolve():(null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(n,e)})),r[n].isActive=e,f(o,n))},setAnimateFunction:function(n){e=n(t)},getState:function(){return r}}}function Qe(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var tr=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget"];function nr(t,n,e,r){var o,i,a=t.delta,u=t.layout,s=t.layoutCorrected,c=t.treeScale,f=n.target;i=u,gn((o=s).x,i.x),gn(o.y,i.y),function(t,n,e){var r=e.length;if(r){n.x=n.y=1;for(var o=0;o<r;o++){var i=e[o].getLayoutState().delta;n.x*=i.x.scale,n.y*=i.y.scale,wn(t,i)}}}(s,c,e),Rn(a,s,f,r)}var er=function(t){var n=t.treeType,e=void 0===n?"":n,r=t.createRenderState,o=t.build,i=t.getBaseTarget,u=t.makeTargetAnimatable,s=t.measureViewportBox,f=t.onMount,l=t.render,d=t.readValueFromInstance,v=t.resetTransform,p=t.restoreTransform,m=t.removeValueFromMutableState,h=t.sortNodePosition,y=t.scrapeMotionValuesFromProps;return function(t,n){var b,E=t.parent,w=t.ref,A=t.props,P=t.isStatic,C=t.presenceId,S=t.blockInitialAnimation;void 0===n&&(n={});var M,T,V,L,k,R=new Set,D=function(){var t=tr.map(Bn),n={},e={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return tr.forEach((function(r){var o;null===(o=n[r])||void 0===o||o.call(n);var i="on"+r,a=t[i];a&&(n[r]=e[i](a))}))}};return t.forEach((function(t,n){e["on"+tr[n]]=t.add,e["notify"+tr[n]]=t.notify})),e}(),O={isEnabled:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},B=Xe(A,E,S),F=O,j=B,I=Ye(),U=r(),H=!1,X=new Map,Y=new Map,z={},W=a({},B);function N(){return O.isEnabled&&I.isHydrated}function _(){var t,n,e;b&&(N()&&(t=F.targetFinal,n=F.target,e=j,An(t.x,n.x,e,Pn),An(t.y,n.y,e,Cn),Rn(I.deltaFinal,I.layoutCorrected,F.targetFinal,B)),G(),l(b,U))}function G(){var t=B;T&&T.isActive()&&(t=T.getCrossfadeState(nt)),o(nt,U,t,F,I,n,A)}function q(){D.notifyUpdate(B)}var Z=y(A);for(var $ in Z){var K=Z[$];void 0!==B[$]&&In(K)&&K.set(B[$],!1)}var J=be(A),Q=ye(A.initial),tt=Boolean(Q||J||A.variants),nt=a(a({treeType:e,current:null,depth:E?E.depth+1:0,path:E?c(E.path,[E]):[],presenceId:C,projection:O,variantChildren:tt?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==E?void 0:E.isMounted()),blockInitialAnimation:S,isStatic:P,isHoverEventsEnabled:!0,isMounted:function(){return Boolean(b)},addChild:function(t){return R.add(t),function(){return R.delete(t)}},addVariantChild:function(t){var n,e=nt.getClosestVariantNode();if(e)return null===(n=e.variantChildren)||void 0===n||n.add(t),function(){return e.variantChildren.delete(t)}},sortNodePosition:function(t){return h&&e===t.treeType?h(nt.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return tt?nt:null==E?void 0:E.getClosestVariantNode()},scheduleUpdateLayoutProjection:E?E.scheduleUpdateLayoutProjection:function(){return g.preRender(nt.updateLayoutProjection,!1,!0)},getLayoutId:function(){return A.layoutId},getInstance:function(){return b},getStaticValue:function(t){return B[t]},setStaticValue:function(t,n){return B[t]=n},getLatestValues:function(){return B},clearState:function(t){X.clear(),j=B=Xe(A=t,E,S),U=r()},setVisibility:function(t){nt.isVisible!==t&&(nt.isVisible=t,nt.scheduleRender())},makeTargetAnimatable:function(t,n){return void 0===n&&(n=!0),u(nt,t,A,n)},suspendHoverEvents:function(){nt.isHoverEventsEnabled=!1,g.postRender((function(){return setTimeout((function(){return nt.isHoverEventsEnabled=!0}),10)}))},addValue:function(t,n){nt.hasValue(t)&&nt.removeValue(t),X.set(t,n),B[t]=n.get(),function(t,n){var e=n.onChange((function(n){B[t]=n,A.onUpdate&&g.update(q,!1,!0)})),r=n.onRenderRequest(nt.scheduleRender);Y.set(t,(function(){e(),r()}))}(t,n)},removeValue:function(t){var n;X.delete(t),null===(n=Y.get(t))||void 0===n||n(),Y.delete(t),delete B[t],m(t,U)},hasValue:function(t){return X.has(t)},getValue:function(t,n){var e=X.get(t);return void 0===e&&void 0!==n&&(e=jn(n),nt.addValue(t,e)),e},forEachValue:function(t){return X.forEach(t)},readValue:function(t){var e;return null!==(e=B[t])&&void 0!==e?e:d(b,t,n)},setBaseTarget:function(t,n){W[t]=n},getBaseTarget:function(t){if(i){var n=i(A,t);if(void 0!==n&&!In(n))return n}return W[t]}},D),{ref:function(t){b=nt.current=t,t?(nt.pointTo(nt),L=null==E?void 0:E.addChild(nt),tt&&E&&!J&&(k=null==E?void 0:E.addVariantChild(nt)),null==f||f(nt,b,U)):(x.update(q),x.render(_),x.preRender(nt.updateLayoutProjection),Y.forEach((function(t){return t()})),nt.stopLayoutAnimation(),null==L||L(),null==k||k(),null==M||M(),D.clearAllListeners()),w&&("function"==typeof w?w(t):On(w)&&(w.current=t))},build:function(){return G(),U},scheduleRender:function(){g.render(_,!1,!0)},syncRender:_,setProps:function(t){A=t,D.updatePropListeners(t),z=function(t,n,e){var r;for(var o in n){var i=n[o],a=e[o];if(In(i))t.addValue(o,i);else if(In(a))t.addValue(o,jn(i));else if(a!==i)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(i)}else t.addValue(o,jn(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in e)void 0===n[o]&&t.removeValue(o);return n}(nt,y(A),z)},getProps:function(){return A},getVariant:function(t){var n;return null===(n=A.variants)||void 0===n?void 0:n[t]},getDefaultTransition:function(){return A.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==E?void 0:E.getVariantContext();if(!J){var n=(null==E?void 0:E.getVariantContext())||{};return void 0!==A.initial&&(n.initial=A.initial),n}for(var e={},r=0;r<ir;r++){var o=or[r],i=A[o];(ye(i)||!1===i)&&(e[o]=i)}return e},enableLayoutProjection:function(){O.isEnabled=!0},lockProjectionTarget:function(){O.isTargetLocked=!0},unlockProjectionTarget:function(){nt.stopLayoutAnimation(),O.isTargetLocked=!1},snapshotViewportBox:function(){nt.prevViewportBox=nt.measureViewportBox(!1),nt.rebaseProjectionTarget(!1,nt.prevViewportBox)},getLayoutState:function(){return I},setCrossfader:function(t){T=t},startLayoutAnimation:function(t,n){var e=nt.getProjectionAnimationProgress()[t],r=O.target[t],o=r.min,i=r.max-o;return e.clearListeners(),e.set(o),e.set(o),e.onChange((function(n){return nt.setProjectionTargetAxis(t,n,n+i)})),nt.animateMotionValue(t,e,0,n)},stopLayoutAnimation:function(){dn((function(t){return nt.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var e,r,o=s(b,n);return t||(r=B,Mn((e=o).x,r,Pn),Mn(e.y,r,Cn)),o},updateLayoutMeasurement:function(){var t;nt.notifyBeforeLayoutMeasure(I.layout),I.isHydrated=!0,I.layout=nt.measureViewportBox(),I.layoutCorrected=(t=I.layout,{x:a({},t.x),y:a({},t.y)}),nt.notifyLayoutMeasure(I.layout,nt.prevViewportBox||I.layout),g.update((function(){return nt.rebaseProjectionTarget()}))},getProjectionAnimationProgress:function(){return V||(V={x:jn(0),y:jn(0)}),V},setProjectionTargetAxis:function(t,n,e){var r=O.target[t];r.min=n,r.max=e,H=!0,D.notifySetAxisTarget()},rebaseProjectionTarget:function(t,n){void 0===n&&(n=I.layout);var e=nt.getProjectionAnimationProgress(),r=e.x,o=e.y,i=!O.isTargetLocked&&!r.isAnimating()&&!o.isAnimating();(t||i)&&dn((function(t){var e=n[t],r=e.min,o=e.max;nt.setProjectionTargetAxis(t,r,o)}))},notifyLayoutReady:function(t){nt.notifyLayoutUpdate(I.layout,nt.prevViewportBox||I.layout,t)},resetTransform:function(){return v(nt,b,A)},withoutTransform:function(t){var n=O.isEnabled;n&&nt.resetTransform(),E?E.withoutTransform(t):t(),n&&p(b,U)},updateLayoutProjection:function(){N()&&function(){var t=I.delta,n=I.treeScale,e=n.x,r=n.x,o=I.deltaTransform;nr(I,F,nt.path,B),H&&nt.notifyViewportBoxUpdate(F.target,t),H=!1;var i=Ne(t,n);i===o&&e===n.x&&r===n.y||nt.scheduleRender(),I.deltaTransform=i}(),R.forEach(rr)},pointTo:function(t){F=t.projection,j=t.getLatestValues(),null==M||M(),M=xt(t.onSetAxisTarget(nt.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;nt.isPresent?nt.presence=cn.Present:null===(t=nt.layoutSafeToRemove)||void 0===t||t.call(nt)})))},isPresent:!0,presence:cn.Entering});return nt}};function rr(t){t.updateLayoutProjection()}var or=c(["initial"],Ze),ir=or.length;function ar(t,n){return pn(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=vn);var a=n({x:r,y:e}),u=n({x:i,y:o});return{top:a.y,left:a.x,bottom:u.y,right:u.x}}(t.getBoundingClientRect(),n))}function ur(t){return t.startsWith("--")}function sr(t,n,e,r,o,i){var a,u=t.style,s=t.vars,c=t.transform,f=t.transformKeys,l=t.transformOrigin;f.length=0;var d=!1,v=!1,p=!0;for(var m in n){var h=n[m];if(ur(m))s[m]=h;else{var y=ce(m),g=fe(h,y);if(zn(m)){if(d=!0,c[m]=g,f.push(m),!p)continue;h!==(null!==(a=y.default)&&void 0!==a?a:0)&&(p=!1)}else if(Nn(m))l[m]=g,v=!0;else if(r.isHydrated&&Ue[m]){var x=Ue[m].process(h,r,e),b=Ue[m].applyTo;if(b)for(var E=b.length,w=0;w<E;w++)u[b[w]]=x;else u[m]=x}else u[m]=g}}e.isEnabled&&r.isHydrated?(u.transform=Ne(r.deltaFinal,r.treeScale,d?c:void 0),i&&(u.transform=i(c,u.transform)),u.transformOrigin=function(t){var n=t.deltaFinal;return 100*n.x.origin+"% "+100*n.y.origin+"% 0"}(r)):(d&&(u.transform=function(t,n,e,r){var o=t.transform,i=t.transformKeys,a=n.enableHardwareAcceleration,u=void 0===a||a,s=n.allowTransformNone,c=void 0===s||s,f="";i.sort(Xn);for(var l=!1,d=i.length,v=0;v<d;v++){var p=i[v];f+=(We[p]||p)+"("+o[p]+") ","z"===p&&(l=!0)}return!l&&u?f+="translateZ(0)":f=f.trim(),r?f=r(o,e?"":f):c&&e&&(f="none"),f}(t,o,p,i)),v&&(u.transformOrigin=function(t){var n=t.originX,e=void 0===n?"50%":n,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return e+" "+o+" "+(void 0===i?0:i)}(l)))}var cr,fr=new Set(["width","height","top","left","right","bottom","x","y"]),lr=function(t){return fr.has(t)},dr=function(t,n){t.set(n,!1),t.set(n)},vr=function(t){return t===H||t===_};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(cr||(cr={}));var pr=function(t,n){return parseFloat(t.split(", ")[n])},mr=function(t,n){return function(e,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return pr(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?pr(a[1],t):0}},hr=new Set(["x","y","z"]),yr=Hn.filter((function(t){return!hr.has(t)}));var gr={width:function(t){var n=t.x;return n.max-n.min},height:function(t){var n=t.y;return n.max-n.min},top:function(t,n){var e=n.top;return parseFloat(e)},left:function(t,n){var e=n.left;return parseFloat(e)},bottom:function(t,n){var e=t.y,r=n.top;return parseFloat(r)+(e.max-e.min)},right:function(t,n){var e=t.x,r=n.left;return parseFloat(r)+(e.max-e.min)},x:mr(4,13),y:mr(5,14)},xr=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=a({},n),r=a({},r);var o=Object.keys(n).filter(lr),i=[],u=!1,c=[];if(o.forEach((function(o){var a=t.getValue(o);if(t.hasValue(o)){var s,f=e[o],l=n[o],d=ae(f);if($n(l))for(var v=l.length,p=null===l[0]?1:0;p<v;p++)s?ae(l[p]):s=ae(l[p]);else s=ae(l);if(d!==s)if(vr(d)&&vr(s)){var m=a.get();"string"==typeof m&&a.set(parseFloat(m)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&s===_&&(n[o]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==s?void 0:s.transform)&&(0===f||0===l)?0===f?a.set(s.transform(f)):n[o]=d.transform(l):(u||(i=function(t){var n=[];return yr.forEach((function(e){var r=t.getValue(e);void 0!==r&&(n.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))})),n.length&&t.syncRender(),n}(t),u=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],dr(a,l))}})),c.length){var f=function(t,n,e){var r=n.measureViewportBox(),o=n.getInstance(),i=getComputedStyle(o),a=i.display,u={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===a&&n.setStaticValue("display",t.display||"block"),n.syncRender();var s=n.measureViewportBox();return e.forEach((function(e){var o=n.getValue(e);dr(o,gr[e](r,u)),t[e]=gr[e](s,i)})),t}(n,t,c);return i.length&&i.forEach((function(n){var e=s(n,2),r=e[0],o=e[1];t.getValue(r).set(o)})),t.syncRender(),{target:f,transitionEnd:r}}return{target:n,transitionEnd:r}};function br(t,n,e,r){return function(t){return Object.keys(t).some(lr)}(n)?xr(t,n,e,r):{target:n,transitionEnd:r}}var Er=function(t,n,e,r){var o=function(t,n,e){var r,o=u(n,[]),i=t.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:e};for(var s in e&&(e=a({},e)),t.forEachValue((function(t){var n=t.get();if(Oe(n)){var e=Fe(n,i);e&&t.set(e)}})),o){var c=o[s];if(Oe(c)){var f=Fe(c,i);f&&(o[s]=f,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:o,transitionEnd:e}}(t,n,r);return br(t,n=o.target,e,r=o.transitionEnd)};var wr={treeType:"dom",readValueFromInstance:function(t,n){if(zn(n)){var e=ce(n);return e&&e.default||0}var r,o=(r=t,window.getComputedStyle(r));return(ur(n)?o.getPropertyValue(n):o[n])||0},createRenderState:function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}},sortNodePosition:function(t,n){return 2&t.compareDocumentPosition(n)?1:-1},getBaseTarget:function(t,n){var e;return null===(e=t.style)||void 0===e?void 0:e[n]},measureViewportBox:function(t,n){return ar(t,n.transformPagePoint)},resetTransform:function(t,n,e){t.suspendHoverEvents();var r=e.transformTemplate;n.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,n){t.style.transform=n.style.transform},removeValueFromMutableState:function(t,n){var e=n.vars,r=n.style;delete e[t],delete r[t]},makeTargetAnimatable:function(t,n,e,r){var o=e.transformValues;void 0===r&&(r=!0);var i=n.transition,s=n.transitionEnd,c=u(n,["transition","transitionEnd"]),f=Se(c,i||{},t);if(o&&(s&&(s=o(s)),c&&(c=o(c)),f&&(f=o(f))),r){Pe(t,c,f);var l=Er(t,c,f,s);s=l.transitionEnd,c=l.target}return a({transition:i,transitionEnd:s},c)},scrapeMotionValuesFromProps:function(t){var n=t.style,e={};for(var r in n)(In(n[r])||He(r,t))&&(e[r]=n[r]);return e},build:function(t,n,e,r,o,i,a){void 0!==t.isVisible&&(n.style.visibility=t.isVisible?"visible":"hidden"),sr(n,e,r,o,i,a.transformTemplate)},render:function(t,n){var e=n.style,r=n.vars;for(var o in Object.assign(t.style,e),r)t.style.setProperty(o,r[o])}},Ar=er(wr);function Pr(t,n,e){return"string"==typeof t?t:_.transform(n+e*t)}var Cr=function(t,n){return _.transform(t*n)},Sr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mr={offset:"strokeDashoffset",array:"strokeDasharray"};function Tr(t,n,e,r,o,i){var a=n.attrX,s=n.attrY,c=n.originX,f=n.originY,l=n.pathLength,d=n.pathSpacing,v=void 0===d?1:d,p=n.pathOffset,m=void 0===p?0:p;sr(t,u(n,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),e,r,o,i),t.attrs=t.style,t.style={};var h=t.attrs,y=t.style,g=t.dimensions,x=t.totalPathLength;h.transform&&(y.transform=h.transform,delete h.transform),(void 0!==c||void 0!==f||y.transform)&&(y.transformOrigin=function(t,n,e){return Pr(n,t.x,t.width)+" "+Pr(e,t.y,t.height)}(g,void 0!==c?c:.5,void 0!==f?f:.5)),void 0!==a&&(h.x=a),void 0!==s&&(h.y=s),void 0!==x&&void 0!==l&&function(t,n,e,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?Sr:Mr;t[a.offset]=Cr(-o,n);var u=Cr(e,n),s=Cr(r,n);t[a.array]=u+" "+s}(h,x,l,v,m,!1)}var Vr=/([a-z])([A-Z])/g,Lr=function(t){return t.replace(Vr,"$1-$2").toLowerCase()},kr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),Rr={x:0,y:0,width:0,height:0},Dr=er(a(a({},wr),{createRenderState:function(){return a(a({},wr.createRenderState()),{attrs:{},dimensions:Rr})},onMount:function(t,n,e){try{e.dimensions="function"==typeof n.getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){e.dimensions=Rr}(function(t){return"path"===t.tagName})(n)&&(e.totalPathLength=n.getTotalLength()),t.scheduleRender()},getBaseTarget:function(t,n){return t[n]},readValueFromInstance:function(t,n){var e;return zn(n)?(null===(e=ce(n))||void 0===e?void 0:e.default)||0:(n=kr.has(n)?n:Lr(n),t.getAttribute(n))},scrapeMotionValuesFromProps:function(t){var n=wr.scrapeMotionValuesFromProps(t);for(var e in t)In(t[e])&&("x"!==e&&"y"!==e||(e="attr"+e.toUpperCase()),n[e]=t[e]);return n},build:function(t,n,e,r,o,i,a){Tr(n,e,r,o,i,a.transformTemplate)},render:function(t,n){for(var e in wr.render(t,n),n.attrs)t.setAttribute(kr.has(e)?e:Lr(e),n.attrs[e])}}));var Or=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Br(t){return"string"==typeof t&&(!t.includes("-")&&(Or.indexOf(t)>-1||(!!/[A-Z]/.test(t)||void 0)))}function Fr(t){return function(n,e){var r=Br(t);return(r?Dr:Ar)(e,{enableHardwareAcceleration:!n&&!r})}}function jr(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}function Ir(t,n){var e=n.style||{},r={};for(var o in e)In(e[o])||He(o,n)||(r[o]=e[o]);return r=a(a({},r),function(t){var n=function(){var n=t.build(),e=n.vars,r=n.style;return a(a({},e),r)};return t.isStatic?n():jr(n)}(t)),n.transformValues&&(r=n.transformValues(r)),r}function Ur(t,n){var e={},r=Ir(t,n);return Boolean(n.drag)&&(e.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===n.drag?"none":"pan-"+("x"===n.drag?"y":"x")),e.style=r,e}var Hr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"],Xr=new Set(c(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag"],Hr));function Yr(t){return Xr.has(t)}var zr=function(t){return!Yr(t)};try{var Wr=require("@emotion/is-prop-valid").default;zr=function(t){return t.startsWith("on")?!Yr(t):Wr(t)}}catch(t){}function Nr(t,n){var e=function(t,n){var e=function(){var e=t.build().attrs,r={};for(var o in n)In(n[o])&&(r[o]=n[o].get());return a(a({},e),r)};return t.isStatic?e():jr(e)}(t,n),r=Ir(t,n);return delete r.transform,delete r.transformOrigin,e.style=r,e}function _r(t,e){void 0===e&&(e=!1);return function(r,o){var i=(Br(t)?Nr:Ur)(o,r);return n.createElement(t,a(a(a({},function(t,n,e){var r={};for(var o in t)(zr(o)||!0===e&&Yr(o)||!n&&!Yr(o))&&(r[o]=t[o]);return r}(r,"string"==typeof t,e)),{ref:o.ref}),i))}}var Gr=n.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});var qr=n.createContext(void 0);function Zr(){return n.useContext(qr)}var $r=n.createContext(null);function Kr(){var t=n.useContext($r);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,o=t.register,i=no();n.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function Jr(t){return null===t||t.isPresent}var Qr=0,to=function(){return Qr++},no=function(){return jr(to)},eo=n.createContext(null),ro={measureLayout:function(t){return t.updateLayoutMeasurement()},layoutReady:function(t){return t.notifyLayoutReady()}};function oo(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?ro:n,r=e.measureLayout,o=e.layoutReady,i=e.parent,a=Array.from(t).sort((function(t,n){return t.depth-n.depth})),u=function(){a.forEach((function(t){return t.resetTransform()})),a.forEach(r)};i?i.withoutTransform(u):u(),a.forEach(o),a.forEach((function(t){t.isPresent&&(t.presence=cn.Present)})),t.clear()}}}function io(t){return!!t.forceUpdate}var ao=n.createContext(oo()),uo=n.createContext(oo()),so="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function co(t,e,r,o){var i=n.useContext(Gr),u=Zr(),s=n.useContext($r),c=function(t){var e=t.layoutId,r=n.useContext(eo);return r&&void 0!==e?r+"-"+e:e}(e),f=n.useRef(null);r&&f.current?f.current.clearState(e):f.current||(f.current=t(r,{parent:u,ref:o,isStatic:r,props:a(a({},e),{layoutId:c}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)}));var l=f.current;return so((function(){l.setProps(a(a(a({},i),e),{layoutId:c})),l.isPresent=Jr(s),l.isPresenceRoot=!u||u.presenceId!==(null==s?void 0:s.id),l.isStatic||l.syncRender()})),r||(n.useEffect((function(){var t;null===(t=l.animationState)||void 0===t||t.animateChanges()})),function(t){var e=n.useContext(ao),r=n.useContext(uo);so((function(){return function(){io(e)&&e.remove(t),io(r)&&r.remove(t)}}),[])}(l)),l}function fo(t){var e=t.defaultFeatures,r=t.createVisualElement,o=t.useRender;return n.forwardRef((function(t,i){var u=n.useContext(Gr).isStatic,s=co(r,t,u,i),f=function(t,e,r,o){var i=n.useContext(Gr);if(e||"undefined"==typeof window)return null;for(var u=c(t,i.features),s=u.length,f=[],l=0;l<s;l++){var d=u[l],v=d.shouldRender,p=d.key,m=d.getComponent;if(v(o)){var h=m(o);h&&f.push(n.createElement(h,a({key:p},o,{visualElement:r})))}}return f}(e,u,s,t),l=o(t,s);return n.createElement(n.Fragment,null,n.createElement(qr.Provider,{value:s},l),f)}))}function lo(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function vo(t){return!!t.touches}var po={pageX:0,pageY:0};function mo(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||po;return{x:e[n+"X"],y:e[n+"Y"]}}function ho(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function yo(t,n){return void 0===n&&(n="page"),{point:vo(t)?mo(t,n):ho(t,n)}}function go(t){return yo(t,"client")}var xo=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,yo(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r};function bo(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Eo(t,e,r,o){n.useEffect((function(){var n=t.current;if(r&&n)return bo(n,e,r,o)}),[t,e,r,o])}var wo="undefined"!=typeof window,Ao={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Po={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Co(t){return wo&&null===window.onpointerdown?t:wo&&null===window.ontouchstart?Po[t]:wo&&null===window.onmousedown?Ao[t]:t}function So(t,n,e,r){return bo(t,Co(n),xo(e,"pointerdown"===n),r)}function Mo(t,n,e,r){return Eo(t,Co(n),e&&xo(e,"pointerdown"===n),r)}var To=function(){function t(t,n,e){var r=this,o=(void 0===e?{}:e).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=ko(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=nn(t.offset,{x:0,y:0})>=3;if(n||e){var o=t.point,i=A().timestamp;r.history.push(a(a({},o),{timestamp:i}));var u=r.handlers,s=u.onStart,c=u.onMove;n||(s&&s(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,n){r.lastMoveEvent=t,r.lastMoveEventInfo=Vo(n,r.transformPagePoint),lo(t)&&0===t.buttons?r.handlePointerUp(t,n):g.update(r.updatePoint,!0)},this.handlePointerUp=function(t,n){r.end();var e=r.handlers.onEnd;if(e&&r.startEvent){var o=ko(Vo(n,r.transformPagePoint),r.history);e&&e(t,o)}},!(vo(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=o;var i=Vo(yo(t),this.transformPagePoint),u=i.point,s=A().timestamp;this.history=[a(a({},u),{timestamp:s})];var c=n.onSessionStart;c&&c(t,ko(i,this.history)),this.removeListeners=xt(So(window,"pointermove",this.handlePointerMove),So(window,"pointerup",this.handlePointerUp),So(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),x.update(this.updatePoint)},t}();function Vo(t,n){return n?{point:n(t.point)}:t}function Lo(t,n){return{x:t.x-n.x,y:t.y-n.y}}function ko(t,n){var e=t.point;return{point:e,delta:Lo(e,Do(n)),offset:Lo(e,Ro(n)),velocity:Oo(n,.1)}}function Ro(t){return t[0]}function Do(t){return t[t.length-1]}function Oo(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=Do(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>_n(n)));)e--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Bo(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var Fo=Bo("dragHorizontal"),jo=Bo("dragVertical");function Io(t){var n=!1;if("y"===t)n=jo();else if("x"===t)n=Fo();else{var e=Fo(),r=jo();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}function Uo(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?D(r,t,e):Math.max(t,r):void 0!==o&&t>o&&(t=e?D(o,t,e):Math.min(t,o)),t}function Ho(t,n,e){return{min:void 0!==n?t.min+n:void 0,max:void 0!==e?t.max+e-(t.max-t.min):void 0}}function Xo(t,n){var e,r=n.min-t.min,o=n.max-t.max;return n.max-n.min<t.max-t.min&&(r=(e=s([o,r],2))[0],o=e[1]),{min:t.min+r,max:t.min+o}}var Yo,zo=new WeakMap,Wo=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),zo.set(n,this)}return t.prototype.start=function(t,n){var e=this,r=void 0===n?{}:n,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress;i&&this.snapToCursor(t);var u=this.props.transformPagePoint;this.panSession=new To(t,{onSessionStart:function(){e.stopMotion()},onStart:function(t,n){var r,o,i,u=e.props,s=u.drag,c=u.dragPropagation;if(!s||c||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=Io(s),e.openGlobalLock)){e.prepareBoundingBox(),e.visualElement.lockProjectionTarget(),e.resolveDragConstraints();var f=go(t).point;dn((function(t){var n=e.visualElement.projection.target[t],r=n.min,o=n.max;e.cursorProgress[t]=a?a[t]:R(r,o,f[t]);var i=e.getAxisMotionValue(t);i&&(e.originPoint[t]=i.get())})),e.isDragging=!0,e.currentDirection=null,null===(o=(r=e.props).onDragStart)||void 0===o||o.call(r,t,n),null===(i=e.visualElement.animationState)||void 0===i||i.setActive(_e.Drag,!0)}},onMove:function(t,n){var r,o,i,a,u=e.props,s=u.dragPropagation,c=u.dragDirectionLock;if(s||e.openGlobalLock){var f=n.offset;if(c&&null===e.currentDirection)return e.currentDirection=function(t,n){void 0===n&&(n=10);var e=null;Math.abs(t.y)>n?e="y":Math.abs(t.x)>n&&(e="x");return e}(f),void(null!==e.currentDirection&&(null===(o=(r=e.props).onDirectionLock)||void 0===o||o.call(r,e.currentDirection)));e.updateAxis("x",t,f),e.updateAxis("y",t,f),null===(a=(i=e.props).onDrag)||void 0===a||a.call(i,t,n),Yo=t}},onEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:u})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement;t.withoutTransform((function(){t.updateLayoutMeasurement()})),t.rebaseProjectionTarget(!0,t.measureViewportBox(!1))},t.prototype.resolveDragConstraints=function(){var t,n,e,r,o,i,a=this,u=this.props.dragConstraints;this.constraints=!!u&&(On(u)?this.resolveRefConstraints(this.visualElement.getLayoutState().layout,u):(t=this.visualElement.getLayoutState().layout,e=(n=u).top,r=n.left,o=n.bottom,i=n.right,{x:Ho(t.x,r,i),y:Ho(t.y,e,o)})),this.constraints&&!this.hasMutatedConstraints&&dn((function(t){var n,e,r;a.getAxisMotionValue(t)&&(a.constraints[t]=(n=a.visualElement.getLayoutState().layout[t],e=a.constraints[t],r={},void 0!==e.min&&(r.min=e.min-n.min),void 0!==e.max&&(r.max=e.max-n.min),r))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=ar(i,o);var a=function(t,n){return{x:Xo(t.x,n.x),y:Xo(t.y,n.y)}}(t,this.constraintsBox);if(r){var u=r(function(t){var n=t.x,e=t.y;return{top:e.min,bottom:e.max,left:n.min,right:n.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=pn(u))}return a},t.prototype.cancelDrag=function(){var t;this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(_e.Drag,!1)},t.prototype.stop=function(t,n){var e;this.visualElement.unlockProjectionTarget(),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,u=o.onDragEnd;if(i||a){var s=n.velocity;this.animateDragEnd(s)}null==u||u(t,n)}},t.prototype.snapToCursor=function(t){var n=this;this.prepareBoundingBox(),dn((function(e){if(No(e,n.props.drag,n.currentDirection)){var r=n.getAxisMotionValue(e);if(r){var o=go(t).point,i=n.visualElement.getLayoutState().layout,a=i[e].max-i[e].min,u=i[e].min+a/2,s=o[e]-u;n.originPoint[e]=o[e],r.set(s)}else n.cursorProgress[e]=.5,n.updateVisualElementAxis(e,t)}}))},t.prototype.updateAxis=function(t,n,e){if(No(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,e):this.updateVisualElementAxis(t,n)},t.prototype.updateAxisMotionValue=function(t,n){var e=this.getAxisMotionValue(t);if(n&&e){var r=this.props.dragElastic,o=this.originPoint[t]+n[t],i=this.constraints?Uo(o,this.constraints[t],r):o;e.set(i)}},t.prototype.updateVisualElementAxis=function(t,n){var e,r=this.props.dragElastic,o=this.visualElement.getLayoutState().layout[t],i=o.max-o.min,a=this.cursorProgress[t],u=function(t,n,e,r,o){var i=t-n*e;return r?Uo(i,r,o):i}(go(n).point[t],i,a,null===(e=this.constraints)||void 0===e?void 0:e[t],r);this.visualElement.setProjectionTargetAxis(t,u,u+i)},t.prototype.setProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,o=void 0!==r&&r,i=t.dragPropagation,s=void 0!==i&&i,c=t.dragConstraints,f=void 0!==c&&c,l=t.dragElastic,d=void 0===l?.35:l,v=t.dragMomentum,p=void 0===v||v,m=u(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=a({drag:e,dragDirectionLock:o,dragPropagation:s,dragConstraints:f,dragElastic:d,dragMomentum:p},m)},t.prototype.getAxisMotionValue=function(t){var n=this.props,e=n.layout,r=n.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:e||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.animateDragEnd=function(t){var n=this,e=this.props,r=e.drag,o=e.dragMomentum,i=e.dragElastic,u=e.dragTransition,s=dn((function(e){if(No(e,r,n.currentDirection)){var s=n.constraints?n.constraints[e]:{},c=i?200:1e6,f=i?40:1e7,l=a(a({type:"inertia",velocity:o?t[e]:0,bounceStiffness:c,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},u),s);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,l):n.visualElement.startLayoutAnimation(e,l)}}));return Promise.all(s).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;dn((function(n){var e=t.getAxisMotionValue(n);e?e.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,n){var e=this.getAxisMotionValue(t);if(e){var r=e.get();return e.set(r),e.set(r),me(t,e,0,n)}},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag;if(On(n.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};dn((function(n){r[n]=Ln(t.visualElement.projection.target[n],t.constraintsBox[n])})),this.prepareBoundingBox(),this.resolveDragConstraints(),dn((function(n){if(No(n,e,null)){var o=function(t,n,e){var r=t.max-t.min,o=D(n.min,n.max-r,e);return{min:o,max:o+r}}(t.visualElement.projection.target[n],t.constraintsBox[n],r[n]),i=o.min,a=o.max;t.visualElement.setProjectionTargetAxis(n,i,a)}}))}},t.prototype.mount=function(t){var n=this,e=So(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=bo(window,"resize",(function(){n.scalePoint()})),o=t.onLayoutUpdate((function(){n.isDragging&&n.resolveDragConstraints()})),i=t.prevDragCursor;return i&&this.start(Yo,{cursorProgress:i}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function No(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var _o=function(t){return function(n){return t(n),null}},Go=_o((function(t){var e=t.visualElement;return function(t,e){var r=t.dragControls,o=n.useContext(Gr).transformPagePoint,i=jr((function(){return new Wo({visualElement:e})}));i.setProps(a(a({},t),{transformPagePoint:o})),n.useEffect((function(){return r&&r.subscribe(i)}),[i]),n.useEffect((function(){return i.mount(e)}),[])}(u(t,["visualElement"]),e)})),qo={key:"drag",shouldRender:function(t){return!!t.drag||!!t.dragControls},getComponent:function(){return Go}};function Zo(t){return n.useEffect((function(){return function(){return t()}}),[])}function $o(t,e){var r=t.onPan,o=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,u=r||o||i||a,s=n.useRef(null),c=n.useContext(Gr).transformPagePoint,f={onSessionStart:a,onStart:o,onMove:r,onEnd:function(t,n){s.current=null,i&&i(t,n)}};n.useEffect((function(){null!==s.current&&s.current.updateHandlers(f)})),Mo(e,"pointerdown",u&&function(t){s.current=new To(t,f,{transformPagePoint:c})}),Zo((function(){return s.current&&s.current.end()}))}var Ko=function(t,n){return!!n&&(t===n||Ko(t,n.parentElement))};function Jo(t,e){var r=t.onTap,o=t.onTapStart,i=t.onTapCancel,a=t.whileTap,u=r||o||i||a,s=n.useRef(!1),c=n.useRef(null);function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function l(){var t,n;return f(),s.current=!1,null===(t=e.animationState)||void 0===t||t.setActive(_e.Tap,!1),!(!(n=Io(!0))||(n(),0))}function d(t,n){l()&&(Ko(e.getInstance(),t.target)?null==r||r(t,n):null==i||i(t,n))}function v(t,n){l()&&(null==i||i(t,n))}Mo(e,"pointerdown",u?function(t,n){var r;f(),s.current||(s.current=!0,c.current=xt(So(window,"pointerup",d),So(window,"pointercancel",v)),null==o||o(t,n),null===(r=e.animationState)||void 0===r||r.setActive(_e.Tap,!0))}:void 0),Zo(f)}function Qo(t,n,e){return function(r,o){var i;lo(r)&&t.isHoverEventsEnabled&&(null==e||e(r,o),null===(i=t.animationState)||void 0===i||i.setActive(_e.Hover,n))}}function ti(t,n){$o(t,n),Jo(t,n),function(t,n){var e=t.onHoverStart,r=t.onHoverEnd,o=t.whileHover;Mo(n,"pointerenter",e||o?Qo(n,!0,e):void 0),Mo(n,"pointerleave",r||o?Qo(n,!1,r):void 0)}(t,n),function(t,n){var e=t.whileFocus;Eo(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!0)}:void 0),Eo(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!1)}:void 0)}(t,n)}var ni=_o((function(t){var n=t.visualElement;ti(u(t,["visualElement"]),n)})),ei={key:"gestures",shouldRender:function(t){return Hr.some((function(n){return t.hasOwnProperty(n)}))},getComponent:function(){return ni}};var ri=_o((function(t){var e=t.custom,r=t.visualElement,o=s(Kr(),2),i=o[0],a=o[1],u=n.useContext($r);n.useEffect((function(){var t,n,o=null===(t=r.animationState)||void 0===t?void 0:t.setActive(_e.Exit,!i,{custom:null!==(n=null==u?void 0:u.custom)&&void 0!==n?n:e});!i&&(null==o||o.then(a))}),[i])})),oi={key:"exit",shouldRender:function(t){return!!t.exit&&!function(t){var n=t.animate,e=t.variants,r=t.inherit;return null!=r?r:!!e&&!n}(t)},getComponent:function(){return ri}},ii=_o((function(t){var e=t.visualElement,r=t.animate;e.animationState||(e.animationState=Je(e)),De(r)&&n.useEffect((function(){return r.subscribe(e)}),[r])})),ai={key:"animation",shouldRender:function(){return!0},getComponent:function(t){var n=t.animate,e=t.whileHover,r=t.whileFocus,o=t.whileTap,i=t.whileDrag,a=t.exit,u=t.variants;return n||e||r||o||i||a||u?ii:void 0}};var ui=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:0},y:{min:0,max:0}},e.stopAxisAnimation={x:void 0,y:void 0},e.isAnimatingTree=!1,e.animate=function(n,r,o){void 0===o&&(o={});var i=o.originBox,a=o.targetBox,s=o.visibilityAction,c=o.shouldStackAnimate,f=o.onComplete,l=u(o,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete"]),d=e.props,v=d.visualElement,p=d.layout;if(!1===c)return e.isAnimatingTree=!1,e.safeToRemove();if(!e.isAnimatingTree||!0===c){c&&(e.isAnimatingTree=!0);var m=ci(r=i||r,n=a||n),h=dn((function(o){if("position"===p){var i=n[o].max-n[o].min;r[o].max=r[o].min+i}if(!v.projection.isTargetLocked)return void 0===s?m?e.animateAxis(o,n[o],r[o],l):v.setProjectionTargetAxis(o,n[o].min,n[o].max):void v.setVisibility(s===t.VisibilityAction.Show)}));return v.syncRender(),Promise.all(h).then((function(){e.isAnimatingTree=!1,f&&f(),v.notifyLayoutAnimationComplete()}))}},e}return i(e,n),e.prototype.componentDidMount=function(){var t=this,n=this.props.visualElement;n.animateMotionValue=me,n.enableLayoutProjection(),this.unsubLayoutReady=n.onLayoutUpdate(this.animate),n.layoutSafeToRemove=function(){return t.safeToRemove()}},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),dn((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},e.prototype.animateAxis=function(t,n,e,r){var o,i,a=(void 0===r?{}:r).transition;null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o);var u=this.props.visualElement,s=this.frameTarget[t],c=u.getProjectionAnimationProgress()[t];c.clearListeners(),c.set(0),c.set(0);var f=function(){var r=c.get()/1e3;!function(t,n,e,r){t.min=D(n.min,e.min,r),t.max=D(n.max,e.max,r)}(s,e,n,r),u.setProjectionTargetAxis(t,s.min,s.max)};f(),u.updateLayoutProjection();var l=c.onChange(f),d=me("x"===t?"layoutX":"layoutY",c,1e3,a||this.props.transition||vi).then(l);return this.stopAxisAnimation[t]=function(){c.stop(),l()},d},e.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},e.prototype.render=function(){return null},e}(n.Component);function si(t){var e=s(Kr(),2)[1];return n.createElement(ui,a({},t,{safeToRemove:e}))}function ci(t,n){return!(li(t)||li(n)||di(t.x,n.x)&&di(t.y,n.y))}var fi={min:0,max:0};function li(t){return di(t.x,fi)&&di(t.y,fi)}function di(t,n){return t.min===n.min&&t.max===n.max}var vi={duration:.45,ease:[.4,0,.1,1]},pi={key:"animate-layout",shouldRender:function(t){return!!t.layout||void 0!==t.layoutId},getComponent:function(){return si}},mi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.framerSyncLayout,r=t.visualElement;io(n)&&n.register(r),io(e)&&e.register(r)},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return io(n)?n.syncUpdate():(e.snapshotViewportBox(),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;io(n)||n.flush(),e.rebaseProjectionTarget()},n.prototype.render=function(){return null},n}(r.default.Component);function hi(t){var e=n.useContext(ao),o=n.useContext(uo);return r.default.createElement(mi,a({},t,{syncLayout:e,framerSyncLayout:o}))}var yi={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||void 0!==t.layoutId},getComponent:function(){return hi}};function gi(t){function n(n,e){var r=(void 0===e?{}:e).forwardMotionProps,o=void 0!==r&&r;return fo({defaultFeatures:t,createVisualElement:Fr(n),useRender:_r(n,o)})}function e(t){return n(t,{forwardMotionProps:!0})}var r=new Map;return new Proxy(n,{get:function(t,o){return"custom"===o?e:(r.has(o)||r.set(o,n(o)),r.get(o))}})}var xi=[yi,ai,qo,ei,oi,pi],bi=gi(xi);var Ei=gi([yi]);var wi=0;function Ai(){var t=wi;return wi++,t}var Pi=function(t){var e=t.children,r=t.initial,o=t.isPresent,i=t.onExitComplete,a=t.custom,u=t.presenceAffectsLayout,s=jr(Ci),c=jr(Ai),f=n.useMemo((function(){return{id:c,initial:r,isPresent:o,custom:a,onExitComplete:function(t){s.set(t,!0);var n=!0;s.forEach((function(t){t||(n=!1)})),n&&(null==i||i())},register:function(t){return s.set(t,!1),function(){return s.delete(t)}}}}),u?void 0:[o]);return n.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),n.useEffect((function(){!o&&!s.size&&(null==i||i())}),[o]),n.createElement($r.Provider,{value:f},e)};function Ci(){return new Map}function Si(t){return t.key||""}function Mi(t,n,e){void 0===e&&(e={});var r=In(t)?t:jn(t);return me("",r,n,e),{stop:function(){return r.stop()}}}function Ti(){var t=jn(1),n={lead:void 0,follow:void 0,crossfadeOpacity:!1,preserveFollowOpacity:!1},e={},r={},o=!1,i=null,u=0;function s(e,r){var u=n.lead,s=n.follow;return o=!0,i=null,Mi(t,e,a(a({},r),{onUpdate:function(){u&&u.scheduleRender(),s&&s.scheduleRender()},onComplete:function(){o=!1,i=A().timestamp}}))}function c(){var o,i,a=A().timestamp,s=n.lead,c=n.follow;if(a!==u&&s){u=a;var f=s.getLatestValues();Object.assign(e,f);var l=c?c.getLatestValues():n.prevValues;Object.assign(r,l);var d=t.get(),v=null!==(o=f.opacity)&&void 0!==o?o:1,p=null!==(i=null==l?void 0:l.opacity)&&void 0!==i?i:1;n.crossfadeOpacity&&c?(e.opacity=D(0,v,Vi(d)),r.opacity=n.preserveFollowOpacity?p:D(p,0,Li(d))):c||(e.opacity=D(p,v,d)),function(t,n,e,r,o,i){for(var a=0;a<Di;a++){var u="border"+Ri[a]+"Radius",s=Oi(r,u),c=Oi(e,u);if((void 0!==s||void 0!==c)&&(s||(s=0),c||(c=0),"number"==typeof s&&"number"==typeof c)){var f=D(s,c,i);t[u]=n[u]=f}}if(r.rotate||e.rotate){var l=D(r.rotate||0,e.rotate||0,i);t.rotate=n.rotate=l}!o&&e.backgroundColor&&r.backgroundColor&&(t.backgroundColor=n.backgroundColor=ht(r.backgroundColor,e.backgroundColor)(i))}(e,r,f,l||{},Boolean(c),d)}}return{isActive:function(){return e&&(o||A().timestamp===i)},fromLead:function(t){return s(0,t)},toLead:function(e){return t.set(n.follow?1-t.get():0),s(1,e)},reset:function(){return t.set(1)},stop:function(){return t.stop()},getCrossfadeState:function(t){return c(),t===n.lead?e:r},setOptions:function(t){n=t,e={},r={}},getLatestValues:function(){return e}}}var Vi=ki(0,.5,jt),Li=ki(.5,.95,Rt);function ki(t,n,e){return function(r){return r<t?0:r>n?1:e(R(t,n,r))}}var Ri=["TopLeft","TopRight","BottomLeft","BottomRight"],Di=Ri.length;function Oi(t,n){var e;return null!==(e=t[n])&&void 0!==e?e:t.borderRadius}function Bi(){var t,n,e,r=new Set,o={leadIsExiting:!1},i=a({},o),u=Ti(),s=!1;return{add:function(t){t.setCrossfader(u),r.add(t),e&&(t.prevDragCursor=e),o.lead||(o.lead=t)},remove:function(t){r.delete(t)},getLead:function(){return o.lead},updateSnapshot:function(){if(o.lead){t=u.isActive()?u.getLatestValues():o.lead.getLatestValues(),n=o.lead.prevViewportBox;var r=zo.get(o.lead);r&&r.isDragging&&(e=r.cursorProgress)}},clearSnapshot:function(){e=n=void 0},updateLeadAndFollow:function(){var n,e,c;i=a({},o);for(var f=Array.from(r),l=f.length;l--;l>=0){var d=f[l];if(e&&(null!=c||(c=d)),null!=e||(e=d),e&&c)break}o.lead=e,o.follow=c,o.leadIsExiting=(null===(n=o.lead)||void 0===n?void 0:n.presence)===cn.Exiting,u.setOptions({lead:e,follow:c,prevValues:t,crossfadeOpacity:(null==c?void 0:c.isPresenceRoot)||(null==e?void 0:e.isPresenceRoot)}),i.lead===o.lead&&i.leadIsExiting===o.leadIsExiting||(s=!0)},animate:function(t,e){if(void 0===e&&(e=!1),t===o.lead){e?t.pointTo(o.lead):t.setVisibility(!0);var r={};if(t.presence===cn.Entering?r.originBox=o.follow?o.follow.prevViewportBox:n:t.presence===cn.Exiting&&(r.targetBox=null===(a=o.follow)||void 0===a?void 0:a.getLayoutState().layout),s){s=!1;var i=t.getDefaultTransition();t.presence===cn.Entering?u.toLead(i):u.fromLead(i)}t.notifyLayoutReady(r)}else e?o.lead&&t.pointTo(o.lead):t.setVisibility(!1);var a}}}var Fi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.children=new Set,n.stacks=new Map,n.hasMounted=!1,n.updateScheduled=!1,n.renderScheduled=!1,n.syncContext=a(a({},oo()),{syncUpdate:function(t){return n.scheduleUpdate(t)},forceUpdate:function(){n.syncContext=a({},n.syncContext),n.scheduleUpdate(!0)},register:function(t){return n.addChild(t)},remove:function(t){return n.removeChild(t)}}),n}return i(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var n=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==cn.Entering&&(t.presence=t.presence===cn.Exiting?cn.Entering:cn.Present):t.presence=cn.Exiting})),this.updateStacks();var e={measureLayout:function(t){return t.updateLayoutMeasurement()},layoutReady:function(e){void 0!==e.getLayoutId()?t.getStack(e).animate(e,"crossfade"===n):e.notifyLayoutReady()},parent:this.context};this.children.forEach((function(n){return t.syncContext.add(n)})),this.syncContext.flush(e),this.stacks.forEach((function(t){return t.clearSnapshot()}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return function(t){for(var n=!1,e={},r=0;r<Un.length;r++){var o="rotate"+Un[r];t.hasValue(o)&&0!==t.getStaticValue(o)&&(n=!0,e[o]=t.getStaticValue(o),t.setStaticValue(o,0))}if(n){for(var o in t.syncRender(),e)t.setStaticValue(o,e[o]);t.scheduleRender()}}(t)})),this.children.forEach((function(t){return t.snapshotViewportBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?cn.Entering:cn.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var n=this.getStack(t);null==n||n.add(t)},e.prototype.removeFromStack=function(t){var n=this.getStack(t);null==n||n.remove(t)},e.prototype.getStack=function(t){var n=t.getLayoutId();if(void 0!==n)return!this.stacks.has(n)&&this.stacks.set(n,Bi()),this.stacks.get(n)},e.prototype.render=function(){return n.createElement(ao.Provider,{value:this.syncContext},this.props.children)},e.contextType=qr,e}(n.Component);function ji(t){return jr((function(){return jn(t)}))}function Ii(t,e){n.useEffect((function(){return In(t)?t.onChange(e):void 0}))}function Ui(t,e){var r=ji(e()),o=function(){return r.set(e())};return o(),function(t,e){n.useEffect((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return g.update(o,!1,!0)})),r}var Hi=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Xi(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,o=t[0+r],i=t[1+r],u=t[2+r],s=t[3+r],c=Mt(i,u,a({mixer:Hi(u[0])},s));return e?c(o):c}function Yi(t,n,e,r){var o="function"==typeof n?n:Xi(n,e,r);return Array.isArray(t)?zi(t,o):zi([t],(function(t){var n=s(t,1)[0];return o(n)}))}function zi(t,n){var e=jr((function(){return[]}));return Ui(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}function Wi(){return{scrollX:jn(0),scrollY:jn(0),scrollXProgress:jn(0),scrollYProgress:jn(0)}}function Ni(t,n,e){e.set(t&&n?t/n:0)}function _i(t,n){var e=function(){var e=n(),r=e.xOffset,o=e.yOffset,i=e.xMaxOffset,a=e.yMaxOffset;t.scrollX.set(r),t.scrollY.set(o),Ni(r,i,t.scrollXProgress),Ni(o,a,t.scrollYProgress)};return e(),e}var Gi;function qi(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Zi,$i=!1;var Ki=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),function(){return n.componentControls.delete(t)}},t.prototype.start=function(t,n){this.componentControls.forEach((function(e){e.start(t.nativeEvent||t,n)}))},t.prototype.updateConstraints=function(){this.componentControls.forEach((function(t){t.prepareBoundingBox(),t.resolveDragConstraints()}))},t}(),Ji=function(){return new Ki};var Qi=er({createRenderState:function(){return{}},build:function(){},measureViewportBox:mn,resetTransform:function(){},restoreTransform:function(){},removeValueFromMutableState:function(){},render:function(){},scrapeMotionValuesFromProps:function(){return{}},readValueFromInstance:function(t,n,e){return e.initialState[n]||0},makeTargetAnimatable:function(t,n){var e=n.transition,r=n.transitionEnd,o=u(n,["transition","transitionEnd"]);return Pe(t,o,Se(o,e||{},t)),a({transition:e,transitionEnd:r},o)}});var ta=function(t){return t>.001?1/t:1e5};t.AnimateLayoutFeature=pi,t.AnimatePresence=function(t){var e=t.children,r=t.custom,o=t.initial,i=void 0===o||o,a=t.onExitComplete,u=t.exitBeforeEnter,f=t.presenceAffectsLayout,l=void 0===f||f,d=function(){var t=n.useRef(!1),e=s(n.useState(0),2),r=e[0],o=e[1];return Zo((function(){return t.current=!0})),n.useCallback((function(){!t.current&&o(r+1)}),[r])}(),v=n.useContext(ao);io(v)&&(d=v.forceUpdate);var p=n.useRef(!0),m=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(e),h=n.useRef(m),y=n.useRef(new Map).current,g=n.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=Si(t);n.set(e,t)}))}(m,y),p.current)return p.current=!1,n.createElement(n.Fragment,null,m.map((function(t){return n.createElement(Pi,{key:Si(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l},t)})));for(var x=c(m),b=h.current.map(Si),E=m.map(Si),w=b.length,A=0;A<w;A++){var P=b[A];-1===E.indexOf(P)?g.add(P):g.delete(P)}return u&&g.size&&(x=[]),g.forEach((function(t){if(-1===E.indexOf(t)){var e=y.get(t);if(e){var o=b.indexOf(t);x.splice(o,0,n.createElement(Pi,{key:Si(e),isPresent:!1,onExitComplete:function(){y.delete(t),g.delete(t);var n=h.current.findIndex((function(n){return n.key===t}));h.current.splice(n,1),g.size||(h.current=m,d(),a&&a())},custom:r,presenceAffectsLayout:l},e))}}})),x=x.map((function(t){var e=t.key;return g.has(e)?t:n.createElement(Pi,{key:Si(t),isPresent:!0,presenceAffectsLayout:l},t)})),h.current=x,n.createElement(n.Fragment,null,g.size?x:x.map((function(t){return n.cloneElement(t)})))},t.AnimateSharedLayout=Fi,t.AnimationFeature=ai,t.DragControls=Ki,t.DragFeature=qo,t.ExitFeature=oi,t.FramerTreeLayoutContext=uo,t.GesturesFeature=ei,t.LayoutGroupContext=eo,t.MotionConfig=function(t){var e=t.children,r=t.features,o=void 0===r?[]:r,i=t.transition,a=u(t,["children","features","transition"]),s=n.useContext(Gr),f=c(new Set(c(s.features,o))),l=n.useMemo((function(){return{features:f,transition:i||s.transition}}),[f.length,i]);for(var d in a)l[d]=a[d];return n.createElement(Gr.Provider,{value:l},e)},t.MotionConfigContext=Gr,t.MotionValue=Fn,t.PresenceContext=$r,t.SharedLayoutContext=ao,t.addScaleCorrection=function(t){for(var n in t)Ue[n]=t[n]},t.animate=Mi,t.animateVisualElement=Me,t.animationControls=Re,t.createBatcher=oo,t.createCrossfader=Ti,t.createDomMotionComponent=function(t){return fo({createVisualElement:Fr(t),useRender:_r(t,!1),defaultFeatures:xi})},t.createMotionComponent=fo,t.isValidMotionProp=Yr,t.m=Ei,t.motion=bi,t.motionValue=jn,t.resolveMotionValue=function(t){var n,e=t instanceof Fn?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e},t.transform=Xi,t.useAnimation=function(){var t=jr(Re);return n.useEffect(t.mount,[]),t},t.useCycle=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=n.useRef(0),o=s(n.useState(t[r.current]),2),i=o[0],a=o[1];return[i,function(n){r.current="number"!=typeof n?en(0,t.length,r.current+1):n,a(t[r.current])}]},t.useDeprecatedAnimatedState=function(t){var e=s(n.useState(t),2),r=e[0],o=e[1],i=jr((function(){return Qi({props:{}},{initialState:t})}));return n.useEffect((function(){return i.ref({}),function(){return i.ref(null)}}),[]),n.useEffect((function(){i.setProps({onUpdate:function(t){return o(a({},t))}})})),[r,jr((function(){return function(t){return Me(i,t)}}))]},t.useDeprecatedInvertedScale=function(t){var n=ji(1),e=ji(1),r=Zr();return t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.getValue("scaleX",1),e=r.getValue("scaleY",1)),{scaleX:Yi(n,ta),scaleY:Yi(e,ta)}},t.useDomEvent=Eo,t.useDragControls=function(){return jr(Ji)},t.useElementScroll=function(t){var n=jr(Wi);return so((function(){var e=t.current;if(e){var r=_i(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=bo(e,"scroll",r,{passive:!0}),i=bo(e,"resize",r);return function(){o&&o(),i&&i()}}}),[]),n},t.useGestures=ti,t.useIsPresent=function(){return Jr(n.useContext($r))},t.useMotionTemplate=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=t.length;function o(){for(var e="",o=0;o<r;o++){e+=t[o],n[o]&&(e+=n[o].get())}return e}return Ui(n,o)},t.useMotionValue=ji,t.usePanGesture=$o,t.usePresence=Kr,t.useReducedMotion=function(){!Zi&&function(){if(Zi=jn(null),"undefined"!=typeof window)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),n=function(){return Zi.set(t.matches)};t.addListener(n),n()}else Zi.set(!1)}();var t=s(n.useState(Zi.get()),2),e=t[0],r=t[1];return Ii(Zi,r),e},t.useSpring=function(t,e){void 0===e&&(e={});var r=n.useContext(Gr).isStatic,o=n.useRef(null),i=ji(In(t)?t.get():t);return n.useMemo((function(){return i.attach((function(t,n){return r?n(t):(o.current&&o.current.stop(),o.current=$t(a(a({from:i.get(),to:t,velocity:i.getVelocity()},e),{onUpdate:n})),i.get())}))}),Object.values(e)),Ii(t,(function(t){return i.set(parseFloat(t))})),i},t.useTapGesture=Jo,t.useTransform=Yi,t.useViewportScroll=function(){return Gi||(Gi=Wi()),so((function(){!$i&&function(){if($i=!0,"undefined"!=typeof window){var t=_i(Gi,qi);bo(window,"scroll",t,{passive:!0}),bo(window,"resize",t)}}()}),[]),Gi},t.visualElement=er,Object.defineProperty(t,"__esModule",{value:!0})}));
  