framer-motion 7.2.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/cjs/index.js +762 -627
  2. package/dist/es/animation/use-animated-state.mjs +3 -5
  3. package/dist/es/animation/utils/default-transitions.mjs +1 -1
  4. package/dist/es/animation/utils/transitions.mjs +28 -26
  5. package/dist/es/components/AnimatePresence/PopChild.mjs +3 -2
  6. package/dist/es/components/AnimatePresence/PresenceChild.mjs +5 -2
  7. package/dist/es/components/AnimatePresence/use-presence.mjs +1 -1
  8. package/dist/es/components/LayoutGroup/index.mjs +4 -5
  9. package/dist/es/components/LazyMotion/index.mjs +3 -5
  10. package/dist/es/components/MotionConfig/index.mjs +2 -4
  11. package/dist/es/components/Reorder/Group.mjs +2 -4
  12. package/dist/es/components/Reorder/Item.mjs +6 -8
  13. package/dist/es/context/MotionContext/utils.mjs +3 -2
  14. package/dist/es/gestures/PanSession.mjs +2 -2
  15. package/dist/es/gestures/drag/VisualElementDragControls.mjs +16 -4
  16. package/dist/es/gestures/use-focus-gesture.mjs +3 -4
  17. package/dist/es/gestures/use-hover-gesture.mjs +4 -3
  18. package/dist/es/gestures/use-tap-gesture.mjs +9 -10
  19. package/dist/es/index.mjs +2 -1
  20. package/dist/es/motion/features/animations.mjs +8 -3
  21. package/dist/es/motion/features/definitions.mjs +1 -13
  22. package/dist/es/motion/features/layout/MeasureLayout.mjs +12 -6
  23. package/dist/es/motion/features/load-features.mjs +14 -0
  24. package/dist/es/motion/features/viewport/observers.mjs +4 -7
  25. package/dist/es/motion/features/viewport/use-viewport.mjs +8 -6
  26. package/dist/es/motion/index.mjs +23 -23
  27. package/dist/es/motion/utils/VisualElementHandler.mjs +2 -5
  28. package/dist/es/motion/utils/is-forced-motion-value.mjs +3 -3
  29. package/dist/es/motion/utils/use-motion-ref.mjs +1 -2
  30. package/dist/es/motion/utils/use-visual-element.mjs +14 -12
  31. package/dist/es/motion/utils/use-visual-state.mjs +19 -16
  32. package/dist/es/motion/utils/valid-prop.mjs +22 -17
  33. package/dist/es/projection/geometry/utils.mjs +10 -1
  34. package/dist/es/projection/node/HTMLProjectionNode.mjs +1 -1
  35. package/dist/es/projection/node/create-projection-node.mjs +62 -20
  36. package/dist/es/projection/use-instant-layout-transition.mjs +2 -2
  37. package/dist/es/render/dom/features-animation.mjs +5 -1
  38. package/dist/es/render/dom/features-max.mjs +6 -1
  39. package/dist/es/render/dom/motion.mjs +6 -1
  40. package/dist/es/render/dom/use-render.mjs +5 -1
  41. package/dist/es/render/dom/utils/camel-to-dash.mjs +1 -3
  42. package/dist/es/render/dom/utils/create-config.mjs +7 -2
  43. package/dist/es/render/dom/utils/css-variables-conversion.mjs +5 -7
  44. package/dist/es/render/dom/utils/unit-conversion.mjs +4 -4
  45. package/dist/es/render/dom/value-types/defaults.mjs +15 -3
  46. package/dist/es/render/dom/value-types/type-int.mjs +4 -1
  47. package/dist/es/render/html/config-motion.mjs +1 -1
  48. package/dist/es/render/html/use-props.mjs +5 -9
  49. package/dist/es/render/html/utils/build-styles.mjs +17 -15
  50. package/dist/es/render/html/utils/build-transform.mjs +8 -18
  51. package/dist/es/render/html/utils/transform.mjs +21 -30
  52. package/dist/es/render/html/visual-element.mjs +8 -9
  53. package/dist/es/render/index.mjs +118 -40
  54. package/dist/es/render/svg/use-props.mjs +5 -2
  55. package/dist/es/render/svg/utils/build-attrs.mjs +3 -5
  56. package/dist/es/render/svg/utils/create-render-state.mjs +4 -1
  57. package/dist/es/render/svg/visual-element.mjs +8 -4
  58. package/dist/es/render/utils/animation-state.mjs +12 -9
  59. package/dist/es/render/utils/animation.mjs +14 -8
  60. package/dist/es/render/utils/is-controlling-variants.mjs +22 -0
  61. package/dist/es/render/utils/is-variant-label.mjs +8 -0
  62. package/dist/es/render/utils/motion-values.mjs +3 -3
  63. package/dist/es/render/utils/resolve-dynamic-variants.mjs +24 -0
  64. package/dist/es/render/utils/resolve-variants.mjs +26 -0
  65. package/dist/es/render/utils/setters.mjs +12 -9
  66. package/dist/es/utils/reduced-motion/index.mjs +19 -0
  67. package/dist/es/utils/reduced-motion/state.mjs +5 -0
  68. package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +19 -0
  69. package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +43 -0
  70. package/dist/es/utils/transform.mjs +4 -1
  71. package/dist/es/utils/use-in-view.mjs +1 -2
  72. package/dist/es/value/index.mjs +1 -1
  73. package/dist/es/value/use-scroll.mjs +6 -4
  74. package/dist/es/value/use-spring.mjs +7 -1
  75. package/dist/es/value/use-will-change/index.mjs +4 -4
  76. package/dist/es/value/utils/is-motion-value.mjs +1 -3
  77. package/dist/framer-motion.dev.js +806 -670
  78. package/dist/framer-motion.js +1 -1
  79. package/dist/index.d.ts +60 -54
  80. package/dist/projection.dev.js +402 -213
  81. package/dist/size-rollup-dom-animation-assets.js +1 -0
  82. package/dist/size-rollup-dom-animation-m.js +1 -0
  83. package/dist/size-rollup-dom-animation.js +1 -1
  84. package/dist/size-rollup-dom-max-assets.js +1 -0
  85. package/dist/size-rollup-dom-max.js +1 -1
  86. package/dist/size-rollup-m.js +1 -1
  87. package/dist/size-rollup-motion.js +1 -0
  88. package/dist/size-webpack-dom-animation.js +1 -1
  89. package/dist/size-webpack-dom-max.js +1 -1
  90. package/dist/size-webpack-m.js +1 -1
  91. package/dist/three-entry.d.ts +41 -22
  92. package/package.json +12 -8
  93. package/dist/es/motion/features/use-features.mjs +0 -40
  94. package/dist/es/motion/features/use-projection.mjs +0 -33
  95. package/dist/es/render/utils/variants.mjs +0 -73
  96. package/dist/es/utils/use-reduced-motion.mjs +0 -73
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=o(e),r=n(e);const s=("undefined"==typeof process||process.env,"production"),a=t=>({isEnabled:e=>t.some(t=>!!e[t])}),l={measureLayout:a(["layout","layoutId","drag"]),animation:a(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:a(["exit"]),drag:a(["drag","dragControls"]),focus:a(["whileFocus"]),hover:a(["whileHover","onHoverStart","onHoverEnd"]),tap:a(["whileTap","onTap","onTapStart","onTapCancel"]),pan:a(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:a(["whileInView","onViewportEnter","onViewportLeave"])};function u(t){for(const e in t)null!==t[e]&&("projectionNodeConstructor"===e?l.projectionNodeConstructor=t[e]:l[e].Component=t[e])}const c=e.createContext({strict:!1}),d=Object.keys(l),h=d.length;const p=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),f=e.createContext({});function m(){return e.useContext(f).visualElement}const g=e.createContext(null),v="undefined"!=typeof document,y=v?e.useLayoutEffect:e.useEffect,x={current:null};let b=!1;function E(){!b&&function(){if(b=!0,v)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>x.current=t.matches;t.addListener(e),e()}else x.current=!1}();const[t]=e.useState(x.current);return t}function w(){const t=E(),{reducedMotion:n}=e.useContext(p);return"never"!==n&&("always"===n||t)}function S(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function P(t){return Array.isArray(t)}function A(t){return"string"==typeof t||P(t)}function T(t,e,n,o={},i={}){var r;return"function"==typeof e&&(e=e(null!=n?n:t.custom,o,i)),"string"==typeof e&&(e=null===(r=t.variants)||void 0===r?void 0:r[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,o,i)),e}function O(t,e,n){const o=t.getProps();return T(o,e,null!=n?n:o.custom,function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.getVelocity()),e}(t))}function j(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||A(t.initial)||A(t.animate)||A(t.whileHover)||A(t.whileDrag)||A(t.whileTap)||A(t.whileFocus)||A(t.exit)}function V(t){return Boolean(j(t)||t.variants)}function C(t){const{initial:n,animate:o}=function(t,e){if(j(t)){const{initial:e,animate:n}=t;return{initial:!1===e||A(e)?e:void 0,animate:A(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(f));return e.useMemo(()=>({initial:n,animate:o}),[M(n),M(o)])}function M(t){return Array.isArray(t)?t.join(" "):t}function R(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const L={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let D=1;const k=e.createContext({}),F=e.createContext({});class I extends r.default.Component{getSnapshotBeforeUpdate(){return this.updateProps(),null}componentDidUpdate(){}updateProps(){const{visualElement:t,props:e}=this.props;t&&t.setProps(e)}render(){return this.props.children}}function B({preloadedFeatures:t,createVisualElement:n,projectionNodeConstructor:o,useRender:r,useVisualState:a,Component:x}){return t&&u(t),e.forwardRef((function(u,b){const E=function({layoutId:t}){var n;const o=null===(n=e.useContext(k))||void 0===n?void 0:n.id;return o&&void 0!==t?o+"-"+t:t}(u);u=Object.assign(Object.assign({},u),{layoutId:E});const P=e.useContext(p);let A=null;const T=C(u),O=P.isStatic?void 0:R(()=>{if(L.hasEverUpdated)return D++}),j=a(u,P.isStatic);return!P.isStatic&&v&&(T.visualElement=function(t,n,o,i){const r=e.useContext(c),s=m(),a=e.useContext(g),l=w(),u=e.useRef(void 0);i||(i=r.renderer),!u.current&&i&&(u.current=i(t,{visualState:n,parent:s,props:o,presenceId:null==a?void 0:a.id,blockInitialAnimation:!1===(null==a?void 0:a.initial),shouldReduceMotion:l}));const d=u.current;return y(()=>{null==d||d.syncRender()}),e.useEffect(()=>{var t;null===(t=null==d?void 0:d.animationState)||void 0===t||t.animateChanges()}),y(()=>()=>null==d?void 0:d.notifyUnmount(),[]),d}(x,j,Object.assign(Object.assign({},P),u),n),function(t,{layoutId:n,layout:o,drag:i,dragConstraints:r,layoutScroll:s},a,l){var u;const c=e.useContext(F);l&&a&&!(null==a?void 0:a.projection)&&(a.projection=new l(t,a.getLatestValues(),null===(u=a.parent)||void 0===u?void 0:u.projection),a.projection.setOptions({layoutId:n,layout:o,alwaysMeasureLayout:Boolean(i)||r&&S(r),visualElement:a,scheduleRender:()=>a.scheduleRender(),animationType:"string"==typeof o?o:"both",initialPromotionConfig:c,layoutScroll:s}))}(O,u,T.visualElement,o||l.projectionNodeConstructor),A=function(t,n,o){const r=[],a=e.useContext(c);if(!n)return null;"production"!==s&&o&&a.strict;for(let e=0;e<h;e++){const o=d[e],{isEnabled:s,Component:a}=l[o];s(t)&&a&&r.push(i.createElement(a,Object.assign({key:o},t,{visualElement:n})))}return r}(u,T.visualElement,t)),i.createElement(I,{visualElement:T.visualElement,props:Object.assign(Object.assign({},P),u)},A,i.createElement(f.Provider,{value:T},r(x,u,O,function(t,n,o){return e.useCallback(e=>{var i;e&&(null===(i=t.mount)||void 0===i||i.call(t,e)),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):S(o)&&(o.current=e))},[n])}(j,T.visualElement,b),j,P.isStatic,T.visualElement)))}))}function U(t){function e(e,n={}){return B(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const z=["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 N(t){return"string"==typeof t&&!t.includes("-")&&!!(z.indexOf(t)>-1||/[A-Z]/.test(t))}const W={};function H(t){Object.assign(W,t)}const $=["","X","Y","Z"],Y=["transformPerspective","x","y","z"];function X(t,e){return Y.indexOf(t)-Y.indexOf(e)}["translate","scale","rotate","skew"].forEach(t=>$.forEach(e=>Y.push(t+e)));const G=new Set(Y);function q(t){return G.has(t)}const Z=new Set(["originX","originY","originZ"]);function K(t){return Z.has(t)}function _(t,{layout:e,layoutId:n}){return q(t)||K(t)||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const J=t=>Boolean(null!==t&&"object"==typeof t&&t.getVelocity),Q={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function tt(t){return t.startsWith("--")}const et=(t,e)=>e&&"number"==typeof t?e.transform(t):t,nt=(t,e)=>n=>Math.max(Math.min(n,e),t),ot=t=>t%1?Number(t.toFixed(5)):t,it=/(-)?([\d]*\.?[\d])+/g,rt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,st=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function at(t){return"string"==typeof t}const lt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ut=Object.assign(Object.assign({},lt),{transform:nt(0,1)}),ct=Object.assign(Object.assign({},lt),{default:1}),dt=t=>({test:e=>at(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ht=dt("deg"),pt=dt("%"),ft=dt("px"),mt=dt("vh"),gt=dt("vw"),vt=Object.assign(Object.assign({},pt),{parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}),yt=(t,e)=>n=>Boolean(at(n)&&st.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),xt=(t,e,n)=>o=>{if(!at(o))return o;const[i,r,s,a]=o.match(it);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},bt={test:yt("hsl","hue"),parse:xt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:o=1})=>"hsla("+Math.round(t)+", "+pt.transform(ot(e))+", "+pt.transform(ot(n))+", "+ot(ut.transform(o))+")"},Et=nt(0,255),wt=Object.assign(Object.assign({},lt),{transform:t=>Math.round(Et(t))}),St={test:yt("rgb","red"),parse:xt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:o=1})=>"rgba("+wt.transform(t)+", "+wt.transform(e)+", "+wt.transform(n)+", "+ot(ut.transform(o))+")"};const Pt={test:yt("#"),parse:function(t){let e="",n="",o="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}},transform:St.transform},At={test:t=>St.test(t)||Pt.test(t)||bt.test(t),parse:t=>St.test(t)?St.parse(t):bt.test(t)?bt.parse(t):Pt.parse(t),transform:t=>at(t)?t:t.hasOwnProperty("red")?St.transform(t):bt.transform(t)};function Tt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const o=t.match(rt);o&&(n=o.length,t=t.replace(rt,"${c}"),e.push(...o.map(At.parse)));const i=t.match(it);return i&&(t=t.replace(it,"${n}"),e.push(...i.map(lt.parse))),{values:e,numColors:n,tokenised:t}}function Ot(t){return Tt(t).values}function jt(t){const{values:e,numColors:n,tokenised:o}=Tt(t),i=e.length;return t=>{let e=o;for(let o=0;o<i;o++)e=e.replace(o<n?"${c}":"${n}",o<n?At.transform(t[o]):ot(t[o]));return e}}const Vt=t=>"number"==typeof t?0:t;const Ct={test:function(t){var e,n,o,i;return isNaN(t)&&at(t)&&(null!==(n=null===(e=t.match(it))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(o=t.match(rt))||void 0===o?void 0:o.length)&&void 0!==i?i:0)>0},parse:Ot,createTransformer:jt,getAnimatableNone:function(t){const e=Ot(t);return jt(t)(e.map(Vt))}},Mt=new Set(["brightness","contrast","saturate","opacity"]);function Rt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[o]=n.match(it)||[];if(!o)return t;const i=n.replace(o,"");let r=Mt.has(e)?1:0;return o!==n&&(r*=100),e+"("+r+i+")"}const Lt=/([a-z-]*)\(.*?\)/g,Dt=Object.assign(Object.assign({},Ct),{getAnimatableNone:t=>{const e=t.match(Lt);return e?e.map(Rt).join(" "):t}}),kt=Object.assign(Object.assign({},lt),{transform:Math.round}),Ft={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,size:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:ct,scaleX:ct,scaleY:ct,scaleZ:ct,skew:ht,skewX:ht,skewY:ht,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:ut,originX:vt,originY:vt,originZ:ft,zIndex:kt,fillOpacity:ut,strokeOpacity:ut,numOctaves:kt};function It(t,e,n,o){var i;const{style:r,vars:s,transform:a,transformKeys:l,transformOrigin:u}=t;l.length=0;let c=!1,d=!1,h=!0;for(const t in e){const n=e[t];if(tt(t)){s[t]=n;continue}const o=Ft[t],p=et(n,o);if(q(t)){if(c=!0,a[t]=p,l.push(t),!h)continue;n!==(null!==(i=o.default)&&void 0!==i?i:0)&&(h=!1)}else K(t)?(u[t]=p,d=!0):r[t]=p}c?r.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:o=!0},i,r){let s="";e.sort(X);let a=!1;const l=e.length;for(let n=0;n<l;n++){const o=e[n];s+=`${Q[o]||o}(${t[o]}) `,"z"===o&&(a=!0)}return!a&&n&&(s+="translateZ(0)"),s=s.trim(),r?s=r(t,i?"":s):o&&i&&(s="none"),s}(t,n,h,o):o?r.transform=o({},""):!e.transform&&r.transform&&(r.transform="none"),d&&(r.transformOrigin=function({originX:t="50%",originY:e="50%",originZ:n=0}){return`${t} ${e} ${n}`}(u))}const Bt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Ut(t,e,n){for(const o in e)J(e[o])||_(o,n)||(t[o]=e[o])}function zt(t,n,o){let i={};return Ut(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,o){return e.useMemo(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};It(e,n,{enableHardwareAcceleration:!o},t);const{vars:i,style:r}=e;return Object.assign(Object.assign({},i),r)},[n])}(t,n,o)),t.transformValues&&(i=t.transformValues(i)),i}function Nt(t,e,n){const o={},i=zt(t,e,n);return Boolean(t.drag)&&!1!==t.dragListener&&(o.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),o.style=i,o}const Wt=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Ht(t){return Wt.has(t)}let $t=t=>!Ht(t);function Yt(t){t&&($t=e=>e.startsWith("on")?!Ht(e):t(e))}try{Yt(require("@emotion/is-prop-valid").default)}catch(t){}function Xt(t,e,n){const o={};for(const i in t)($t(i)||!0===n&&Ht(i)||!e&&!Ht(i)||t.draggable&&i.startsWith("onDrag"))&&(o[i]=t[i]);return o}function Gt(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}function qt(t,e,n){return"string"==typeof t?t:ft.transform(e+n*t)}const Zt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kt={offset:"strokeDashoffset",array:"strokeDasharray"};function _t(t,e,n,o){var{attrX:i,attrY:r,originX:s,originY:a,pathLength:l,pathSpacing:u=1,pathOffset:c=0}=e;It(t,Gt(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,o),t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(void 0!==s||void 0!==a||h.transform)&&(h.transformOrigin=function(t,e,n){return`${qt(e,t.x,t.width)} ${qt(n,t.y,t.height)}`}(p,void 0!==s?s:.5,void 0!==a?a:.5)),void 0!==i&&(d.x=i),void 0!==r&&(d.y=r),void 0!==l&&function(t,e,n=1,o=0,i=!0){t.pathLength=1;const r=i?Zt:Kt;t[r.offset]=ft.transform(-o);const s=ft.transform(e),a=ft.transform(n);t[r.array]=`${s} ${a}`}(d,l,u,c,!1)}const Jt=()=>Object.assign(Object.assign({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}});function Qt(t,n){const o=e.useMemo(()=>{const e=Jt();return _t(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),Object.assign(Object.assign({},e.attrs),{style:Object.assign({},e.style)})},[n]);if(t.style){const e={};Ut(e,t.style,t),o.style=Object.assign(Object.assign({},e),o.style)}return o}function te(t=!1){return(n,o,i,r,{latestValues:s},a)=>{const l=(N(n)?Qt:Nt)(o,s,a),u=Xt(o,"string"==typeof n,t),c=Object.assign(Object.assign(Object.assign({},u),l),{ref:r});return i&&(c["data-projection-id"]=i),e.createElement(n,c)}}const ee=/([a-z])([A-Z])/g,ne=t=>t.replace(ee,"$1-$2").toLowerCase();function oe(t,{style:e,vars:n},o,i){Object.assign(t.style,e,i&&i.getProjectionStyles(o));for(const e in n)t.style.setProperty(e,n[e])}const ie=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function re(t,e,n,o){oe(t,e,void 0,o);for(const n in e.attrs)t.setAttribute(ie.has(n)?n:ne(n),e.attrs[n])}function se(t){const{style:e}=t,n={};for(const o in e)(J(e[o])||_(o,t))&&(n[o]=e[o]);return n}function ae(t){const e=se(t);for(const n in t)if(J(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function le(t){return"object"==typeof t&&"function"==typeof t.start}const ue=t=>Array.isArray(t),ce=t=>ue(t)?t[t.length-1]||0:t;function de(t){const e=J(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}function he({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},o,i,r){const s={latestValues:fe(o,i,r,t),renderState:e()};return n&&(s.mount=t=>n(o,t,s)),s}const pe=t=>(n,o)=>{const i=e.useContext(f),r=e.useContext(g);return o?he(t,n,i,r):R(()=>he(t,n,i,r))};function fe(t,e,n,o){const i={},r=!1===(null==n?void 0:n.initial),s=o(t);for(const t in s)i[t]=de(s[t]);let{initial:a,animate:l}=t;const u=j(t),c=V(t);e&&c&&!u&&!1!==t.inherit&&(null!=a||(a=e.initial),null!=l||(l=e.animate));const d=r||!1===a,h=d?l:a;if(h&&"boolean"!=typeof h&&!le(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=T(t,e);if(!n)return;const{transitionEnd:o,transition:r}=n,s=Gt(n,["transitionEnd","transition"]);for(const t in s){let e=s[t];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in o)i[t]=o[t]})}return i}const me={useVisualState:pe({scrapeMotionValuesFromProps:ae,createRenderState:Jt,onMount:(t,e,{renderState:n,latestValues:o})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}_t(n,o,{enableHardwareAcceleration:!1},t.transformTemplate),re(e,n)}})},ge={useVisualState:pe({scrapeMotionValuesFromProps:se,createRenderState:Bt})};function ve(t,{forwardMotionProps:e=!1},n,o,i){const r=N(t)?me:ge;return Object.assign(Object.assign({},r),{preloadedFeatures:n,useRender:te(e),createVisualElement:o,projectionNodeConstructor:i,Component:t})}var ye;function xe(t,e,n,o={passive:!0}){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function be(t,n,o,i){e.useEffect(()=>{const e=t.current;if(o&&e)return xe(e,n,o,i)},[t,n,o,i])}function Ee(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function we(t){return!!t.touches}t.AnimationType=void 0,(ye=t.AnimationType||(t.AnimationType={})).Animate="animate",ye.Hover="whileHover",ye.Tap="whileTap",ye.Drag="whileDrag",ye.Focus="whileFocus",ye.InView="whileInView",ye.Exit="exit";const Se={pageX:0,pageY:0};function Pe(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||Se;return{x:n[e+"X"],y:n[e+"Y"]}}function Ae(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function Te(t,e="page"){return{point:we(t)?Pe(t,e):Ae(t,e)}}const Oe=(t,e=!1)=>{const n=e=>t(e,Te(e));return e?(o=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&o(t)}):n;var o},je={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ve={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ce(t){return v&&null===window.onpointerdown?t:v&&null===window.ontouchstart?Ve[t]:v&&null===window.onmousedown?je[t]:t}function Me(t,e,n,o){return xe(t,Ce(e),Oe(n,"pointerdown"===e),o)}function Re(t,e,n,o){return be(t,Ce(e),n&&Oe(n,"pointerdown"===e),o)}function Le(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const De=Le("dragHorizontal"),ke=Le("dragVertical");function Fe(t){let e=!1;if("y"===t)e=ke();else if("x"===t)e=De();else{const t=De(),n=ke();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ie(){const t=Fe(!0);return!t||(t(),!1)}function Be(e,n,o){return(i,r)=>{var s;Ee(i)&&!Ie()&&(null===(s=e.animationState)||void 0===s||s.setActive(t.AnimationType.Hover,n),null==o||o(i,r))}}const Ue=(t,e)=>!!e&&(t===e||Ue(t,e.parentElement));function ze(t){return e.useEffect(()=>()=>t(),[])}const Ne=(t,e,n)=>Math.min(Math.max(n,t),e);function We({duration:t=800,bounce:e=.25,velocity:n=0,mass:o=1}){let i,r,s=1-e;s=Ne(.05,1,s),t=Ne(.01,10,t/1e3),s<1?(i=e=>{const o=e*s,i=o*t;return.001-(o-n)/He(e,s)*Math.exp(-i)},r=e=>{const o=e*s*t,r=o*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-o),u=He(Math.pow(e,2),s);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let o=n;for(let n=1;n<12;n++)o-=t(o)/e(o);return o}(i,r,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*o;return{stiffness:e,damping:2*s*Math.sqrt(o*e),duration:t}}}function He(t,e){return t*Math.sqrt(1-e*e)}const $e=["duration","bounce"],Ye=["stiffness","damping","mass"];function Xe(t,e){return e.some(e=>void 0!==t[e])}function Ge(t){var{from:e=0,to:n=1,restSpeed:o=2,restDelta:i}=t,r=Gt(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:h}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Xe(t,Ye)&&Xe(t,$e)){const n=We(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(r),p=qe,f=qe;function m(){const t=c?-c/1e3:0,o=n-e,r=l/(2*Math.sqrt(a*u)),s=Math.sqrt(a/u)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-e)/100,.4)),r<1){const e=He(s,r);p=i=>{const a=Math.exp(-r*s*i);return n-a*((t+r*s*o)/e*Math.sin(e*i)+o*Math.cos(e*i))},f=n=>{const i=Math.exp(-r*s*n);return r*s*i*(Math.sin(e*n)*(t+r*s*o)/e+o*Math.cos(e*n))-i*(Math.cos(e*n)*(t+r*s*o)-e*o*Math.sin(e*n))}}else if(1===r)p=e=>n-Math.exp(-s*e)*(o+(t+s*o)*e);else{const e=s*Math.sqrt(r*r-1);p=i=>{const a=Math.exp(-r*s*i),l=Math.min(e*i,300);return n-a*((t+r*s*o)*Math.sinh(l)+e*o*Math.cosh(l))/e}}}return m(),{next:t=>{const e=p(t);if(h)s.done=t>=d;else{const r=1e3*f(t),a=Math.abs(r)<=o,l=Math.abs(n-e)<=i;s.done=a&&l}return s.value=s.done?n:e,s},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}Ge.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const qe=t=>0,Ze=(t,e,n)=>{const o=e-t;return 0===o?1:(n-t)/o},Ke=(t,e,n)=>-n*t+n*e+t;function _e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Je({hue:t,saturation:e,lightness:n,alpha:o}){t/=360,n/=100;let i=0,r=0,s=0;if(e/=100){const o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;i=_e(a,o,t+1/3),r=_e(a,o,t),s=_e(a,o,t-1/3)}else i=r=s=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*s),alpha:o}}const Qe=(t,e,n)=>{const o=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-o)+o))},tn=[Pt,St,bt],en=t=>tn.find(e=>e.test(t)),nn=(t,e)=>{let n=en(t),o=en(e),i=n.parse(t),r=o.parse(e);n===bt&&(i=Je(i),n=St),o===bt&&(r=Je(r),o=St);const s=Object.assign({},i);return t=>{for(const e in s)"alpha"!==e&&(s[e]=Qe(i[e],r[e],t));return s.alpha=Ke(i.alpha,r.alpha,t),n.transform(s)}},on=t=>"number"==typeof t,rn=(t,e)=>n=>e(t(n)),sn=(...t)=>t.reduce(rn);function an(t,e){return on(t)?n=>Ke(t,e,n):At.test(t)?nn(t,e):dn(t,e)}const ln=(t,e)=>{const n=[...t],o=n.length,i=t.map((t,n)=>an(t,e[n]));return t=>{for(let e=0;e<o;e++)n[e]=i[e](t);return n}},un=(t,e)=>{const n=Object.assign(Object.assign({},t),e),o={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(o[i]=an(t[i],e[i]));return t=>{for(const e in o)n[e]=o[e](t);return n}};function cn(t){const e=Ct.parse(t),n=e.length;let o=0,i=0,r=0;for(let t=0;t<n;t++)o||"number"==typeof e[t]?o++:void 0!==e[t].hue?r++:i++;return{parsed:e,numNumbers:o,numRGB:i,numHSL:r}}const dn=(t,e)=>{const n=Ct.createTransformer(e),o=cn(t),i=cn(e);return o.numHSL===i.numHSL&&o.numRGB===i.numRGB&&o.numNumbers>=i.numNumbers?sn(ln(o.parsed,i.parsed),n):n=>""+(n>0?e:t)},hn=(t,e)=>n=>Ke(t,e,n);function pn(t,e,n){const o=[],i=n||("number"==typeof(r=t[0])?hn:"string"==typeof r?At.test(r)?nn:dn:Array.isArray(r)?ln:"object"==typeof r?un:void 0);var r;const s=t.length-1;for(let n=0;n<s;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;r=sn(t,r)}o.push(r)}return o}function fn(t,e,{clamp:n=!0,ease:o,mixer:i}={}){const r=t.length;e.length,!o||!Array.isArray(o)||o.length,t[0]>t[r-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const s=pn(e,o,i),a=2===r?function([t,e],[n]){return o=>n(Ze(t,e,o))}(t,s):function(t,e){const n=t.length,o=n-1;return i=>{let r=0,s=!1;if(i<=t[0]?s=!0:i>=t[o]&&(r=o-1,s=!0),!s){let e=1;for(;e<n&&!(t[e]>i||e===o);e++);r=e-1}const a=Ze(t[r],t[r+1],i);return e[r](a)}}(t,s);return n?e=>a(Ne(t[0],t[r-1],e)):a}const mn=t=>e=>1-t(1-e),gn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,vn=t=>e=>e*e*((t+1)*e-t),yn=t=>t,xn=(bn=2,t=>Math.pow(t,bn));var bn;const En=mn(xn),wn=gn(xn),Sn=t=>1-Math.sin(Math.acos(t)),Pn=mn(Sn),An=gn(Pn),Tn=vn(1.525),On=mn(Tn),jn=gn(Tn),Vn=(t=>{const e=vn(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Cn=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},Mn=mn(Cn);function Rn(t,e){return t.map(()=>e||wn).splice(0,t.length-1)}function Ln({from:t=0,to:e=1,ease:n,offset:o,duration:i=300}){const r={done:!1,value:t},s=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(o&&o.length===s.length?o:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(s),i);function l(){return fn(a,s,{ease:Array.isArray(n)?n:Rn(s,n)})}let u=l();return{next:t=>(r.value=u(t),r.done=t>=i,r),flipTarget:()=>{s.reverse(),u=l()}}}const Dn={keyframes:Ln,spring:Ge,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:o=350,restDelta:i=.5,modifyTarget:r}){const s={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===r?l:r(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/o);return s.done=!(e>i||e<-i),s.value=s.done?u:u+e,s},flipTarget:()=>{}}}};const kn="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Fn="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(kn()),1/60*1e3);let In=!0,Bn=!1,Un=!1;const zn={delta:0,timestamp:0},Nn=["read","update","preRender","render","postRender"],Wn=Nn.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],o=0,i=!1,r=!1;const s=new WeakSet,a={schedule:(t,r=!1,a=!1)=>{const l=a&&i,u=l?e:n;return r&&s.add(t),-1===u.indexOf(t)&&(u.push(t),l&&i&&(o=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),s.delete(t)},process:l=>{if(i)r=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,o=e.length,o)for(let n=0;n<o;n++){const o=e[n];o(l),s.has(o)&&(a.schedule(o),t())}i=!1,r&&(r=!1,a.process(l))}}};return a}(()=>Bn=!0),t),{}),Hn=Nn.reduce((t,e)=>{const n=Wn[e];return t[e]=(t,e=!1,o=!1)=>(Bn||qn(),n.schedule(t,e,o)),t},{}),$n=Nn.reduce((t,e)=>(t[e]=Wn[e].cancel,t),{}),Yn=Nn.reduce((t,e)=>(t[e]=()=>Wn[e].process(zn),t),{}),Xn=t=>Wn[t].process(zn),Gn=t=>{Bn=!1,zn.delta=In?1/60*1e3:Math.max(Math.min(t-zn.timestamp,40),1),zn.timestamp=t,Un=!0,Nn.forEach(Xn),Un=!1,Bn&&(In=!1,Fn(Gn))},qn=()=>{Bn=!0,In=!0,Un||Fn(Gn)},Zn=()=>zn;function Kn(t,e,n=0){return t-e-n}const _n=t=>{const e=({delta:e})=>t(e);return{start:()=>Hn.update(e,!0),stop:()=>$n.update(e)}};function Jn(t){var e,n,{from:o,autoplay:i=!0,driver:r=_n,elapsed:s=0,repeat:a=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:h,onRepeat:p,onUpdate:f}=t,m=Gt(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,v,y,{to:x}=m,b=0,E=m.duration,w=!1,S=!0;const P=function(t){if(Array.isArray(t.to))return Ln;if(Dn[t.type])return Dn[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Ln:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ge:Ln}(m);(null===(n=(e=P).needsInterpolation)||void 0===n?void 0:n.call(e,o,x))&&(y=fn([0,100],[o,x],{clamp:!1}),o=0,x=100);const A=P(Object.assign(Object.assign({},m),{from:o,to:x}));function T(){b++,"reverse"===l?(S=b%2==0,s=function(t,e,n=0,o=!0){return o?Kn(e+-t,e,n):e-(t-e)+n}(s,E,u,S)):(s=Kn(s,E,u),"mirror"===l&&A.flipTarget()),w=!1,p&&p()}function O(t){if(S||(t=-t),s+=t,!w){const t=A.next(Math.max(0,s));v=t.value,y&&(v=y(v)),w=S?t.done:s<=0}null==f||f(v),w&&(0===b&&(null!=E||(E=s)),b<a?function(t,e,n,o){return o?t>=e+n:t<=-n}(s,E,u,S)&&T():(g.stop(),h&&h()))}return i&&(null==c||c(),g=r(O),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function Qn(t,e){return e?t*(1e3/e):0}const to=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),eo=t=>to(t)&&t.hasOwnProperty("z"),no=(t,e)=>Math.abs(t-e);function oo(t,e){if(on(t)&&on(e))return no(t,e);if(to(t)&&to(e)){const n=no(t.x,e.x),o=no(t.y,e.y),i=eo(t)&&eo(e)?no(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(i,2))}}const io=(t,e)=>1-3*e+3*t,ro=(t,e)=>3*e-6*t,so=t=>3*t,ao=(t,e,n)=>((io(e,n)*t+ro(e,n))*t+so(e))*t,lo=(t,e,n)=>3*io(e,n)*t*t+2*ro(e,n)*t+so(e);function uo(t,e,n,o){if(t===e&&n===o)return yn;const i=new Float32Array(11);for(let e=0;e<11;++e)i[e]=ao(.1*e,t,n);function r(e){let o=0,r=1;for(;10!==r&&i[r]<=e;++r)o+=.1;--r;const s=o+.1*((e-i[r])/(i[r+1]-i[r])),a=lo(s,t,n);return a>=.001?function(t,e,n,o){for(let i=0;i<8;++i){const i=lo(e,n,o);if(0===i)return e;e-=(ao(e,n,o)-t)/i}return e}(e,s,t,n):0===a?s:function(t,e,n,o,i){let r,s,a=0;do{s=e+(n-e)/2,r=ao(s,o,i)-t,r>0?n=s:e=s}while(Math.abs(r)>1e-7&&++a<10);return s}(e,o,o+.1,t,n)}return t=>0===t||1===t?t:ao(r(t),e,o)}const co=new Set;function ho(t,e,n){t||co.has(e)||(console.warn(e),n&&console.warn(n),co.add(e))}const po=new WeakMap,fo=new WeakMap,mo=t=>{var e;null===(e=po.get(t.target))||void 0===e||e(t)},go=t=>{t.forEach(mo)};function vo(t,e,n){const o=function(t){var{root:e}=t,n=Gt(t,["root"]);const o=e||document;fo.has(o)||fo.set(o,{});const i=fo.get(o),r=JSON.stringify(n);return i[r]||(i[r]=new IntersectionObserver(go,Object.assign({root:e},n))),i[r]}(e);return po.set(t,n),o.observe(t),()=>{po.delete(t),o.unobserve(t)}}const yo={some:0,all:1};function xo(n,o,i,{root:r,margin:s,amount:a="some",once:l}){e.useEffect(()=>{if(!n)return;const e={root:null==r?void 0:r.current,rootMargin:s,threshold:"number"==typeof a?a:yo[a]};return vo(i.getInstance(),e,e=>{var n;const{isIntersecting:r}=e;if(o.isInView===r)return;if(o.isInView=r,l&&!r&&o.hasEnteredView)return;r&&(o.hasEnteredView=!0),null===(n=i.animationState)||void 0===n||n.setActive(t.AnimationType.InView,r);const s=i.getProps(),a=r?s.onViewportEnter:s.onViewportLeave;null==a||a(e)})},[n,r,s,a])}function bo(n,o,i,{fallback:r=!0}){e.useEffect(()=>{n&&r&&("production"!==s&&ho(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{var e;o.hasEnteredView=!0;const{onViewportEnter:n}=i.getProps();null==n||n(null),null===(e=i.animationState)||void 0===e||e.setActive(t.AnimationType.InView,!0)}))},[n])}const Eo=t=>e=>(t(e),null),wo={inView:Eo((function({visualElement:t,whileInView:n,onViewportEnter:o,onViewportLeave:i,viewport:r={}}){const s=e.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(n||o||i);r.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?bo:xo)(a,s.current,t,r)})),tap:Eo((function({onTap:n,onTapStart:o,onTapCancel:i,whileTap:r,visualElement:s}){const a=n||o||i||r,l=e.useRef(!1),u=e.useRef(null),c={passive:!(o||n||i||m)};function d(){var t;null===(t=u.current)||void 0===t||t.call(u),u.current=null}function h(){var e;return d(),l.current=!1,null===(e=s.animationState)||void 0===e||e.setActive(t.AnimationType.Tap,!1),!Ie()}function p(t,e){h()&&(Ue(s.getInstance(),t.target)?null==n||n(t,e):null==i||i(t,e))}function f(t,e){h()&&(null==i||i(t,e))}function m(e,n){var i;d(),l.current||(l.current=!0,u.current=sn(Me(window,"pointerup",p,c),Me(window,"pointercancel",f,c)),null===(i=s.animationState)||void 0===i||i.setActive(t.AnimationType.Tap,!0),null==o||o(e,n))}Re(s,"pointerdown",a?m:void 0,c),ze(d)})),focus:Eo((function({whileFocus:e,visualElement:n}){be(n,"focus",e?()=>{var e;null===(e=n.animationState)||void 0===e||e.setActive(t.AnimationType.Focus,!0)}:void 0),be(n,"blur",e?()=>{var e;null===(e=n.animationState)||void 0===e||e.setActive(t.AnimationType.Focus,!1)}:void 0)})),hover:Eo((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:o}){Re(o,"pointerenter",t||n?Be(o,!0,t):void 0,{passive:!t}),Re(o,"pointerleave",e||n?Be(o,!1,e):void 0,{passive:!e})}))};function So(){const t=e.useContext(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,r=e.useId();e.useEffect(()=>i(r),[]);return!n&&o?[!1,()=>null==o?void 0:o(r)]:[!0]}function Po(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}const Ao=t=>1e3*t,To={linear:yn,easeIn:xn,easeInOut:wn,easeOut:En,circIn:Sn,circInOut:An,circOut:Pn,backIn:Tn,backInOut:jn,backOut:On,anticipate:Vn,bounceIn:Mn,bounceInOut:t=>t<.5?.5*(1-Cn(1-2*t)):.5*Cn(2*t-1)+.5,bounceOut:Cn},Oo=t=>{if(Array.isArray(t)){t.length;const[e,n,o,i]=t;return uo(e,n,o,i)}return"string"==typeof t?To[t]:t},jo=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ct.test(e)||e.startsWith("url("))),Vo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Co=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),Mo=()=>({type:"keyframes",ease:"linear",duration:.3}),Ro=t=>({type:"keyframes",duration:.8,values:t}),Lo={x:Vo,y:Vo,z:Vo,rotate:Vo,rotateX:Vo,rotateY:Vo,rotateZ:Vo,scaleX:Co,scaleY:Co,scale:Co,opacity:Mo,backgroundColor:Mo,color:Mo,default:Co},Do=Object.assign(Object.assign({},Ft),{color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Dt,WebkitFilter:Dt}),ko=t=>Do[t];function Fo(t,e){var n;let o=ko(t);return o!==Dt&&(o=Ct),null===(n=o.getAnimatableNone)||void 0===n?void 0:n.call(o,e)}const Io={current:!1};function Bo(t){var{ease:e,times:n,yoyo:o,flip:i,loop:r}=t,s=Gt(t,["ease","times","yoyo","flip","loop"]);const a=Object.assign({},s);return n&&(a.offset=n),s.duration&&(a.duration=Ao(s.duration)),s.repeatDelay&&(a.repeatDelay=Ao(s.repeatDelay)),e&&(a.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(Oo):Oo(e)),"tween"===s.type&&(a.type="keyframes"),(o||r||i)&&(o?a.repeatType="reverse":r?a.repeatType="loop":i&&(a.repeatType="mirror"),a.repeat=r||o||i||s.repeat),"spring"!==s.type&&(a.type="keyframes"),a}function Uo(t,e,n){var o;return Array.isArray(e.to)&&(null!==(o=t.duration)&&void 0!==o||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function(t){var e=Gt(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object.assign(Object.assign({},t),((t,e)=>{let n;return n=ue(e)?Ro:Lo[t]||Lo.default,Object.assign({to:e},n(e))})(n,e.to))),Object.assign(Object.assign({},e),Bo(t))}function zo(t,e,n,o,i){var r;const s=Ho(o,t);let a=null!==(r=s.from)&&void 0!==r?r:e.get();const l=jo(t,n);"none"===a&&l&&"string"==typeof n?a=Fo(t,n):No(a)&&"string"==typeof n?a=Wo(n):!Array.isArray(n)&&No(n)&&"string"==typeof a&&(n=Wo(a));return jo(t,a)&&l&&!1!==s.type?function(){const o={from:a,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:t=>e.set(t)};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:o,power:i=.8,timeConstant:r=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:h,onStop:p}){let f;function m(t){return void 0!==n&&t<n||void 0!==o&&t>o}function g(t){return void 0===n?o:void 0===o||Math.abs(n-t)<Math.abs(o-t)?n:o}function v(t){null==f||f.stop(),f=Jn(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:h,onStop:p}))}function y(t){v(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:l},t))}if(m(t))y({from:t,velocity:e,to:g(t)});else{let o=i*e+t;void 0!==u&&(o=u(o));const s=g(o),a=s===n?-1:1;let c,d;const h=t=>{c=d,d=t,e=Qn(t-c,Zn().delta),(1===a&&t>s||-1===a&&t<s)&&y({from:t,to:s,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:r,power:i,restDelta:l,modifyTarget:u,onUpdate:m(o)?h:void 0})}return{stop:()=>null==f?void 0:f.stop()}}(Object.assign(Object.assign({},o),s)):Jn(Object.assign(Object.assign({},Uo(s,o,t)),{onUpdate:t=>{var e;o.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:()=>{var t;o.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,o;const r=ce(n);return e.set(r),i(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,r),null===(o=null==s?void 0:s.onComplete)||void 0===o||o.call(s),{stop:()=>{}}}}function No(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Wo(t){return"number"==typeof t?0:Fo("",t)}function Ho(t,e){return t[e]||t.default||t}function $o(t,e,n,o={}){return Io.current&&(o={type:!1}),e.start(i=>{let r,s;const a=zo(t,e,n,o,i),l=function(t,e){var n,o;return null!==(o=null!==(n=(Ho(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==o?o:0}(o,t),u=()=>s=a();return l?r=window.setTimeout(u,Ao(l)):u(),()=>{clearTimeout(r),null==s||s.stop()}})}const Yo=t=>/^0[^.\s]+$/.test(t);function Xo(t,e){-1===t.indexOf(e)&&t.push(e)}function Go(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class qo{constructor(){this.subscriptions=[]}add(t){return Xo(this.subscriptions,t),()=>Go(this.subscriptions,t)}notify(t,e,n){const o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](t,e,n);else for(let i=0;i<o;i++){const o=this.subscriptions[i];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Zo{constructor(t){var e;this.version="7.2.0",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new qo,this.velocityUpdateSubscribers=new qo,this.renderSubscribers=new qo,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:o}=Zn();this.lastUpdated!==o&&(this.timeDelta=n,this.lastUpdated=o,Hn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Hn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Qn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Ko(t){return new Zo(t)}const _o=t=>e=>e.test(t),Jo=[lt,ft,pt,ht,gt,mt,{test:t=>"auto"===t,parse:t=>t}],Qo=t=>Jo.find(_o(t)),ti=[...Jo,At,Ct],ei=t=>ti.find(_o(t));function ni(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ko(n))}function oi(t,e){const n=O(t,e);let o=n?t.makeTargetAnimatable(n,!1):{},{transitionEnd:i={},transition:r={}}=o,s=Gt(o,["transitionEnd","transition"]);s=Object.assign(Object.assign({},s),i);for(const e in s){ni(t,e,ce(s[e]))}}function ii(t,e){[...e].reverse().forEach(n=>{var o;const i=t.getVariant(n);i&&oi(t,i),null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{ii(t,e)})})}function ri(t,e,n){var o,i,r,s;const a=Object.keys(e).filter(e=>!t.hasValue(e)),l=a.length;if(l)for(let u=0;u<l;u++){const l=a[u],c=e[l];let d=null;Array.isArray(c)&&(d=c[0]),null===d&&(d=null!==(i=null!==(o=n[l])&&void 0!==o?o:t.readValue(l))&&void 0!==i?i:e[l]),null!=d&&("string"==typeof d&&(/^\-?\d*\.?\d+$/.test(d)||Yo(d))?d=parseFloat(d):!ei(d)&&Ct.test(c)&&(d=Fo(l,c)),t.addValue(l,Ko(d)),null!==(r=(s=n)[l])&&void 0!==r||(s[l]=d),t.setBaseTarget(l,d))}}function si(t,e){if(!e)return;return(e[t]||e.default||e).from}function ai(t,e,n){var o,i;const r={};for(const s in t)r[s]=null!==(o=si(s,e))&&void 0!==o?o:null===(i=n.getValue(s))||void 0===i?void 0:i.get();return r}function li(t){return Boolean(J(t)&&t.add)}function ui(t,e,n={}){let o;if(t.notifyAnimationStart(e),Array.isArray(e)){const i=e.map(e=>ci(t,e,n));o=Promise.all(i)}else if("string"==typeof e)o=ci(t,e,n);else{const i="function"==typeof e?O(t,e,n.custom):e;o=di(t,i,n)}return o.then(()=>t.notifyAnimationComplete(e))}function ci(t,e,n={}){var o;const i=O(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>di(t,i,n):()=>Promise.resolve(),a=(null===(o=t.variantChildren)||void 0===o?void 0:o.size)?(o=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=r;return function(t,e,n=0,o=0,i=1,r){const s=[],a=(t.variantChildren.size-1)*o,l=1===i?(t=0)=>t*o:(t=0)=>a-t*o;return Array.from(t.variantChildren).sort(hi).forEach((t,o)=>{s.push(ci(t,e,Object.assign(Object.assign({},r),{delay:n+l(o)})).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(s)}(t,e,i+o,s,a,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then(e)}return Promise.all([s(),a(n.delay)])}function di(t,e,{delay:n=0,transitionOverride:o,type:i}={}){var r;let s=t.makeTargetAnimatable(e),{transition:a=t.getDefaultTransition(),transitionEnd:l}=s,u=Gt(s,["transition","transitionEnd"]);const c=t.getValue("willChange");o&&(a=o);const d=[],h=i&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[i]);for(const e in u){const o=t.getValue(e),i=u[e];if(!o||void 0===i||h&&pi(h,e))continue;let r=Object.assign({delay:n},a);t.shouldReduceMotion&&q(e)&&(r=Object.assign(Object.assign({},r),{type:!1,delay:0}));let s=$o(e,o,i,r);li(c)&&(c.add(e),s=s.then(()=>c.remove(e))),d.push(s)}return Promise.all(d).then(()=>{l&&oi(t,l)})}function hi(t,e){return t.sortNodePosition(e)}function pi({protectedKeys:t,needsAnimating:e},n){const o=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,o}const fi=[t.AnimationType.Animate,t.AnimationType.InView,t.AnimationType.Focus,t.AnimationType.Hover,t.AnimationType.Tap,t.AnimationType.Drag,t.AnimationType.Exit],mi=[...fi].reverse(),gi=fi.length;function vi(e){let n=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ui(t,e,n)))}(e);const o={[t.AnimationType.Animate]:xi(!0),[t.AnimationType.InView]:xi(),[t.AnimationType.Hover]:xi(),[t.AnimationType.Tap]:xi(),[t.AnimationType.Drag]:xi(),[t.AnimationType.Focus]:xi(),[t.AnimationType.Exit]:xi()};let i=!0;const r=(t,n)=>{const o=O(e,n);if(o){const{transition:e,transitionEnd:n}=o,i=Gt(o,["transition","transitionEnd"]);t=Object.assign(Object.assign(Object.assign({},t),i),n)}return t};function s(t,s){var a;const l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],d=new Set;let h={},p=1/0;for(let n=0;n<gi;n++){const f=mi[n],m=o[f],g=null!==(a=l[f])&&void 0!==a?a:u[f],v=A(g),y=f===s?m.isActive:null;!1===y&&(p=n);let x=g===u[f]&&g!==l[f]&&v;if(x&&i&&e.manuallyAnimateOnMount&&(x=!1),m.protectedKeys=Object.assign({},h),!m.isActive&&null===y||!g&&!m.prevProp||le(g)||"boolean"==typeof g)continue;const b=yi(m.prevProp,g);let E=b||f===s&&m.isActive&&!x&&v||n>p&&v;const w=Array.isArray(g)?g:[g];let S=w.reduce(r,{});!1===y&&(S={});const{prevResolvedValues:P={}}=m,T=Object.assign(Object.assign({},P),S),O=t=>{E=!0,d.delete(t),m.needsAnimating[t]=!0};for(const t in T){const e=S[t],n=P[t];h.hasOwnProperty(t)||(e!==n?ue(e)&&ue(n)?!Po(e,n)||b?O(t):m.protectedKeys[t]=!0:void 0!==e?O(t):d.add(t):void 0!==e&&d.has(t)?O(t):m.protectedKeys[t]=!0)}m.prevProp=g,m.prevResolvedValues=S,m.isActive&&(h=Object.assign(Object.assign({},h),S)),i&&e.blockInitialAnimation&&(E=!1),E&&!x&&c.push(...w.map(e=>({animation:e,options:Object.assign({type:f},t)})))}if(d.size){const t={};d.forEach(n=>{const o=e.getBaseTarget(n);void 0!==o&&(t[n]=o)}),c.push({animation:t})}let f=Boolean(c.length);return i&&!1===l.initial&&!e.manuallyAnimateOnMount&&(f=!1),i=!1,f?n(c):Promise.resolve()}return{animateChanges:s,setActive:function(t,n,i){var r;if(o[t].isActive===n)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach(e=>{var o;return null===(o=e.animationState)||void 0===o?void 0:o.setActive(t,n)}),o[t].isActive=n;const a=s(i,t);for(const t in o)o[t].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:()=>o}}function yi(t,e){return"string"==typeof e?e!==t:!!P(e)&&!Po(e,t)}function xi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const bi={animation:Eo(({visualElement:t,animate:n})=>{t.animationState||(t.animationState=vi(t)),le(n)&&e.useEffect(()=>n.subscribe(t),[n])}),exit:Eo(n=>{const{custom:o,visualElement:i}=n,[r,s]=So(),a=e.useContext(g);e.useEffect(()=>{var e,n;i.isPresent=r;const l=null===(e=i.animationState)||void 0===e?void 0:e.setActive(t.AnimationType.Exit,!r,{custom:null!==(n=null==a?void 0:a.custom)&&void 0!==n?n:o});!r&&(null==l||l.then(s))},[r])})};class Ei{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Pi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=oo(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:o}=t,{timestamp:i}=Zn();this.history.push(Object.assign(Object.assign({},o),{timestamp:i}));const{onStart:r,onMove:s}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=wi(e,this.transformPagePoint),Ee(t)&&0===t.buttons?this.handlePointerUp(t,e):Hn.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:o}=this.handlers,i=Pi(wi(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),o&&o(t,i)},we(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const o=wi(Te(t),this.transformPagePoint),{point:i}=o,{timestamp:r}=Zn();this.history=[Object.assign(Object.assign({},i),{timestamp:r})];const{onSessionStart:s}=e;s&&s(t,Pi(o,this.history)),this.removeListeners=sn(Me(window,"pointermove",this.handlePointerMove),Me(window,"pointerup",this.handlePointerUp),Me(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$n.update(this.updatePoint)}}function wi(t,e){return e?{point:e(t.point)}:t}function Si(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pi({point:t},e){return{point:t,delta:Si(t,Ti(e)),offset:Si(t,Ai(e)),velocity:Oi(e,.1)}}function Ai(t){return t[0]}function Ti(t){return t[t.length-1]}function Oi(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,o=null;const i=Ti(t);for(;n>=0&&(o=t[n],!(i.timestamp-o.timestamp>Ao(e)));)n--;if(!o)return{x:0,y:0};const r=(i.timestamp-o.timestamp)/1e3;if(0===r)return{x:0,y:0};const s={x:(i.x-o.x)/r,y:(i.y-o.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ji(t){return t.max-t.min}function Vi(t,e=0,n=.01){return oo(t,e)<n}function Ci(t,e,n,o=.5){t.origin=o,t.originPoint=Ke(e.min,e.max,t.origin),t.scale=ji(n)/ji(e),(Vi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ke(n.min,n.max,t.origin)-t.originPoint,(Vi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Mi(t,e,n,o){Ci(t.x,e.x,n.x,null==o?void 0:o.originX),Ci(t.y,e.y,n.y,null==o?void 0:o.originY)}function Ri(t,e,n){t.min=n.min+e.min,t.max=t.min+ji(e)}function Li(t,e,n){t.min=e.min-n.min,t.max=t.min+ji(e)}function Di(t,e,n){Li(t.x,e.x,n.x),Li(t.y,e.y,n.y)}function ki(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Fi(t,e){let n=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,o]=[o,n]),{min:n,max:o}}const Ii=.35;function Bi(t,e,n){return{min:Ui(t,e),max:Ui(t,n)}}function Ui(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}const zi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Ni(t){return[t("x"),t("y")]}function Wi({top:t,left:e,right:n,bottom:o}){return{x:{min:e,max:n},y:{min:t,max:o}}}function Hi(t){return void 0===t||1===t}function $i({scale:t,scaleX:e,scaleY:n}){return!Hi(t)||!Hi(e)||!Hi(n)}function Yi(t){return $i(t)||Xi(t.x)||Xi(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function Xi(t){return t&&"0%"!==t}function Gi(t,e,n){return n+e*(t-n)}function qi(t,e,n,o,i){return void 0!==i&&(t=Gi(t,i,o)),Gi(t,n,o)+e}function Zi(t,e=0,n=1,o,i){t.min=qi(t.min,e,n,o,i),t.max=qi(t.max,e,n,o,i)}function Ki(t,{x:e,y:n}){Zi(t.x,e.translate,e.scale,e.originPoint),Zi(t.y,n.translate,n.scale,n.originPoint)}function _i(t,e){t.min=t.min+e,t.max=t.max+e}function Ji(t,e,[n,o,i]){const r=void 0!==e[i]?e[i]:.5,s=Ke(t.min,t.max,r);Zi(t,e[n],e[o],s,e.scale)}const Qi=["x","scaleX","originX"],tr=["y","scaleY","originY"];function er(t,e){Ji(t.x,e,Qi),Ji(t.y,e,tr)}function nr(t,e){return Wi(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}(t.getBoundingClientRect(),e))}const or=new WeakMap;class ir{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(e,{snapToCursor:n=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new Ei(e,{onSessionStart:t=>{this.stopAnimation(),n&&this.snapToCursor(Te(t,"page").point)},onStart:(e,n)=>{var o;const{drag:i,dragPropagation:r,onDragStart:s}=this.getProps();(!i||r||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Fe(i),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ni(t=>{var e,n;let o=this.getAxisMotionValue(t).get()||0;if(pt.test(o)){const i=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.actual[t];if(i){o=ji(i)*(parseFloat(o)/100)}}this.originPoint[t]=o}),null==s||s(e,n),null===(o=this.visualElement.animationState)||void 0===o||o.setActive(t.AnimationType.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:o,onDirectionLock:i,onDrag:r}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(o&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&(null==i||i(this.currentDirection)));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.syncRender(),null==r||r(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:o}=e;this.startAnimation(o);const{onDragEnd:i}=this.getProps();null==i||i(t,e)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(t.AnimationType.Drag,!1)}updateAxis(t,e,n){const{drag:o}=this.getProps();if(!n||!rr(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:n},o){return void 0!==e&&t<e?t=o?Ke(e,t,o.min):Math.max(t,e):void 0!==n&&t>n&&(t=o?Ke(n,t,o.max):Math.min(t,n)),t}(r,this.constraints[t],this.elastic[t])),i.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},o=this.constraints;t&&S(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:o,right:i}){return{x:ki(t.x,n,i),y:ki(t.y,e,o)}}(n.actual,t),this.elastic=function(t=Ii){return!1===t?t=0:!0===t&&(t=Ii),{x:Bi(t,"left","right"),y:Bi(t,"top","bottom")}}(e),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ni(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.actual[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!S(t))return!1;const n=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=function(t,e,n){const o=nr(t,n),{scroll:i}=e;return i&&(_i(o.x,i.x),_i(o.y,i.y)),o}(n,o.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Fi(t.x,e.x),y:Fi(t.y,e.y)}}(o.layout.actual,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(r));this.hasMutatedConstraints=!!t,t&&(r=Wi(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Ni(s=>{var l;if(!rr(s,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[s])&&void 0!==l?l:{};r&&(u={min:0,max:0});const c=o?200:1e6,d=o?40:1e7,h=Object.assign(Object.assign({type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},i),u);return this.startAxisValueAnimation(s,h)});return Promise.all(l).then(s)}startAxisValueAnimation(t,e){return $o(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){Ni(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var e,n;const o="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[o];return i||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}snapToCursor(t){Ni(e=>{const{drag:n}=this.getProps();if(!rr(e,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(e);if(o&&o.layout){const{min:n,max:r}=o.layout.actual[e];i.set(t[e]-Ke(n,r,.5))}})}scalePositionWithinConstraints(){var t;const{drag:e,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!S(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ni(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const o=ji(t),i=ji(e);return i>o?n=Ze(e.min,e.max-o,t.min):o>i&&(n=Ze(t.min,t.max-i,e.min)),Ne(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=r?r({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),Ni(t=>{if(!rr(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:r}=this.constraints[t];n.set(Ke(o,r,i[t]))})}addListeners(){var t;or.set(this.visualElement,this);const e=Me(this.visualElement.getInstance(),"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),n=()=>{const{dragConstraints:t}=this.getProps();S(t)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();const r=xe(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ni(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.syncRender())});return()=>{r(),e(),i(),null==s||s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:r=Ii,dragMomentum:s=!0}=t;return Object.assign(Object.assign({},t),{drag:e,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:r,dragMomentum:s})}}function rr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const sr={pan:Eo((function({onPan:t,onPanStart:n,onPanEnd:o,onPanSessionStart:i,visualElement:r}){const s=t||n||o||i,a=e.useRef(null),{transformPagePoint:l}=e.useContext(p),u={onSessionStart:i,onStart:n,onMove:t,onEnd:(t,e)=>{a.current=null,o&&o(t,e)}};e.useEffect(()=>{null!==a.current&&a.current.updateHandlers(u)}),Re(r,"pointerdown",s&&function(t){a.current=new Ei(t,u,{transformPagePoint:l})}),ze(()=>a.current&&a.current.end())})),drag:Eo((function(t){const{dragControls:n,visualElement:o}=t,i=R(()=>new ir(o));e.useEffect(()=>n&&n.subscribe(i),[i,n]),e.useEffect(()=>i.addListeners(),[i])}))},ar=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const lr=({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:o,measureViewportBox:i,render:r,readValueFromInstance:s,removeValueFromRenderState:a,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:c,props:d,presenceId:h,blockInitialAnimation:p,visualState:f,shouldReduceMotion:m},g={})=>{let v=!1;const{latestValues:y,renderState:x}=f;let b;const E=function(){const t=ar.map(()=>new qo),e={},n={clearAllListeners:()=>t.forEach(t=>t.clear()),updatePropListeners:t=>{ar.forEach(o=>{var i;const r="on"+o,s=t[r];null===(i=e[o])||void 0===i||i.call(e),s&&(e[o]=n[r](s))})}};return t.forEach((t,e)=>{n["on"+ar[e]]=e=>t.add(e),n["notify"+ar[e]]=(...e)=>t.notify(...e)}),n}(),w=new Map,S=new Map;let P={};const T=Object.assign({},y);let O;function C(){b&&v&&(M(),r(b,x,d.style,U.projection))}function M(){e(U,x,y,g,d)}function R(){E.notifyUpdate(y)}function L(t,e){const n=e.onChange(e=>{y[t]=e,d.onUpdate&&Hn.update(R,!1,!0)}),o=e.onRenderRequest(U.scheduleRender);S.set(t,()=>{n(),o()})}const D=u(d),{willChange:k}=D,F=Gt(D,["willChange"]);for(const t in F){const e=F[t];void 0!==y[t]&&J(e)&&(e.set(y[t],!1),li(k)&&k.add(t))}const I=j(d),B=V(d),U=Object.assign(Object.assign({treeType:t,current:null,depth:c?c.depth+1:0,parent:c,children:new Set,presenceId:h,shouldReduceMotion:m,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==c?void 0:c.isMounted()),blockInitialAnimation:p,isMounted:()=>Boolean(b),mount(t){v=!0,b=U.current=t,U.projection&&U.projection.mount(t),B&&c&&!I&&(O=null==c?void 0:c.addVariantChild(U)),w.forEach((t,e)=>L(e,t)),null==c||c.children.add(U),U.setProps(d)},unmount(){var t;null===(t=U.projection)||void 0===t||t.unmount(),$n.update(R),$n.render(C),S.forEach(t=>t()),null==O||O(),null==c||c.children.delete(U),E.clearAllListeners(),b=void 0,v=!1},addVariantChild(t){var e;const n=U.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>l&&t===e.treeType?l(U.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>B?U:null==c?void 0:c.getClosestVariantNode(),getLayoutId:()=>d.layoutId,getInstance:()=>b,getStaticValue:t=>y[t],setStaticValue:(t,e)=>y[t]=e,getLatestValues:()=>y,setVisibility(t){U.isVisible!==t&&(U.isVisible=t,U.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>o(U,t,d,e),measureViewportBox:()=>i(b,d),addValue(t,e){U.hasValue(t)&&U.removeValue(t),w.set(t,e),y[t]=e.get(),L(t,e)},removeValue(t){var e;w.delete(t),null===(e=S.get(t))||void 0===e||e(),S.delete(t),delete y[t],a(t,x)},hasValue:t=>w.has(t),getValue(t,e){let n=w.get(t);return void 0===n&&void 0!==e&&(n=Ko(e),U.addValue(t,n)),n},forEachValue:t=>w.forEach(t),readValue:t=>{var e;return null!==(e=y[t])&&void 0!==e?e:s(b,t,g)},setBaseTarget(t,e){T[t]=e},getBaseTarget(t){if(n){const e=n(d,t);if(void 0!==e&&!J(e))return e}return T[t]}},E),{build:()=>(M(),x),scheduleRender(){Hn.render(C,!1,!0)},syncRender:C,setProps(t){(t.transformTemplate||d.transformTemplate)&&U.scheduleRender(),d=t,E.updatePropListeners(t),P=function(t,e,n){var o;const{willChange:i}=e;for(const r in e){const s=e[r],a=n[r];if(J(s))t.addValue(r,s),li(i)&&i.add(r);else if(J(a))t.addValue(r,Ko(s)),li(i)&&i.remove(r);else if(a!==s)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(s)}else t.addValue(r,Ko(null!==(o=t.getStaticValue(r))&&void 0!==o?o:s))}for(const o in n)void 0===e[o]&&t.removeValue(o);return e}(U,u(d),P)},getProps:()=>d,getVariant:t=>{var e;return null===(e=d.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>d.transition,getTransformPagePoint:()=>d.transformPagePoint,getVariantContext(t=!1){if(t)return null==c?void 0:c.getVariantContext();if(!I){const t=(null==c?void 0:c.getVariantContext())||{};return void 0!==d.initial&&(t.initial=d.initial),t}const e={};for(let t=0;t<cr;t++){const n=ur[t],o=d[n];(A(o)||!1===o)&&(e[n]=o)}return e}});return U},ur=["initial",...fi],cr=ur.length;function dr(t){return"string"==typeof t&&t.startsWith("var(--")}const hr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function pr(t,e,n=1){const[o,i]=function(t){const e=hr.exec(t);if(!e)return[,];const[,n,o]=e;return[n,o]}(t);if(!o)return;const r=window.getComputedStyle(e).getPropertyValue(o);return r?r.trim():dr(i)?pr(i,e,n+1):i}const fr=new Set(["width","height","top","left","right","bottom","x","y"]),mr=t=>fr.has(t),gr=(t,e)=>{t.set(e,!1),t.set(e)},vr=t=>t===lt||t===ft;var yr;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(yr||(yr={}));const xr=(t,e)=>parseFloat(t.split(", ")[e]),br=(t,e)=>(n,{transform:o})=>{if("none"===o||!o)return 0;const i=o.match(/^matrix3d\((.+)\)$/);if(i)return xr(i[1],e);{const e=o.match(/^matrix\((.+)\)$/);return e?xr(e[1],t):0}},Er=new Set(["x","y","z"]),wr=Y.filter(t=>!Er.has(t));const Sr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:br(4,13),y:br(5,14)},Pr=(t,e,n={},o={})=>{e=Object.assign({},e),o=Object.assign({},o);const i=Object.keys(e).filter(mr);let r=[],s=!1;const a=[];if(i.forEach(i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let u=n[i],c=Qo(u);const d=e[i];let h;if(ue(d)){const t=d.length,e=null===d[0]?1:0;u=d[e],c=Qo(u);for(let n=e;n<t;n++)h?Qo(d[n]):h=Qo(d[n])}else h=Qo(d);if(c!==h)if(vr(c)&&vr(h)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof d?e[i]=parseFloat(d):Array.isArray(d)&&h===ft&&(e[i]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==h?void 0:h.transform)&&(0===u||0===d)?0===u?l.set(h.transform(u)):e[i]=c.transform(d):(s||(r=function(t){const e=[];return wr.forEach(n=>{const o=t.getValue(n);void 0!==o&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}(t),s=!0),a.push(i),o[i]=void 0!==o[i]?o[i]:e[i],gr(l,d))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const o=e.measureViewportBox(),i=e.getInstance(),r=getComputedStyle(i),{display:s}=r,a={};"none"===s&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Sr[t](o,r)}),e.syncRender();const l=e.measureViewportBox();return n.forEach(n=>{const o=e.getValue(n);gr(o,a[n]),t[n]=Sr[n](l,r)}),t})(e,t,a);return r.length&&r.forEach(([e,n])=>{t.getValue(e).set(n)}),t.syncRender(),v&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:o}}return{target:e,transitionEnd:o}};function Ar(t,e,n,o){return(t=>Object.keys(t).some(mr))(e)?Pr(t,e,n,o):{target:e,transitionEnd:o}}const Tr=(t,e,n,o)=>{const i=function(t,e,n){var o,i=Gt(e,[]);const r=t.getInstance();if(!(r instanceof Element))return{target:i,transitionEnd:n};n&&(n=Object.assign({},n)),t.forEachValue(t=>{const e=t.get();if(!dr(e))return;const n=pr(e,r);n&&t.set(n)});for(const t in i){const e=i[t];if(!dr(e))continue;const s=pr(e,r);s&&(i[t]=s,n&&(null!==(o=n[t])&&void 0!==o||(n[t]=e)))}return{target:i,transitionEnd:n}}(t,e,o);return Ar(t,e=i.target,n,o=i.transitionEnd)};const Or={treeType:"dom",readValueFromInstance(t,e){if(q(e)){const t=ko(e);return t&&t.default||0}{const o=(n=t,window.getComputedStyle(n)),i=(tt(e)?o.getPropertyValue(e):o[e])||0;return"string"==typeof i?i.trim():i}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:(t,{transformPagePoint:e})=>nr(t,e),resetTransform(t,e,n){const{transformTemplate:o}=n;e.style.transform=o?o({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,e,n,o){var{transition:i,transitionEnd:r}=e,s=Gt(e,["transition","transitionEnd"]),a=n.transformValues;void 0===o&&(o=!0);let l=ai(s,i||{},t);if(a&&(r&&(r=a(r)),s&&(s=a(s)),l&&(l=a(l))),o){ri(t,s,l);const e=Tr(t,s,l,r);r=e.transitionEnd,s=e.target}return Object.assign({transition:i,transitionEnd:r},s)},scrapeMotionValuesFromProps:se,build(t,e,n,o,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),It(e,n,o,i.transformTemplate)},render:oe},jr=lr(Or),Vr=lr(Object.assign(Object.assign({},Or),{getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return q(e)?(null===(n=ko(e))||void 0===n?void 0:n.default)||0:(e=ie.has(e)?e:ne(e),t.getAttribute(e))},scrapeMotionValuesFromProps:ae,build(t,e,n,o,i){_t(e,n,o,i.transformTemplate)},render:re})),Cr=(t,e)=>N(t)?Vr(e,{enableHardwareAcceleration:!1}):jr(e,{enableHardwareAcceleration:!0});function Mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${Mr(t,e.target.x)}% ${Mr(t,e.target.y)}%`}},Lr={correct:(t,{treeScale:e,projectionDelta:n})=>{const o=t,i=t.includes("var("),r=[];i&&(t=t.replace(hr,t=>(r.push(t),"_$css")));const s=Ct.parse(t);if(s.length>5)return o;const a=Ct.createTransformer(t),l="number"!=typeof s[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;s[0+l]/=u,s[1+l]/=c;const d=Ke(u,c,.5);"number"==typeof s[2+l]&&(s[2+l]/=d),"number"==typeof s[3+l]&&(s[3+l]/=d);let h=a(s);if(i){let t=0;h=h.replace("_$css",()=>{const e=r[t];return t++,e})}return h}};class Dr extends r.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;H(kr),i&&((null==e?void 0:e.group)&&e.group.add(i),(null==n?void 0:n.register)&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions(Object.assign(Object.assign({},i.options),{onExitComplete:()=>this.safeToRemove()}))),L.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:o,isPresent:i}=this.props,r=n.projection;return r?(r.isPresent=i,o||t.layoutDependency!==e||void 0===e?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||Hn.postRender(()=>{var t;(null===(t=r.getStack())||void 0===t?void 0:t.members.length)||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const kr={borderRadius:Object.assign(Object.assign({},Rr),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Rr,borderTopRightRadius:Rr,borderBottomLeftRadius:Rr,borderBottomRightRadius:Rr,boxShadow:Lr},Fr={measureLayout:function(t){const[n,o]=So(),i=e.useContext(k);return r.default.createElement(Dr,Object.assign({},t,{layoutGroup:i,switchLayoutGroup:e.useContext(F),isPresent:n,safeToRemove:o}))}};function Ir(t,e,n={}){const o=J(t)?t:Ko(t);return $o("",o,e,n),{stop:()=>o.stop(),isAnimating:()=>o.isAnimating()}}const Br=["TopLeft","TopRight","BottomLeft","BottomRight"],Ur=Br.length,zr=t=>"string"==typeof t?parseFloat(t):t,Nr=t=>"number"==typeof t||ft.test(t);function Wr(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const Hr=Yr(0,.5,Pn),$r=Yr(.5,.95,yn);function Yr(t,e,n){return o=>o<t?0:o>e?1:n(Ze(t,e,o))}function Xr(t,e){t.min=e.min,t.max=e.max}function Gr(t,e){Xr(t.x,e.x),Xr(t.y,e.y)}function qr(t,e,n,o,i){return t=Gi(t-=e,1/n,o),void 0!==i&&(t=Gi(t,1/i,o)),t}function Zr(t,e,[n,o,i],r,s){!function(t,e=0,n=1,o=.5,i,r=t,s=t){if(pt.test(e)){e=parseFloat(e);e=Ke(s.min,s.max,e/100)-s.min}if("number"!=typeof e)return;let a=Ke(r.min,r.max,o);t===r&&(a-=e),t.min=qr(t.min,e,n,a,i),t.max=qr(t.max,e,n,a,i)}(t,e[n],e[o],e[i],e.scale,r,s)}const Kr=["x","scaleX","originX"],_r=["y","scaleY","originY"];function Jr(t,e,n,o){Zr(t.x,e,Kr,null==n?void 0:n.x,null==o?void 0:o.x),Zr(t.y,e,_r,null==n?void 0:n.y,null==o?void 0:o.y)}function Qr(t){return 0===t.translate&&1===t.scale}function ts(t){return Qr(t.x)&&Qr(t.y)}function es(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}class ns{constructor(){this.members=[]}add(t){Xo(this.members,t),t.scheduleRender()}remove(t){if(Go(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){var n;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,e&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var e,n,o,i,r;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(r=null===(o=t.resumingFrom)||void 0===o?void 0:(i=o.options).onExitComplete)||void 0===r||r.call(i)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function os(t,e,n){let o=`translate3d(${t.x.translate/e.x}px, ${t.y.translate/e.y}px, 0) `;if(o+=`scale(${1/e.x}, ${1/e.y}) `,n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(o+=`rotate(${t}deg) `),e&&(o+=`rotateX(${e}deg) `),i&&(o+=`rotateY(${i}deg) `)}return o+=`scale(${t.x.scale*e.x}, ${t.y.scale*e.y})`,"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===o?"none":o}const is=(t,e)=>t.depth-e.depth;class rs{constructor(){this.children=[],this.isDirty=!1}add(t){Xo(this.children,t),this.isDirty=!0}remove(t){Go(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(is),this.isDirty=!1,this.children.forEach(t)}}function ss({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(t,n={},o=(null==e?void 0:e())){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(ps),this.nodes.forEach(fs)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=n,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new rs)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new qo),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);null==n||n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){var o;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.getInstance()&&s.mount(e),this.root.nodes.add(this),null===(o=this.parent)||void 0===o||o.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(r||i)&&(this.isLayoutDirty=!0),t){let n;const o=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,clearTimeout(n),n=window.setTimeout(o,250),L.hasAnimatedSinceResize&&(L.hasAnimatedSinceResize=!1,this.nodes.forEach(hs))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:o})=>{var i,r,a,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(r=null!==(i=this.options.transition)&&void 0!==i?i:s.getDefaultTransition())&&void 0!==r?r:bs,{onLayoutAnimationStart:d,onLayoutAnimationComplete:h}=s.getProps(),p=!this.targetLayout||!es(this.targetLayout,o)||n,f=!e&&n;if((null===(a=this.resumeFrom)||void 0===a?void 0:a.instance)||f||e&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,f);const e=Object.assign(Object.assign({},Ho(c,"layout")),{onPlay:d,onComplete:h});s.shouldReduceMotion&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||this.finishAnimation(),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=o})}unmount(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,$n.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}startUpdate(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(ms))}willUpdate(t=!0){var e,n,o;if(this.root.isUpdateBlocked())return void(null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll()}const{layoutId:i,layout:r}=this.options;if(void 0===i&&!r)return;const s=null===(o=this.options.visualElement)||void 0===o?void 0:o.getProps().transformTemplate;this.prevTransformTemplateValue=null==s?void 0:s(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(cs);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Es),this.potentialNodes.clear()),this.nodes.forEach(ds),this.nodes.forEach(as),this.nodes.forEach(ls),this.clearAllSnapshots(),Yn.update(),Yn.preRender(),Yn.render())}clearAllSnapshots(){this.nodes.forEach(us),this.sharedNodes.forEach(gs)}scheduleUpdateProjection(){Hn.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Hn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));Ss(e),this.snapshot={measured:t,layout:e,latestValues:{}}}updateLayout(){var t;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const e=this.measure();Ss(e);const n=this.layout;this.layout={measured:e,actual:this.removeElementScroll(e)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(t=this.options.visualElement)||void 0===t||t.notifyLayoutMeasure(this.layout.actual,null==n?void 0:n.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=n(this.instance))}resetTransform(){var t;if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!ts(this.projectionDelta),o=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,r=null==o?void 0:o(this.latestValues,""),s=r!==this.prevTransformTemplateValue;e&&(n||Yi(this.latestValues)||s)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(_i(e.x,n.x),_i(e.y,n.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Gr(e,t);for(let n=0;n<this.path.length;n++){const o=this.path[n],{scroll:i,options:r,isScrollRoot:s}=o;if(o!==this.root&&i&&r.layoutScroll){if(s){Gr(e,t);const{scroll:n}=this.root;n&&(_i(e.x,-n.x),_i(e.y,-n.y))}_i(e.x,i.x),_i(e.y,i.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Gr(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];!e&&o.options.layoutScroll&&o.scroll&&o!==o.root&&er(n,{x:-o.scroll.x,y:-o.scroll.y}),Yi(o.latestValues)&&er(n,o.latestValues)}return Yi(this.latestValues)&&er(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};Gr(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];if(!o.instance)continue;if(!Yi(o.latestValues))continue;$i(o.latestValues)&&o.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Gr(i,o.measure()),Jr(n,o.latestValues,null===(e=o.snapshot)||void 0===e?void 0:e.layout,i)}return Yi(this.latestValues)&&Jr(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection()}setOptions(t){var e;this.options=Object.assign(Object.assign(Object.assign({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const{layout:e,layoutId:n}=this.options;var o,i,r;this.layout&&(e||n)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Di(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Gr(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(o=this.target,i=this.relativeTarget,r=this.relativeParent.target,Ri(o.x,i.x,r.x),Ri(o.y,i.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):Gr(this.target,this.layout.actual),Ki(this.target,this.targetDelta)):Gr(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Di(this.relativeTargetOrigin,this.target,this.relativeParent.target),Gr(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(this.parent&&!Yi(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{layout:e,layoutId:n}=this.options;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!e&&!n)return;const o=this.getLead();Gr(this.layoutCorrected,this.layout.actual),function(t,e,n,o=!1){var i,r;const s=n.length;if(!s)return;let a,l;e.x=e.y=1;for(let u=0;u<s;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(r=null===(i=a.instance)||void 0===i?void 0:i.style)||void 0===r?void 0:r.display)&&(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&er(t,{x:-a.scroll.x,y:-a.scroll.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,Ki(t,l)),o&&Yi(a.latestValues)&&er(t,a.latestValues))}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==o);const{target:i}=o;if(!i)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const r=this.treeScale.x,s=this.treeScale.y,a=this.projectionTransform;Mi(this.projectionDelta,this.layoutCorrected,i,this.latestValues),this.projectionTransform=os(this.projectionDelta,this.treeScale),this.projectionTransform===a&&this.treeScale.x===r&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",i))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e,n,o;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(o=this.getStack())||void 0===o||o.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){var n;const o=this.snapshot,i=(null==o?void 0:o.latestValues)||{},r=Object.assign({},this.latestValues),s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=null==o?void 0:o.isShared,u=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(xs));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const o=e/1e3;var d,h,p,f;vs(s.x,t.x,o),vs(s.y,t.y,o),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Di(a,this.layout.actual,this.relativeParent.layout.actual),d=this.relativeTarget,h=this.relativeTargetOrigin,p=a,f=o,ys(d.x,h.x,p.x,f),ys(d.y,h.y,p.y,f)),l&&(this.animationValues=r,function(t,e,n,o,i,r){var s,a,l,u;i?(t.opacity=Ke(0,null!==(s=n.opacity)&&void 0!==s?s:1,Hr(o)),t.opacityExit=Ke(null!==(a=e.opacity)&&void 0!==a?a:1,0,$r(o))):r&&(t.opacity=Ke(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,o));for(let i=0;i<Ur;i++){const r=`border${Br[i]}Radius`;let s=Wr(e,r),a=Wr(n,r);if(void 0===s&&void 0===a)continue;s||(s=0),a||(a=0);0===s||0===a||Nr(s)===Nr(a)?(t[r]=Math.max(Ke(zr(s),zr(a),o),0),(pt.test(a)||pt.test(s))&&(t[r]+="%")):t[r]=a}(e.rotate||n.rotate)&&(t.rotate=Ke(e.rotate||0,n.rotate||0,o))}(r,i,this.latestValues,o,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=o},this.mixTargetDelta(0)}startAnimation(t){var e,n;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&($n.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hn.update(()=>{L.hasAnimatedSinceResize=!0,this.currentAnimation=Ir(0,1e3,Object.assign(Object.assign({},t),{onUpdate:e=>{var n;this.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:()=>{var e;null===(e=t.onComplete)||void 0===e||e.call(t),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const{targetWithTransforms:t,target:e,layout:n,latestValues:o}=this.getLead();t&&e&&n&&(Gr(t,e),er(t,o),Mi(this.projectionDeltaWithTransform,this.layoutCorrected,t,o))}registerSharedNode(t,e){var n,o,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new ns);this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(o=e.options.initialPromotionConfig)||void 0===o?void 0:o.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(o,e)})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const o=this.getStack();o&&o.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const n={};for(let o=0;o<$.length;o++){const i="rotate"+$[o];t.getStaticValue(i)&&(e=!0,n[i]=t.getStaticValue(i),t.setStaticValue(i,0))}if(e){null==t||t.syncRender();for(const e in n)t.setStaticValue(e,n[e]);t.scheduleRender()}}getProjectionStyles(t={}){var e,n,o,i,r,s;const a={};if(!this.instance||this.isSVG)return a;if(!this.isVisible)return{visibility:"hidden"};a.visibility="";const l=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=de(t.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const e={};return this.options.layoutId&&(e.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,e.pointerEvents=de(t.pointerEvents)||""),this.hasProjected&&!Yi(this.latestValues)&&(e.transform=l?l({},""):"none",this.hasProjected=!1),e}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=os(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:d,y:h}=this.projectionDelta;a.transformOrigin=`${100*d.origin}% ${100*h.origin}% 0`,u.animationValues?a.opacity=u===this?null!==(i=null!==(o=c.opacity)&&void 0!==o?o:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?null!==(r=c.opacity)&&void 0!==r?r:"":null!==(s=c.opacityExit)&&void 0!==s?s:0;for(const t in W){if(void 0===c[t])continue;const{correct:e,applyTo:n}=W[t],o=e(c[t],u);if(n){const t=n.length;for(let e=0;e<t;e++)a[n[e]]=o}else a[t]=o}return this.options.layoutId&&(a.pointerEvents=u===this?de(t.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(cs),this.root.sharedNodes.clear()}}}function as(t){t.updateLayout()}function ls(t){var e,n,o,i;const r=null!==(n=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==n?n:t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{actual:e,measured:n}=t.layout;"size"===t.options.animationType?Ni(t=>{const n=r.isShared?r.measured[t]:r.layout[t],o=ji(n);n.min=e[t].min,n.max=n.min+o}):"position"===t.options.animationType&&Ni(t=>{const n=r.isShared?r.measured[t]:r.layout[t],o=ji(e[t]);n.max=n.min+o});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Mi(o,e,r.layout);const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r.isShared?Mi(i,t.applyTransform(n,!0),r.measured):Mi(i,e,r.layout);const s=!ts(o);let a=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){const{snapshot:n,layout:o}=t.relativeParent;if(n&&o){const t={x:{min:0,max:0},y:{min:0,max:0}};Di(t,r.layout,n.layout);const i={x:{min:0,max:0},y:{min:0,max:0}};Di(i,e,o.actual),es(t,i)||(a=!0)}}t.notifyListeners("didUpdate",{layout:e,snapshot:r,delta:i,layoutDelta:o,hasLayoutChanged:s,hasRelativeTargetChanged:a})}else t.isLead()&&(null===(i=(o=t.options).onExitComplete)||void 0===i||i.call(o));t.options.transition=void 0}function us(t){t.clearSnapshot()}function cs(t){t.clearMeasurements()}function ds(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function hs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function ps(t){t.resolveTargetDelta()}function fs(t){t.calcProjection()}function ms(t){t.resetRotation()}function gs(t){t.removeLeadSnapshot()}function vs(t,e,n){t.translate=Ke(e.translate,0,n),t.scale=Ke(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ys(t,e,n,o){t.min=Ke(e.min,n.min,o),t.max=Ke(e.max,n.max,o)}function xs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const bs={duration:.45,ease:[.4,0,.1,1]};function Es(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const o=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);o&&t.mount(o,!0)}function ws(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ss(t){ws(t.x),ws(t.y)}const Ps=ss({attachResizeListener:(t,e)=>xe(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Ts=ss({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!As.current){const t=new Ps(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),As.current=t}return As.current},resetTransform:(t,e)=>{t.style.transform=null!=e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Os=Object.assign(Object.assign(Object.assign(Object.assign({},bi),wo),sr),Fr),js=U((t,e)=>ve(t,e,Os,Cr,Ts));const Vs=U(ve);function Cs(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ms(){const t=Cs(),[n,o]=e.useState(0),i=e.useCallback(()=>{t.current&&o(n+1)},[n]);return[e.useCallback(()=>Hn.postRender(i),[i]),n]}class Rs extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ls({children:t,isPresent:n}){const o=e.useId(),r=e.useRef(null),s=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{var t;const{width:e,height:i,top:a,left:l}=s.current;if(n||!r.current||!e||!i)return;r.current.dataset.motionPopId=o;const u=document.createElement("style");return document.head.appendChild(u),null===(t=u.sheet)||void 0===t||t.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),i.createElement(Rs,{isPresent:n,childRef:r,sizeRef:s},i.cloneElement(t,{ref:r}))}const Ds=({children:t,initial:n,isPresent:o,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:l})=>{const u=R(ks),c=e.useId(),d=e.useMemo(()=>({id:c,initial:n,isPresent:o,custom:s,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;null==r||r()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[o]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[o]),i.useEffect(()=>{!o&&!u.size&&(null==r||r())},[o]),"popLayout"===l&&(t=i.createElement(Ls,{isPresent:o},t)),i.createElement(g.Provider,{value:d},t)};function ks(){return new Map}const Fs=t=>t.key||"";const Is=e.createContext(null),Bs=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Us(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Bs);return{add:o=>{t.add(o),e.set(o,o.addEventListener("willUpdate",n))},remove:o=>{var i;t.delete(o),null===(i=e.get(o))||void 0===i||i(),e.delete(o),n()},dirty:n}}const zs=t=>!0===t,Ns=({children:t,id:n,inheritId:o,inherit:r=!0})=>{var s,a;void 0!==o&&(r=o);const l=e.useContext(k),u=e.useContext(Is),[c,d]=Ms(),h=e.useRef(null),p=null!==(s=l.id)&&void 0!==s?s:u;null===h.current&&((t=>zs(!0===t)||"id"===t)(r)&&p&&(n=n?p+"-"+n:p),h.current={id:n,group:zs(r)&&null!==(a=null==l?void 0:l.group)&&void 0!==a?a:Us()});const f=e.useMemo(()=>Object.assign(Object.assign({},h.current),{forceRender:c}),[d]);return i.createElement(k.Provider,{value:f},t)};let Ws=0;function Hs(t){return"function"==typeof t}const $s=e.createContext(null);const Ys=e.forwardRef((function(t,n){var{children:o,as:r="ul",axis:s="y",onReorder:a,values:l}=t,u=Gt(t,["children","as","axis","onReorder","values"]);const c=R(()=>js(r)),d=[],h=e.useRef(!1),p={axis:s,registerItem:(t,e)=>{e&&-1===d.findIndex(e=>t===e.value)&&(d.push({value:t,layout:e[s]}),d.sort(Gs))},updateOrder:(t,e,n)=>{if(h.current)return;const o=function(t,e,n,o){if(!o)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const r=o>0?1:-1,s=t[i+r];if(!s)return t;const a=t[i],l=s.layout,u=Ke(l.min,l.max,.5);return 1===r&&a.layout.max+n>u||-1===r&&a.layout.min+n<u?function([...t],e,n){const o=e<0?t.length+e:e;if(o>=0&&o<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}(t,i,i+r):t}(d,t,e,n);d!==o&&(h.current=!0,a(o.map(Xs).filter(t=>-1!==l.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(c,Object.assign({},u,{ref:n}),i.createElement($s.Provider,{value:p},o))}));function Xs(t){return t.value}function Gs(t,e){return t.layout.min-e.layout.min}function qs(t){const n=R(()=>Ko(t)),{isStatic:o}=e.useContext(p);if(o){const[,o]=e.useState(t);e.useEffect(()=>n.onChange(o),[])}return n}function Zs(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],i=t[1+n],r=t[2+n],s=t[3+n],a=fn(i,r,Object.assign({mixer:(l=r[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0)},s));var l;return e?a(o):a}function Ks(t,e){const n=qs(e()),o=()=>n.set(e());return o(),function(t,e){y(()=>{const n=t.map(t=>t.onChange(e));return()=>n.forEach(t=>t())})}(t,()=>Hn.update(o,!1,!0)),n}function _s(t,e,n,o){const i="function"==typeof e?e:Zs(e,n,o);return Array.isArray(t)?Js(t,i):Js([t],([t])=>i(t))}function Js(t,e){const n=R(()=>[]);return Ks(t,()=>{n.length=0;const o=t.length;for(let e=0;e<o;e++)n[e]=t[e].get();return e(n)})}function Qs(t,e=0){return J(t)?t:qs(e)}const ta={Group:Ys,Item:e.forwardRef((function(t,n){var{children:o,style:r,value:s,as:a="li",onDrag:l,layout:u=!0}=t,c=Gt(t,["children","style","value","as","onDrag","layout"]);const d=R(()=>js(a)),h=e.useContext($s),p={x:Qs(null==r?void 0:r.x),y:Qs(null==r?void 0:r.y)},f=_s([p.x,p.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null),{axis:g,registerItem:v,updateOrder:y}=h;return e.useEffect(()=>{v(s,m.current)},[h]),i.createElement(d,Object.assign({drag:g},c,{dragSnapToOrigin:!0,style:Object.assign(Object.assign({},r),{x:p.x,y:p.y,zIndex:f}),layout:u,onDrag:(t,e)=>{const{velocity:n}=e;n[g]&&y(s,p[g].get(),n[g]),null==l||l(t,e)},onLayoutMeasure:t=>{m.current=t},ref:n}),o)}))},ea=Object.assign(Object.assign({renderer:Cr},bi),wo),na=Object.assign(Object.assign(Object.assign(Object.assign({},ea),sr),Fr),{projectionNodeConstructor:Ts});const oa=t=>"number"==typeof t;function ia(t,e){return(t=>Array.isArray(t)&&!oa(t[0]))(t)?t[((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,e)]:t}const ra=(t,e,n)=>-n*t+n*e+t,sa=t=>t,aa=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function la(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const i=aa(0,e,o);t.push(ra(n,1,i))}}function ua(t){const e=[0];return la(e,t-1),e}function ca(t,e=ua(t.length),n=sa){const o=t.length,i=o-e.length;return i>0&&la(e,i),i=>{let r=0;for(;r<o-2&&!(i<e[r+1]);r++);let s=(a=0,l=1,u=aa(e[r],e[r+1],i),Math.min(Math.max(u,a),l));var a,l,u;return s=ia(n,r)(s),ra(t[r],t[r+1],s)}}const da=t=>"function"==typeof t,ha=t=>"string"==typeof t;function pa(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const fa={any:0,all:1};const ma=new WeakMap;let ga;function va({target:t,contentRect:e,borderBoxSize:n}){var o;null===(o=ma.get(t))||void 0===o||o.forEach(o=>{o({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function ya(t){t.forEach(va)}function xa(t,e){ga||"undefined"!=typeof ResizeObserver&&(ga=new ResizeObserver(ya));const n=pa(t);return n.forEach(t=>{let n=ma.get(t);n||(n=new Set,ma.set(t,n)),n.add(e),null==ga||ga.observe(t)}),()=>{n.forEach(t=>{const n=ma.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ga||ga.unobserve(t)})}}const ba=new Set;let Ea;function wa(t){return ba.add(t),Ea||(Ea=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ba.forEach(t=>t(e))},window.addEventListener("resize",Ea)),()=>{ba.delete(t),!ba.size&&Ea&&(Ea=void 0)}}const Sa={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Pa(t,e,n,o){const i=n[e],{length:r,position:s}=Sa[e],a=i.current,l=n.time;i.current=t["scroll"+s],i.scrollLength=t["scroll"+r]-t["client"+r],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=aa(0,i.scrollLength,i.current);const u=o-l;var c,d;i.velocity=u>50?0:(c=i.current-a,(d=u)?c*(1e3/d):0)}const Aa={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ta={start:0,center:.5,end:1};function Oa(t,e,n=0){let o=0;if(void 0!==Ta[t]&&(t=Ta[t]),ha(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return oa(t)&&(o=e*t),n+o}const ja=[0,0];function Va(t,e,n,o){let i=Array.isArray(t)?t:ja,r=0,s=0;return oa(t)?i=[t,t]:ha(t)&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Ta[t]?t:"0"]),r=Oa(i[0],n,o),s=Oa(i[1],e),r-s}const Ca={x:0,y:0};function Ma(t,e,n){let{offset:o=Aa.All}=n;const{target:i=t,axis:r="y"}=n,s="y"===r?"height":"width",a=i!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(i,t):Ca,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const d=o.length;for(let t=0;t<d;t++){const n=Va(o[t],u[s],l[s],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=ca(ua(d),e[r].offset),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=e[r].interpolate(e[r].current)}function Ra(t,e,n,o={}){const i=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){Pa(t,"x",e,n),Pa(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&Ma(t,n,o)},notify:da(e)?()=>e(n):La(e,n[i])}}function La(t,e){return t.pause(),t.forEachNative((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=sa),t.updateDuration(1);else{const i={duration:1e3};e||(i.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,i)}}),()=>{t.currentTime=e.progress}}const Da=new WeakMap,ka=new WeakMap,Fa=new WeakMap,Ia=t=>t===document.documentElement?window:t;function Ba(t,e={}){var{container:n=document.documentElement}=e,o=Gt(e,["container"]);let i=Fa.get(n);i||(i=new Set,Fa.set(n,i));const r=Ra(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(r),!Da.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};Da.set(n,t);const e=Ia(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&ka.set(n,function(t,e){return da(t)?wa(t):xa(t,e)}(n,t)),e.addEventListener("scroll",t,{passive:!0})}const s=Da.get(n),a=requestAnimationFrame(s);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(a);const o=Fa.get(n);if(!o)return;if(o.delete(r),o.size)return;const i=Da.get(n);Da.delete(n),i&&(Ia(n).removeEventListener("scroll",i),null===(e=ka.get(n))||void 0===e||e(),window.removeEventListener("resize",i))}}const Ua=()=>({scrollX:Ko(0),scrollY:Ko(0),scrollXProgress:Ko(0),scrollYProgress:Ko(0)});function za(t={}){var{container:e,target:n}=t,o=Gt(t,["container","target"]);const i=R(Ua);return y(()=>Ba(({x:t,y:e})=>{i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(e.current),i.scrollYProgress.set(e.progress)},Object.assign(Object.assign({},o),{container:(null==e?void 0:e.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),i}function Na(t){const n=e.useRef(0),{isStatic:o}=e.useContext(p);e.useEffect(()=>{if(o)return;const e=({timestamp:e})=>{n.current||(n.current=e),t(e-n.current)};return Hn.update(e,!0),()=>$n.update(e)},[t])}class Wa extends Zo{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;q(t)?(this.transforms.add(t),e="transform"):K(t)||tt(t)||"willChange"===t||(e=ne(t)),e&&(Xo(this.members,e),this.update())}remove(t){q(t)?(this.transforms.delete(t),this.transforms.size||Go(this.members,"transform")):Go(this.members,ne(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Ha(){let t=!1;const e=[],n=new Set,o={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(o,i){if(t){const t=[];return n.forEach(e=>{t.push(ui(e,o,{transitionOverride:i}))}),Promise.all(t)}return new Promise(t=>{e.push({animation:[o,i],resolve:t})})},set:t=>n.forEach(e=>{!function(t,e){Array.isArray(e)?ii(t,e):"string"==typeof e?ii(t,[e]):oi(t,e)}(e,t)}),stop(){n.forEach(t=>{!function(t){t.forEachValue(t=>t.stop())}(t)})},mount:()=>(t=!0,e.forEach(({animation:t,resolve:e})=>{o.start(...t).then(e)}),()=>{t=!1,o.stop()})};return o}function $a(){const t=R(Ha);return e.useEffect(t.mount,[]),t}const Ya=$a;class Xa{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Ga=()=>new Xa;function qa(){return Za}function Za(t){As.current&&(As.current.isUpdating=!1,As.current.blockUpdate(),null==t||t())}const Ka=()=>({}),_a=lr({build(){},measureViewportBox:zi,resetTransform(){},restoreTransform(){},removeValueFromRenderState(){},render(){},scrapeMotionValuesFromProps:Ka,readValueFromInstance:(t,e,n)=>n.initialState[e]||0,makeTargetAnimatable(t,e){var{transition:n,transitionEnd:o}=e,i=Gt(e,["transition","transitionEnd"]);return ri(t,i,ai(i,n||{},t)),Object.assign({transition:n,transitionEnd:o},i)}}),Ja=pe({scrapeMotionValuesFromProps:Ka,createRenderState:Ka});const Qa=t=>t>.001?1/t:1e5;t.AnimatePresence=({children:t,custom:n,initial:o=!0,onExitComplete:r,exitBeforeEnter:a,presenceAffectsLayout:l=!0,mode:u="sync"})=>{a&&(u="wait",ho(!1,"Replace exitBeforeEnter with mode='wait'"));let[c]=Ms();const d=e.useContext(k).forceRender;d&&(c=d);const h=Cs(),p=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let f=p;const m=new Set,g=e.useRef(f),v=e.useRef(new Map).current,x=e.useRef(!0);if(y(()=>{x.current=!1,function(t,e){t.forEach(t=>{const n=Fs(t);e.set(n,t)})}(p,v),g.current=f}),ze(()=>{x.current=!0,v.clear(),m.clear()}),x.current)return i.createElement(i.Fragment,null,f.map(t=>i.createElement(Ds,{key:Fs(t),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:l,mode:u},t)));f=[...f];const b=g.current.map(Fs),E=p.map(Fs),w=b.length;for(let t=0;t<w;t++){const e=b[t];-1===E.indexOf(e)&&m.add(e)}return"wait"===u&&m.size&&(f=[]),m.forEach(t=>{if(-1!==E.indexOf(t))return;const e=v.get(t);if(!e)return;const o=b.indexOf(t);f.splice(o,0,i.createElement(Ds,{key:Fs(e),isPresent:!1,onExitComplete:()=>{v.delete(t),m.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!m.size){if(g.current=p,!1===h.current)return;c(),r&&r()}},custom:n,presenceAffectsLayout:l,mode:u},e))}),f=f.map(t=>{const e=t.key;return m.has(e)?t:i.createElement(Ds,{key:Fs(t),isPresent:!0,presenceAffectsLayout:l,mode:u},t)}),"production"!==s&&"wait"===u&&f.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),i.createElement(i.Fragment,null,m.size?f:f.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),i.createElement(Ns,{id:R(()=>"asl-"+Ws++)},t)),t.DeprecatedLayoutGroupContext=Is,t.DragControls=Xa,t.FlatTree=rs,t.LayoutGroup=Ns,t.LayoutGroupContext=k,t.LazyMotion=function({children:t,features:n,strict:o=!1}){const[,r]=e.useState(!Hs(n)),s=e.useRef(void 0);if(!Hs(n)){const{renderer:t}=n,e=Gt(n,["renderer"]);s.current=t,u(e)}return e.useEffect(()=>{Hs(n)&&n().then(t=>{var{renderer:e}=t;u(Gt(t,["renderer"])),s.current=e,r(!0)})},[]),i.createElement(c.Provider,{value:{renderer:s.current,strict:o}},t)},t.MotionConfig=function(t){var{children:n,isValidProp:o}=t,r=Gt(t,["children","isValidProp"]);o&&Yt(o),(r=Object.assign(Object.assign({},e.useContext(p)),r)).isStatic=R(()=>r.isStatic);const s=e.useMemo(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return i.createElement(p.Provider,{value:s},n)},t.MotionConfigContext=p,t.MotionContext=f,t.MotionValue=Zo,t.PresenceContext=g,t.Reorder=ta,t.SwitchLayoutGroupContext=F,t.addPointerEvent=Me,t.addScaleCorrector=H,t.animate=Ir,t.animateVisualElement=ui,t.animationControls=Ha,t.animations=bi,t.calcLength=ji,t.checkTargetForNewValues=ri,t.createBox=zi,t.createDomMotionComponent=function(t){return B(ve(t,{forwardMotionProps:!1},Os,Cr,Ts))},t.createMotionComponent=B,t.domAnimation=ea,t.domMax=na,t.filterProps=Xt,t.isBrowser=v,t.isDragActive=Ie,t.isMotionValue=J,t.isValidMotionProp=Ht,t.m=Vs,t.makeUseVisualState=pe,t.motion=js,t.motionValue=Ko,t.resolveMotionValue=de,t.transform=Zs,t.useAnimation=Ya,t.useAnimationControls=$a,t.useAnimationFrame=Na,t.useCycle=function(...t){const n=e.useRef(0),[o,i]=e.useState(t[n.current]);return[o,e.useCallback(e=>{n.current="number"!=typeof e?((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,o]=e.useState(t),i=Ja({},!1),r=R(()=>_a({props:{},visualState:i},{initialState:t}));return e.useEffect(()=>(r.mount({}),r.unmount),[r]),e.useEffect(()=>{r.setProps({onUpdate:t=>{o(Object.assign({},t))}})},[o,r]),[n,R(()=>t=>ui(r,t))]},t.useDeprecatedInvertedScale=function(t){let e=qs(1),n=qs(1);const o=m();return t?(e=t.scaleX||e,n=t.scaleY||n):o&&(e=o.getValue("scaleX",1),n=o.getValue("scaleY",1)),{scaleX:_s(e,Qa),scaleY:_s(n,Qa)}},t.useDomEvent=be,t.useDragControls=function(){return R(Ga)},t.useElementScroll=function(t){return ho(!1,"useElementScroll is deprecated. Convert to useScroll({ container: ref })."),za({container:t})},t.useForceUpdate=Ms,t.useInView=function(t,{root:n,margin:o,amount:i,once:r=!1}={}){const[s,a]=e.useState(!1);return e.useEffect(()=>{var e;if(!t.current||r&&s)return;const l={root:null!==(e=null==n?void 0:n.current)&&void 0!==e?e:void 0,margin:o,amount:"some"===i?"any":i};return function(t,e,{root:n,margin:o,amount:i="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const r=pa(t),s=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=s.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);da(n)?s.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),s.delete(t.target))})},{root:n,rootMargin:o,threshold:"number"==typeof i?i:fa[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()}(t.current,()=>(a(!0),r?void 0:()=>a(!1)),l)},[n,t,o,r]),s},t.useInstantLayoutTransition=qa,t.useInstantTransition=function(){const[t,n]=Ms(),o=qa();return e.useEffect(()=>{Hn.postRender(()=>Hn.postRender(()=>Io.current=!1))},[n]),e=>{o(()=>{Io.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(g))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Ks(e,(function(){let o="";for(let i=0;i<n;i++){o+=t[i];e[i]&&(o+=e[i].get())}return o}))},t.useMotionValue=qs,t.usePresence=So,t.useReducedMotion=E,t.useReducedMotionConfig=w,t.useResetProjection=function(){return i.useCallback(()=>{const t=As.current;t&&t.resetTree()},[])},t.useScroll=za,t.useSpring=function(t,n={}){const{isStatic:o}=e.useContext(p),i=e.useRef(null),r=qs(J(t)?t.get():t);return e.useMemo(()=>r.attach((t,e)=>o?e(t):(i.current&&i.current.stop(),i.current=Jn(Object.assign(Object.assign({from:r.get(),to:t,velocity:r.getVelocity()},n),{onUpdate:e})),r.get())),[JSON.stringify(n)]),function(t,e){y(()=>{if(J(t))return t.onChange(e)},[e])}(t,t=>r.set(parseFloat(t))),r},t.useTime=function(){const t=qs(0);return Na(e=>t.set(e)),t},t.useTransform=_s,t.useUnmountEffect=ze,t.useVelocity=function(t){const n=qs(t.getVelocity());return e.useEffect(()=>t.velocityUpdateSubscribers.add(t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return ho(!1,"useViewportScroll is deprecated. Convert to useScroll()."),za()},t.useVisualElementContext=m,t.useWillChange=function(){return R(()=>new Wa("auto"))},t.visualElement=lr,t.wrapHandler=Oe,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var r=n(e),i=o(e);const s=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({});function l(){return e.useContext(a).visualElement}const u=e.createContext(null),c="undefined"!=typeof document,d=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function f(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function p(t){return"string"==typeof t||Array.isArray(t)}function m(t){return"object"==typeof t&&"function"==typeof t.start}const g=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function v(t){return m(t.animate)||g.some(e=>p(t[e]))}function y(t){return Boolean(v(t)||t.variants)}function x(t){const{initial:n,animate:o}=function(t,e){if(v(t)){const{initial:e,animate:n}=t;return{initial:!1===e||p(e)?e:void 0,animate:p(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:o}),[b(n),b(o)])}function b(t){return Array.isArray(t)?t.join(" "):t}const w=t=>({isEnabled:e=>t.some(t=>!!e[t])}),E={measureLayout:w(["layout","layoutId","drag"]),animation:w(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:w(["exit"]),drag:w(["drag","dragControls"]),focus:w(["whileFocus"]),hover:w(["whileHover","onHoverStart","onHoverEnd"]),tap:w(["whileTap","onTap","onTapStart","onTapCancel"]),pan:w(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:w(["whileInView","onViewportEnter","onViewportLeave"])};function S(t){for(const e in t)"projectionNodeConstructor"===e?E.projectionNodeConstructor=t[e]:E[e].Component=t[e]}function A(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const P={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let T=1;const C=e.createContext({});class V extends r.default.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:e}=this.props;return t&&t.setProps(e),null}componentDidUpdate(){}render(){return this.props.children}}const M=e.createContext({});function R({preloadedFeatures:t,createVisualElement:n,projectionNodeConstructor:o,useRender:r,useVisualState:p,Component:m}){return t&&S(t),e.forwardRef((function(g,v){const y={...e.useContext(s),...g,layoutId:L(g)},{isStatic:b}=y;let w=null;const S=x(g),C=b?void 0:A(()=>{if(P.hasEverUpdated)return T++}),R=p(g,b);if(!b&&c){S.visualElement=function(t,n,o,r){const i=l(),a=e.useContext(h),c=e.useContext(u),f=e.useContext(s).reducedMotion,p=e.useRef(void 0);r=r||a.renderer,!p.current&&r&&(p.current=r(t,{visualState:n,parent:i,props:o,presenceId:c?c.id:void 0,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f}));const m=p.current;return d(()=>{m&&m.syncRender()}),e.useEffect(()=>{m&&m.animationState&&m.animationState.animateChanges()}),d(()=>()=>m&&m.notifyUnmount(),[]),m}(m,R,y,n);const r=e.useContext(h).strict,i=e.useContext(M);S.visualElement&&(w=S.visualElement.loadFeatures(g,r,t,C,o||E.projectionNodeConstructor,i))}return i.createElement(V,{visualElement:S.visualElement,props:y},w,i.createElement(a.Provider,{value:S},r(m,g,C,function(t,n,o){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):f(o)&&(o.current=e))},[n])}(R,S.visualElement,v),R,b,S.visualElement)))}))}function L({layoutId:t}){const n=e.useContext(C).id;return n&&void 0!==t?n+"-"+t:t}function O(t){function e(e,n={}){return R(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const k=["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 D(t){return"string"==typeof t&&!t.includes("-")&&!!(k.indexOf(t)>-1||/[A-Z]/.test(t))}const j={};function F(t){Object.assign(j,t)}const I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],B=new Set(I);function U(t,{layout:e,layoutId:n}){return B.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!j[t]||"opacity"===t)}const z=t=>void 0!==t&&!!t.getVelocity,N={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W=(t,e)=>I.indexOf(t)-I.indexOf(e);function H(t){return t.startsWith("--")}const $=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Y=(t,e)=>n=>Math.max(Math.min(n,e),t),X=t=>t%1?Number(t.toFixed(5)):t,G=/(-)?([\d]*\.?[\d])+/g,q=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function K(t){return"string"==typeof t}const _={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},J=Object.assign(Object.assign({},_),{transform:Y(0,1)}),Q=Object.assign(Object.assign({},_),{default:1}),tt=t=>({test:e=>K(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),et=tt("deg"),nt=tt("%"),ot=tt("px"),rt=tt("vh"),it=tt("vw"),st=Object.assign(Object.assign({},nt),{parse:t=>nt.parse(t)/100,transform:t=>nt.transform(100*t)}),at=(t,e)=>n=>Boolean(K(n)&&Z.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),lt=(t,e,n)=>o=>{if(!K(o))return o;const[r,i,s,a]=o.match(G);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},ut={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:o=1})=>"hsla("+Math.round(t)+", "+nt.transform(X(e))+", "+nt.transform(X(n))+", "+X(J.transform(o))+")"},ct=Y(0,255),dt=Object.assign(Object.assign({},_),{transform:t=>Math.round(ct(t))}),ht={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:o=1})=>"rgba("+dt.transform(t)+", "+dt.transform(e)+", "+dt.transform(n)+", "+X(J.transform(o))+")"};const ft={test:at("#"),parse:function(t){let e="",n="",o="",r="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),r=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),r=t.substr(4,1),e+=e,n+=n,o+=o,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}},transform:ht.transform},pt={test:t=>ht.test(t)||ft.test(t)||ut.test(t),parse:t=>ht.test(t)?ht.parse(t):ut.test(t)?ut.parse(t):ft.parse(t),transform:t=>K(t)?t:t.hasOwnProperty("red")?ht.transform(t):ut.transform(t)};function mt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const o=t.match(q);o&&(n=o.length,t=t.replace(q,"${c}"),e.push(...o.map(pt.parse)));const r=t.match(G);return r&&(t=t.replace(G,"${n}"),e.push(...r.map(_.parse))),{values:e,numColors:n,tokenised:t}}function gt(t){return mt(t).values}function vt(t){const{values:e,numColors:n,tokenised:o}=mt(t),r=e.length;return t=>{let e=o;for(let o=0;o<r;o++)e=e.replace(o<n?"${c}":"${n}",o<n?pt.transform(t[o]):X(t[o]));return e}}const yt=t=>"number"==typeof t?0:t;const xt={test:function(t){var e,n,o,r;return isNaN(t)&&K(t)&&(null!==(n=null===(e=t.match(G))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(r=null===(o=t.match(q))||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0},parse:gt,createTransformer:vt,getAnimatableNone:function(t){const e=gt(t);return vt(t)(e.map(yt))}},bt=new Set(["brightness","contrast","saturate","opacity"]);function wt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[o]=n.match(G)||[];if(!o)return t;const r=n.replace(o,"");let i=bt.has(e)?1:0;return o!==n&&(i*=100),e+"("+i+r+")"}const Et=/([a-z-]*)\(.*?\)/g,St=Object.assign(Object.assign({},xt),{getAnimatableNone:t=>{const e=t.match(Et);return e?e.map(wt).join(" "):t}}),At={..._,transform:Math.round},Pt={borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,size:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:Q,scaleX:Q,scaleY:Q,scaleZ:Q,skew:et,skewX:et,skewY:et,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:J,originX:st,originY:st,originZ:ot,zIndex:At,fillOpacity:J,strokeOpacity:J,numOctaves:At};function Tt(t,e,n,o){const{style:r,vars:i,transform:s,transformKeys:a,transformOrigin:l}=t;a.length=0;let u=!1,c=!1,d=!0;for(const t in e){const n=e[t];if(H(t)){i[t]=n;continue}const o=Pt[t],h=$(n,o);if(B.has(t)){if(u=!0,s[t]=h,a.push(t),!d)continue;n!==(o.default||0)&&(d=!1)}else t.startsWith("origin")?(c=!0,l[t]=h):r[t]=h}if(u||o?r.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:o=!0},r,i){let s="";e.sort(W);for(const n of e)s+=`${N[n]||n}(${t[n]}) `;return n&&!t.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(t,r?"":s):o&&r&&(s="none"),s}(t,n,d,o):!e.transform&&r.transform&&(r.transform="none"),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;r.transformOrigin=`${t} ${e} ${n}`}}const Ct=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Vt(t,e,n){for(const o in e)z(e[o])||U(o,n)||(t[o]=e[o])}function Mt(t,n,o){const r={};return Vt(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,o){return e.useMemo(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Tt(e,n,{enableHardwareAcceleration:!o},t),Object.assign({},e.vars,e.style)},[n])}(t,n,o)),t.transformValues?t.transformValues(r):r}function Rt(t,e,n){const o={},r=Mt(t,e,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),o.style=r,o}const Lt=new Set(["initial","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function Ot(t){return Lt.has(t)}let kt=t=>!Ot(t);function Dt(t){t&&(kt=e=>e.startsWith("on")?!Ot(e):t(e))}try{Dt(require("@emotion/is-prop-valid").default)}catch(t){}function jt(t,e,n){const o={};for(const r in t)(kt(r)||!0===n&&Ot(r)||!e&&!Ot(r)||t.draggable&&r.startsWith("onDrag"))&&(o[r]=t[r]);return o}function Ft(t,e,n){return"string"==typeof t?t:ot.transform(e+n*t)}const It={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ut(t,{attrX:e,attrY:n,originX:o,originY:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...l},u,c){Tt(t,l,u,c),t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:f}=t;d.transform&&(f&&(h.transform=d.transform),delete d.transform),f&&(void 0!==o||void 0!==r||h.transform)&&(h.transformOrigin=function(t,e,n){return`${Ft(e,t.x,t.width)} ${Ft(n,t.y,t.height)}`}(f,void 0!==o?o:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&function(t,e,n=1,o=0,r=!0){t.pathLength=1;const i=r?It:Bt;t[i.offset]=ot.transform(-o);const s=ot.transform(e),a=ot.transform(n);t[i.array]=`${s} ${a}`}(d,i,s,a,!1)}const zt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function Nt(t,n){const o=e.useMemo(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return Ut(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Vt(e,t.style,t),o.style={...e,...o.style}}return o}function Wt(t=!1){return(n,o,r,i,{latestValues:s},a)=>{const l=(D(n)?Nt:Rt)(o,s,a),u={...jt(o,"string"==typeof n,t),...l,ref:i};return r&&(u["data-projection-id"]=r),e.createElement(n,u)}}const Ht=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function $t(t,{style:e,vars:n},o,r){Object.assign(t.style,e,r&&r.getProjectionStyles(o));for(const e in n)t.style.setProperty(e,n[e])}const Yt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Xt(t,e,n,o){$t(t,e,void 0,o);for(const n in e.attrs)t.setAttribute(Yt.has(n)?n:Ht(n),e.attrs[n])}function Gt(t){const{style:e}=t,n={};for(const o in e)(z(e[o])||U(o,t))&&(n[o]=e[o]);return n}function qt(t){const e=Gt(t);for(const n in t)if(z(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function Zt(t,e,n,o={},r={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,r)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,r)),e}const Kt=t=>Array.isArray(t),_t=t=>Kt(t)?t[t.length-1]||0:t;function Jt(t){const e=z(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Qt=t=>(n,o)=>{const r=e.useContext(a),i=e.useContext(u),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},o,r,i){const s={latestValues:te(o,r,i,t),renderState:e()};return n&&(s.mount=t=>n(o,t,s)),s}(t,n,r,i);return o?s():A(s)};function te(t,e,n,o){const r={},i=o(t);for(const t in i)r[t]=Jt(i[t]);let{initial:s,animate:a}=t;const l=v(t),u=y(t);e&&u&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const d=c?a:s;if(d&&"boolean"!=typeof d&&!m(d)){(Array.isArray(d)?d:[d]).forEach(e=>{const n=Zt(t,e);if(!n)return;const{transitionEnd:o,transition:i,...s}=n;for(const t in s){let e=s[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(r[t]=e)}for(const t in o)r[t]=o[t]})}return r}const ee={useVisualState:Qt({scrapeMotionValuesFromProps:qt,createRenderState:zt,onMount:(t,e,{renderState:n,latestValues:o})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Ut(n,o,{enableHardwareAcceleration:!1},t.transformTemplate),Xt(e,n)}})},ne={useVisualState:Qt({scrapeMotionValuesFromProps:Gt,createRenderState:Ct})};function oe(t,{forwardMotionProps:e=!1},n,o,r){return{...D(t)?ee:ne,preloadedFeatures:n,useRender:Wt(e),createVisualElement:o,projectionNodeConstructor:r,Component:t}}var re;function ie(t,e,n,o={passive:!0}){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function se(t,n,o,r){e.useEffect(()=>{const e=t.current;if(o&&e)return ie(e,n,o,r)},[t,n,o,r])}function ae(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function le(t){return!!t.touches}t.AnimationType=void 0,(re=t.AnimationType||(t.AnimationType={})).Animate="animate",re.Hover="whileHover",re.Tap="whileTap",re.Drag="whileDrag",re.Focus="whileFocus",re.InView="whileInView",re.Exit="exit";const ue={pageX:0,pageY:0};function ce(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||ue;return{x:n[e+"X"],y:n[e+"Y"]}}function de(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function he(t,e="page"){return{point:le(t)?ce(t,e):de(t,e)}}const fe=(t,e=!1)=>{const n=e=>t(e,he(e));return e?(o=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&o(t)}):n;var o},pe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},me={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ge(t){return c&&null===window.onpointerdown?t:c&&null===window.ontouchstart?me[t]:c&&null===window.onmousedown?pe[t]:t}function ve(t,e,n,o){return ie(t,ge(e),fe(n,"pointerdown"===e),o)}function ye(t,e,n,o){return se(t,ge(e),n&&fe(n,"pointerdown"===e),o)}function xe(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const be=xe("dragHorizontal"),we=xe("dragVertical");function Ee(t){let e=!1;if("y"===t)e=we();else if("x"===t)e=be();else{const t=be(),n=we();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Se(){const t=Ee(!0);return!t||(t(),!1)}function Ae(e,n,o){return(r,i)=>{ae(r)&&!Se()&&(e.animationState&&e.animationState.setActive(t.AnimationType.Hover,n),o&&o(r,i))}}const Pe=(t,e)=>!!e&&(t===e||Pe(t,e.parentElement));function Te(t){return e.useEffect(()=>()=>t(),[])}function Ce(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}const Ve=(t,e,n)=>Math.min(Math.max(n,t),e);function Me({duration:t=800,bounce:e=.25,velocity:n=0,mass:o=1}){let r,i,s=1-e;s=Ve(.05,1,s),t=Ve(.01,10,t/1e3),s<1?(r=e=>{const o=e*s,r=o*t;return.001-(o-n)/Re(e,s)*Math.exp(-r)},i=e=>{const o=e*s*t,i=o*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-o),u=Re(Math.pow(e,2),s);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let o=n;for(let n=1;n<12;n++)o-=t(o)/e(o);return o}(r,i,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*o;return{stiffness:e,damping:2*s*Math.sqrt(o*e),duration:t}}}function Re(t,e){return t*Math.sqrt(1-e*e)}const Le=["duration","bounce"],Oe=["stiffness","damping","mass"];function ke(t,e){return e.some(e=>void 0!==t[e])}function De(t){var{from:e=0,to:n=1,restSpeed:o=2,restDelta:r}=t,i=Ce(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:h}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!ke(t,Oe)&&ke(t,Le)){const n=Me(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),f=je,p=je;function m(){const t=c?-c/1e3:0,o=n-e,i=l/(2*Math.sqrt(a*u)),s=Math.sqrt(a/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(n-e)/100,.4)),i<1){const e=Re(s,i);f=r=>{const a=Math.exp(-i*s*r);return n-a*((t+i*s*o)/e*Math.sin(e*r)+o*Math.cos(e*r))},p=n=>{const r=Math.exp(-i*s*n);return i*s*r*(Math.sin(e*n)*(t+i*s*o)/e+o*Math.cos(e*n))-r*(Math.cos(e*n)*(t+i*s*o)-e*o*Math.sin(e*n))}}else if(1===i)f=e=>n-Math.exp(-s*e)*(o+(t+s*o)*e);else{const e=s*Math.sqrt(i*i-1);f=r=>{const a=Math.exp(-i*s*r),l=Math.min(e*r,300);return n-a*((t+i*s*o)*Math.sinh(l)+e*o*Math.cosh(l))/e}}}return m(),{next:t=>{const e=f(t);if(h)s.done=t>=d;else{const i=1e3*p(t),a=Math.abs(i)<=o,l=Math.abs(n-e)<=r;s.done=a&&l}return s.value=s.done?n:e,s},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}De.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const je=t=>0,Fe=(t,e,n)=>{const o=e-t;return 0===o?1:(n-t)/o},Ie=(t,e,n)=>-n*t+n*e+t;function Be(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ue({hue:t,saturation:e,lightness:n,alpha:o}){t/=360,n/=100;let r=0,i=0,s=0;if(e/=100){const o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;r=Be(a,o,t+1/3),i=Be(a,o,t),s=Be(a,o,t-1/3)}else r=i=s=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*s),alpha:o}}const ze=(t,e,n)=>{const o=t*t,r=e*e;return Math.sqrt(Math.max(0,n*(r-o)+o))},Ne=[ft,ht,ut],We=t=>Ne.find(e=>e.test(t)),He=(t,e)=>{let n=We(t),o=We(e),r=n.parse(t),i=o.parse(e);n===ut&&(r=Ue(r),n=ht),o===ut&&(i=Ue(i),o=ht);const s=Object.assign({},r);return t=>{for(const e in s)"alpha"!==e&&(s[e]=ze(r[e],i[e],t));return s.alpha=Ie(r.alpha,i.alpha,t),n.transform(s)}},$e=t=>"number"==typeof t,Ye=(t,e)=>n=>e(t(n)),Xe=(...t)=>t.reduce(Ye);function Ge(t,e){return $e(t)?n=>Ie(t,e,n):pt.test(t)?He(t,e):_e(t,e)}const qe=(t,e)=>{const n=[...t],o=n.length,r=t.map((t,n)=>Ge(t,e[n]));return t=>{for(let e=0;e<o;e++)n[e]=r[e](t);return n}},Ze=(t,e)=>{const n=Object.assign(Object.assign({},t),e),o={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(o[r]=Ge(t[r],e[r]));return t=>{for(const e in o)n[e]=o[e](t);return n}};function Ke(t){const e=xt.parse(t),n=e.length;let o=0,r=0,i=0;for(let t=0;t<n;t++)o||"number"==typeof e[t]?o++:void 0!==e[t].hue?i++:r++;return{parsed:e,numNumbers:o,numRGB:r,numHSL:i}}const _e=(t,e)=>{const n=xt.createTransformer(e),o=Ke(t),r=Ke(e);return o.numHSL===r.numHSL&&o.numRGB===r.numRGB&&o.numNumbers>=r.numNumbers?Xe(qe(o.parsed,r.parsed),n):n=>""+(n>0?e:t)},Je=(t,e)=>n=>Ie(t,e,n);function Qe(t,e,n){const o=[],r=n||("number"==typeof(i=t[0])?Je:"string"==typeof i?pt.test(i)?He:_e:Array.isArray(i)?qe:"object"==typeof i?Ze:void 0);var i;const s=t.length-1;for(let n=0;n<s;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Xe(t,i)}o.push(i)}return o}function tn(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const i=t.length;e.length,!o||!Array.isArray(o)||o.length,t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const s=Qe(e,o,r),a=2===i?function([t,e],[n]){return o=>n(Fe(t,e,o))}(t,s):function(t,e){const n=t.length,o=n-1;return r=>{let i=0,s=!1;if(r<=t[0]?s=!0:r>=t[o]&&(i=o-1,s=!0),!s){let e=1;for(;e<n&&!(t[e]>r||e===o);e++);i=e-1}const a=Fe(t[i],t[i+1],r);return e[i](a)}}(t,s);return n?e=>a(Ve(t[0],t[i-1],e)):a}const en=t=>e=>1-t(1-e),nn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,on=t=>e=>e*e*((t+1)*e-t),rn=t=>t,sn=(an=2,t=>Math.pow(t,an));var an;const ln=en(sn),un=nn(sn),cn=t=>1-Math.sin(Math.acos(t)),dn=en(cn),hn=nn(dn),fn=on(1.525),pn=en(fn),mn=nn(fn),gn=(t=>{const e=on(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),vn=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},yn=en(vn);function xn(t,e){return t.map(()=>e||un).splice(0,t.length-1)}function bn({from:t=0,to:e=1,ease:n,offset:o,duration:r=300}){const i={done:!1,value:t},s=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(o&&o.length===s.length?o:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(s),r);function l(){return tn(a,s,{ease:Array.isArray(n)?n:xn(s,n)})}let u=l();return{next:t=>(i.value=u(t),i.done=t>=r,i),flipTarget:()=>{s.reverse(),u=l()}}}const wn={keyframes:bn,spring:De,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:o=350,restDelta:r=.5,modifyTarget:i}){const s={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===i?l:i(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/o);return s.done=!(e>r||e<-r),s.value=s.done?u:u+e,s},flipTarget:()=>{}}}};const En="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Sn="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(En()),1/60*1e3);let An=!0,Pn=!1,Tn=!1;const Cn={delta:0,timestamp:0},Vn=["read","update","preRender","render","postRender"],Mn=Vn.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],o=0,r=!1,i=!1;const s=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const l=a&&r,u=l?e:n;return i&&s.add(t),-1===u.indexOf(t)&&(u.push(t),l&&r&&(o=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),s.delete(t)},process:l=>{if(r)i=!0;else{if(r=!0,[e,n]=[n,e],n.length=0,o=e.length,o)for(let n=0;n<o;n++){const o=e[n];o(l),s.has(o)&&(a.schedule(o),t())}r=!1,i&&(i=!1,a.process(l))}}};return a}(()=>Pn=!0),t),{}),Rn=Vn.reduce((t,e)=>{const n=Mn[e];return t[e]=(t,e=!1,o=!1)=>(Pn||jn(),n.schedule(t,e,o)),t},{}),Ln=Vn.reduce((t,e)=>(t[e]=Mn[e].cancel,t),{}),On=Vn.reduce((t,e)=>(t[e]=()=>Mn[e].process(Cn),t),{}),kn=t=>Mn[t].process(Cn),Dn=t=>{Pn=!1,Cn.delta=An?1/60*1e3:Math.max(Math.min(t-Cn.timestamp,40),1),Cn.timestamp=t,Tn=!0,Vn.forEach(kn),Tn=!1,Pn&&(An=!1,Sn(Dn))},jn=()=>{Pn=!0,An=!0,Tn||Sn(Dn)},Fn=()=>Cn;function In(t,e,n=0){return t-e-n}const Bn=t=>{const e=({delta:e})=>t(e);return{start:()=>Rn.update(e,!0),stop:()=>Ln.update(e)}};function Un(t){var e,n,{from:o,autoplay:r=!0,driver:i=Bn,elapsed:s=0,repeat:a=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:h,onRepeat:f,onUpdate:p}=t,m=Ce(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,v,y,{to:x}=m,b=0,w=m.duration,E=!1,S=!0;const A=function(t){if(Array.isArray(t.to))return bn;if(wn[t.type])return wn[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?bn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?De:bn}(m);(null===(n=(e=A).needsInterpolation)||void 0===n?void 0:n.call(e,o,x))&&(y=tn([0,100],[o,x],{clamp:!1}),o=0,x=100);const P=A(Object.assign(Object.assign({},m),{from:o,to:x}));function T(){b++,"reverse"===l?(S=b%2==0,s=function(t,e,n=0,o=!0){return o?In(e+-t,e,n):e-(t-e)+n}(s,w,u,S)):(s=In(s,w,u),"mirror"===l&&P.flipTarget()),E=!1,f&&f()}function C(t){if(S||(t=-t),s+=t,!E){const t=P.next(Math.max(0,s));v=t.value,y&&(v=y(v)),E=S?t.done:s<=0}null==p||p(v),E&&(0===b&&(null!=w||(w=s)),b<a?function(t,e,n,o){return o?t>=e+n:t<=-n}(s,w,u,S)&&T():(g.stop(),h&&h()))}return r&&(null==c||c(),g=i(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function zn(t,e){return e?t*(1e3/e):0}const Nn=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Wn=t=>Nn(t)&&t.hasOwnProperty("z"),Hn=(t,e)=>Math.abs(t-e);function $n(t,e){if($e(t)&&$e(e))return Hn(t,e);if(Nn(t)&&Nn(e)){const n=Hn(t.x,e.x),o=Hn(t.y,e.y),r=Wn(t)&&Wn(e)?Hn(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(r,2))}}const Yn=(t,e)=>1-3*e+3*t,Xn=(t,e)=>3*e-6*t,Gn=t=>3*t,qn=(t,e,n)=>((Yn(e,n)*t+Xn(e,n))*t+Gn(e))*t,Zn=(t,e,n)=>3*Yn(e,n)*t*t+2*Xn(e,n)*t+Gn(e);function Kn(t,e,n,o){if(t===e&&n===o)return rn;const r=new Float32Array(11);for(let e=0;e<11;++e)r[e]=qn(.1*e,t,n);function i(e){let o=0,i=1;for(;10!==i&&r[i]<=e;++i)o+=.1;--i;const s=o+.1*((e-r[i])/(r[i+1]-r[i])),a=Zn(s,t,n);return a>=.001?function(t,e,n,o){for(let r=0;r<8;++r){const r=Zn(e,n,o);if(0===r)return e;e-=(qn(e,n,o)-t)/r}return e}(e,s,t,n):0===a?s:function(t,e,n,o,r){let i,s,a=0;do{s=e+(n-e)/2,i=qn(s,o,r)-t,i>0?n=s:e=s}while(Math.abs(i)>1e-7&&++a<10);return s}(e,o,o+.1,t,n)}return t=>0===t||1===t?t:qn(i(t),e,o)}const _n=("undefined"==typeof process||process.env,"production"),Jn=new Set;function Qn(t,e,n){t||Jn.has(e)||(console.warn(e),n&&console.warn(n),Jn.add(e))}const to=new WeakMap,eo=new WeakMap,no=t=>{const e=to.get(t.target);e&&e(t)},oo=t=>{t.forEach(no)};function ro(t,e,n){const o=function({root:t,...e}){const n=t||document;eo.has(n)||eo.set(n,{});const o=eo.get(n),r=JSON.stringify(e);return o[r]||(o[r]=new IntersectionObserver(oo,{root:t,...e})),o[r]}(e);return to.set(t,n),o.observe(t),()=>{to.delete(t),o.unobserve(t)}}const io={some:0,all:1};function so(n,o,r,{root:i,margin:s,amount:a="some",once:l}){e.useEffect(()=>{if(!n)return;const e={root:null==i?void 0:i.current,rootMargin:s,threshold:"number"==typeof a?a:io[a]};return ro(r.getInstance(),e,e=>{const{isIntersecting:n}=e;if(o.isInView===n)return;if(o.isInView=n,l&&!n&&o.hasEnteredView)return;n&&(o.hasEnteredView=!0),r.animationState&&r.animationState.setActive(t.AnimationType.InView,n);const i=r.getProps(),s=n?i.onViewportEnter:i.onViewportLeave;s&&s(e)})},[n,i,s,a])}function ao(n,o,r,{fallback:i=!0}){e.useEffect(()=>{n&&i&&("production"!==_n&&Qn(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{o.hasEnteredView=!0;const{onViewportEnter:e}=r.getProps();e&&e(null),r.animationState&&r.animationState.setActive(t.AnimationType.InView,!0)}))},[n])}const lo=t=>e=>(t(e),null),uo={inView:lo((function({visualElement:t,whileInView:n,onViewportEnter:o,onViewportLeave:r,viewport:i={}}){const s=e.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(n||o||r);i.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?ao:so)(a,s.current,t,i)})),tap:lo((function({onTap:n,onTapStart:o,onTapCancel:r,whileTap:i,visualElement:s}){const a=n||o||r||i,l=e.useRef(!1),u=e.useRef(null),c={passive:!(o||n||r||m)};function d(){u.current&&u.current(),u.current=null}function h(){return d(),l.current=!1,s.animationState&&s.animationState.setActive(t.AnimationType.Tap,!1),!Se()}function f(t,e){h()&&(Pe(s.getInstance(),t.target)?n&&n(t,e):r&&r(t,e))}function p(t,e){h()&&r&&r(t,e)}function m(e,n){d(),l.current||(l.current=!0,u.current=Xe(ve(window,"pointerup",f,c),ve(window,"pointercancel",p,c)),s.animationState&&s.animationState.setActive(t.AnimationType.Tap,!0),o&&o(e,n))}ye(s,"pointerdown",a?m:void 0,c),Te(d)})),focus:lo((function({whileFocus:e,visualElement:n}){const{animationState:o}=n;se(n,"focus",e?()=>{o&&o.setActive(t.AnimationType.Focus,!0)}:void 0),se(n,"blur",e?()=>{o&&o.setActive(t.AnimationType.Focus,!1)}:void 0)})),hover:lo((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:o}){ye(o,"pointerenter",t||n?Ae(o,!0,t):void 0,{passive:!t}),ye(o,"pointerleave",e||n?Ae(o,!1,e):void 0,{passive:!e})}))};function co(){const t=e.useContext(u);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,i=e.useId();e.useEffect(()=>r(i),[]);return!n&&o?[!1,()=>o&&o(i)]:[!0]}function ho(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}const fo=t=>1e3*t,po={linear:rn,easeIn:sn,easeInOut:un,easeOut:ln,circIn:cn,circInOut:hn,circOut:dn,backIn:fn,backInOut:mn,backOut:pn,anticipate:gn,bounceIn:yn,bounceInOut:t=>t<.5?.5*(1-vn(1-2*t)):.5*vn(2*t-1)+.5,bounceOut:vn},mo=t=>{if(Array.isArray(t)){t.length;const[e,n,o,r]=t;return Kn(e,n,o,r)}return"string"==typeof t?po[t]:t},go=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!xt.test(e)||e.startsWith("url("))),vo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),yo=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),xo=()=>({type:"keyframes",ease:"linear",duration:.3}),bo=t=>({type:"keyframes",duration:.8,values:t}),wo={x:vo,y:vo,z:vo,rotate:vo,rotateX:vo,rotateY:vo,rotateZ:vo,scaleX:yo,scaleY:yo,scale:yo,opacity:xo,backgroundColor:xo,color:xo,default:yo},Eo=(t,e)=>{let n;return n=Kt(e)?bo:wo[t]||wo.default,{to:e,...n(e)}},So={...Pt,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:St,WebkitFilter:St},Ao=t=>So[t];function Po(t,e){var n;let o=Ao(t);return o!==St&&(o=xt),null===(n=o.getAnimatableNone)||void 0===n?void 0:n.call(o,e)}const To={current:!1};function Co({ease:t,times:e,yoyo:n,flip:o,loop:r,...i}){const s={...i};return e&&(s.offset=e),i.duration&&(s.duration=fo(i.duration)),i.repeatDelay&&(s.repeatDelay=fo(i.repeatDelay)),t&&(s.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(mo):mo(t)),"tween"===i.type&&(s.type="keyframes"),(n||r||o)&&(n?s.repeatType="reverse":r?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=r||n||o||i.repeat),"spring"!==i.type&&(s.type="keyframes"),s}function Vo(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:i,repeatType:s,repeatDelay:a,from:l,...u}){return!!Object.keys(u).length}(t)||(t={...t,...Eo(n,e.to)}),{...e,...Co(t)}}function Mo(t,e,n,o,r){const i=Oo(o,t)||{};let s=void 0!==i.from?i.from:e.get();const a=go(t,n);"none"===s&&a&&"string"==typeof n?s=Po(t,n):Ro(s)&&"string"==typeof n?s=Lo(n):!Array.isArray(n)&&Ro(n)&&"string"==typeof s&&(n=Lo(s));return go(t,s)&&a&&!1!==i.type?function(){const o={from:s,to:n,velocity:e.getVelocity(),onComplete:r,onUpdate:t=>e.set(t)};return"inertia"===i.type||"decay"===i.type?function({from:t=0,velocity:e=0,min:n,max:o,power:r=.8,timeConstant:i=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:h,onStop:f}){let p;function m(t){return void 0!==n&&t<n||void 0!==o&&t>o}function g(t){return void 0===n?o:void 0===o||Math.abs(n-t)<Math.abs(o-t)?n:o}function v(t){null==p||p.stop(),p=Un(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:h,onStop:f}))}function y(t){v(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:l},t))}if(m(t))y({from:t,velocity:e,to:g(t)});else{let o=r*e+t;void 0!==u&&(o=u(o));const s=g(o),a=s===n?-1:1;let c,d;const h=t=>{c=d,d=t,e=zn(t-c,Fn().delta),(1===a&&t>s||-1===a&&t<s)&&y({from:t,to:s,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:i,power:r,restDelta:l,modifyTarget:u,onUpdate:m(o)?h:void 0})}return{stop:()=>null==p?void 0:p.stop()}}({...o,...i}):Un({...Vo(i,o,t),onUpdate:t=>{o.onUpdate(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{o.onComplete(),i.onComplete&&i.onComplete()}})}:function(){const t=_t(n);return e.set(t),r(),i.onUpdate&&i.onUpdate(t),i.onComplete&&i.onComplete(),{stop:()=>{}}}}function Ro(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Lo(t){return"number"==typeof t?0:Po("",t)}function Oo(t,e){return t[e]||t.default||t}function ko(t,e,n,o={}){return To.current&&(o={type:!1}),e.start(r=>{let i,s;const a=Mo(t,e,n,o,r),l=function(t,e){var n,o;return null!==(o=null!==(n=(Oo(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==o?o:0}(o,t),u=()=>s=a();return l?i=window.setTimeout(u,fo(l)):u(),()=>{clearTimeout(i),s&&s.stop()}})}const Do=t=>/^0[^.\s]+$/.test(t);function jo(t,e){-1===t.indexOf(e)&&t.push(e)}function Fo(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Io{constructor(){this.subscriptions=[]}add(t){return jo(this.subscriptions,t),()=>Fo(this.subscriptions,t)}notify(t,e,n){const o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](t,e,n);else for(let r=0;r<o;r++){const o=this.subscriptions[r];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Bo{constructor(t){var e;this.version="7.3.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Io,this.velocityUpdateSubscribers=new Io,this.renderSubscribers=new Io,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:o}=Fn();this.lastUpdated!==o&&(this.timeDelta=n,this.lastUpdated=o,Rn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Rn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?zn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Uo(t){return new Bo(t)}const zo=t=>e=>e.test(t),No=[_,ot,nt,et,it,rt,{test:t=>"auto"===t,parse:t=>t}],Wo=t=>No.find(zo(t)),Ho=[...No,pt,xt],$o=t=>Ho.find(zo(t));function Yo(t,e,n){const o=t.getProps();return Zt(o,e,void 0!==n?n:o.custom,function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.getVelocity()),e}(t))}function Xo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Uo(n))}function Go(t,e){const n=Yo(t,e);let{transitionEnd:o={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...o};for(const e in i){Xo(t,e,_t(i[e]))}}function qo(t,e){[...e].reverse().forEach(n=>{var o;const r=t.getVariant(n);r&&Go(t,r),null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{qo(t,e)})})}function Zo(t,e,n){var o,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),s=i.length;if(s)for(let a=0;a<s;a++){const s=i[a],l=e[s];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(r=null!==(o=n[s])&&void 0!==o?o:t.readValue(s))&&void 0!==r?r:e[s]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Do(u))?u=parseFloat(u):!$o(u)&&xt.test(l)&&(u=Po(s,l)),t.addValue(s,Uo(u)),void 0===n[s]&&(n[s]=u),t.setBaseTarget(s,u))}}function Ko(t,e){if(!e)return;return(e[t]||e.default||e).from}function _o(t,e,n){var o;const r={};for(const i in t){const t=Ko(i,e);r[i]=void 0!==t?t:null===(o=n.getValue(i))||void 0===o?void 0:o.get()}return r}function Jo(t){return Boolean(z(t)&&t.add)}function Qo(t,e,n={}){let o;if(t.notifyAnimationStart(e),Array.isArray(e)){const r=e.map(e=>tr(t,e,n));o=Promise.all(r)}else if("string"==typeof e)o=tr(t,e,n);else{const r="function"==typeof e?Yo(t,e,n.custom):e;o=er(t,r,n)}return o.then(()=>t.notifyAnimationComplete(e))}function tr(t,e,n={}){var o;const r=Yo(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>er(t,r,n):()=>Promise.resolve(),a=(null===(o=t.variantChildren)||void 0===o?void 0:o.size)?(o=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=i;return function(t,e,n=0,o=0,r=1,i){const s=[],a=(t.variantChildren.size-1)*o,l=1===r?(t=0)=>t*o:(t=0)=>a-t*o;return Array.from(t.variantChildren).sort(nr).forEach((t,o)=>{s.push(tr(t,e,{...i,delay:n+l(o)}).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(s)}(t,e,r+o,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then(e)}return Promise.all([s(),a(n.delay)])}function er(t,e,{delay:n=0,transitionOverride:o,type:r}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");o&&(s=o);const c=[],d=r&&(null===(i=t.animationState)||void 0===i?void 0:i.getState()[r]);for(const e in l){const o=t.getValue(e),r=l[e];if(!o||void 0===r||d&&or(d,e))continue;let i={delay:n,...s};t.shouldReduceMotion&&B.has(e)&&(i={...i,type:!1,delay:0});let a=ko(e,o,r,i);Jo(u)&&(u.add(e),a=a.then(()=>u.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&Go(t,a)})}function nr(t,e){return t.sortNodePosition(e)}function or({protectedKeys:t,needsAnimating:e},n){const o=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,o}const rr=[t.AnimationType.Animate,t.AnimationType.InView,t.AnimationType.Focus,t.AnimationType.Hover,t.AnimationType.Tap,t.AnimationType.Drag,t.AnimationType.Exit],ir=[...rr].reverse(),sr=rr.length;function ar(e){let n=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Qo(t,e,n)))}(e);const o={[t.AnimationType.Animate]:ur(!0),[t.AnimationType.InView]:ur(),[t.AnimationType.Hover]:ur(),[t.AnimationType.Tap]:ur(),[t.AnimationType.Drag]:ur(),[t.AnimationType.Focus]:ur(),[t.AnimationType.Exit]:ur()};let r=!0;const i=(t,n)=>{const o=Yo(e,n);if(o){const{transition:e,transitionEnd:n,...r}=o;t={...t,...r,...n}}return t};function s(t,s){var a;const l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],d=new Set;let h={},f=1/0;for(let n=0;n<sr;n++){const g=ir[n],v=o[g],y=null!==(a=l[g])&&void 0!==a?a:u[g],x=p(y),b=g===s?v.isActive:null;!1===b&&(f=n);let w=y===u[g]&&y!==l[g]&&x;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...h},!v.isActive&&null===b||!y&&!v.prevProp||m(y)||"boolean"==typeof y)continue;const E=lr(v.prevProp,y);let S=E||g===s&&v.isActive&&!w&&x||n>f&&x;const A=Array.isArray(y)?y:[y];let P=A.reduce(i,{});!1===b&&(P={});const{prevResolvedValues:T={}}=v,C={...T,...P},V=t=>{S=!0,d.delete(t),v.needsAnimating[t]=!0};for(const t in C){const e=P[t],n=T[t];h.hasOwnProperty(t)||(e!==n?Kt(e)&&Kt(n)?!ho(e,n)||E?V(t):v.protectedKeys[t]=!0:void 0!==e?V(t):d.add(t):void 0!==e&&d.has(t)?V(t):v.protectedKeys[t]=!0)}v.prevProp=y,v.prevResolvedValues=P,v.isActive&&(h={...h,...P}),r&&e.blockInitialAnimation&&(S=!1),S&&!w&&c.push(...A.map(e=>({animation:e,options:{type:g,...t}})))}if(d.size){const t={};d.forEach(n=>{const o=e.getBaseTarget(n);void 0!==o&&(t[n]=o)}),c.push({animation:t})}let g=Boolean(c.length);return r&&!1===l.initial&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?n(c):Promise.resolve()}return{animateChanges:s,setActive:function(t,n,r){var i;if(o[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var o;return null===(o=e.animationState)||void 0===o?void 0:o.setActive(t,n)}),o[t].isActive=n;const a=s(r,t);for(const t in o)o[t].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:()=>o}}function lr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ho(e,t)}function ur(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const cr={animation:lo(({visualElement:t,animate:n})=>{t.animationState||(t.animationState=ar(t)),m(n)&&e.useEffect(()=>n.subscribe(t),[n])}),exit:lo(n=>{const{custom:o,visualElement:r}=n,[i,s]=co(),a=e.useContext(u);e.useEffect(()=>{r.isPresent=i;const e=r.animationState&&r.animationState.setActive(t.AnimationType.Exit,!i,{custom:a&&a.custom||o});e&&!i&&e.then(s)},[i])})};class dr{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=pr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=$n(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:o}=t,{timestamp:r}=Fn();this.history.push({...o,timestamp:r});const{onStart:i,onMove:s}=this.handlers;e||(i&&i(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=hr(e,this.transformPagePoint),ae(t)&&0===t.buttons?this.handlePointerUp(t,e):Rn.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:o}=this.handlers,r=pr(hr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,r),o&&o(t,r)},le(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const o=hr(he(t),this.transformPagePoint),{point:r}=o,{timestamp:i}=Fn();this.history=[{...r,timestamp:i}];const{onSessionStart:s}=e;s&&s(t,pr(o,this.history)),this.removeListeners=Xe(ve(window,"pointermove",this.handlePointerMove),ve(window,"pointerup",this.handlePointerUp),ve(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ln.update(this.updatePoint)}}function hr(t,e){return e?{point:e(t.point)}:t}function fr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pr({point:t},e){return{point:t,delta:fr(t,gr(e)),offset:fr(t,mr(e)),velocity:vr(e,.1)}}function mr(t){return t[0]}function gr(t){return t[t.length-1]}function vr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,o=null;const r=gr(t);for(;n>=0&&(o=t[n],!(r.timestamp-o.timestamp>fo(e)));)n--;if(!o)return{x:0,y:0};const i=(r.timestamp-o.timestamp)/1e3;if(0===i)return{x:0,y:0};const s={x:(r.x-o.x)/i,y:(r.y-o.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function yr(t){return t.max-t.min}function xr(t,e=0,n=.01){return $n(t,e)<n}function br(t,e,n,o=.5){t.origin=o,t.originPoint=Ie(e.min,e.max,t.origin),t.scale=yr(n)/yr(e),(xr(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ie(n.min,n.max,t.origin)-t.originPoint,(xr(t.translate)||isNaN(t.translate))&&(t.translate=0)}function wr(t,e,n,o){br(t.x,e.x,n.x,null==o?void 0:o.originX),br(t.y,e.y,n.y,null==o?void 0:o.originY)}function Er(t,e,n){t.min=n.min+e.min,t.max=t.min+yr(e)}function Sr(t,e,n){t.min=e.min-n.min,t.max=t.min+yr(e)}function Ar(t,e,n){Sr(t.x,e.x,n.x),Sr(t.y,e.y,n.y)}function Pr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Tr(t,e){let n=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,o]=[o,n]),{min:n,max:o}}const Cr=.35;function Vr(t,e,n){return{min:Mr(t,e),max:Mr(t,n)}}function Mr(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}const Rr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Lr(t){return[t("x"),t("y")]}function Or({top:t,left:e,right:n,bottom:o}){return{x:{min:e,max:n},y:{min:t,max:o}}}function kr(t){return void 0===t||1===t}function Dr({scale:t,scaleX:e,scaleY:n}){return!kr(t)||!kr(e)||!kr(n)}function jr(t){return Dr(t)||Fr(t.x)||Fr(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function Fr(t){return t&&"0%"!==t}function Ir(t,e,n){return n+e*(t-n)}function Br(t,e,n,o,r){return void 0!==r&&(t=Ir(t,r,o)),Ir(t,n,o)+e}function Ur(t,e=0,n=1,o,r){t.min=Br(t.min,e,n,o,r),t.max=Br(t.max,e,n,o,r)}function zr(t,{x:e,y:n}){Ur(t.x,e.translate,e.scale,e.originPoint),Ur(t.y,n.translate,n.scale,n.originPoint)}function Nr(t,e){t.min=t.min+e,t.max=t.max+e}function Wr(t,e,[n,o,r]){const i=void 0!==e[r]?e[r]:.5,s=Ie(t.min,t.max,i);Ur(t,e[n],e[o],s,e.scale)}const Hr=["x","scaleX","originX"],$r=["y","scaleY","originY"];function Yr(t,e){Wr(t.x,e,Hr),Wr(t.y,e,$r)}function Xr(t,e){return Or(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}(t.getBoundingClientRect(),e))}const Gr=new WeakMap;class qr{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(e,{snapToCursor:n=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new dr(e,{onSessionStart:t=>{this.stopAnimation(),n&&this.snapToCursor(he(t,"page").point)},onStart:(e,n)=>{var o;const{drag:r,dragPropagation:i,onDragStart:s}=this.getProps();(!r||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ee(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lr(t=>{var e,n;let o=this.getAxisMotionValue(t).get()||0;if(nt.test(o)){const r=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.actual[t];if(r){o=yr(r)*(parseFloat(o)/100)}}this.originPoint[t]=o}),null==s||s(e,n),null===(o=this.visualElement.animationState)||void 0===o||o.setActive(t.AnimationType.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:o,onDirectionLock:r,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(o&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&(null==r||r(this.currentDirection)));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.syncRender(),null==i||i(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:o}=e;this.startAnimation(o);const{onDragEnd:r}=this.getProps();null==r||r(t,e)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(t.AnimationType.Drag,!1)}updateAxis(t,e,n){const{drag:o}=this.getProps();if(!n||!Zr(t,o,this.currentDirection))return;const r=this.getAxisMotionValue(t);let i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=function(t,{min:e,max:n},o){return void 0!==e&&t<e?t=o?Ie(e,t,o.min):Math.max(t,e):void 0!==n&&t>n&&(t=o?Ie(n,t,o.max):Math.min(t,n)),t}(i,this.constraints[t],this.elastic[t])),r.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},o=this.constraints;t&&f(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:o,right:r}){return{x:Pr(t.x,n,r),y:Pr(t.y,e,o)}}(n.actual,t),this.elastic=function(t=Cr){return!1===t?t=0:!0===t&&(t=Cr),{x:Vr(t,"left","right"),y:Vr(t,"top","bottom")}}(e),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Lr(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.actual[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!f(t))return!1;const n=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const r=function(t,e,n){const o=Xr(t,n),{scroll:r}=e;return r&&(Nr(o.x,r.x),Nr(o.y,r.y)),o}(n,o.root,this.visualElement.getTransformPagePoint());let i=function(t,e){return{x:Tr(t.x,e.x),y:Tr(t.y,e.y)}}(o.layout.actual,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(i));this.hasMutatedConstraints=!!t,t&&(i=Or(t))}return i}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:o,dragTransition:r,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Lr(s=>{var l;if(!Zr(s,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[s])&&void 0!==l?l:{};i&&(u={min:0,max:0});const c=o?200:1e6,d=o?40:1e7,h={type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...u};return this.startAxisValueAnimation(s,h)});return Promise.all(l).then(s)}startAxisValueAnimation(t,e){return ko(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){Lr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var e,n;const o="_drag"+t.toUpperCase(),r=this.visualElement.getProps()[o];return r||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}snapToCursor(t){Lr(e=>{const{drag:n}=this.getProps();if(!Zr(e,n,this.currentDirection))return;const{projection:o}=this.visualElement,r=this.getAxisMotionValue(e);if(o&&o.layout){const{min:n,max:i}=o.layout.actual[e];r.set(t[e]-Ie(n,i,.5))}})}scalePositionWithinConstraints(){var t;const{drag:e,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!f(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Lr(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();r[t]=function(t,e){let n=.5;const o=yr(t),r=yr(e);return r>o?n=Fe(e.min,e.max-o,t.min):o>r&&(n=Fe(t.min,t.max-r,e.min)),Ve(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=i?i({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),Lr(t=>{if(!Zr(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Ie(o,i,r[t]))})}addListeners(){var t;Gr.set(this.visualElement,this);const e=ve(this.visualElement.getInstance(),"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),n=()=>{const{dragConstraints:t}=this.getProps();f(t)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,r=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();const i=ie(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Lr(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.syncRender())});return()=>{i(),e(),r(),null==s||s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:r=!1,dragElastic:i=Cr,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:o,dragConstraints:r,dragElastic:i,dragMomentum:s}}}function Zr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Kr={pan:lo((function({onPan:t,onPanStart:n,onPanEnd:o,onPanSessionStart:r,visualElement:i}){const a=t||n||o||r,l=e.useRef(null),{transformPagePoint:u}=e.useContext(s),c={onSessionStart:r,onStart:n,onMove:t,onEnd:(t,e)=>{l.current=null,o&&o(t,e)}};e.useEffect(()=>{null!==l.current&&l.current.updateHandlers(c)}),ye(i,"pointerdown",a&&function(t){l.current=new dr(t,c,{transformPagePoint:u})}),Te(()=>l.current&&l.current.end())})),drag:lo((function(t){const{dragControls:n,visualElement:o}=t,r=A(()=>new qr(o));e.useEffect(()=>n&&n.subscribe(r),[r,n]),e.useEffect(()=>r.addListeners(),[r])}))},_r={current:null},Jr={current:!1};function Qr(){if(Jr.current=!0,c)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_r.current=t.matches;t.addListener(e),e()}else _r.current=!1}const ti=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const ei=Object.keys(E),ni=ei.length,oi=({treeType:t="",build:n,getBaseTarget:o,makeTargetAnimatable:r,measureViewportBox:i,render:s,readValueFromInstance:a,removeValueFromRenderState:l,sortNodePosition:u,scrapeMotionValuesFromProps:c})=>({parent:d,props:h,presenceId:m,blockInitialAnimation:g,visualState:x,reducedMotionConfig:b},w={})=>{let S=!1;const{latestValues:A,renderState:P}=x;let T;const C=function(){const t=ti.map(()=>new Io),e={},n={clearAllListeners:()=>t.forEach(t=>t.clear()),updatePropListeners:t=>{ti.forEach(o=>{var r;const i="on"+o,s=t[i];null===(r=e[o])||void 0===r||r.call(e),s&&(e[o]=n[i](s))})}};return t.forEach((t,e)=>{n["on"+ti[e]]=e=>t.add(e),n["notify"+ti[e]]=(...e)=>t.notify(...e)}),n}(),V=new Map,M=new Map;let R={};const L={...A};let O;function k(){T&&S&&(D(),s(T,P,h.style,W.projection))}function D(){n(W,P,A,w,h)}function j(){C.notifyUpdate(A)}function F(t,e){const n=e.onChange(e=>{A[t]=e,h.onUpdate&&Rn.update(j,!1,!0)}),o=e.onRenderRequest(W.scheduleRender);M.set(t,()=>{n(),o()})}const{willChange:I,...B}=c(h);for(const t in B){const e=B[t];void 0!==A[t]&&z(e)&&(e.set(A[t],!1),Jo(I)&&I.add(t))}const U=v(h),N=y(h),W={treeType:t,current:null,depth:d?d.depth+1:0,parent:d,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:N?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:g,isMounted:()=>Boolean(T),mount(t){S=!0,T=W.current=t,W.projection&&W.projection.mount(t),N&&d&&!U&&(O=null==d?void 0:d.addVariantChild(W)),V.forEach((t,e)=>F(e,t)),Jr.current||Qr(),W.shouldReduceMotion="never"!==b&&("always"===b||_r.current),null==d||d.children.add(W),W.setProps(h)},unmount(){var t;null===(t=W.projection)||void 0===t||t.unmount(),Ln.update(j),Ln.render(k),M.forEach(t=>t()),null==O||O(),null==d||d.children.delete(W),C.clearAllListeners(),T=void 0,S=!1},loadFeatures(t,n,o,r,i,s){const a=[];for(let n=0;n<ni;n++){const o=ei[n],{isEnabled:r,Component:i}=E[o];r(h)&&i&&a.push(e.createElement(i,{key:o,...t,visualElement:W}))}if(!W.projection&&i){W.projection=new i(r,W.getLatestValues(),d&&d.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:l}=t;W.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&f(a),visualElement:W,scheduleRender:()=>W.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l})}return a},addVariantChild(t){var e;const n=W.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>u&&t===e.treeType?u(W.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>N?W:null==d?void 0:d.getClosestVariantNode(),getLayoutId:()=>h.layoutId,getInstance:()=>T,getStaticValue:t=>A[t],setStaticValue:(t,e)=>A[t]=e,getLatestValues:()=>A,setVisibility(t){W.isVisible!==t&&(W.isVisible=t,W.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>r(W,t,h,e),measureViewportBox:()=>i(T,h),addValue(t,e){W.hasValue(t)&&W.removeValue(t),V.set(t,e),A[t]=e.get(),F(t,e)},removeValue(t){var e;V.delete(t),null===(e=M.get(t))||void 0===e||e(),M.delete(t),delete A[t],l(t,P)},hasValue:t=>V.has(t),getValue(t,e){let n=V.get(t);return void 0===n&&void 0!==e&&(n=Uo(e),W.addValue(t,n)),n},forEachValue:t=>V.forEach(t),readValue:t=>void 0!==A[t]?A[t]:a(T,t,w),setBaseTarget(t,e){L[t]=e},getBaseTarget(t){if(o){const e=o(h,t);if(void 0!==e&&!z(e))return e}return L[t]},...C,build:()=>(D(),P),scheduleRender(){Rn.render(k,!1,!0)},syncRender:k,setProps(t){(t.transformTemplate||h.transformTemplate)&&W.scheduleRender(),h=t,C.updatePropListeners(t),R=function(t,e,n){const{willChange:o}=e;for(const r in e){const i=e[r],s=n[r];if(z(i))t.addValue(r,i),Jo(o)&&o.add(r);else if(z(s))t.addValue(r,Uo(i)),Jo(o)&&o.remove(r);else if(s!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,Uo(void 0!==e?e:i))}}for(const o in n)void 0===e[o]&&t.removeValue(o);return e}(W,c(h),R)},getProps:()=>h,getVariant:t=>{var e;return null===(e=h.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>h.transition,getTransformPagePoint:()=>h.transformPagePoint,getVariantContext(t=!1){if(t)return null==d?void 0:d.getVariantContext();if(!U){const t=(null==d?void 0:d.getVariantContext())||{};return void 0!==h.initial&&(t.initial=h.initial),t}const e={};for(let t=0;t<ii;t++){const n=ri[t],o=h[n];(p(o)||!1===o)&&(e[n]=o)}return e}};return W},ri=["initial",...rr],ii=ri.length;function si(t){return"string"==typeof t&&t.startsWith("var(--")}const ai=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function li(t,e,n=1){const[o,r]=function(t){const e=ai.exec(t);if(!e)return[,];const[,n,o]=e;return[n,o]}(t);if(!o)return;const i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():si(r)?li(r,e,n+1):r}const ui=new Set(["width","height","top","left","right","bottom","x","y"]),ci=t=>ui.has(t),di=(t,e)=>{t.set(e,!1),t.set(e)},hi=t=>t===_||t===ot;var fi;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(fi||(fi={}));const pi=(t,e)=>parseFloat(t.split(", ")[e]),mi=(t,e)=>(n,{transform:o})=>{if("none"===o||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/);if(r)return pi(r[1],e);{const e=o.match(/^matrix\((.+)\)$/);return e?pi(e[1],t):0}},gi=new Set(["x","y","z"]),vi=I.filter(t=>!gi.has(t));const yi={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:mi(4,13),y:mi(5,14)},xi=(t,e,n={},o={})=>{e={...e},o={...o};const r=Object.keys(e).filter(ci);let i=[],s=!1;const a=[];if(r.forEach(r=>{const l=t.getValue(r);if(!t.hasValue(r))return;let u=n[r],c=Wo(u);const d=e[r];let h;if(Kt(d)){const t=d.length,e=null===d[0]?1:0;u=d[e],c=Wo(u);for(let n=e;n<t;n++)h?Wo(d[n]):h=Wo(d[n])}else h=Wo(d);if(c!==h)if(hi(c)&&hi(h)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof d?e[r]=parseFloat(d):Array.isArray(d)&&h===ot&&(e[r]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==h?void 0:h.transform)&&(0===u||0===d)?0===u?l.set(h.transform(u)):e[r]=c.transform(d):(s||(i=function(t){const e=[];return vi.forEach(n=>{const o=t.getValue(n);void 0!==o&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}(t),s=!0),a.push(r),o[r]=void 0!==o[r]?o[r]:e[r],di(l,d))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,r=((t,e,n)=>{const o=e.measureViewportBox(),r=e.getInstance(),i=getComputedStyle(r),{display:s}=i,a={};"none"===s&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=yi[t](o,i)}),e.syncRender();const l=e.measureViewportBox();return n.forEach(n=>{const o=e.getValue(n);di(o,a[n]),t[n]=yi[n](l,i)}),t})(e,t,a);return i.length&&i.forEach(([e,n])=>{t.getValue(e).set(n)}),t.syncRender(),c&&null!==n&&window.scrollTo({top:n}),{target:r,transitionEnd:o}}return{target:e,transitionEnd:o}};function bi(t,e,n,o){return(t=>Object.keys(t).some(ci))(e)?xi(t,e,n,o):{target:e,transitionEnd:o}}const wi=(t,e,n,o)=>{const r=function(t,{...e},n){const o=t.getInstance();if(!(o instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.forEachValue(t=>{const e=t.get();if(!si(e))return;const n=li(e,o);n&&t.set(n)});for(const t in e){const r=e[t];if(!si(r))continue;const i=li(r,o);i&&(e[t]=i,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}(t,e,o);return bi(t,e=r.target,n,o=r.transitionEnd)};const Ei={treeType:"dom",readValueFromInstance(t,e){if(B.has(e)){const t=Ao(e);return t&&t.default||0}{const o=(n=t,window.getComputedStyle(n)),r=(H(e)?o.getPropertyValue(e):o[e])||0;return"string"==typeof r?r.trim():r}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:(t,{transformPagePoint:e})=>Xr(t,e),resetTransform(t,e,n){const{transformTemplate:o}=n;e.style.transform=o?o({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,{transition:e,transitionEnd:n,...o},{transformValues:r},i=!0){let s=_o(o,e||{},t);if(r&&(n&&(n=r(n)),o&&(o=r(o)),s&&(s=r(s))),i){Zo(t,o,s);const e=wi(t,o,s,n);n=e.transitionEnd,o=e.target}return{transition:e,transitionEnd:n,...o}},scrapeMotionValuesFromProps:Gt,build(t,e,n,o,r){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Tt(e,n,o,r.transformTemplate)},render:$t},Si=oi(Ei),Ai=oi({...Ei,getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return B.has(e)?(null===(n=Ao(e))||void 0===n?void 0:n.default)||0:(e=Yt.has(e)?e:Ht(e),t.getAttribute(e))},scrapeMotionValuesFromProps:qt,build(t,e,n,o,r){Ut(e,n,o,r.transformTemplate)},render:Xt}),Pi=(t,e)=>D(t)?Ai(e,{enableHardwareAcceleration:!1}):Si(e,{enableHardwareAcceleration:!0});function Ti(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ci={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ot.test(t))return t;t=parseFloat(t)}return`${Ti(t,e.target.x)}% ${Ti(t,e.target.y)}%`}},Vi={correct:(t,{treeScale:e,projectionDelta:n})=>{const o=t,r=t.includes("var("),i=[];r&&(t=t.replace(ai,t=>(i.push(t),"_$css")));const s=xt.parse(t);if(s.length>5)return o;const a=xt.createTransformer(t),l="number"!=typeof s[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;s[0+l]/=u,s[1+l]/=c;const d=Ie(u,c,.5);"number"==typeof s[2+l]&&(s[2+l]/=d),"number"==typeof s[3+l]&&(s[3+l]/=d);let h=a(s);if(r){let t=0;h=h.replace("_$css",()=>{const e=i[t];return t++,e})}return h}};class Mi extends r.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:o}=this.props,{projection:r}=t;F(Ri),r&&(e.group&&e.group.add(r),n&&n.register&&o&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),P.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:o,isPresent:r}=this.props,i=n.projection;return i?(i.isPresent=r,o||t.layoutDependency!==e||void 0===e?i.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?i.promote():i.relegate()||Rn.postRender(()=>{var t;(null===(t=i.getStack())||void 0===t?void 0:t.members.length)||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const Ri={borderRadius:{...Ci,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ci,borderTopRightRadius:Ci,borderBottomLeftRadius:Ci,borderBottomRightRadius:Ci,boxShadow:Vi},Li={measureLayout:function(t){const[n,o]=co(),i=e.useContext(C);return r.default.createElement(Mi,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(M),isPresent:n,safeToRemove:o})}};function Oi(t,e,n={}){const o=z(t)?t:Uo(t);return ko("",o,e,n),{stop:()=>o.stop(),isAnimating:()=>o.isAnimating()}}const ki=["TopLeft","TopRight","BottomLeft","BottomRight"],Di=ki.length,ji=t=>"string"==typeof t?parseFloat(t):t,Fi=t=>"number"==typeof t||ot.test(t);function Ii(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const Bi=zi(0,.5,dn),Ui=zi(.5,.95,rn);function zi(t,e,n){return o=>o<t?0:o>e?1:n(Fe(t,e,o))}function Ni(t,e){t.min=e.min,t.max=e.max}function Wi(t,e){Ni(t.x,e.x),Ni(t.y,e.y)}function Hi(t,e,n,o,r){return t=Ir(t-=e,1/n,o),void 0!==r&&(t=Ir(t,1/r,o)),t}function $i(t,e,[n,o,r],i,s){!function(t,e=0,n=1,o=.5,r,i=t,s=t){if(nt.test(e)){e=parseFloat(e);e=Ie(s.min,s.max,e/100)-s.min}if("number"!=typeof e)return;let a=Ie(i.min,i.max,o);t===i&&(a-=e),t.min=Hi(t.min,e,n,a,r),t.max=Hi(t.max,e,n,a,r)}(t,e[n],e[o],e[r],e.scale,i,s)}const Yi=["x","scaleX","originX"],Xi=["y","scaleY","originY"];function Gi(t,e,n,o){$i(t.x,e,Yi,null==n?void 0:n.x,null==o?void 0:o.x),$i(t.y,e,Xi,null==n?void 0:n.y,null==o?void 0:o.y)}function qi(t){return 0===t.translate&&1===t.scale}function Zi(t){return qi(t.x)&&qi(t.y)}function Ki(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function _i(t){return yr(t.x)/yr(t.y)}class Ji{constructor(){this.members=[]}add(t){jo(this.members,t),t.scheduleRender()}remove(t){if(Fo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){var n;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,e&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;!1===r&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var e,n,o,r,i;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(i=null===(o=t.resumingFrom)||void 0===o?void 0:(r=o.options).onExitComplete)||void 0===i||i.call(r)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Qi(t,e,n){let o=`translate3d(${t.x.translate/e.x}px, ${t.y.translate/e.y}px, 0) `;if(o+=`scale(${1/e.x}, ${1/e.y}) `,n){const{rotate:t,rotateX:e,rotateY:r}=n;t&&(o+=`rotate(${t}deg) `),e&&(o+=`rotateX(${e}deg) `),r&&(o+=`rotateY(${r}deg) `)}return o+=`scale(${t.x.scale*e.x}, ${t.y.scale*e.y})`,"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===o?"none":o}const ts=(t,e)=>t.depth-e.depth;class es{constructor(){this.children=[],this.isDirty=!1}add(t){jo(this.children,t),this.isDirty=!0}remove(t){Fo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ts),this.isDirty=!1,this.children.forEach(t)}}const ns=["","X","Y","Z"];function os({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(t,n={},o=(null==e?void 0:e())){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(cs),this.nodes.forEach(ds)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=n,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new es)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Io),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);null==n||n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){var o;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:r,layout:i,visualElement:s}=this.options;if(s&&!s.getInstance()&&s.mount(e),this.root.nodes.add(this),null===(o=this.parent)||void 0===o||o.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(i||r)&&(this.isLayoutDirty=!0),t){let n;const o=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,clearTimeout(n),n=window.setTimeout(o,250),P.hasAnimatedSinceResize&&(P.hasAnimatedSinceResize=!1,this.nodes.forEach(us))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:o})=>{var r,i,a,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(i=null!==(r=this.options.transition)&&void 0!==r?r:s.getDefaultTransition())&&void 0!==i?i:vs,{onLayoutAnimationStart:d,onLayoutAnimationComplete:h}=s.getProps(),f=!this.targetLayout||!Ki(this.targetLayout,o)||n,p=!e&&n;if((null===(a=this.resumeFrom)||void 0===a?void 0:a.instance)||p||e&&(f||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,p);const e={...Oo(c,"layout"),onPlay:d,onComplete:h};s.shouldReduceMotion&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||this.finishAnimation(),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=o})}unmount(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,Ln.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}startUpdate(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(hs))}willUpdate(t=!0){var e,n,o;if(this.root.isUpdateBlocked())return void(null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll()}const{layoutId:r,layout:i}=this.options;if(void 0===r&&!i)return;const s=null===(o=this.options.visualElement)||void 0===o?void 0:o.getProps().transformTemplate;this.prevTransformTemplateValue=null==s?void 0:s(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(as);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(ys),this.potentialNodes.clear()),this.nodes.forEach(ls),this.nodes.forEach(rs),this.nodes.forEach(is),this.clearAllSnapshots(),On.update(),On.preRender(),On.render())}clearAllSnapshots(){this.nodes.forEach(ss),this.sharedNodes.forEach(fs)}scheduleUpdateProjection(){Rn.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Rn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));bs(e),this.snapshot={measured:t,layout:e,latestValues:{}}}updateLayout(){var t;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const e=this.measure();bs(e);const n=this.layout;this.layout={measured:e,actual:this.removeElementScroll(e)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(t=this.options.visualElement)||void 0===t||t.notifyLayoutMeasure(this.layout.actual,null==n?void 0:n.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=n(this.instance))}resetTransform(){var t;if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Zi(this.projectionDelta),o=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,i=null==o?void 0:o(this.latestValues,""),s=i!==this.prevTransformTemplateValue;e&&(n||jr(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Nr(e.x,n.x),Nr(e.y,n.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Wi(e,t);for(let n=0;n<this.path.length;n++){const o=this.path[n],{scroll:r,options:i,isScrollRoot:s}=o;if(o!==this.root&&r&&i.layoutScroll){if(s){Wi(e,t);const{scroll:n}=this.root;n&&(Nr(e.x,-n.x),Nr(e.y,-n.y))}Nr(e.x,r.x),Nr(e.y,r.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Wi(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];!e&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Yr(n,{x:-o.scroll.x,y:-o.scroll.y}),jr(o.latestValues)&&Yr(n,o.latestValues)}return jr(this.latestValues)&&Yr(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};Wi(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];if(!o.instance)continue;if(!jr(o.latestValues))continue;Dr(o.latestValues)&&o.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};Wi(r,o.measure()),Gi(n,o.latestValues,null===(e=o.snapshot)||void 0===e?void 0:e.layout,r)}return jr(this.latestValues)&&Gi(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection()}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const{layout:e,layoutId:n}=this.options;var o,r,i;this.layout&&(e||n)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ar(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Wi(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(o=this.target,r=this.relativeTarget,i=this.relativeParent.target,Er(o.x,r.x,i.x),Er(o.y,r.y,i.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):Wi(this.target,this.layout.actual),zr(this.target,this.targetDelta)):Wi(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ar(this.relativeTargetOrigin,this.target,this.relativeParent.target),Wi(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(this.parent&&!jr(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{layout:e,layoutId:n}=this.options;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!e&&!n)return;const o=this.getLead();Wi(this.layoutCorrected,this.layout.actual),function(t,e,n,o=!1){var r,i;const s=n.length;if(!s)return;let a,l;e.x=e.y=1;for(let u=0;u<s;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(i=null===(r=a.instance)||void 0===r?void 0:r.style)||void 0===i?void 0:i.display)&&(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Yr(t,{x:-a.scroll.x,y:-a.scroll.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,zr(t,l)),o&&jr(a.latestValues)&&Yr(t,a.latestValues))}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==o);const{target:r}=o;if(!r)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const i=this.treeScale.x,s=this.treeScale.y,a=this.projectionTransform;wr(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=Qi(this.projectionDelta,this.treeScale),this.projectionTransform===a&&this.treeScale.x===i&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e,n,o;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(o=this.getStack())||void 0===o||o.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){var n;const o=this.snapshot,r=(null==o?void 0:o.latestValues)||{},i={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=null==o?void 0:o.isShared,u=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(gs));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const o=e/1e3;var d,h,f,p;ps(s.x,t.x,o),ps(s.y,t.y,o),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Ar(a,this.layout.actual,this.relativeParent.layout.actual),d=this.relativeTarget,h=this.relativeTargetOrigin,f=a,p=o,ms(d.x,h.x,f.x,p),ms(d.y,h.y,f.y,p)),l&&(this.animationValues=i,function(t,e,n,o,r,i){var s,a,l,u;r?(t.opacity=Ie(0,null!==(s=n.opacity)&&void 0!==s?s:1,Bi(o)),t.opacityExit=Ie(null!==(a=e.opacity)&&void 0!==a?a:1,0,Ui(o))):i&&(t.opacity=Ie(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,o));for(let r=0;r<Di;r++){const i=`border${ki[r]}Radius`;let s=Ii(e,i),a=Ii(n,i);if(void 0===s&&void 0===a)continue;s||(s=0),a||(a=0);0===s||0===a||Fi(s)===Fi(a)?(t[i]=Math.max(Ie(ji(s),ji(a),o),0),(nt.test(a)||nt.test(s))&&(t[i]+="%")):t[i]=a}(e.rotate||n.rotate)&&(t.rotate=Ie(e.rotate||0,n.rotate||0,o))}(i,r,this.latestValues,o,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=o},this.mixTargetDelta(0)}startAnimation(t){var e,n;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(Ln.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rn.update(()=>{P.hasAnimatedSinceResize=!0,this.currentAnimation=Oi(0,1e3,{...t,onUpdate:e=>{var n;this.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:()=>{var e;null===(e=t.onComplete)||void 0===e||e.call(t),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:o,latestValues:r}=t;if(e&&n&&o){if(this!==t&&this.layout&&o&&ws(this.options.animationType,this.layout.actual,o.actual)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=yr(this.layout.actual.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const o=yr(this.layout.actual.y);n.y.min=t.target.y.min,n.y.max=n.y.min+o}Wi(e,n),Yr(e,r),wr(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){var n,o,r;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ji);this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(r=null===(o=e.options.initialPromotionConfig)||void 0===o?void 0:o.shouldPreserveFollowOpacity)||void 0===r?void 0:r.call(o,e)})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const o=this.getStack();o&&o.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const n={};for(let o=0;o<ns.length;o++){const r="rotate"+ns[o];t.getStaticValue(r)&&(e=!0,n[r]=t.getStaticValue(r),t.setStaticValue(r,0))}if(e){null==t||t.syncRender();for(const e in n)t.setStaticValue(e,n[e]);t.scheduleRender()}}getProjectionStyles(t={}){var e,n,o;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const i=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Jt(t.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Jt(t.pointerEvents)||""),this.hasProjected&&!jr(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const a=s.animationValues||s.latestValues;this.applyTransformsToTarget(),r.transform=Qi(this.projectionDeltaWithTransform,this.treeScale,a),i&&(r.transform=i(a,r.transform));const{x:l,y:u}=this.projectionDelta;r.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,s.animationValues?r.opacity=s===this?null!==(o=null!==(n=a.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==o?o:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=s===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in j){if(void 0===a[t])continue;const{correct:e,applyTo:n}=j[t],o=e(a[t],s);if(n){const t=n.length;for(let e=0;e<t;e++)r[n[e]]=o}else r[t]=o}return this.options.layoutId&&(r.pointerEvents=s===this?Jt(t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(as),this.root.sharedNodes.clear()}}}function rs(t){t.updateLayout()}function is(t){var e,n,o;const r=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{actual:e,measured:n}=t.layout,{animationType:o}=t.options;"size"===o?Lr(t=>{const n=r.isShared?r.measured[t]:r.layout[t],o=yr(n);n.min=e[t].min,n.max=n.min+o}):ws(o,r.layout,e)&&Lr(t=>{const n=r.isShared?r.measured[t]:r.layout[t],o=yr(e[t]);n.max=n.min+o});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};wr(i,e,r.layout);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r.isShared?wr(s,t.applyTransform(n,!0),r.measured):wr(s,e,r.layout);const a=!Zi(i);let l=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){const{snapshot:n,layout:o}=t.relativeParent;if(n&&o){const t={x:{min:0,max:0},y:{min:0,max:0}};Ar(t,r.layout,n.layout);const i={x:{min:0,max:0},y:{min:0,max:0}};Ar(i,e,o.actual),Ki(t,i)||(l=!0)}}t.notifyListeners("didUpdate",{layout:e,snapshot:r,delta:s,layoutDelta:i,hasLayoutChanged:a,hasRelativeTargetChanged:l})}else t.isLead()&&(null===(o=(n=t.options).onExitComplete)||void 0===o||o.call(n));t.options.transition=void 0}function ss(t){t.clearSnapshot()}function as(t){t.clearMeasurements()}function ls(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function us(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function cs(t){t.resolveTargetDelta()}function ds(t){t.calcProjection()}function hs(t){t.resetRotation()}function fs(t){t.removeLeadSnapshot()}function ps(t,e,n){t.translate=Ie(e.translate,0,n),t.scale=Ie(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ms(t,e,n,o){t.min=Ie(e.min,n.min,o),t.max=Ie(e.max,n.max,o)}function gs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const vs={duration:.45,ease:[.4,0,.1,1]};function ys(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const o=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);o&&t.mount(o,!0)}function xs(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function bs(t){xs(t.x),xs(t.y)}function ws(t,e,n){return"position"===t||"preserve-aspect"===t&&!function(t,e,n=.01){return $n(t,e)<=n}(_i(e),_i(n))}const Es=os({attachResizeListener:(t,e)=>ie(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ss={current:void 0},As=os({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ss.current){const t=new Es(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Ss.current=t}return Ss.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ps={...cr,...uo,...Kr,...Li},Ts=O((t,e)=>oe(t,e,Ps,Pi,As));const Cs=O(oe);function Vs(){const t=e.useRef(!1);return d(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ms(){const t=Vs(),[n,o]=e.useState(0),r=e.useCallback(()=>{t.current&&o(n+1)},[n]);return[e.useCallback(()=>Rn.postRender(r),[r]),n]}class Rs extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ls({children:t,isPresent:n}){const o=e.useId(),r=e.useRef(null),s=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=s.current;if(n||!r.current||!t||!e)return;r.current.dataset.motionPopId=o;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[n]),i.createElement(Rs,{isPresent:n,childRef:r,sizeRef:s},i.cloneElement(t,{ref:r}))}const Os=({children:t,initial:n,isPresent:o,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:l})=>{const c=A(ks),d=e.useId(),h=e.useMemo(()=>({id:d,initial:n,isPresent:o,custom:s,onExitComplete:t=>{c.set(t,!0);for(const t of c.values())if(!t)return;r&&r()},register:t=>(c.set(t,!1),()=>c.delete(t))}),a?void 0:[o]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[o]),i.useEffect(()=>{!o&&!c.size&&r&&r()},[o]),"popLayout"===l&&(t=i.createElement(Ls,{isPresent:o},t)),i.createElement(u.Provider,{value:h},t)};function ks(){return new Map}const Ds=t=>t.key||"";const js=e.createContext(null),Fs=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Is(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Fs);return{add:o=>{t.add(o),e.set(o,o.addEventListener("willUpdate",n))},remove:o=>{var r;t.delete(o),null===(r=e.get(o))||void 0===r||r(),e.delete(o),n()},dirty:n}}const Bs=t=>!0===t,Us=({children:t,id:n,inheritId:o,inherit:r=!0})=>{void 0!==o&&(r=o);const s=e.useContext(C),a=e.useContext(js),[l,u]=Ms(),c=e.useRef(null),d=s.id||a;null===c.current&&((t=>Bs(!0===t)||"id"===t)(r)&&d&&(n=n?d+"-"+n:d),c.current={id:n,group:Bs(r)&&s.group||Is()});const h=e.useMemo(()=>({...c.current,forceRender:l}),[u]);return i.createElement(C.Provider,{value:h},t)};let zs=0;function Ns(t){return"function"==typeof t}const Ws=e.createContext(null);const Hs=e.forwardRef((function({children:t,as:n="ul",axis:o="y",onReorder:r,values:s,...a},l){const u=A(()=>Ts(n)),c=[],d=e.useRef(!1),h={axis:o,registerItem:(t,e)=>{e&&-1===c.findIndex(e=>t===e.value)&&(c.push({value:t,layout:e[o]}),c.sort(Ys))},updateOrder:(t,e,n)=>{if(d.current)return;const o=function(t,e,n,o){if(!o)return t;const r=t.findIndex(t=>t.value===e);if(-1===r)return t;const i=o>0?1:-1,s=t[r+i];if(!s)return t;const a=t[r],l=s.layout,u=Ie(l.min,l.max,.5);return 1===i&&a.layout.max+n>u||-1===i&&a.layout.min+n<u?function([...t],e,n){const o=e<0?t.length+e:e;if(o>=0&&o<t.length){const o=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(o,0,r)}return t}(t,r,r+i):t}(c,t,e,n);c!==o&&(d.current=!0,r(o.map($s).filter(t=>-1!==s.indexOf(t))))}};return e.useEffect(()=>{d.current=!1}),i.createElement(u,{...a,ref:l},i.createElement(Ws.Provider,{value:h},t))}));function $s(t){return t.value}function Ys(t,e){return t.layout.min-e.layout.min}function Xs(t){const n=A(()=>Uo(t)),{isStatic:o}=e.useContext(s);if(o){const[,o]=e.useState(t);e.useEffect(()=>n.onChange(o),[])}return n}function Gs(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],r=t[1+n],i=t[2+n],s=t[3+n],a=tn(r,i,{mixer:(l=i[0],(t=>"object"==typeof t&&t.mix)(l)?l.mix:void 0),...s});var l;return e?a(o):a}function qs(t,e){const n=Xs(e()),o=()=>n.set(e());return o(),function(t,e){d(()=>{const n=t.map(t=>t.onChange(e));return()=>n.forEach(t=>t())})}(t,()=>Rn.update(o,!1,!0)),n}function Zs(t,e,n,o){const r="function"==typeof e?e:Gs(e,n,o);return Array.isArray(t)?Ks(t,r):Ks([t],([t])=>r(t))}function Ks(t,e){const n=A(()=>[]);return qs(t,()=>{n.length=0;const o=t.length;for(let e=0;e<o;e++)n[e]=t[e].get();return e(n)})}function _s(t,e=0){return z(t)?t:Xs(e)}const Js={Group:Hs,Item:e.forwardRef((function({children:t,style:n={},value:o,as:r="li",onDrag:s,layout:a=!0,...l},u){const c=A(()=>Ts(r)),d=e.useContext(Ws),h={x:_s(n.x),y:_s(n.y)},f=Zs([h.x,h.y],([t,e])=>t||e?1:"unset"),p=e.useRef(null),{axis:m,registerItem:g,updateOrder:v}=d;return e.useEffect(()=>{g(o,p.current)},[d]),i.createElement(c,{drag:m,...l,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:f},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&v(o,h[m].get(),n[m]),s&&s(t,e)},onLayoutMeasure:t=>{p.current=t},ref:u},t)}))},Qs={renderer:Pi,...cr,...uo},ta={...Qs,...Kr,...Li,projectionNodeConstructor:As};const ea=t=>"number"==typeof t;function na(t,e){return(t=>Array.isArray(t)&&!ea(t[0]))(t)?t[((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,e)]:t}const oa=(t,e,n)=>-n*t+n*e+t,ra=t=>t,ia=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function sa(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=ia(0,e,o);t.push(oa(n,1,r))}}function aa(t){const e=[0];return sa(e,t-1),e}function la(t,e=aa(t.length),n=ra){const o=t.length,r=o-e.length;return r>0&&sa(e,r),r=>{let i=0;for(;i<o-2&&!(r<e[i+1]);i++);let s=(a=0,l=1,u=ia(e[i],e[i+1],r),Math.min(Math.max(u,a),l));var a,l,u;return s=na(n,i)(s),oa(t[i],t[i+1],s)}}const ua=t=>"function"==typeof t,ca=t=>"string"==typeof t;function da(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const ha={any:0,all:1};const fa=new WeakMap;let pa;function ma({target:t,contentRect:e,borderBoxSize:n}){var o;null===(o=fa.get(t))||void 0===o||o.forEach(o=>{o({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function ga(t){t.forEach(ma)}function va(t,e){pa||"undefined"!=typeof ResizeObserver&&(pa=new ResizeObserver(ga));const n=da(t);return n.forEach(t=>{let n=fa.get(t);n||(n=new Set,fa.set(t,n)),n.add(e),null==pa||pa.observe(t)}),()=>{n.forEach(t=>{const n=fa.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==pa||pa.unobserve(t)})}}const ya=new Set;let xa;function ba(t){return ya.add(t),xa||(xa=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ya.forEach(t=>t(e))},window.addEventListener("resize",xa)),()=>{ya.delete(t),!ya.size&&xa&&(xa=void 0)}}const wa={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ea(t,e,n,o){const r=n[e],{length:i,position:s}=wa[e],a=r.current,l=n.time;r.current=t["scroll"+s],r.scrollLength=t["scroll"+i]-t["client"+i],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=ia(0,r.scrollLength,r.current);const u=o-l;var c,d;r.velocity=u>50?0:(c=r.current-a,(d=u)?c*(1e3/d):0)}const Sa={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Aa={start:0,center:.5,end:1};function Pa(t,e,n=0){let o=0;if(void 0!==Aa[t]&&(t=Aa[t]),ca(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return ea(t)&&(o=e*t),n+o}const Ta=[0,0];function Ca(t,e,n,o){let r=Array.isArray(t)?t:Ta,i=0,s=0;return ea(t)?r=[t,t]:ca(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Aa[t]?t:"0"]),i=Pa(r[0],n,o),s=Pa(r[1],e),i-s}const Va={x:0,y:0};function Ma(t,e,n){let{offset:o=Sa.All}=n;const{target:r=t,axis:i="y"}=n,s="y"===i?"height":"width",a=r!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(r,t):Va,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const d=o.length;for(let t=0;t<d;t++){const n=Ca(o[t],u[s],l[s],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=la(aa(d),e[i].offset),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Ra(t,e,n,o={}){const r=o.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){Ea(t,"x",e,n),Ea(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&Ma(t,n,o)},notify:ua(e)?()=>e(n):La(e,n[r])}}function La(t,e){return t.pause(),t.forEachNative((t,{easing:e})=>{var n,o;if(t.updateDuration)e||(t.easing=ra),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(o=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===o||o.call(n,r)}}),()=>{t.currentTime=e.progress}}const Oa=new WeakMap,ka=new WeakMap,Da=new WeakMap,ja=t=>t===document.documentElement?window:t;function Fa(t,e={}){var{container:n=document.documentElement}=e,o=Ce(e,["container"]);let r=Da.get(n);r||(r=new Set,Da.set(n,r));const i=Ra(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(r.add(i),!Oa.has(n)){const t=()=>{const t=performance.now();for(const t of r)t.measure();for(const e of r)e.update(t);for(const t of r)t.notify()};Oa.set(n,t);const e=ja(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&ka.set(n,function(t,e){return ua(t)?ba(t):va(t,e)}(n,t)),e.addEventListener("scroll",t,{passive:!0})}const s=Oa.get(n),a=requestAnimationFrame(s);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(a);const o=Da.get(n);if(!o)return;if(o.delete(i),o.size)return;const r=Oa.get(n);Oa.delete(n),r&&(ja(n).removeEventListener("scroll",r),null===(e=ka.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}}const Ia=()=>({scrollX:Uo(0),scrollY:Uo(0),scrollXProgress:Uo(0),scrollYProgress:Uo(0)});function Ba({container:t,target:e,...n}={}){const o=A(Ia);return d(()=>Fa(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...n,container:(null==t?void 0:t.current)||void 0,target:(null==e?void 0:e.current)||void 0}),[]),o}function Ua(t){const n=e.useRef(0),{isStatic:o}=e.useContext(s);e.useEffect(()=>{if(o)return;const e=({timestamp:e})=>{n.current||(n.current=e),t(e-n.current)};return Rn.update(e,!0),()=>Ln.update(e)},[t])}class za extends Bo{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;B.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||H(t)||"willChange"===t||(e=Ht(t)),e&&(jo(this.members,e),this.update())}remove(t){B.has(t)?(this.transforms.delete(t),this.transforms.size||Fo(this.members,"transform")):Fo(this.members,Ht(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Na(){!Jr.current&&Qr();const[t]=e.useState(_r.current);return t}function Wa(){let t=!1;const e=[],n=new Set,o={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(o,r){if(t){const t=[];return n.forEach(e=>{t.push(Qo(e,o,{transitionOverride:r}))}),Promise.all(t)}return new Promise(t=>{e.push({animation:[o,r],resolve:t})})},set:t=>n.forEach(e=>{!function(t,e){Array.isArray(e)?qo(t,e):"string"==typeof e?qo(t,[e]):Go(t,e)}(e,t)}),stop(){n.forEach(t=>{!function(t){t.forEachValue(t=>t.stop())}(t)})},mount:()=>(t=!0,e.forEach(({animation:t,resolve:e})=>{o.start(...t).then(e)}),()=>{t=!1,o.stop()})};return o}function Ha(){const t=A(Wa);return e.useEffect(t.mount,[]),t}const $a=Ha;class Ya{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Xa=()=>new Ya;function Ga(){return qa}function qa(t){Ss.current&&(Ss.current.isUpdating=!1,Ss.current.blockUpdate(),t&&t())}const Za=()=>({}),Ka=oi({build(){},measureViewportBox:Rr,resetTransform(){},restoreTransform(){},removeValueFromRenderState(){},render(){},scrapeMotionValuesFromProps:Za,readValueFromInstance:(t,e,n)=>n.initialState[e]||0,makeTargetAnimatable:(t,{transition:e,transitionEnd:n,...o})=>(Zo(t,o,_o(o,e||{},t)),{transition:e,transitionEnd:n,...o})}),_a=Qt({scrapeMotionValuesFromProps:Za,createRenderState:Za});const Ja=t=>t>.001?1/t:1e5;t.AnimatePresence=({children:t,custom:n,initial:o=!0,onExitComplete:r,exitBeforeEnter:s,presenceAffectsLayout:a=!0,mode:l="sync"})=>{s&&(l="wait",Qn(!1,"Replace exitBeforeEnter with mode='wait'"));let[u]=Ms();const c=e.useContext(C).forceRender;c&&(u=c);const h=Vs(),f=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=f;const m=new Set,g=e.useRef(p),v=e.useRef(new Map).current,y=e.useRef(!0);if(d(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=Ds(t);e.set(n,t)})}(f,v),g.current=p}),Te(()=>{y.current=!0,v.clear(),m.clear()}),y.current)return i.createElement(i.Fragment,null,p.map(t=>i.createElement(Os,{key:Ds(t),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:a,mode:l},t)));p=[...p];const x=g.current.map(Ds),b=f.map(Ds),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1===b.indexOf(e)&&m.add(e)}return"wait"===l&&m.size&&(p=[]),m.forEach(t=>{if(-1!==b.indexOf(t))return;const e=v.get(t);if(!e)return;const o=x.indexOf(t);p.splice(o,0,i.createElement(Os,{key:Ds(e),isPresent:!1,onExitComplete:()=>{v.delete(t),m.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!m.size){if(g.current=f,!1===h.current)return;u(),r&&r()}},custom:n,presenceAffectsLayout:a,mode:l},e))}),p=p.map(t=>{const e=t.key;return m.has(e)?t:i.createElement(Os,{key:Ds(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),"production"!==_n&&"wait"===l&&p.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),i.createElement(i.Fragment,null,m.size?p:p.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),i.createElement(Us,{id:A(()=>"asl-"+zs++)},t)),t.DeprecatedLayoutGroupContext=js,t.DragControls=Ya,t.FlatTree=es,t.LayoutGroup=Us,t.LayoutGroupContext=C,t.LazyMotion=function({children:t,features:n,strict:o=!1}){const[,r]=e.useState(!Ns(n)),s=e.useRef(void 0);if(!Ns(n)){const{renderer:t,...e}=n;s.current=t,S(e)}return e.useEffect(()=>{Ns(n)&&n().then(({renderer:t,...e})=>{S(e),s.current=t,r(!0)})},[]),i.createElement(h.Provider,{value:{renderer:s.current,strict:o}},t)},t.MotionConfig=function({children:t,isValidProp:n,...o}){n&&Dt(n),(o={...e.useContext(s),...o}).isStatic=A(()=>o.isStatic);const r=e.useMemo(()=>o,[JSON.stringify(o.transition),o.transformPagePoint,o.reducedMotion]);return i.createElement(s.Provider,{value:r},t)},t.MotionConfigContext=s,t.MotionContext=a,t.MotionValue=Bo,t.PresenceContext=u,t.Reorder=Js,t.SwitchLayoutGroupContext=M,t.addPointerEvent=ve,t.addScaleCorrector=F,t.animate=Oi,t.animateVisualElement=Qo,t.animationControls=Wa,t.animations=cr,t.calcLength=yr,t.checkTargetForNewValues=Zo,t.createBox=Rr,t.createDomMotionComponent=function(t){return R(oe(t,{forwardMotionProps:!1},Ps,Pi,As))},t.createMotionComponent=R,t.domAnimation=Qs,t.domMax=ta,t.filterProps=jt,t.isBrowser=c,t.isDragActive=Se,t.isMotionValue=z,t.isValidMotionProp=Ot,t.m=Cs,t.makeUseVisualState=Qt,t.motion=Ts,t.motionValue=Uo,t.resolveMotionValue=Jt,t.transform=Gs,t.useAnimation=$a,t.useAnimationControls=Ha,t.useAnimationFrame=Ua,t.useCycle=function(...t){const n=e.useRef(0),[o,r]=e.useState(t[n.current]);return[o,e.useCallback(e=>{n.current="number"!=typeof e?((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,n.current+1):e,r(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,o]=e.useState(t),r=_a({},!1),i=A(()=>Ka({props:{},visualState:r},{initialState:t}));return e.useEffect(()=>(i.mount({}),i.unmount),[i]),e.useEffect(()=>{i.setProps({onUpdate:t=>{o({...t})}})},[o,i]),[n,A(()=>t=>Qo(i,t))]},t.useDeprecatedInvertedScale=function(t){let e=Xs(1),n=Xs(1);const o=l();return t?(e=t.scaleX||e,n=t.scaleY||n):o&&(e=o.getValue("scaleX",1),n=o.getValue("scaleY",1)),{scaleX:Zs(e,Ja),scaleY:Zs(n,Ja)}},t.useDomEvent=se,t.useDragControls=function(){return A(Xa)},t.useElementScroll=function(t){return Qn(!1,"useElementScroll is deprecated. Convert to useScroll({ container: ref })."),Ba({container:t})},t.useForceUpdate=Ms,t.useInView=function(t,{root:n,margin:o,amount:r,once:i=!1}={}){const[s,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||i&&s)return;const e={root:n&&n.current||void 0,margin:o,amount:"some"===r?"any":r};return function(t,e,{root:n,margin:o,amount:r="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const i=da(t),s=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=s.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);ua(n)?s.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),s.delete(t.target))})},{root:n,rootMargin:o,threshold:"number"==typeof r?r:ha[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()}(t.current,()=>(a(!0),i?void 0:()=>a(!1)),e)},[n,t,o,i]),s},t.useInstantLayoutTransition=Ga,t.useInstantTransition=function(){const[t,n]=Ms(),o=Ga();return e.useEffect(()=>{Rn.postRender(()=>Rn.postRender(()=>To.current=!1))},[n]),e=>{o(()=>{To.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(u))||t.isPresent;var t},t.useIsomorphicLayoutEffect=d,t.useMotionTemplate=function(t,...e){const n=t.length;return qs(e,(function(){let o="";for(let r=0;r<n;r++){o+=t[r];e[r]&&(o+=e[r].get())}return o}))},t.useMotionValue=Xs,t.usePresence=co,t.useReducedMotion=Na,t.useReducedMotionConfig=function(){const t=Na(),{reducedMotion:n}=e.useContext(s);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=Ss.current;t&&t.resetTree()},[])},t.useScroll=Ba,t.useSpring=function(t,n={}){const{isStatic:o}=e.useContext(s),r=e.useRef(null),i=Xs(z(t)?t.get():t);return e.useMemo(()=>i.attach((t,e)=>o?e(t):(r.current&&r.current.stop(),r.current=Un({from:i.get(),to:t,velocity:i.getVelocity(),...n,onUpdate:e}),i.get())),[JSON.stringify(n)]),function(t,e){d(()=>{if(z(t))return t.onChange(e)},[e])}(t,t=>i.set(parseFloat(t))),i},t.useTime=function(){const t=Xs(0);return Ua(e=>t.set(e)),t},t.useTransform=Zs,t.useUnmountEffect=Te,t.useVelocity=function(t){const n=Xs(t.getVelocity());return e.useEffect(()=>t.velocityUpdateSubscribers.add(t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return Qn(!1,"useViewportScroll is deprecated. Convert to useScroll()."),Ba()},t.useVisualElementContext=l,t.useWillChange=function(){return A(()=>new za("auto"))},t.visualElement=oi,t.wrapHandler=fe,Object.defineProperty(t,"__esModule",{value:!0})}));