@nethesis/phone-island 1.0.9-dev.7 → 1.0.10-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (583) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/App.js.map +1 -1
  3. package/dist/_virtual/index6.js +1 -1
  4. package/dist/_virtual/index8.js +1 -1
  5. package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
  6. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  7. package/dist/components/Socket.js +1 -1
  8. package/dist/components/Socket.js.map +1 -1
  9. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  10. package/dist/lib/devices/devices.js +1 -1
  11. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
  12. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  13. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  14. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js +1 -1
  15. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js.map +1 -1
  16. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  17. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  18. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  19. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  20. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  21. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  22. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
  23. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  24. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
  25. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
  26. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
  27. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js.map +1 -1
  28. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.js.map +1 -1
  29. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js +1 -1
  30. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js.map +1 -1
  31. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.js.map +1 -1
  32. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
  33. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +1 -1
  34. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +1 -1
  35. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +1 -1
  36. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  37. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  38. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
  39. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
  40. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js +1 -1
  41. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  42. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
  43. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
  44. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js +1 -1
  45. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js.map +1 -1
  46. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  47. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  48. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  49. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  50. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  51. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  52. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  53. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  54. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  55. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  56. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  57. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  58. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.mjs.js.map +1 -1
  59. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  60. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  61. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js +1 -1
  62. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js.map +1 -1
  63. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.js.map +1 -1
  64. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  65. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  66. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js +1 -1
  67. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js.map +1 -1
  68. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js +1 -1
  69. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js.map +1 -1
  70. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
  71. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
  72. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
  73. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  74. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  75. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
  76. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js +1 -1
  77. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js.map +1 -1
  78. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  79. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  80. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
  81. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
  82. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  83. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  84. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
  85. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
  86. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +2 -0
  87. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -0
  88. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js +1 -1
  89. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js.map +1 -1
  90. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js.map +1 -1
  92. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  93. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  94. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
  95. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
  96. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.js.map +1 -1
  97. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js +2 -0
  98. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js.map +1 -0
  99. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.js.map +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js +2 -0
  106. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js.map +1 -0
  107. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.mjs.js.map +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +2 -0
  113. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -0
  114. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.mjs.js.map +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.js.map +1 -1
  116. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +1 -1
  117. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js.map +1 -1
  118. package/dist/node_modules/mic-check/lib/index.js +1 -1
  119. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  120. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  121. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  122. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  123. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  124. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  125. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
  126. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
  127. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +2 -0
  128. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -0
  129. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +2 -0
  130. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -0
  131. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  132. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  133. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  134. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +2 -0
  135. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -0
  136. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +2 -0
  142. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -0
  143. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +2 -0
  144. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -0
  145. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +2 -0
  146. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -0
  147. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -0
  148. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.js.map +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.js.map +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.js.map +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -0
  162. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +1 -0
  163. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +2 -0
  166. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -0
  167. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +2 -0
  172. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -0
  173. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js.map +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +2 -0
  179. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -0
  180. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js +2 -0
  181. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js.map +1 -0
  182. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js +2 -0
  185. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js.map +1 -0
  186. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.js.map +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +2 -0
  193. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -0
  194. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
  195. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js +2 -0
  196. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js.map +1 -0
  197. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.js.map +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -0
  201. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.js.map +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/frameloop/order.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.js.map +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  212. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  213. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  214. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  215. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js +1 -1
  216. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js.map +1 -1
  217. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.js.map +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.js.map +1 -1
  220. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.js.map +1 -1
  221. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +2 -0
  223. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -0
  224. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -0
  225. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.js.map +1 -0
  226. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +2 -0
  227. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -0
  228. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +2 -0
  229. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -0
  230. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +2 -0
  231. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -0
  232. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.js.map +1 -0
  233. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.js.map +1 -0
  234. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +2 -0
  235. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -0
  236. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -0
  237. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +2 -0
  238. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -0
  239. package/dist/node_modules/motion-dom/dist/es/projection/node/state.mjs.js.map +1 -0
  240. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js +2 -0
  241. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js.map +1 -0
  242. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js +2 -0
  243. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map +1 -0
  244. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +2 -0
  245. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -0
  246. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +2 -0
  247. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -0
  248. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.mjs.js +1 -1
  249. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -0
  250. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.js.map +1 -0
  251. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -0
  252. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.js.map +1 -0
  253. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -0
  254. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -0
  255. package/dist/node_modules/motion-dom/dist/es/render/Feature.mjs.js.map +1 -0
  256. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +2 -0
  257. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -0
  258. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +2 -0
  259. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -0
  260. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.js.map +1 -1
  261. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  262. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  263. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.js.map +1 -1
  264. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/utils/camel-to-dash.mjs.js +1 -1
  265. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +1 -0
  266. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +2 -0
  267. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -0
  268. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js +2 -0
  269. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js.map +1 -0
  270. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +2 -0
  271. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -0
  272. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +2 -0
  273. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -0
  274. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js +2 -0
  275. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +1 -0
  276. package/dist/node_modules/motion-dom/dist/es/render/store.mjs.js.map +1 -0
  277. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +2 -0
  278. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -0
  279. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +2 -0
  280. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -0
  281. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +1 -0
  282. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +1 -0
  283. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +2 -0
  284. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -0
  285. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.js.map +1 -0
  286. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +2 -0
  287. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -0
  288. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +2 -0
  289. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -0
  290. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +1 -0
  291. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.js.map +1 -0
  292. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +2 -0
  293. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -0
  294. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +2 -0
  295. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -0
  296. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.js.map +1 -0
  297. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.js.map +1 -0
  298. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.js.map +1 -1
  299. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
  300. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
  301. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js +2 -0
  302. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js.map +1 -0
  303. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js +2 -0
  304. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js.map +1 -0
  305. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.js.map +1 -0
  306. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -0
  307. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -0
  308. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js +2 -0
  309. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js.map +1 -0
  310. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.js.map +1 -0
  311. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -0
  312. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +2 -0
  313. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -0
  314. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js +2 -0
  315. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js.map +1 -0
  316. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +2 -0
  317. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -0
  318. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -1
  319. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +2 -0
  320. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -0
  321. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  322. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  323. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js +2 -0
  324. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js.map +1 -0
  325. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js +2 -0
  326. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js.map +1 -0
  327. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js +2 -0
  328. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js.map +1 -0
  329. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  330. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  331. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  332. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  333. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.js.map +1 -1
  334. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
  335. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.mjs.js.map +1 -1
  336. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.js.map +1 -1
  337. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  338. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  339. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.js.map +1 -1
  340. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js.map +1 -1
  341. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.js.map +1 -1
  342. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js +1 -1
  343. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js.map +1 -1
  344. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  345. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  346. package/dist/node_modules/motion-dom/dist/es/value/types/auto.mjs.js.map +1 -1
  347. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  348. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
  349. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
  350. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js +1 -1
  351. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js.map +1 -1
  352. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
  353. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.js.map +1 -1
  354. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.js.map +1 -1
  355. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  356. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  357. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js +2 -0
  358. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js.map +1 -0
  359. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.js.map +1 -1
  360. package/dist/node_modules/motion-dom/dist/es/value/types/int.mjs.js.map +1 -1
  361. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js +1 -1
  362. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js.map +1 -1
  363. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js +1 -1
  364. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js.map +1 -1
  365. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js +1 -1
  366. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js.map +1 -1
  367. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.js.map +1 -1
  368. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.js.map +1 -1
  369. package/dist/node_modules/motion-dom/dist/es/value/types/test.mjs.js.map +1 -1
  370. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  371. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  372. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.js.map +1 -1
  373. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +1 -1
  374. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.js.map +1 -1
  375. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.js.map +1 -1
  376. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.js.map +1 -1
  377. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.js.map +1 -1
  378. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.js.map +1 -1
  379. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.js.map +1 -0
  380. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.js.map +1 -0
  381. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.js.map +1 -0
  382. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.mjs.js.map +1 -0
  383. package/dist/node_modules/motion-utils/dist/es/array.mjs.js.map +1 -1
  384. package/dist/node_modules/motion-utils/dist/es/clamp.mjs.js.map +1 -1
  385. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js +1 -1
  386. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js.map +1 -1
  387. package/dist/node_modules/motion-utils/dist/es/easing/back.mjs.js.map +1 -1
  388. package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
  389. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  390. package/dist/node_modules/motion-utils/dist/es/easing/ease.mjs.js.map +1 -1
  391. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.js.map +1 -1
  392. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.js.map +1 -1
  393. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.js.map +1 -1
  394. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.js.map +1 -1
  395. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  396. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  397. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
  398. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  399. package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js +2 -0
  400. package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js.map +1 -0
  401. package/dist/node_modules/motion-utils/dist/es/global-config.mjs.js.map +1 -1
  402. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.mjs.js.map +1 -1
  403. package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js +2 -0
  404. package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js.map +1 -0
  405. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.js.map +1 -1
  406. package/dist/node_modules/motion-utils/dist/es/memo.mjs.js.map +1 -1
  407. package/dist/node_modules/motion-utils/dist/es/noop.mjs.js.map +1 -1
  408. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
  409. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
  410. package/dist/node_modules/motion-utils/dist/es/progress.mjs.js +1 -1
  411. package/dist/node_modules/motion-utils/dist/es/progress.mjs.js.map +1 -1
  412. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
  413. package/dist/node_modules/motion-utils/dist/es/time-conversion.mjs.js.map +1 -1
  414. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js +1 -1
  415. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js.map +1 -1
  416. package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js +1 -1
  417. package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js.map +1 -1
  418. package/dist/node_modules/prop-types/index.js +1 -1
  419. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  420. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
  421. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  422. package/dist/package.json.js +1 -1
  423. package/dist/services/user.js +1 -1
  424. package/dist/services/user.js.map +1 -1
  425. package/package.json +1 -1
  426. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js +0 -2
  427. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js.map +0 -1
  428. package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js +0 -2
  429. package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js.map +0 -1
  430. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js +0 -2
  431. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js.map +0 -1
  432. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js +0 -2
  433. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js.map +0 -1
  434. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js +0 -2
  435. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +0 -1
  436. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs.js.map +0 -1
  437. package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs.js.map +0 -1
  438. package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +0 -1
  439. package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js +0 -2
  440. package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js.map +0 -1
  441. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs.js.map +0 -1
  442. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs.js.map +0 -1
  443. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js +0 -2
  444. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js.map +0 -1
  445. package/dist/node_modules/framer-motion/dist/es/events/add-dom-event.mjs.js.map +0 -1
  446. package/dist/node_modules/framer-motion/dist/es/motion/features/Feature.mjs.js.map +0 -1
  447. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js +0 -2
  448. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js.map +0 -1
  449. package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js +0 -2
  450. package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js.map +0 -1
  451. package/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs.js.map +0 -1
  452. package/dist/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs.js.map +0 -1
  453. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js +0 -2
  454. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js.map +0 -1
  455. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js +0 -2
  456. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js.map +0 -1
  457. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js +0 -2
  458. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js.map +0 -1
  459. package/dist/node_modules/framer-motion/dist/es/projection/geometry/models.mjs.js.map +0 -1
  460. package/dist/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs.js.map +0 -1
  461. package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js +0 -2
  462. package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +0 -1
  463. package/dist/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +0 -1
  464. package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js +0 -2
  465. package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js.map +0 -1
  466. package/dist/node_modules/framer-motion/dist/es/projection/node/state.mjs.js.map +0 -1
  467. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js +0 -2
  468. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js.map +0 -1
  469. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js +0 -2
  470. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js.map +0 -1
  471. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js +0 -2
  472. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js.map +0 -1
  473. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js +0 -2
  474. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js.map +0 -1
  475. package/dist/node_modules/framer-motion/dist/es/projection/styles/transform.mjs.js.map +0 -1
  476. package/dist/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs.js.map +0 -1
  477. package/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs.js.map +0 -1
  478. package/dist/node_modules/framer-motion/dist/es/projection/utils/measure.mjs.js.map +0 -1
  479. package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js +0 -2
  480. package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js.map +0 -1
  481. package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js +0 -2
  482. package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js.map +0 -1
  483. package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js +0 -2
  484. package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js.map +0 -1
  485. package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js +0 -2
  486. package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js.map +0 -1
  487. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +0 -1
  488. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js +0 -2
  489. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js.map +0 -1
  490. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js +0 -2
  491. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js.map +0 -1
  492. package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js +0 -2
  493. package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js.map +0 -1
  494. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js +0 -2
  495. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js.map +0 -1
  496. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js +0 -2
  497. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js.map +0 -1
  498. package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js +0 -2
  499. package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js.map +0 -1
  500. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js +0 -2
  501. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +0 -1
  502. package/dist/node_modules/framer-motion/dist/es/render/store.mjs.js.map +0 -1
  503. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js +0 -2
  504. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js.map +0 -1
  505. package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js +0 -2
  506. package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js.map +0 -1
  507. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js +0 -2
  508. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js.map +0 -1
  509. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +0 -1
  510. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +0 -1
  511. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js +0 -2
  512. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js.map +0 -1
  513. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs.js.map +0 -1
  514. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js +0 -2
  515. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +0 -1
  516. package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js +0 -2
  517. package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js.map +0 -1
  518. package/dist/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs.js.map +0 -1
  519. package/dist/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs.js.map +0 -1
  520. package/dist/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
  521. package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js +0 -2
  522. package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js.map +0 -1
  523. package/dist/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs.js.map +0 -1
  524. package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js +0 -2
  525. package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js.map +0 -1
  526. package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +0 -1
  527. package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs.js.map +0 -1
  528. package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js +0 -2
  529. package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js.map +0 -1
  530. package/dist/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs.js.map +0 -1
  531. package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js +0 -2
  532. package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js.map +0 -1
  533. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js +0 -2
  534. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js.map +0 -1
  535. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs.js.map +0 -1
  536. package/dist/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs.js.map +0 -1
  537. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs.js.map +0 -1
  538. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs.js.map +0 -1
  539. package/dist/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs.js.map +0 -1
  540. package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs.js.map +0 -1
  541. package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js +0 -2
  542. package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js.map +0 -1
  543. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js +0 -2
  544. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js.map +0 -1
  545. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js +0 -2
  546. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js.map +0 -1
  547. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js +0 -2
  548. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js.map +0 -1
  549. package/dist/utils/genericFunctions/summaryEvents.js +0 -2
  550. package/dist/utils/genericFunctions/summaryEvents.js.map +0 -1
  551. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.mjs.js +0 -0
  552. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.mjs.js +0 -0
  553. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.mjs.js +0 -0
  554. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.mjs.js +0 -0
  555. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.mjs.js +0 -0
  556. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.mjs.js +0 -0
  557. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.mjs.js +0 -0
  558. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.mjs.js +0 -0
  559. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.mjs.js +0 -0
  560. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.mjs.js +0 -0
  561. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.mjs.js +0 -0
  562. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.mjs.js +0 -0
  563. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.mjs.js +0 -0
  564. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.mjs.js +0 -0
  565. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.mjs.js +0 -0
  566. /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.mjs.js +0 -0
  567. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.mjs.js +0 -0
  568. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.mjs.js +0 -0
  569. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.mjs.js +0 -0
  570. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.mjs.js +0 -0
  571. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.mjs.js +0 -0
  572. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.mjs.js +0 -0
  573. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.mjs.js +0 -0
  574. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.mjs.js +0 -0
  575. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.mjs.js +0 -0
  576. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.mjs.js +0 -0
  577. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.mjs.js +0 -0
  578. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.mjs.js +0 -0
  579. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.mjs.js +0 -0
  580. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/is-motion-value.mjs.js +0 -0
  581. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/resolve-motion-value.mjs.js +0 -0
  582. /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.mjs.js +0 -0
  583. /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/is.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),t=require("./JSAnimation.mjs.js"),i=require("./keyframes/get-final.mjs.js"),n=require("./keyframes/KeyframesResolver.mjs.js"),s=require("./NativeAnimationExtended.mjs.js"),a=require("./utils/can-animate.mjs.js"),o=require("./utils/WithPromise.mjs.js"),r=require("./waapi/supports/waapi.mjs.js"),m=require("../../../../motion-utils/dist/es/global-config.mjs.js"),l=require("../../../../motion-utils/dist/es/noop.mjs.js");class h extends o.WithPromise{constructor(t){let{autoplay:i=!0,delay:s=0,type:a="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:m="loop",keyframes:l,name:h,motionValue:p,element:d,...u}=t;super(),this.stop=()=>{this._animation?(this._animation.stop(),this.stopTimeline?.()):this.keyframeResolver?.cancel()},this.createdAt=e.time.now();const y={autoplay:i,delay:s,type:a,repeat:o,repeatDelay:r,repeatType:m,name:h,motionValue:p,element:d,...u},f=d?.KeyframeResolver||n.KeyframeResolver;this.keyframeResolver=new f(l,((e,t,i)=>this.onKeyframesResolved(e,t,y,!i)),h,p,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,o,h,p){this.keyframeResolver=void 0;const{name:d,type:u,velocity:y,delay:f,isHandoff:c,onUpdate:v}=h;this.resolvedAt=e.time.now(),a.canAnimate(n,d,u,y)||(!m.MotionGlobalConfig.instantAnimations&&f||v?.(i.getFinalKeyframe(n,h,o)),n[0]=n[n.length-1],h.duration=0,h.repeat=0);const j={startTime:p?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:o,...h,keyframes:n},g=!c&&r.supportsBrowserAnimation(j)?new s.NativeAnimationExtended({...j,element:j.motionValue.owner.current}):new t.JSAnimation(j);g.finished.then((()=>this.notifyFinished())).catch(l.noop),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||n.flushKeyframeResolvers(),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this.animation.cancel()}}exports.AsyncMotionValueAnimation=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),t=require("./JSAnimation.mjs.js"),i=require("./keyframes/get-final.mjs.js"),n=require("./keyframes/KeyframesResolver.mjs.js"),s=require("./NativeAnimationExtended.mjs.js"),a=require("./utils/can-animate.mjs.js"),o=require("./utils/make-animation-instant.mjs.js"),r=require("./utils/WithPromise.mjs.js"),m=require("./waapi/supports/waapi.mjs.js"),l=require("../../../../motion-utils/dist/es/global-config.mjs.js"),h=require("../../../../motion-utils/dist/es/noop.mjs.js");class p extends r.WithPromise{constructor(t){let{autoplay:i=!0,delay:s=0,type:a="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:m="loop",keyframes:l,name:h,motionValue:p,element:u,...d}=t;super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=e.time.now();const y={autoplay:i,delay:s,type:a,repeat:o,repeatDelay:r,repeatType:m,name:h,motionValue:p,element:u,...d},c=u?.KeyframeResolver||n.KeyframeResolver;this.keyframeResolver=new c(l,((e,t,i)=>this.onKeyframesResolved(e,t,y,!i)),h,p,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,r,p,u){this.keyframeResolver=void 0;const{name:d,type:y,velocity:c,delay:f,isHandoff:v,onUpdate:j}=p;this.resolvedAt=e.time.now();let g=!0;a.canAnimate(n,d,y,c)||(g=!1,!l.MotionGlobalConfig.instantAnimations&&f||j?.(i.getFinalKeyframe(n,p,r)),n[0]=n[n.length-1],o.makeAnimationInstant(p),p.repeat=0);const A={startTime:u?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:r,...p,keyframes:n},T=g&&!v&&m.supportsBrowserAnimation(A),k=A.motionValue?.owner?.current;let R;if(T)try{R=new s.NativeAnimationExtended({...A,element:k})}catch{R=new t.JSAnimation(A)}else R=new t.JSAnimation(A);R.finished.then((()=>{this.notifyFinished()})).catch(h.noop),this.pendingTimeline&&(this.stopTimeline=R.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=R}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||(this.keyframeResolver?.resume(),n.flushKeyframeResolvers()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}exports.AsyncMotionValueAnimation=p;
2
2
  //# sourceMappingURL=AsyncMotionValueAnimation.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncMotionValueAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs"],"sourcesContent":["import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n else {\n this.keyframeResolver?.cancel();\n }\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!canAnimate(keyframes, name, type, velocity)) {\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n options.duration = 0;\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n */\n const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n ? new NativeAnimationExtended({\n ...resolvedOptions,\n element: resolvedOptions.motionValue.owner.current,\n })\n : new JSAnimation(resolvedOptions);\n animation.finished.then(() => this.notifyFinished()).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n this.animation.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n"],"names":["AsyncMotionValueAnimation","WithPromise","constructor","_ref","autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element","options","super","this","stop","_animation","stopTimeline","keyframeResolver","cancel","createdAt","time","now","optionsWithDefaults","KeyframeResolver$1","KeyframeResolver","resolvedKeyframes","finalKeyframe","forced","onKeyframesResolved","scheduleResolve","sync","undefined","velocity","isHandoff","onUpdate","resolvedAt","canAnimate","MotionGlobalConfig","instantAnimations","getFinalKeyframe","length","duration","resolvedOptions","startTime","animation","supportsBrowserAnimation","NativeAnimationExtended","owner","current","JSAnimation","finished","then","notifyFinished","catch","noop","pendingTimeline","attachTimeline","_finished","onResolve","_onReject","finally","flushKeyframeResolvers","newTime","speed","state","newSpeed","timeline","play","pause","complete"],"mappings":"uhBAmBA,MAAMA,UAAkCC,EAAAA,YACpCC,WAAAA,CAAWC,GAA0J,IAAzJC,SAAEA,GAAW,EAAIC,MAAEA,EAAQ,EAACC,KAAEA,EAAO,YAAWC,OAAEA,EAAS,EAACC,YAAEA,EAAc,EAACC,WAAEA,EAAa,OAAMC,UAAEA,EAASC,KAAEA,EAAIC,YAAEA,EAAWC,QAAEA,KAAYC,GAASX,EAC/JY,QAIAC,KAAKC,KAAO,KACJD,KAAKE,YACLF,KAAKE,WAAWD,OAChBD,KAAKG,kBAGLH,KAAKI,kBAAkBC,QAC3B,EAEJ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C,KAAKE,WAICF,KAAK+B,UAAUM,SAHfrC,KAAK4C,SAKpB,CACAN,IAAAA,CAAKO,EAAWC,GACZ,OAAO9C,KAAKqC,SAASU,QAAQF,GAAWP,MAAK,QACjD,CACA,aAAIP,GAIA,OAHK/B,KAAKE,YACN8C,EAAAA,yBAEGhD,KAAKE,UAChB,CACA,YAAI0B,GACA,OAAO5B,KAAK+B,UAAUH,QAC1B,CACA,QAAIrB,GACA,OAAOP,KAAK+B,UAAUxB,IAC1B,CACA,QAAIA,CAAK0C,GACLjD,KAAK+B,UAAUxB,KAAO0C,CAC1B,CACA,SAAIC,GACA,OAAOlD,KAAK+B,UAAUmB,KAC1B,CACA,SAAIC,GACA,OAAOnD,KAAK+B,UAAUoB,KAC1B,CACA,SAAID,CAAME,GACNpD,KAAK+B,UAAUmB,MAAQE,CAC3B,CACA,aAAItB,GACA,OAAO9B,KAAK+B,UAAUD,SAC1B,CACAa,cAAAA,CAAeU,GAOX,OANIrD,KAAKE,WACLF,KAAKG,aAAeH,KAAK+B,UAAUY,eAAeU,GAGlDrD,KAAK0C,gBAAkBW,EAEpB,IAAMrD,KAAKC,MACtB,CACAqD,IAAAA,GACItD,KAAK+B,UAAUuB,MACnB,CACAC,KAAAA,GACIvD,KAAK+B,UAAUwB,OACnB,CACAC,QAAAA,GACIxD,KAAK+B,UAAUyB,UACnB,CACAnD,MAAAA,GACIL,KAAK+B,UAAU1B,QACnB"}
1
+ {"version":3,"file":"AsyncMotionValueAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs"],"sourcesContent":["import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions);\n const element = resolvedOptions.motionValue?.owner?.current;\n let animation;\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n });\n }\n catch {\n animation = new JSAnimation(resolvedOptions);\n }\n }\n else {\n animation = new JSAnimation(resolvedOptions);\n }\n animation.finished.then(() => {\n this.notifyFinished();\n }).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n"],"names":["AsyncMotionValueAnimation","WithPromise","constructor","_ref","autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element","options","super","this","stop","_animation","stopTimeline","keyframeResolver","cancel","createdAt","time","now","optionsWithDefaults","KeyframeResolver","resolvedKeyframes","finalKeyframe","forced","onKeyframesResolved","scheduleResolve","sync","undefined","velocity","isHandoff","onUpdate","resolvedAt","canAnimateValue","canAnimate","MotionGlobalConfig","instantAnimations","getFinalKeyframe","length","makeAnimationInstant","resolvedOptions","startTime","useWaapi","supportsBrowserAnimation","owner","current","animation","NativeAnimationExtended","JSAnimation","finished","then","notifyFinished","catch","noop","pendingTimeline","attachTimeline","_finished","onResolve","_onReject","finally","resume","flushKeyframeResolvers","duration","iterationDuration","newTime","speed","state","newSpeed","timeline","play","pause","complete"],"mappings":"0kBAoCM,MAAOA,UACDC,EAAAA,YAeRC,WAAAA,CAAAC,GAY2B,IAZfC,SACRA,GAAW,EAAIC,MACfA,EAAQ,EAACC,KACTA,EAAO,YAAWC,OAClBA,EAAS,EAACC,YACVA,EAAc,EAACC,WACfA,EAAa,OAAMC,UACnBA,EAASC,KACTA,EAAIC,YACJA,EAAWC,QACXA,KACGC,GACoBX,EACvBY,QA8NJC,KAAAC,KAAO,KACCD,KAAKE,aACLF,KAAKE,WAAWD,OAChBD,KAAKG,kBAGTH,KAAKI,kBAAkBC,QAAQ,EAl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js.js"),e=require("../utils/mix/index.mjs.js"),i=require("./drivers/driver-frameloop.mjs.js"),s=require("./generators/inertia.mjs.js"),r=require("./generators/keyframes.mjs.js"),n=require("./generators/utils/calc-duration.mjs.js"),a=require("./keyframes/get-final.mjs.js"),o=require("./utils/replace-transition-type.mjs.js"),h=require("./utils/WithPromise.mjs.js"),l=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/pipe.mjs.js"),u=require("../../../../motion-utils/dist/es/clamp.mjs.js"),d=require("../../../../motion-utils/dist/es/time-conversion.mjs.js");const p=t=>t/100;class c extends h.WithPromise{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;if(e&&e.updatedAt!==t.time.now()&&this.tick(t.time.now()),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:i}=this.options;i&&i()},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:t}=this;o.replaceTransitionType(t);const{type:i=r.keyframes,repeat:s=0,repeatDelay:a=0,repeatType:h,velocity:u=0}=t;let{keyframes:d}=t;const c=i||r.keyframes;"production"!==process.env.NODE_ENV&&c!==r.keyframes&&l.invariant(d.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${d}`),c!==r.keyframes&&"number"!=typeof d[0]&&(this.mixKeyframes=m.pipe(p,e.mix(d[0],d[1])),d=[0,100]);const T=c({...t,keyframes:d});"mirror"===h&&(this.mirroredGenerator=c({...t,keyframes:[...d].reverse(),velocity:-u})),null===T.calculatedDuration&&(T.calculatedDuration=n.calcGeneratorDuration(T));const{calculatedDuration:y}=T;this.calculatedDuration=y,this.resolvedDuration=y+a,this.totalDuration=this.resolvedDuration*(s+1)-a,this.generator=T}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{generator:i,totalDuration:r,mixKeyframes:n,mirroredGenerator:o,resolvedDuration:h,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:m=0,keyframes:d,repeat:p,repeatType:c,repeatDelay:T,type:y,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const j=this.currentTime-m*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?j<0:j>r;this.currentTime=Math.max(j,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let D=this.currentTime,S=i;if(p){const t=Math.min(this.currentTime,r)/h;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,p+1);Boolean(e%2)&&("reverse"===c?(i=1-i,T&&(i-=T/h)):"mirror"===c&&(S=o)),D=u.clamp(0,1,i)*h}const g=k?{done:!1,value:d[0]}:S.next(D);n&&(g.value=n(g.value));let{done:b}=g;k||null===l||(b=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const q=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return q&&y!==s.inertia&&(g.value=a.getFinalKeyframe(d,this.options,v,this.speed)),f&&f(g.value),q&&this.finish(),g}then(t,e){return this.finished.then(t,e)}get duration(){return d.millisecondsToSeconds(this.calculatedDuration)}get time(){return d.millisecondsToSeconds(this.currentTime)}set time(t){t=d.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(t.time.now());const i=this.playbackSpeed!==e;this.playbackSpeed=e,i&&(this.time=d.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=i.frameloopDriver,onPlay:e,startTime:s}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(t.time.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown()}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),t.observe(this)}}exports.JSAnimation=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../frameloop/sync-time.mjs.js"),e=require("../utils/mix/index.mjs.js"),i=require("./drivers/frame.mjs.js"),s=require("./generators/inertia.mjs.js"),r=require("./generators/keyframes.mjs.js"),n=require("./generators/utils/calc-duration.mjs.js"),a=require("./generators/utils/velocity.mjs.js"),o=require("./keyframes/get-final.mjs.js"),h=require("./utils/replace-transition-type.mjs.js"),l=require("./utils/WithPromise.mjs.js"),m=require("../../../../motion-utils/dist/es/errors.mjs.js"),d=require("../../../../motion-utils/dist/es/pipe.mjs.js"),u=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),c=require("../../../../motion-utils/dist/es/clamp.mjs.js");const p=t=>t/100;class T extends l.WithPromise{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==t.time.now()&&this.tick(t.time.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:t}=this;h.replaceTransitionType(t);const{type:i=r.keyframes,repeat:s=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const c=i||r.keyframes;"production"!==process.env.NODE_ENV&&c!==r.keyframes&&m.invariant(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),c!==r.keyframes&&"number"!=typeof u[0]&&(this.mixKeyframes=d.pipe(p,e.mix(u[0],u[1])),u=[0,100]);const T=c({...t,keyframes:u});"mirror"===o&&(this.mirroredGenerator=c({...t,keyframes:[...u].reverse(),velocity:-l})),null===T.calculatedDuration&&(T.calculatedDuration=n.calcGeneratorDuration(T));const{calculatedDuration:y}=T;this.calculatedDuration=y,this.resolvedDuration=y+a,this.totalDuration=this.resolvedDuration*(s+1)-a,this.generator=T}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{generator:i,totalDuration:r,mixKeyframes:n,mirroredGenerator:a,resolvedDuration:h,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:m=0,keyframes:d,repeat:u,repeatType:p,repeatDelay:T,type:y,onUpdate:v,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const j=this.currentTime-m*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?j<0:j>r;this.currentTime=Math.max(j,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let g,S=this.currentTime,D=i;if(u){const t=Math.min(this.currentTime,r)/h;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===p?(i=1-i,T&&(i-=T/h)):"mirror"===p&&(D=a)),S=c.clamp(0,1,i)*h}k?(this.delayState.value=d[0],g=this.delayState):g=D.next(S),n&&!k&&(g.value=n(g.value));let{done:q}=g;k||null===l||(q=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&q);return w&&y!==s.inertia&&(g.value=o.getFinalKeyframe(d,this.options,f,this.speed)),v&&v(g.value),w&&this.finish(),g}then(t,e){return this.finished.then(t,e)}get duration(){return u.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+u.millisecondsToSeconds(t)}get time(){return u.millisecondsToSeconds(this.currentTime)}set time(t){t=u.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const e=this.generator.next(t).value;return a.getGeneratorVelocity((t=>this.generator.next(t).value),t,e)}get speed(){return this.playbackSpeed}set speed(e){const i=this.playbackSpeed!==e;i&&this.driver&&this.updateTime(t.time.now()),this.playbackSpeed=e,i&&this.driver&&(this.time=u.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=i.frameloopDriver,startTime:e}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),this.options.onPlay?.();const s=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=s):null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime||(this.startTime=e??s),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(t.time.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}exports.JSAnimation=T;
2
2
  //# sourceMappingURL=JSAnimation.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mixKeyframes) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n this.updateTime(time.now());\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n }\n teardown() {\n this.notifyFinished();\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","arguments","undefined","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","done","value","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","newTime","secondsToMilliseconds","driver","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","start","complete","onComplete","cancel","notifyFinished","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"8sBAYA,MAAMA,EAAqBC,GAAYA,EAAU,IACjD,MAAMC,UAAoBC,EAAAA,YACtBC,WAAAA,CAAYC,GACRC,QACAC,KAAKC,MAAQ,OACbD,KAAKE,UAAY,KACjBF,KAAKG,WAAY,EAIjBH,KAAKI,YAAc,EAInBJ,KAAKK,SAAW,KAIhBL,KAAKM,cAAgB,EAKrBN,KAAKO,KAAO,KACR,MAAMC,YAAEA,GAAgBR,KAAKF,QAK7B,GAJIU,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9CX,KAAKY,KAAKF,OAAKC,OAEnBX,KAAKG,WAAY,EACE,SAAfH,KAAKC,MACL,OACJD,KAAKa,WACL,MAAMC,OAAEA,GAAWd,KAAKF,QACxBgB,GAAUA,GAAQ,EAGtBd,KAAKF,QAAUA,EACfE,KAAKe,gBACLf,KAAKgB,QACoB,IAArBlB,EAAQmB,UACRjB,KAAKkB,OACb,CACAH,aAAAA,GACI,MAAMjB,QAAEA,GAAYE,KACpBmB,EAAqBA,sBAACrB,GACtB,MAAMsB,KAAEA,EAAOC,EAASA,UAAAC,OAAEA,EAAS,EAACC,YAAEA,EAAc,EAACC,WAAEA,EAAUC,SAAEA,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,aAAfX,KAAKC,OACLD,KAAKuF,iBACLvF,KAAKE,UAAYS,GAEM,OAAlBX,KAAKK,SACVL,KAAKE,UAAYS,EAAMX,KAAKK,SAEtBL,KAAKE,YACXF,KAAKE,UAAYA,GAAaS,GAEf,aAAfX,KAAKC,OAAwBD,KAAKuD,MAAQ,IAC1CvD,KAAKE,WAAaF,KAAKuC,oBAE3BvC,KAAKK,SAAW,KAKhBL,KAAKC,MAAQ,UACbD,KAAKkF,OAAOM,OAChB,CACAtE,KAAAA,GACIlB,KAAKC,MAAQ,SACbD,KAAK2C,WAAWjC,OAAKC,OACrBX,KAAKK,SAAWL,KAAKI,WACzB,CACAqF,QAAAA,GACuB,YAAfzF,KAAKC,OACLD,KAAKgB,OAEThB,KAAKC,MAAQ,WACbD,KAAKK,SAAW,IACpB,CACAoE,MAAAA,GACIzE,KAAKa,WACLb,KAAKC,MAAQ,WACb,MAAMyF,WAAEA,GAAe1F,KAAKF,QAC5B4F,GAAcA,GAClB,CACAC,MAAAA,GACI3F,KAAKK,SAAW,KAChBL,KAAKE,UAAY,EACjBF,KAAKY,KAAK,GACVZ,KAAKa,UACT,CACAA,QAAAA,GACIb,KAAK4F,iBACL5F,KAAKC,MAAQ,OACbD,KAAK6F,aACL7F,KAAKE,UAAYF,KAAKK,SAAW,IAErC,CACAwF,UAAAA,GACS7F,KAAKkF,SAEVlF,KAAKkF,OAAO3E,OACZP,KAAKkF,YAAShC,EAClB,CACAF,MAAAA,CAAO8C,GAEH,OADA9F,KAAKE,UAAY,EACVF,KAAKY,KAAKkF,GAAY,EACjC,CACAC,cAAAA,CAAeC,GAMX,OALIhG,KAAKF,QAAQmG,eACbjG,KAAKF,QAAQsB,KAAO,YACpBpB,KAAKF,QAAQoG,KAAO,SACpBlG,KAAKe,iBAEFiF,EAASG,QAAQnG,KAC5B"}
1
+ {"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","delayState","done","value","undefined","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","keyframesGenerator","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","arguments","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","iterationDuration","newTime","secondsToMilliseconds","driver","start","getGeneratorVelocity","t","current","s","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","complete","notifyFinished","onComplete","cancel","onCancel","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"mvBA6BA,MAAMA,EAAqBC,GAAoBA,EAAU,IAEnD,MAAOC,UACDC,EAAAA,YA2DRC,WAAAA,CAAYC,GACRC,QAzDJC,KAAAC,MAA4B,OAE5BD,KAAAE,UAA2B,KAQnBF,KAAAG,WAAY,EAeZH,KAAAI,YAAsB,EAKtBJ,KAAAK,SAA0B,KAK1BL,KAAAM,cAAgB,EAgBhBN,KAAAO,WAAgC,CACpCC,MAAM,EACNC,WAAOC,GA+YXV,KAAAW,KAAO,KACH,MAAMC,YAAEA,GAAgBZ,KAAKF,QACzBc,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9Cf,KAAKgB,KAAKF,OAAKC,OAGnBf,KAAKG,WAAY,EACE,SAAfH,KAAKC,QACTD,KAAKiB,WACLjB,KAAKF,QAAQoB,WAAU,EAjZvBlB,KAAKF,QAAUA,EACfE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,OAAKC,OACrBf,KAAKK,SAAWL,KAAKI,WACzB,CAkBA4F,QAAAA,GACuB,YAAfhG,KAAKC,OACLD,KAAKoB,OAGTpB,KAAKC,MAAQ,WACbD,KAAKK,SAAW,IACpB,CAEAsE,MAAAA,GACI3E,KAAKiG,iBACLjG,KAAKiB,WACLjB,KAAKC,MAAQ,WAEbD,KAAKF,QAAQoG,cACjB,CAEAC,MAAAA,GACInG,KAAKK,SAAW,KAChBL,KAAKE,UAAY,EACjBF,KAAKgB,KAAK,GACVhB,KAAKiB,WACLjB,KAAKF,QAAQsG,YACjB,CAEQnF,QAAAA,GACJjB,KAAKC,MAAQ,OACbD,KAAKqG,aACLrG,KAAKE,UAAYF,KAAKK,SAAW,IAErC,CAEQgG,UAAAA,GACCrG,KAAKqF,SACVrF,KAAKqF,OAAO1E,OACZX,KAAKqF,YAAS3E,EAClB,CAEA2C,MAAAA,CAAOiD,GAEH,OADAtG,KAAKE,UAAY,EACVF,KAAKgB,KAAKsF,GAAY,EACjC,CAEAC,cAAAA,CAAeC,GAQX,OAPIxG,KAAKF,QAAQ2G,eACbzG,KAAKF,QAAQ0B,KAAO,YACpBxB,KAAKF,QAAQ4G,KAAO,SACpB1G,KAAKmB,iBAGTnB,KAAKqF,QAAQ1E,OACN6F,EAASG,QAAQ3G,KAC5B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const d=a.applyGeneratorOptions(t);this.animation=n.startWaapiAnimation(s,m,r,d,l),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const t=e.getFinalKeyframe(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(t):i.setStyle(s,m,t),this.animation.cancel()}p?.(),this.notifyFinished()},this.animation.oncancel=()=>this.notifyFinished()}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(i){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;"idle"!==i&&"finished"!==i&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return m.millisecondsToSeconds(Number(i))}get time(){return m.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(i){this.finishedTime=null,this.animation.currentTime=m.secondsToMilliseconds(i)}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(i){this.animation.startTime=i}attachTimeline(i){let{timeline:e,observe:s}=i;return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&t.supportsScrollTimeline()?(this.animation.timeline=e,r.noop):s(this)}}exports.NativeAnimation=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const d=a.applyGeneratorOptions(t);this.animation=n.startWaapiAnimation(s,m,r,d,l),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const t=e.getFinalKeyframe(r,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(t),i.setStyle(s,m,t),this.animation.cancel()}p?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(i){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;"idle"!==i&&"finished"!==i&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const i=this.options?.element;!this.isPseudoElement&&i?.isConnected&&this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return m.millisecondsToSeconds(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+m.millisecondsToSeconds(i)}get time(){return m.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(i){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m.secondsToMilliseconds(i),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline(i){let{timeline:e,rangeStart:s,rangeEnd:n,observe:a}=i;return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&t.supportsScrollTimeline()?(this.animation.timeline=e,s&&(this.animation.rangeStart=s),n&&(this.animation.rangeEnd=n),r.noop):a(this)}}exports.NativeAnimation=l;
2
2
  //# sourceMappingURL=NativeAnimation.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n else {\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n */\n setStyle(element, name, keyframe);\n }\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n /**\n * TODO: In a breaking change, we should replace this with `.notifyCancel()`\n */\n this.animation.oncancel = () => this.notifyFinished();\n }\n play() {\n if (this.isStopped)\n return;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n if (!this.isPseudoElement) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, observe }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","oncancel","play","state","updateFinished","complete","finish","e","stop","commitStyles","duration","effect","getComputedTiming","millisecondsToSeconds","Number","currentTime","newTime","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","_ref","timeline","observe","updateTiming","easing","supportsScrollTimeline","noop"],"mappings":"2hBAWA,MAAMA,UAAwBC,EAAAA,YAC1BC,WAAAA,CAAYC,GAIR,GAHAC,QACAC,KAAKC,aAAe,KACpBD,KAAKE,WAAY,GACZJ,EACD,OACJ,MAAMK,QAAEA,EAAOC,KAAEA,EAAIC,UAAEA,EAASC,cAAEA,EAAaC,aAAEA,GAAe,EAAKC,cAAEA,EAAaC,WAAEA,GAAgBX,EACtGE,KAAKU,gBAAkBC,QAAQL,GAC/BN,KAAKO,aAAeA,EACpBP,KAAKF,QAAUA,EACfc,EAASA,UAAyB,iBAAjBd,EAAQe,KAAmB,qGAC5C,MAAMC,EAAaC,wBAAsBjB,GACzCE,KAAKgB,UAAY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AAqBA,sBAACD,EACvD,CAKA,SAAIpB,GACA,OAAOxB,KAAKgB,UAAU8B,YAC1B,CACA,SAAItB,CAAMuB,GAEFA,EAAW,IACX/C,KAAKC,aAAe,MACxBD,KAAKgB,UAAU8B,aAAeC,CAClC,CACA,SAAIhB,GACA,OAA6B,OAAtB/B,KAAKC,aACN,WACAD,KAAKgB,UAAUgC,SACzB,CACA,aAAIC,GACA,OAAOP,OAAO1C,KAAKgB,UAAUiC,UACjC,CACA,aAAIA,CAAUC,GACVlD,KAAKgB,UAAUiC,UAAYC,CAC/B,CAIAC,cAAAA,CAAcC,GAAwB,IAAvBC,SAAEA,EAAQC,QAAEA,GAASF,EAKhC,OAJIpD,KAAKO,cACLP,KAAKgB,UAAUuB,QAAQgB,aAAa,CAAEC,OAAQ,WAElDxD,KAAKgB,UAAUI,SAAW,KACtBiC,GAAYI,EAAAA,0BACZzD,KAAKgB,UAAUqC,SAAWA,EACnBK,QAGAJ,EAAQtD,KAEvB"}
1
+ {"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","manualStartTime","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","play","state","updateFinished","complete","finish","e","stop","commitStyles","isConnected","duration","effect","getComputedTiming","millisecondsToSeconds","Number","iterationDuration","delay","currentTime","newTime","wasFinished","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","_ref","timeline","rangeStart","rangeEnd","observe","updateTiming","easing","supportsScrollTimeline","noop"],"mappings":"2hBA4BM,MAAOA,UACDC,EAAAA,YAyBRC,WAAAA,CAAYC,GAGR,GAFAC,QAlBMC,KAAAC,aAA8B,KAMhCD,KAAAE,WAAY,EASVF,KAAAG,gBAAiC,MAKlCL,EAAS,OAEd,MAAMM,QACFA,EAAOC,KACPA,EAAIC,UACJA,EAASC,cACTA,EAAaC,aACbA,GAAe,EAAKC,cACpBA,EAAaC,WACbA,GACAZ,EAEJE,KAAKW,gBAAkBC,QAAQL,GAE/BP,KAAKQ,aAAeA,EACpBR,KAAKF,QAAUA,EAEfe,EAASA,UACmB,iBAAjBf,EAAQgB,KACf,sDACA,eAGJ,MAAMC,EAAaC,wBAAsBlB,GAEzCE,KAAKiB,UAAYC,EAAAA,oBACbd,EACAC,EACAC,EACAS,EACAR,IAGwB,IAAxBQ,EAAWI,UACXnB,KAAKiB,UAAUG,QAGnBpB,KAAKiB,UAAUI,SAAW,KAGtB,GAFArB,KAAKC,aAAeD,KAAKsB,MAEpBf,EAAe,CAChB,MAAMgB,EAAWC,EAAgBA,iBAC7BlB,EACAN,KAAKF,QACLW,EACAT,KAAKyB,OAELzB,KAAK0B,mBACL1B,KAAK0B,kBAAkBH,GAU3BI,EAAAA,SAASvB,EAASC,EAAMkB,GAExBvB,KAAKiB,UAAUW,QACnB,CAEAlB,MACAV,KAAK6B,gBAAgB,CAE7B,CAIAC,IAAAA,GACQ9B,KAAKE,YAETF,KAAKG,gBAAkB,KACvBH,KAAKiB,UAAUa,OAEI,aAAf9B,KAAK+B,OACL/B,KAAKgC,iBAEb,CAEAZ,KAAAA,GACIpB,KAA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AAKiB,UAAUoC,UACzD,CAEA,aAAIA,CAAUC,GACVtD,KAAKG,gBAAkBH,KAAKiB,UAAUoC,UAAYC,CACtD,CAKAC,cAAAA,CAAcC,GAKS,IALRC,SACXA,EAAQC,WACRA,EAAUC,SACVA,EAAQC,QACRA,GACmBJ,EAOnB,OANIxD,KAAKQ,cACLR,KAAKiB,UAAUuB,QAAQqB,aAAa,CAAEC,OAAQ,WAGlD9D,KAAKiB,UAAUI,SAAW,KAEtBoC,GAAYM,EAAAA,0BACZ/D,KAAKiB,UAAUwC,SAAWA,EAEtBC,IAAa1D,KAAKiB,UAAkByC,WAAaA,GACjDC,IAAW3D,KAAKiB,UAAkB0C,SAAWA,GAE1CK,QAEAJ,EAAQ5D,KAEvB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./JSAnimation.mjs.js"),t=require("./NativeAnimation.mjs.js"),i=require("./utils/replace-transition-type.mjs.js"),s=require("./waapi/utils/unsupported-easing.mjs.js"),n=require("../../../../motion-utils/dist/es/time-conversion.mjs.js");class o extends t.NativeAnimation{constructor(e){s.replaceStringEasing(e),i.replaceTransitionType(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(t){const{motionValue:i,onUpdate:s,onComplete:o,element:r,...a}=this.options;if(!i)return;if(void 0!==t)return void i.set(t);const u=new e.JSAnimation({...a,autoplay:!1}),m=n.secondsToMilliseconds(this.finishedTime??this.time);i.setWithVelocity(u.sample(m-10).value,u.sample(m).value,10),u.stop()}}exports.NativeAnimationExtended=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),t=require("../render/dom/style-set.mjs.js"),i=require("./JSAnimation.mjs.js"),s=require("./NativeAnimation.mjs.js"),a=require("./utils/replace-transition-type.mjs.js"),o=require("./waapi/utils/unsupported-easing.mjs.js"),r=require("../../../../motion-utils/dist/es/clamp.mjs.js");class n extends s.NativeAnimation{constructor(e){o.replaceStringEasing(e),a.replaceTransitionType(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(s){const{motionValue:a,onUpdate:o,onComplete:n,element:m,...p}=this.options;if(!a)return;if(void 0!==s)return void a.set(s);const u=new i.JSAnimation({...p,autoplay:!1}),l=Math.max(10,e.time.now()-this.startTime),j=r.clamp(0,10,l-10),c=u.sample(l).value,{name:d}=this.options;m&&d&&t.setStyle(m,d,c),a.setWithVelocity(u.sample(Math.max(0,l-j)).value,c,j),u.stop()}}exports.NativeAnimationExtended=n;
2
2
  //# sourceMappingURL=NativeAnimationExtended.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAnimationExtended.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs"],"sourcesContent":["import { secondsToMilliseconds } from 'motion-utils';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n if (options.startTime) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n const sampleTime = secondsToMilliseconds(this.finishedTime ?? this.time);\n motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n"],"names":["NativeAnimationExtended","NativeAnimation","constructor","options","replaceStringEasing","replaceTransitionType","super","startTime","this","updateMotionValue","value","motionValue","onUpdate","onComplete","element","undefined","set","sampleAnimation","JSAnimation","autoplay","sampleTime","secondsToMilliseconds","finishedTime","time","setWithVelocity","sample","stop"],"mappings":"8TAYA,MAAMA,UAAgCC,EAAAA,gBAClCC,WAAAA,CAAYC,GAURC,EAAmBA,oBAACD,GAQpBE,EAAqBA,sBAACF,GACtBG,MAAMH,GACFA,EAAQI,YACRC,KAAKD,UAAYJ,EAAQI,WAE7BC,KAAKL,QAAUA,CACnB,CASAM,iBAAAA,CAAkBC,GACd,MAAMC,YAAEA,EAAWC,SAAEA,EAAQC,WAAEA,EAAUC,QAAEA,KAAYX,GAAYK,KAAKL,QACxE,IAAKQ,EACD,OACJ,QAAcI,IAAVL,EAEA,YADAC,EAAYK,IAAIN,GAGpB,MAAMO,EAAkB,IAAIC,cAAY,IACjCf,EACHgB,UAAU,IAERC,EAAaC,EAAAA,sBAAsBb,KAAKc,cAAgBd,KAAKe,MACnEZ,EAAYa,gBAAgBP,EAAgBQ,OAAOL,EAhDvC,IAgDiEV,MAAOO,EAAgBQ,OAAOL,GAAYV,MAhD3G,IAiDZO,EAAgBS,MACpB"}
1
+ {"version":3,"file":"NativeAnimationExtended.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs"],"sourcesContent":["import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n"],"names":["NativeAnimationExtended","NativeAnimation","constructor","options","replaceStringEasing","replaceTransitionType","super","undefined","startTime","autoplay","this","updateMotionValue","value","motionValue","onUpdate","onComplete","element","set","sampleAnimation","JSAnimation","sampleTime","Math","max","time","now","delta","clamp","current","sample","name","setStyle","setWithVelocity","stop"],"mappings":"2YAmBM,MAAOA,UAEHC,EAAAA,gBAGNC,WAAAA,CAAYC,GAURC,EAAmBA,oBAACD,GASpBE,EAAqBA,sBAACF,GAEtBG,MAAMH,QAOoBI,IAAtBJ,EAAQK,YAAgD,IAArBL,EAAQM,WAC3CC,KAAKF,UAAYL,EAAQK,WAG7BE,KAAKP,QAAUA,CACnB,CAUAQ,iBAAAA,CAAkBC,GACd,MAAMC,YAAEA,EAAWC,SAAEA,EAAQC,WAAEA,EAAUC,QAAEA,KAAYb,GACnDO,KAAKP,QAET,IAAKU,EAAa,OAElB,QAAcN,IAAVK,EAEA,YADAC,EAAYI,IAAIL,GAIpB,MAAMM,EAAkB,IAAIC,cAAY,IACjChB,EACHM,UAAU,IAQRW,EAAaC,KAAKC,IAvEZ,GAuE6BC,EAAIA,KAACC,MAAQd,KAAKF,WACrDiB,EAAQC,EAAAA,MAAM,EAxER,GAwEwBN,EAxExB,IAyENO,EAAUT,EAAgBU,OAAOR,GAAYR,OAO7CiB,KAAEA,GAASnB,KAAKP,QAClBa,GAAWa,GAAMC,EAAAA,SAASd,EAASa,EAAMF,GAE7Cd,EAAYkB,gBACRb,EAAgBU,OAAOP,KAAKC,IAAI,EAAGF,EAAaK,IAAQb,MACxDe,EACAF,GAGJP,EAAgBc,MACpB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../interfaces/motion-value.mjs.js"),i=require("../../value/index.mjs.js"),t=require("../../value/utils/is-motion-value.mjs.js");exports.animateSingleValue=function(a,n,o){const s=t.isMotionValue(a)?a:i.motionValue(a);return s.start(e.animateMotionValue("",s,n,o)),s.animation};
2
+ //# sourceMappingURL=single-value.mjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-value.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/animate/single-value.mjs"],"sourcesContent":["import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n"],"names":["animateSingleValue","value","keyframes","options","motionValue","isMotionValue","start","animateMotionValue","motionValue$1","animation"],"mappings":"8OAagBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAcC,EAAAA,cAAcJ,GAASA,EAAQG,EAAAA,YAAkBH,GAIrE,OAFAG,EAAYE,MAAMC,qBAAmB,GAAIC,EAAaN,EAAWC,IAE1DC,EAAYK,SACvB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../frameloop/sync-time.mjs.js"),r=require("../../frameloop/frame.mjs.js");exports.frameloopDriver=t=>{const a=e=>{let{timestamp:r}=e;return t(r)};return{start:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.frame.update(a,e)},stop:()=>r.cancelFrame(a),now:()=>r.frameData.isProcessing?r.frameData.timestamp:e.time.now()}};
2
+ //# sourceMappingURL=frame.mjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/drivers/frame.mjs"],"sourcesContent":["import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n"],"names":["update","passTimestamp","_ref","timestamp","start","keepAlive","arguments","length","undefined","frame","stop","cancelFrame","now","frameData","isProcessing","time"],"mappings":"wLAKwCA,IACpC,MAAMC,EAAgBC,IAAA,IAACC,UAAEA,GAAsBD,EAAA,OAAKF,EAAOG,EAAU,EAErE,MAAO,CACHC,MAAO,WAAA,IAACC,IAASC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAAO,OAAKG,QAAMT,OAAOC,EAAeI,EAAU,EACnEK,KAAMA,IAAMC,EAAWA,YAACV,GAKxBW,IAAKA,IAAOC,EAAAA,UAAUC,aAAeD,EAASA,UAACV,UAAYY,EAAIA,KAACH,MACnE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring/index.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function(s){let{keyframes:a,velocity:n=0,power:o=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:v,max:c,restDelta:d=.5,restSpeed:p}=s;const m=a[0],f={done:!1,value:m},y=e=>void 0===v?c:void 0===c||Math.abs(v-e)<Math.abs(c-e)?v:c;let x=o*n;const b=m+x,g=void 0===u?b:u(b);g!==b&&(x=g-m);const j=e=>-x*Math.exp(-e/i),M=e=>g+j(e),h=e=>{const t=j(e),s=M(e);f.done=Math.abs(t)<=d,f.value=f.done?g:s};let D,S;const k=s=>{var a;(a=f.value,void 0!==v&&a<v||void 0!==c&&a>c)&&(D=s,S=e.spring({keyframes:[f.value,y(f.value)],velocity:t.calcGeneratorVelocity(M,s,f.value),damping:r,stiffness:l,restDelta:d,restSpeed:p}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return S||void 0!==D||(t=!0,h(e),k(e)),void 0!==D&&e>=D?S.next(e-D):(!t&&h(e),f)}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function(s){let{keyframes:o,velocity:a=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:v,max:d,restDelta:c=.5,restSpeed:p}=s;const m=o[0],f={done:!1,value:m},y=e=>void 0===v?d:void 0===d||Math.abs(v-e)<Math.abs(d-e)?v:d;let b=n*a;const g=m+b,x=void 0===u?g:u(g);x!==g&&(b=x-m);const j=e=>-b*Math.exp(-e/i),M=e=>x+j(e),h=e=>{const t=j(e),s=M(e);f.done=Math.abs(t)<=c,f.value=f.done?x:s};let D,S;const k=s=>{var o;(o=f.value,void 0!==v&&o<v||void 0!==d&&o>d)&&(D=s,S=e.spring({keyframes:[f.value,y(f.value)],velocity:t.getGeneratorVelocity(M,s,f.value),damping:r,stiffness:l,restDelta:c,restSpeed:p}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return S||void 0!==D||(t=!0,h(e),k(e)),void 0!==D&&e>=D?S.next(e-D):(!t&&h(e),f)}}};
2
2
  //# sourceMappingURL=inertia.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n"],"names":["_ref","keyframes","velocity","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","min","max","restDelta","restSpeed","origin","state","done","value","nearestBoundary","v","undefined","Math","abs","amplitude","ideal","target","calcDelta","t","exp","calcLatest","applyFriction","delta","latest","timeReachedBoundary","spring$1","checkCatchBoundary","spring","calcGeneratorVelocity","damping","stiffness","calculatedDuration","next","hasUpdatedFrame"],"mappings":"gKAGA,SAAgBA,GAAiK,IAAhKC,UAAEA,EAAWC,SAAAA,EAAW,EAAGC,MAAEA,EAAQ,GAAGC,aAAEA,EAAe,IAAGC,cAAEA,EAAgB,GAAEC,gBAAEA,EAAkB,IAAGC,aAAEA,EAAYC,IAAEA,EAAGC,IAAEA,EAAGC,UAAEA,EAAY,GAAGC,UAAEA,GAAYX,EAC3K,MAAMY,EAASX,EAAU,GACnBY,EAAQ,CACVC,MAAM,EACNC,MAAOH,GAGLI,EAAmBC,QACTC,IAARV,EACOC,OACCS,IAART,GAEGU,KAAKC,IAAIZ,EAAMS,GAAKE,KAAKC,IAAIX,EAAMQ,GAD/BT,EAC0CC,EAEzD,IAAIY,EAAYlB,EAAQD,EACxB,MAAMoB,EAAQV,EAASS,EACjBE,OAA0BL,IAAjBX,EAA6Be,EAAQf,EAAae,GAK7DC,IAAWD,IACXD,EAAYE,EAASX,GACzB,MAAMY,EAAaC,IAAOJ,EAAYF,KAAKO,KAAKD,EAAIrB,GAC9CuB,EAAcF,GAAMF,EAASC,EAAUC,GACvCG,EAAiBH,IACnB,MAAMI,EAAQL,EAAUC,GAClBK,EAASH,EAAWF,GAC1BZ,EAAMC,KAAOK,KAAKC,IAAIS,IAAUnB,EAChCG,EAAME,MAAQF,EAAMC,KAAOS,EAASO,CAAM,EAQ9C,IAAIC,EACAC,EACJ,MAAMC,EAAsBR,IAjCLR,SAkCAJ,EAAME,WAlCSG,IAARV,GAAqBS,EAAIT,QAAiBU,IAART,GAAqBQ,EAAIR,KAoCrFsB,EAAsBN,EACtBO,EAAWE,EAAAA,OAAO,CACdjC,UAAW,CAACY,EAAME,MAAOC,EAAgBH,EAAME,QAC/Cb,SAAUiC,EAAAA,sBAAsBR,EAAYF,EAAGZ,EAAME,OACrDqB,QAAS/B,EACTgC,UAAW/B,EACXI,YACAC,cACF,EAGN,OADAsB,EAAmB,GACZ,CACHK,mBAAoB,KACpBC,KAAOd,IAOH,IAAIe,GAAkB,EAUtB,OATKR,QAAoCd,IAAxBa,IACbS,GAAkB,EAClBZ,EAAcH,GACdQ,EAAmBR,SAMKP,IAAxBa,GAAqCN,GAAKM,EACnCC,EAASO,KAAKd,EAAIM,KAGxBS,GAAmBZ,EAAcH,GAC3BZ,EACX,EAGZ"}
1
+ {"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n"],"names":["_ref","keyframes","velocity","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","min","max","restDelta","restSpeed","origin","state","done","value","nearestBoundary","v","undefined","Math","abs","amplitude","ideal","target","calcDelta","t","exp","calcLatest","applyFriction","delta","latest","timeReachedBoundary","spring","checkCatchBoundary","getGeneratorVelocity","damping","stiffness","calculatedDuration","next","hasUpdatedFrame"],"mappings":"m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IAAxBa,IACXQ,GAAkB,EAClBX,EAAcH,GACdQ,EAAmBR,SAOKP,IAAxBa,GAAqCN,GAAKM,EACnCC,EAAQM,KAAKb,EAAIM,KAEvBQ,GAAmBX,EAAcH,GAC3BZ,EACX,EAGZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","_ref","duration","keyframes","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate","Array","isArray","calculatedDuration","next","t"],"mappings":"qbAKA,SAASA,EAAcC,EAAQC,GAC3B,OAAOD,EAAOE,KAAI,IAAMD,GAAUE,EAASA,YAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,2CACA,SAAkBC,GAA4E,IAA3EC,SAAEA,EAAW,IAAKC,UAAWC,EAAcC,MAAEA,EAAKC,KAAEA,EAAO,aAAcL,EAKxF,MAAMM,EAAkBC,gBAAcF,GAChCA,EAAKT,IAAIY,8BACTA,6BAA2BH,GAK3BI,EAAQ,CACVC,MAAM,EACNC,MAAOR,EAAe,IAKpBS,EAAgBC,EAAoBA,qBAG1CT,GAASA,EAAML,SAAWI,EAAeJ,OACnCK,EACAU,gBAAcX,GAAiBF,GAC/Bc,EAAoBC,EAAAA,YAAYJ,EAAeT,EAAgB,CACjEE,KAAMY,MAAMC,QAAQZ,GACdA,EACAb,EAAcU,EAAgBG,KAExC,MAAO,CACHa,mBAAoBlB,EACpBmB,KAAOC,IACHZ,EAAME,MAAQI,EAAkBM,GAChCZ,EAAMC,KAAOW,GAAKpB,EACXQ,GAGnB"}
1
+ {"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","_ref","duration","keyframes","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate","Array","isArray","calculatedDuration","next","t"],"mappings":"qbAgBM,SAAUA,EACZC,EACAC,GAEA,OAAOD,EAAOE,KAAI,IAAMD,GAAUE,EAASA,YAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,oDAEyBC,GAKE,IAL8BC,SACrDA,EAAW,IACXC,UAAWC,EAAcC,MACzBA,EAAKC,KACLA,EAAO,aACgBL,EAKvB,MAAMM,EAAkBC,gBAAcF,GAChCA,EAAKT,IAAIY,8BACTA,6BAA2BH,GAM3BI,EAA2B,CAC7BC,MAAM,EACNC,MAAOR,EAAe,IAMpBS,EAAgBC,EAAoBA,qBAGtCT,GAASA,EAAML,SAAWI,EAAeJ,OACnCK,EACAU,gBAAcX,GACpBF,GAGEc,EAAoBC,EAAAA,YAAeJ,EAAeT,EAAgB,CACpEE,KAAMY,MAAMC,QAAQZ,GACdA,EACAb,EAAcU,EAAgBG,KAGxC,MAAO,CACHa,mBAAoBlB,EACpBmB,KAAOC,IACHZ,EAAME,MAAQI,EAAkBM,GAChCZ,EAAMC,KAAOW,GAAKpB,EACXQ,GAGnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../waapi/utils/linear.mjs.js"),s=require("./utils/calc-duration.mjs.js"),e=require("./utils/create-generator-easing.mjs.js"),n=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js"),a=require("../../../../../motion-utils/dist/es/clamp.mjs.js"),o=require("../../../../../motion-utils/dist/es/errors.mjs.js");const i={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function r(t,s){return t*Math.sqrt(1-s*s)}const u=12;const l=.001;function c(t){let s,e,{duration:c=i.duration,bounce:d=i.bounce,velocity:m=i.velocity,mass:p=i.mass}=t;o.warning(c<=n.secondsToMilliseconds(i.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let h=1-d;h=a.clamp(i.minDamping,i.maxDamping,h),c=a.clamp(i.minDuration,i.maxDuration,n.millisecondsToSeconds(c)),h<1?(s=t=>{const s=t*h,e=s*c,n=s-m,a=r(t,h),o=Math.exp(-e);return l-n/a*o},e=t=>{const e=t*h*c,n=e*m+m,a=Math.pow(h,2)*Math.pow(t,2)*c,o=Math.exp(-e),i=r(Math.pow(t,2),h);return(-s(t)+l>0?-1:1)*((n-a)*o)/i}):(s=t=>Math.exp(-t*c)*((t-m)*c+1)-l,e=t=>Math.exp(-t*c)*(c*c*(m-t)));const M=function(t,s,e){let n=e;for(let e=1;e<u;e++)n-=t(n)/s(n);return n}(s,e,5/c);if(c=n.secondsToMilliseconds(c),isNaN(M))return{stiffness:i.stiffness,damping:i.damping,duration:c};{const t=Math.pow(M,2)*p;return{stiffness:t,damping:2*h*Math.sqrt(p*t),duration:c}}}const d=["duration","bounce"],m=["stiffness","damping","mass"];function p(t,s){return s.some((s=>void 0!==t[s]))}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.visualDuration,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.bounce;const u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:o}:e;let{restSpeed:l,restDelta:h}=u;const M=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],g={done:!1,value:M},{stiffness:v,damping:D,mass:x,duration:y,velocity:b,isResolvedFromDuration:j}=function(t){let s={velocity:i.velocity,stiffness:i.stiffness,damping:i.damping,mass:i.mass,isResolvedFromDuration:!1,...t};if(!p(t,m)&&p(t,d))if(s.velocity=0,t.visualDuration){const e=t.visualDuration,n=2*Math.PI/(1.2*e),o=n*n,r=2*a.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(o);s={...s,mass:i.mass,stiffness:o,damping:r}}else{const e=c({...t,velocity:0});s={...s,...e,mass:i.mass},s.isResolvedFromDuration=!0}return s}({...u,velocity:-n.millisecondsToSeconds(u.velocity||0)}),q=b||0,T=D/(2*Math.sqrt(v*x)),S=f-M,w=n.millisecondsToSeconds(Math.sqrt(v/x)),k=Math.abs(S)<5;let F,G,R,E,N,O;if(l||(l=k?i.restSpeed.granular:i.restSpeed.default),h||(h=k?i.restDelta.granular:i.restDelta.default),T<1)R=r(w,T),E=(q+T*w*S)/R,F=t=>{const s=Math.exp(-T*w*t);return f-s*(E*Math.sin(R*t)+S*Math.cos(R*t))},N=T*w*E+S*R,O=T*w*S-E*R,G=t=>Math.exp(-T*w*t)*(N*Math.sin(R*t)+O*Math.cos(R*t));else if(1===T){F=t=>f-Math.exp(-w*t)*(S+(q+w*S)*t);const t=q+w*S;G=s=>Math.exp(-w*s)*(w*t*s-q)}else{const t=w*Math.sqrt(T*T-1);F=s=>{const e=Math.exp(-T*w*s),n=Math.min(t*s,300);return f-e*((q+T*w*S)*Math.sinh(n)+t*S*Math.cosh(n))/t};const s=(q+T*w*S)/t,e=T*w*s-S*t,n=T*w*S-s*t;G=s=>{const a=Math.exp(-T*w*s),o=Math.min(t*s,300);return a*(e*Math.sinh(o)+n*Math.cosh(o))}}const P={calculatedDuration:j&&y||null,velocity:t=>n.secondsToMilliseconds(G(t)),next:t=>{if(!j&&T<1){const s=Math.exp(-T*w*t),e=Math.sin(R*t),a=Math.cos(R*t),o=f-s*(E*e+S*a),i=n.secondsToMilliseconds(s*(N*e+O*a));return g.done=Math.abs(i)<=l&&Math.abs(f-o)<=h,g.value=g.done?f:o,g}const s=F(t);if(j)g.done=t>=y;else{const e=n.secondsToMilliseconds(G(t));g.done=Math.abs(e)<=l&&Math.abs(f-s)<=h}return g.value=g.done?f:s,g},toString:()=>{const e=Math.min(s.calcGeneratorDuration(P),s.maxGeneratorDuration),n=t.generateLinearEasing((t=>P.next(e*t).value),e,30);return e+"ms "+n},toTransition:()=>{}};return P}h.applyToOptions=t=>{const s=e.createGeneratorEasing(t,100,h);return t.ease=s.ease,t.duration=n.secondsToMilliseconds(s.duration),t.type="keyframes",t},exports.spring=h;
2
+ //# sourceMappingURL=spring.mjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spring.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/spring.mjs"],"sourcesContent":["import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n"],"names":["springDefaults","stiffness","damping","mass","velocity","duration","bounce","visualDuration","restSpeed","granular","default","restDelta","minDuration","maxDuration","minDamping","maxDamping","calcAngularFreq","undampedFreq","dampingRatio","Math","sqrt","rootIterations","safeMin","findSpring","_ref","envelope","derivative","warning","secondsToMilliseconds","clamp","millisecondsToSeconds","exponentialDecay","delta","a","b","c","exp","d","e","pow","f","g","initialGuess","result","i","approximateRoot","isNaN","durationKeys","physicsKeys","isSpringType","options","keys","some","key","undefined","spring","optionsOrVisualDuration","arguments","length","keyframes","origin","target","state","done","value","isResolvedFromDuration","springOptions","root","PI","derived","getSpringOptions","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","abs","resolveSpring","resolveVelocity","angularFreq","A","sinCoeff","cosCoeff","t","sin","cos","C","dampedAngularFreq","freqForT","min","sinh","cosh","P","sinhCoeff","coshCoeff","generator","calculatedDuration","next","current","currentVelocity","toString","calcGeneratorDuration","maxGeneratorDuration","easing","generateLinearEasing","progress","toTransition","applyToOptions","generatorOptions","createGeneratorEasing","ease","type"],"mappings":"qZAoBA,MAAMA,EAAiB,CAEnBC,UAAW,IACXC,QAAS,GACTC,KAAM,EACNC,SAAU,EAGVC,SAAU,IACVC,OAAQ,GACRC,eAAgB,GAGhBC,UAAW,CACPC,SAAU,IACVC,QAAS,GAEbC,UAAW,CACPF,SAAU,KACVC,QAAS,IAIbE,YAAa,IACbC,YAAa,GACbC,WAAY,IACZC,WAAY,GAGhB,SAASC,EAAgBC,EAAsBC,GAC3C,OAAOD,EAAeE,KAAKC,KAAK,EAAIF,EAAeA,EACvD,CAEA,MAAMG,EAAiB,GAgBvB,MAAMC,EAAU,KAEhB,SAASC,EAAUC,GAKH,IACRC,EACAC,GAPYrB,SAChBA,EAAWL,EAAeK,SAAQC,OAClCA,EAASN,EAAeM,OAAMF,SAC9BA,EAAWJ,EAAeI,SAAQD,KAClCA,EAAOH,EAAeG,MACVqB,EAIZG,EAAOA,QACHtB,GAAYuB,wBAAsB5B,EAAea,aACjD,6CACA,yBAGJ,IAAIK,EAAe,EAAIZ,EAKvBY,EAAeW,EAAKA,MAChB7B,EAAec,WACfd,EAAee,WACfG,GAEJb,EAAWwB,EAAAA,MACP7B,EAAeY,YACfZ,EAAea,YACfiB,EAAAA,sBAAsBzB,IAGtBa,EAAe,GAIfO,EAAYR,IACR,MAAMc,EAAmBd,EAAeC,EAClCc,EAAQD,EAAmB1B,EAC3B4B,EAAIF,EAAmB3B,EACvB8B,EAAIlB,EAAgBC,EAAcC,GAClCiB,EAAIhB,KAAKiB,KAAKJ,GACpB,OAAOV,EAAWW,EAAIC,EAAKC,CAAC,EAGhCT,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AAYtF,EAOtC,OAFAmD,EAAME,MAAQF,EAAMC,KAAOF,EAASoC,EAE7BnC,CAAK,EAEhBqC,SAAUA,KACN,MAAMJ,EAAqB5E,KAAKqE,IAC5BY,EAAqBA,sBAACN,GACtBO,EAAAA,sBAGEC,EAASC,EAAAA,sBACVC,GACGV,EAAUE,KAAKD,EAAqBS,GAAUxC,OAClD+B,EACA,IAGJ,OAAOA,EAAqB,MAAQO,CAAM,EAE9CG,aAAcA,QAGlB,OAAOX,CACX,CAEAvC,EAAOmD,eAAkBxD,IACrB,MAAMyD,EAAmBC,EAAqBA,sBAAC1D,EAAgB,IAAKK,GAKpE,OAHAL,EAAQ2D,KAAOF,EAAiBE,KAChC3D,EAAQ7C,SAAWuB,EAAAA,sBAAsB+E,EAAiBtG,UAC1D6C,EAAQ4D,KAAO,YACR5D,CAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"calc-duration.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs"],"sourcesContent":["/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n"],"names":["maxGeneratorDuration","generator","duration","state","next","done","Infinity"],"mappings":"oEAIMA,MAAAA,EAAuB,kCAC7B,SAA+BC,GAC3B,IAAIC,EAAW,EAEXC,EAAQF,EAAUG,KAAKF,GAC3B,MAAQC,EAAME,MAAQH,EAAWF,GAC7BE,GAHa,GAIbC,EAAQF,EAAUG,KAAKF,GAE3B,OAAOA,GAAYF,EAAuBM,IAAWJ,CACzD"}
1
+ {"version":3,"file":"calc-duration.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs"],"sourcesContent":["/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n"],"names":["maxGeneratorDuration","generator","duration","state","next","done","Infinity"],"mappings":"oEAMO,MAAMA,EAAuB,kCAC9B,SACFC,GAEA,IAAIC,EAAW,EAEXC,EAAQF,EAAUG,KAAKF,GAC3B,MAAQC,EAAME,MAAQH,EAAWF,GAC7BE,GAHa,GAIbC,EAAQF,EAAUG,KAAKF,GAG3B,OAAOA,GAAYF,EAAuBM,IAAWJ,CACzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-generator-easing.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs"],"sourcesContent":["import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n"],"names":["options","scale","arguments","length","undefined","generator","keyframes","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"qNAMA,SAA+BA,GAAuC,IAA9BC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAC5C,MAAMG,GAD0DH,UAAAC,OAAAD,EAAAA,kBAAAE,GAC9B,IAAKJ,EAASM,UAAW,CAAC,EAAGL,KACzDM,EAAWC,KAAKC,IAAIC,EAAqBA,sBAACL,GAAYM,EAAAA,sBAC5D,MAAO,CACHC,KAAM,YACNC,KAAOC,GACIT,EAAUU,KAAKR,EAAWO,GAAUE,MAAQf,EAEvDM,SAAUU,EAAqBA,sBAACV,GAExC"}
1
+ {"version":3,"file":"create-generator-easing.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs"],"sourcesContent":["import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n"],"names":["options","scale","arguments","length","undefined","generator","keyframes","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"qNAOM,SACFA,GAEiC,IADjCC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAGR,MAAMG,GAF2BH,UAAAC,OAAAD,EAAAA,kBAAAE,GAEC,IAAKJ,EAASM,UAAW,CAAC,EAAGL,KACzDM,EAAWC,KAAKC,IAClBC,EAAqBA,sBAACL,GACtBM,EAAAA,sBAGJ,MAAO,CACHC,KAAM,YACNC,KAAOC,GACIT,EAAUU,KAAKR,EAAWO,GAAUE,MAAQf,EAEvDM,SAAUU,EAAqBA,sBAACV,GAExC"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-generator.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs"],"sourcesContent":["function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n"],"names":["type"],"mappings":"wFAAA,SAAqBA,GACjB,MAAuB,mBAATA,GAAuB,mBAAoBA,CAC7D"}
1
+ {"version":3,"file":"is-generator.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs"],"sourcesContent":["function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n"],"names":["type"],"mappings":"wFAEM,SACFA,GAEA,MAAuB,mBAATA,GAAuB,mBAAoBA,CAC7D"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../motion-utils/dist/es/velocity-per-second.mjs.js");exports.calcGeneratorVelocity=function(t,o,r){const s=Math.max(o-5,0);return e.velocityPerSecond(r-t(s),o-s)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../motion-utils/dist/es/velocity-per-second.mjs.js");exports.getGeneratorVelocity=function(t,o,r){const s=Math.max(o-5,0);return e.velocityPerSecond(r-t(s),o-s)};
2
2
  //# sourceMappingURL=velocity.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"velocity.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs"],"sourcesContent":["import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n"],"names":["resolveValue","t","current","prevT","Math","max","velocityPerSecond"],"mappings":"qLAGA,SAA+BA,EAAcC,EAAGC,GAC5C,MAAMC,EAAQC,KAAKC,IAAIJ,EAFI,EAEwB,GACnD,OAAOK,EAAAA,kBAAkBJ,EAAUF,EAAaG,GAAQF,EAAIE,EAChE"}
1
+ {"version":3,"file":"velocity.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs"],"sourcesContent":["import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n"],"names":["getGeneratorVelocity","resolveValue","t","current","prevT","Math","max","velocityPerSecond"],"mappings":"oLAIgBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAQC,KAAKC,IAAIJ,EAPI,EAOwB,GACnD,OAAOK,EAAAA,kBAAkBJ,EAAUF,EAAaG,GAAQF,EAAIE,EAChE"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../AsyncMotionValueAnimation.mjs.js"),i=require("../JSAnimation.mjs.js"),t=require("../utils/get-value-transition.mjs.js"),n=require("../utils/make-animation-instant.mjs.js"),o=require("../utils/default-transitions.mjs.js"),s=require("../keyframes/get-final.mjs.js"),a=require("../utils/is-transition-defined.mjs.js"),r=require("../../frameloop/frame.mjs.js"),l=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js"),m=require("../../../../../motion-utils/dist/es/global-config.mjs.js");exports.animateMotionValue=function(u,d,y){let p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=arguments.length>4?arguments[4]:void 0,j=arguments.length>5?arguments[5]:void 0;return c=>{const g=t.getValueTransition(p,u)||{},A=g.delay||p.delay||0;let{elapsed:v=0}=p;v-=l.secondsToMilliseconds(A);const k={keyframes:Array.isArray(y)?y:[null,y],ease:"easeOut",velocity:d.getVelocity(),...g,delay:-v,onUpdate:e=>{d.set(e),g.onUpdate&&g.onUpdate(e)},onComplete:()=>{c(),g.onComplete&&g.onComplete()},name:u,motionValue:d,element:j?void 0:f};a.isTransitionDefined(g)||Object.assign(k,o.getDefaultTransition(u,k)),k.duration&&(k.duration=l.secondsToMilliseconds(k.duration)),k.repeatDelay&&(k.repeatDelay=l.secondsToMilliseconds(k.repeatDelay)),void 0!==k.from&&(k.keyframes[0]=k.from);let q=!1;if((!1===k.type||0===k.duration&&!k.repeatDelay)&&(n.makeAnimationInstant(k),0===k.delay&&(q=!0)),(m.MotionGlobalConfig.instantAnimations||m.MotionGlobalConfig.skipAnimations||f?.shouldSkipAnimations||g.skipAnimations)&&(q=!0,n.makeAnimationInstant(k),k.delay=0),k.allowFlatten=!g.type&&!g.ease,q&&!j&&void 0!==d.get()){const e=s.getFinalKeyframe(k.keyframes,g);if(void 0!==e)return void r.frame.update((()=>{k.onUpdate(e),k.onComplete()}))}return g.isSync?new i.JSAnimation(k):new e.AsyncMotionValueAnimation(k)}};
2
+ //# sourceMappingURL=motion-value.mjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-value.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs"],"sourcesContent":["import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n"],"names":["name","value","target","transition","arguments","length","undefined","element","isHandoff","onComplete","valueTransition","getValueTransition","delay","elapsed","secondsToMilliseconds","options","keyframes","Array","isArray","ease","velocity","getVelocity","onUpdate","v","set","motionValue","isTransitionDefined","Object","assign","getDefaultTransition","duration","repeatDelay","from","shouldSkip","type","makeAnimationInstant","MotionGlobalConfig","instantAnimations","skipAnimations","shouldSkipAnimations","allowFlatten","get","finalKeyframe","getFinalKeyframe","frame","update","isSync","JSAnimation","AsyncMotionValueAnimation"],"mappings":"omBAmBI,SACIA,EACAC,EACAC,GAAkC,IAClCC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAqD,CAAA,EACrDG,EAA4BH,UAAAC,OAAAD,EAAAA,kBAAAE,EAC5BE,EAAmBJ,UAAAC,OAAAD,EAAAA,kBAAAE,EAAA,OAEtBG,IACG,MAAMC,EAAkBC,EAAkBA,mBAACR,EAAYH,IAAS,CAAA,EAO1DY,EAAQF,EAAgBE,OAAST,EAAWS,OAAS,EAM3D,IAAIC,QAAEA,EAAU,GAAMV,EACtBU,GAAoBC,wBAAsBF,GAE1C,MAAMG,EAAiC,CACnCC,UAAWC,MAAMC,QAAQhB,GAAUA,EAAS,CAAC,KAAMA,GACnDiB,KAAM,UACNC,SAAUnB,EAAMoB,iBACbX,EACHE,OAAQC,EACRS,SAAWC,IACPtB,EAAMuB,IAAID,GACVb,EAAgBY,UAAYZ,EAAgBY,SAASC,EAAE,EAE3Dd,WAAYA,KACRA,IACAC,EAAgBD,YAAcC,EAAgBD,YAAY,EAE9DT,OACAyB,YAAaxB,EACbM,QAASC,OAAYF,EAAYC,GAOhCmB,EAAAA,oBAAoBhB,IACrBiB,OAAOC,OAAOb,EAASc,EAAoBA,qBAAC7B,EAAMe,IAQtDA,EAAQe,WAARf,EAAQe,SAAahB,EAAAA,sBAAsBC,EAAQe,WACnDf,EAAQgB,cAARhB,EAAQgB,YAAgBjB,EAAAA,sBAAsBC,EAAQgB,mBAKjCzB,IAAjBS,EAAQiB,OACRjB,EAAQC,UAAU,GAAKD,EAAQiB,MAGnC,IAAIC,GAAa,EAmCjB,KAhC8B,IAAzBlB,EAAgBmB,MACK,IAArBnB,EAAQe,WAAmBf,EAAQgB,eAEpCI,EAAoBA,qBAACpB,GAEC,IAAlBA,EAAQH,QACRqB,GAAa,KAKjBG,EAAkBA,mBAACC,mBACnBD,qBAAmBE,gBACnB/B,GAASgC,sBACT7B,EAAgB4B,kBAEhBL,GAAa,EACbE,EAAoBA,qBAACpB,GACrBA,EAAQH,MAAQ,GAOpBG,EAAQyB,cAAgB9B,EAAgBwB,OAASxB,EAAgBS,KAO7Dc,IAAezB,QAA6BF,IAAhBL,EAAMwC,MAAqB,CACvD,MAAMC,EAAgBC,EAAgBA,iBAClC5B,EAAQC,UACRN,GAGJ,QAAsBJ,IAAlBoC,EAMA,YALAE,EAAKA,MAACC,QAAO,KACT9B,EAAQO,SAAUoB,GAClB3B,EAAQN,YAAa,GAKjC,CAEA,OAAOC,EAAgBoC,OACjB,IAAIC,EAAWA,YAAChC,GAChB,IAAIiC,EAAAA,0BAA0BjC,EAAQ,CAChD"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/get-value-transition.mjs.js"),t=require("../utils/resolve-transition.mjs.js"),i=require("../../render/utils/keys-position.mjs.js"),n=require("../../render/utils/setters.mjs.js"),s=require("../../value/will-change/add-will-change.mjs.js"),a=require("../optimized-appear/get-appear-id.mjs.js"),o=require("./motion-value.mjs.js"),r=require("../../frameloop/frame.mjs.js");function l(e,t){let{protectedKeys:i,needsAnimating:n}=e;const s=i.hasOwnProperty(t)&&!0!==n[t];return n[t]=!1,s}exports.animateTarget=function(u,m){let{delay:d=0,transitionOverride:c,type:p}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{transition:f,transitionEnd:g,...j}=m;const v=u.getDefaultTransition();f=f?t.resolveTransition(f,v):v;const y=f?.reduceMotion,h=f?.skipAnimations;c&&(f=c);const A=[],q=p&&u.animationState&&u.animationState.getState()[p],w=f?.path;w&&w.animateVisualElement(u,j,f,d,A);for(const t in j){const n=u.getValue(t,u.latestValues[t]??null),m=j[t];if(void 0===m||q&&l(q,t))continue;const c={delay:d,...e.getValueTransition(f||{},t)};h&&(c.skipAnimations=!0);const p=n.get();if(void 0!==p&&!n.isAnimating()&&!Array.isArray(m)&&m===p&&!c.velocity){r.frame.update((()=>n.set(m)));continue}let g=!1;if(window.MotionHandoffAnimation){const e=a.getOptimisedAppearId(u);if(e){const i=window.MotionHandoffAnimation(e,t,r.frame);null!==i&&(c.startTime=i,g=!0)}}s.addValueToWillChange(u,t);const v=y??u.shouldReduceMotion;n.start(o.animateMotionValue(t,n,m,v&&i.positionalKeys.has(t)?{type:!1}:c,u,g));const w=n.animation;w&&A.push(w)}if(g){const e=()=>r.frame.update((()=>{g&&n.setTarget(u,g)}));A.length?Promise.all(A).then(e):e()}return A};
2
+ //# sourceMappingURL=visual-element-target.mjs.js.map