text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=r(e),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var a,i,u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function c(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,a=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(a||(a={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(i||(i={}));var l={measureLayout:function(t){return t.updateLayoutMeasurement()},layoutReady:function(t){return t.notifyLayoutReady()}};function d(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var r=void 0===e?l:e,n=r.measureLayout,o=r.layoutReady,i=r.parent,u=Array.from(t).sort((function(t,e){return t.depth-e.depth})),s=function(){u.forEach((function(t){return t.resetTransform()})),u.forEach(n)};i?i.withoutTransform(s):s(),u.forEach(o),u.forEach((function(t){t.isPresent&&(t.presence=a.Present)})),t.clear()}}}var v=e.createContext(d()),p=e.createContext(d());function m(t){return!!t.forceUpdate}var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,r=t.framerSyncLayout,n=t.visualElement;m(e)&&e.register(n),m(r)&&r.register(n)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;return m(e)?e.syncUpdate():(r.snapshotViewportBox(),e.add(r)),null},e.prototype.componentDidUpdate=function(){var t=this.props,e=t.syncLayout,r=t.visualElement;m(e)||e.flush(),r.rebaseProjectionTarget()},e.prototype.render=function(){return null},e}(n.default.Component);function h(t){var r=e.useContext(v),o=e.useContext(p);return n.default.createElement(y,u({},t,{syncLayout:r,framerSyncLayout:o}))}var g={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||void 0!==t.layoutId},getComponent:function(){return h}},b=e.createContext({transformPagePoint:function(t){return t},features:[],isStatic:!1});var x=e.createContext({});var w=e.createContext(null);function V(t){var r=e.useRef(null);return null===r.current&&(r.current=t()),r.current}var P=e.createContext(null),T="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function S(t,r,n,o){var a=e.useContext(b),i=e.useContext(x).visualElement,s=e.useContext(w),c=function(t){var r=t.layoutId,n=e.useContext(P);return n&&void 0!==r?n+"-"+r:r}(o),f=V((function(){return n(t,{visualState:r,parent:i,props:u(u({},o),{layoutId:c}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)})}));return T((function(){var t;f.setProps(u(u(u({},a),o),{layoutId:c})),f.isPresent=null===(t=s)||t.isPresent,f.isPresenceRoot=!i||i.presenceId!==(null==s?void 0:s.id),f.syncRender()})),e.useEffect((function(){var t;null===(t=f.animationState)||void 0===t||t.animateChanges()})),function(t){var r=e.useContext(v),n=e.useContext(p);T((function(){return function(){m(r)&&r.remove(t),m(n)&&n.remove(t)}}),[])}(f),f}function A(t,r,n){return e.useCallback((function(e){var o,a;e&&(null===(o=t.mount)||void 0===o||o.call(t,e)),r&&(e?r.mount(e):r.unmount()),n&&("function"==typeof n?n(e):"object"==typeof(a=n)&&Object.prototype.hasOwnProperty.call(a,"current")&&(n.current=e))}),[])}function E(t){return"string"==typeof t||function(t){return Array.isArray(t)}(t)}function C(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||E(t.initial)||E(t.animate)||E(t.whileHover)||E(t.whileDrag)||E(t.whileTap)||E(t.whileFocus)||E(t.exit)}function L(t){return Boolean(C(t)||t.variants)}function R(t,r){var n=function(t,e){if(C(t)){var r=t.initial,n=t.animate;return{initial:!1===r||E(r)?r:void 0,animate:E(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(x)),o=n.initial,a=n.animate;return e.useMemo((function(){return{initial:o,animate:a}}),r?[k(o),k(a)]:[])}function k(t){return Array.isArray(t)?t.join(" "):t}function O(t){var r=t.defaultFeatures,n=t.createVisualElement,o=t.useRender,a=t.useVisualState;return e.forwardRef((function(t,i){var s=e.useContext(b).isStatic,c=null,l=R(t,s),d=a(t,s);return s||"undefined"==typeof window||(l.visualElement=S(s,d,n,t),c=function(t,r,n){for(var o=f(t,e.useContext(b).features),a=o.length,i=[],s=0;s<a;s++){var c=o[s],l=c.shouldRender,d=c.key,v=c.getComponent;if(l(n)){var p=v(n);p&&i.push(e.createElement(p,u({key:d},n,{visualElement:r})))}}return i}(r,l.visualElement,t)),e.createElement(e.Fragment,null,e.createElement(x.Provider,{value:l},o(t,A(d,l.visualElement,i),d,s)),c)}))}var F=["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 B(t){return"string"==typeof t&&(!t.includes("-")&&(F.indexOf(t)>-1||(!!/[A-Z]/.test(t)||void 0)))}var M=function(t,e){return function(r){return Math.max(Math.min(r,e),t)}},j=function(t){return t%1?Number(t.toFixed(5)):t},I=/(-)?([\d]*\.?[\d])+/g,H=/(#[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,U=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function D(t){return"string"==typeof t}var X={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},Y=u(u({},X),{transform:M(0,1)}),N=u(u({},X),{default:1}),W=function(t){return{test:function(e){return D(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},z=W("deg"),_=W("%"),Z=W("px"),$=W("vh"),q=W("vw"),K=u(u({},_),{parse:function(t){return _.parse(t)/100},transform:function(t){return _.transform(100*t)}}),G=function(t,e){return function(r){return D(r)&&U.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)}},J=function(t,e,r){return function(n){var o;if(!D(n))return n;var a=n.match(I),i=a[0],u=a[1],s=a[2],c=a[3];return(o={})[t]=parseFloat(i),o[e]=parseFloat(u),o[r]=parseFloat(s),o.alpha=void 0!==c?parseFloat(c):1,o}},Q={test:G("hsl","hue"),parse:J("hue","saturation","lightness"),transform:function(t){var e=t.hue,r=t.saturation,n=t.lightness,o=t.alpha,a=void 0===o?1:o;return"hsla("+Math.round(e)+", "+_.transform(j(r))+", "+_.transform(j(n))+", "+j(Y.transform(a))+")"}},tt=M(0,255),et=u(u({},X),{transform:function(t){return Math.round(tt(t))}}),rt={test:G("rgb","red"),parse:J("red","green","blue"),transform:function(t){var e=t.red,r=t.green,n=t.blue,o=t.alpha,a=void 0===o?1:o;return"rgba("+et.transform(e)+", "+et.transform(r)+", "+et.transform(n)+", "+j(Y.transform(a))+")"}};var nt={test:G("#"),parse:function(t){var e="",r="",n="",o="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),o=t.substr(4,1),e+=e,r+=r,n+=n,o+=o),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:rt.transform},ot={test:function(t){return rt.test(t)||nt.test(t)||Q.test(t)},parse:function(t){return rt.test(t)?rt.parse(t):Q.test(t)?Q.parse(t):nt.parse(t)},transform:function(t){return D(t)?t:t.hasOwnProperty("red")?rt.transform(t):Q.transform(t)}};function at(t){var e=[],r=0,n=t.match(H);n&&(r=n.length,t=t.replace(H,"${c}"),e.push.apply(e,n.map(ot.parse)));var o=t.match(I);return o&&(t=t.replace(I,"${n}"),e.push.apply(e,o.map(X.parse))),{values:e,numColors:r,tokenised:t}}function it(t){return at(t).values}function ut(t){var e=at(t),r=e.values,n=e.numColors,o=e.tokenised,a=r.length;return function(t){for(var e=o,r=0;r<a;r++)e=e.replace(r<n?"${c}":"${n}",r<n?ot.transform(t[r]):j(t[r]));return e}}var st=function(t){return"number"==typeof t?0:t};var ct={test:function(t){var e,r,n,o;return isNaN(t)&&D(t)&&(null!==(r=null===(e=t.match(I))||void 0===e?void 0:e.length)&&void 0!==r?r:0)+(null!==(o=null===(n=t.match(H))||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0},parse:it,createTransformer:ut,getAnimatableNone:function(t){var e=it(t);return ut(t)(e.map(st))}},ft=new Set(["brightness","contrast","saturate","opacity"]);function lt(t){var e=t.slice(0,-1).split("("),r=e[0],n=e[1];if("drop-shadow"===r)return t;var o=(n.match(I)||[])[0];if(!o)return t;var a=n.replace(o,""),i=ft.has(r)?1:0;return o!==n&&(i*=100),r+"("+i+a+")"}var dt=/([a-z-]*)\(.*?\)/g,vt=u(u({},ct),{getAnimatableNone:function(t){var e=t.match(dt);return e?e.map(lt).join(" "):t}}),pt=function(t,e,r){return-r*t+r*e+t},mt=function(t){return"number"==typeof t},yt=function(t,e){return function(r){return e(t(r))}},ht="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},gt="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(ht())}),1/60*1e3)};var bt=!0,xt=!1,wt=!1,Vt={delta:0,timestamp:0},Pt=["read","update","preRender","render","postRender"],Tt=Pt.reduce((function(t,e){return t[e]=function(t){var e=[],r=[],n=0,o=!1,a=new WeakSet,i={schedule:function(t,i,u){void 0===i&&(i=!1),void 0===u&&(u=!1);var s=u&&o,c=s?e:r;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),s&&o&&(n=e.length)),t},cancel:function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1),a.delete(t)},process:function(u){var s;if(o=!0,e=(s=[r,e])[0],(r=s[1]).length=0,n=e.length)for(var c=0;c<n;c++){var f=e[c];f(u),a.has(f)&&(i.schedule(f),t())}o=!1}};return i}((function(){return xt=!0})),t}),{}),St=Pt.reduce((function(t,e){var r=Tt[e];return t[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),xt||Lt(),r.schedule(t,e,n)},t}),{}),At=Pt.reduce((function(t,e){return t[e]=Tt[e].cancel,t}),{}),Et=function(t){return Tt[t].process(Vt)},Ct=function(t){xt=!1,Vt.delta=bt?1/60*1e3:Math.max(Math.min(t-Vt.timestamp,40),1),Vt.timestamp=t,wt=!0,Pt.forEach(Et),wt=!1,xt&&(bt=!1,gt(Ct))},Lt=function(){xt=!0,bt=!0,wt||gt(Ct)};var Rt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},kt=function(t){return Rt(t)&&t.hasOwnProperty("z")},Ot=function(t,e){return Math.abs(t-e)};function Ft(t){return"string"==typeof t&&t.startsWith("var(--")}var Bt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mt(t,e,r){var n=c(function(t){var e=Bt.exec(t);if(!e)return[,];var r=c(e,3);return[r[1],r[2]]}(t),2),o=n[0],a=n[1];if(o){var i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():Ft(a)?Mt(a,e):a}}function jt(t,e){return t/(e.max-e.min)*100}var It={process:function(t,e,r){var n=r.target;if("string"==typeof t){if(!Z.test(t))return t;t=parseFloat(t)}return jt(t,n.x)+"% "+jt(t,n.y)+"%"}},Ht={borderRadius:u(u({},It),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:It,borderTopRightRadius:It,borderBottomLeftRadius:It,borderBottomRightRadius:It,boxShadow:{process:function(t,e){var r=e.delta,n=e.treeScale,o=t,a=t.includes("var("),i=[];a&&(t=t.replace(Bt,(function(t){return i.push(t),"_$css"})));var u=ct.parse(t);if(u.length>5)return o;var s=ct.createTransformer(t),c="number"!=typeof u[0]?1:0,f=r.x.scale*n.x,l=r.y.scale*n.y;u[0+c]/=f,u[1+c]/=l;var d=pt(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(a){var p=0;v=v.replace("_$css",(function(){var t=i[p];return p++,t}))}return v}}},Ut=["","X","Y","Z"],Dt=["transformPerspective","x","y","z"];function Xt(t,e){return Dt.indexOf(t)-Dt.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Ut.forEach((function(e){return Dt.push(t+e)}))}));var Yt=new Set(Dt);function Nt(t){return Yt.has(t)}var Wt=new Set(["originX","originY","originZ"]);function zt(t){return Wt.has(t)}function _t(t,e){var r=e.layout,n=e.layoutId;return Nt(t)||zt(t)||(r||void 0!==n)&&!!Ht[t]}var Zt=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e,r,n=this;return e=this.subscriptions,r=t,-1===e.indexOf(r)&&e.push(r),function(){return function(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)}(n.subscriptions,t)}},t.prototype.notify=function(t,e,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,r);else for(var o=0;o<n;o++){var a=this.subscriptions[o];a&&a(t,e,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),$t=function(){function t(t){var e,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Zt,this.velocityUpdateSubscribers=new Zt,this.renderSubscribers=new Zt,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),r.prev=r.current,r.current=t;var n=Vt,o=n.delta,a=n.timestamp;r.lastUpdated!==a&&(r.timeDelta=o,r.lastUpdated=a,St.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),e&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return St.postRender(r.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}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,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.current)-parseFloat(this.prev),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(r){e.hasAnimated=!0,e.stopAnimation=t(r)})).then((function(){return e.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 qt(t){return new $t(t)}var Kt=function(t){return t instanceof $t};function Gt(t){return t}var Jt={translate:0,scale:1,origin:0,originPoint:0};function Qt(){return{x:u({},Jt),y:u({},Jt)}}function te(){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:Qt(),deltaFinal:Qt(),deltaTransform:""}}var ee=te(),re={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function ne(t,e,r){var n=t.x,o=t.y,a="translate3d("+n.translate/e.x+"px, "+o.translate/e.y+"px, 0) ";if(r){var i=r.rotate,u=r.rotateX,s=r.rotateY;i&&(a+="rotate("+i+") "),u&&(a+="rotateX("+u+") "),s&&(a+="rotateY("+s+") ")}return a+="scale("+n.scale+", "+o.scale+")",r||a!==oe?a:""}var oe=ne(ee.delta,ee.treeScale,{x:1,y:1});function ae(t){return t.startsWith("--")}var ie=u(u({},X),{transform:Math.round}),ue={color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,size:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:N,scaleX:N,scaleY:N,scaleZ:N,skew:z,skewX:z,skewY:z,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Y,originX:K,originY:K,originZ:Z,zIndex:ie,filter:vt,WebkitFilter:vt,fillOpacity:Y,strokeOpacity:Y,numOctaves:ie},se=[X,Z,_,z,q,$,{test:function(t){return"auto"===t},parse:function(t){return t}}],ce=function(t){return function(e){return e.test(t)}},fe=function(t){return se.find(ce(t))},le=f(se,[ot,ct]),de=function(t){return le.find(ce(t))},ve=function(t){return ue[t]},pe=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function me(t,e){var r,n=ve(t);return n!==vt&&(n=ct),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,e)}function ye(t,e,r,n,o,a){var i,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 e){var y=e[m];if(ae(m))s[m]=y;else{var h=ve(m),g=pe(y,h);if(Nt(m)){if(d=!0,c[m]=g,f.push(m),!p)continue;y!==(null!==(i=h.default)&&void 0!==i?i:0)&&(p=!1)}else if(zt(m))l[m]=g,v=!0;else if(n&&r&&n.isHydrated&&Ht[m]){var b=Ht[m].process(y,n,r),x=Ht[m].applyTo;if(x)for(var w=x.length,V=0;V<w;V++)u[x[V]]=b;else u[m]=b}else u[m]=g}}n&&r&&r.isEnabled&&n.isHydrated?(u.transform=ne(n.deltaFinal,n.treeScale,d?c:void 0),a&&(u.transform=a(c,u.transform)),u.transformOrigin=function(t){var e=t.deltaFinal;return 100*e.x.origin+"% "+100*e.y.origin+"% 0"}(n)):(d&&(u.transform=function(t,e,r,n){var o=t.transform,a=t.transformKeys,i=e.enableHardwareAcceleration,u=void 0===i||i,s=e.allowTransformNone,c=void 0===s||s,f="";a.sort(Xt);for(var l=!1,d=a.length,v=0;v<d;v++){var p=a[v];f+=(re[p]||p)+"("+o[p]+") ","z"===p&&(l=!0)}return!l&&u?f+="translateZ(0)":f=f.trim(),n?f=n(o,r?"":f):c&&r&&(f="none"),f}(t,o,p,a)),v&&(u.transformOrigin=function(t){var e=t.originX,r=void 0===e?"50%":e,n=t.originY,o=void 0===n?"50%":n,a=t.originZ;return r+" "+o+" "+(void 0===a?0:a)}(l)))}var he=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function ge(t,e,r){for(var n in e)Kt(e[n])||_t(n,r)||(t[n]=e[n])}function be(t,r,n){var o={};return ge(o,t.style||{},t),Object.assign(o,function(t,r,n){var o=t.transformTemplate;return e.useMemo((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};ye(t,r,void 0,void 0,{enableHardwareAcceleration:!n},o);var e=t.style;return u(u({},t.vars),e)}),[r])}(t,r,n)),t.transformValues&&(o=t.transformValues(o)),o}function xe(t,e,r){var n={},o=be(t,e,r);return Boolean(t.drag)&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),n.style=o,n}var we=new Set(f(["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"],["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]));function Ve(t){return we.has(t)}var Pe=function(t){return!Ve(t)};try{var Te=require("@emotion/is-prop-valid").default;Pe=function(t){return t.startsWith("on")?!Ve(t):Te(t)}}catch(t){}function Se(t,e,r){return"string"==typeof t?t:Z.transform(e+r*t)}var Ae=function(t,e){return Z.transform(t*e)},Ee={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ce={offset:"strokeDashoffset",array:"strokeDasharray"};function Le(t,e,r,n,o,a){var i=e.attrX,u=e.attrY,c=e.originX,f=e.originY,l=e.pathLength,d=e.pathSpacing,v=void 0===d?1:d,p=e.pathOffset,m=void 0===p?0:p;ye(t,s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n,o,a),t.attrs=t.style,t.style={};var y=t.attrs,h=t.style,g=t.dimensions,b=t.totalPathLength;y.transform&&(g&&(h.transform=y.transform),delete y.transform),g&&(void 0!==c||void 0!==f||h.transform)&&(h.transformOrigin=function(t,e,r){return Se(e,t.x,t.width)+" "+Se(r,t.y,t.height)}(g,void 0!==c?c:.5,void 0!==f?f:.5)),void 0!==i&&(y.x=i),void 0!==u&&(y.y=u),void 0!==b&&void 0!==l&&function(t,e,r,n,o,a){void 0===n&&(n=1),void 0===o&&(o=0),void 0===a&&(a=!0);var i=a?Ee:Ce;t[i.offset]=Ae(-o,e);var u=Ae(r,e),s=Ae(n,e);t[i.array]=u+" "+s}(y,b,l,v,m,!1)}var Re=function(){return u(u({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function ke(t,r){var n=e.useMemo((function(){var e=Re();return Le(e,r,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),u(u({},e.attrs),{style:u({},e.style)})}),[r]);if(t.style){var o={};ge(o,t.style,t),n.style=u(u({},o),n.style)}return n}function Oe(t,r){void 0===r&&(r=!1);return function(n,o,a,i){var s=a.latestValues,c=(B(t)?ke:xe)(n,s,i),f=function(t,e,r){var n={};for(var o in t)(Pe(o)||!0===r&&Ve(o)||!e&&!Ve(o))&&(n[o]=t[o]);return n}(n,"string"==typeof t,r),l=u(u(u({},f),c),{ref:o});return e.createElement(t,l)}}function Fe(t){return[t("x"),t("y")]}function Be(t,e){t.min=e.min,t.max=e.max}function Me(t,e,r){return r+e*(t-r)}function je(t,e,r,n,o){return void 0!==o&&(t=Me(t,o,n)),Me(t,r,n)+e}function Ie(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=1),t.min=je(t.min,e,r,n,o),t.max=je(t.max,e,r,n,o)}function He(t,e){var r=e.x,n=e.y;Ie(t.x,r.translate,r.scale,r.originPoint),Ie(t.y,n.translate,n.scale,n.originPoint)}function Ue(t,e,r,n){var o=c(n,3),a=o[0],i=o[1],u=o[2];t.min=e.min,t.max=e.max;var s=void 0!==r[u]?r[u]:.5,f=pt(e.min,e.max,s);Ie(t,r[a],r[i],f,r.scale)}var De=["x","scaleX","originX"],Xe=["y","scaleY","originY"];function Ye(t,e,r,n,o){return t=Me(t-=e,1/r,n),void 0!==o&&(t=Me(t,1/o,n)),t}function Ne(t,e,r){var n=c(r,3),o=n[0],a=n[1],i=n[2];!function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5);var a=pt(t.min,t.max,n)-e;t.min=Ye(t.min,e,r,a,o),t.max=Ye(t.max,e,r,a,o)}(t,e[o],e[a],e[i],e.scale)}function We(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),function(t,e){if(mt(t)&&mt(e))return Ot(t,e);if(Rt(t)&&Rt(e)){var r=Ot(t.x,e.x),n=Ot(t.y,e.y),o=kt(t)&&kt(e)?Ot(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}(t,e)<r}function ze(t){return t.max-t.min}function _e(t,e,r,n){void 0===n&&(n=.5),t.origin=n,t.originPoint=pt(e.min,e.max,t.origin),t.scale=ze(r)/ze(e),We(t.scale,1,1e-4)&&(t.scale=1),t.translate=pt(r.min,r.max,t.origin)-t.originPoint,We(t.translate)&&(t.translate=0)}function Ze(t,e,r,n){_e(t.x,e.x,r.x,$e(n.originX)),_e(t.y,e.y,r.y,$e(n.originY))}function $e(t){return"number"==typeof t?t:.5}var qe;function Ke(t,e){if(e)return(e[t]||e.default||e).from}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(qe||(qe={}));var Ge=[qe.Animate,qe.Hover,qe.Tap,qe.Drag,qe.Focus,qe.Exit],Je=(f(Ge).reverse(),["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget"]);function Qe(t,e,r,n){var o,a,i=t.delta,u=t.layout,s=t.layoutCorrected,c=t.treeScale,f=e.target;a=u,Be((o=s).x,a.x),Be(o.y,a.y),function(t,e,r){var n=r.length;if(n){e.x=e.y=1;for(var o=0;o<n;o++){var a=r[o].getLayoutState().delta;e.x*=a.x.scale,e.y*=a.y.scale,He(t,a)}}}(s,c,r),Ze(i,s,f,n)}var tr=function(t){var e=t.treeType,r=void 0===e?"":e,n=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,s=t.measureViewportBox,c=t.render,l=t.readValueFromInstance,d=t.resetTransform,v=t.restoreTransform,p=t.removeValueFromRenderState,m=t.sortNodePosition,y=t.scrapeMotionValuesFromProps;return function(t,e){var h=t.parent,g=t.props,b=t.presenceId,x=t.blockInitialAnimation,w=t.visualState;void 0===e&&(e={});var V,P,T,S,A,R,k=w.latestValues,O=w.renderState,F=new Set,B=function(){var t=Je.map((function(){return new Zt})),e={},r={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return Je.forEach((function(n){var o;null===(o=e[n])||void 0===o||o.call(e);var a="on"+n,i=t[a];i&&(e[n]=r[a](i))}))}};return t.forEach((function(t,e){r["on"+Je[e]]=function(e){return t.add(e)},r["notify"+Je[e]]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.notify.apply(t,f(e))}})),r}(),M={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}}},j=M,I=k,H=te(),U=!1,D=new Map,X=new Map,Y={},N=u({},k);function W(){return M.isEnabled&&H.isHydrated}function z(){var t,e,r;V&&(W()&&(t=j.targetFinal,e=j.target,r=I,Ue(t.x,e.x,r,De),Ue(t.y,e.y,r,Xe),Ze(H.deltaFinal,H.layoutCorrected,j.targetFinal,k)),_(),c(V,O))}function _(){var t=k;if(T&&T.isActive()){var r=T.getCrossfadeState(Q);r&&(t=r)}n(Q,O,t,j,H,e,g)}function Z(){B.notifyUpdate(k)}var $=y(g);for(var q in $){var K=$[q];void 0!==k[q]&&Kt(K)&&K.set(k[q],!1)}var G=C(g),J=L(g),Q=u(u({treeType:r,current:null,depth:h?h.depth+1:0,path:h?f(h.path,[h]):[],presenceId:b,projection:M,variantChildren:J?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:x,isHoverEventsEnabled:!0,isMounted:function(){return Boolean(V)},mount:function(t){V=Q.current=t,Q.pointTo(Q),A=null==h?void 0:h.addChild(Q),J&&h&&!G&&(R=null==h?void 0:h.addVariantChild(Q))},unmount:function(){At.update(Z),At.render(z),At.preRender(Q.updateLayoutProjection),X.forEach((function(t){return t()})),Q.stopLayoutAnimation(),null==A||A(),null==R||R(),null==P||P(),B.clearAllListeners()},addChild:function(t){return F.add(t),function(){return F.delete(t)}},addVariantChild:function(t){var e,r=Q.getClosestVariantNode();if(r)return null===(e=r.variantChildren)||void 0===e||e.add(t),function(){return r.variantChildren.delete(t)}},sortNodePosition:function(t){return m&&r===t.treeType?m(Q.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return J?Q:null==h?void 0:h.getClosestVariantNode()},scheduleUpdateLayoutProjection:h?h.scheduleUpdateLayoutProjection:function(){return St.preRender(Q.updateLayoutProjection,!1,!0)},getLayoutId:function(){return g.layoutId},getInstance:function(){return V},getStaticValue:function(t){return k[t]},setStaticValue:function(t,e){return k[t]=e},getLatestValues:function(){return k},setVisibility:function(t){Q.isVisible!==t&&(Q.isVisible=t,Q.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),i(Q,t,g,e)},suspendHoverEvents:function(){Q.isHoverEventsEnabled=!1,St.postRender((function(){return setTimeout((function(){return Q.isHoverEventsEnabled=!0}),10)}))},addValue:function(t,e){Q.hasValue(t)&&Q.removeValue(t),D.set(t,e),k[t]=e.get(),function(t,e){var r=e.onChange((function(e){k[t]=e,g.onUpdate&&St.update(Z,!1,!0)})),n=e.onRenderRequest(Q.scheduleRender);X.set(t,(function(){r(),n()}))}(t,e)},removeValue:function(t){var e;D.delete(t),null===(e=X.get(t))||void 0===e||e(),X.delete(t),delete k[t],p(t,O)},hasValue:function(t){return D.has(t)},getValue:function(t,e){var r=D.get(t);return void 0===r&&void 0!==e&&(r=qt(e),Q.addValue(t,r)),r},forEachValue:function(t){return D.forEach(t)},readValue:function(t){var r;return null!==(r=k[t])&&void 0!==r?r:l(V,t,e)},setBaseTarget:function(t,e){N[t]=e},getBaseTarget:function(t){if(o){var e=o(g,t);if(void 0!==e&&!Kt(e))return e}return N[t]}},B),{build:function(){return _(),O},scheduleRender:function(){St.render(z,!1,!0)},syncRender:z,setProps:function(t){g=t,B.updatePropListeners(t),Y=function(t,e,r){var n;for(var o in e){var a=e[o],i=r[o];if(Kt(a))t.addValue(o,a);else if(Kt(i))t.addValue(o,qt(a));else if(i!==a)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(a)}else t.addValue(o,qt(null!==(n=t.getStaticValue(o))&&void 0!==n?n:a))}for(var o in r)void 0===e[o]&&t.removeValue(o);return e}(Q,y(g),Y)},getProps:function(){return g},getVariant:function(t){var e;return null===(e=g.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return g.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==h?void 0:h.getVariantContext();if(!G){var e=(null==h?void 0:h.getVariantContext())||{};return void 0!==g.initial&&(e.initial=g.initial),e}for(var r={},n=0;n<nr;n++){var o=rr[n],a=g[o];(E(a)||!1===a)&&(r[o]=a)}return r},enableLayoutProjection:function(){M.isEnabled=!0},lockProjectionTarget:function(){M.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),M.isTargetLocked=!1},snapshotViewportBox:function(){Q.prevViewportBox=Q.measureViewportBox(!1),Q.rebaseProjectionTarget(!1,Q.prevViewportBox)},getLayoutState:function(){return H},setCrossfader:function(t){T=t},startLayoutAnimation:function(t,e){var r=Q.getProjectionAnimationProgress()[t],n=M.target[t],o=n.min,a=n.max-o;return r.clearListeners(),r.set(o),r.set(o),r.onChange((function(e){return Q.setProjectionTargetAxis(t,e,e+a)})),Q.animateMotionValue(t,r,0,e)},stopLayoutAnimation:function(){Fe((function(t){return Q.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var r,n,o=s(V,e);return t||(n=k,Ne((r=o).x,n,De),Ne(r.y,n,Xe)),o},updateLayoutMeasurement:function(){var t;Q.notifyBeforeLayoutMeasure(H.layout),H.isHydrated=!0,H.layout=Q.measureViewportBox(),H.layoutCorrected=(t=H.layout,{x:u({},t.x),y:u({},t.y)}),Q.notifyLayoutMeasure(H.layout,Q.prevViewportBox||H.layout),St.update((function(){return Q.rebaseProjectionTarget()}))},getProjectionAnimationProgress:function(){return S||(S={x:qt(0),y:qt(0)}),S},setProjectionTargetAxis:function(t,e,r){var n=M.target[t];n.min=e,n.max=r,U=!0,B.notifySetAxisTarget()},rebaseProjectionTarget:function(t,e){void 0===e&&(e=H.layout);var r=Q.getProjectionAnimationProgress(),n=r.x,o=r.y,a=!M.isTargetLocked&&!n.isAnimating()&&!o.isAnimating();(t||a)&&Fe((function(t){var r=e[t],n=r.min,o=r.max;Q.setProjectionTargetAxis(t,n,o)}))},notifyLayoutReady:function(t){Q.notifyLayoutUpdate(H.layout,Q.prevViewportBox||H.layout,t)},resetTransform:function(){return d(Q,V,g)},withoutTransform:function(t){var e=M.isEnabled;e&&Q.resetTransform(),h?h.withoutTransform(t):t(),e&&v(V,O)},updateLayoutProjection:function(){W()&&function(){var t=H.delta,e=H.treeScale,r=e.x,n=e.x,o=H.deltaTransform;Qe(H,j,Q.path,k),U&&Q.notifyViewportBoxUpdate(j.target,t),U=!1;var a=ne(t,e);a===o&&r===e.x&&n===e.y||Q.scheduleRender(),H.deltaTransform=a}(),F.forEach(er)},pointTo:function(t){j=t.projection,I=t.getLatestValues(),null==P||P(),P=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(yt)}(t.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;Q.isPresent?Q.presence=a.Present:null===(t=Q.layoutSafeToRemove)||void 0===t||t.call(Q)})))},isPresent:!0,presence:a.Entering});return Q}};function er(t){t.updateLayoutProjection()}var rr=f(["initial"],Ge),nr=rr.length;function or(t){var e=t.style,r={};for(var n in e)(Kt(e[n])||_t(n,t))&&(r[n]=e[n]);return r}function ar(t){var e=or(t);for(var r in t){if(Kt(t[r]))e["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return e}function ir(t,e){return function(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}(function(t,e){var r=t.top,n=t.left,o=t.bottom,a=t.right;void 0===e&&(e=Gt);var i=e({x:n,y:r}),u=e({x:a,y:o});return{top:i.y,left:i.x,bottom:u.y,right:u.x}}(t.getBoundingClientRect(),e))}var ur,sr=new Set(["width","height","top","left","right","bottom","x","y"]),cr=function(t){return sr.has(t)},fr=function(t,e){t.set(e,!1),t.set(e)},lr=function(t){return t===X||t===Z};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(ur||(ur={}));var dr=function(t,e){return parseFloat(t.split(", ")[e])},vr=function(t,e){return function(r,n){var o=n.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return dr(a[1],e);var i=o.match(/^matrix\((.+)\)$/);return i?dr(i[1],t):0}},pr=new Set(["x","y","z"]),mr=Dt.filter((function(t){return!pr.has(t)}));var yr={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var r=e.top;return parseFloat(r)},left:function(t,e){var r=e.left;return parseFloat(r)},bottom:function(t,e){var r=t.y,n=e.top;return parseFloat(n)+(r.max-r.min)},right:function(t,e){var r=t.x,n=e.left;return parseFloat(n)+(r.max-r.min)},x:vr(4,13),y:vr(5,14)},hr=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),e=u({},e),n=u({},n);var o=Object.keys(e).filter(cr),a=[],i=!1,s=[];if(o.forEach((function(o){var u=t.getValue(o);if(t.hasValue(o)){var c,f,l=r[o],d=e[o],v=fe(l);if(f=d,Array.isArray(f))for(var p=d.length,m=null===d[0]?1:0;m<p;m++)c?fe(d[m]):c=fe(d[m]);else c=fe(d);if(v!==c)if(lr(v)&&lr(c)){var y=u.get();"string"==typeof y&&u.set(parseFloat(y)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&c===Z&&(e[o]=d.map(parseFloat))}else(null==v?void 0:v.transform)&&(null==c?void 0:c.transform)&&(0===l||0===d)?0===l?u.set(c.transform(l)):e[o]=v.transform(d):(i||(a=function(t){var e=[];return mr.forEach((function(r){var n=t.getValue(r);void 0!==n&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),i=!0),s.push(o),n[o]=void 0!==n[o]?n[o]:e[o],fr(u,d))}})),s.length){var f=function(t,e,r){var n=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),i=a.display,u={top:a.top,left:a.left,bottom:a.bottom,right:a.right,transform:a.transform};"none"===i&&e.setStaticValue("display",t.display||"block"),e.syncRender();var s=e.measureViewportBox();return r.forEach((function(r){var o=e.getValue(r);fr(o,yr[r](n,u)),t[r]=yr[r](s,a)})),t}(e,t,s);return a.length&&a.forEach((function(e){var r=c(e,2),n=r[0],o=r[1];t.getValue(n).set(o)})),t.syncRender(),{target:f,transitionEnd:n}}return{target:e,transitionEnd:n}};function gr(t,e,r,n){return function(t){return Object.keys(t).some(cr)}(e)?hr(t,e,r,n):{target:e,transitionEnd:n}}var br=function(t,e,r,n){var o=function(t,e,r){var n,o=s(e,[]),a=t.getInstance();if(!(a instanceof HTMLElement))return{target:o,transitionEnd:r};for(var i in r&&(r=u({},r)),t.forEachValue((function(t){var e=t.get();if(Ft(e)){var r=Mt(e,a);r&&t.set(r)}})),o){var c=o[i];if(Ft(c)){var f=Mt(c,a);f&&(o[i]=f,r&&(null!==(n=r[i])&&void 0!==n||(r[i]=c)))}}return{target:o,transitionEnd:r}}(t,e,n);return gr(t,e=o.target,r,n=o.transitionEnd)};var xr={treeType:"dom",readValueFromInstance:function(t,e){if(Nt(e)){var r=ve(e);return r&&r.default||0}var n,o=(n=t,window.getComputedStyle(n));return(ae(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var r;return null===(r=t.style)||void 0===r?void 0:r[e]},measureViewportBox:function(t,e){return ir(t,e.transformPagePoint)},resetTransform:function(t,e,r){t.suspendHoverEvents();var n=r.transformTemplate;e.style.transform=n?n({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var r=e.vars,n=e.style;delete r[t],delete n[t]},makeTargetAnimatable:function(t,e,r,n){var o=r.transformValues;void 0===n&&(n=!0);var a=e.transition,i=e.transitionEnd,c=s(e,["transition","transitionEnd"]),f=function(t,e,r){var n,o,a={};for(var i in t)a[i]=null!==(n=Ke(i,e))&&void 0!==n?n:null===(o=r.getValue(i))||void 0===o?void 0:o.get();return a}(c,a||{},t);if(o&&(i&&(i=o(i)),c&&(c=o(c)),f&&(f=o(f))),n){!function(t,e,r){var n,o,a,i,u=Object.keys(e).filter((function(e){return!t.hasValue(e)})),s=u.length;if(s)for(var c=0;c<s;c++){var f=u[c],l=e[f],d=null;Array.isArray(l)&&(d=l[0]),null===d&&(d=null!==(o=null!==(n=r[f])&&void 0!==n?n:t.readValue(f))&&void 0!==o?o:e[f]),null!=d&&("string"==typeof d&&/^\-?\d*\.?\d+$/.test(d)?d=parseFloat(d):!de(d)&&ct.test(l)&&(d=me(f,l)),t.addValue(f,qt(d)),null!==(a=(i=r)[f])&&void 0!==a||(i[f]=d),t.setBaseTarget(f,d))}}(t,c,f);var l=br(t,c,f,i);i=l.transitionEnd,c=l.target}return u({transition:a,transitionEnd:i},c)},scrapeMotionValuesFromProps:or,build:function(t,e,r,n,o,a,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),ye(e,r,n,o,a,i.transformTemplate)},render:function(t,e){var r=e.style,n=e.vars;for(var o in Object.assign(t.style,r),n)t.style.setProperty(o,n[o])}},wr=tr(xr),Vr=/([a-z])([A-Z])/g,Pr=function(t){return t.replace(Vr,"$1-$2").toLowerCase()},Tr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]);function Sr(t,e){for(var r in xr.render(t,e),e.attrs)t.setAttribute(Tr.has(r)?r:Pr(r),e.attrs[r])}var Ar=tr(u(u({},xr),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var r;return Nt(e)?(null===(r=ve(e))||void 0===r?void 0:r.default)||0:(e=Tr.has(e)?e:Pr(e),t.getAttribute(e))},scrapeMotionValuesFromProps:ar,build:function(t,e,r,n,o,a,i){Le(e,r,n,o,a,i.transformTemplate)},render:Sr}));function Er(t){var e,r=t instanceof $t?t.get():t;return e=r,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?r.toValue():r}function Cr(t,e,r,n){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,u={latestValues:Rr(e,r,n,o),renderState:a()};return i&&(u.mount=function(t){return i(e,t,u)}),u}var Lr=function(t){return function(r,n){var o=e.useContext(x),a=e.useContext(w);return n?Cr(t,r,o,a):V((function(){return Cr(t,r,o,a)}))}};function Rr(t,e,r,n){var o={},a=!1===(null==r?void 0:r.initial),i=n(t);for(var u in i)o[u]=Er(i[u]);var c=t.initial,f=t.animate,l=C(t),d=L(t);e&&d&&!l&&!1!==t.inherit&&(null!=c||(c=e.initial),null!=f||(f=e.animate));var v,p=a||!1===c?f:c;!p||"boolean"==typeof p||"object"==typeof(v=p)&&"function"==typeof v.start||(Array.isArray(p)?p:[p]).forEach((function(e){var r=function(t,e,r,n,o){var a;return void 0===n&&(n={}),void 0===o&&(o={}),"string"==typeof e&&(e=null===(a=t.variants)||void 0===a?void 0:a[e]),"function"==typeof e?e(null!=r?r:t.custom,n,o):e}(t,e);if(r){var n=r.transitionEnd,a=(r.transition,s(r,["transitionEnd","transition"]));for(var i in a)o[i]=a[i];for(var i in n)o[i]=n[i]}}));return o}var kr={createVisualElement:function(t,e){return Ar(e,{enableHardwareAcceleration:!1})},useVisualState:Lr({scrapeMotionValuesFromProps:ar,createRenderState:Re,onMount:function(t,e,r){var n=r.renderState,o=r.latestValues;try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}"path"===e.tagName&&(n.totalPathLength=e.getTotalLength()),Le(n,o,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),Sr(e,n)}})};var Or={createVisualElement:function(t,e){return wr(e,{enableHardwareAcceleration:!t})},useVisualState:Lr({scrapeMotionValuesFromProps:or,createRenderState:he})};var Fr=function(t){function e(e,r){var n=(void 0===r?{}:r).forwardMotionProps;return O(function(t,e,r){var n=B(e)?kr:Or;return u(u({},n),{defaultFeatures:t,useRender:Oe(e,r)})}(t,e,void 0!==n&&n))}function r(t){return e(t,{forwardMotionProps:!0})}var n=new Map;return new Proxy(e,{get:function(t,o){return"custom"===o?r:(n.has(o)||n.set(o,e(o)),n.get(o))}})}([g]);t.m=Fr,Object.defineProperty(t,"__esModule",{value:!0})}));
  