import{r as t,R as n}from"./vendor.55942996.js";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var o=function(){return(o=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 i(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 a(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(u){o={error:u}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function u(t,n){for(var e=0,r=n.length,o=t.length;e<r;e++,o++)t[o]=n[e];return t}var s=function(t){return{isEnabled:function(n){return t.some((function(t){return!!n[t]}))}}},c={measureLayout:s(["layout","layoutId","drag","_layoutResetTransform"]),animation:s(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:s(["exit"]),drag:s(["drag","dragControls"]),focus:s(["whileFocus"]),hover:s(["whileHover","onHoverStart","onHoverEnd"]),tap:s(["whileTap","onTap","onTapStart","onTapCancel"]),pan:s(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:s(["layout","layoutId"])};function f(t){for(var n in t){var e=t[n];null!==e&&(c[n].Component=e)}}var l=t.exports.createContext({strict:!1}),d=Object.keys(c),v=d.length;var p=t.exports.createContext({transformPagePoint:function(t){return t},isStatic:!1}),m=t.exports.createContext({});function h(){return t.exports.useContext(m).visualElement}var y=t.exports.createContext(null);function g(n){var e=t.exports.useRef(null);return null===e.current&&(e.current=n()),e.current}function x(){var n=t.exports.useContext(y);if(null===n)return[!0,null];var e=n.isPresent,r=n.onExitComplete,o=n.register,i=A();t.exports.useEffect((function(){return o(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function b(){return E(t.exports.useContext(y))}function E(t){return null===t||t.isPresent}var P=0,w=function(){return P++},A=function(){return g(w)},S=t.exports.createContext(null),T="undefined"!=typeof window,C=T?t.exports.useLayoutEffect:t.exports.useEffect;function V(n,e,r,i){var a=t.exports.useContext(p),u=t.exports.useContext(l),s=h(),c=t.exports.useContext(y),f=function(n){var e=n.layoutId,r=t.exports.useContext(S);return r&&void 0!==e?r+"-"+e:e}(r),d=t.exports.useRef(void 0);i||(i=u.renderer),!d.current&&i&&(d.current=i(n,{visualState:e,parent:s,props:o(o({},r),{layoutId:f}),presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial)}));var v=d.current;return C((function(){v&&(v.setProps(o(o(o({},a),r),{layoutId:f})),v.isPresent=E(c),v.isPresenceRoot=!s||s.presenceId!==(null==c?void 0:c.id),v.syncRender())})),t.exports.useEffect((function(){var t;v&&(null===(t=v.animationState)||void 0===t||t.animateChanges())})),C((function(){return function(){return null==v?void 0:v.notifyUnmount()}}),[]),v}function M(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function L(t){return Array.isArray(t)}function R(t){return"string"==typeof t||L(t)}function k(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 O(t,n,e){var r=t.getProps();return k(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 D(t){var n;return"function"==typeof(null===(n=t.animate)||void 0===n?void 0:n.start)||R(t.initial)||R(t.animate)||R(t.whileHover)||R(t.whileDrag)||R(t.whileTap)||R(t.whileFocus)||R(t.exit)}function j(t){return Boolean(D(t)||t.variants)}function B(n,e){var r=function(t,n){if(D(t)){var e=t.initial,r=t.animate;return{initial:!1===e||R(e)?e:void 0,animate:R(r)?r:void 0}}return!1!==t.inherit?n:{}}(n,t.exports.useContext(m)),o=r.initial,i=r.animate;return t.exports.useMemo((function(){return{initial:o,animate:i}}),e?[F(o),F(i)]:[])}function F(t){return Array.isArray(t)?t.join(" "):t}function U(n){var e=n.preloadedFeatures,r=n.createVisualElement,i=n.useRender,a=n.useVisualState,u=n.Component;return e&&f(e),t.exports.forwardRef((function(n,e){var s=t.exports.useContext(p).isStatic,f=null,h=B(n,s),y=a(n,s);return!s&&T&&(h.visualElement=V(u,y,n,r),f=function(n,e,r){var i=[];if(t.exports.useContext(l),!e)return null;for(var a=0;a<v;a++){var u=d[a],s=c[u],f=s.isEnabled,p=s.Component;f(n)&&p&&i.push(t.exports.createElement(p,o({key:u},n,{visualElement:e})))}return i}(n,h.visualElement)),t.exports.createElement(t.exports.Fragment,null,t.exports.createElement(m.Provider,{value:h},i(u,n,function(n,e,r){return t.exports.useCallback((function(t){var o;t&&(null===(o=n.mount)||void 0===o||o.call(n,t)),e&&(t?e.mount(t):e.unmount()),r&&("function"==typeof r?r(t):M(r)&&(r.current=t))}),[e])}(y,h.visualElement,e),y,s)),f)}))}function I(t){function n(n,e){return void 0===e&&(e={}),U(t(n,e))}var e=new Map;return new Proxy(n,{get:function(t,r){return e.has(r)||e.set(r,n(r)),e.get(r)}})}var H=["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 X(t){return"string"==typeof t&&!t.includes("-")&&!!(H.indexOf(t)>-1||/[A-Z]/.test(t))}var Y={};function z(t){for(var n in t)Y[n]=t[n]}var N=["","X","Y","Z"],W=["transformPerspective","x","y","z"];function _(t,n){return W.indexOf(t)-W.indexOf(n)}["translate","scale","rotate","skew"].forEach((function(t){return N.forEach((function(n){return W.push(t+n)}))}));var Z=new Set(W);function q(t){return Z.has(t)}var $=new Set(["originX","originY","originZ"]);function G(t){return $.has(t)}function K(t,n){var e=n.layout,r=n.layoutId;return q(t)||G(t)||(e||void 0!==r)&&(!!Y[t]||"opacity"===t)}var J=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},Q={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function tt(t){return t.startsWith("--")}var nt=function(t,n){return n&&"number"==typeof t?n.transform(t):t},et=function(){return(et=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)},rt=function(t,n){return function(e){return Math.max(Math.min(e,n),t)}},ot=function(t){return t%1?Number(t.toFixed(5)):t},it=/(-)?([\d]*\.?[\d])+/g,at=/(#[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,ut=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function st(t){return"string"==typeof t}var ct={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},ft=et(et({},ct),{transform:rt(0,1)}),lt=et(et({},ct),{default:1}),dt=function(t){return{test:function(n){return st(n)&&n.endsWith(t)&&1===n.split(" ").length},parse:parseFloat,transform:function(n){return""+n+t}}},vt=dt("deg"),pt=dt("%"),mt=dt("px"),ht=dt("vh"),yt=dt("vw"),gt=et(et({},pt),{parse:function(t){return pt.parse(t)/100},transform:function(t){return pt.transform(100*t)}}),xt=function(t,n){return function(e){return Boolean(st(e)&&ut.test(e)&&e.startsWith(t)||n&&Object.prototype.hasOwnProperty.call(e,n))}},bt=function(t,n,e){return function(r){var o;if(!st(r))return r;var i=r.match(it),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}},Et={test:xt("hsl","hue"),parse:bt("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)+", "+pt.transform(ot(e))+", "+pt.transform(ot(r))+", "+ot(ft.transform(i))+")"}},Pt=rt(0,255),wt=et(et({},ct),{transform:function(t){return Math.round(Pt(t))}}),At={test:xt("rgb","red"),parse:bt("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("+wt.transform(n)+", "+wt.transform(e)+", "+wt.transform(r)+", "+ot(ft.transform(i))+")"}};var St={test:xt("#"),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:At.transform},Tt={test:function(t){return At.test(t)||St.test(t)||Et.test(t)},parse:function(t){return At.test(t)?At.parse(t):Et.test(t)?Et.parse(t):St.parse(t)},transform:function(t){return st(t)?t:t.hasOwnProperty("red")?At.transform(t):Et.transform(t)}};function Ct(t){var n=[],e=0,r=t.match(at);r&&(e=r.length,t=t.replace(at,"${c}"),n.push.apply(n,r.map(Tt.parse)));var o=t.match(it);return o&&(t=t.replace(it,"${n}"),n.push.apply(n,o.map(ct.parse))),{values:n,numColors:e,tokenised:t}}function Vt(t){return Ct(t).values}function Mt(t){var n=Ct(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?Tt.transform(t[e]):ot(t[e]));return n}}var Lt=function(t){return"number"==typeof t?0:t};var Rt={test:function(t){var n,e,r,o;return isNaN(t)&&st(t)&&(null!==(e=null===(n=t.match(it))||void 0===n?void 0:n.length)&&void 0!==e?e:0)+(null!==(o=null===(r=t.match(at))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:Vt,createTransformer:Mt,getAnimatableNone:function(t){var n=Vt(t);return Mt(t)(n.map(Lt))}},kt=new Set(["brightness","contrast","saturate","opacity"]);function Ot(t){var n=t.slice(0,-1).split("("),e=n[0],r=n[1];if("drop-shadow"===e)return t;var o=(r.match(it)||[])[0];if(!o)return t;var i=r.replace(o,""),a=kt.has(e)?1:0;return o!==r&&(a*=100),e+"("+a+i+")"}var Dt=/([a-z-]*)\(.*?\)/g,jt=et(et({},Rt),{getAnimatableNone:function(t){var n=t.match(Dt);return n?n.map(Ot).join(" "):t}}),Bt=o(o({},ct),{transform:Math.round}),Ft={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,size:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,rotate:vt,rotateX:vt,rotateY:vt,rotateZ:vt,scale:lt,scaleX:lt,scaleY:lt,scaleZ:lt,skew:vt,skewX:vt,skewY:vt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:ft,originX:gt,originY:gt,originZ:mt,zIndex:Bt,fillOpacity:ft,strokeOpacity:ft,numOctaves:Bt};function Ut(t,n,e,r,o,i,a,u){var s,c=t.style,f=t.vars,l=t.transform,d=t.transformKeys,v=t.transformOrigin;d.length=0;var p=!1,m=!1,h=!0;for(var y in n){var g=n[y];if(tt(y))f[y]=g;else{var x=Ft[y],b=nt(g,x);if(q(y)){if(p=!0,l[y]=b,d.push(y),!h)continue;g!==(null!==(s=x.default)&&void 0!==s?s:0)&&(h=!1)}else if(G(y))v[y]=b,m=!0;else if((null==e?void 0:e.isHydrated)&&(null==r?void 0:r.isHydrated)&&Y[y]){var E=Y[y].process(g,r,e),P=Y[y].applyTo;if(P)for(var w=P.length,A=0;A<w;A++)c[P[A]]=E;else c[y]=E}else c[y]=b}}r&&e&&a&&u?(c.transform=a(r.deltaFinal,r.treeScale,p?l:void 0),i&&(c.transform=i(l,c.transform)),c.transformOrigin=u(r)):(p&&(c.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(_);for(var l=!1,d=i.length,v=0;v<d;v++){var p=i[v];f+=(Q[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,h,i)),m&&(c.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)}(v)))}var It=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Ht(t,n,e){for(var r in n)J(n[r])||K(r,e)||(t[r]=n[r])}function Xt(n,e,r){var i={};return Ht(i,n.style||{},n),Object.assign(i,function(n,e,r){var i=n.transformTemplate;return t.exports.useMemo((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};Ut(t,e,void 0,void 0,{enableHardwareAcceleration:!r},i);var n=t.style;return o(o({},t.vars),n)}),[e])}(n,e,r)),n.transformValues&&(i=n.transformValues(i)),i}function Yt(t,n,e){var r={},o=Xt(t,n,e);return Boolean(t.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=o,r}var zt=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","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 Nt(t){return zt.has(t)}var Wt=function(t){return!Nt(t)};try{var _t=require("@emotion/is-prop-valid").default;Wt=function(t){return t.startsWith("on")?!Nt(t):_t(t)}}catch(mu){}function Zt(t,n,e){return"string"==typeof t?t:mt.transform(n+e*t)}var qt=function(t,n){return mt.transform(t*n)},$t={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gt={offset:"strokeDashoffset",array:"strokeDasharray"};function Kt(t,n,e,r,o,a,u,s){var c=n.attrX,f=n.attrY,l=n.originX,d=n.originY,v=n.pathLength,p=n.pathSpacing,m=void 0===p?1:p,h=n.pathOffset,y=void 0===h?0:h;Ut(t,i(n,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),e,r,o,a,u,s),t.attrs=t.style,t.style={};var g=t.attrs,x=t.style,b=t.dimensions,E=t.totalPathLength;g.transform&&(b&&(x.transform=g.transform),delete g.transform),b&&(void 0!==l||void 0!==d||x.transform)&&(x.transformOrigin=function(t,n,e){return Zt(n,t.x,t.width)+" "+Zt(e,t.y,t.height)}(b,void 0!==l?l:.5,void 0!==d?d:.5)),void 0!==c&&(g.x=c),void 0!==f&&(g.y=f),void 0!==E&&void 0!==v&&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?$t:Gt;t[a.offset]=qt(-o,n);var u=qt(e,n),s=qt(r,n);t[a.array]=u+" "+s}(g,E,v,m,y,!1)}var Jt=function(){return o(o({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Qt(n,e){var r=t.exports.useMemo((function(){var t=Jt();return Kt(t,e,void 0,void 0,{enableHardwareAcceleration:!1},n.transformTemplate),o(o({},t.attrs),{style:o({},t.style)})}),[e]);if(n.style){var i={};Ht(i,n.style,n),r.style=o(o({},i),r.style)}return r}function tn(n){void 0===n&&(n=!1);return function(e,r,i,a,u){var s=a.latestValues,c=(X(e)?Qt:Yt)(r,s,u),f=function(t,n,e){var r={};for(var o in t)(Wt(o)||!0===e&&Nt(o)||!n&&!Nt(o))&&(r[o]=t[o]);return r}(r,"string"==typeof e,n),l=o(o(o({},f),c),{ref:i});return t.exports.createElement(e,l)}}var nn=/([a-z])([A-Z])/g,en=function(t){return t.replace(nn,"$1-$2").toLowerCase()};function rn(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])}var on=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function an(t,n){for(var e in rn(t,n),n.attrs)t.setAttribute(on.has(e)?e:en(e),n.attrs[e])}function un(t){var n=t.style,e={};for(var r in n)(J(n[r])||K(r,t))&&(e[r]=n[r]);return e}function sn(t){var n=un(t);for(var e in t){if(J(t[e]))n["x"===e||"y"===e?"attr"+e.toUpperCase():e]=t[e]}return n}function cn(t){return"object"==typeof t&&"function"==typeof t.start}var fn=function(t){return Array.isArray(t)};function ln(t){var n,e=J(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e}function dn(t,n,e,r){var o=t.scrapeMotionValuesFromProps,i=t.createRenderState,a=t.onMount,u={latestValues:pn(n,e,r,o),renderState:i()};return a&&(u.mount=function(t){return a(n,t,u)}),u}var vn=function(n){return function(e,r){var o=t.exports.useContext(m),i=t.exports.useContext(y);return r?dn(n,e,o,i):g((function(){return dn(n,e,o,i)}))}};function pn(t,n,e,r){var o={},a=!1===(null==e?void 0:e.initial),u=r(t);for(var s in u)o[s]=ln(u[s]);var c=t.initial,f=t.animate,l=D(t),d=j(t);n&&d&&!l&&!1!==t.inherit&&(null!=c||(c=n.initial),null!=f||(f=n.animate));var v=a||!1===c?f:c;v&&"boolean"!=typeof v&&!cn(v)&&(Array.isArray(v)?v:[v]).forEach((function(n){var e=k(t,n);if(e){var r=e.transitionEnd;e.transition;var a=i(e,["transitionEnd","transition"]);for(var u in a)o[u]=a[u];for(var u in r)o[u]=r[u]}}));return o}var mn={useVisualState:vn({scrapeMotionValuesFromProps:sn,createRenderState:Jt,onMount:function(t,n,e){var r=e.renderState,o=e.latestValues;try{r.dimensions="function"==typeof n.getBBox?n.getBBox():n.getBoundingClientRect()}catch(i){r.dimensions={x:0,y:0,width:0,height:0}}"path"===n.tagName&&(r.totalPathLength=n.getTotalLength()),Kt(r,o,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),an(n,r)}})};var hn,yn,gn={useVisualState:vn({scrapeMotionValuesFromProps:un,createRenderState:It})};function xn(t,n,e,r){var i=n.forwardMotionProps,a=void 0!==i&&i,u=X(t)?mn:gn;return o(o({},u),{preloadedFeatures:e,useRender:tn(a),createVisualElement:r,Component:t})}function bn(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function En(n,e,r,o){t.exports.useEffect((function(){var t=n.current;if(r&&t)return bn(t,e,r,o)}),[n,e,r,o])}function Pn(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function wn(t){return!!t.touches}(yn=hn||(hn={})).Animate="animate",yn.Hover="whileHover",yn.Tap="whileTap",yn.Drag="whileDrag",yn.Focus="whileFocus",yn.Exit="exit";var An={pageX:0,pageY:0};function Sn(t,n){void 0===n&&(n="page");var e=t.touches[0]||t.changedTouches[0]||An;return{x:e[n+"X"],y:e[n+"Y"]}}function Tn(t,n){return void 0===n&&(n="page"),{x:t[n+"X"],y:t[n+"Y"]}}function Cn(t,n){return void 0===n&&(n="page"),{point:wn(t)?Sn(t,n):Tn(t,n)}}var Vn=function(t,n){void 0===n&&(n=!1);var e,r=function(n){return t(n,Cn(n))};return n?(e=r,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):r},Mn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ln={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Rn(t){return T&&null===window.onpointerdown?t:T&&null===window.ontouchstart?Ln[t]:T&&null===window.onmousedown?Mn[t]:t}function kn(t,n,e,r){return bn(t,Rn(n),Vn(e,"pointerdown"===n),r)}function On(t,n,e,r){return En(t,Rn(n),e&&Vn(e,"pointerdown"===n),r)}function Dn(t){var n=null;return function(){return null===n&&(n=t,function(){n=null})}}var jn=Dn("dragHorizontal"),Bn=Dn("dragVertical");function Fn(t){var n=!1;if("y"===t)n=Bn();else if("x"===t)n=jn();else{var e=jn(),r=Bn();e&&r?n=function(){e(),r()}:(e&&e(),r&&r())}return n}function Un(){var t=Fn(!0);return!t||(t(),!1)}function In(t,n,e){return function(r,o){var i;Pn(r)&&!Un()&&(null==e||e(r,o),null===(i=t.animationState)||void 0===i||i.setActive(hn.Hover,n))}}var Hn=function(t,n){return!!n&&(t===n||Hn(t,n.parentElement))};function Xn(n){return t.exports.useEffect((function(){return function(){return n()}}),[])}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Yn=function(){return(Yn=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 zn(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}var Nn=function(t,n,e){return Math.min(Math.max(e,t),n)};function Wn(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=Nn(.05,1,l),o=Nn(.01,10,o/1e3),l<1?(n=function(t){var n=t*l,e=n*o;return.001-(n-s)/_n(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=_n(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(o*=1e3,isNaN(d))return{stiffness:100,damping:10,duration:o};var v=Math.pow(d,2)*f;return{stiffness:v,damping:2*l*Math.sqrt(f*v),duration:o}}function _n(t,n){return t*Math.sqrt(1-n*n)}var Zn=["duration","bounce"],qn=["stiffness","damping","mass"];function $n(t,n){return n.some((function(n){return void 0!==t[n]}))}function Gn(t){var n=t.from,e=void 0===n?0:n,r=t.to,o=void 0===r?1:r,i=t.restSpeed,a=void 0===i?2:i,u=t.restDelta,s=zn(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:e},f=function(t){var n=Yn({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!$n(t,qn)&&$n(t,Zn)){var e=Wn(t);(n=Yn(Yn(Yn({},n),e),{velocity:0,mass:1})).isResolvedFromDuration=!0}return n}(s),l=f.stiffness,d=f.damping,v=f.mass,p=f.velocity,m=f.duration,h=f.isResolvedFromDuration,y=Kn,g=Kn;function x(){var t=p?-p/1e3:0,n=o-e,r=d/(2*Math.sqrt(l*v)),i=Math.sqrt(l/v)/1e3;if(null!=u||(u=Math.abs(o-e)<=1?.01:.4),r<1){var a=_n(i,r);y=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))},g=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)y=function(e){return o-Math.exp(-i*e)*(n+(t+i*n)*e)};else{var s=i*Math.sqrt(r*r-1);y=function(e){var a=Math.exp(-r*i*e),u=Math.min(s*e,300);return o-a*((t+r*i*n)*Math.sinh(u)+s*n*Math.cosh(u))/s}}}return x(),{next:function(t){var n=y(t);if(h)c.done=t>=m;else{var e=1e3*g(t),r=Math.abs(e)<=a,i=Math.abs(o-n)<=u;c.done=r&&i}return c.value=c.done?o:n,c},flipTarget:function(){var t;p=-p,e=(t=[o,e])[0],o=t[1],x()}}}Gn.needsInterpolation=function(t,n){return"string"==typeof t||"string"==typeof n};var Kn=function(t){return 0},Jn=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},Qn=function(t,n,e){return-e*t+e*n+t},te=function(t,n,e){var r=t*t,o=n*n;return Math.sqrt(Math.max(0,e*(o-r)+r))},ne=[St,At,Et],ee=function(t){return ne.find((function(n){return n.test(t)}))},re=function(t,n){var e=ee(t),r=ee(n);e.transform,r.transform;var o=e.parse(t),i=r.parse(n),a=Yn({},o),u=e===Et?Qn:te;return function(t){for(var n in a)"alpha"!==n&&(a[n]=u(o[n],i[n],t));return a.alpha=Qn(o.alpha,i.alpha,t),e.transform(a)}},oe=function(t){return"number"==typeof t},ie=function(t,n){return function(e){return n(t(e))}},ae=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(ie)};function ue(t,n){return oe(t)?function(e){return Qn(t,n,e)}:Tt.test(t)?re(t,n):le(t,n)}var se=function(t,n){var e=function(t,n){for(var e=0,r=n.length,o=t.length;e<r;e++,o++)t[o]=n[e];return t}([],t),r=e.length,o=t.map((function(t,e){return ue(t,n[e])}));return function(t){for(var n=0;n<r;n++)e[n]=o[n](t);return e}},ce=function(t,n){var e=Yn(Yn({},t),n),r={};for(var o in e)void 0!==t[o]&&void 0!==n[o]&&(r[o]=ue(t[o],n[o]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function fe(t){for(var n=Rt.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 le=function(t,n){var e=Rt.createTransformer(n),r=fe(t),o=fe(n);return ae(se(r.parsed,o.parsed),e)},de=function(t,n){return function(e){return Qn(t,n,e)}};function ve(t,n,e){for(var r,o=[],i=e||("number"==typeof(r=t[0])?de:"string"==typeof r?Tt.test(r)?re:le:Array.isArray(r)?se:"object"==typeof r?ce: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=ae(c,s)}o.push(s)}return o}function pe(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=ve(n,a,u),f=2===s?function(t,n){var e=t[0],r=t[1],o=n[0];return function(t){return o(Jn(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=Jn(t[i],t[i+1],o);return n[i](s)}}(t,c);return i?function(n){return f(Nn(t[0],t[s-1],n))}:f}var me,he=function(t){return function(n){return 1-t(1-n)}},ye=function(t){return function(n){return n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2}},ge=function(t){return function(n){return n*n*((t+1)*n-t)}},xe=function(t){return t},be=(me=2,function(t){return Math.pow(t,me)}),Ee=he(be),Pe=ye(be),we=function(t){return 1-Math.sin(Math.acos(t))},Ae=he(we),Se=ye(Ae),Te=ge(1.525),Ce=he(Te),Ve=ye(Te),Me=function(t){var n=ge(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),Le=function(t){if(1===t||0===t)return t;var n=t*t;return t<.36363636363636365?7.5625*n:t<.7272727272727273?9.075*n-9.9*t+3.4:t<.9?12.066481994459833*n-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Re=he(Le);function ke(t,n){return t.map((function(){return n||Pe})).splice(0,t.length-1)}function Oe(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 pe(l,f,{ease:Array.isArray(i)?i:ke(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 De={keyframes:Oe,spring:Gn,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(){}}}};var je="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},Be="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(je())}),16.666666666666668)};var Fe=!0,Ue=!1,Ie=!1,He={delta:0,timestamp:0},Xe=["read","update","preRender","render","postRender"],Ye=Xe.reduce((function(t,n){var e,r,o,i,a,u,s;return t[n]=(e=function(){return Ue=!0},r=[],o=[],i=0,a=!1,u=new WeakSet,s={schedule:function(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var s=e&&a,c=s?r:o;return n&&u.add(t),-1===c.indexOf(t)&&(c.push(t),s&&a&&(i=r.length)),t},cancel:function(t){var n=o.indexOf(t);-1!==n&&o.splice(n,1),u.delete(t)},process:function(t){var n;if(a=!0,r=(n=[o,r])[0],(o=n[1]).length=0,i=r.length)for(var c=0;c<i;c++){var f=r[c];f(t),u.has(f)&&(s.schedule(f),e())}a=!1}}),t}),{}),ze=Xe.reduce((function(t,n){var e=Ye[n];return t[n]=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),Ue||qe(),e.schedule(t,n,r)},t}),{}),Ne=Xe.reduce((function(t,n){return t[n]=Ye[n].cancel,t}),{}),We=Xe.reduce((function(t,n){return t[n]=function(){return Ye[n].process(He)},t}),{}),_e=function(t){return Ye[t].process(He)},Ze=function(t){Ue=!1,He.delta=Fe?16.666666666666668:Math.max(Math.min(t-He.timestamp,40),1),He.timestamp=t,Ie=!0,Xe.forEach(_e),Ie=!1,Ue&&(Fe=!1,Be(Ze))},qe=function(){Ue=!0,Fe=!0,Ie||Be(Ze)},$e=function(){return He};function Ge(t,n,e){return void 0===e&&(e=0),t-n-e}var Ke=function(t){var n=function(n){var e=n.delta;return t(e)};return{start:function(){return ze.update(n,!0)},stop:function(){return Ne.update(n)}}};function Je(t){var n,e,r,o,i,a=t.from,u=t.autoplay,s=void 0===u||u,c=t.driver,f=void 0===c?Ke:c,l=t.elapsed,d=void 0===l?0:l,v=t.repeat,p=void 0===v?0:v,m=t.repeatType,h=void 0===m?"loop":m,y=t.repeatDelay,g=void 0===y?0:y,x=t.onPlay,b=t.onStop,E=t.onComplete,P=t.onRepeat,w=t.onUpdate,A=zn(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),S=A.to,T=0,C=A.duration,V=!1,M=!0,L=function(t){if(Array.isArray(t.to))return Oe;if(De[t.type])return De[t.type];var n=new Set(Object.keys(t));return n.has("ease")||n.has("duration")&&!n.has("dampingRatio")?Oe:n.has("dampingRatio")||n.has("stiffness")||n.has("mass")||n.has("damping")||n.has("restSpeed")||n.has("restDelta")?Gn:Oe}(A);(null===(e=(n=L).needsInterpolation)||void 0===e?void 0:e.call(n,a,S))&&(i=pe([0,100],[a,S],{clamp:!1}),a=0,S=100);var R=L(Yn(Yn({},A),{from:a,to:S}));function k(){T++,"reverse"===h?d=function(t,n,e,r){return void 0===e&&(e=0),void 0===r&&(r=!0),r?Ge(n+-t,n,e):n-(t-n)+e}(d,C,g,M=T%2==0):(d=Ge(d,C,g),"mirror"===h&&R.flipTarget()),V=!1,P&&P()}function O(t){if(M||(t=-t),d+=t,!V){var n=R.next(Math.max(0,d));o=n.value,i&&(o=i(o)),V=M?n.done:d<=0}null==w||w(o),V&&(0===T&&(null!=C||(C=d)),T<p?function(t,n,e,r){return r?t>=n+e:t<=-e}(d,C,g,M)&&k():(r.stop(),E&&E()))}return s&&(null==x||x(),(r=f(O)).start()),{stop:function(){null==b||b(),r.stop()}}}function Qe(t,n){return n?t*(1e3/n):0}var tr=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},nr=function(t){return tr(t)&&t.hasOwnProperty("z")},er=function(t,n){return Math.abs(t-n)};function rr(t,n){if(oe(t)&&oe(n))return er(t,n);if(tr(t)&&tr(n)){var e=er(t.x,n.x),r=er(t.y,n.y),o=nr(t)&&nr(n)?er(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(o,2))}}var or=function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t},ir=function(t,n){return 1-3*n+3*t},ar=function(t,n){return 3*n-6*t},ur=function(t){return 3*t},sr=function(t,n,e){return((ir(n,e)*t+ar(n,e))*t+ur(n))*t},cr=function(t,n,e){return 3*ir(n,e)*t*t+2*ar(n,e)*t+ur(n)};function fr(t,n,e,r){if(t===n&&e===r)return xe;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=sr(.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=cr(a,t,e);return u>=.001?function(t,n,e,r){for(var o=0;o<8;++o){var i=cr(n,e,r);if(0===i)return n;n-=(sr(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=sr(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:sr(a(t),n,r)}}var lr=function(t){return function(n){return t(n),null}},dr={tap:lr((function(n){var e=n.onTap,r=n.onTapStart,o=n.onTapCancel,i=n.whileTap,a=n.visualElement,u=e||r||o||i,s=t.exports.useRef(!1),c=t.exports.useRef(null);function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function l(){var t;return f(),s.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(hn.Tap,!1),!Un()}function d(t,n){l()&&(Hn(a.getInstance(),t.target)?null==e||e(t,n):null==o||o(t,n))}function v(t,n){l()&&(null==o||o(t,n))}On(a,"pointerdown",u?function(t,n){var e;f(),s.current||(s.current=!0,c.current=ae(kn(window,"pointerup",d),kn(window,"pointercancel",v)),null==r||r(t,n),null===(e=a.animationState)||void 0===e||e.setActive(hn.Tap,!0))}:void 0),Xn(f)})),focus:lr((function(t){var n=t.whileFocus,e=t.visualElement;En(e,"focus",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(hn.Focus,!0)}:void 0),En(e,"blur",n?function(){var t;null===(t=e.animationState)||void 0===t||t.setActive(hn.Focus,!1)}:void 0)})),hover:lr((function(t){var n=t.onHoverStart,e=t.onHoverEnd,r=t.whileHover,o=t.visualElement;On(o,"pointerenter",n||r?In(o,!0,n):void 0),On(o,"pointerleave",e||r?In(o,!1,e):void 0)}))};function vr(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}var pr=function(t){return 1e3*t},mr={linear:xe,easeIn:be,easeInOut:Pe,easeOut:Ee,circIn:we,circInOut:Se,circOut:Ae,backIn:Te,backInOut:Ve,backOut:Ce,anticipate:Me,bounceIn:Re,bounceInOut:function(t){return t<.5?.5*(1-Le(1-2*t)):.5*Le(2*t-1)+.5},bounceOut:Le},hr=function(t){if(Array.isArray(t)){t.length;var n=a(t,4);return fr(n[0],n[1],n[2],n[3])}return"string"==typeof t?mr[t]:t},yr=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!Rt.test(n)||n.startsWith("url(")))},gr=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},xr=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},br=function(){return{type:"keyframes",ease:"linear",duration:.3}},Er=function(t){return{type:"keyframes",duration:.8,values:t}},Pr={x:gr,y:gr,z:gr,rotate:gr,rotateX:gr,rotateY:gr,rotateZ:gr,scaleX:xr,scaleY:xr,scale:xr,opacity:br,backgroundColor:br,color:br,default:xr},wr=o(o({},Ft),{color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:jt,WebkitFilter:jt}),Ar=function(t){return wr[t]};function Sr(t,n){var e,r=Ar(t);return r!==jt&&(r=Rt),null===(e=r.getAnimatableNone)||void 0===e?void 0:e.call(r,n)}function Tr(t){var n=t.ease,e=t.times,r=t.yoyo,a=t.flip,u=t.loop,s=i(t,["ease","times","yoyo","flip","loop"]),c=o({},s);return e&&(c.offset=e),s.duration&&(c.duration=pr(s.duration)),s.repeatDelay&&(c.repeatDelay=pr(s.repeatDelay)),n&&(c.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(n)?n.map(hr):hr(n)),"tween"===s.type&&(c.type="keyframes"),(r||u||a)&&(r?c.repeatType="reverse":u?c.repeatType="loop":a&&(c.repeatType="mirror"),c.repeat=u||r||a||s.repeat),"spring"!==s.type&&(c.type="keyframes"),c}function Cr(t,n,e){var r,s,c,f;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=u([],a(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=i(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(n).length}(t)||(t=o(o({},t),(s=e,c=n.to,f=fn(c)?Er:Pr[s]||Pr.default,o({to:c},f(c))))),o(o({},n),Tr(t))}function Vr(t,n,e,r,i){var a,u=Rr(r,t),s=null!==(a=u.from)&&void 0!==a?a:n.get(),c=yr(t,e);return"none"===s&&c&&"string"==typeof e?s=Sr(t,e):Mr(s)&&"string"==typeof e?s=Lr(e):!Array.isArray(e)&&Mr(e)&&"string"==typeof s&&(e=Lr(s)),yr(t,s)&&c&&!1!==u.type?function(){var r={from:s,to:e,velocity:n.getVelocity(),onComplete:i,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,a=t.min,u=t.max,s=t.power,c=void 0===s?.8:s,f=t.timeConstant,l=void 0===f?750:f,d=t.bounceStiffness,v=void 0===d?500:d,p=t.bounceDamping,m=void 0===p?10:p,h=t.restDelta,y=void 0===h?1:h,g=t.modifyTarget,x=t.driver,b=t.onUpdate,E=t.onComplete;function P(t){return void 0!==a&&t<a||void 0!==u&&t>u}function w(t){return void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u}function A(t){null==n||n.stop(),n=Je(Yn(Yn({},t),{driver:x,onUpdate:function(n){var e;null==b||b(n),null===(e=t.onUpdate)||void 0===e||e.call(t,n)},onComplete:E}))}function S(t){A(Yn({type:"spring",stiffness:v,damping:m,restDelta:y},t))}if(P(r))S({from:r,velocity:i,to:w(r)});else{var T=c*i+r;void 0!==g&&(T=g(T));var C,V,M=w(T),L=M===a?-1:1;A({type:"decay",from:r,velocity:i,timeConstant:l,power:c,restDelta:y,modifyTarget:g,onUpdate:P(T)?function(t){C=V,V=t,i=Qe(t-C,$e().delta),(1===L&&t>M||-1===L&&t<M)&&S({from:t,to:M,velocity:i})}:void 0})}return{stop:function(){return null==n?void 0:n.stop()}}}(o(o({},r),u)):Je(o(o({},Cr(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),i(),null===(t=null==u?void 0:u.onComplete)||void 0===t||t.call(u),{stop:function(){}}}}function Mr(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Lr(t){return"number"==typeof t?0:Sr("",t)}function Rr(t,n){return t[n]||t.default||t}function kr(t,n,e,r){return void 0===r&&(r={}),n.start((function(o){var i,a,u=Vr(t,n,e,r,o),s=function(t,n){var e;return null!==(e=(Rr(t,n)||{}).delay)&&void 0!==e?e:0}(r,t),c=function(){return a=u()};return s?i=setTimeout(c,pr(s)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}function Or(t,n){-1===t.indexOf(n)&&t.push(n)}function Dr(t,n){var e=t.indexOf(n);e>-1&&t.splice(e,1)}var jr=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var n=this;return Or(this.subscriptions,t),function(){return Dr(n.subscriptions,t)}},t.prototype.notify=function(t,n,e){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,n,e);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,n,e)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Br=function(){function t(t){var n,e=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new jr,this.velocityUpdateSubscribers=new jr,this.renderSubscribers=new jr,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),e.prev=e.current,e.current=t;var r=$e(),o=r.delta,i=r.timestamp;e.lastUpdated!==i&&(e.timeDelta=o,e.lastUpdated=i,ze.postRender(e.scheduleVelocityCheck)),e.prev!==e.current&&e.updateSubscribers.notify(e.current),e.velocityUpdateSubscribers.getSize()&&e.velocityUpdateSubscribers.notify(e.getVelocity()),n&&e.renderSubscribers.notify(e.current)},this.scheduleVelocityCheck=function(){return ze.postRender(e.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==e.lastUpdated&&(e.prev=e.current,e.velocityUpdateSubscribers.notify(e.getVelocity()))},this.hasAnimated=!1,this.prev=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?Qe(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 Fr(t){return new Br(t)}var Ur=function(t){return function(n){return n.test(t)}},Ir=[ct,mt,pt,vt,yt,ht,{test:function(t){return"auto"===t},parse:function(t){return t}}],Hr=function(t){return Ir.find(Ur(t))},Xr=u(u([],a(Ir)),[Tt,Rt]),Yr=function(t){return Xr.find(Ur(t))};function zr(t,n,e){t.hasValue(n)?t.getValue(n).set(e):t.addValue(n,Fr(e))}function Nr(t,n){var e=O(t,n),r=e?t.makeTargetAnimatable(e,!1):{},a=r.transitionEnd,u=void 0===a?{}:a;r.transition;var s,c=i(r,["transitionEnd","transition"]);for(var f in c=o(o({},c),u)){zr(t,f,(s=c[f],fn(s)?s[s.length-1]||0:s))}}function Wr(t,n){u([],a(n)).reverse().forEach((function(e){var r,o=t.getVariant(e);o&&Nr(t,o),null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){Wr(t,n)}))}))}function _r(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):!Yr(d)&&Rt.test(l)&&(d=Sr(f,l)),t.addValue(f,Fr(d)),null!==(i=(a=e)[f])&&void 0!==i||(a[f]=d),t.setBaseTarget(f,d))}}function Zr(t,n){if(n)return(n[t]||n.default||n).from}function qr(t,n,e){var r,o,i={};for(var a in t)i[a]=null!==(r=Zr(a,n))&&void 0!==r?r:null===(o=e.getValue(a))||void 0===o?void 0:o.get();return i}function $r(t,n,e){var r;if(void 0===e&&(e={}),t.notifyAnimationStart(),Array.isArray(n)){var o=n.map((function(n){return Gr(t,n,e)}));r=Promise.all(o)}else if("string"==typeof n)r=Gr(t,n,e);else{var i="function"==typeof n?O(t,n,e.custom):n;r=Kr(t,i,e)}return r.then((function(){return t.notifyAnimationComplete(n)}))}function Gr(t,n,e){var r;void 0===e&&(e={});var i=O(t,n,e.custom),u=(i||{}).transition,s=void 0===u?t.getDefaultTransition()||{}:u;e.transitionOverride&&(s=e.transitionOverride);var c=i?function(){return Kr(t,i,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 i=s.delayChildren,a=void 0===i?0:i,u=s.staggerChildren,c=s.staggerDirection;return function(t,n,e,r,i,a){void 0===e&&(e=0);void 0===r&&(r=0);void 0===i&&(i=1);var u=[],s=(t.variantChildren.size-1)*r,c=1===i?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(Jr).forEach((function(t,r){u.push(Gr(t,n,o(o({},a),{delay:e+c(r)})).then((function(){return t.notifyAnimationComplete(n)})))})),Promise.all(u)}(t,n,a+r,u,c,e)}:function(){return Promise.resolve()},l=s.when;if(l){var d=a("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 Kr(t,n,e){var r,a=void 0===e?{}:e,u=a.delay,s=void 0===u?0:u,c=a.transitionOverride,f=a.type,l=t.makeTargetAnimatable(n),d=l.transition,v=void 0===d?t.getDefaultTransition():d,p=l.transitionEnd,m=i(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&&Qr(y,g))){var E=kr(g,x,b,o({delay:s},v));h.push(E)}}return Promise.all(h).then((function(){p&&Nr(t,p)}))}function Jr(t,n){return t.sortNodePosition(n)}function Qr(t,n){var e=t.protectedKeys,r=t.needsAnimating,o=e.hasOwnProperty(n)&&!0!==r[n];return r[n]=!1,o}var to=[hn.Animate,hn.Hover,hn.Tap,hn.Drag,hn.Focus,hn.Exit],no=u([],a(to)).reverse(),eo=to.length;function ro(t){var n,e=function(t){return function(n){return Promise.all(n.map((function(n){var e=n.animation,r=n.options;return $r(t,e,r)})))}}(t),r=((n={})[hn.Animate]=oo(!0),n[hn.Hover]=oo(),n[hn.Tap]=oo(),n[hn.Drag]=oo(),n[hn.Focus]=oo(),n[hn.Exit]=oo(),n),s={},c=!0,f=function(n,e){var r=O(t,e);if(r){r.transition;var a=r.transitionEnd,u=i(r,["transition","transitionEnd"]);n=o(o(o({},n),u),a)}return n};function l(n,i){for(var l,d=t.getProps(),v=t.getVariantContext(!0)||{},p=[],m=new Set,h={},y=1/0,g=function(e){var s=no[e],g=r[s],x=null!==(l=d[s])&&void 0!==l?l:v[s],b=R(x),E=s===i?g.isActive:null;!1===E&&(y=e);var P=x===v[s]&&x!==d[s]&&b;if(P&&c&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys=o({},h),!g.isActive&&null===E||!x&&!g.prevProp||cn(x)||"boolean"==typeof x)return"continue";var w=function(t,n){if("string"==typeof n)return n!==t;if(L(n))return!vr(n,t);return!1}(g.prevProp,x)||s===i&&g.isActive&&!P&&b||e>y&&b,A=Array.isArray(x)?x:[x],S=A.reduce(f,{});!1===E&&(S={});var T=g.prevResolvedValues,C=void 0===T?{}:T,V=o(o({},C),S),M=function(t){w=!0,m.delete(t),g.needsAnimating[t]=!0};for(var k in V){var O=S[k],D=C[k];h.hasOwnProperty(k)||(O!==D?fn(O)&&fn(D)?vr(O,D)?g.protectedKeys[k]=!0:M(k):void 0!==O?M(k):m.add(k):void 0!==O&&m.has(k)?M(k):g.protectedKeys[k]=!0)}g.prevProp=x,g.prevResolvedValues=S,g.isActive&&(h=o(o({},h),S)),c&&t.blockInitialAnimation&&(w=!1),w&&!P&&p.push.apply(p,u([],a(A.map((function(t){return{animation:t,options:o({type:s},n)}})))))},x=0;x<eo;x++)g(x);if(s=o({},h),m.size){var b={};m.forEach((function(n){var e=t.getBaseTarget(n);void 0!==e&&(b[n]=e)})),p.push({animation:b})}var E=Boolean(p.length);return c&&!1===d.initial&&!t.manuallyAnimateOnMount&&(E=!1),c=!1,E?e(p):Promise.resolve()}return{isAnimated:function(t){return void 0!==s[t]},animateChanges:l,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,l(o,n))},setAnimateFunction:function(n){e=n(t)},getState:function(){return r}}}function oo(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var io={animation:lr((function(n){var e=n.visualElement,r=n.animate;e.animationState||(e.animationState=ro(e)),cn(r)&&t.exports.useEffect((function(){return r.subscribe(e)}),[r])})),exit:lr((function(n){var e=n.custom,r=n.visualElement,o=a(x(),2),i=o[0],u=o[1],s=t.exports.useContext(y);t.exports.useEffect((function(){var t,n,o=null===(t=r.animationState)||void 0===t?void 0:t.setActive(hn.Exit,!i,{custom:null!==(n=null==s?void 0:s.custom)&&void 0!==n?n:e});!i&&(null==o||o.then(u))}),[i])}))},ao=function(){function t(t,n,e){var r=this,i=(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=co(r.lastMoveEventInfo,r.history),n=null!==r.startEvent,e=rr(t.offset,{x:0,y:0})>=3;if(n||e){var i=t.point,a=$e().timestamp;r.history.push(o(o({},i),{timestamp:a}));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=uo(n,r.transformPagePoint),Pn(t)&&0===t.buttons?r.handlePointerUp(t,n):ze.update(r.updatePoint,!0)},this.handlePointerUp=function(t,n){r.end();var e=r.handlers,o=e.onEnd,i=e.onSessionEnd,a=co(uo(n,r.transformPagePoint),r.history);r.startEvent&&o&&o(t,a),i&&i(t,a)},!(wn(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var a=uo(Cn(t),this.transformPagePoint),u=a.point,s=$e().timestamp;this.history=[o(o({},u),{timestamp:s})];var c=n.onSessionStart;c&&c(t,co(a,this.history)),this.removeListeners=ae(kn(window,"pointermove",this.handlePointerMove),kn(window,"pointerup",this.handlePointerUp),kn(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Ne.update(this.updatePoint)},t}();function uo(t,n){return n?{point:n(t.point)}:t}function so(t,n){return{x:t.x-n.x,y:t.y-n.y}}function co(t,n){var e=t.point;return{point:e,delta:so(e,lo(n)),offset:so(e,fo(n)),velocity:vo(n,.1)}}function fo(t){return t[0]}function lo(t){return t[t.length-1]}function vo(t,n){if(t.length<2)return{x:0,y:0};for(var e=t.length-1,r=null,o=lo(t);e>=0&&(r=t[e],!(o.timestamp-r.timestamp>pr(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 po(t){return t}function mo(t){var n=t.top;return{x:{min:t.left,max:t.right},y:{min:n,max:t.bottom}}}function ho(){return{x:{min:0,max:1},y:{min:0,max:1}}}var yo={translate:0,scale:1,origin:0,originPoint:0};function go(){return{x:o({},yo),y:o({},yo)}}function xo(t){return[t("x"),t("y")]}function bo(t,n,e){var r=n.min,o=n.max;return void 0!==r&&t<r?t=e?Qn(r,t,e.min):Math.max(t,r):void 0!==o&&t>o&&(t=e?Qn(o,t,e.max):Math.min(t,o)),t}function Eo(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 Po(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=a([o,r],2))[0],o=e[1]),{min:t.min+r,max:t.min+o}}function wo(t,n,e){return{min:Ao(t,n),max:Ao(t,e)}}function Ao(t,n){var e;return"number"==typeof t?t:null!==(e=t[n])&&void 0!==e?e:0}function So(t,n){return mo(function(t,n){var e=t.top,r=t.left,o=t.bottom,i=t.right;void 0===n&&(n=po);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 To(t,n,e){return void 0===n&&(n=0),void 0===e&&(e=.01),rr(t,n)<e}function Co(t){return t.max-t.min}function Vo(t,n){var e=.5,r=Co(t),o=Co(n);return o>r?e=Jn(n.min,n.max-r,t.min):r>o&&(e=Jn(t.min,t.max-o,n.min)),Nn(0,1,e)}function Mo(t,n,e,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=Qn(n.min,n.max,t.origin),t.scale=Co(e)/Co(n),To(t.scale,1,1e-4)&&(t.scale=1),t.translate=Qn(e.min,e.max,t.origin)-t.originPoint,To(t.translate)&&(t.translate=0)}function Lo(t,n,e,r){Mo(t.x,n.x,e.x,Ro(r.originX)),Mo(t.y,n.y,e.y,Ro(r.originY))}function Ro(t){return"number"==typeof t?t:.5}function ko(t,n,e){t.min=e.min+n.min,t.max=t.min+Co(n)}var Oo=function(t,n){return t.depth-n.depth};function Do(t){return t.projection.isEnabled||t.shouldResetTransform()}function jo(t,n){void 0===n&&(n=[]);var e=t.parent;return e&&jo(e,n),Do(t)&&n.push(t),n}function Bo(t){if(!t.shouldResetTransform()){var n,e=t.getLayoutState();t.notifyBeforeLayoutMeasure(e.layout),e.isHydrated=!0,e.layout=t.measureViewportBox(),e.layoutCorrected=(n=e.layout,{x:o({},n.x),y:o({},n.y)}),t.notifyLayoutMeasure(e.layout,t.prevViewportBox||e.layout),ze.update((function(){return t.rebaseProjectionTarget()}))}}function Fo(t){t.shouldResetTransform()||(t.prevViewportBox=t.measureViewportBox(!1),t.rebaseProjectionTarget(!1,t.prevViewportBox))}function Uo(t,n){return{min:n.min-t.min,max:n.max-t.min}}function Io(t,n){return{x:Uo(t.x,n.x),y:Uo(t.y,n.y)}}function Ho(t,n){var e=t.getLayoutId(),r=n.getLayoutId();return e!==r||void 0===r&&t!==n}function Xo(t){var n=t.getProps(),e=n.drag,r=n._dragX;return e&&!r}function Yo(t,n){t.min=n.min,t.max=n.max}function zo(t,n,e){return e+n*(t-e)}function No(t,n,e,r,o){return void 0!==o&&(t=zo(t,o,r)),zo(t,e,r)+n}function Wo(t,n,e,r,o){void 0===n&&(n=0),void 0===e&&(e=1),t.min=No(t.min,n,e,r,o),t.max=No(t.max,n,e,r,o)}function _o(t,n){var e=n.x,r=n.y;Wo(t.x,e.translate,e.scale,e.originPoint),Wo(t.y,r.translate,r.scale,r.originPoint)}function Zo(t,n,e,r){var o=a(r,3),i=o[0],u=o[1],s=o[2];t.min=n.min,t.max=n.max;var c=void 0!==e[s]?e[s]:.5,f=Qn(n.min,n.max,c);Wo(t,e[i],e[u],f,e.scale)}var qo=["x","scaleX","originX"],$o=["y","scaleY","originY"];function Go(t,n,e){Zo(t.x,n.x,e,qo),Zo(t.y,n.y,e,$o)}function Ko(t,n,e,r,o){return t=zo(t-=n,1/e,r),void 0!==o&&(t=zo(t,1/o,r)),t}function Jo(t,n,e){var r=a(e,3),o=r[0],i=r[1],u=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=Qn(t.min,t.max,r)-n;t.min=Ko(t.min,n,e,i,o),t.max=Ko(t.max,n,e,i,o)}(t,n[o],n[i],n[u],n.scale)}function Qo(t,n){Jo(t.x,n,qo),Jo(t.y,n,$o)}var ti=new Set;function ni(t,n,e){t[e]||(t[e]=[]),t[e].push(n)}function ei(t){return ti.add(t),function(){return ti.delete(t)}}function ri(){if(ti.size){var t=0,n=[[]],e=[],r=function(e){return ni(n,e,t)},o=function(n){ni(e,n,t),t++};ti.forEach((function(n){n(r,o),t=0})),ti.clear();for(var i=e.length,a=0;a<=i;a++)n[a]&&n[a].forEach(ii),e[a]&&e[a].forEach(ii)}}var oi,ii=function(t){return t()},ai=new WeakMap,ui=function(){function t(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max: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(),ai.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,s=r.cursorProgress,c=this.props.transformPagePoint;this.panSession=new ao(t,{onSessionStart:function(t){var n;e.stopMotion();var r=function(t){return Cn(t,"client")}(t).point;null===(n=e.cancelLayout)||void 0===n||n.call(e),e.cancelLayout=ei((function(t,n){var o=jo(e.visualElement),c=function(t){var n=[],e=function(t){Do(t)&&n.push(t),t.children.forEach(e)};return t.children.forEach(e),n.sort(Oo)}(e.visualElement),f=u(u([],a(o)),a(c)),l=!1;e.isLayoutDrag()&&e.visualElement.lockProjectionTarget(),n((function(){f.forEach((function(t){return t.resetTransform()}))})),t((function(){Bo(e.visualElement),c.forEach(Bo)})),n((function(){f.forEach((function(t){return t.restoreTransform()})),i&&(l=e.snapToCursor(r))})),t((function(){Boolean(e.getAxisMotionValue("x")&&!e.isExternalDrag())||e.visualElement.rebaseProjectionTarget(!0,e.visualElement.measureViewportBox(!1)),e.visualElement.scheduleUpdateLayoutProjection();var t=e.visualElement.projection;xo((function(n){if(!l){var o=t.target[n],i=o.min,a=o.max;e.cursorProgress[n]=s?s[n]:Jn(i,a,r[n])}var u=e.getAxisMotionValue(n);u&&(e.originPoint[n]=u.get())}))})),n((function(){We.update(),We.preRender(),We.render(),We.postRender()})),t((function(){return e.resolveDragConstraints()}))}))},onStart:function(t,n){var r,o,i,a=e.props,u=a.drag,s=a.dragPropagation;(!u||s||(e.openGlobalLock&&e.openGlobalLock(),e.openGlobalLock=Fn(u),e.openGlobalLock))&&(ri(),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(hn.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",n.point,f),e.updateAxis("y",n.point,f),null===(a=(i=e.props).onDrag)||void 0===a||a.call(i,t,n),oi=t}},onSessionEnd:function(t,n){return e.stop(t,n)}},{transformPagePoint:c})},t.prototype.resolveDragConstraints=function(){var t=this,n=this.props,e=n.dragConstraints,r=n.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!e&&(M(e)?this.resolveRefConstraints(o,e):function(t,n){var e=n.top,r=n.left,o=n.bottom,i=n.right;return{x:Eo(t.x,r,i),y:Eo(t.y,e,o)}}(o,e)),this.elastic=function(t){return!1===t?t=0:!0===t&&(t=.35),{x:wo(t,"left","right"),y:wo(t,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&xo((function(n){t.getAxisMotionValue(n)&&(t.constraints[n]=function(t,n){var e={};return void 0!==n.min&&(e.min=n.min-t.min),void 0!==n.max&&(e.max=n.max-t.min),e}(o[n],t.constraints[n]))}))},t.prototype.resolveRefConstraints=function(t,n){var e=this.props,r=e.onMeasureDragConstraints,o=e.transformPagePoint,i=n.current;this.constraintsBox=So(i,o);var a=function(t,n){return{x:Po(t.x,n.x),y:Po(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=mo(u))}return a},t.prototype.cancelDrag=function(){var t,n;this.visualElement.unlockProjectionTarget(),null===(t=this.cancelLayout)||void 0===t||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(hn.Drag,!1)},t.prototype.stop=function(t,n){var e,r,o;null===(e=this.panSession)||void 0===e||e.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=n.velocity;this.animateDragEnd(a),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,t,n)}},t.prototype.snapToCursor=function(t){var n=this;return xo((function(e){if(si(e,n.props.drag,n.currentDirection)){var r=n.getAxisMotionValue(e);if(!r)return n.cursorProgress[e]=.5,!0;var o=n.visualElement.getLayoutState().layout,i=o[e].max-o[e].min,a=o[e].min+i/2,u=t[e]-a;n.originPoint[e]=t[e],r.set(u)}})).includes(!0)},t.prototype.updateAxis=function(t,n,e){if(si(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.originPoint[t]+n[t],o=this.constraints?bo(r,this.constraints[t],this.elastic[t]):r;e.set(o)}},t.prototype.updateVisualElementAxis=function(t,n){var e,r=this.visualElement.getLayoutState().layout[t],o=r.max-r.min,i=this.cursorProgress[t],a=function(t,n,e,r,o){var i=t-n*e;return r?bo(i,r,o):i}(n[t],o,i,null===(e=this.constraints)||void 0===e?void 0:e[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,a,a+o)},t.prototype.setProps=function(t){var n=t.drag,e=void 0!==n&&n,r=t.dragDirectionLock,a=void 0!==r&&r,u=t.dragPropagation,s=void 0!==u&&u,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=i(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=o({drag:e,dragDirectionLock:a,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.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},t.prototype.isExternalDrag=function(){var t=this.props,n=t._dragX,e=t._dragY;return n||e},t.prototype.animateDragEnd=function(t){var n=this,e=this.props,r=e.drag,i=e.dragMomentum,a=e.dragElastic,u=e.dragTransition,s=function(t,n){void 0===n&&(n=!0);var e,r=t.getProjectionParent();return!!r&&(n?Qo(e=Io(r.projection.target,t.projection.target),r.getLatestValues()):e=Io(r.getLayoutState().layout,t.getLayoutState().layout),xo((function(n){return t.setProjectionTargetAxis(n,e[n].min,e[n].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(s&&Object.keys(c).length&&this.isLayoutDrag()){var f=this.visualElement.getProjectionParent();if(f){var l=Io(f.projection.targetFinal,c);xo((function(t){var n=l[t],e=n.min,r=n.max;c[t]={min:isNaN(e)?void 0:e,max:isNaN(r)?void 0:r}}))}}var d=xo((function(e){var f;if(si(e,r,n.currentDirection)){var l=null!==(f=null==c?void 0:c[e])&&void 0!==f?f:{},d=a?200:1e6,v=a?40:1e7,p=o(o({type:"inertia",velocity:i?t[e]:0,bounceStiffness:d,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10},u),l);return n.getAxisMotionValue(e)?n.startAxisValueAnimation(e,p):n.visualElement.startLayoutAnimation(e,p,s)}}));return Promise.all(d).then((function(){var t,e;null===(e=(t=n.props).onDragTransitionEnd)||void 0===e||e.call(t)}))},t.prototype.stopMotion=function(){var t=this;xo((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),kr(t,e,0,n)}},t.prototype.scalePoint=function(){var t=this,n=this.props,e=n.drag;if(M(n.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};xo((function(n){r[n]=Vo(t.visualElement.projection.target[n],t.constraintsBox[n])})),this.updateConstraints((function(){xo((function(n){if(si(n,e,null)){var o=function(t,n,e){var r=t.max-t.min,o=Qn(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)}}))})),setTimeout(ri,1)}},t.prototype.updateConstraints=function(t){var n=this;this.cancelLayout=ei((function(e,r){var o=jo(n.visualElement);r((function(){return o.forEach((function(t){return t.resetTransform()}))})),e((function(){return Bo(n.visualElement)})),r((function(){return o.forEach((function(t){return t.restoreTransform()}))})),e((function(){n.resolveDragConstraints()})),t&&r(t)}))},t.prototype.mount=function(t){var n=this,e=kn(t.getInstance(),"pointerdown",(function(t){var e=n.props,r=e.drag,o=e.dragListener;r&&(void 0===o||o)&&n.start(t)})),r=bn(window,"resize",(function(){n.scalePoint()})),o=t.onLayoutUpdate((function(){n.isDragging&&n.resolveDragConstraints()})),i=t.prevDragCursor;return i&&this.start(oi,{cursorProgress:i}),function(){null==e||e(),null==r||r(),null==o||o(),n.cancelDrag()}},t}();function si(t,n,e){return!(!0!==n&&n!==t||null!==e&&e!==t)}var ci,fi,li,di,vi={pan:lr((function(n){var e=n.onPan,r=n.onPanStart,o=n.onPanEnd,i=n.onPanSessionStart,a=n.visualElement,u=e||r||o||i,s=t.exports.useRef(null),c=t.exports.useContext(p).transformPagePoint,f={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,n){s.current=null,o&&o(t,n)}};t.exports.useEffect((function(){null!==s.current&&s.current.updateHandlers(f)})),On(a,"pointerdown",u&&function(t){s.current=new ao(t,f,{transformPagePoint:c})}),Xn((function(){return s.current&&s.current.end()}))})),drag:lr((function(n){var e=n.dragControls,r=n.visualElement,i=t.exports.useContext(p).transformPagePoint,a=g((function(){return new ui({visualElement:r})}));a.setProps(o(o({},n),{transformPagePoint:i})),t.exports.useEffect((function(){return e&&e.subscribe(a)}),[a]),t.exports.useEffect((function(){return a.mount(r)}),[])}))};function pi(t){return"string"==typeof t&&t.startsWith("var(--")}(fi=ci||(ci={}))[fi.Entering=0]="Entering",fi[fi.Present=1]="Present",fi[fi.Exiting=2]="Exiting",(di=li||(li={}))[di.Hide=0]="Hide",di[di.Show=1]="Show";var mi=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function hi(t,n,e){var r=a(function(t){var n=mi.exec(t);if(!n)return[,];var e=a(n,3);return[e[1],e[2]]}(t),2),o=r[0],i=r[1];if(o){var u=window.getComputedStyle(n).getPropertyValue(o);return u?u.trim():pi(i)?hi(i,n):i}}function yi(t,n){return t/(n.max-n.min)*100}var gi={process:function(t,n,e){var r=e.target;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return yi(t,r.x)+"% "+yi(t,r.y)+"%"}},xi={borderRadius:o(o({},gi),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:gi,borderTopRightRadius:gi,borderBottomLeftRadius:gi,borderBottomRightRadius:gi,boxShadow:{process:function(t,n){var e=n.delta,r=n.treeScale,o=t,i=t.includes("var("),a=[];i&&(t=t.replace(mi,(function(t){return a.push(t),"_$css"})));var u=Rt.parse(t);if(u.length>5)return o;var s=Rt.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=Qn(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}}},bi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},n.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},n.isAnimating={x:!1,y:!1},n.stopAxisAnimation={x:void 0,y:void 0},n.isAnimatingTree=!1,n.animate=function(t,e,r){void 0===r&&(r={});var a=r.originBox,u=r.targetBox,s=r.visibilityAction,c=r.shouldStackAnimate,f=r.onComplete,l=r.prevParent,d=i(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),v=n.props,p=v.visualElement,m=v.layout;if(!1===c)return n.isAnimatingTree=!1,n.safeToRemove();if(!n.isAnimatingTree||!0===c){c&&(n.isAnimatingTree=!0),e=a||e,t=u||t;var h=!1,y=p.getProjectionParent();if(y){var g=y.prevViewportBox,x=y.getLayoutState().layout;l&&(u&&(x=l.getLayoutState().layout),a&&!Ho(l,y)&&l.prevViewportBox&&(g=l.prevViewportBox)),g&&Ti(l,a,u)&&(h=!0,e=Io(g,e),t=Io(x,t))}var b=Ei(e,t),E=xo((function(r){var i,a;if("position"===m){var u=t[r].max-t[r].min;e[r].max=e[r].min+u}if(!p.projection.isTargetLocked)return void 0===s?b?n.animateAxis(r,t[r],e[r],o(o({},d),{isRelative:h})):(null===(a=(i=n.stopAxisAnimation)[r])||void 0===a||a.call(i),p.setProjectionTargetAxis(r,t[r].min,t[r].max,h)):void p.setVisibility(s===li.Show)}));return p.syncRender(),Promise.all(E).then((function(){n.isAnimatingTree=!1,f&&f(),p.notifyLayoutAnimationComplete()}))}},n}return r(n,t),n.prototype.componentDidMount=function(){var t=this,n=this.props.visualElement;n.animateMotionValue=kr,n.enableLayoutProjection(),this.unsubLayoutReady=n.onLayoutUpdate(this.animate),n.layoutSafeToRemove=function(){return t.safeToRemove()},z(xi)},n.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),xo((function(n){var e,r;return null===(r=(e=t.stopAxisAnimation)[n])||void 0===r?void 0:r.call(e)}))},n.prototype.animateAxis=function(t,n,e,r){var o,i,a=this,u=void 0===r?{}:r,s=u.transition,c=u.isRelative;if(!this.isAnimating[t]||!Ai(n,this.currentAnimationTarget[t])){null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o),this.isAnimating[t]=!0;var f=this.props.visualElement,l=this.frameTarget[t],d=f.getProjectionAnimationProgress()[t];d.clearListeners(),d.set(0),d.set(0);var v=function(){var r=d.get()/1e3;!function(t,n,e,r){t.min=Qn(n.min,e.min,r),t.max=Qn(n.max,e.max,r)}(l,e,n,r),f.setProjectionTargetAxis(t,l.min,l.max,c)};v();var p=d.onChange(v);this.stopAxisAnimation[t]=function(){a.isAnimating[t]=!1,d.stop(),p()},this.currentAnimationTarget[t]=n;var m=s||f.getDefaultTransition()||Si;return kr("x"===t?"layoutX":"layoutY",d,1e3,m&&Rr(m,"layout")).then(this.stopAxisAnimation[t])}},n.prototype.safeToRemove=function(){var t,n;null===(n=(t=this.props).safeToRemove)||void 0===n||n.call(t)},n.prototype.render=function(){return null},n}(t.exports.Component);function Ei(t,n){return!(wi(t)||wi(n)||Ai(t.x,n.x)&&Ai(t.y,n.y))}var Pi={min:0,max:0};function wi(t){return Ai(t.x,Pi)&&Ai(t.y,Pi)}function Ai(t,n){return t.min===n.min&&t.max===n.max}var Si={duration:.45,ease:[.4,0,.1,1]};function Ti(t,n,e){return t||!t&&!(n||e)}var Ci={layoutReady:function(t){return t.notifyLayoutReady()}};function Vi(){var t=new Set;return{add:function(n){return t.add(n)},flush:function(n){var e=void 0===n?Ci:n,r=e.layoutReady,o=e.parent;ei((function(n,e){var i=Array.from(t).sort(Oo),s=o?jo(o):[];e((function(){u(u([],a(s)),a(i)).forEach((function(t){return t.resetTransform()}))})),n((function(){i.forEach(Bo)})),e((function(){s.forEach((function(t){return t.restoreTransform()})),i.forEach(r)})),n((function(){i.forEach((function(t){t.isPresent&&(t.presence=ci.Present)}))})),e((function(){We.preRender(),We.render()})),n((function(){ze.postRender((function(){return i.forEach(Mi)})),t.clear()}))})),ri()}}}function Mi(t){t.prevViewportBox=t.projection.target}var Li=t.exports.createContext(Vi()),Ri=t.exports.createContext(Vi());function ki(t){return!!t.forceUpdate}var Oi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.syncLayout,e=t.framerSyncLayout,r=t.visualElement;ki(n)&&n.register(r),ki(e)&&e.register(r),r.onUnmount((function(){ki(n)&&n.remove(r),ki(e)&&e.remove(r)}))},n.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,n=t.syncLayout,e=t.visualElement;return ki(n)?n.syncUpdate():(Fo(e),n.add(e)),null},n.prototype.componentDidUpdate=function(){var t=this.props.syncLayout;ki(t)||t.flush()},n.prototype.render=function(){return null},n}(n.Component);var Di={measureLayout:function(e){var r=t.exports.useContext(Li),i=t.exports.useContext(Ri);return n.createElement(Oi,o({},e,{syncLayout:r,framerSyncLayout:i}))},layoutAnimation:function(n){var e=a(x(),2)[1];return t.exports.createElement(bi,o({},n,{safeToRemove:e}))}};function ji(){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:go(),deltaFinal:go(),deltaTransform:""}}var Bi=ji();function Fi(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!==Ii?i:""}function Ui(t){var n=t.deltaFinal;return 100*n.x.origin+"% "+100*n.y.origin+"% 0"}var Ii=Fi(Bi.delta,Bi.treeScale,{x:1,y:1}),Hi=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function Xi(t,n,e,r){var o,i,a=t.delta,u=t.layout,s=t.layoutCorrected,c=t.treeScale,f=n.target;i=u,Yo((o=s).x,i.x),Yo(o.y,i.y),function(t,n,e){var r=e.length;if(r){var o,i;n.x=n.y=1;for(var a=0;a<r;a++)i=(o=e[a]).getLayoutState().delta,n.x*=i.x.scale,n.y*=i.y.scale,_o(t,i),Xo(o)&&Go(t,t,o.getLatestValues())}}(s,c,e),Lo(a,s,f,r)}var Yi=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Or(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){Dr(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Oo),this.isDirty=!1,this.children.forEach(t)},t}();var zi=function(t){var n=t.treeType,e=void 0===n?"":n,r=t.build,i=t.getBaseTarget,s=t.makeTargetAnimatable,c=t.measureViewportBox,f=t.render,l=t.readValueFromInstance,d=t.resetTransform,v=t.restoreTransform,p=t.removeValueFromRenderState,m=t.sortNodePosition,h=t.scrapeMotionValuesFromProps;return function(t,n){var y=t.parent,g=t.props,x=t.presenceId,b=t.blockInitialAnimation,E=t.visualState;void 0===n&&(n={});var P,w,A,S,T,C,V=E.latestValues,M=E.renderState,L=function(){var t=Hi.map((function(){return new jr})),n={},e={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return Hi.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"+Hi[n]]=function(n){return t.add(n)},e["notify"+Hi[n]]=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.notify.apply(t,u([],a(n)))}})),e}(),k={isEnabled:!1,isHydrated:!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}}},O=k,B=V,F=ji(),U=!1,I=new Map,H=new Map,X={},Y=o({},V);function z(){P&&(Q.isProjectionReady()&&(Go(O.targetFinal,O.target,B),Lo(F.deltaFinal,F.layoutCorrected,O.targetFinal,V)),N(),f(P,M))}function N(){var t=V;if(S&&S.isActive()){var e=S.getCrossfadeState(Q);e&&(t=e)}r(Q,M,t,O,F,n,g)}function W(){L.notifyUpdate(V)}function _(){Q.layoutTree.forEach(Wi)}var Z=h(g);for(var q in Z){var $=Z[q];void 0!==V[q]&&J($)&&$.set(V[q],!1)}var G=D(g),K=j(g),Q=o(o({treeType:e,current:null,depth:y?y.depth+1:0,parent:y,children:new Set,path:y?u(u([],a(y.path)),[y]):[],layoutTree:y?y.layoutTree:new Yi,presenceId:x,projection:k,variantChildren:K?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==y?void 0:y.isMounted()),blockInitialAnimation:b,isMounted:function(){return Boolean(P)},mount:function(t){P=Q.current=t,Q.pointTo(Q),K&&y&&!G&&(C=null==y?void 0:y.addVariantChild(Q)),null==y||y.children.add(Q)},unmount:function(){Ne.update(W),Ne.render(z),Ne.preRender(Q.updateLayoutProjection),H.forEach((function(t){return t()})),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),null==C||C(),null==y||y.children.delete(Q),null==A||A(),L.clearAllListeners()},addVariantChild:function(t){var n,e=Q.getClosestVariantNode();if(e)return null===(n=e.variantChildren)||void 0===n||n.add(t),function(){return e.variantChildren.delete(t)}},sortNodePosition:function(t){return m&&e===t.treeType?m(Q.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return K?Q:null==y?void 0:y.getClosestVariantNode()},scheduleUpdateLayoutProjection:y?y.scheduleUpdateLayoutProjection:function(){return ze.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return g.layoutId},getInstance:function(){return P},getStaticValue:function(t){return V[t]},setStaticValue:function(t,n){return V[t]=n},getLatestValues:function(){return V},setVisibility:function(t){Q.isVisible!==t&&(Q.isVisible=t,Q.scheduleRender())},makeTargetAnimatable:function(t,n){return void 0===n&&(n=!0),s(Q,t,g,n)},addValue:function(t,n){Q.hasValue(t)&&Q.removeValue(t),I.set(t,n),V[t]=n.get(),function(t,n){var e=n.onChange((function(n){V[t]=n,g.onUpdate&&ze.update(W,!1,!0)})),r=n.onRenderRequest(Q.scheduleRender);H.set(t,(function(){e(),r()}))}(t,n)},removeValue:function(t){var n;I.delete(t),null===(n=H.get(t))||void 0===n||n(),H.delete(t),delete V[t],p(t,M)},hasValue:function(t){return I.has(t)},getValue:function(t,n){var e=I.get(t);return void 0===e&&void 0!==n&&(e=Fr(n),Q.addValue(t,e)),e},forEachValue:function(t){return I.forEach(t)},readValue:function(t){var e;return null!==(e=V[t])&&void 0!==e?e:l(P,t,n)},setBaseTarget:function(t,n){Y[t]=n},getBaseTarget:function(t){if(i){var n=i(g,t);if(void 0!==n&&!J(n))return n}return Y[t]}},L),{build:function(){return N(),M},scheduleRender:function(){ze.render(z,!1,!0)},syncRender:z,setProps:function(t){g=t,L.updatePropListeners(t),X=function(t,n,e){var r;for(var o in n){var i=n[o],a=e[o];if(J(i))t.addValue(o,i);else if(J(a))t.addValue(o,Fr(i));else if(a!==i)if(t.hasValue(o)){var u=t.getValue(o);!u.hasAnimated&&u.set(i)}else t.addValue(o,Fr(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in e)void 0===n[o]&&t.removeValue(o);return n}(Q,h(g),X)},getProps:function(){return g},getVariant:function(t){var n;return null===(n=g.variants)||void 0===n?void 0:n[t]},getDefaultTransition:function(){return g.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==y?void 0:y.getVariantContext();if(!G){var n=(null==y?void 0:y.getVariantContext())||{};return void 0!==g.initial&&(n.initial=g.initial),n}for(var e={},r=0;r<$i;r++){var o=qi[r],i=g[o];(R(i)||!1===i)&&(e[o]=i)}return e},enableLayoutProjection:function(){k.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){k.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),k.isTargetLocked=!1},getLayoutState:function(){return F},setCrossfader:function(t){S=t},isProjectionReady:function(){return k.isEnabled&&k.isHydrated&&F.isHydrated},startLayoutAnimation:function(t,n,e){void 0===e&&(e=!1);var r=Q.getProjectionAnimationProgress()[t],o=e?k.relativeTarget[t]:k.target[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(n){Q.setProjectionTargetAxis(t,n,n+a,e)})),Q.animateMotionValue(t,r,0,n)},stopLayoutAnimation:function(){xo((function(t){return Q.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var e=c(P,n);return t||Qo(e,V),e},getProjectionAnimationProgress:function(){return T||(T={x:Fr(0),y:Fr(0)}),T},setProjectionTargetAxis:function(t,n,e,r){var o;void 0===r&&(r=!1),r?(k.relativeTarget||(k.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=k.relativeTarget[t]):(k.relativeTarget=void 0,o=k.target[t]),k.isHydrated=!0,o.min=n,o.max=e,U=!0,L.notifySetAxisTarget()},rebaseProjectionTarget:function(t,n){void 0===n&&(n=F.layout);var e=Q.getProjectionAnimationProgress(),r=e.x,o=e.y,i=!(k.relativeTarget||k.isTargetLocked||r.isAnimating()||o.isAnimating());(t||i)&&xo((function(t){var e=n[t],r=e.min,o=e.max;Q.setProjectionTargetAxis(t,r,o)}))},notifyLayoutReady:function(t){!function(t){var n=t.getProjectionParent();if(n){var e=Io(n.getLayoutState().layout,t.getLayoutState().layout);xo((function(n){t.setProjectionTargetAxis(n,e[n].min,e[n].max,!0)}))}else t.rebaseProjectionTarget()}(Q),Q.notifyLayoutUpdate(F.layout,Q.prevViewportBox||F.layout,t)},resetTransform:function(){return d(Q,P,g)},restoreTransform:function(){return v(P,M)},updateLayoutProjection:function(){if(Q.isProjectionReady()){var t=F.delta,n=F.treeScale,e=n.x,r=n.y,o=F.deltaTransform;Xi(F,O,Q.path,V),U&&Q.notifyViewportBoxUpdate(O.target,t),U=!1;var i=Fi(t,n);i===o&&e===n.x&&r===n.y||Q.scheduleRender(),F.deltaTransform=i}},updateTreeLayoutProjection:function(){Q.layoutTree.forEach(Ni),ze.preRender(_,!1,!0)},getProjectionParent:function(){if(void 0===w){for(var t=!1,n=Q.path.length-1;n>=0;n--){var e=Q.path[n];if(e.projection.isEnabled){t=e;break}}w=t}return w},resolveRelativeTargetBox:function(){var t=Q.getProjectionParent();if(k.relativeTarget&&t&&(function(t,n){ko(t.target.x,t.relativeTarget.x,n.target.x),ko(t.target.y,t.relativeTarget.y,n.target.y)}(k,t.projection),Xo(t))){var n=k.target;Go(n,n,t.getLatestValues())}},shouldResetTransform:function(){return Boolean(g._layoutResetTransform)},pointTo:function(t){O=t.projection,B=t.getLatestValues(),null==A||A(),A=ae(t.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;Q.isPresent?Q.presence=ci.Present:null===(t=Q.layoutSafeToRemove)||void 0===t||t.call(Q)})))},isPresent:!0,presence:ci.Entering});return Q}};function Ni(t){t.resolveRelativeTargetBox()}function Wi(t){t.updateLayoutProjection()}var _i,Zi,qi=u(["initial"],a(to)),$i=qi.length,Gi=new Set(["width","height","top","left","right","bottom","x","y"]),Ki=function(t){return Gi.has(t)},Ji=function(t,n){t.set(n,!1),t.set(n)},Qi=function(t){return t===ct||t===mt};(Zi=_i||(_i={})).width="width",Zi.height="height",Zi.left="left",Zi.right="right",Zi.top="top",Zi.bottom="bottom";var ta=function(t,n){return parseFloat(t.split(", ")[n])},na=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 ta(i[1],n);var a=o.match(/^matrix\((.+)\)$/);return a?ta(a[1],t):0}},ea=new Set(["x","y","z"]),ra=W.filter((function(t){return!ea.has(t)}));var oa={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:na(4,13),y:na(5,14)},ia=function(t,n,e,r){void 0===e&&(e={}),void 0===r&&(r={}),n=o({},n),r=o({},r);var i=Object.keys(n).filter(Ki),u=[],s=!1,c=[];if(i.forEach((function(o){var i=t.getValue(o);if(t.hasValue(o)){var a,f=e[o],l=n[o],d=Hr(f);if(fn(l))for(var v=l.length,p=null===l[0]?1:0;p<v;p++)a?Hr(l[p]):a=Hr(l[p]);else a=Hr(l);if(d!==a)if(Qi(d)&&Qi(a)){var m=i.get();"string"==typeof m&&i.set(parseFloat(m)),"string"==typeof l?n[o]=parseFloat(l):Array.isArray(l)&&a===mt&&(n[o]=l.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==a?void 0:a.transform)&&(0===f||0===l)?0===f?i.set(a.transform(f)):n[o]=d.transform(l):(s||(u=function(t){var n=[];return ra.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),s=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:n[o],Ji(i,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);Ji(o,oa[e](r,u)),t[e]=oa[e](s,i)})),t}(n,t,c);return u.length&&u.forEach((function(n){var e=a(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 aa(t,n,e,r){return function(t){return Object.keys(t).some(Ki)}(n)?ia(t,n,e,r):{target:n,transitionEnd:r}}var ua=function(t,n,e,r){var a=function(t,n,e){var r,a=i(n,[]),u=t.getInstance();if(!(u instanceof HTMLElement))return{target:a,transitionEnd:e};for(var s in e&&(e=o({},e)),t.forEachValue((function(t){var n=t.get();if(pi(n)){var e=hi(n,u);e&&t.set(e)}})),a){var c=a[s];if(pi(c)){var f=hi(c,u);f&&(a[s]=f,e&&(null!==(r=e[s])&&void 0!==r||(e[s]=c)))}}return{target:a,transitionEnd:e}}(t,n,r);return aa(t,n=a.target,e,r=a.transitionEnd)};var sa={treeType:"dom",readValueFromInstance:function(t,n){if(q(n)){var e=Ar(n);return e&&e.default||0}var r,o=(r=t,window.getComputedStyle(r));return(tt(n)?o.getPropertyValue(n):o[n])||0},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 So(t,n.transformPagePoint)},resetTransform:function(t,n,e){var r=e.transformTemplate;n.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,n){t.style.transform=n.style.transform},removeValueFromRenderState:function(t,n){var e=n.vars,r=n.style;delete e[t],delete r[t]},makeTargetAnimatable:function(t,n,e,r){var a=e.transformValues;void 0===r&&(r=!0);var u=n.transition,s=n.transitionEnd,c=i(n,["transition","transitionEnd"]),f=qr(c,u||{},t);if(a&&(s&&(s=a(s)),c&&(c=a(c)),f&&(f=a(f))),r){_r(t,c,f);var l=ua(t,c,f,s);s=l.transitionEnd,c=l.target}return o({transition:u,transitionEnd:s},c)},scrapeMotionValuesFromProps:un,build:function(t,n,e,r,o,i,a){void 0!==t.isVisible&&(n.style.visibility=t.isVisible?"visible":"hidden");var u=r.isEnabled&&o.isHydrated;Ut(n,e,r,o,i,a.transformTemplate,u?Fi:void 0,u?Ui:void 0)},render:rn},ca=zi(sa),fa=zi(o(o({},sa),{getBaseTarget:function(t,n){return t[n]},readValueFromInstance:function(t,n){var e;return q(n)?(null===(e=Ar(n))||void 0===e?void 0:e.default)||0:(n=on.has(n)?n:en(n),t.getAttribute(n))},scrapeMotionValuesFromProps:sn,build:function(t,n,e,r,o,i,a){var u=r.isEnabled&&o.isHydrated;Kt(n,e,r,o,i,a.transformTemplate,u?Fi:void 0,u?Ui:void 0)},render:an})),la=function(t,n){return X(t)?fa(n,{enableHardwareAcceleration:!1}):ca(n,{enableHardwareAcceleration:!0})},da=o(o(o(o({},io),dr),vi),Di),va=I((function(t,n){return xn(t,n,da,la)}));function pa(t){return U(xn(t,{forwardMotionProps:!1},da,la))}var ma=I(xn);var ha=0;function ya(){var t=ha;return ha++,t}var ga=function(n){var e=n.children,r=n.initial,o=n.isPresent,i=n.onExitComplete,a=n.custom,u=n.presenceAffectsLayout,s=g(xa),c=g(ya),f=t.exports.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 t.exports.useMemo((function(){s.forEach((function(t,n){return s.set(n,!1)}))}),[o]),t.exports.useEffect((function(){!o&&!s.size&&(null==i||i())}),[o]),t.exports.createElement(y.Provider,{value:f},e)};function xa(){return new Map}function ba(t){return t.key||""}var Ea=function(n){var e=n.children,r=n.custom,o=n.initial,i=void 0===o||o,s=n.onExitComplete,c=n.exitBeforeEnter,f=n.presenceAffectsLayout,l=void 0===f||f,d=function(){var n=t.exports.useRef(!1),e=a(t.exports.useState(0),2),r=e[0],o=e[1];return Xn((function(){return n.current=!0})),t.exports.useCallback((function(){!n.current&&o(r+1)}),[r])}(),v=t.exports.useContext(Li);ki(v)&&(d=v.forceUpdate);var p=t.exports.useRef(!0),m=function(n){var e=[];return t.exports.Children.forEach(n,(function(n){t.exports.isValidElement(n)&&e.push(n)})),e}(e),h=t.exports.useRef(m),y=t.exports.useRef(new Map).current,g=t.exports.useRef(new Set).current;if(function(t,n){t.forEach((function(t){var e=ba(t);n.set(e,t)}))}(m,y),p.current)return p.current=!1,t.exports.createElement(t.exports.Fragment,null,m.map((function(n){return t.exports.createElement(ga,{key:ba(n),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l},n)})));for(var x=u([],a(m)),b=h.current.map(ba),E=m.map(ba),P=b.length,w=0;w<P;w++){var A=b[w];-1===E.indexOf(A)?g.add(A):g.delete(A)}return c&&g.size&&(x=[]),g.forEach((function(n){if(-1===E.indexOf(n)){var e=y.get(n);if(e){var o=b.indexOf(n);x.splice(o,0,t.exports.createElement(ga,{key:ba(e),isPresent:!1,onExitComplete:function(){y.delete(n),g.delete(n);var t=h.current.findIndex((function(t){return t.key===n}));h.current.splice(t,1),g.size||(h.current=m,d(),s&&s())},custom:r,presenceAffectsLayout:l},e))}}})),x=x.map((function(n){var e=n.key;return g.has(e)?n:t.exports.createElement(ga,{key:ba(n),isPresent:!0,presenceAffectsLayout:l},n)})),h.current=x,t.exports.createElement(t.exports.Fragment,null,g.size?x:x.map((function(n){return t.exports.cloneElement(n)})))};function Pa(t,n,e){void 0===e&&(e={});var r=J(t)?t:Fr(t);return kr("",r,n,e),{stop:function(){return r.stop()}}}function wa(){var t=Fr(1),n={lead:void 0,follow:void 0,crossfadeOpacity:!1,preserveFollowOpacity:!1},e=o({},n),r={},i={},a=!1,u=null,s=0;function c(e,r){var i=n.lead,s=n.follow;a=!0,u=null;var c=!1,f=function(){c=!0,i&&i.scheduleRender(),s&&s.scheduleRender()},l=function(){a=!1,u=$e().timestamp};return r=r&&Rr(r,"crossfade"),Pa(t,e,o(o({},r),{onUpdate:f,onComplete:function(){c?l():(t.set(e),ze.read(l)),f()}}))}function f(){var e,o,a=$e().timestamp,u=n.lead,c=n.follow;if(a!==s&&u){s=a;var f=u.getLatestValues();Object.assign(r,f);var l=c?c.getLatestValues():n.prevValues;Object.assign(i,l);var d=t.get(),v=null!==(e=f.opacity)&&void 0!==e?e:1,p=null!==(o=null==l?void 0:l.opacity)&&void 0!==o?o:1;n.crossfadeOpacity&&c?(r.opacity=Qn(!1!==c.isVisible?0:p,v,Aa(d)),i.opacity=n.preserveFollowOpacity?p:Qn(p,0,Sa(d))):c||(r.opacity=Qn(p,v,d)),function(t,n,e,r,o,i){for(var a=0;a<Va;a++){var u="border"+Ca[a]+"Radius",s=Ma(r,u),c=Ma(e,u);if((void 0!==s||void 0!==c)&&(s||(s=0),c||(c=0),"number"==typeof s&&"number"==typeof c)){var f=Math.max(Qn(s,c,i),0);t[u]=n[u]=f}}if(r.rotate||e.rotate){var l=Qn(r.rotate||0,e.rotate||0,i);t.rotate=n.rotate=l}!o&&e.backgroundColor&&r.backgroundColor&&(t.backgroundColor=n.backgroundColor=re(r.backgroundColor,e.backgroundColor)(i))}(r,i,f,l||{},Boolean(c),d)}}return{isActive:function(){return r&&(a||$e().timestamp===u)},fromLead:function(t){return c(0,t)},toLead:function(r){var o=0;return n.prevValues||n.follow?e.lead===n.follow&&e.follow===n.lead&&(o=1-t.get()):o=1,t.set(o),c(1,r)},reset:function(){return t.set(1)},stop:function(){return t.stop()},getCrossfadeState:function(t){return f(),t===n.lead?r:t===n.follow?i:void 0},setOptions:function(t){e=n,n=t,r={},i={}},getLatestValues:function(){return r}}}var Aa=Ta(0,.5,Ae),Sa=Ta(.5,.95,xe);function Ta(t,n,e){return function(r){return r<t?0:r>n?1:e(Jn(t,n,r))}}var Ca=["TopLeft","TopRight","BottomLeft","BottomRight"],Va=Ca.length;function Ma(t,n){var e;return null!==(e=t[n])&&void 0!==e?e:t.borderRadius}function La(){var t,n,e,r=new Set,i={leadIsExiting:!1},a=o({},i),u=wa(),s=!1;return{add:function(t){t.setCrossfader(u),r.add(t),e&&(t.prevDragCursor=e),i.lead||(i.lead=t)},remove:function(t){r.delete(t)},getLead:function(){return i.lead},updateSnapshot:function(){if(i.lead){t=u.isActive()?u.getLatestValues():i.lead.getLatestValues(),n=i.lead.prevViewportBox;var r=ai.get(i.lead);r&&r.isDragging&&(e=r.cursorProgress)}},clearSnapshot:function(){e=n=void 0},updateLeadAndFollow:function(){var n,e,c;a=o({},i);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}i.lead=e,i.follow=c,i.leadIsExiting=(null===(n=i.lead)||void 0===n?void 0:n.presence)===ci.Exiting,u.setOptions({lead:e,follow:c,prevValues:t,crossfadeOpacity:(null==c?void 0:c.isPresenceRoot)||(null==e?void 0:e.isPresenceRoot)}),i.lead===a.follow||a.lead===i.lead&&a.leadIsExiting===i.leadIsExiting||(s=!0)},animate:function(t,e){var r;if(void 0===e&&(e=!1),t===i.lead){e?t.pointTo(i.lead):t.setVisibility(!0);var o={},a=null===(r=i.follow)||void 0===r?void 0:r.getProjectionParent();if(a&&(o.prevParent=a),t.presence===ci.Entering?o.originBox=i.follow?i.follow.prevViewportBox:n:t.presence===ci.Exiting&&(o.targetBox=function(){var t;return null===(t=i.follow)||void 0===t?void 0:t.getLayoutState().layout}()),s){s=!1;var c=t.getDefaultTransition();t.presence===ci.Entering?u.toLead(c):u.fromLead(c)}t.notifyLayoutReady(o)}else e?i.lead&&t.pointTo(i.lead):t.setVisibility(!1)}}}var Ra=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.children=new Set,t.stacks=new Map,t.hasMounted=!1,t.updateScheduled=!1,t.renderScheduled=!1,t.syncContext=o(o({},Vi()),{syncUpdate:function(n){return t.scheduleUpdate(n)},forceUpdate:function(){t.syncContext=o({},t.syncContext),t.scheduleUpdate(!0)},register:function(n){return t.addChild(n)},remove:function(n){return t.removeChild(n)}}),t}return r(e,n),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!==ci.Entering&&(t.presence=t.presence===ci.Exiting?ci.Entering:ci.Present):t.presence=ci.Exiting})),this.updateStacks();var e={layoutReady:function(e){void 0!==e.getLayoutId()?t.getStack(e).animate(e,"crossfade"===n):e.notifyLayoutReady()},parent:this.context.visualElement};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){!function(t){for(var n=!1,e={},r=0;r<N.length;r++){var o="rotate"+N[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),t.shouldResetTransform()&&t.resetTransform()})),this.children.forEach(Fo),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?ci.Entering:ci.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,La()),this.stacks.get(n)},e.prototype.render=function(){return t.exports.createElement(Li.Provider,{value:this.syncContext},this.props.children)},e.contextType=m,e}(t.exports.Component);function ka(n){var e=n.children,r=i(n,["children"]);(r=o(o({},t.exports.useContext(p)),r)).isStatic=g((function(){return r.isStatic}));var a="object"==typeof r.transition?r.transition.toString():"",u=t.exports.useMemo((function(){return r}),[a,r.transformPagePoint]);return t.exports.createElement(p.Provider,{value:u},e)}function Oa(n){var e=n.children,r=n.features,o=n.strict,u=void 0!==o&&o,s=a(t.exports.useState(!Da(r)),2)[1],c=t.exports.useRef(void 0);if(!Da(r)){var d=r.renderer,v=i(r,["renderer"]);c.current=d,f(v)}return t.exports.useEffect((function(){Da(r)&&r().then((function(t){var n=t.renderer;f(i(t,["renderer"])),c.current=n,s(!0)}))}),[]),t.exports.createElement(l.Provider,{value:{renderer:c.current,strict:u}},e)}function Da(t){return"function"==typeof t}var ja=o(o({renderer:la},io),dr),Ba=o(o(o({},ja),vi),Di);function Fa(n){var e=g((function(){return Fr(n)}));if(t.exports.useContext(p).isStatic){var r=a(t.exports.useState(n),2)[1];t.exports.useEffect((function(){return e.onChange(r)}),[])}return e}function Ua(n,e){t.exports.useEffect((function(){if(J(n))return n.onChange(e)}),[e])}function Ia(n,e){var r=Fa(e()),o=function(){return r.set(e())};return o(),function(n,e){t.exports.useEffect((function(){var t=n.map((function(t){return t.onChange(e)}));return function(){return t.forEach((function(t){return t()}))}}))}(n,(function(){return ze.update(o,!1,!0)})),r}function Ha(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 Ia(n,o)}var Xa=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Ya(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=!Array.isArray(t[0]),r=e?0:-1,i=t[0+r],a=t[1+r],u=t[2+r],s=t[3+r],c=pe(a,u,o({mixer:Xa(u[0])},s));return e?c(i):c}function za(t,n,e,r){var o="function"==typeof n?n:Ya(n,e,r);return Array.isArray(t)?Na(t,o):Na([t],(function(t){var n=a(t,1)[0];return o(n)}))}function Na(t,n){var e=g((function(){return[]}));return Ia(t,(function(){e.length=0;for(var r=t.length,o=0;o<r;o++)e[o]=t[o].get();return n(e)}))}function Wa(n,e){void 0===e&&(e={});var r=t.exports.useContext(p).isStatic,i=t.exports.useRef(null),a=Fa(J(n)?n.get():n);return t.exports.useMemo((function(){return a.attach((function(t,n){return r?n(t):(i.current&&i.current.stop(),i.current=Je(o(o({from:a.get(),to:t,velocity:a.getVelocity()},e),{onUpdate:n})),a.get())}))}),Object.values(e)),Ua(n,(function(t){return a.set(parseFloat(t))})),a}function _a(n){var e=Fa(n.getVelocity());return t.exports.useEffect((function(){return n.velocityUpdateSubscribers.add((function(t){e.set(t)}))}),[n]),e}function Za(){return{scrollX:Fr(0),scrollY:Fr(0),scrollXProgress:Fr(0),scrollYProgress:Fr(0)}}function qa(t,n,e){e.set(t&&n?t/n:0)}function $a(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),qa(r,i,t.scrollXProgress),qa(o,a,t.scrollYProgress)};return e(),e}var Ga;function Ka(t){var n=g(Za);return C((function(){var e=t.current;if(e){var r=$a(n,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(e)),o=bn(e,"scroll",r,{passive:!0}),i=bn(e,"resize",r);return function(){o&&o(),i&&i()}}}),[]),n}function Ja(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var Qa,tu=!1;function nu(){return Ga||(Ga=Za()),C((function(){!tu&&function(){if(tu=!0,"undefined"!=typeof window){var t=$a(Ga,Ja);bn(window,"scroll",t,{passive:!0}),bn(window,"resize",t)}}()}),[]),Ga}function eu(){!Qa&&function(){if(Qa=Fr(null),"undefined"!=typeof window)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),n=function(){return Qa.set(t.matches)};t.addListener(n),n()}else Qa.set(!1)}();var n=a(t.exports.useState(Qa.get()),2),e=n[0],r=n[1];return Ua(Qa,r),e}function ru(){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($r(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)?Wr(t,n):"string"==typeof n?Wr(t,[n]):Nr(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,u([],a(n))).then(e)})),function(){t=!1,r.stop()}}};return r}function ou(){var n=g(ru);return t.exports.useEffect(n.mount,[]),n}function iu(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=t.exports.useRef(0),o=a(t.exports.useState(n[r.current]),2),i=o[0],u=o[1];return[i,function(t){r.current="number"!=typeof t?or(0,n.length,r.current+1):t,u(n[r.current])}]}var au=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(t){void 0===t&&(t=!0),this.componentControls.forEach((function(t){t.updateConstraints()})),t&&ri()},t}(),uu=function(){return new au};function su(){return g(uu)}var cu=function(){return{}},fu=zi({build:function(){},measureViewportBox:ho,resetTransform:function(){},restoreTransform:function(){},removeValueFromRenderState:function(){},render:function(){},scrapeMotionValuesFromProps:cu,readValueFromInstance:function(t,n,e){return e.initialState[n]||0},makeTargetAnimatable:function(t,n){var e=n.transition,r=n.transitionEnd,a=i(n,["transition","transitionEnd"]);return _r(t,a,qr(a,e||{},t)),o({transition:e,transitionEnd:r},a)}}),lu=vn({scrapeMotionValuesFromProps:cu,createRenderState:cu});function du(n){var e=a(t.exports.useState(n),2),r=e[0],i=e[1],u=lu({},!1),s=g((function(){return fu({props:{},visualState:u},{initialState:n})}));return t.exports.useEffect((function(){return s.mount({}),s.unmount()}),[]),t.exports.useEffect((function(){s.setProps({onUpdate:function(t){return i(o({},t))}})})),[r,g((function(){return function(t){return $r(s,t)}}))]}var vu=function(t){return t>.001?1/t:1e5};function pu(t){var n=Fa(1),e=Fa(1),r=h();return t?(n=t.scaleX||n,e=t.scaleY||e):r&&(n=r.getValue("scaleX",1),e=r.getValue("scaleY",1)),{scaleX:za(n,vu),scaleY:za(e,vu)}}export{Ea as AnimatePresence,Ra as AnimateSharedLayout,au as DragControls,Yi as FlatTree,Ri as FramerTreeLayoutContext,S as LayoutGroupContext,Oa as LazyMotion,ka as MotionConfig,p as MotionConfigContext,Br as MotionValue,y as PresenceContext,Li as SharedLayoutContext,li as VisibilityAction,z as addScaleCorrection,Pa as animate,$r as animateVisualElement,ru as animationControls,ei as batchLayout,Vi as createBatcher,wa as createCrossfader,pa as createDomMotionComponent,U as createMotionComponent,ja as domAnimation,Ba as domMax,ri as flushLayout,Nt as isValidMotionProp,ma as m,va as motion,Fr as motionValue,ln as resolveMotionValue,Fo as snapshotViewportBox,Ya as transform,ou as useAnimation,iu as useCycle,du as useDeprecatedAnimatedState,pu as useDeprecatedInvertedScale,En as useDomEvent,su as useDragControls,Ka as useElementScroll,b as useIsPresent,Ha as useMotionTemplate,Fa as useMotionValue,x as usePresence,eu as useReducedMotion,Wa as useSpring,za as useTransform,_a as useVelocity,nu as useViewportScroll,zi as visualElement};
