framer-motion 6.3.10 → 6.3.13

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 (234) hide show
  1. package/dist/cjs/index.js +18 -25
  2. package/dist/es/animation/use-animated-state.mjs +0 -1
  3. package/dist/es/animation/utils/transitions.mjs +0 -2
  4. package/dist/es/context/DeprecatedLayoutGroupContext.mjs +0 -1
  5. package/dist/es/context/LayoutGroupContext.mjs +0 -3
  6. package/dist/es/gestures/use-pan-gesture.mjs +1 -1
  7. package/dist/es/motion/index.mjs +0 -2
  8. package/dist/es/motion/utils/valid-prop.mjs +1 -1
  9. package/dist/es/projection/styles/transform.mjs +13 -2
  10. package/dist/es/render/utils/animation.mjs +0 -3
  11. package/dist/es/render/utils/motion-values.mjs +1 -1
  12. package/dist/es/value/index.mjs +2 -5
  13. package/dist/es/value/use-inverted-scale.mjs +0 -1
  14. package/dist/es/value/utils/resolve-motion-value.mjs +0 -2
  15. package/dist/framer-motion.dev.js +18 -25
  16. package/dist/framer-motion.js +1 -1
  17. package/dist/index.d.ts +4188 -0
  18. package/dist/projection.dev.js +16 -12
  19. package/dist/size-rollup-dom-animation.js +1 -1
  20. package/dist/size-rollup-dom-max.js +1 -1
  21. package/dist/size-webpack-dom-max.js +1 -1
  22. package/dist/three-entry.d.ts +2502 -0
  23. package/package.json +5 -5
  24. package/types/animation/animate.d.ts +0 -54
  25. package/types/animation/animation-controls.d.ts +0 -5
  26. package/types/animation/types.d.ts +0 -79
  27. package/types/animation/use-animated-state.d.ts +0 -6
  28. package/types/animation/use-animation.d.ts +0 -31
  29. package/types/animation/utils/default-transitions.d.ts +0 -19
  30. package/types/animation/utils/easing.d.ts +0 -3
  31. package/types/animation/utils/is-animatable.d.ts +0 -11
  32. package/types/animation/utils/is-animation-controls.d.ts +0 -2
  33. package/types/animation/utils/is-keyframes-target.d.ts +0 -2
  34. package/types/animation/utils/transitions.d.ts +0 -29
  35. package/types/animation/utils/variant-resolvers.d.ts +0 -12
  36. package/types/components/AnimatePresence/PresenceChild.d.ts +0 -12
  37. package/types/components/AnimatePresence/index.d.ts +0 -36
  38. package/types/components/AnimatePresence/types.d.ts +0 -61
  39. package/types/components/AnimatePresence/use-presence.d.ts +0 -52
  40. package/types/components/AnimateSharedLayout.d.ts +0 -2
  41. package/types/components/LayoutGroup/index.d.ts +0 -12
  42. package/types/components/LazyMotion/index.d.ts +0 -38
  43. package/types/components/LazyMotion/types.d.ts +0 -54
  44. package/types/components/MotionConfig/index.d.ts +0 -25
  45. package/types/components/Reorder/Group.d.ts +0 -297
  46. package/types/components/Reorder/Item.d.ts +0 -278
  47. package/types/components/Reorder/index.d.ts +0 -509
  48. package/types/components/Reorder/types.d.ts +0 -10
  49. package/types/components/Reorder/utils/check-reorder.d.ts +0 -2
  50. package/types/context/DeprecatedLayoutGroupContext.d.ts +0 -6
  51. package/types/context/LayoutGroupContext.d.ts +0 -11
  52. package/types/context/LazyContext.d.ts +0 -7
  53. package/types/context/MotionConfigContext.d.ts +0 -36
  54. package/types/context/MotionContext/create.d.ts +0 -3
  55. package/types/context/MotionContext/index.d.ts +0 -9
  56. package/types/context/MotionContext/utils.d.ts +0 -3
  57. package/types/context/PresenceContext.d.ts +0 -17
  58. package/types/context/ReorderContext.d.ts +0 -3
  59. package/types/context/SwitchLayoutGroupContext.d.ts +0 -23
  60. package/types/events/event-info.d.ts +0 -5
  61. package/types/events/types.d.ts +0 -10
  62. package/types/events/use-dom-event.d.ts +0 -24
  63. package/types/events/use-pointer-event.d.ts +0 -4
  64. package/types/events/utils.d.ts +0 -3
  65. package/types/gestures/PanSession.d.ts +0 -127
  66. package/types/gestures/drag/VisualElementDragControls.d.ts +0 -56
  67. package/types/gestures/drag/types.d.ts +0 -294
  68. package/types/gestures/drag/use-drag-controls.d.ts +0 -74
  69. package/types/gestures/drag/use-drag.d.ts +0 -7
  70. package/types/gestures/drag/utils/constraints.d.ts +0 -77
  71. package/types/gestures/drag/utils/lock.d.ts +0 -4
  72. package/types/gestures/types.d.ts +0 -225
  73. package/types/gestures/use-focus-gesture.d.ts +0 -8
  74. package/types/gestures/use-hover-gesture.d.ts +0 -2
  75. package/types/gestures/use-pan-gesture.d.ts +0 -14
  76. package/types/gestures/use-tap-gesture.d.ts +0 -6
  77. package/types/gestures/utils/event-type.d.ts +0 -2
  78. package/types/gestures/utils/is-node-or-child.d.ts +0 -8
  79. package/types/index.d.ts +0 -96
  80. package/types/motion/features/animations.d.ts +0 -2
  81. package/types/motion/features/definitions.d.ts +0 -3
  82. package/types/motion/features/drag.d.ts +0 -2
  83. package/types/motion/features/gestures.d.ts +0 -2
  84. package/types/motion/features/layout/MeasureLayout.d.ts +0 -3
  85. package/types/motion/features/layout/index.d.ts +0 -2
  86. package/types/motion/features/layout/types.d.ts +0 -75
  87. package/types/motion/features/types.d.ts +0 -52
  88. package/types/motion/features/use-features.d.ts +0 -8
  89. package/types/motion/features/use-projection.d.ts +0 -3
  90. package/types/motion/features/viewport/observers.d.ts +0 -3
  91. package/types/motion/features/viewport/types.d.ts +0 -21
  92. package/types/motion/features/viewport/use-viewport.d.ts +0 -2
  93. package/types/motion/index.d.ts +0 -25
  94. package/types/motion/types.d.ts +0 -279
  95. package/types/motion/utils/VisualElementHandler.d.ts +0 -18
  96. package/types/motion/utils/is-forced-motion-value.d.ts +0 -2
  97. package/types/motion/utils/make-renderless-component.d.ts +0 -2
  98. package/types/motion/utils/should-inherit-variant.d.ts +0 -2
  99. package/types/motion/utils/use-motion-ref.d.ts +0 -8
  100. package/types/motion/utils/use-visual-element.d.ts +0 -6
  101. package/types/motion/utils/use-visual-state.d.ts +0 -14
  102. package/types/motion/utils/valid-prop.d.ts +0 -9
  103. package/types/projection/animation/mix-values.d.ts +0 -2
  104. package/types/projection/geometry/conversion.d.ts +0 -14
  105. package/types/projection/geometry/copy.d.ts +0 -13
  106. package/types/projection/geometry/delta-apply.d.ts +0 -37
  107. package/types/projection/geometry/delta-calc.d.ts +0 -10
  108. package/types/projection/geometry/delta-remove.d.ts +0 -20
  109. package/types/projection/geometry/models.d.ts +0 -5
  110. package/types/projection/geometry/types.d.ts +0 -29
  111. package/types/projection/geometry/utils.d.ts +0 -3
  112. package/types/projection/index.d.ts +0 -14
  113. package/types/projection/node/DocumentProjectionNode.d.ts +0 -108
  114. package/types/projection/node/HTMLProjectionNode.d.ts +0 -112
  115. package/types/projection/node/create-projection-node.d.ts +0 -301
  116. package/types/projection/node/group.d.ts +0 -7
  117. package/types/projection/node/id.d.ts +0 -1
  118. package/types/projection/node/types.d.ts +0 -136
  119. package/types/projection/shared/stack.d.ts +0 -17
  120. package/types/projection/styles/scale-border-radius.d.ts +0 -11
  121. package/types/projection/styles/scale-box-shadow.d.ts +0 -2
  122. package/types/projection/styles/scale-correction.d.ts +0 -3
  123. package/types/projection/styles/transform-origin.d.ts +0 -0
  124. package/types/projection/styles/transform.d.ts +0 -4
  125. package/types/projection/styles/types.d.ts +0 -9
  126. package/types/projection/use-instant-layout-transition.d.ts +0 -1
  127. package/types/projection/use-reset-projection.d.ts +0 -1
  128. package/types/projection/utils/each-axis.d.ts +0 -3
  129. package/types/projection/utils/has-transform.d.ts +0 -3
  130. package/types/projection/utils/measure.d.ts +0 -4
  131. package/types/render/dom/create-visual-element.d.ts +0 -2
  132. package/types/render/dom/features-animation.d.ts +0 -5
  133. package/types/render/dom/features-max.d.ts +0 -5
  134. package/types/render/dom/motion-minimal.d.ts +0 -5
  135. package/types/render/dom/motion-proxy.d.ts +0 -30
  136. package/types/render/dom/motion.d.ts +0 -25
  137. package/types/render/dom/types.d.ts +0 -28
  138. package/types/render/dom/use-render.d.ts +0 -4
  139. package/types/render/dom/utils/camel-to-dash.d.ts +0 -4
  140. package/types/render/dom/utils/create-config.d.ts +0 -8
  141. package/types/render/dom/utils/css-variables-conversion.d.ts +0 -22
  142. package/types/render/dom/utils/filter-props.d.ts +0 -4
  143. package/types/render/dom/utils/is-css-variable.d.ts +0 -4
  144. package/types/render/dom/utils/is-svg-component.d.ts +0 -2
  145. package/types/render/dom/utils/parse-dom-variant.d.ts +0 -6
  146. package/types/render/dom/utils/unit-conversion.d.ts +0 -27
  147. package/types/render/dom/value-types/animatable-none.d.ts +0 -1
  148. package/types/render/dom/value-types/defaults.d.ts +0 -9
  149. package/types/render/dom/value-types/dimensions.d.ts +0 -8
  150. package/types/render/dom/value-types/find.d.ts +0 -9
  151. package/types/render/dom/value-types/get-as-type.d.ts +0 -5
  152. package/types/render/dom/value-types/number.d.ts +0 -2
  153. package/types/render/dom/value-types/test.d.ts +0 -5
  154. package/types/render/dom/value-types/type-auto.d.ts +0 -5
  155. package/types/render/dom/value-types/type-int.d.ts +0 -8
  156. package/types/render/dom/value-types/types.d.ts +0 -4
  157. package/types/render/html/config-motion.d.ts +0 -3
  158. package/types/render/html/supported-elements.d.ts +0 -7
  159. package/types/render/html/types.d.ts +0 -61
  160. package/types/render/html/use-props.d.ts +0 -8
  161. package/types/render/html/utils/build-styles.d.ts +0 -5
  162. package/types/render/html/utils/build-transform.d.ts +0 -15
  163. package/types/render/html/utils/create-render-state.d.ts +0 -7
  164. package/types/render/html/utils/render.d.ts +0 -4
  165. package/types/render/html/utils/scrape-motion-values.d.ts +0 -2
  166. package/types/render/html/utils/transform.d.ts +0 -15
  167. package/types/render/html/visual-element.d.ts +0 -6
  168. package/types/render/index.d.ts +0 -2
  169. package/types/render/svg/config-motion.d.ts +0 -3
  170. package/types/render/svg/lowercase-elements.d.ts +0 -5
  171. package/types/render/svg/supported-elements.d.ts +0 -7
  172. package/types/render/svg/types.d.ts +0 -44
  173. package/types/render/svg/use-props.d.ts +0 -7
  174. package/types/render/svg/utils/build-attrs.d.ts +0 -8
  175. package/types/render/svg/utils/camel-case-attrs.d.ts +0 -4
  176. package/types/render/svg/utils/create-render-state.d.ts +0 -2
  177. package/types/render/svg/utils/path.d.ts +0 -9
  178. package/types/render/svg/utils/render.d.ts +0 -4
  179. package/types/render/svg/utils/scrape-motion-values.d.ts +0 -2
  180. package/types/render/svg/utils/transform-origin.d.ts +0 -6
  181. package/types/render/svg/visual-element.d.ts +0 -2
  182. package/types/render/types.d.ts +0 -113
  183. package/types/render/utils/animation-state.d.ts +0 -31
  184. package/types/render/utils/animation.d.ts +0 -21
  185. package/types/render/utils/compare-by-depth.d.ts +0 -5
  186. package/types/render/utils/flat-tree.d.ts +0 -8
  187. package/types/render/utils/is-draggable.d.ts +0 -2
  188. package/types/render/utils/lifecycles.d.ts +0 -114
  189. package/types/render/utils/motion-values.d.ts +0 -3
  190. package/types/render/utils/setters.d.ts +0 -792
  191. package/types/render/utils/types.d.ts +0 -9
  192. package/types/render/utils/variants.d.ts +0 -20
  193. package/types/three-entry.d.ts +0 -19
  194. package/types/types.d.ts +0 -981
  195. package/types/utils/array.d.ts +0 -3
  196. package/types/utils/each-axis.d.ts +0 -1
  197. package/types/utils/is-browser.d.ts +0 -1
  198. package/types/utils/is-numerical-string.d.ts +0 -4
  199. package/types/utils/is-ref-object.d.ts +0 -2
  200. package/types/utils/is-zero-value-string.d.ts +0 -4
  201. package/types/utils/noop.d.ts +0 -1
  202. package/types/utils/process.d.ts +0 -1
  203. package/types/utils/resolve-value.d.ts +0 -3
  204. package/types/utils/shallow-compare.d.ts +0 -1
  205. package/types/utils/subscription-manager.d.ts +0 -9
  206. package/types/utils/time-conversion.d.ts +0 -7
  207. package/types/utils/transform.d.ts +0 -91
  208. package/types/utils/use-animation-frame.d.ts +0 -2
  209. package/types/utils/use-constant.d.ts +0 -10
  210. package/types/utils/use-cycle.d.ts +0 -30
  211. package/types/utils/use-force-update.d.ts +0 -1
  212. package/types/utils/use-id.d.ts +0 -6
  213. package/types/utils/use-instant-transition-state.d.ts +0 -3
  214. package/types/utils/use-instant-transition.d.ts +0 -1
  215. package/types/utils/use-is-mounted.d.ts +0 -2
  216. package/types/utils/use-isomorphic-effect.d.ts +0 -2
  217. package/types/utils/use-reduced-motion.d.ts +0 -28
  218. package/types/utils/use-unmount-effect.d.ts +0 -1
  219. package/types/utils/warn-once.d.ts +0 -2
  220. package/types/value/index.d.ts +0 -260
  221. package/types/value/scroll/use-element-scroll.d.ts +0 -28
  222. package/types/value/scroll/use-viewport-scroll.d.ts +0 -22
  223. package/types/value/scroll/utils.d.ts +0 -19
  224. package/types/value/use-combine-values.d.ts +0 -2
  225. package/types/value/use-inverted-scale.d.ts +0 -28
  226. package/types/value/use-motion-template.d.ts +0 -24
  227. package/types/value/use-motion-value.d.ts +0 -19
  228. package/types/value/use-on-change.d.ts +0 -3
  229. package/types/value/use-spring.d.ts +0 -22
  230. package/types/value/use-time.d.ts +0 -1
  231. package/types/value/use-transform.d.ts +0 -93
  232. package/types/value/use-velocity.d.ts +0 -13
  233. package/types/value/utils/is-motion-value.d.ts +0 -2
  234. package/types/value/utils/resolve-motion-value.d.ts +0 -10
@@ -1 +1 @@
1
- import t,{useEffect as e,useRef as n,createContext as r,useContext as i}from"react";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function c(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function d(t){return!!t.touches}var p={pageX:0,pageY:0};function f(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||p;return{x:n[e+"X"],y:n[e+"Y"]}}function v(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function h(t,e){return void 0===e&&(e="page"),{point:d(t)?f(t,e):v(t,e)}}var m=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,h(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r};const y="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),g="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(y()),1/60*1e3);let x=!0,b=!1,P=!1;const w={delta:0,timestamp:0},A=["read","update","preRender","render","postRender"],T=A.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(t,o=!1,s=!1)=>{const u=s&&i,l=u?e:n;return o&&a.add(t),-1===l.indexOf(t)&&(l.push(t),u&&i&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),a.has(r)&&(s.schedule(r),t())}i=!1,o&&(o=!1,s.process(u))}}};return s}(()=>b=!0),t),{}),E=A.reduce((t,e)=>{const n=T[e];return t[e]=(t,e=!1,r=!1)=>(b||C(),n.schedule(t,e,r)),t},{}),S=A.reduce((t,e)=>(t[e]=T[e].cancel,t),{}),V=A.reduce((t,e)=>(t[e]=()=>T[e].process(w),t),{}),M=t=>T[t].process(w),R=t=>{b=!1,w.delta=x?1/60*1e3:Math.max(Math.min(t-w.timestamp,40),1),w.timestamp=t,P=!0,A.forEach(M),P=!1,b&&(x=!1,g(R))},C=()=>{b=!0,x=!0,P||g(R)},L=()=>w;var D=E,O=function(t){return 1e3*t};function k(t,e,n,r){return void 0===r&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function j(t,n,r,i){e((function(){var e=t.current;if(r&&e)return k(e,n,r,i)}),[t,n,r,i])}var F="undefined"!=typeof document,U={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},B={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function I(t){return F&&null===window.onpointerdown?t:F&&null===window.ontouchstart?B[t]:F&&null===window.onmousedown?U[t]:t}function N(t,e,n,r){return k(t,I(e),m(n,"pointerdown"===e),r)}function z(t,e,n,r){return j(t,I(e),n&&m(n,"pointerdown"===e),r)}const Y=(t,e,n)=>Math.min(Math.max(n,t),e);function X({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,a=1-e;a=Y(.05,1,a),t=Y(.01,10,t/1e3),a<1?(i=e=>{const r=e*a,i=r*t;return.001-(r-n)/H(e,a)*Math.exp(-i)},o=e=>{const r=e*a*t,o=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=H(Math.pow(e,2),a);return(.001-i(e)>0?-1:1)*((o-s)*u)/l}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(i,o,5/t);if(t*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function H(t,e){return t*Math.sqrt(1-e*e)}const W=["duration","bounce"],G=["stiffness","damping","mass"];function $(t,e){return e.some(e=>void 0!==t[e])}function q(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:i}=t,o=s(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:u,damping:l,mass:c,velocity:d,duration:p,isResolvedFromDuration:f}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!$(t,G)&&$(t,W)){const n=X(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(o),v=Z,h=Z;function m(){const t=d?-d/1e3:0,r=n-e,o=l/(2*Math.sqrt(u*c)),a=Math.sqrt(u/c)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-e)/100,.4)),o<1){const e=H(a,o);v=i=>{const s=Math.exp(-o*a*i);return n-s*((t+o*a*r)/e*Math.sin(e*i)+r*Math.cos(e*i))},h=n=>{const i=Math.exp(-o*a*n);return o*a*i*(Math.sin(e*n)*(t+o*a*r)/e+r*Math.cos(e*n))-i*(Math.cos(e*n)*(t+o*a*r)-e*r*Math.sin(e*n))}}else if(1===o)v=e=>n-Math.exp(-a*e)*(r+(t+a*r)*e);else{const e=a*Math.sqrt(o*o-1);v=i=>{const s=Math.exp(-o*a*i),u=Math.min(e*i,300);return n-s*((t+o*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return m(),{next:t=>{const e=v(t);if(f)a.done=t>=p;else{const o=1e3*h(t),s=Math.abs(o)<=r,u=Math.abs(n-e)<=i;a.done=s&&u}return a.value=a.done?n:e,a},flipTarget:()=>{d=-d,[e,n]=[n,e],m()}}}q.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Z=t=>0,_=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},K=(t,e,n)=>-n*t+n*e+t,J=(t,e)=>n=>Math.max(Math.min(n,e),t),Q=t=>t%1?Number(t.toFixed(5)):t,tt=/(-)?([\d]*\.?[\d])+/g,et=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,nt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function rt(t){return"string"==typeof t}const it={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ot=Object.assign(Object.assign({},it),{transform:J(0,1)}),at=Object.assign(Object.assign({},it),{default:1}),st=t=>({test:e=>rt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ut=st("deg"),lt=st("%"),ct=st("px"),dt=st("vh"),pt=st("vw"),ft=Object.assign(Object.assign({},lt),{parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}),vt=(t,e)=>n=>Boolean(rt(n)&&nt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ht=(t,e,n)=>r=>{if(!rt(r))return r;const[i,o,a,s]=r.match(tt);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},mt={test:vt("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+lt.transform(Q(e))+", "+lt.transform(Q(n))+", "+Q(ot.transform(r))+")"},yt=J(0,255),gt=Object.assign(Object.assign({},it),{transform:t=>Math.round(yt(t))}),xt={test:vt("rgb","red"),parse:ht("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+gt.transform(t)+", "+gt.transform(e)+", "+gt.transform(n)+", "+Q(ot.transform(r))+")"};const bt={test:vt("#"),parse:function(t){let e="",n="",r="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:xt.transform},Pt={test:t=>xt.test(t)||bt.test(t)||mt.test(t),parse:t=>xt.test(t)?xt.parse(t):mt.test(t)?mt.parse(t):bt.parse(t),transform:t=>rt(t)?t:t.hasOwnProperty("red")?xt.transform(t):mt.transform(t)};function wt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(et);r&&(n=r.length,t=t.replace(et,"${c}"),e.push(...r.map(Pt.parse)));const i=t.match(tt);return i&&(t=t.replace(tt,"${n}"),e.push(...i.map(it.parse))),{values:e,numColors:n,tokenised:t}}function At(t){return wt(t).values}function Tt(t){const{values:e,numColors:n,tokenised:r}=wt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?Pt.transform(t[r]):Q(t[r]));return e}}const Et=t=>"number"==typeof t?0:t;const St={test:function(t){var e,n,r,i;return isNaN(t)&&rt(t)&&(null!==(n=null===(e=t.match(tt))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(r=t.match(et))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:At,createTransformer:Tt,getAnimatableNone:function(t){const e=At(t);return Tt(t)(e.map(Et))}},Vt=new Set(["brightness","contrast","saturate","opacity"]);function Mt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(tt)||[];if(!r)return t;const i=n.replace(r,"");let o=Vt.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Rt=/([a-z-]*)\(.*?\)/g,Ct=Object.assign(Object.assign({},St),{getAnimatableNone:t=>{const e=t.match(Rt);return e?e.map(Mt).join(" "):t}});function Lt(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 Dt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let i=0,o=0,a=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r;i=Lt(s,r,t+1/3),o=Lt(s,r,t),a=Lt(s,r,t-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}const Ot=(t,e,n)=>{const r=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-r)+r))},kt=[bt,xt,mt],jt=t=>kt.find(e=>e.test(t)),Ft=(t,e)=>{let n=jt(t),r=jt(e),i=n.parse(t),o=r.parse(e);n===mt&&(i=Dt(i),n=xt),r===mt&&(o=Dt(o),r=xt);const a=Object.assign({},i);return t=>{for(const e in a)"alpha"!==e&&(a[e]=Ot(i[e],o[e],t));return a.alpha=K(i.alpha,o.alpha,t),n.transform(a)}},Ut=t=>"number"==typeof t,Bt=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bt);function Nt(t,e){return Ut(t)?n=>K(t,e,n):Pt.test(t)?Ft(t,e):Ht(t,e)}const zt=(t,e)=>{const n=[...t],r=n.length,i=t.map((t,n)=>Nt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}},Yt=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=Nt(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function Xt(t){const e=St.parse(t),n=e.length;let r=0,i=0,o=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}const Ht=(t,e)=>{const n=St.createTransformer(e),r=Xt(t),i=Xt(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?It(zt(r.parsed,i.parsed),n):n=>""+(n>0?e:t)},Wt=(t,e)=>n=>K(t,e,n);function Gt(t,e,n){const r=[],i=n||("number"==typeof(o=t[0])?Wt:"string"==typeof o?Pt.test(o)?Ft:Ht:Array.isArray(o)?zt:"object"==typeof o?Yt:void 0);var o;const a=t.length-1;for(let n=0;n<a;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=It(t,o)}r.push(o)}return r}function $t(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[o-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=Gt(e,r,i),s=2===o?function([t,e],[n]){return r=>n(_(t,e,r))}(t,a):function(t,e){const n=t.length,r=n-1;return i=>{let o=0,a=!1;if(i<=t[0]?a=!0:i>=t[r]&&(o=r-1,a=!0),!a){let e=1;for(;e<n&&!(t[e]>i||e===r);e++);o=e-1}const s=_(t[o],t[o+1],i);return e[o](s)}}(t,a);return n?e=>s(Y(t[0],t[o-1],e)):s}const qt=t=>e=>1-t(1-e),Zt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_t=t=>e=>e*e*((t+1)*e-t),Kt=t=>t,Jt=(Qt=2,t=>Math.pow(t,Qt));var Qt;const te=qt(Jt),ee=Zt(Jt),ne=t=>1-Math.sin(Math.acos(t)),re=qt(ne),ie=Zt(re),oe=_t(1.525),ae=qt(oe),se=Zt(oe),ue=(t=>{const e=_t(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),le=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},ce=qt(le);function de(t,e){return t.map(()=>e||ee).splice(0,t.length-1)}function pe({from:t=0,to:e=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map(t=>t*e)}(r&&r.length===a.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(a),i);function u(){return $t(s,a,{ease:Array.isArray(n)?n:de(a,n)})}let l=u();return{next:t=>(o.value=l(t),o.done=t>=i,o),flipTarget:()=>{a.reverse(),l=u()}}}const fe={keyframes:pe,spring:q,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:e};let s=n*t;const u=e+s,l=void 0===o?u:o(u);return l!==u&&(s=l-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>i||e<-i),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};function ve(t,e,n=0){return t-e-n}const he=t=>{const e=({delta:e})=>t(e);return{start:()=>D.update(e,!0),stop:()=>S.update(e)}};function me(t){var e,n,{from:r,autoplay:i=!0,driver:o=he,elapsed:a=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:p,onComplete:f,onRepeat:v,onUpdate:h}=t,m=s(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,g,x,{to:b}=m,P=0,w=m.duration,A=!1,T=!0;const E=function(t){if(Array.isArray(t.to))return pe;if(fe[t.type])return fe[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?pe:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?q:pe}(m);(null===(n=(e=E).needsInterpolation)||void 0===n?void 0:n.call(e,r,b))&&(x=$t([0,100],[r,b],{clamp:!1}),r=0,b=100);const S=E(Object.assign(Object.assign({},m),{from:r,to:b}));function V(){P++,"reverse"===l?(T=P%2==0,a=function(t,e,n=0,r=!0){return r?ve(e+-t,e,n):e-(t-e)+n}(a,w,c,T)):(a=ve(a,w,c),"mirror"===l&&S.flipTarget()),A=!1,v&&v()}function M(t){if(T||(t=-t),a+=t,!A){const t=S.next(Math.max(0,a));g=t.value,x&&(g=x(g)),A=T?t.done:a<=0}null==h||h(g),A&&(0===P&&(null!=w||(w=a)),P<u?function(t,e,n,r){return r?t>=e+n:t<=-n}(a,w,c,T)&&V():(y.stop(),f&&f()))}return i&&(null==d||d(),y=o(M),y.start()),{stop:()=>{null==p||p(),y.stop()}}}function ye(t,e){return e?t*(1e3/e):0}const ge=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),xe=t=>ge(t)&&t.hasOwnProperty("z"),be=(t,e)=>Math.abs(t-e);function Pe(t,e){if(Ut(t)&&Ut(e))return be(t,e);if(ge(t)&&ge(e)){const n=be(t.x,e.x),r=be(t.y,e.y),i=xe(t)&&xe(e)?be(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const we=(t,e)=>1-3*e+3*t,Ae=(t,e)=>3*e-6*t,Te=t=>3*t,Ee=(t,e,n)=>((we(e,n)*t+Ae(e,n))*t+Te(e))*t,Se=(t,e,n)=>3*we(e,n)*t*t+2*Ae(e,n)*t+Te(e);function Ve(t,e,n,r){if(t===e&&n===r)return Kt;const i=new Float32Array(11);for(let e=0;e<11;++e)i[e]=Ee(.1*e,t,n);function o(e){let r=0,o=1;for(;10!==o&&i[o]<=e;++o)r+=.1;--o;const a=r+.1*((e-i[o])/(i[o+1]-i[o])),s=Se(a,t,n);return s>=.001?function(t,e,n,r){for(let i=0;i<8;++i){const i=Se(e,n,r);if(0===i)return e;e-=(Ee(e,n,r)-t)/i}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){let o,a,s=0;do{a=e+(n-e)/2,o=Ee(a,r,i)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:Ee(o(t),e,r)}var Me=function(){function t(t,e,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=Le(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=Pe(t.offset,{x:0,y:0})>=3;if(e||n){var i=t.point,o=L().timestamp;r.history.push(a(a({},i),{timestamp:o}));var s=r.handlers,u=s.onStart,l=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){r.lastMoveEvent=t,r.lastMoveEventInfo=Re(e,r.transformPagePoint),c(t)&&0===t.buttons?r.handlePointerUp(t,e):D.update(r.updatePoint,!0)},this.handlePointerUp=function(t,e){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,a=Le(Re(e,r.transformPagePoint),r.history);r.startEvent&&i&&i(t,a),o&&o(t,a)},!(d(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var o=Re(h(t),this.transformPagePoint),s=o.point,u=L().timestamp;this.history=[a(a({},s),{timestamp:u})];var l=e.onSessionStart;l&&l(t,Le(o,this.history)),this.removeListeners=It(N(window,"pointermove",this.handlePointerMove),N(window,"pointerup",this.handlePointerUp),N(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),S.update(this.updatePoint)},t}();function Re(t,e){return e?{point:e(t.point)}:t}function Ce(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le(t,e){var n=t.point;return{point:n,delta:Ce(n,Oe(e)),offset:Ce(n,De(e)),velocity:ke(e,.1)}}function De(t){return t[0]}function Oe(t){return t[t.length-1]}function ke(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=Oe(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>O(e)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function je(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Fe=je("dragHorizontal"),Ue=je("dragVertical");function Be(t){var e=!1;if("y"===t)e=Ue();else if("x"===t)e=Fe();else{var n=Fe(),r=Ue();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ie(){var t=Be(!0);return!t||(t(),!1)}function Ne(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ze(t){return t.max-t.min}function Ye(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Pe(t,e)<n}function Xe(t,e,n,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=K(e.min,e.max,t.origin),t.scale=ze(n)/ze(e),(Ye(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=K(n.min,n.max,t.origin)-t.originPoint,(Ye(t.translate)||isNaN(t.translate))&&(t.translate=0)}function He(t,e,n,r){Xe(t.x,e.x,n.x,null==r?void 0:r.originX),Xe(t.y,e.y,n.y,null==r?void 0:r.originY)}function We(t,e,n){t.min=n.min+e.min,t.max=t.min+ze(e)}function Ge(t,e,n){t.min=e.min-n.min,t.max=t.min+ze(e)}function $e(t,e,n){Ge(t.x,e.x,n.x),Ge(t.y,e.y,n.y)}function qe(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 Ze(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=u([i,r],2))[0],i=n[1]),{min:r,max:i}}var _e;function Ke(t,e,n){return{min:Je(t,e),max:Je(t,n)}}function Je(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(_e||(_e={}));function Qe(t){return[t("x"),t("y")]}function tn(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function en(t){return void 0===t||1===t}function nn(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!en(e)||!en(n)||!en(r)}function rn(t){return nn(t)||on(t.x)||on(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function on(t){return t&&"0%"!==t}function an(t,e,n){return n+e*(t-n)}function sn(t,e,n,r,i){return void 0!==i&&(t=an(t,i,r)),an(t,n,r)+e}function un(t,e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=1),t.min=sn(t.min,e,n,r,i),t.max=sn(t.max,e,n,r,i)}function ln(t,e){var n=e.x,r=e.y;un(t.x,n.translate,n.scale,n.originPoint),un(t.y,r.translate,r.scale,r.originPoint)}function cn(t,e){t.min=t.min+e,t.max=t.max+e}function dn(t,e,n){var r=u(n,3),i=r[0],o=r[1],a=r[2],s=void 0!==e[a]?e[a]:.5,l=K(t.min,t.max,s);un(t,e[i],e[o],l,e.scale)}var pn=["x","scaleX","originX"],fn=["y","scaleY","originY"];function vn(t,e){dn(t.x,e,pn),dn(t.y,e,fn)}function hn(t,e){return tn(function(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}var mn={linear:Kt,easeIn:Jt,easeInOut:ee,easeOut:te,circIn:ne,circInOut:ie,circOut:re,backIn:oe,backInOut:se,backOut:ae,anticipate:ue,bounceIn:ce,bounceInOut:t=>t<.5?.5*(1-le(1-2*t)):.5*le(2*t-1)+.5,bounceOut:le},yn=function(t){if(Array.isArray(t)){t.length;var e=u(t,4);return Ve(e[0],e[1],e[2],e[3])}return"string"==typeof t?mn[t]:t},gn=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!St.test(e)||e.startsWith("url(")))},xn=function(t){return Array.isArray(t)},bn=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Pn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},wn=function(){return{type:"keyframes",ease:"linear",duration:.3}},An=function(t){return{type:"keyframes",duration:.8,values:t}},Tn={x:bn,y:bn,z:bn,rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scaleX:Pn,scaleY:Pn,scale:Pn,opacity:wn,backgroundColor:wn,color:wn,default:Pn},En=a(a({},it),{transform:Math.round}),Sn={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,size:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:at,scaleX:at,scaleY:at,scaleZ:at,skew:ut,skewX:ut,skewY:ut,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:ot,originX:ft,originY:ft,originZ:ct,zIndex:En,fillOpacity:ot,strokeOpacity:ot,numOctaves:En},Vn=a(a({},Sn),{color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Ct,WebkitFilter:Ct}),Mn=function(t){return Vn[t]};function Rn(t,e){var n,r=Mn(t);return r!==Ct&&(r=St),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Cn=!1,Ln=function(t){return xn(t)?t[t.length-1]||0:t};function Dn(t){var e=t.ease,n=t.times,r=t.yoyo,i=t.flip,o=t.loop,u=s(t,["ease","times","yoyo","flip","loop"]),l=a({},u);return n&&(l.offset=n),u.duration&&(l.duration=O(u.duration)),u.repeatDelay&&(l.repeatDelay=O(u.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(yn):yn(e)),"tween"===u.type&&(l.type="keyframes"),(r||o||i)&&(r?l.repeatType="reverse":o?l.repeatType="loop":i&&(l.repeatType="mirror"),l.repeat=o||r||i||u.repeat),"spring"!==u.type&&(l.type="keyframes"),l}function On(t,e,n){var r,i,o,c;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=l([],u(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=s(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=a(a({},t),(i=n,o=e.to,c=xn(o)?An:Tn[i]||Tn.default,a({to:o},c(o))))),a(a({},e),Dn(t))}function kn(t,e,n,r,i){var o,s=Un(r,t),u=null!==(o=s.from)&&void 0!==o?o:e.get(),l=gn(t,n);return"none"===u&&l&&"string"==typeof n?u=Rn(t,n):jn(u)&&"string"==typeof n?u=Fn(n):!Array.isArray(n)&&jn(n)&&"string"==typeof u&&(n=Fn(u)),gn(t,u)&&l&&!1!==s.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:p,onStop:f}){let v;function h(t){return void 0!==n&&t<n||void 0!==r&&t>r}function m(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function y(t){null==v||v.stop(),v=me(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:p,onStop:f}))}function g(t){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(h(t))g({from:t,velocity:e,to:m(t)});else{let r=i*e+t;void 0!==l&&(r=l(r));const a=m(r),s=a===n?-1:1;let c,d;const p=t=>{c=d,d=t,e=ye(t-c,L().delta),(1===s&&t>a||-1===s&&t<a)&&g({from:t,to:a,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:o,power:i,restDelta:u,modifyTarget:l,onUpdate:h(r)?p:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(a(a({},r),s)):me(a(a({},On(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,r,o=Ln(n);return e.set(o),i(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,o),null===(r=null==s?void 0:s.onComplete)||void 0===r||r.call(s),{stop:function(){}}}}function jn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Fn(t){return"number"==typeof t?0:Rn("",t)}function Un(t,e){return t[e]||t.default||t}function Bn(t,e,n,r){return void 0===r&&(r={}),Cn&&(r={type:!1}),e.start((function(i){var o,a,s=kn(t,e,n,r,i),u=function(t,e){var n,r;return null!==(r=null!==(n=(Un(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return a=s()};return u?o=window.setTimeout(l,O(u)):l(),function(){clearTimeout(o),null==a||a.stop()}}))}var In=new WeakMap,Nn=function(){function t(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}return t.prototype.start=function(t,e){var n=this,r=(void 0===e?{}:e).snapToCursor,i=void 0!==r&&r;if(!1!==this.visualElement.isPresent){this.panSession=new Me(t,{onSessionStart:function(t){n.stopAnimation(),i&&n.snapToCursor(h(t,"page").point)},onStart:function(t,e){var r,i=n.getProps(),o=i.drag,a=i.dragPropagation,s=i.onDragStart;(!o||a||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Be(o),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),Qe((function(t){var e,r,i=n.getAxisMotionValue(t).get()||0;if(lt.test(i)){var o=null===(r=null===(e=n.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===r?void 0:r.actual[t];if(o)i=ze(o)*(parseFloat(i)/100)}n.originPoint[t]=i})),null==s||s(t,e),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(_e.Drag,!0))},onMove:function(t,e){var r=n.getProps(),i=r.dragPropagation,o=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(i||n.openGlobalLock){var u=e.offset;if(o&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(u),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",e.point,u),n.updateAxis("y",e.point,u),n.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var n=this.isDragging;if(this.cancel(),n){var r=e.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null==i||i(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(_e.Drag,!1)},t.prototype.updateAxis=function(t,e,n){var r=this.getProps().drag;if(n&&zn(t,r,this.currentDirection)){var i,o,a,s,u,l=this.getAxisMotionValue(t),c=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=c,o=this.constraints[t],a=this.elastic[t],s=o.min,u=o.max,void 0!==s&&i<s?i=a?K(s,i,a.min):Math.max(i,s):void 0!==u&&i>u&&(i=a?K(u,i,a.max):Math.min(i,u)),c=i),l.set(c)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),n=e.dragConstraints,r=e.dragElastic,i=(this.visualElement.projection||{}).layout,o=this.constraints;n&&Ne(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!i)&&function(t,e){var n=e.top,r=e.left,i=e.bottom,o=e.right;return{x:qe(t.x,r,o),y:qe(t.y,n,i)}}(i.actual,n),this.elastic=function(t){return void 0===t&&(t=.35),!1===t?t=0:!0===t&&(t=.35),{x:Ke(t,"left","right"),y:Ke(t,"top","bottom")}}(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qe((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,n=t.onMeasureDragConstraints;if(!e||!Ne(e))return!1;var r=e.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var o=function(t,e,n){var r=hn(t,n),i=e.scroll;return i&&(cn(r.x,i.x),cn(r.y,i.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:Ze(t.x,e.x),y:Ze(t.y,e.y)}}(i.layout.actual,o);if(n){var s=n(function(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=tn(s))}return a},t.prototype.startAnimation=function(t){var e=this,n=this.getProps(),r=n.drag,i=n.dragMomentum,o=n.dragElastic,s=n.dragTransition,u=n.dragSnapToOrigin,l=n.onDragTransitionEnd,c=this.constraints||{},d=Qe((function(n){var l;if(zn(n,r,e.currentDirection)){var d=null!==(l=null==c?void 0:c[n])&&void 0!==l?l:{};u&&(d={min:0,max:0});var p=o?200:1e6,f=o?40:1e7,v=a(a({type:"inertia",velocity:i?t[n]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),d);return e.startAxisValueAnimation(n,v)}}));return Promise.all(d).then(l)},t.prototype.startAxisValueAnimation=function(t,e){return Bn(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;Qe((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,n,r="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[r];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)},t.prototype.snapToCursor=function(t){var e=this;Qe((function(n){if(zn(n,e.getProps().drag,e.currentDirection)){var r=e.visualElement.projection,i=e.getAxisMotionValue(n);if(r&&r.layout){var o=r.layout.actual[n],a=o.min,s=o.max;i.set(t[n]-K(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,n=this.getProps(),r=n.drag,i=n.dragConstraints,o=this.visualElement.projection;if(Ne(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};Qe((function(t){var n,r,i,o,s,u=e.getAxisMotionValue(t);if(u){var l=u.get();a[t]=(n={min:l,max:l},r=e.constraints[t],i=.5,o=ze(n),(s=ze(r))>o?i=_(r.min,r.max-o,n.min):o>s&&(i=_(n.min,n.max-s,r.min)),Y(0,1,i))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),Qe((function(t){if(zn(t,r,null)){var n=e.getAxisMotionValue(t),i=e.constraints[t],o=i.min,s=i.max;n.set(K(o,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;In.set(this.visualElement,this);var n=N(this.visualElement.getInstance(),"pointerdown",(function(t){var n=e.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&e.start(t)})),r=function(){Ne(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),r();var a=k(window,"resize",(function(){return e.scalePositionWithinConstraints()}));return i.addEventListener("didUpdate",(function(t){var n=t.delta,r=t.hasLayoutChanged;e.isDragging&&r&&(Qe((function(t){var r=e.getAxisMotionValue(t);r&&(e.originPoint[t]+=n[t].translate,r.set(r.get()+n[t].translate))})),e.visualElement.syncRender())})),function(){a(),n(),o()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,i=void 0!==r&&r,o=t.dragPropagation,s=void 0!==o&&o,u=t.dragConstraints,l=void 0!==u&&u,c=t.dragElastic,d=void 0===c?.35:c,p=t.dragMomentum,f=void 0===p||p;return a(a({},t),{drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:d,dragMomentum:f})},t}();function zn(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function Yn(t){var e=n(null);return null===e.current&&(e.current=t()),e.current}var Xn=r({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"});function Hn(t){return e((function(){return function(){return t()}}),[])}var Wn=function(t){return function(e){return t(e),null}},Gn={pan:Wn((function(t){var r=t.onPan,o=t.onPanStart,a=t.onPanEnd,s=t.onPanSessionStart,u=t.visualElement,l=r||o||a||s,c=n(null),d=i(Xn).transformPagePoint,p={onSessionStart:s,onStart:o,onMove:r,onEnd:function(t,e){c.current=null,a&&a(t,e)}};e((function(){null!==c.current&&c.current.updateHandlers(p)})),z(u,"pointerdown",l&&function(t){c.current=new Me(t,p,{transformPagePoint:d})}),Hn((function(){return c.current&&c.current.end()}))})),drag:Wn((function(t){var n=t.dragControls,r=t.visualElement,i=Yn((function(){return new Nn(r)}));e((function(){return n&&n.subscribe(i)}),[i,n]),e((function(){return i.addListeners()}),[i])}))},$n=r(null),qn=0,Zn=function(){return qn++};function _n(){var t=i($n);if(null===t)return[!0,null];var n=t.isPresent,r=t.onExitComplete,o=t.register,a=Yn(Zn);e((function(){return o(a)}),[]);return!n&&r?[!1,function(){return null==r?void 0:r(a)}]:[!0]}var Kn=r({}),Jn=r({});function Qn(t,e){-1===t.indexOf(e)&&t.push(e)}function tr(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var er=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Qn(this.subscriptions,t),function(){return tr(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),nr=function(){function t(t){var e,n=this;this.version="6.3.10",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new er,this.velocityUpdateSubscribers=new er,this.renderSubscribers=new er,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=L(),i=r.delta,o=r.timestamp;n.lastUpdated!==o&&(n.timeDelta=i,n.lastUpdated=o,D.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return D.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?ye(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function rr(t){return new nr(t)}var ir=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)};var or=["TopLeft","TopRight","BottomLeft","BottomRight"],ar=or.length,sr=function(t){return"string"==typeof t?parseFloat(t):t},ur=function(t){return"number"==typeof t||ct.test(t)};function lr(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}var cr=pr(0,.5,re),dr=pr(.5,.95,Kt);function pr(t,e,n){return function(r){return r<t?0:r>e?1:n(_(t,e,r))}}function fr(t,e){t.min=e.min,t.max=e.max}function vr(t,e){fr(t.x,e.x),fr(t.y,e.y)}function hr(t,e,n,r,i){return t=an(t-=e,1/n,r),void 0!==i&&(t=an(t,1/i,r)),t}function mr(t,e,n,r,i){var o=u(n,3),a=o[0],s=o[1],l=o[2];!function(t,e,n,r,i,o,a){if(void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===o&&(o=t),void 0===a&&(a=t),lt.test(e)&&(e=parseFloat(e),e=K(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=K(o.min,o.max,r);t===o&&(s-=e),t.min=hr(t.min,e,n,s,i),t.max=hr(t.max,e,n,s,i)}}(t,e[a],e[s],e[l],e.scale,r,i)}var yr=["x","scaleX","originX"],gr=["y","scaleY","originY"];function xr(t,e,n,r){mr(t.x,e,yr,null==n?void 0:n.x,null==r?void 0:r.x),mr(t.y,e,gr,null==n?void 0:n.y,null==r?void 0:r.y)}function br(t){return 0===t.translate&&1===t.scale}function Pr(t){return br(t.x)&&br(t.y)}function wr(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}var Ar=function(){function t(){this.members=[]}return t.prototype.add=function(t){Qn(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if(tr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,n=this.members.findIndex((function(e){return t===e}));if(0===n)return!1;for(var r=n;r>=0;r--){var i=this.members[r];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var n,r=this.lead;t!==r&&(this.prevLead=r,this.lead=t,t.show(),r&&(r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,e&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&r.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,n,r,i,o;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(o=null===(r=t.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),Tr={};function Er(t,e,n){var r=t.x.translate/e.x,i=t.y.translate/e.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),u&&(o+="rotateY(".concat(u,"deg) "))}return"translate3d(0px, 0px, 0) scale(1, 1)"===(o+="scale(".concat(t.x.scale,", ").concat(t.y.scale,")"))?"none":o}var Sr=["","X","Y","Z"],Vr=["transformPerspective","x","y","z"];function Mr(t,e){return Vr.indexOf(t)-Vr.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Sr.forEach((function(e){return Vr.push(t+e)}))}));var Rr=new Set(Vr);function Cr(t){return Rr.has(t)}var Lr=new Set(["originX","originY","originZ"]);function Dr(t){return Lr.has(t)}var Or=function(t,e){return t.depth-e.depth},kr=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Qn(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){tr(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Or),this.isDirty=!1,this.children.forEach(t)},t}();function jr(t){var e,n=ir(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}var Fr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ur(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,i=t.resetTransform;return function(){function t(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r=null==n?void 0:n()),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=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(Hr),i.nodes.forEach(Wr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?l(l([],u(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new kr)}return t.prototype.addEventListener=function(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new er),this.eventHandlers.get(t).add(e)},t.prototype.notifyListeners=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.eventHandlers.get(t);null==r||r.notify.apply(r,l([],u(e),!1))},t.prototype.hasListeners=function(t){return this.eventHandlers.has(t)},t.prototype.registerPotentialNode=function(t,e){this.potentialNodes.set(t,e)},t.prototype.mount=function(t,n){var r,i=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;var o=this.options,s=o.layoutId,u=o.layout,l=o.visualElement;if(l&&!l.getInstance()&&l.mount(t),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(u||s)&&(this.isLayoutDirty=!0),e){var c,d=function(){return i.root.updateBlockedByResize=!1};e(t,(function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(d,250),Fr.hasAnimatedSinceResize&&(Fr.hasAnimatedSinceResize=!1,i.nodes.forEach(Xr))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&l&&(s||u)&&this.addEventListener("didUpdate",(function(t){var e,n,r,o,s,u=t.delta,c=t.hasLayoutChanged,d=t.hasRelativeTargetChanged,p=t.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var f=null!==(n=null!==(e=i.options.transition)&&void 0!==e?e:l.getDefaultTransition())&&void 0!==n?n:Kr,v=l.getProps(),h=v.onLayoutAnimationStart,m=v.onLayoutAnimationComplete,y=!i.targetLayout||!wr(i.targetLayout,p)||d,g=!c&&d;if((null===(r=i.resumeFrom)||void 0===r?void 0:r.instance)||g||c&&(y||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(u,g);var x=a(a({},Un(f,"layout")),{onPlay:h,onComplete:m});l.shouldReduceMotion&&(x.delay=0,x.type=!1),i.startAnimation(x)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null===(s=(o=i.options).onExitComplete)||void 0===s||s.call(o));i.targetLayout=p}))}},t.prototype.unmount=function(){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,S.preRender(this.updateProjection)},t.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},t.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},t.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},t.prototype.isTreeAnimationBlocked=function(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1},t.prototype.startUpdate=function(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Gr))},t.prototype.willUpdate=function(t){var e,n,r;if(void 0===t&&(t=!0),this.root.isUpdateBlocked())null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var l=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==l?void 0:l(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}}},t.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(zr);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Jr),this.potentialNodes.clear()),this.nodes.forEach(Yr),this.nodes.forEach(Br),this.nodes.forEach(Ir),this.clearAllSnapshots(),V.update(),V.preRender(),V.render())},t.prototype.clearAllSnapshots=function(){this.nodes.forEach(Nr),this.sharedNodes.forEach($r)},t.prototype.scheduleUpdateProjection=function(){D.preRender(this.updateProjection,!1,!0)},t.prototype.scheduleCheckAfterUnmount=function(){var t=this;D.postRender((function(){t.isLayoutDirty?t.root.didUpdate():t.root.checkUpdateFailed()}))},t.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));ti(e),this.snapshot={measured:t,layout:e,latestValues:{}}}},t.prototype.updateLayout=function(){var t;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e=0;e<this.path.length;e++){this.path[e].updateScroll()}var n=this.measure();ti(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},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==r?void 0:r.actual)}},t.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.scroll=r(this.instance))},t.prototype.resetTransform=function(){var t;if(i){var e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Pr(this.projectionDelta),r=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,o=null==r?void 0:r(this.latestValues,""),a=o!==this.prevTransformTemplateValue;e&&(n||rn(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},t.prototype.measure=function(){var t=this.options.visualElement;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};var e=t.measureViewportBox(),n=this.root.scroll;return n&&(cn(e.x,n.x),cn(e.y,n.y)),e},t.prototype.removeElementScroll=function(t){var e={x:{min:0,max:0},y:{min:0,max:0}};vr(e,t);for(var n=0;n<this.path.length;n++){var r=this.path[n],i=r.scroll,o=r.options;r!==this.root&&i&&o.layoutScroll&&(cn(e.x,i.x),cn(e.y,i.y))}return e},t.prototype.applyTransform=function(t,e){void 0===e&&(e=!1);var n={x:{min:0,max:0},y:{min:0,max:0}};vr(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vn(n,{x:-i.scroll.x,y:-i.scroll.y}),rn(i.latestValues)&&vn(n,i.latestValues)}return rn(this.latestValues)&&vn(n,this.latestValues),n},t.prototype.removeTransform=function(t){var e,n={x:{min:0,max:0},y:{min:0,max:0}};vr(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];if(i.instance&&rn(i.latestValues)){nn(i.latestValues)&&i.updateSnapshot();var o={x:{min:0,max:0},y:{min:0,max:0}};vr(o,i.measure()),xr(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layout,o)}}return rn(this.latestValues)&&xr(n,this.latestValues),n},t.prototype.setTargetDelta=function(t){this.targetDelta=t,this.root.scheduleUpdateProjection()},t.prototype.setOptions=function(t){var e;this.options=a(a(a({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})},t.prototype.clearMeasurements=function(){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},t.prototype.resolveTargetDelta=function(){var t,e,n,r,i=this.options,o=i.layout,a=i.layoutId;this.layout&&(o||a)&&(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}},$e(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),vr(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)?(e=this.target,n=this.relativeTarget,r=this.relativeParent.target,We(e.x,n.x,r.x),We(e.y,n.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):vr(this.target,this.layout.actual),ln(this.target,this.targetDelta)):vr(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}},$e(this.relativeTargetOrigin,this.target,this.relativeParent.target),vr(this.relativeTarget,this.relativeTargetOrigin)))))},t.prototype.getClosestProjectingParent=function(){if(this.parent&&!rn(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},t.prototype.calcProjection=function(){var t,e=this.options,n=e.layout,r=e.layoutId;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&&(n||r)){var i=this.getLead();vr(this.layoutCorrected,this.layout.actual),function(t,e,n,r){var i,o;void 0===r&&(r=!1);var a=n.length;if(a){var s,u;e.x=e.y=1;for(var l=0;l<a;l++)u=(s=n[l]).projectionDelta,"contents"!==(null===(o=null===(i=s.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vn(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ln(t,u)),r&&rn(s.latestValues)&&vn(t,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);var o=i.target;if(o){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}});var a=this.treeScale.x,s=this.treeScale.y,u=this.projectionTransform;He(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=Er(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},t.prototype.hide=function(){this.isVisible=!1},t.prototype.show=function(){this.isVisible=!0},t.prototype.scheduleRender=function(t){var e,n,r;void 0===t&&(t=!0),null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},t.prototype.setAnimationOrigin=function(t,e){var n,r=this;void 0===e&&(e=!1);var i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},s=a({},this.latestValues),u={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;var l={x:{min:0,max:0},y:{min:0,max:0}},c=null==i?void 0:i.isShared,d=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,p=Boolean(c&&!d&&!0===this.options.crossfade&&!this.path.some(_r));this.animationProgress=0,this.mixTargetDelta=function(e){var n,i,a,f,v,h=e/1e3;qr(u.x,t.x,h),qr(u.y,t.y,h),r.setTargetDelta(u),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&($e(l,r.layout.actual,r.relativeParent.layout.actual),i=r.relativeTarget,a=r.relativeTargetOrigin,f=l,v=h,Zr(i.x,a.x,f.x,v),Zr(i.y,a.y,f.y,v)),c&&(r.animationValues=s,function(t,e,n,r,i,o){var a,s,u,l;i?(t.opacity=K(0,null!==(a=n.opacity)&&void 0!==a?a:1,cr(r)),t.opacityExit=K(null!==(s=e.opacity)&&void 0!==s?s:1,0,dr(r))):o&&(t.opacity=K(null!==(u=e.opacity)&&void 0!==u?u:1,null!==(l=n.opacity)&&void 0!==l?l:1,r));for(var c=0;c<ar;c++){var d="border".concat(or[c],"Radius"),p=lr(e,d),f=lr(n,d);if(void 0!==p||void 0!==f)p||(p=0),f||(f=0),0===p||0===f||ur(p)===ur(f)?(t[d]=Math.max(K(sr(p),sr(f),r),0),(lt.test(f)||lt.test(p))&&(t[d]+="%")):t[d]=f}(e.rotate||n.rotate)&&(t.rotate=K(e.rotate||0,n.rotate||0,r))}(s,o,r.latestValues,h,p,d)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=h},this.mixTargetDelta(0)},t.prototype.startAnimation=function(t){var e,n,r=this;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&&(S.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update((function(){Fr.hasAnimatedSinceResize=!0,r.currentAnimation=function(t,e,n){void 0===n&&(n={});var r=ir(t)?t:rr(t);return Bn("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}(0,1e3,a(a({},t),{onUpdate:function(e){var n;r.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:function(){var e;null===(e=t.onComplete)||void 0===e||e.call(t),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))},t.prototype.completeAnimation=function(){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")},t.prototype.finishAnimation=function(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},t.prototype.applyTransformsToTarget=function(){var t=this.getLead(),e=t.targetWithTransforms,n=t.target,r=t.layout,i=t.latestValues;e&&n&&r&&(vr(e,n),vn(e,i),He(this.projectionDeltaWithTransform,this.layoutCorrected,e,i))},t.prototype.registerSharedNode=function(t,e){var n,r,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ar),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===(r=e.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,e)})},t.prototype.isLead=function(){var t=this.getStack();return!t||t.lead===this},t.prototype.getLead=function(){var t;return this.options.layoutId&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this},t.prototype.getPrevLead=function(){var t;return this.options.layoutId?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0},t.prototype.getStack=function(){var t=this.options.layoutId;if(t)return this.root.sharedNodes.get(t)},t.prototype.promote=function(t){var e=void 0===t?{}:t,n=e.needsReset,r=e.transition,i=e.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,i),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},t.prototype.relegate=function(){var t=this.getStack();return!!t&&t.relegate(this)},t.prototype.resetRotation=function(){var t=this.options.visualElement;if(t){for(var e=!1,n={},r=0;r<Sr.length;r++){var i="rotate"+Sr[r];t.getStaticValue(i)&&(e=!0,n[i]=t.getStaticValue(i),t.setStaticValue(i,0))}if(e){for(var i in null==t||t.syncRender(),n)t.setStaticValue(i,n[i]);t.scheduleRender()}}},t.prototype.getProjectionStyles=function(t){var e,n,r,i,o,a;void 0===t&&(t={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var u=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=jr(t.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none",s;var l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){var c={};return this.options.layoutId&&(c.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,c.pointerEvents=jr(t.pointerEvents)||""),this.hasProjected&&!rn(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1),c}var d=l.animationValues||l.latestValues;this.applyTransformsToTarget(),s.transform=Er(this.projectionDeltaWithTransform,this.treeScale,d),u&&(s.transform=u(d,s.transform));var p=this.projectionDelta,f=p.x,v=p.y;for(var h in s.transformOrigin="".concat(100*f.origin,"% ").concat(100*v.origin,"% 0"),l.animationValues?s.opacity=l===this?null!==(i=null!==(r=d.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=l===this?null!==(o=d.opacity)&&void 0!==o?o:"":null!==(a=d.opacityExit)&&void 0!==a?a:0,Tr)if(void 0!==d[h]){var m=Tr[h],y=m.correct,g=m.applyTo,x=y(d[h],l);if(g)for(var b=g.length,P=0;P<b;P++)s[g[P]]=x;else s[h]=x}return this.options.layoutId&&(s.pointerEvents=l===this?jr(t.pointerEvents)||"":"none"),s},t.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},t.prototype.resetTree=function(){this.root.nodes.forEach((function(t){var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(zr),this.root.sharedNodes.clear()},t}()}function Br(t){t.updateLayout()}function Ir(t){var e,n,r,i,o=null!==(n=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==n?n:t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){var a=t.layout,s=a.actual,u=a.measured;"size"===t.options.animationType?Qe((function(t){var e=o.isShared?o.measured[t]:o.layout[t],n=ze(e);e.min=s[t].min,e.max=e.min+n})):"position"===t.options.animationType&&Qe((function(t){var e=o.isShared?o.measured[t]:o.layout[t],n=ze(s[t]);e.max=e.min+n}));var l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};He(l,s,o.layout);var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o.isShared?He(c,t.applyTransform(u,!0),o.measured):He(c,s,o.layout);var d=!Pr(l),p=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var f=t.relativeParent,v=f.snapshot,h=f.layout;if(v&&h){var m={x:{min:0,max:0},y:{min:0,max:0}};$e(m,o.layout,v.layout);var y={x:{min:0,max:0},y:{min:0,max:0}};$e(y,s,h.actual),wr(m,y)||(p=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else t.isLead()&&(null===(i=(r=t.options).onExitComplete)||void 0===i||i.call(r));t.options.transition=void 0}function Nr(t){t.clearSnapshot()}function zr(t){t.clearMeasurements()}function Yr(t){var e=t.options.visualElement;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function Xr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Hr(t){t.resolveTargetDelta()}function Wr(t){t.calcProjection()}function Gr(t){t.resetRotation()}function $r(t){t.removeLeadSnapshot()}function qr(t,e,n){t.translate=K(e.translate,0,n),t.scale=K(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Zr(t,e,n,r){t.min=K(e.min,n.min,r),t.max=K(e.max,n.max,r)}function _r(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}var Kr={duration:.45,ease:[.4,0,.1,1]};function Jr(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(Boolean(t.path[r].instance)){n=t.path[r];break}var i=(n&&n!==t.root?n.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));i&&t.mount(i,!0)}function Qr(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ti(t){Qr(t.x),Qr(t.y)}function ei(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var ni={correct:function(t,e){if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}var n=ei(t,e.target.x),r=ei(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}};function ri(t){return"string"==typeof t&&t.startsWith("var(--")}var ii=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function oi(t,e,n){var r=u(function(t){var e=ii.exec(t);if(!e)return[,];var n=u(e,3);return[n[1],n[2]]}(t),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():ri(o)?oi(o,e):o}}var ai={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,i=t,o=t.includes("var("),a=[];o&&(t=t.replace(ii,(function(t){return a.push(t),"_$css"})));var s=St.parse(t);if(s.length>5)return i;var u=St.createTransformer(t),l="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=d;var p=K(c,d,.5);"number"==typeof s[2+l]&&(s[2+l]/=p),"number"==typeof s[3+l]&&(s[3+l]/=p);var f=u(s);if(o){var v=0;f=f.replace("_$css",(function(){var t=a[v];return v++,t}))}return f}},si=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.componentDidMount=function(){var t,e=this,n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,s=n.layoutId,u=r.projection;t=ui,Object.assign(Tr,t),u&&((null==i?void 0:i.group)&&i.group.add(u),(null==o?void 0:o.register)&&s&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",(function(){e.safeToRemove()})),u.setOptions(a(a({},u.options),{onExitComplete:function(){return e.safeToRemove()}}))),Fr.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,n=this.props,r=n.layoutDependency,i=n.visualElement,o=n.drag,a=n.isPresent,s=i.projection;return s?(s.isPresent=a,o||t.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||D.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,n=t.layoutGroup,r=t.switchLayoutGroup,i=e.projection;i&&(i.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(i),(null==r?void 0:r.deregister)&&r.deregister(i))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(t.Component);var ui={borderRadius:a(a({},ni),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ni,borderTopRightRadius:ni,borderBottomLeftRadius:ni,borderBottomRightRadius:ni,boxShadow:ai},li={measureLayout:function(e){var n=u(_n(),2),r=n[0],o=n[1],s=i(Kn);return t.createElement(si,a({},e,{layoutGroup:s,switchLayoutGroup:i(Jn),isPresent:r,safeToRemove:o}))}},ci=Ur({attachResizeListener:function(t,e){return k(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}}}),di={current:void 0},pi=Ur({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!di.current){var t=new ci(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),di.current=t}return di.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"}}),fi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function vi(t){return"object"==typeof t&&"function"==typeof t.start}function hi(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var mi=function(t){return/^0[^.\s]+$/.test(t)},yi=function(t){return function(e){return e.test(t)}},gi=[it,ct,lt,ut,pt,dt,{test:function(t){return"auto"===t},parse:function(t){return t}}],xi=function(t){return gi.find(yi(t))},bi=l(l([],u(gi),!1),[Pt,St],!1),Pi=function(t){return bi.find(yi(t))};function wi(t){return Array.isArray(t)}function Ai(t){return"string"==typeof t||wi(t)}function Ti(t,e,n){var r=t.getProps();return function(t,e,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,i)),"string"==typeof e&&(e=null===(o=t.variants)||void 0===o?void 0:o[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,i)),e}(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Ei(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Ai(t.initial)||Ai(t.animate)||Ai(t.whileHover)||Ai(t.whileDrag)||Ai(t.whileTap)||Ai(t.whileFocus)||Ai(t.exit)}function Si(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,rr(n))}function Vi(t,e){if(e)return(e[t]||e.default||e).from}function Mi(t,e,n){var r;void 0===n&&(n={});var i=Ti(t,e,n.custom),o=(i||{}).transition,s=void 0===o?t.getDefaultTransition()||{}:o;n.transitionOverride&&(s=n.transitionOverride);var l=i?function(){return Ri(t,i,n)}:function(){return Promise.resolve()},c=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,o=void 0===i?0:i,u=s.staggerChildren,l=s.staggerDirection;return function(t,e,n,r,i,o){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var s=[],u=(t.variantChildren.size-1)*r,l=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),u-t*r};return Array.from(t.variantChildren).sort(Ci).forEach((function(t,r){s.push(Mi(t,e,a(a({},o),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,o+r,u,l,n)}:function(){return Promise.resolve()},d=s.when;if(d){var p=u("beforeChildren"===d?[l,c]:[c,l],2),f=p[0],v=p[1];return f().then(v)}return Promise.all([l(),c(n.delay)])}function Ri(t,e,n){var r,i=void 0===n?{}:n,o=i.delay,u=void 0===o?0:o,l=i.transitionOverride,c=i.type,d=t.makeTargetAnimatable(e),p=d.transition,f=void 0===p?t.getDefaultTransition():p,v=d.transitionEnd,h=s(d,["transition","transitionEnd"]);l&&(f=l);var m=[],y=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var g in h){var x=t.getValue(g),b=h[g];if(!(!x||void 0===b||y&&Li(y,g))){var P=a({delay:u},f);t.shouldReduceMotion&&Cr(g)&&(P=a(a({},P),{type:!1,delay:0}));var w=Bn(g,x,b,P);m.push(w)}}return Promise.all(m).then((function(){v&&function(t,e){var n=Ti(t,e),r=n?t.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=void 0===i?{}:i;r.transition;var u=s(r,["transitionEnd","transition"]);for(var l in u=a(a({},u),o)){Si(t,l,Ln(u[l]))}}(t,v)}))}function Ci(t,e){return t.sortNodePosition(e)}function Li(t,e){var n=t.protectedKeys,r=t.needsAnimating,i=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,i}var Di=[_e.Animate,_e.InView,_e.Focus,_e.Hover,_e.Tap,_e.Drag,_e.Exit],Oi=l([],u(Di),!1).reverse(),ki=Di.length;function ji(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(e),Array.isArray(e)){var i=e.map((function(e){return Mi(t,e,n)}));r=Promise.all(i)}else if("string"==typeof e)r=Mi(t,e,n);else{var o="function"==typeof e?Ti(t,e,n.custom):e;r=Ri(t,o,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function Fi(t){var e,n=ji(t),r=((e={})[_e.Animate]=Ui(!0),e[_e.InView]=Ui(),e[_e.Hover]=Ui(),e[_e.Tap]=Ui(),e[_e.Drag]=Ui(),e[_e.Focus]=Ui(),e[_e.Exit]=Ui(),e),i={},o=!0,c=function(e,n){var r=Ti(t,n);if(r){r.transition;var i=r.transitionEnd,o=s(r,["transition","transitionEnd"]);e=a(a(a({},e),o),i)}return e};function d(e,s){for(var d,p=t.getProps(),f=t.getVariantContext(!0)||{},v=[],h=new Set,m={},y=1/0,g=function(n){var i=Oi[n],g=r[i],x=null!==(d=p[i])&&void 0!==d?d:f[i],b=Ai(x),P=i===s?g.isActive:null;!1===P&&(y=n);var w=x===f[i]&&x!==p[i]&&b;if(w&&o&&t.manuallyAnimateOnMount&&(w=!1),g.protectedKeys=a({},m),!g.isActive&&null===P||!x&&!g.prevProp||vi(x)||"boolean"==typeof x)return"continue";var A=function(t,e){if("string"==typeof e)return e!==t;if(wi(e))return!hi(e,t);return!1}(g.prevProp,x),T=A||i===s&&g.isActive&&!w&&b||n>y&&b,E=Array.isArray(x)?x:[x],S=E.reduce(c,{});!1===P&&(S={});var V=g.prevResolvedValues,M=void 0===V?{}:V,R=a(a({},M),S),C=function(t){T=!0,h.delete(t),g.needsAnimating[t]=!0};for(var L in R){var D=S[L],O=M[L];m.hasOwnProperty(L)||(D!==O?xn(D)&&xn(O)?!hi(D,O)||A?C(L):g.protectedKeys[L]=!0:void 0!==D?C(L):h.add(L):void 0!==D&&h.has(L)?C(L):g.protectedKeys[L]=!0)}g.prevProp=x,g.prevResolvedValues=S,g.isActive&&(m=a(a({},m),S)),o&&t.blockInitialAnimation&&(T=!1),T&&!w&&v.push.apply(v,l([],u(E.map((function(t){return{animation:t,options:a({type:i},e)}}))),!1))},x=0;x<ki;x++)g(x);if(i=a({},m),h.size){var b={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(b[e]=n)})),v.push({animation:b})}var P=Boolean(v.length);return o&&!1===p.initial&&!t.manuallyAnimateOnMount&&(P=!1),o=!1,P?n(v):Promise.resolve()}return{isAnimated:function(t){return void 0!==i[t]},animateChanges:d,setActive:function(e,n,i){var o;if(r[e].isActive===n)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n;var a=d(i,e);for(var s in r)r[s].protectedKeys={};return a},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function Ui(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Bi=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Ii=new Set;var Ni=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,o=t.makeTargetAnimatable,s=t.measureViewportBox,c=t.render,d=t.readValueFromInstance,p=t.removeValueFromRenderState,f=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,e){var h=t.parent,m=t.props,y=t.presenceId,g=t.blockInitialAnimation,x=t.visualState,b=t.shouldReduceMotion;void 0===e&&(e={});var P,w,A=!1,T=x.latestValues,E=x.renderState,V=function(){var t=Bi.map((function(){return new er})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Bi.forEach((function(r){var i,o="on"+r,a=t[o];null===(i=e[r])||void 0===i||i.call(e),a&&(e[r]=n[o](a))}))}};return t.forEach((function(t,e){n["on"+Bi[e]]=function(e){return t.add(e)},n["notify"+Bi[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,l([],u(e),!1))}})),n}(),M=new Map,R=new Map,C={},L=a({},T);function O(){P&&A&&(k(),c(P,E,m.style,Y.projection))}function k(){r(Y,E,T,e,m)}function j(){V.notifyUpdate(T)}function F(t,e){var n=e.onChange((function(e){T[t]=e,m.onUpdate&&D.update(j,!1,!0)})),r=e.onRenderRequest(Y.scheduleRender);R.set(t,(function(){n(),r()}))}var U=v(m);for(var B in U){var I=U[B];void 0!==T[B]&&ir(I)&&I.set(T[B],!1)}var N=Ei(m),z=function(t){return Boolean(Ei(t)||t.variants)}(m),Y=a(a({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:y,shouldReduceMotion:b,variantChildren:z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(P)},mount:function(t){A=!0,P=Y.current=t,Y.projection&&Y.projection.mount(t),z&&h&&!N&&(w=null==h?void 0:h.addVariantChild(Y)),M.forEach((function(t,e){return F(e,t)})),null==h||h.children.add(Y),Y.setProps(m)},unmount:function(){var t;null===(t=Y.projection)||void 0===t||t.unmount(),S.update(j),S.render(O),R.forEach((function(t){return t()})),null==w||w(),null==h||h.children.delete(Y),V.clearAllListeners(),P=void 0,A=!1},addVariantChild:function(t){var e,n=Y.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return f&&n===t.treeType?f(Y.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return z?Y:null==h?void 0:h.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return P},getStaticValue:function(t){return T[t]},setStaticValue:function(t,e){return T[t]=e},getLatestValues:function(){return T},setVisibility:function(t){Y.isVisible!==t&&(Y.isVisible=t,Y.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),o(Y,t,m,e)},measureViewportBox:function(){return s(P,m)},addValue:function(t,e){Y.hasValue(t)&&Y.removeValue(t),M.set(t,e),T[t]=e.get(),F(t,e)},removeValue:function(t){var e;M.delete(t),null===(e=R.get(t))||void 0===e||e(),R.delete(t),delete T[t],p(t,E)},hasValue:function(t){return M.has(t)},getValue:function(t,e){var n=M.get(t);return void 0===n&&void 0!==e&&(n=rr(e),Y.addValue(t,n)),n},forEachValue:function(t){return M.forEach(t)},readValue:function(t){var n;return null!==(n=T[t])&&void 0!==n?n:d(P,t,e)},setBaseTarget:function(t,e){L[t]=e},getBaseTarget:function(t){if(i){var e=i(m,t);if(void 0!==e&&!ir(e))return e}return L[t]}},V),{build:function(){return k(),E},scheduleRender:function(){D.render(O,!1,!0)},syncRender:O,setProps:function(t){(t.transformTemplate||m.transformTemplate)&&Y.scheduleRender(),m=t,V.updatePropListeners(t),C=function(t,e,n){var r;for(var i in e){var o=e[i],a=n[i];if(ir(o))t.addValue(i,o);else if(ir(a))t.addValue(i,rr(o));else if(a!==o)if(t.hasValue(i)){var s=t.getValue(i);!s.hasAnimated&&s.set(o)}else t.addValue(i,rr(null!==(r=t.getStaticValue(i))&&void 0!==r?r:o))}for(var i in n)void 0===e[i]&&t.removeValue(i);return e}(Y,v(m),C)},getProps:function(){return m},getVariant:function(t){var e;return null===(e=m.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==h?void 0:h.getVariantContext();if(!N){var e=(null==h?void 0:h.getVariantContext())||{};return void 0!==m.initial&&(e.initial=m.initial),e}for(var n={},r=0;r<Yi;r++){var i=zi[r],o=m[i];(Ai(o)||!1===o)&&(n[i]=o)}return n}});return Y}},zi=l(["initial"],u(Di),!1),Yi=zi.length;function Xi(t){return t.startsWith("--")}var Hi=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Wi(t,e,n,r){var i,o=t.style,a=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,d=!1,p=!0;for(var f in e){var v=e[f];if(Xi(f))a[f]=v;else{var h=Sn[f],m=Hi(v,h);if(Cr(f)){if(c=!0,s[f]=m,u.push(f),!p)continue;v!==(null!==(i=h.default)&&void 0!==i?i:0)&&(p=!1)}else Dr(f)?(l[f]=m,d=!0):o[f]=m}}c?o.transform=function(t,e,n,r){var i=t.transform,o=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,l=void 0===u||u,c="";o.sort(Mr);for(var d=!1,p=o.length,f=0;f<p;f++){var v=o[f];c+="".concat(fi[v]||v,"(").concat(i[v],") "),"z"===v&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(i,n?"":c):l&&n&&(c="none"),c}(t,n,p,r):r?o.transform=r({},""):!e.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,i=void 0===r?"50%":r,o=t.originZ,a=void 0===o?0:o;return"".concat(n," ").concat(i," ").concat(a)}(l))}var Gi,$i=new Set(["width","height","top","left","right","bottom","x","y"]),qi=function(t){return $i.has(t)},Zi=function(t,e){t.set(e,!1),t.set(e)},_i=function(t){return t===it||t===ct};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Gi||(Gi={}));var Ki=function(t,e){return parseFloat(t.split(", ")[e])},Ji=function(t,e){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ki(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?Ki(a[1],t):0}},Qi=new Set(["x","y","z"]),to=Vr.filter((function(t){return!Qi.has(t)}));var eo={width:function(t,e){var n=t.x,r=e.paddingLeft,i=void 0===r?"0":r,o=e.paddingRight,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,i=void 0===r?"0":r,o=e.paddingBottom,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:Ji(4,13),y:Ji(5,14)},no=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=a({},e),r=a({},r);var i=Object.keys(e).filter(qi),o=[],s=!1,l=[];if(i.forEach((function(i){var a=t.getValue(i);if(t.hasValue(i)){var u,c=n[i],d=xi(c),p=e[i];if(xn(p)){var f=p.length,v=null===p[0]?1:0;c=p[v],d=xi(c);for(var h=v;h<f;h++)u?xi(p[h]):u=xi(p[h])}else u=xi(p);if(d!==u)if(_i(d)&&_i(u)){var m=a.get();"string"==typeof m&&a.set(parseFloat(m)),"string"==typeof p?e[i]=parseFloat(p):Array.isArray(p)&&u===ct&&(e[i]=p.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==u?void 0:u.transform)&&(0===c||0===p)?0===c?a.set(u.transform(c)):e[i]=d.transform(p):(s||(o=function(t){var e=[];return to.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),l.push(i),r[i]=void 0!==r[i]?r[i]:e[i],Zi(a,p))}})),l.length){var c=l.indexOf("height")>=0?window.pageYOffset:null,d=function(t,e,n){var r=e.measureViewportBox(),i=e.getInstance(),o=getComputedStyle(i),a=o.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=eo[t](r,o)})),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);Zi(r,s[n]),t[n]=eo[n](u,o)})),t}(e,t,l);return o.length&&o.forEach((function(e){var n=u(e,2),r=n[0],i=n[1];t.getValue(r).set(i)})),t.syncRender(),null!==c&&window.scrollTo({top:c}),{target:d,transitionEnd:r}}return{target:e,transitionEnd:r}};function ro(t,e,n,r){return function(t){return Object.keys(t).some(qi)}(e)?no(t,e,n,r):{target:e,transitionEnd:r}}var io=function(t,e,n,r){var i=function(t,e,n){var r,i=s(e,[]),o=t.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};for(var u in n&&(n=a({},n)),t.forEachValue((function(t){var e=t.get();if(ri(e)){var n=oi(e,o);n&&t.set(n)}})),i){var l=i[u];if(ri(l)){var c=oi(l,o);c&&(i[u]=c,n&&(null!==(r=n[u])&&void 0!==r||(n[u]=l)))}}return{target:i,transitionEnd:n}}(t,e,r);return ro(t,e=i.target,n,r=i.transitionEnd)};function oo(t,e){var n=e.layout,r=e.layoutId;return Cr(t)||Dr(t)||(n||void 0!==r)&&(!!Tr[t]||"opacity"===t)}function ao(t){var e=t.style,n={};for(var r in e)(ir(e[r])||oo(r,t))&&(n[r]=e[r]);return n}function so(t,e,n,r){var i=e.style,o=e.vars;for(var a in Object.assign(t.style,i,r&&r.getProjectionStyles(n)),o)t.style.setProperty(a,o[a])}var uo={treeType:"dom",readValueFromInstance:function(t,e){if(Cr(e)){var n=Mn(e);return n&&n.default||0}var r,i=(r=t,window.getComputedStyle(r));return(Xi(e)?i.getPropertyValue(e):i[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return hn(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=e.transition,u=e.transitionEnd,l=s(e,["transition","transitionEnd"]),c=function(t,e,n){var r,i,o={};for(var a in t)o[a]=null!==(r=Vi(a,e))&&void 0!==r?r:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return o}(l,o||{},t);if(i&&(u&&(u=i(u)),l&&(l=i(l)),c&&(c=i(c))),r){!function(t,e,n){var r,i,o,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],d=e[c],p=null;Array.isArray(d)&&(p=d[0]),null===p&&(p=null!==(i=null!==(r=n[c])&&void 0!==r?r:t.readValue(c))&&void 0!==i?i:e[c]),null!=p&&("string"==typeof p&&(/^\-?\d*\.?\d+$/.test(p)||mi(p))?p=parseFloat(p):!Pi(p)&&St.test(d)&&(p=Rn(c,d)),t.addValue(c,rr(p)),null!==(o=(a=n)[c])&&void 0!==o||(a[c]=p),t.setBaseTarget(c,p))}}(t,l,c);var d=io(t,l,c,u);u=d.transitionEnd,l=d.target}return a({transition:o,transitionEnd:u},l)},scrapeMotionValuesFromProps:ao,build:function(t,e,n,r,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Wi(e,n,r,i.transformTemplate)},render:so},lo=Ni(uo),co={animation:Wn((function(t){var n=t.visualElement,r=t.animate;n.animationState||(n.animationState=Fi(n)),vi(r)&&e((function(){return r.subscribe(n)}),[r])})),exit:Wn((function(t){var n=t.custom,r=t.visualElement,o=u(_n(),2),a=o[0],s=o[1],l=i($n);e((function(){var t,e;r.isPresent=a;var i=null===(t=r.animationState)||void 0===t?void 0:t.setActive(_e.Exit,!a,{custom:null!==(e=null==l?void 0:l.custom)&&void 0!==e?e:n});!a&&(null==i||i.then(s))}),[a])}))};function po(t,e,n){return function(r,i){var o;c(r)&&!Ie()&&(null===(o=t.animationState)||void 0===o||o.setActive(_e.Hover,e),null==n||n(r,i))}}var fo=function(t,e){return!!e&&(t===e||fo(t,e.parentElement))};var vo=("undefined"==typeof process||process.env,"production"),ho=new WeakMap,mo=new WeakMap,yo=function(t){var e;null===(e=ho.get(t.target))||void 0===e||e(t)},go=function(t){t.forEach(yo)};function xo(t,e,n){var r=function(t){var e=t.root,n=s(t,["root"]),r=e||document;mo.has(r)||mo.set(r,{});var i=mo.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(go,a({root:e},n))),i[o]}(e);return ho.set(t,n),r.observe(t),function(){ho.delete(t),r.unobserve(t)}}var bo={some:0,all:1};function Po(t,n,r,i){var o=i.root,a=i.margin,s=i.amount,u=void 0===s?"some":s,l=i.once;e((function(){if(t){var e={root:null==o?void 0:o.current,rootMargin:a,threshold:"number"==typeof u?u:bo[u]};return xo(r.getInstance(),e,(function(t){var e,i=t.isIntersecting;if(n.isInView!==i&&(n.isInView=i,!l||i||!n.hasEnteredView)){i&&(n.hasEnteredView=!0),null===(e=r.animationState)||void 0===e||e.setActive(_e.InView,i);var o=r.getProps(),a=i?o.onViewportEnter:o.onViewportLeave;null==a||a(t)}}))}}),[t,o,a,u])}function wo(t,n,r,i){var o=i.fallback,a=void 0===o||o;e((function(){var e,i;t&&a&&("production"!==vo&&(e="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Ii.has(e)||(console.warn(e),i&&console.warn(i),Ii.add(e))),requestAnimationFrame((function(){var t;n.hasEnteredView=!0;var e=r.getProps().onViewportEnter;null==e||e(null),null===(t=r.animationState)||void 0===t||t.setActive(_e.InView,!0)})))}),[t])}var Ao={inView:Wn((function(t){var e=t.visualElement,r=t.whileInView,i=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=n({hasEnteredView:!1,isInView:!1}),l=Boolean(r||i||o);s.once&&u.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?wo:Po)(l,u.current,e,s)})),tap:Wn((function(t){var e=t.onTap,r=t.onTapStart,i=t.onTapCancel,o=t.whileTap,a=t.visualElement,s=e||r||i||o,u=n(!1),l=n(null),c={passive:!(r||e||i||h)};function d(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function p(){var t;return d(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(_e.Tap,!1),!Ie()}function f(t,n){p()&&(fo(a.getInstance(),t.target)?null==e||e(t,n):null==i||i(t,n))}function v(t,e){p()&&(null==i||i(t,e))}function h(t,e){var n;d(),u.current||(u.current=!0,l.current=It(N(window,"pointerup",f,c),N(window,"pointercancel",v,c)),null===(n=a.animationState)||void 0===n||n.setActive(_e.Tap,!0),null==r||r(t,e))}z(a,"pointerdown",s?h:void 0,c),Hn(d)})),focus:Wn((function(t){var e=t.whileFocus,n=t.visualElement;j(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!0)}:void 0),j(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!1)}:void 0)})),hover:Wn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,i=t.visualElement;z(i,"pointerenter",e||r?po(i,!0,e):void 0,{passive:!e}),z(i,"pointerleave",n||r?po(i,!1,n):void 0,{passive:!n})}))};function To(t,e,n){return"string"==typeof t?t:ct.transform(e+n*t)}var Eo={offset:"stroke-dashoffset",array:"stroke-dasharray"},So={offset:"strokeDashoffset",array:"strokeDasharray"};function Vo(t,e,n,r){var i=e.attrX,o=e.attrY,a=e.originX,u=e.originY,l=e.pathLength,c=e.pathSpacing,d=void 0===c?1:c,p=e.pathOffset,f=void 0===p?0:p;Wi(t,s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};var v=t.attrs,h=t.style,m=t.dimensions;v.transform&&(m&&(h.transform=v.transform),delete v.transform),m&&(void 0!==a||void 0!==u||h.transform)&&(h.transformOrigin=function(t,e,n){var r=To(e,t.x,t.width),i=To(n,t.y,t.height);return"".concat(r," ").concat(i)}(m,void 0!==a?a:.5,void 0!==u?u:.5)),void 0!==i&&(v.x=i),void 0!==o&&(v.y=o),void 0!==l&&function(t,e,n,r,i){void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=!0),t.pathLength=1;var o=i?Eo:So;t[o.offset]=ct.transform(-r);var a=ct.transform(e),s=ct.transform(n);t[o.array]="".concat(a," ").concat(s)}(v,l,d,f,!1)}var Mo=/([a-z])([A-Z])/g,Ro=function(t){return t.replace(Mo,"$1-$2").toLowerCase()},Co=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Lo=Ni(a(a({},uo),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Cr(e)?(null===(n=Mn(e))||void 0===n?void 0:n.default)||0:(e=Co.has(e)?e:Ro(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=ao(t);for(var n in t){if(ir(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,i){Vo(e,n,r,i.transformTemplate)},render:function(t,e,n,r){for(var i in so(t,e,void 0,r),e.attrs)t.setAttribute(Co.has(i)?i:Ro(i),e.attrs[i])}})),Do=["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"];var Oo=a(a({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Do.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Lo(e,{enableHardwareAcceleration:!1}):lo(e,{enableHardwareAcceleration:!0})}},co),Ao),ko=a(a(a(a({},Oo),Gn),li),{projectionNodeConstructor:pi});export{ko as domMax};
1
+ import t,{useEffect as e,useRef as n,createContext as r,useContext as i}from"react";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function c(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function d(t){return!!t.touches}var p={pageX:0,pageY:0};function f(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||p;return{x:n[e+"X"],y:n[e+"Y"]}}function v(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function h(t,e){return void 0===e&&(e="page"),{point:d(t)?f(t,e):v(t,e)}}var m=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,h(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r};const y="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),g="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(y()),1/60*1e3);let x=!0,b=!1,P=!1;const w={delta:0,timestamp:0},A=["read","update","preRender","render","postRender"],T=A.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(t,o=!1,s=!1)=>{const u=s&&i,l=u?e:n;return o&&a.add(t),-1===l.indexOf(t)&&(l.push(t),u&&i&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),a.has(r)&&(s.schedule(r),t())}i=!1,o&&(o=!1,s.process(u))}}};return s}(()=>b=!0),t),{}),E=A.reduce((t,e)=>{const n=T[e];return t[e]=(t,e=!1,r=!1)=>(b||C(),n.schedule(t,e,r)),t},{}),S=A.reduce((t,e)=>(t[e]=T[e].cancel,t),{}),V=A.reduce((t,e)=>(t[e]=()=>T[e].process(w),t),{}),M=t=>T[t].process(w),R=t=>{b=!1,w.delta=x?1/60*1e3:Math.max(Math.min(t-w.timestamp,40),1),w.timestamp=t,P=!0,A.forEach(M),P=!1,b&&(x=!1,g(R))},C=()=>{b=!0,x=!0,P||g(R)},L=()=>w;var D=E,O=function(t){return 1e3*t};function k(t,e,n,r){return void 0===r&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function j(t,n,r,i){e((function(){var e=t.current;if(r&&e)return k(e,n,r,i)}),[t,n,r,i])}var F="undefined"!=typeof document,U={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},B={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function I(t){return F&&null===window.onpointerdown?t:F&&null===window.ontouchstart?B[t]:F&&null===window.onmousedown?U[t]:t}function N(t,e,n,r){return k(t,I(e),m(n,"pointerdown"===e),r)}function z(t,e,n,r){return j(t,I(e),n&&m(n,"pointerdown"===e),r)}const Y=(t,e,n)=>Math.min(Math.max(n,t),e);function X({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o,a=1-e;a=Y(.05,1,a),t=Y(.01,10,t/1e3),a<1?(i=e=>{const r=e*a,i=r*t;return.001-(r-n)/H(e,a)*Math.exp(-i)},o=e=>{const r=e*a*t,o=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=H(Math.pow(e,2),a);return(.001-i(e)>0?-1:1)*((o-s)*u)/l}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(i,o,5/t);if(t*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function H(t,e){return t*Math.sqrt(1-e*e)}const W=["duration","bounce"],G=["stiffness","damping","mass"];function $(t,e){return e.some(e=>void 0!==t[e])}function q(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:i}=t,o=s(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:u,damping:l,mass:c,velocity:d,duration:p,isResolvedFromDuration:f}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!$(t,G)&&$(t,W)){const n=X(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(o),v=Z,h=Z;function m(){const t=d?-d/1e3:0,r=n-e,o=l/(2*Math.sqrt(u*c)),a=Math.sqrt(u/c)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-e)/100,.4)),o<1){const e=H(a,o);v=i=>{const s=Math.exp(-o*a*i);return n-s*((t+o*a*r)/e*Math.sin(e*i)+r*Math.cos(e*i))},h=n=>{const i=Math.exp(-o*a*n);return o*a*i*(Math.sin(e*n)*(t+o*a*r)/e+r*Math.cos(e*n))-i*(Math.cos(e*n)*(t+o*a*r)-e*r*Math.sin(e*n))}}else if(1===o)v=e=>n-Math.exp(-a*e)*(r+(t+a*r)*e);else{const e=a*Math.sqrt(o*o-1);v=i=>{const s=Math.exp(-o*a*i),u=Math.min(e*i,300);return n-s*((t+o*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return m(),{next:t=>{const e=v(t);if(f)a.done=t>=p;else{const o=1e3*h(t),s=Math.abs(o)<=r,u=Math.abs(n-e)<=i;a.done=s&&u}return a.value=a.done?n:e,a},flipTarget:()=>{d=-d,[e,n]=[n,e],m()}}}q.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Z=t=>0,_=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},K=(t,e,n)=>-n*t+n*e+t,J=(t,e)=>n=>Math.max(Math.min(n,e),t),Q=t=>t%1?Number(t.toFixed(5)):t,tt=/(-)?([\d]*\.?[\d])+/g,et=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,nt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function rt(t){return"string"==typeof t}const it={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ot=Object.assign(Object.assign({},it),{transform:J(0,1)}),at=Object.assign(Object.assign({},it),{default:1}),st=t=>({test:e=>rt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ut=st("deg"),lt=st("%"),ct=st("px"),dt=st("vh"),pt=st("vw"),ft=Object.assign(Object.assign({},lt),{parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}),vt=(t,e)=>n=>Boolean(rt(n)&&nt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ht=(t,e,n)=>r=>{if(!rt(r))return r;const[i,o,a,s]=r.match(tt);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},mt={test:vt("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+lt.transform(Q(e))+", "+lt.transform(Q(n))+", "+Q(ot.transform(r))+")"},yt=J(0,255),gt=Object.assign(Object.assign({},it),{transform:t=>Math.round(yt(t))}),xt={test:vt("rgb","red"),parse:ht("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+gt.transform(t)+", "+gt.transform(e)+", "+gt.transform(n)+", "+Q(ot.transform(r))+")"};const bt={test:vt("#"),parse:function(t){let e="",n="",r="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:xt.transform},Pt={test:t=>xt.test(t)||bt.test(t)||mt.test(t),parse:t=>xt.test(t)?xt.parse(t):mt.test(t)?mt.parse(t):bt.parse(t),transform:t=>rt(t)?t:t.hasOwnProperty("red")?xt.transform(t):mt.transform(t)};function wt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(et);r&&(n=r.length,t=t.replace(et,"${c}"),e.push(...r.map(Pt.parse)));const i=t.match(tt);return i&&(t=t.replace(tt,"${n}"),e.push(...i.map(it.parse))),{values:e,numColors:n,tokenised:t}}function At(t){return wt(t).values}function Tt(t){const{values:e,numColors:n,tokenised:r}=wt(t),i=e.length;return t=>{let e=r;for(let r=0;r<i;r++)e=e.replace(r<n?"${c}":"${n}",r<n?Pt.transform(t[r]):Q(t[r]));return e}}const Et=t=>"number"==typeof t?0:t;const St={test:function(t){var e,n,r,i;return isNaN(t)&&rt(t)&&(null!==(n=null===(e=t.match(tt))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(r=t.match(et))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:At,createTransformer:Tt,getAnimatableNone:function(t){const e=At(t);return Tt(t)(e.map(Et))}},Vt=new Set(["brightness","contrast","saturate","opacity"]);function Mt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(tt)||[];if(!r)return t;const i=n.replace(r,"");let o=Vt.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Rt=/([a-z-]*)\(.*?\)/g,Ct=Object.assign(Object.assign({},St),{getAnimatableNone:t=>{const e=t.match(Rt);return e?e.map(Mt).join(" "):t}});function Lt(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 Dt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let i=0,o=0,a=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r;i=Lt(s,r,t+1/3),o=Lt(s,r,t),a=Lt(s,r,t-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}const Ot=(t,e,n)=>{const r=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-r)+r))},kt=[bt,xt,mt],jt=t=>kt.find(e=>e.test(t)),Ft=(t,e)=>{let n=jt(t),r=jt(e),i=n.parse(t),o=r.parse(e);n===mt&&(i=Dt(i),n=xt),r===mt&&(o=Dt(o),r=xt);const a=Object.assign({},i);return t=>{for(const e in a)"alpha"!==e&&(a[e]=Ot(i[e],o[e],t));return a.alpha=K(i.alpha,o.alpha,t),n.transform(a)}},Ut=t=>"number"==typeof t,Bt=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bt);function Nt(t,e){return Ut(t)?n=>K(t,e,n):Pt.test(t)?Ft(t,e):Ht(t,e)}const zt=(t,e)=>{const n=[...t],r=n.length,i=t.map((t,n)=>Nt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=i[e](t);return n}},Yt=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=Nt(t[i],e[i]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function Xt(t){const e=St.parse(t),n=e.length;let r=0,i=0,o=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}const Ht=(t,e)=>{const n=St.createTransformer(e),r=Xt(t),i=Xt(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?It(zt(r.parsed,i.parsed),n):n=>""+(n>0?e:t)},Wt=(t,e)=>n=>K(t,e,n);function Gt(t,e,n){const r=[],i=n||("number"==typeof(o=t[0])?Wt:"string"==typeof o?Pt.test(o)?Ft:Ht:Array.isArray(o)?zt:"object"==typeof o?Yt:void 0);var o;const a=t.length-1;for(let n=0;n<a;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=It(t,o)}r.push(o)}return r}function $t(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[o-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=Gt(e,r,i),s=2===o?function([t,e],[n]){return r=>n(_(t,e,r))}(t,a):function(t,e){const n=t.length,r=n-1;return i=>{let o=0,a=!1;if(i<=t[0]?a=!0:i>=t[r]&&(o=r-1,a=!0),!a){let e=1;for(;e<n&&!(t[e]>i||e===r);e++);o=e-1}const s=_(t[o],t[o+1],i);return e[o](s)}}(t,a);return n?e=>s(Y(t[0],t[o-1],e)):s}const qt=t=>e=>1-t(1-e),Zt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_t=t=>e=>e*e*((t+1)*e-t),Kt=t=>t,Jt=(Qt=2,t=>Math.pow(t,Qt));var Qt;const te=qt(Jt),ee=Zt(Jt),ne=t=>1-Math.sin(Math.acos(t)),re=qt(ne),ie=Zt(re),oe=_t(1.525),ae=qt(oe),se=Zt(oe),ue=(t=>{const e=_t(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),le=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},ce=qt(le);function de(t,e){return t.map(()=>e||ee).splice(0,t.length-1)}function pe({from:t=0,to:e=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map(t=>t*e)}(r&&r.length===a.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(a),i);function u(){return $t(s,a,{ease:Array.isArray(n)?n:de(a,n)})}let l=u();return{next:t=>(o.value=l(t),o.done=t>=i,o),flipTarget:()=>{a.reverse(),l=u()}}}const fe={keyframes:pe,spring:q,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:e};let s=n*t;const u=e+s,l=void 0===o?u:o(u);return l!==u&&(s=l-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>i||e<-i),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};function ve(t,e,n=0){return t-e-n}const he=t=>{const e=({delta:e})=>t(e);return{start:()=>D.update(e,!0),stop:()=>S.update(e)}};function me(t){var e,n,{from:r,autoplay:i=!0,driver:o=he,elapsed:a=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:p,onComplete:f,onRepeat:v,onUpdate:h}=t,m=s(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,g,x,{to:b}=m,P=0,w=m.duration,A=!1,T=!0;const E=function(t){if(Array.isArray(t.to))return pe;if(fe[t.type])return fe[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?pe:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?q:pe}(m);(null===(n=(e=E).needsInterpolation)||void 0===n?void 0:n.call(e,r,b))&&(x=$t([0,100],[r,b],{clamp:!1}),r=0,b=100);const S=E(Object.assign(Object.assign({},m),{from:r,to:b}));function V(){P++,"reverse"===l?(T=P%2==0,a=function(t,e,n=0,r=!0){return r?ve(e+-t,e,n):e-(t-e)+n}(a,w,c,T)):(a=ve(a,w,c),"mirror"===l&&S.flipTarget()),A=!1,v&&v()}function M(t){if(T||(t=-t),a+=t,!A){const t=S.next(Math.max(0,a));g=t.value,x&&(g=x(g)),A=T?t.done:a<=0}null==h||h(g),A&&(0===P&&(null!=w||(w=a)),P<u?function(t,e,n,r){return r?t>=e+n:t<=-n}(a,w,c,T)&&V():(y.stop(),f&&f()))}return i&&(null==d||d(),y=o(M),y.start()),{stop:()=>{null==p||p(),y.stop()}}}function ye(t,e){return e?t*(1e3/e):0}const ge=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),xe=t=>ge(t)&&t.hasOwnProperty("z"),be=(t,e)=>Math.abs(t-e);function Pe(t,e){if(Ut(t)&&Ut(e))return be(t,e);if(ge(t)&&ge(e)){const n=be(t.x,e.x),r=be(t.y,e.y),i=xe(t)&&xe(e)?be(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const we=(t,e)=>1-3*e+3*t,Ae=(t,e)=>3*e-6*t,Te=t=>3*t,Ee=(t,e,n)=>((we(e,n)*t+Ae(e,n))*t+Te(e))*t,Se=(t,e,n)=>3*we(e,n)*t*t+2*Ae(e,n)*t+Te(e);function Ve(t,e,n,r){if(t===e&&n===r)return Kt;const i=new Float32Array(11);for(let e=0;e<11;++e)i[e]=Ee(.1*e,t,n);function o(e){let r=0,o=1;for(;10!==o&&i[o]<=e;++o)r+=.1;--o;const a=r+.1*((e-i[o])/(i[o+1]-i[o])),s=Se(a,t,n);return s>=.001?function(t,e,n,r){for(let i=0;i<8;++i){const i=Se(e,n,r);if(0===i)return e;e-=(Ee(e,n,r)-t)/i}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){let o,a,s=0;do{a=e+(n-e)/2,o=Ee(a,r,i)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:Ee(o(t),e,r)}var Me=function(){function t(t,e,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=Le(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=Pe(t.offset,{x:0,y:0})>=3;if(e||n){var i=t.point,o=L().timestamp;r.history.push(a(a({},i),{timestamp:o}));var s=r.handlers,u=s.onStart,l=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){r.lastMoveEvent=t,r.lastMoveEventInfo=Re(e,r.transformPagePoint),c(t)&&0===t.buttons?r.handlePointerUp(t,e):D.update(r.updatePoint,!0)},this.handlePointerUp=function(t,e){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,a=Le(Re(e,r.transformPagePoint),r.history);r.startEvent&&i&&i(t,a),o&&o(t,a)},!(d(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var o=Re(h(t),this.transformPagePoint),s=o.point,u=L().timestamp;this.history=[a(a({},s),{timestamp:u})];var l=e.onSessionStart;l&&l(t,Le(o,this.history)),this.removeListeners=It(N(window,"pointermove",this.handlePointerMove),N(window,"pointerup",this.handlePointerUp),N(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),S.update(this.updatePoint)},t}();function Re(t,e){return e?{point:e(t.point)}:t}function Ce(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le(t,e){var n=t.point;return{point:n,delta:Ce(n,Oe(e)),offset:Ce(n,De(e)),velocity:ke(e,.1)}}function De(t){return t[0]}function Oe(t){return t[t.length-1]}function ke(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=Oe(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>O(e)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function je(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Fe=je("dragHorizontal"),Ue=je("dragVertical");function Be(t){var e=!1;if("y"===t)e=Ue();else if("x"===t)e=Fe();else{var n=Fe(),r=Ue();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ie(){var t=Be(!0);return!t||(t(),!1)}function Ne(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ze(t){return t.max-t.min}function Ye(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Pe(t,e)<n}function Xe(t,e,n,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=K(e.min,e.max,t.origin),t.scale=ze(n)/ze(e),(Ye(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=K(n.min,n.max,t.origin)-t.originPoint,(Ye(t.translate)||isNaN(t.translate))&&(t.translate=0)}function He(t,e,n,r){Xe(t.x,e.x,n.x,null==r?void 0:r.originX),Xe(t.y,e.y,n.y,null==r?void 0:r.originY)}function We(t,e,n){t.min=n.min+e.min,t.max=t.min+ze(e)}function Ge(t,e,n){t.min=e.min-n.min,t.max=t.min+ze(e)}function $e(t,e,n){Ge(t.x,e.x,n.x),Ge(t.y,e.y,n.y)}function qe(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 Ze(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=u([i,r],2))[0],i=n[1]),{min:r,max:i}}var _e;function Ke(t,e,n){return{min:Je(t,e),max:Je(t,n)}}function Je(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(_e||(_e={}));function Qe(t){return[t("x"),t("y")]}function tn(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function en(t){return void 0===t||1===t}function nn(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!en(e)||!en(n)||!en(r)}function rn(t){return nn(t)||on(t.x)||on(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function on(t){return t&&"0%"!==t}function an(t,e,n){return n+e*(t-n)}function sn(t,e,n,r,i){return void 0!==i&&(t=an(t,i,r)),an(t,n,r)+e}function un(t,e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=1),t.min=sn(t.min,e,n,r,i),t.max=sn(t.max,e,n,r,i)}function ln(t,e){var n=e.x,r=e.y;un(t.x,n.translate,n.scale,n.originPoint),un(t.y,r.translate,r.scale,r.originPoint)}function cn(t,e){t.min=t.min+e,t.max=t.max+e}function dn(t,e,n){var r=u(n,3),i=r[0],o=r[1],a=r[2],s=void 0!==e[a]?e[a]:.5,l=K(t.min,t.max,s);un(t,e[i],e[o],l,e.scale)}var pn=["x","scaleX","originX"],fn=["y","scaleY","originY"];function vn(t,e){dn(t.x,e,pn),dn(t.y,e,fn)}function hn(t,e){return tn(function(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}var mn={linear:Kt,easeIn:Jt,easeInOut:ee,easeOut:te,circIn:ne,circInOut:ie,circOut:re,backIn:oe,backInOut:se,backOut:ae,anticipate:ue,bounceIn:ce,bounceInOut:t=>t<.5?.5*(1-le(1-2*t)):.5*le(2*t-1)+.5,bounceOut:le},yn=function(t){if(Array.isArray(t)){t.length;var e=u(t,4);return Ve(e[0],e[1],e[2],e[3])}return"string"==typeof t?mn[t]:t},gn=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!St.test(e)||e.startsWith("url(")))},xn=function(t){return Array.isArray(t)},bn=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Pn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},wn=function(){return{type:"keyframes",ease:"linear",duration:.3}},An=function(t){return{type:"keyframes",duration:.8,values:t}},Tn={x:bn,y:bn,z:bn,rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scaleX:Pn,scaleY:Pn,scale:Pn,opacity:wn,backgroundColor:wn,color:wn,default:Pn},En=a(a({},it),{transform:Math.round}),Sn={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,size:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:at,scaleX:at,scaleY:at,scaleZ:at,skew:ut,skewX:ut,skewY:ut,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:ot,originX:ft,originY:ft,originZ:ct,zIndex:En,fillOpacity:ot,strokeOpacity:ot,numOctaves:En},Vn=a(a({},Sn),{color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Ct,WebkitFilter:Ct}),Mn=function(t){return Vn[t]};function Rn(t,e){var n,r=Mn(t);return r!==Ct&&(r=St),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Cn=!1,Ln=function(t){return xn(t)?t[t.length-1]||0:t};function Dn(t){var e=t.ease,n=t.times,r=t.yoyo,i=t.flip,o=t.loop,u=s(t,["ease","times","yoyo","flip","loop"]),l=a({},u);return n&&(l.offset=n),u.duration&&(l.duration=O(u.duration)),u.repeatDelay&&(l.repeatDelay=O(u.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(yn):yn(e)),"tween"===u.type&&(l.type="keyframes"),(r||o||i)&&(r?l.repeatType="reverse":o?l.repeatType="loop":i&&(l.repeatType="mirror"),l.repeat=o||r||i||u.repeat),"spring"!==u.type&&(l.type="keyframes"),l}function On(t,e,n){var r,i,o,c;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=l([],u(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=s(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=a(a({},t),(i=n,o=e.to,c=xn(o)?An:Tn[i]||Tn.default,a({to:o},c(o))))),a(a({},e),Dn(t))}function kn(t,e,n,r,i){var o,s=Un(r,t),u=null!==(o=s.from)&&void 0!==o?o:e.get(),l=gn(t,n);return"none"===u&&l&&"string"==typeof n?u=Rn(t,n):jn(u)&&"string"==typeof n?u=Fn(n):!Array.isArray(n)&&jn(n)&&"string"==typeof u&&(n=Fn(u)),gn(t,u)&&l&&!1!==s.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:p,onStop:f}){let v;function h(t){return void 0!==n&&t<n||void 0!==r&&t>r}function m(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function y(t){null==v||v.stop(),v=me(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:p,onStop:f}))}function g(t){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(h(t))g({from:t,velocity:e,to:m(t)});else{let r=i*e+t;void 0!==l&&(r=l(r));const a=m(r),s=a===n?-1:1;let c,d;const p=t=>{c=d,d=t,e=ye(t-c,L().delta),(1===s&&t>a||-1===s&&t<a)&&g({from:t,to:a,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:o,power:i,restDelta:u,modifyTarget:l,onUpdate:h(r)?p:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(a(a({},r),s)):me(a(a({},On(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t,r,o=Ln(n);return e.set(o),i(),null===(t=null==s?void 0:s.onUpdate)||void 0===t||t.call(s,o),null===(r=null==s?void 0:s.onComplete)||void 0===r||r.call(s),{stop:function(){}}}}function jn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Fn(t){return"number"==typeof t?0:Rn("",t)}function Un(t,e){return t[e]||t.default||t}function Bn(t,e,n,r){return void 0===r&&(r={}),Cn&&(r={type:!1}),e.start((function(i){var o,a,s=kn(t,e,n,r,i),u=function(t,e){var n,r;return null!==(r=null!==(n=(Un(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return a=s()};return u?o=window.setTimeout(l,O(u)):l(),function(){clearTimeout(o),null==a||a.stop()}}))}var In=new WeakMap,Nn=function(){function t(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}return t.prototype.start=function(t,e){var n=this,r=(void 0===e?{}:e).snapToCursor,i=void 0!==r&&r;if(!1!==this.visualElement.isPresent){this.panSession=new Me(t,{onSessionStart:function(t){n.stopAnimation(),i&&n.snapToCursor(h(t,"page").point)},onStart:function(t,e){var r,i=n.getProps(),o=i.drag,a=i.dragPropagation,s=i.onDragStart;(!o||a||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Be(o),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),Qe((function(t){var e,r,i=n.getAxisMotionValue(t).get()||0;if(lt.test(i)){var o=null===(r=null===(e=n.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===r?void 0:r.actual[t];if(o)i=ze(o)*(parseFloat(i)/100)}n.originPoint[t]=i})),null==s||s(t,e),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(_e.Drag,!0))},onMove:function(t,e){var r=n.getProps(),i=r.dragPropagation,o=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(i||n.openGlobalLock){var u=e.offset;if(o&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(u),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",e.point,u),n.updateAxis("y",e.point,u),n.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var n=this.isDragging;if(this.cancel(),n){var r=e.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null==i||i(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(_e.Drag,!1)},t.prototype.updateAxis=function(t,e,n){var r=this.getProps().drag;if(n&&zn(t,r,this.currentDirection)){var i,o,a,s,u,l=this.getAxisMotionValue(t),c=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=c,o=this.constraints[t],a=this.elastic[t],s=o.min,u=o.max,void 0!==s&&i<s?i=a?K(s,i,a.min):Math.max(i,s):void 0!==u&&i>u&&(i=a?K(u,i,a.max):Math.min(i,u)),c=i),l.set(c)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),n=e.dragConstraints,r=e.dragElastic,i=(this.visualElement.projection||{}).layout,o=this.constraints;n&&Ne(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!i)&&function(t,e){var n=e.top,r=e.left,i=e.bottom,o=e.right;return{x:qe(t.x,r,o),y:qe(t.y,n,i)}}(i.actual,n),this.elastic=function(t){return void 0===t&&(t=.35),!1===t?t=0:!0===t&&(t=.35),{x:Ke(t,"left","right"),y:Ke(t,"top","bottom")}}(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qe((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,n=t.onMeasureDragConstraints;if(!e||!Ne(e))return!1;var r=e.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var o=function(t,e,n){var r=hn(t,n),i=e.scroll;return i&&(cn(r.x,i.x),cn(r.y,i.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:Ze(t.x,e.x),y:Ze(t.y,e.y)}}(i.layout.actual,o);if(n){var s=n(function(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=tn(s))}return a},t.prototype.startAnimation=function(t){var e=this,n=this.getProps(),r=n.drag,i=n.dragMomentum,o=n.dragElastic,s=n.dragTransition,u=n.dragSnapToOrigin,l=n.onDragTransitionEnd,c=this.constraints||{},d=Qe((function(n){var l;if(zn(n,r,e.currentDirection)){var d=null!==(l=null==c?void 0:c[n])&&void 0!==l?l:{};u&&(d={min:0,max:0});var p=o?200:1e6,f=o?40:1e7,v=a(a({type:"inertia",velocity:i?t[n]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),d);return e.startAxisValueAnimation(n,v)}}));return Promise.all(d).then(l)},t.prototype.startAxisValueAnimation=function(t,e){return Bn(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;Qe((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,n,r="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[r];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)},t.prototype.snapToCursor=function(t){var e=this;Qe((function(n){if(zn(n,e.getProps().drag,e.currentDirection)){var r=e.visualElement.projection,i=e.getAxisMotionValue(n);if(r&&r.layout){var o=r.layout.actual[n],a=o.min,s=o.max;i.set(t[n]-K(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,n=this.getProps(),r=n.drag,i=n.dragConstraints,o=this.visualElement.projection;if(Ne(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};Qe((function(t){var n,r,i,o,s,u=e.getAxisMotionValue(t);if(u){var l=u.get();a[t]=(n={min:l,max:l},r=e.constraints[t],i=.5,o=ze(n),(s=ze(r))>o?i=_(r.min,r.max-o,n.min):o>s&&(i=_(n.min,n.max-s,r.min)),Y(0,1,i))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),Qe((function(t){if(zn(t,r,null)){var n=e.getAxisMotionValue(t),i=e.constraints[t],o=i.min,s=i.max;n.set(K(o,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;In.set(this.visualElement,this);var n=N(this.visualElement.getInstance(),"pointerdown",(function(t){var n=e.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&e.start(t)})),r=function(){Ne(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),r();var a=k(window,"resize",(function(){return e.scalePositionWithinConstraints()}));return i.addEventListener("didUpdate",(function(t){var n=t.delta,r=t.hasLayoutChanged;e.isDragging&&r&&(Qe((function(t){var r=e.getAxisMotionValue(t);r&&(e.originPoint[t]+=n[t].translate,r.set(r.get()+n[t].translate))})),e.visualElement.syncRender())})),function(){a(),n(),o()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,i=void 0!==r&&r,o=t.dragPropagation,s=void 0!==o&&o,u=t.dragConstraints,l=void 0!==u&&u,c=t.dragElastic,d=void 0===c?.35:c,p=t.dragMomentum,f=void 0===p||p;return a(a({},t),{drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:d,dragMomentum:f})},t}();function zn(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function Yn(t){var e=n(null);return null===e.current&&(e.current=t()),e.current}var Xn=r({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"});function Hn(t){return e((function(){return function(){return t()}}),[])}var Wn=function(t){return function(e){return t(e),null}},Gn={pan:Wn((function(t){var r=t.onPan,o=t.onPanStart,a=t.onPanEnd,s=t.onPanSessionStart,u=t.visualElement,l=r||o||a||s,c=n(null),d=i(Xn).transformPagePoint,p={onSessionStart:s,onStart:o,onMove:r,onEnd:function(t,e){c.current=null,a&&a(t,e)}};e((function(){null!==c.current&&c.current.updateHandlers(p)})),z(u,"pointerdown",l&&function(t){c.current=new Me(t,p,{transformPagePoint:d})}),Hn((function(){return c.current&&c.current.end()}))})),drag:Wn((function(t){var n=t.dragControls,r=t.visualElement,i=Yn((function(){return new Nn(r)}));e((function(){return n&&n.subscribe(i)}),[i,n]),e((function(){return i.addListeners()}),[i])}))},$n=r(null),qn=0,Zn=function(){return qn++};function _n(){var t=i($n);if(null===t)return[!0,null];var n=t.isPresent,r=t.onExitComplete,o=t.register,a=Yn(Zn);e((function(){return o(a)}),[]);return!n&&r?[!1,function(){return null==r?void 0:r(a)}]:[!0]}var Kn=r({}),Jn=r({});function Qn(t,e){-1===t.indexOf(e)&&t.push(e)}function tr(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var er=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Qn(this.subscriptions,t),function(){return tr(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),nr=function(){function t(t){var e,n=this;this.version="6.3.13",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new er,this.velocityUpdateSubscribers=new er,this.renderSubscribers=new er,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=L(),i=r.delta,o=r.timestamp;n.lastUpdated!==o&&(n.timeDelta=i,n.lastUpdated=o,D.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return D.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?ye(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function rr(t){return new nr(t)}var ir=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)};var or=["TopLeft","TopRight","BottomLeft","BottomRight"],ar=or.length,sr=function(t){return"string"==typeof t?parseFloat(t):t},ur=function(t){return"number"==typeof t||ct.test(t)};function lr(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}var cr=pr(0,.5,re),dr=pr(.5,.95,Kt);function pr(t,e,n){return function(r){return r<t?0:r>e?1:n(_(t,e,r))}}function fr(t,e){t.min=e.min,t.max=e.max}function vr(t,e){fr(t.x,e.x),fr(t.y,e.y)}function hr(t,e,n,r,i){return t=an(t-=e,1/n,r),void 0!==i&&(t=an(t,1/i,r)),t}function mr(t,e,n,r,i){var o=u(n,3),a=o[0],s=o[1],l=o[2];!function(t,e,n,r,i,o,a){if(void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===o&&(o=t),void 0===a&&(a=t),lt.test(e)&&(e=parseFloat(e),e=K(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=K(o.min,o.max,r);t===o&&(s-=e),t.min=hr(t.min,e,n,s,i),t.max=hr(t.max,e,n,s,i)}}(t,e[a],e[s],e[l],e.scale,r,i)}var yr=["x","scaleX","originX"],gr=["y","scaleY","originY"];function xr(t,e,n,r){mr(t.x,e,yr,null==n?void 0:n.x,null==r?void 0:r.x),mr(t.y,e,gr,null==n?void 0:n.y,null==r?void 0:r.y)}function br(t){return 0===t.translate&&1===t.scale}function Pr(t){return br(t.x)&&br(t.y)}function wr(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}var Ar=function(){function t(){this.members=[]}return t.prototype.add=function(t){Qn(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if(tr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,n=this.members.findIndex((function(e){return t===e}));if(0===n)return!1;for(var r=n;r>=0;r--){var i=this.members[r];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var n,r=this.lead;t!==r&&(this.prevLead=r,this.lead=t,t.show(),r&&(r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,e&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&r.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,n,r,i,o;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(o=null===(r=t.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),Tr={};function Er(t,e,n){var r=t.x.translate/e.x,i=t.y.translate/e.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),u&&(o+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(o+="scale(".concat(l,", ").concat(c,")"))?"none":o}var Sr=["","X","Y","Z"],Vr=["transformPerspective","x","y","z"];function Mr(t,e){return Vr.indexOf(t)-Vr.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Sr.forEach((function(e){return Vr.push(t+e)}))}));var Rr=new Set(Vr);function Cr(t){return Rr.has(t)}var Lr=new Set(["originX","originY","originZ"]);function Dr(t){return Lr.has(t)}var Or=function(t,e){return t.depth-e.depth},kr=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Qn(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){tr(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Or),this.isDirty=!1,this.children.forEach(t)},t}();function jr(t){var e,n=ir(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}var Fr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ur(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,i=t.resetTransform;return function(){function t(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r=null==n?void 0:n()),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=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(Hr),i.nodes.forEach(Wr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?l(l([],u(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new kr)}return t.prototype.addEventListener=function(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new er),this.eventHandlers.get(t).add(e)},t.prototype.notifyListeners=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.eventHandlers.get(t);null==r||r.notify.apply(r,l([],u(e),!1))},t.prototype.hasListeners=function(t){return this.eventHandlers.has(t)},t.prototype.registerPotentialNode=function(t,e){this.potentialNodes.set(t,e)},t.prototype.mount=function(t,n){var r,i=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;var o=this.options,s=o.layoutId,u=o.layout,l=o.visualElement;if(l&&!l.getInstance()&&l.mount(t),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(u||s)&&(this.isLayoutDirty=!0),e){var c,d=function(){return i.root.updateBlockedByResize=!1};e(t,(function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(d,250),Fr.hasAnimatedSinceResize&&(Fr.hasAnimatedSinceResize=!1,i.nodes.forEach(Xr))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&l&&(s||u)&&this.addEventListener("didUpdate",(function(t){var e,n,r,o,s,u=t.delta,c=t.hasLayoutChanged,d=t.hasRelativeTargetChanged,p=t.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var f=null!==(n=null!==(e=i.options.transition)&&void 0!==e?e:l.getDefaultTransition())&&void 0!==n?n:Kr,v=l.getProps(),h=v.onLayoutAnimationStart,m=v.onLayoutAnimationComplete,y=!i.targetLayout||!wr(i.targetLayout,p)||d,g=!c&&d;if((null===(r=i.resumeFrom)||void 0===r?void 0:r.instance)||g||c&&(y||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(u,g);var x=a(a({},Un(f,"layout")),{onPlay:h,onComplete:m});l.shouldReduceMotion&&(x.delay=0,x.type=!1),i.startAnimation(x)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null===(s=(o=i.options).onExitComplete)||void 0===s||s.call(o));i.targetLayout=p}))}},t.prototype.unmount=function(){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,S.preRender(this.updateProjection)},t.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},t.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},t.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},t.prototype.isTreeAnimationBlocked=function(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1},t.prototype.startUpdate=function(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Gr))},t.prototype.willUpdate=function(t){var e,n,r;if(void 0===t&&(t=!0),this.root.isUpdateBlocked())null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var l=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==l?void 0:l(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}}},t.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(zr);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Jr),this.potentialNodes.clear()),this.nodes.forEach(Yr),this.nodes.forEach(Br),this.nodes.forEach(Ir),this.clearAllSnapshots(),V.update(),V.preRender(),V.render())},t.prototype.clearAllSnapshots=function(){this.nodes.forEach(Nr),this.sharedNodes.forEach($r)},t.prototype.scheduleUpdateProjection=function(){D.preRender(this.updateProjection,!1,!0)},t.prototype.scheduleCheckAfterUnmount=function(){var t=this;D.postRender((function(){t.isLayoutDirty?t.root.didUpdate():t.root.checkUpdateFailed()}))},t.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));ti(e),this.snapshot={measured:t,layout:e,latestValues:{}}}},t.prototype.updateLayout=function(){var t;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e=0;e<this.path.length;e++){this.path[e].updateScroll()}var n=this.measure();ti(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},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==r?void 0:r.actual)}},t.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.scroll=r(this.instance))},t.prototype.resetTransform=function(){var t;if(i){var e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Pr(this.projectionDelta),r=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,o=null==r?void 0:r(this.latestValues,""),a=o!==this.prevTransformTemplateValue;e&&(n||rn(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},t.prototype.measure=function(){var t=this.options.visualElement;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};var e=t.measureViewportBox(),n=this.root.scroll;return n&&(cn(e.x,n.x),cn(e.y,n.y)),e},t.prototype.removeElementScroll=function(t){var e={x:{min:0,max:0},y:{min:0,max:0}};vr(e,t);for(var n=0;n<this.path.length;n++){var r=this.path[n],i=r.scroll,o=r.options;r!==this.root&&i&&o.layoutScroll&&(cn(e.x,i.x),cn(e.y,i.y))}return e},t.prototype.applyTransform=function(t,e){void 0===e&&(e=!1);var n={x:{min:0,max:0},y:{min:0,max:0}};vr(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vn(n,{x:-i.scroll.x,y:-i.scroll.y}),rn(i.latestValues)&&vn(n,i.latestValues)}return rn(this.latestValues)&&vn(n,this.latestValues),n},t.prototype.removeTransform=function(t){var e,n={x:{min:0,max:0},y:{min:0,max:0}};vr(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];if(i.instance&&rn(i.latestValues)){nn(i.latestValues)&&i.updateSnapshot();var o={x:{min:0,max:0},y:{min:0,max:0}};vr(o,i.measure()),xr(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layout,o)}}return rn(this.latestValues)&&xr(n,this.latestValues),n},t.prototype.setTargetDelta=function(t){this.targetDelta=t,this.root.scheduleUpdateProjection()},t.prototype.setOptions=function(t){var e;this.options=a(a(a({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})},t.prototype.clearMeasurements=function(){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},t.prototype.resolveTargetDelta=function(){var t,e,n,r,i=this.options,o=i.layout,a=i.layoutId;this.layout&&(o||a)&&(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}},$e(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),vr(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)?(e=this.target,n=this.relativeTarget,r=this.relativeParent.target,We(e.x,n.x,r.x),We(e.y,n.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):vr(this.target,this.layout.actual),ln(this.target,this.targetDelta)):vr(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}},$e(this.relativeTargetOrigin,this.target,this.relativeParent.target),vr(this.relativeTarget,this.relativeTargetOrigin)))))},t.prototype.getClosestProjectingParent=function(){if(this.parent&&!rn(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},t.prototype.calcProjection=function(){var t,e=this.options,n=e.layout,r=e.layoutId;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&&(n||r)){var i=this.getLead();vr(this.layoutCorrected,this.layout.actual),function(t,e,n,r){var i,o;void 0===r&&(r=!1);var a=n.length;if(a){var s,u;e.x=e.y=1;for(var l=0;l<a;l++)u=(s=n[l]).projectionDelta,"contents"!==(null===(o=null===(i=s.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vn(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ln(t,u)),r&&rn(s.latestValues)&&vn(t,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);var o=i.target;if(o){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}});var a=this.treeScale.x,s=this.treeScale.y,u=this.projectionTransform;He(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=Er(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},t.prototype.hide=function(){this.isVisible=!1},t.prototype.show=function(){this.isVisible=!0},t.prototype.scheduleRender=function(t){var e,n,r;void 0===t&&(t=!0),null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},t.prototype.setAnimationOrigin=function(t,e){var n,r=this;void 0===e&&(e=!1);var i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},s=a({},this.latestValues),u={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;var l={x:{min:0,max:0},y:{min:0,max:0}},c=null==i?void 0:i.isShared,d=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,p=Boolean(c&&!d&&!0===this.options.crossfade&&!this.path.some(_r));this.animationProgress=0,this.mixTargetDelta=function(e){var n,i,a,f,v,h=e/1e3;qr(u.x,t.x,h),qr(u.y,t.y,h),r.setTargetDelta(u),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&($e(l,r.layout.actual,r.relativeParent.layout.actual),i=r.relativeTarget,a=r.relativeTargetOrigin,f=l,v=h,Zr(i.x,a.x,f.x,v),Zr(i.y,a.y,f.y,v)),c&&(r.animationValues=s,function(t,e,n,r,i,o){var a,s,u,l;i?(t.opacity=K(0,null!==(a=n.opacity)&&void 0!==a?a:1,cr(r)),t.opacityExit=K(null!==(s=e.opacity)&&void 0!==s?s:1,0,dr(r))):o&&(t.opacity=K(null!==(u=e.opacity)&&void 0!==u?u:1,null!==(l=n.opacity)&&void 0!==l?l:1,r));for(var c=0;c<ar;c++){var d="border".concat(or[c],"Radius"),p=lr(e,d),f=lr(n,d);if(void 0!==p||void 0!==f)p||(p=0),f||(f=0),0===p||0===f||ur(p)===ur(f)?(t[d]=Math.max(K(sr(p),sr(f),r),0),(lt.test(f)||lt.test(p))&&(t[d]+="%")):t[d]=f}(e.rotate||n.rotate)&&(t.rotate=K(e.rotate||0,n.rotate||0,r))}(s,o,r.latestValues,h,p,d)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=h},this.mixTargetDelta(0)},t.prototype.startAnimation=function(t){var e,n,r=this;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&&(S.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update((function(){Fr.hasAnimatedSinceResize=!0,r.currentAnimation=function(t,e,n){void 0===n&&(n={});var r=ir(t)?t:rr(t);return Bn("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}(0,1e3,a(a({},t),{onUpdate:function(e){var n;r.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:function(){var e;null===(e=t.onComplete)||void 0===e||e.call(t),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))},t.prototype.completeAnimation=function(){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")},t.prototype.finishAnimation=function(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},t.prototype.applyTransformsToTarget=function(){var t=this.getLead(),e=t.targetWithTransforms,n=t.target,r=t.layout,i=t.latestValues;e&&n&&r&&(vr(e,n),vn(e,i),He(this.projectionDeltaWithTransform,this.layoutCorrected,e,i))},t.prototype.registerSharedNode=function(t,e){var n,r,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ar),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===(r=e.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,e)})},t.prototype.isLead=function(){var t=this.getStack();return!t||t.lead===this},t.prototype.getLead=function(){var t;return this.options.layoutId&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this},t.prototype.getPrevLead=function(){var t;return this.options.layoutId?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0},t.prototype.getStack=function(){var t=this.options.layoutId;if(t)return this.root.sharedNodes.get(t)},t.prototype.promote=function(t){var e=void 0===t?{}:t,n=e.needsReset,r=e.transition,i=e.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,i),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},t.prototype.relegate=function(){var t=this.getStack();return!!t&&t.relegate(this)},t.prototype.resetRotation=function(){var t=this.options.visualElement;if(t){for(var e=!1,n={},r=0;r<Sr.length;r++){var i="rotate"+Sr[r];t.getStaticValue(i)&&(e=!0,n[i]=t.getStaticValue(i),t.setStaticValue(i,0))}if(e){for(var i in null==t||t.syncRender(),n)t.setStaticValue(i,n[i]);t.scheduleRender()}}},t.prototype.getProjectionStyles=function(t){var e,n,r,i,o,a;void 0===t&&(t={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var u=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=jr(t.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none",s;var l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){var c={};return this.options.layoutId&&(c.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,c.pointerEvents=jr(t.pointerEvents)||""),this.hasProjected&&!rn(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1),c}var d=l.animationValues||l.latestValues;this.applyTransformsToTarget(),s.transform=Er(this.projectionDeltaWithTransform,this.treeScale,d),u&&(s.transform=u(d,s.transform));var p=this.projectionDelta,f=p.x,v=p.y;for(var h in s.transformOrigin="".concat(100*f.origin,"% ").concat(100*v.origin,"% 0"),l.animationValues?s.opacity=l===this?null!==(i=null!==(r=d.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=l===this?null!==(o=d.opacity)&&void 0!==o?o:"":null!==(a=d.opacityExit)&&void 0!==a?a:0,Tr)if(void 0!==d[h]){var m=Tr[h],y=m.correct,g=m.applyTo,x=y(d[h],l);if(g)for(var b=g.length,P=0;P<b;P++)s[g[P]]=x;else s[h]=x}return this.options.layoutId&&(s.pointerEvents=l===this?jr(t.pointerEvents)||"":"none"),s},t.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},t.prototype.resetTree=function(){this.root.nodes.forEach((function(t){var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(zr),this.root.sharedNodes.clear()},t}()}function Br(t){t.updateLayout()}function Ir(t){var e,n,r,i,o=null!==(n=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==n?n:t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){var a=t.layout,s=a.actual,u=a.measured;"size"===t.options.animationType?Qe((function(t){var e=o.isShared?o.measured[t]:o.layout[t],n=ze(e);e.min=s[t].min,e.max=e.min+n})):"position"===t.options.animationType&&Qe((function(t){var e=o.isShared?o.measured[t]:o.layout[t],n=ze(s[t]);e.max=e.min+n}));var l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};He(l,s,o.layout);var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o.isShared?He(c,t.applyTransform(u,!0),o.measured):He(c,s,o.layout);var d=!Pr(l),p=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var f=t.relativeParent,v=f.snapshot,h=f.layout;if(v&&h){var m={x:{min:0,max:0},y:{min:0,max:0}};$e(m,o.layout,v.layout);var y={x:{min:0,max:0},y:{min:0,max:0}};$e(y,s,h.actual),wr(m,y)||(p=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else t.isLead()&&(null===(i=(r=t.options).onExitComplete)||void 0===i||i.call(r));t.options.transition=void 0}function Nr(t){t.clearSnapshot()}function zr(t){t.clearMeasurements()}function Yr(t){var e=t.options.visualElement;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function Xr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Hr(t){t.resolveTargetDelta()}function Wr(t){t.calcProjection()}function Gr(t){t.resetRotation()}function $r(t){t.removeLeadSnapshot()}function qr(t,e,n){t.translate=K(e.translate,0,n),t.scale=K(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Zr(t,e,n,r){t.min=K(e.min,n.min,r),t.max=K(e.max,n.max,r)}function _r(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}var Kr={duration:.45,ease:[.4,0,.1,1]};function Jr(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(Boolean(t.path[r].instance)){n=t.path[r];break}var i=(n&&n!==t.root?n.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));i&&t.mount(i,!0)}function Qr(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ti(t){Qr(t.x),Qr(t.y)}function ei(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var ni={correct:function(t,e){if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}var n=ei(t,e.target.x),r=ei(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}};function ri(t){return"string"==typeof t&&t.startsWith("var(--")}var ii=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function oi(t,e,n){var r=u(function(t){var e=ii.exec(t);if(!e)return[,];var n=u(e,3);return[n[1],n[2]]}(t),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():ri(o)?oi(o,e):o}}var ai={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,i=t,o=t.includes("var("),a=[];o&&(t=t.replace(ii,(function(t){return a.push(t),"_$css"})));var s=St.parse(t);if(s.length>5)return i;var u=St.createTransformer(t),l="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=d;var p=K(c,d,.5);"number"==typeof s[2+l]&&(s[2+l]/=p),"number"==typeof s[3+l]&&(s[3+l]/=p);var f=u(s);if(o){var v=0;f=f.replace("_$css",(function(){var t=a[v];return v++,t}))}return f}},si=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.componentDidMount=function(){var t,e=this,n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,s=n.layoutId,u=r.projection;t=ui,Object.assign(Tr,t),u&&((null==i?void 0:i.group)&&i.group.add(u),(null==o?void 0:o.register)&&s&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",(function(){e.safeToRemove()})),u.setOptions(a(a({},u.options),{onExitComplete:function(){return e.safeToRemove()}}))),Fr.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,n=this.props,r=n.layoutDependency,i=n.visualElement,o=n.drag,a=n.isPresent,s=i.projection;return s?(s.isPresent=a,o||t.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||D.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,n=t.layoutGroup,r=t.switchLayoutGroup,i=e.projection;i&&(i.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(i),(null==r?void 0:r.deregister)&&r.deregister(i))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(t.Component);var ui={borderRadius:a(a({},ni),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ni,borderTopRightRadius:ni,borderBottomLeftRadius:ni,borderBottomRightRadius:ni,boxShadow:ai},li={measureLayout:function(e){var n=u(_n(),2),r=n[0],o=n[1],s=i(Kn);return t.createElement(si,a({},e,{layoutGroup:s,switchLayoutGroup:i(Jn),isPresent:r,safeToRemove:o}))}},ci=Ur({attachResizeListener:function(t,e){return k(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}}}),di={current:void 0},pi=Ur({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!di.current){var t=new ci(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),di.current=t}return di.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"}}),fi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function vi(t){return"object"==typeof t&&"function"==typeof t.start}function hi(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var mi=function(t){return/^0[^.\s]+$/.test(t)},yi=function(t){return function(e){return e.test(t)}},gi=[it,ct,lt,ut,pt,dt,{test:function(t){return"auto"===t},parse:function(t){return t}}],xi=function(t){return gi.find(yi(t))},bi=l(l([],u(gi),!1),[Pt,St],!1),Pi=function(t){return bi.find(yi(t))};function wi(t){return Array.isArray(t)}function Ai(t){return"string"==typeof t||wi(t)}function Ti(t,e,n){var r=t.getProps();return function(t,e,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,i)),"string"==typeof e&&(e=null===(o=t.variants)||void 0===o?void 0:o[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,i)),e}(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Ei(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Ai(t.initial)||Ai(t.animate)||Ai(t.whileHover)||Ai(t.whileDrag)||Ai(t.whileTap)||Ai(t.whileFocus)||Ai(t.exit)}function Si(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,rr(n))}function Vi(t,e){if(e)return(e[t]||e.default||e).from}function Mi(t,e,n){var r;void 0===n&&(n={});var i=Ti(t,e,n.custom),o=(i||{}).transition,s=void 0===o?t.getDefaultTransition()||{}:o;n.transitionOverride&&(s=n.transitionOverride);var l=i?function(){return Ri(t,i,n)}:function(){return Promise.resolve()},c=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,o=void 0===i?0:i,u=s.staggerChildren,l=s.staggerDirection;return function(t,e,n,r,i,o){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var s=[],u=(t.variantChildren.size-1)*r,l=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),u-t*r};return Array.from(t.variantChildren).sort(Ci).forEach((function(t,r){s.push(Mi(t,e,a(a({},o),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,o+r,u,l,n)}:function(){return Promise.resolve()},d=s.when;if(d){var p=u("beforeChildren"===d?[l,c]:[c,l],2),f=p[0],v=p[1];return f().then(v)}return Promise.all([l(),c(n.delay)])}function Ri(t,e,n){var r,i=void 0===n?{}:n,o=i.delay,u=void 0===o?0:o,l=i.transitionOverride,c=i.type,d=t.makeTargetAnimatable(e),p=d.transition,f=void 0===p?t.getDefaultTransition():p,v=d.transitionEnd,h=s(d,["transition","transitionEnd"]);l&&(f=l);var m=[],y=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var g in h){var x=t.getValue(g),b=h[g];if(!(!x||void 0===b||y&&Li(y,g))){var P=a({delay:u},f);t.shouldReduceMotion&&Cr(g)&&(P=a(a({},P),{type:!1,delay:0}));var w=Bn(g,x,b,P);m.push(w)}}return Promise.all(m).then((function(){v&&function(t,e){var n=Ti(t,e),r=n?t.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=void 0===i?{}:i;r.transition;var u=s(r,["transitionEnd","transition"]);for(var l in u=a(a({},u),o)){Si(t,l,Ln(u[l]))}}(t,v)}))}function Ci(t,e){return t.sortNodePosition(e)}function Li(t,e){var n=t.protectedKeys,r=t.needsAnimating,i=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,i}var Di=[_e.Animate,_e.InView,_e.Focus,_e.Hover,_e.Tap,_e.Drag,_e.Exit],Oi=l([],u(Di),!1).reverse(),ki=Di.length;function ji(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(e),Array.isArray(e)){var i=e.map((function(e){return Mi(t,e,n)}));r=Promise.all(i)}else if("string"==typeof e)r=Mi(t,e,n);else{var o="function"==typeof e?Ti(t,e,n.custom):e;r=Ri(t,o,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function Fi(t){var e,n=ji(t),r=((e={})[_e.Animate]=Ui(!0),e[_e.InView]=Ui(),e[_e.Hover]=Ui(),e[_e.Tap]=Ui(),e[_e.Drag]=Ui(),e[_e.Focus]=Ui(),e[_e.Exit]=Ui(),e),i={},o=!0,c=function(e,n){var r=Ti(t,n);if(r){r.transition;var i=r.transitionEnd,o=s(r,["transition","transitionEnd"]);e=a(a(a({},e),o),i)}return e};function d(e,s){for(var d,p=t.getProps(),f=t.getVariantContext(!0)||{},v=[],h=new Set,m={},y=1/0,g=function(n){var i=Oi[n],g=r[i],x=null!==(d=p[i])&&void 0!==d?d:f[i],b=Ai(x),P=i===s?g.isActive:null;!1===P&&(y=n);var w=x===f[i]&&x!==p[i]&&b;if(w&&o&&t.manuallyAnimateOnMount&&(w=!1),g.protectedKeys=a({},m),!g.isActive&&null===P||!x&&!g.prevProp||vi(x)||"boolean"==typeof x)return"continue";var A=function(t,e){if("string"==typeof e)return e!==t;if(wi(e))return!hi(e,t);return!1}(g.prevProp,x),T=A||i===s&&g.isActive&&!w&&b||n>y&&b,E=Array.isArray(x)?x:[x],S=E.reduce(c,{});!1===P&&(S={});var V=g.prevResolvedValues,M=void 0===V?{}:V,R=a(a({},M),S),C=function(t){T=!0,h.delete(t),g.needsAnimating[t]=!0};for(var L in R){var D=S[L],O=M[L];m.hasOwnProperty(L)||(D!==O?xn(D)&&xn(O)?!hi(D,O)||A?C(L):g.protectedKeys[L]=!0:void 0!==D?C(L):h.add(L):void 0!==D&&h.has(L)?C(L):g.protectedKeys[L]=!0)}g.prevProp=x,g.prevResolvedValues=S,g.isActive&&(m=a(a({},m),S)),o&&t.blockInitialAnimation&&(T=!1),T&&!w&&v.push.apply(v,l([],u(E.map((function(t){return{animation:t,options:a({type:i},e)}}))),!1))},x=0;x<ki;x++)g(x);if(i=a({},m),h.size){var b={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(b[e]=n)})),v.push({animation:b})}var P=Boolean(v.length);return o&&!1===p.initial&&!t.manuallyAnimateOnMount&&(P=!1),o=!1,P?n(v):Promise.resolve()}return{isAnimated:function(t){return void 0!==i[t]},animateChanges:d,setActive:function(e,n,i){var o;if(r[e].isActive===n)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n;var a=d(i,e);for(var s in r)r[s].protectedKeys={};return a},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function Ui(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Bi=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Ii=new Set;var Ni=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,o=t.makeTargetAnimatable,s=t.measureViewportBox,c=t.render,d=t.readValueFromInstance,p=t.removeValueFromRenderState,f=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,e){var h=t.parent,m=t.props,y=t.presenceId,g=t.blockInitialAnimation,x=t.visualState,b=t.shouldReduceMotion;void 0===e&&(e={});var P,w,A=!1,T=x.latestValues,E=x.renderState,V=function(){var t=Bi.map((function(){return new er})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Bi.forEach((function(r){var i,o="on"+r,a=t[o];null===(i=e[r])||void 0===i||i.call(e),a&&(e[r]=n[o](a))}))}};return t.forEach((function(t,e){n["on"+Bi[e]]=function(e){return t.add(e)},n["notify"+Bi[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,l([],u(e),!1))}})),n}(),M=new Map,R=new Map,C={},L=a({},T);function O(){P&&A&&(k(),c(P,E,m.style,Y.projection))}function k(){r(Y,E,T,e,m)}function j(){V.notifyUpdate(T)}function F(t,e){var n=e.onChange((function(e){T[t]=e,m.onUpdate&&D.update(j,!1,!0)})),r=e.onRenderRequest(Y.scheduleRender);R.set(t,(function(){n(),r()}))}var U=v(m);for(var B in U){var I=U[B];void 0!==T[B]&&ir(I)&&I.set(T[B],!1)}var N=Ei(m),z=function(t){return Boolean(Ei(t)||t.variants)}(m),Y=a(a({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:y,shouldReduceMotion:b,variantChildren:z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(P)},mount:function(t){A=!0,P=Y.current=t,Y.projection&&Y.projection.mount(t),z&&h&&!N&&(w=null==h?void 0:h.addVariantChild(Y)),M.forEach((function(t,e){return F(e,t)})),null==h||h.children.add(Y),Y.setProps(m)},unmount:function(){var t;null===(t=Y.projection)||void 0===t||t.unmount(),S.update(j),S.render(O),R.forEach((function(t){return t()})),null==w||w(),null==h||h.children.delete(Y),V.clearAllListeners(),P=void 0,A=!1},addVariantChild:function(t){var e,n=Y.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return f&&n===t.treeType?f(Y.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return z?Y:null==h?void 0:h.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return P},getStaticValue:function(t){return T[t]},setStaticValue:function(t,e){return T[t]=e},getLatestValues:function(){return T},setVisibility:function(t){Y.isVisible!==t&&(Y.isVisible=t,Y.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),o(Y,t,m,e)},measureViewportBox:function(){return s(P,m)},addValue:function(t,e){Y.hasValue(t)&&Y.removeValue(t),M.set(t,e),T[t]=e.get(),F(t,e)},removeValue:function(t){var e;M.delete(t),null===(e=R.get(t))||void 0===e||e(),R.delete(t),delete T[t],p(t,E)},hasValue:function(t){return M.has(t)},getValue:function(t,e){var n=M.get(t);return void 0===n&&void 0!==e&&(n=rr(e),Y.addValue(t,n)),n},forEachValue:function(t){return M.forEach(t)},readValue:function(t){var n;return null!==(n=T[t])&&void 0!==n?n:d(P,t,e)},setBaseTarget:function(t,e){L[t]=e},getBaseTarget:function(t){if(i){var e=i(m,t);if(void 0!==e&&!ir(e))return e}return L[t]}},V),{build:function(){return k(),E},scheduleRender:function(){D.render(O,!1,!0)},syncRender:O,setProps:function(t){(t.transformTemplate||m.transformTemplate)&&Y.scheduleRender(),m=t,V.updatePropListeners(t),C=function(t,e,n){var r;for(var i in e){var o=e[i],a=n[i];if(ir(o))t.addValue(i,o);else if(ir(a))t.addValue(i,rr(o));else if(a!==o)if(t.hasValue(i)){var s=t.getValue(i);!s.hasAnimated&&s.set(o)}else t.addValue(i,rr(null!==(r=t.getStaticValue(i))&&void 0!==r?r:o))}for(var i in n)void 0===e[i]&&t.removeValue(i);return e}(Y,v(m),C)},getProps:function(){return m},getVariant:function(t){var e;return null===(e=m.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==h?void 0:h.getVariantContext();if(!N){var e=(null==h?void 0:h.getVariantContext())||{};return void 0!==m.initial&&(e.initial=m.initial),e}for(var n={},r=0;r<Yi;r++){var i=zi[r],o=m[i];(Ai(o)||!1===o)&&(n[i]=o)}return n}});return Y}},zi=l(["initial"],u(Di),!1),Yi=zi.length;function Xi(t){return t.startsWith("--")}var Hi=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Wi(t,e,n,r){var i,o=t.style,a=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,d=!1,p=!0;for(var f in e){var v=e[f];if(Xi(f))a[f]=v;else{var h=Sn[f],m=Hi(v,h);if(Cr(f)){if(c=!0,s[f]=m,u.push(f),!p)continue;v!==(null!==(i=h.default)&&void 0!==i?i:0)&&(p=!1)}else Dr(f)?(l[f]=m,d=!0):o[f]=m}}c?o.transform=function(t,e,n,r){var i=t.transform,o=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,l=void 0===u||u,c="";o.sort(Mr);for(var d=!1,p=o.length,f=0;f<p;f++){var v=o[f];c+="".concat(fi[v]||v,"(").concat(i[v],") "),"z"===v&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(i,n?"":c):l&&n&&(c="none"),c}(t,n,p,r):r?o.transform=r({},""):!e.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,i=void 0===r?"50%":r,o=t.originZ,a=void 0===o?0:o;return"".concat(n," ").concat(i," ").concat(a)}(l))}var Gi,$i=new Set(["width","height","top","left","right","bottom","x","y"]),qi=function(t){return $i.has(t)},Zi=function(t,e){t.set(e,!1),t.set(e)},_i=function(t){return t===it||t===ct};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Gi||(Gi={}));var Ki=function(t,e){return parseFloat(t.split(", ")[e])},Ji=function(t,e){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ki(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?Ki(a[1],t):0}},Qi=new Set(["x","y","z"]),to=Vr.filter((function(t){return!Qi.has(t)}));var eo={width:function(t,e){var n=t.x,r=e.paddingLeft,i=void 0===r?"0":r,o=e.paddingRight,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,i=void 0===r?"0":r,o=e.paddingBottom,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:Ji(4,13),y:Ji(5,14)},no=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=a({},e),r=a({},r);var i=Object.keys(e).filter(qi),o=[],s=!1,l=[];if(i.forEach((function(i){var a=t.getValue(i);if(t.hasValue(i)){var u,c=n[i],d=xi(c),p=e[i];if(xn(p)){var f=p.length,v=null===p[0]?1:0;c=p[v],d=xi(c);for(var h=v;h<f;h++)u?xi(p[h]):u=xi(p[h])}else u=xi(p);if(d!==u)if(_i(d)&&_i(u)){var m=a.get();"string"==typeof m&&a.set(parseFloat(m)),"string"==typeof p?e[i]=parseFloat(p):Array.isArray(p)&&u===ct&&(e[i]=p.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==u?void 0:u.transform)&&(0===c||0===p)?0===c?a.set(u.transform(c)):e[i]=d.transform(p):(s||(o=function(t){var e=[];return to.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),l.push(i),r[i]=void 0!==r[i]?r[i]:e[i],Zi(a,p))}})),l.length){var c=l.indexOf("height")>=0?window.pageYOffset:null,d=function(t,e,n){var r=e.measureViewportBox(),i=e.getInstance(),o=getComputedStyle(i),a=o.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=eo[t](r,o)})),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);Zi(r,s[n]),t[n]=eo[n](u,o)})),t}(e,t,l);return o.length&&o.forEach((function(e){var n=u(e,2),r=n[0],i=n[1];t.getValue(r).set(i)})),t.syncRender(),null!==c&&window.scrollTo({top:c}),{target:d,transitionEnd:r}}return{target:e,transitionEnd:r}};function ro(t,e,n,r){return function(t){return Object.keys(t).some(qi)}(e)?no(t,e,n,r):{target:e,transitionEnd:r}}var io=function(t,e,n,r){var i=function(t,e,n){var r,i=s(e,[]),o=t.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};for(var u in n&&(n=a({},n)),t.forEachValue((function(t){var e=t.get();if(ri(e)){var n=oi(e,o);n&&t.set(n)}})),i){var l=i[u];if(ri(l)){var c=oi(l,o);c&&(i[u]=c,n&&(null!==(r=n[u])&&void 0!==r||(n[u]=l)))}}return{target:i,transitionEnd:n}}(t,e,r);return ro(t,e=i.target,n,r=i.transitionEnd)};function oo(t,e){var n=e.layout,r=e.layoutId;return Cr(t)||Dr(t)||(n||void 0!==r)&&(!!Tr[t]||"opacity"===t)}function ao(t){var e=t.style,n={};for(var r in e)(ir(e[r])||oo(r,t))&&(n[r]=e[r]);return n}function so(t,e,n,r){var i=e.style,o=e.vars;for(var a in Object.assign(t.style,i,r&&r.getProjectionStyles(n)),o)t.style.setProperty(a,o[a])}var uo={treeType:"dom",readValueFromInstance:function(t,e){if(Cr(e)){var n=Mn(e);return n&&n.default||0}var r,i=(r=t,window.getComputedStyle(r));return(Xi(e)?i.getPropertyValue(e):i[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return hn(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=e.transition,u=e.transitionEnd,l=s(e,["transition","transitionEnd"]),c=function(t,e,n){var r,i,o={};for(var a in t)o[a]=null!==(r=Vi(a,e))&&void 0!==r?r:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return o}(l,o||{},t);if(i&&(u&&(u=i(u)),l&&(l=i(l)),c&&(c=i(c))),r){!function(t,e,n){var r,i,o,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],d=e[c],p=null;Array.isArray(d)&&(p=d[0]),null===p&&(p=null!==(i=null!==(r=n[c])&&void 0!==r?r:t.readValue(c))&&void 0!==i?i:e[c]),null!=p&&("string"==typeof p&&(/^\-?\d*\.?\d+$/.test(p)||mi(p))?p=parseFloat(p):!Pi(p)&&St.test(d)&&(p=Rn(c,d)),t.addValue(c,rr(p)),null!==(o=(a=n)[c])&&void 0!==o||(a[c]=p),t.setBaseTarget(c,p))}}(t,l,c);var d=io(t,l,c,u);u=d.transitionEnd,l=d.target}return a({transition:o,transitionEnd:u},l)},scrapeMotionValuesFromProps:ao,build:function(t,e,n,r,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Wi(e,n,r,i.transformTemplate)},render:so},lo=Ni(uo),co={animation:Wn((function(t){var n=t.visualElement,r=t.animate;n.animationState||(n.animationState=Fi(n)),vi(r)&&e((function(){return r.subscribe(n)}),[r])})),exit:Wn((function(t){var n=t.custom,r=t.visualElement,o=u(_n(),2),a=o[0],s=o[1],l=i($n);e((function(){var t,e;r.isPresent=a;var i=null===(t=r.animationState)||void 0===t?void 0:t.setActive(_e.Exit,!a,{custom:null!==(e=null==l?void 0:l.custom)&&void 0!==e?e:n});!a&&(null==i||i.then(s))}),[a])}))};function po(t,e,n){return function(r,i){var o;c(r)&&!Ie()&&(null===(o=t.animationState)||void 0===o||o.setActive(_e.Hover,e),null==n||n(r,i))}}var fo=function(t,e){return!!e&&(t===e||fo(t,e.parentElement))};var vo=("undefined"==typeof process||process.env,"production"),ho=new WeakMap,mo=new WeakMap,yo=function(t){var e;null===(e=ho.get(t.target))||void 0===e||e(t)},go=function(t){t.forEach(yo)};function xo(t,e,n){var r=function(t){var e=t.root,n=s(t,["root"]),r=e||document;mo.has(r)||mo.set(r,{});var i=mo.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(go,a({root:e},n))),i[o]}(e);return ho.set(t,n),r.observe(t),function(){ho.delete(t),r.unobserve(t)}}var bo={some:0,all:1};function Po(t,n,r,i){var o=i.root,a=i.margin,s=i.amount,u=void 0===s?"some":s,l=i.once;e((function(){if(t){var e={root:null==o?void 0:o.current,rootMargin:a,threshold:"number"==typeof u?u:bo[u]};return xo(r.getInstance(),e,(function(t){var e,i=t.isIntersecting;if(n.isInView!==i&&(n.isInView=i,!l||i||!n.hasEnteredView)){i&&(n.hasEnteredView=!0),null===(e=r.animationState)||void 0===e||e.setActive(_e.InView,i);var o=r.getProps(),a=i?o.onViewportEnter:o.onViewportLeave;null==a||a(t)}}))}}),[t,o,a,u])}function wo(t,n,r,i){var o=i.fallback,a=void 0===o||o;e((function(){var e,i;t&&a&&("production"!==vo&&(e="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Ii.has(e)||(console.warn(e),i&&console.warn(i),Ii.add(e))),requestAnimationFrame((function(){var t;n.hasEnteredView=!0;var e=r.getProps().onViewportEnter;null==e||e(null),null===(t=r.animationState)||void 0===t||t.setActive(_e.InView,!0)})))}),[t])}var Ao={inView:Wn((function(t){var e=t.visualElement,r=t.whileInView,i=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=n({hasEnteredView:!1,isInView:!1}),l=Boolean(r||i||o);s.once&&u.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?wo:Po)(l,u.current,e,s)})),tap:Wn((function(t){var e=t.onTap,r=t.onTapStart,i=t.onTapCancel,o=t.whileTap,a=t.visualElement,s=e||r||i||o,u=n(!1),l=n(null),c={passive:!(r||e||i||h)};function d(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function p(){var t;return d(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(_e.Tap,!1),!Ie()}function f(t,n){p()&&(fo(a.getInstance(),t.target)?null==e||e(t,n):null==i||i(t,n))}function v(t,e){p()&&(null==i||i(t,e))}function h(t,e){var n;d(),u.current||(u.current=!0,l.current=It(N(window,"pointerup",f,c),N(window,"pointercancel",v,c)),null===(n=a.animationState)||void 0===n||n.setActive(_e.Tap,!0),null==r||r(t,e))}z(a,"pointerdown",s?h:void 0,c),Hn(d)})),focus:Wn((function(t){var e=t.whileFocus,n=t.visualElement;j(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!0)}:void 0),j(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!1)}:void 0)})),hover:Wn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,i=t.visualElement;z(i,"pointerenter",e||r?po(i,!0,e):void 0,{passive:!e}),z(i,"pointerleave",n||r?po(i,!1,n):void 0,{passive:!n})}))};function To(t,e,n){return"string"==typeof t?t:ct.transform(e+n*t)}var Eo={offset:"stroke-dashoffset",array:"stroke-dasharray"},So={offset:"strokeDashoffset",array:"strokeDasharray"};function Vo(t,e,n,r){var i=e.attrX,o=e.attrY,a=e.originX,u=e.originY,l=e.pathLength,c=e.pathSpacing,d=void 0===c?1:c,p=e.pathOffset,f=void 0===p?0:p;Wi(t,s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};var v=t.attrs,h=t.style,m=t.dimensions;v.transform&&(m&&(h.transform=v.transform),delete v.transform),m&&(void 0!==a||void 0!==u||h.transform)&&(h.transformOrigin=function(t,e,n){var r=To(e,t.x,t.width),i=To(n,t.y,t.height);return"".concat(r," ").concat(i)}(m,void 0!==a?a:.5,void 0!==u?u:.5)),void 0!==i&&(v.x=i),void 0!==o&&(v.y=o),void 0!==l&&function(t,e,n,r,i){void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=!0),t.pathLength=1;var o=i?Eo:So;t[o.offset]=ct.transform(-r);var a=ct.transform(e),s=ct.transform(n);t[o.array]="".concat(a," ").concat(s)}(v,l,d,f,!1)}var Mo=/([a-z])([A-Z])/g,Ro=function(t){return t.replace(Mo,"$1-$2").toLowerCase()},Co=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Lo=Ni(a(a({},uo),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Cr(e)?(null===(n=Mn(e))||void 0===n?void 0:n.default)||0:(e=Co.has(e)?e:Ro(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=ao(t);for(var n in t){if(ir(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,i){Vo(e,n,r,i.transformTemplate)},render:function(t,e,n,r){for(var i in so(t,e,void 0,r),e.attrs)t.setAttribute(Co.has(i)?i:Ro(i),e.attrs[i])}})),Do=["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"];var Oo=a(a({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Do.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Lo(e,{enableHardwareAcceleration:!1}):lo(e,{enableHardwareAcceleration:!0})}},co),Ao),ko=a(a(a(a({},Oo),Gn),li),{projectionNodeConstructor:pi});export{ko as domMax};