@nethesis/phone-island 1.1.4 → 1.1.5

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 (209) hide show
  1. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  2. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  3. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  4. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  5. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  6. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  7. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  8. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
  9. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
  10. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
  11. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
  12. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
  13. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
  14. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  15. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  16. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  17. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  18. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  19. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  20. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  21. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  22. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  23. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  24. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  25. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  26. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  27. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
  28. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  29. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  30. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  31. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  32. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +1 -1
  33. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -1
  34. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  35. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  36. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
  37. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
  38. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  39. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  40. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  41. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  42. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  43. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  44. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  45. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  46. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
  47. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
  48. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
  49. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  50. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  51. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  52. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  53. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  54. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  55. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  56. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js +1 -1
  57. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
  58. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
  59. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  60. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
  61. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
  62. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  63. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  64. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  65. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  66. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  67. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  68. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  69. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  70. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  71. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  72. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  73. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  74. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js +1 -1
  75. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
  76. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  77. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  78. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js +1 -1
  79. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -1
  80. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  81. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  82. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  83. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  84. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js +2 -0
  85. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js.map +1 -0
  86. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js +2 -0
  87. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js.map +1 -0
  88. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  89. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  90. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +2 -0
  91. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -0
  92. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js +2 -0
  93. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -0
  94. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js +2 -0
  95. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js.map +1 -0
  96. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js +2 -0
  97. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js.map +1 -0
  98. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  99. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  100. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js +2 -0
  101. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js.map +1 -0
  102. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js +1 -1
  103. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
  104. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  105. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  106. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js +1 -1
  107. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  108. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +2 -0
  109. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -0
  110. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js +2 -0
  111. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -0
  112. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  113. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  114. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +2 -0
  115. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -0
  116. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  117. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  118. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  119. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  120. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js +1 -1
  121. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
  122. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  123. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  124. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  125. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  126. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  127. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  128. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  129. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  130. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js +2 -0
  131. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js.map +1 -0
  132. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js +2 -0
  133. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js.map +1 -0
  134. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +1 -1
  135. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -1
  136. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js +2 -0
  169. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js.map +1 -0
  170. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/utils/distance.mjs.js.map +1 -0
  173. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js +2 -0
  184. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js.map +1 -0
  185. package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
  187. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
  189. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js +1 -1
  191. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
  192. package/dist/package.json.js +1 -1
  193. package/package.json +3 -3
  194. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +0 -2
  195. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +0 -1
  196. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js +0 -2
  197. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +0 -1
  198. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +0 -2
  199. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +0 -1
  200. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +0 -2
  201. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +0 -1
  202. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +0 -2
  203. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +0 -1
  204. package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +0 -1
  205. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js +0 -2
  206. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
  207. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js +0 -2
  208. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +0 -1
  209. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/distance.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function({keyframes:s,velocity:o=0,power:a=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:l,min:u,max:v,restDelta:d=.5,restSpeed:c}){const p=s[0],m={done:!1,value:p},f=e=>void 0===u?v:void 0===v||Math.abs(u-e)<Math.abs(v-e)?u:v;let y=a*o;const b=p+y,g=void 0===l?b:l(b);g!==b&&(y=g-p);const x=e=>-y*Math.exp(-e/n),j=e=>g+x(e),M=e=>{const t=x(e),s=j(e);m.done=Math.abs(t)<=d,m.value=m.done?g:s};let h,D;const S=s=>{var o;(o=m.value,void 0!==u&&o<u||void 0!==v&&o>v)&&(h=s,D=e.spring({keyframes:[m.value,f(m.value)],velocity:t.getGeneratorVelocity(j,s,m.value),damping:i,stiffness:r,restDelta:d,restSpeed:c}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return D||void 0!==h||(t=!0,M(e),S(e)),void 0!==h&&e>=h?D.next(e-h):(!t&&M(e),m)}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring.mjs.js");exports.inertia=function({keyframes:t,velocity:n=0,power:s=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:r=500,modifyTarget:i,min:l,max:u,restDelta:d=.5,restSpeed:v}){const c=t[0],p={done:!1,value:c},f=e=>void 0===l?u:void 0===u||Math.abs(l-e)<Math.abs(u-e)?l:u;let m=s*n;const b=c+m,x=void 0===i?b:i(b);x!==b&&(m=x-c);const y=e=>-m*Math.exp(-e/a),g=e=>{const t=y(e);p.done=Math.abs(t)<=d,p.value=p.done?x:x+t};let M,h;const D=t=>{var n;((n=p.value)<l||n>u)&&(M=t,h=e.spring({keyframes:[p.value,f(p.value)],velocity:-y(t)/a*1e3,damping:o,stiffness:r,restDelta:d,restSpeed:v}))};return D(0),{calculatedDuration:null,next:e=>{let t=!1;return h||void 0!==M||(t=!0,g(e),D(e)),void 0!==M&&e>=M?h.next(e-M):(!t&&g(e),p)}}};
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.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":["inertia","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":"0JAQgBA,UAAQC,UACpBA,EACAC,SAAAA,EAAW,EAAGC,MACdA,EAAQ,GAAGC,aACXA,EAAe,IAAGC,cAClBA,EAAgB,GAAEC,gBAClBA,EAAkB,IAAGC,aACrBA,EAAYC,IACZA,EAAGC,IACHA,EAAGC,UACHA,EAAY,GAAGC,UACfA,IAEA,MAAMC,EAASX,EAAU,GAEnBY,EAAgC,CAClCC,MAAM,EACNC,MAAOH,GAMLI,EAAmBC,QACTC,IAARV,EAA0BC,OAClBS,IAART,GAEGU,KAAKC,IAAIZ,EAAMS,GAAKE,KAAKC,IAAIX,EAAMQ,GAFZT,EAEuBC,EAGzD,IAAIY,EAAYlB,EAAQD,EACxB,MAAMoB,EAAQV,EAASS,EACjBE,OAA0BL,IAAjBX,EAA6Be,EAAQf,EAAae,GAM7DC,IAAWD,IAAOD,EAAYE,EAASX,GAE3C,MAAMY,EAAaC,IAAeJ,EAAYF,KAAKO,KAAKD,EAAIrB,GAEtDuB,EAAcF,GAAcF,EAASC,EAAUC,GAE/CG,EAAiBH,IACnB,MAAMI,EAAQL,EAAUC,GAClBK,EAASH,EAAWF,GAC1BZ,EAAMC,KAAOK,KAAKC,IAAIS,IAAUnB,EAChCG,EAAME,MAAQF,EAAMC,KAAOS,EAASO,GASxC,IAAIC,EACAC,EAEJ,MAAMC,EAAsBR,IAxCLR,SAyCAJ,EAAME,WAxChBG,IAARV,GAAqBS,EAAIT,QAAiBU,IAART,GAAqBQ,EAAIR,KA0C5DsB,EAAsBN,EAEtBO,EAASA,EAAAA,OAAa,CAClB/B,UAAW,CAACY,EAAME,MAAOC,EAAgBH,EAAME,QAC/Cb,SAAUgC,EAAAA,qBAAqBP,EAAYF,EAAGZ,EAAME,OACpDoB,QAAS9B,EACT+B,UAAW9B,EACXI,YACAC,gBAMR,OAFAsB,EAAmB,GAEZ,CACHI,mBAAoB,KACpBC,KAAOb,IAOH,IAAIc,GAAkB,EAWtB,OAVKP,QAAkCd,IAAxBa,IACXQ,GAAkB,EAClBX,EAAcH,GACdQ,EAAmBR,SAOKP,IAAxBa,GAAqCN,GAAKM,EACnCC,EAAQM,KAAKb,EAAIM,KAEvBQ,GAAmBX,EAAcH,GAC3BZ,IAIvB"}
1
+ {"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring.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) => v < min || 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 applyFriction = (t) => {\n const delta = calcDelta(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : target + delta;\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 /**\n * The friction curve is target + calcDelta(t), so its exact\n * derivative is -calcDelta(t) / timeConstant in units/ms,\n * converted here to the units/second expected by spring.\n */\n velocity: (-calcDelta(t) / timeConstant) * 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":["inertia","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","applyFriction","delta","timeReachedBoundary","spring","checkCatchBoundary","damping","stiffness","calculatedDuration","next","hasUpdatedFrame"],"mappings":"qHAOgBA,UAAQC,UACpBA,EAASC,SACTA,EAAW,EAAGC,MACdA,EAAQ,GAAGC,aACXA,EAAe,IAAGC,cAClBA,EAAgB,GAAEC,gBAClBA,EAAkB,IAAGC,aACrBA,EAAYC,IACZA,EAAGC,IACHA,EAAGC,UACHA,EAAY,GAAGC,UACfA,IAEA,MAAMC,EAASX,EAAU,GAEnBY,EAAgC,CAClCC,MAAM,EACNC,MAAOH,GAKLI,EAAmBC,QACTC,IAARV,EAA0BC,OAClBS,IAART,GAEGU,KAAKC,IAAIZ,EAAMS,GAAKE,KAAKC,IAAIX,EAAMQ,GAFZT,EAEuBC,EAGzD,IAAIY,EAAYlB,EAAQD,EACxB,MAAMoB,EAAQV,EAASS,EACjBE,OAA0BL,IAAjBX,EAA6Be,EAAQf,EAAae,GAM7DC,IAAWD,IAAOD,EAAYE,EAASX,GAE3C,MAAMY,EAAaC,IAAeJ,EAAYF,KAAKO,KAAKD,EAAIrB,GAEtDuB,EAAiBF,IACnB,MAAMG,EAAQJ,EAAUC,GACxBZ,EAAMC,KAAOK,KAAKC,IAAIQ,IAAUlB,EAChCG,EAAME,MAAQF,EAAMC,KAAOS,EAASA,EAASK,GASjD,IAAIC,EACAC,EAEJ,MAAMC,EAAsBN,IApCLR,UAqCAJ,EAAME,OArCYP,GAAQS,EAAIR,KAuCjDoB,EAAsBJ,EAEtBK,EAASA,EAAAA,OAAa,CAClB7B,UAAW,CAACY,EAAME,MAAOC,EAAgBH,EAAME,QAM/Cb,UAAYsB,EAAUC,GAAKrB,EAAgB,IAC3C4B,QAAS3B,EACT4B,UAAW3B,EACXI,YACAC,gBAMR,OAFAoB,EAAmB,GAEZ,CACHG,mBAAoB,KACpBC,KAAOV,IAOH,IAAIW,GAAkB,EAWtB,OAVKN,QAAkCZ,IAAxBW,IACXO,GAAkB,EAClBT,EAAcF,GACdM,EAAmBN,SAOKP,IAAxBW,GAAqCJ,GAAKI,EACnCC,EAAQK,KAAKV,EAAII,KAEvBO,GAAmBT,EAAcF,GAC3BZ,IAIvB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/interpolate.mjs.js"),s=require("../keyframes/offsets/default.mjs.js"),t=require("../keyframes/offsets/time.mjs.js"),i=require("../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs.js"),n=require("../../../../../motion-utils/dist/es/easing/utils/map.mjs.js"),r=require("../../../../../motion-utils/dist/es/easing/ease.mjs.js");function a(e,s){return e.map(()=>s||r.easeInOut).splice(0,e.length-1)}exports.defaultEasing=a,exports.keyframes=function({duration:r=300,keyframes:u,times:o,ease:l="easeInOut"}){const f=i.isEasingArray(l)?l.map(n.easingDefinitionToFunction):n.easingDefinitionToFunction(l),m={done:!1,value:u[0]},j=t.convertOffsetToTimes(o&&o.length===u.length?o:s.defaultOffset(u),r),d=e.interpolate(j,u,{ease:Array.isArray(f)?f:a(u,f)});return{calculatedDuration:r,next:e=>(m.value=d(e),m.done=e>=r,m)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/interpolate.mjs.js"),s=require("../../utils/mix/index.mjs.js"),i=require("../keyframes/offsets/default.mjs.js"),t=require("../keyframes/offsets/time.mjs.js"),n=require("../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs.js"),r=require("../../../../../motion-utils/dist/es/easing/utils/map.mjs.js"),a=require("../../../../../motion-utils/dist/es/easing/ease.mjs.js"),o=require("../../../../../motion-utils/dist/es/global-config.mjs.js"),u=require("../../../../../motion-utils/dist/es/clamp.mjs.js");function l(e,s){return e.map(()=>s||a.easeInOut).splice(0,e.length-1)}exports.defaultEasing=l,exports.keyframes=function({duration:m=300,keyframes:f,times:j,ease:c="easeInOut"}){const d=n.isEasingArray(c)?c.map(r.easingDefinitionToFunction):r.easingDefinitionToFunction(c)||a.easeInOut,g={done:!1,value:f[0]};if(2===f.length&&!Array.isArray(d)&&(!j||2!==j.length||0===j[0]&&1===j[1])){const[e,i]=f,t=e===i?void 0:(o.MotionGlobalConfig.mix||s.mix)(e,i);return{calculatedDuration:m,next:e=>(g.value=t?t(d(m>0?u.clamp(0,1,e/m):1)):i,g.done=e>=m,g)}}const p=t.convertOffsetToTimes(j&&j.length===f.length?j:i.defaultOffset(f),m),y=e.interpolate(p,f,{ease:Array.isArray(d)?d:l(f,d)});return{calculatedDuration:m,next:e=>(g.value=y(e),g.done=e>=m,g)}};
2
2
  //# sourceMappingURL=keyframes.mjs.js.map
@@ -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//# sourceMappingURL=keyframes.mjs.map\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","keyframes","duration","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,IAAI,IAAMD,GAAUE,EAASA,WAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,2CAEgBC,UAAyCC,SACrDA,EAAW,IACXD,UAAWE,EAAcC,MACzBA,EAAKC,KACLA,EAAO,cAMP,MAAMC,EAAkBC,gBAAcF,GAChCA,EAAKR,IAAIW,8BACTA,6BAA2BH,GAM3BI,EAA2B,CAC7BC,MAAM,EACNC,MAAOR,EAAe,IAMpBS,EAAgBC,EAAoBA,qBAGtCT,GAASA,EAAMJ,SAAWG,EAAeH,OACnCI,EACAU,gBAAcX,GACpBD,GAGEa,EAAoBC,EAAAA,YAAeJ,EAAeT,EAAgB,CACpEE,KAAMY,MAAMC,QAAQZ,GACdA,EACAZ,EAAcS,EAAgBG,KAGxC,MAAO,CACHa,mBAAoBjB,EACpBkB,KAAOC,IACHZ,EAAME,MAAQI,EAAkBM,GAChCZ,EAAMC,KAAOW,GAAKnB,EACXO,GAGnB"}
1
+ {"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction, MotionGlobalConfig, clamp } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { mix } from '../../utils/mix/index.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) || easeInOut;\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 * Fast setup path for two keyframes one easing.\n */\n if (keyframeValues.length === 2 &&\n !Array.isArray(easingFunctions) &&\n (!times ||\n times.length !== 2 ||\n (times[0] === 0 && times[1] === 1))) {\n const [origin, target] = keyframeValues;\n const mixer = origin === target\n ? undefined\n : (MotionGlobalConfig.mix || mix)(origin, target);\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mixer\n ? mixer(easingFunctions(duration > 0 ? clamp(0, 1, t / duration) : 1))\n : target;\n state.done = t >= duration;\n return state;\n },\n };\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","keyframes","duration","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","Array","isArray","origin","target","mixer","undefined","MotionGlobalConfig","mix","calculatedDuration","next","t","clamp","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate"],"mappings":"mmBAmBM,SAAUA,EACZC,EACAC,GAEA,OAAOD,EAAOE,IAAI,IAAMD,GAAUE,EAASA,WAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,2CAEgBC,UAAyCC,SACrDA,EAAW,IACXD,UAAWE,EAAcC,MACzBA,EACAC,KAAAA,EAAO,cAMP,MAAMC,EAAkBC,EAAAA,cAAcF,GAChCA,EAAKR,IAAIW,EAAAA,4BACTA,EAAAA,2BAA2BH,IAASP,EAAAA,UAMpCW,EAA2B,CAC7BC,MAAM,EACNC,MAAOR,EAAe,IAM1B,GAC8B,IAA1BA,EAAeH,SACdY,MAAMC,QAAQP,MACbF,GACmB,IAAjBA,EAAMJ,QACQ,IAAbI,EAAM,IAAyB,IAAbA,EAAM,IAC/B,CACE,MAAOU,EAAQC,GAAUZ,EACnBa,EACFF,IAAWC,OACLE,GACCC,qBAAmBC,KAAOA,EAAGA,KAAEL,EAAQC,GAElD,MAAO,CACHK,mBAAoBlB,EACpBmB,KAAOC,IACHb,EAAME,MAAQK,EACRA,EACIV,EACIJ,EAAW,EAAIqB,EAAAA,MAAM,EAAG,EAAGD,EAAIpB,GAAY,IAGnDa,EACNN,EAAMC,KAAOY,GAAKpB,EACXO,GAGnB,CAKA,MAAMe,EAAgBC,EAAoBA,qBAGtCrB,GAASA,EAAMJ,SAAWG,EAAeH,OACnCI,EACAsB,gBAAcvB,GACpBD,GAGEyB,EAAoBC,EAAAA,YAAeJ,EAAerB,EAAgB,CACpEE,KAAMO,MAAMC,QAAQP,GACdA,EACAZ,EAAcS,EAAgBG,KAGxC,MAAO,CACHc,mBAAoBlB,EACpBmB,KAAOC,IACHb,EAAME,MAAQgB,EAAkBL,GAChCb,EAAMC,KAAOY,GAAKpB,EACXO,GAGnB"}
@@ -1,2 +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"),o=require("../../../../../motion-utils/dist/es/clamp.mjs.js"),a=require("../../../../../motion-utils/dist/es/errors.mjs.js");const i=100,r=10,c=1,l=0,u=800,d=.3,M=.3,h={granular:.01,default:2},m={granular:.005,default:.5},p=.01,f=10,v=.05,g=1;function y(t,s){return t*Math.sqrt(1-s*s)}const x=.001;const j=["duration","bounce"],b=["stiffness","damping","mass"];function q(t,s){return s.some(s=>void 0!==t[s])}function T(t){let s={velocity:l,stiffness:i,damping:r,mass:c,isResolvedFromDuration:!1,...t};if(!q(t,b)&&q(t,j))if(s.velocity=0,t.visualDuration){const e=t.visualDuration,n=2*Math.PI/(1.2*e),a=n*n,i=2*o.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(a);s={...s,mass:c,stiffness:a,damping:i}}else{const e=function({duration:t=u,bounce:s=d,velocity:e=l,mass:M=c}){let h,m;a.warning(t<=n.secondsToMilliseconds(f),"Spring duration must be 10 seconds or less","spring-duration-limit");let j=1-s;j=o.clamp(v,g,j),t=o.clamp(p,f,n.millisecondsToSeconds(t)),j<1?(h=s=>{const n=s*j,o=n*t,a=n-e,i=y(s,j),r=Math.exp(-o);return x-a/i*r},m=s=>{const n=s*j*t,o=n*e+e,a=Math.pow(j,2)*Math.pow(s,2)*t,i=Math.exp(-n),r=y(Math.pow(s,2),j);return(-h(s)+x>0?-1:1)*((o-a)*i)/r}):(h=s=>Math.exp(-s*t)*((s-e)*t+1)-.001,m=s=>Math.exp(-s*t)*(t*t*(e-s)));const b=function(t,s,e){let n=e;for(let e=1;e<12;e++)n-=t(n)/s(n);return n}(h,m,5/t);if(t=n.secondsToMilliseconds(t),isNaN(b))return{stiffness:i,damping:r,duration:t};{const s=Math.pow(b,2)*M;return{stiffness:s,damping:2*j*Math.sqrt(M*s),duration:t}}}({...t,velocity:0});s={...s,...e,mass:c},s.isResolvedFromDuration=!0}return s}function D(e=M,o=d){const a="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:o}:e;let{restSpeed:i,restDelta:r}=a;const c=a.keyframes[0],l=a.keyframes[a.keyframes.length-1],u={done:!1,value:c},{stiffness:p,damping:f,mass:v,duration:g,velocity:x,isResolvedFromDuration:j}=T({...a,velocity:-n.millisecondsToSeconds(a.velocity||0)}),b=x||0,q=f/(2*Math.sqrt(p*v)),D=l-c,w=n.millisecondsToSeconds(Math.sqrt(p/v)),S=Math.abs(D)<5;let k,F,G,R,E,N;if(i||(i=S?h.granular:h.default),r||(r=S?m.granular:m.default),q<1)G=y(w,q),R=(b+q*w*D)/G,k=t=>{const s=Math.exp(-q*w*t);return l-s*(R*Math.sin(G*t)+D*Math.cos(G*t))},E=q*w*R+D*G,N=q*w*D-R*G,F=t=>Math.exp(-q*w*t)*(E*Math.sin(G*t)+N*Math.cos(G*t));else if(1===q){k=t=>l-Math.exp(-w*t)*(D+(b+w*D)*t);const t=b+w*D;F=s=>Math.exp(-w*s)*(w*t*s-b)}else{const t=w*Math.sqrt(q*q-1);k=s=>{const e=Math.exp(-q*w*s),n=Math.min(t*s,300);return l-e*((b+q*w*D)*Math.sinh(n)+t*D*Math.cosh(n))/t};const s=(b+q*w*D)/t,e=q*w*s-D*t,n=q*w*D-s*t;F=s=>{const o=Math.exp(-q*w*s),a=Math.min(t*s,300);return o*(e*Math.sinh(a)+n*Math.cosh(a))}}const O={calculatedDuration:j&&g||null,velocity:t=>n.secondsToMilliseconds(F(t)),next:t=>{if(!j&&q<1){const s=Math.exp(-q*w*t),e=Math.sin(G*t),o=Math.cos(G*t),a=l-s*(R*e+D*o),c=n.secondsToMilliseconds(s*(E*e+N*o));return u.done=Math.abs(c)<=i&&Math.abs(l-a)<=r,u.value=u.done?l:a,u}const s=k(t);if(j)u.done=t>=g;else{const e=n.secondsToMilliseconds(F(t));u.done=Math.abs(e)<=i&&Math.abs(l-s)<=r}return u.value=u.done?l:s,u},toString:()=>{const e=Math.min(s.calcGeneratorDuration(O),s.maxGeneratorDuration),n=t.generateLinearEasing(t=>O.next(e*t).value,e,30);return e+"ms "+n},toTransition:()=>{}};return O}D.applyToOptions=t=>{const s=e.createGeneratorEasing(t,100,D);return t.ease=s.ease,t.duration=n.secondsToMilliseconds(s.duration),t.type="keyframes",t},exports.spring=D;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../waapi/utils/linear.mjs.js"),t=require("./utils/calc-duration.mjs.js"),s=require("./utils/create-generator-easing.mjs.js"),n=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js"),a=require("../../../../../motion-utils/dist/es/errors.mjs.js"),i=require("../../../../../motion-utils/dist/es/clamp.mjs.js");const o=100,r=10,l=1,c=800,d=.3,u=.3,f={granular:.01,default:2},m={granular:.005,default:.5},p=.01,g=10,M=.05,h=e=>e<0?1/Math.max(1+e,M):Math.max(1-e,M);function v(e,t){if(!(e>1))return 1;const s=Math.sqrt(e*e-1),n=e-s,a=e+s,i=2*s*Math.exp(-t)*(1+t);return D(e=>a*Math.exp(-n*e)-n*Math.exp(-a*e)-i,e=>Math.exp(-a*e)-Math.exp(-n*e),t)/t}function x(e,t){return e*Math.sqrt(1-t*t)}const y=12;function D(e,t,s){let n=s;for(let s=1;s<y;s++)n-=e(n)/t(n);return n}const j=.001;const S=(e,t)=>(t?e>=0:e>0)&&e<1/0;function b(e,t){if(S(e,t))return e;"production"!==process.env.NODE_ENV&&a.warning(void 0===e,"Spring stiffness and mass must be positive, damping 0 or greater","spring-invalid-physics")}function q(e){const t=b(e.stiffness),s=b(e.damping,!0),u=b(e.mass),f={...e,stiffness:t??o,damping:s??r,mass:u??l,isResolvedFromDuration:!1,isTimeDefined:void 0===(t??s??u)&&(void 0!==e.duration||void 0!==e.bounce)};if(f.isTimeDefined){if(e.visualDuration){const t=h(e.bounce||0),s=2*Math.PI/(1.2*e.visualDuration)*v(t,2*Math.PI/1.2);f.stiffness=s*s,f.damping=2*t*Math.sqrt(f.stiffness)}else Object.assign(f,function({duration:e=c,bounce:t=d}){let s,o;a.warning(e<=n.secondsToMilliseconds(g),"Spring duration must be 10 seconds or less","spring-duration-limit");const r=h(t);e=i.clamp(p,g,n.millisecondsToSeconds(e)),r<1?(s=t=>{const s=t*r,n=s*e,a=x(t,r),i=Math.exp(-n);return j-s/a*i},o=t=>{const n=t*r*e,a=r*r*t*t*e,i=Math.exp(-n),o=x(t*t,r);return(-s(t)+j>0?-1:1)*-a*i/o}):(s=t=>Math.exp(-t*e)*(t*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*-t));const l=D(s,o,5/e),u=l*v(r,l*e),f=u*u;return{stiffness:f,damping:2*r*Math.sqrt(f),duration:n.secondsToMilliseconds(e)}}(f)),f.isResolvedFromDuration=!0;S(f.stiffness)&&S(f.damping,!0)||(f.stiffness=o,f.damping=r)}return f}function T(s=u,a=d){const i="object"!=typeof s?{visualDuration:s,keyframes:[0,1],bounce:a}:s,o=i.keyframes[0],r=i.keyframes[i.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:p,mass:g,duration:M,isResolvedFromDuration:h,isTimeDefined:v}=q({...i}),y=e=>v?0:-n.millisecondsToSeconds(e),D=p/(2*Math.sqrt(c*g)),j=n.millisecondsToSeconds(Math.sqrt(c/g)),S=D*j,b={target:r,delta:r-o,velocity:y(i.velocity||0)||0,restSpeed:0,restDelta:0},T=()=>{const e=Math.abs(b.delta)<5;b.restSpeed=i.restSpeed||(e?f.granular:f.default),b.restDelta=i.restDelta||(e?m.granular:m.default)};let C,F,k;if(T(),D<1){const e=x(j,D),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};k=()=>{t.A=(b.velocity+S*b.delta)/e,t.sinC=S*t.A+b.delta*e,t.cosC=S*b.delta-t.A*e};const s=s=>{s!==t.t&&(t.t=s,t.env=Math.exp(-S*s),t.sin=Math.sin(e*s),t.cos=Math.cos(e*s))};C=e=>(s(e),b.target-t.env*(t.A*t.sin+b.delta*t.cos)),F=e=>(s(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(1===D){C=e=>b.target-Math.exp(-j*e)*(b.delta+(b.velocity+j*b.delta)*e);const e={C:0};k=()=>{e.C=b.velocity+j*b.delta},F=t=>Math.exp(-j*t)*(j*e.C*t-b.velocity)}else{const e=j*Math.sqrt(D*D-1),t=S-e,s=S+e,n=v?1/0:300/e,a=(e,t)=>Math.exp(t>n?-e*n-S*(t-n):-e*t),i={S:0,F:0};k=()=>{const t=(b.velocity+S*b.delta)/e;i.S=(b.delta+t)/2,i.F=(b.delta-t)/2},C=e=>b.target-i.S*a(t,e)-i.F*a(s,e),F=e=>t*i.S*a(t,e)+s*i.F*a(s,e)}k();const A=h&&M||null,O={calculatedDuration:A,retarget:(e,t)=>{b.target=e[e.length-1],b.delta=b.target-e[0],b.velocity=y(t),i.restSpeed&&i.restDelta||T(),O.calculatedDuration=A,l.done=!1,k()},velocity:e=>n.secondsToMilliseconds(F(e)),next:e=>{const t=C(e);if(h)l.done=e>=M;else{const s=n.secondsToMilliseconds(F(e));l.done=Math.abs(s)<=b.restSpeed&&Math.abs(b.target-t)<=b.restDelta}return l.value=l.done?b.target:t,l},toString:()=>{const s=Math.min(t.calcGeneratorDuration(O),t.maxGeneratorDuration),n=e.generateLinearEasing(e=>O.next(s*e).value,s,30);return s+"ms "+n},toTransition:()=>{}};return O}const C=Object.assign(T,{applyToOptions:e=>{const t=s.createGeneratorEasing(e,100,T);return e.ease=t.ease,e.duration=n.secondsToMilliseconds(t.duration),e.type="keyframes",e}});exports.spring=C;
2
2
  //# sourceMappingURL=spring.mjs.js.map
@@ -1 +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","granular","default","calcAngularFreq","undampedFreq","dampingRatio","Math","sqrt","safeMin","durationKeys","physicsKeys","isSpringType","options","keys","some","key","undefined","getSpringOptions","springOptions","velocity","stiffness","damping","mass","isResolvedFromDuration","visualDuration","root","PI","clamp","bounce","derived","duration","envelope","derivative","warning","secondsToMilliseconds","millisecondsToSeconds","exponentialDecay","delta","a","b","c","exp","d","e","pow","f","g","initialGuess","result","i","approximateRoot","isNaN","findSpring","spring","optionsOrVisualDuration","keyframes","restSpeed","restDelta","origin","target","length","state","done","value","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,EAES,IAFTA,EAGO,GAHPA,EAII,EAJJA,EAKQ,EALRA,EAQQ,IARRA,EASM,GATNA,EAUc,GAVdA,EAaS,CACPC,SAAU,IACVC,QAAS,GAfXF,EAiBS,CACPC,SAAU,KACVC,QAAS,IAnBXF,EAuBW,IAvBXA,EAwBW,GAxBXA,EAyBU,IAzBVA,EA0BU,EAGhB,SAASG,EAAgBC,EAAsBC,GAC3C,OAAOD,EAAeE,KAAKC,KAAK,EAAIF,EAAeA,EACvD,CAkBA,MAAMG,EAAU,KA8FhB,MAAMC,EAAe,CAAC,WAAY,UAC5BC,EAAc,CAAC,YAAa,UAAW,QAE7C,SAASC,EAAaC,EAAwBC,GAC1C,OAAOA,EAAKC,KAAMC,QAAkCC,IAAzBJ,EAAgBG,GAC/C,CAEA,SAASE,EAAiBL,GACtB,IAAIM,EAAgB,CAChBC,SAAUnB,EACVoB,UAAWpB,EACXqB,QAASrB,EACTsB,KAAMtB,EACNuB,wBAAwB,KACrBX,GAGP,IACKD,EAAaC,EAASF,IACvBC,EAAaC,EAASH,GAQtB,GAFAS,EAAcC,SAAW,EAErBP,EAAQY,eAAgB,CACxB,MAAMA,EAAiBZ,EAAQY,eACzBC,EAAQ,EAAInB,KAAKoB,IAAwB,IAAjBF,GACxBJ,EAAYK,EAAOA,EACnBJ,EACF,EACAM,EAAKA,MAAC,IAAM,EAAG,GAAKf,EAAQgB,QAAU,IACtCtB,KAAKC,KAAK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aAAcA,QAGlB,OAAOX,CACX,CAEAlC,EAAO8C,eAAkBvF,IACrB,MAAMwF,EAAmBC,EAAqBA,sBAACzF,EAAgB,IAAKyC,GAKpE,OAHAzC,EAAQ0F,KAAOF,EAAiBE,KAChC1F,EAAQkB,SAAWI,EAAAA,sBAAsBkE,EAAiBtE,UAC1DlB,EAAQ2F,KAAO,YACR3F"}
1
+ {"version":3,"file":"spring.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/spring.mjs"],"sourcesContent":["import { secondsToMilliseconds, millisecondsToSeconds, warning, clamp } 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 // 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};\n/**\n * Maps bounce to a damping ratio as SwiftUI does: 0 is critically damped, and\n * it approaches undamped towards 1 and infinitely overdamped towards -1. Both\n * ends are limited so the spring still moves and settles.\n */\nconst bounceToDampingRatio = (bounce) => bounce < 0\n ? 1 / Math.max(1 + bounce, springDefaults.minDamping)\n : Math.max(1 - bounce, springDefaults.minDamping);\n/**\n * Scales an overdamped spring's undamped frequency so that, at its defining\n * time, it has as far left to go as the critically damped spring that's\n * criticalFreqTime radians in by then. A negative bounce then changes the\n * shape of the curve, not when it arrives. 1 at a damping ratio of 1, so\n * there's no jump at a bounce of 0.\n *\n * Solved by Newton on the remaining distance (times fast - slow), which is\n * convex from criticalFreqTime onwards. criticalFreqTime is always below the\n * answer, so it converges from below without overshooting.\n */\nfunction overdampedFreqScale(dampingRatio, criticalFreqTime) {\n if (!(dampingRatio > 1))\n return 1;\n const root = Math.sqrt(dampingRatio * dampingRatio - 1);\n const slow = dampingRatio - root;\n const fast = dampingRatio + root;\n const target = 2 * root * Math.exp(-criticalFreqTime) * (1 + criticalFreqTime);\n return (approximateRoot((freqTime) => fast * Math.exp(-slow * freqTime) -\n slow * Math.exp(-fast * freqTime) -\n target, (freqTime) => Math.exp(-fast * freqTime) - Math.exp(-slow * freqTime), criticalFreqTime) / criticalFreqTime);\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;\n/**\n * Assumes zero initial velocity and the default mass: time-defined springs\n * ignore inherited velocity and only resolve without valid physics. Returns\n * NaN physics when the root search doesn't converge.\n */\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n const dampingRatio = bounceToDampingRatio(bounce);\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 b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (exponentialDecay / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const e = dampingRatio *\n dampingRatio *\n undampedFreq *\n undampedFreq *\n duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(undampedFreq * undampedFreq, dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * -e * f) / g;\n };\n }\n else {\n /**\n * Critically-damped spring. Overdamped springs reuse this root,\n * scaled below.\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = undampedFreq * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = -undampedFreq * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const criticalFreq = approximateRoot(envelope, derivative, initialGuess);\n const undampedFreq = criticalFreq *\n overdampedFreqScale(dampingRatio, criticalFreq * duration);\n const stiffness = undampedFreq * undampedFreq;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(stiffness),\n duration: secondsToMilliseconds(duration),\n };\n}\n/**\n * Spring physics must be finite. stiffness and mass are also divisors so must\n * be positive, whereas a damping of 0 is a valid, perpetually oscillating\n * spring. Relational rather than Number.isFinite so numeric strings still\n * coerce.\n */\nconst isValidPhysics = (value, canBeZero) => (canBeZero ? value >= 0 : value > 0) && value < Infinity;\n/**\n * Returns value if it's usable spring physics, otherwise undefined so callers\n * fall back to the default. An explicit `undefined`, e.g. from a forwarded\n * optional prop, must fall back too. Invalid physics would otherwise resolve\n * to NaN spring values that never report done.\n */\nfunction resolvePhysics(value, canBeZero) {\n if (isValidPhysics(value, canBeZero))\n return value;\n if (process.env.NODE_ENV !== \"production\") {\n warning(value === undefined, \"Spring stiffness and mass must be positive, damping 0 or greater\", \"spring-invalid-physics\");\n }\n return undefined;\n}\nfunction getSpringOptions(options) {\n /**\n * Resolve physics before choosing between physics- and duration-based\n * resolution, so an invalid stiffness doesn't also silently discard a\n * valid duration/bounce.\n */\n const validStiffness = resolvePhysics(options.stiffness);\n const validDamping = resolvePhysics(options.damping, true);\n const validMass = resolvePhysics(options.mass);\n const springOptions = {\n ...options,\n stiffness: validStiffness ?? springDefaults.stiffness,\n damping: validDamping ?? springDefaults.damping,\n mass: validMass ?? springDefaults.mass,\n isResolvedFromDuration: false,\n // stiffness/damping/mass overrides duration/bounce\n isTimeDefined: (validStiffness ?? validDamping ?? validMass) === undefined &&\n (options.duration !== undefined || options.bounce !== undefined),\n };\n if (springOptions.isTimeDefined) {\n if (options.visualDuration) {\n const dampingRatio = bounceToDampingRatio(options.bounce || 0);\n const root = ((2 * Math.PI) / (options.visualDuration * 1.2)) *\n overdampedFreqScale(dampingRatio, (2 * Math.PI) / 1.2);\n springOptions.stiffness = root * root;\n springOptions.damping =\n 2 * dampingRatio * Math.sqrt(springOptions.stiffness);\n }\n else {\n Object.assign(springOptions, findSpring(springOptions));\n springOptions.isResolvedFromDuration = true;\n }\n /**\n * Time options can degenerate: a NaN bounce gives a NaN damping, an\n * infinite visualDuration a 0 stiffness, and findSpring NaN for both\n * when it doesn't converge. Replace the two together, so the\n * relationship duration resolution establishes between them is never\n * left half-overwritten.\n */\n if (!isValidPhysics(springOptions.stiffness) ||\n !isValidPhysics(springOptions.damping, true)) {\n springOptions.stiffness = springDefaults.stiffness;\n springOptions.damping = springDefaults.damping;\n }\n }\n return springOptions;\n}\nfunction springGenerator(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 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, isResolvedFromDuration, isTimeDefined, } = getSpringOptions({ ...options });\n /**\n * Time-defined springs ignore inherited velocity. Velocity from\n * interrupted animations causes massive oscillation on small-range\n * animations.\n */\n const inheritVelocity = (velocity) => isTimeDefined ? 0 : -millisecondsToSeconds(velocity);\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n const decay = dampingRatio * undampedAngularFreq;\n /**\n * Everything that changes when the spring is retargeted: written by\n * retarget() and update(), read by the resolvers. Grouped on one object,\n * like the coefficients (c) below. Writing doubles to object fields\n * measured marginally faster than to captured let variables in optimised\n * code; neither allocates, so this is a grouping choice, not a GC one.\n */\n const s = {\n target,\n delta: target - origin,\n velocity: inheritVelocity(options.velocity || 0) || 0,\n restSpeed: 0,\n restDelta: 0,\n };\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 empirically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const setRestThresholds = () => {\n const isGranularScale = Math.abs(s.delta) < 5;\n s.restSpeed =\n options.restSpeed ||\n (isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n s.restDelta =\n options.restDelta ||\n (isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n };\n setRestThresholds();\n let resolveSpring;\n let resolveVelocity;\n /**\n * Derives the coefficients that depend on origin, target and initial\n * velocity. Called once now and again whenever the spring is retargeted.\n */\n let update;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n /**\n * A is the position coefficient, sinC/cosC the coefficients of the\n * analytical derivative (px/ms). The exp/sin/cos terms depend only\n * on t, so they're memoized by t independently of the target: a\n * spring retargeted every frame samples the same t each frame and\n * skips the transcendentals entirely.\n */\n const c = { A: 0, sinC: 0, cosC: 0, t: -1, env: 0, sin: 0, cos: 0 };\n update = () => {\n c.A = (s.velocity + decay * s.delta) / angularFreq;\n c.sinC = decay * c.A + s.delta * angularFreq;\n c.cosC = decay * s.delta - c.A * angularFreq;\n };\n const sample = (t) => {\n if (t !== c.t) {\n c.t = t;\n c.env = Math.exp(-decay * t);\n c.sin = Math.sin(angularFreq * t);\n c.cos = Math.cos(angularFreq * t);\n }\n };\n // Underdamped spring\n resolveSpring = (t) => {\n sample(t);\n return s.target - c.env * (c.A * c.sin + s.delta * c.cos);\n };\n resolveVelocity = (t) => {\n sample(t);\n return c.env * (c.sinC * c.sin + c.cosC * c.cos);\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => s.target -\n Math.exp(-undampedAngularFreq * t) *\n (s.delta + (s.velocity + undampedAngularFreq * s.delta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const c = { C: 0 };\n update = () => {\n c.C = s.velocity + undampedAngularFreq * s.delta;\n };\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * c.C * t - s.velocity);\n }\n else {\n /**\n * Overdamped spring: the sum of a slow and a fast decaying\n * exponential, so no term can overflow however heavily it's damped.\n */\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n const slow = decay - dampedAngularFreq;\n const fast = decay + dampedAngularFreq;\n /**\n * Physics-defined springs keep a non-physical limit: once\n * dampedAngularFreq * t passes 300, both terms decay at the damping\n * rate. Heavily overdamped drag springs (dragElastic: 0,\n * dragTransition) rely on this to settle almost at once rather than\n * creep at stiffness / damping. Negative bounce needs the exact\n * curve, so time-defined springs are exempt.\n */\n const limit = isTimeDefined ? Infinity : 300 / dampedAngularFreq;\n const decayAt = (rate, t) => Math.exp(t > limit ? -rate * limit - decay * (t - limit) : -rate * t);\n const c = { S: 0, F: 0 };\n update = () => {\n const P = (s.velocity + decay * s.delta) / dampedAngularFreq;\n c.S = (s.delta + P) / 2;\n c.F = (s.delta - P) / 2;\n };\n resolveSpring = (t) => s.target - c.S * decayAt(slow, t) - c.F * decayAt(fast, t);\n // Analytical derivative of overdamped spring (px/ms)\n resolveVelocity = (t) => slow * c.S * decayAt(slow, t) + fast * c.F * decayAt(fast, t);\n }\n update();\n const calculatedDuration = isResolvedFromDuration ? duration || null : null;\n const generator = {\n calculatedDuration,\n /**\n * Aim the spring at a new target from its current position and\n * velocity, reusing the resolved physics and closures.\n */\n retarget: (keyframes, newVelocity) => {\n s.target = keyframes[keyframes.length - 1];\n s.delta = s.target - keyframes[0];\n s.velocity = inheritVelocity(newVelocity);\n // Default thresholds depend on the scale of the new delta\n if (!(options.restSpeed && options.restDelta))\n setRestThresholds();\n // Invalidate any duration lazily cached by JSAnimation\n generator.calculatedDuration = calculatedDuration;\n state.done = false;\n update();\n },\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= s.restSpeed &&\n Math.abs(s.target - current) <= s.restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? s.target : current;\n return state;\n },\n toString: () => {\n const easingDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(easingDuration * progress).value, easingDuration, 30);\n return easingDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nconst spring = /* @__PURE__ */ Object.assign(springGenerator, {\n applyToOptions: (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, springGenerator);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n },\n});\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n"],"names":["springDefaults","granular","default","bounceToDampingRatio","bounce","Math","max","overdampedFreqScale","dampingRatio","criticalFreqTime","root","sqrt","slow","fast","target","exp","approximateRoot","freqTime","calcAngularFreq","undampedFreq","rootIterations","envelope","derivative","initialGuess","result","i","safeMin","isValidPhysics","value","canBeZero","Infinity","resolvePhysics","process","env","NODE_ENV","warning","undefined","getSpringOptions","options","validStiffness","stiffness","validDamping","damping","validMass","mass","springOptions","isResolvedFromDuration","isTimeDefined","duration","visualDuration","PI","Object","assign","secondsToMilliseconds","clamp","millisecondsToSeconds","exponentialDecay","delta","b","c","e","f","g","criticalFreq","findSpring","springGenerator","optionsOrVisualDuration","keyframes","origin","length","state","done","inheritVelocity","velocity","undampedAngularFreq","decay","s","restSpeed","restDelta","setRestThresholds","isGranularScale","abs","resolveSpring","resolveVelocity","update","angularFreq","A","sinC","cosC","t","sin","cos","sample","C","dampedAngularFreq","limit","decayAt","rate","S","F","P","calculatedDuration","generator","retarget","newVelocity","next","current","currentVelocity","toString","easingDuration","min","calcGeneratorDuration","maxGeneratorDuration","easing","generateLinearEasing","progress","toTransition","spring","applyToOptions","generatorOptions","createGeneratorEasing","ease","type"],"mappings":"qZAoBA,MAAMA,EAES,IAFTA,EAGO,GAHPA,EAII,EAJJA,EAOQ,IAPRA,EAQM,GARNA,EASc,GATdA,EAYS,CACPC,SAAU,IACVC,QAAS,GAdXF,EAgBS,CACPC,SAAU,KACVC,QAAS,IAlBXF,EAsBW,IAtBXA,EAuBW,GAvBXA,EAwBU,IAQVG,EAAwBC,GAC1BA,EAAS,EACH,EAAIC,KAAKC,IAAI,EAAIF,EAAQJ,GACzBK,KAAKC,IAAI,EAAIF,EAAQJ,GAa/B,SAASO,EAAoBC,EAAsBC,GAC/C,KAAMD,EAAe,GAAI,OAAO,EAEhC,MAAME,EAAOL,KAAKM,KAAKH,EAAeA,EAAe,GAC/CI,EAAOJ,EAAeE,EACtBG,EAAOL,EAAeE,EACtBI,EACF,EAAIJ,EAAOL,KAAKU,KAAKN,IAAqB,EAAIA,GAElD,OACIO,EACKC,GACGJ,EAAOR,KAAKU,KAAKH,EAAOK,GACxBL,EAAOP,KAAKU,KAAKF,EAAOI,GACxBH,EACHG,GACGZ,KAAKU,KAAKF,EAAOI,GAAYZ,KAAKU,KAAKH,EAAOK,GAClDR,GACAA,CAEZ,CAEA,SAASS,EAAgBC,EAAsBX,GAC3C,OAAOW,EAAed,KAAKM,KAAK,EAAIH,EAAeA,EACvD,CAEA,MAAMY,E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AChCnF,EAAQU,SAAWK,EAAAA,sBAAsBkE,EAAiBvE,UAC1DV,EAAQoF,KAAO,YACRpF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=2e4;exports.calcGeneratorDuration=function(t){let r=0,o=t.next(r);for(;!o.done&&r<e;)r+=50,o=t.next(r);return r>=e?1/0:r},exports.maxGeneratorDuration=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.calcGeneratorDuration=function(e,t=50,r=2e4,o){let n=0,u=e.next(n);for(o?.push(u.value);!u.done&&n<r;)n+=t,u=e.next(n),o?.push(u.value);return n>=r?1/0:n},exports.maxGeneratorDuration=2e4;
2
2
  //# sourceMappingURL=calc-duration.mjs.js.map
@@ -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//# 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
+ {"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, timeStep = 50, maxDuration = maxGeneratorDuration, keyframes) {\n let duration = 0;\n let state = generator.next(duration);\n keyframes?.push(state.value);\n while (!state.done && duration < maxDuration) {\n duration += timeStep;\n state = generator.next(duration);\n keyframes?.push(state.value);\n }\n return duration >= maxDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n"],"names":["generator","timeStep","maxDuration","keyframes","duration","state","next","push","value","done","Infinity"],"mappings":"kGAQM,SACFA,EACAC,EAAW,GACXC,EALgC,IAMhCC,GAEA,IAAIC,EAAW,EACXC,EAAQL,EAAUM,KAAKF,GAG3B,IAFAD,GAAWI,KAAKF,EAAMG,QAEdH,EAAMI,MAAQL,EAAWF,GAC7BE,GAAYH,EACZI,EAAQL,EAAUM,KAAKF,GACvBD,GAAWI,KAAKF,EAAMG,OAG1B,OAAOJ,GAAYF,EAAcQ,IAAWN,CAChD,+BAnBoC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./calc-duration.mjs.js"),r=require("../../../../../../motion-utils/dist/es/time-conversion.mjs.js");exports.createGeneratorEasing=function(t,s=100,n){const o=n({...t,keyframes:[0,s]}),a=Math.min(e.calcGeneratorDuration(o),e.maxGeneratorDuration);return{type:"keyframes",ease:e=>o.next(a*e).value/s,duration:r.millisecondsToSeconds(a)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./calc-duration.mjs.js"),r=require("../../../../../../motion-utils/dist/es/time-conversion.mjs.js");exports.createGeneratorEasing=function(t,o=100,s){const{keyframes:n,velocity:a}=t,i=n&&n[n.length-1]-n[0],c=s({...t,velocity:a&&i?a*o/i:a,keyframes:[0,o]}),u=Math.min(e.calcGeneratorDuration(c),e.maxGeneratorDuration);return{type:"keyframes",ease:e=>c.next(u*e).value/o,duration:r.millisecondsToSeconds(u)}};
2
2
  //# sourceMappingURL=create-generator-easing.mjs.js.map
@@ -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//# sourceMappingURL=create-generator-easing.mjs.map\n"],"names":["options","scale","createGenerator","generator","keyframes","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"qNAOM,SACFA,EACAC,EAAQ,IACRC,GAEA,MAAMC,EAAYD,EAAgB,IAAKF,EAASI,UAAW,CAAC,EAAGH,KACzDI,EAAWC,KAAKC,IAClBC,EAAqBA,sBAACL,GACtBM,EAAAA,sBAGJ,MAAO,CACHC,KAAM,YACNC,KAAOC,GACIT,EAAUU,KAAKR,EAAWO,GAAUE,MAAQb,EAEvDI,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 /**\n * The easing is generated over 0 - scale, but velocity is in the\n * value's own units, so scale it to match. Otherwise an interrupted\n * spring hands off the wrong speed, or direction. Keyframes with\n * units (colours, filters, mixed units) give NaN, which is falsy,\n * so their velocity passes through unscaled.\n */\n const { keyframes: k, velocity: v } = options;\n const delta = k && k[k.length - 1] - k[0];\n const generator = createGenerator({\n ...options,\n velocity: v && delta ? (v * scale) / delta : v,\n keyframes: [0, scale],\n });\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","createGenerator","keyframes","k","velocity","v","delta","length","generator","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"qNAOM,SACFA,EACAC,EAAQ,IACRC,GASA,MAAQC,UAAWC,EAAGC,SAAUC,GAAMN,EAChCO,EAAQH,GAAKA,EAAEA,EAAEI,OAAS,GAAKJ,EAAE,GAEjCK,EAAYP,EAAgB,IAC3BF,EACHK,SAAUC,GAAKC,EAASD,EAAIL,EAASM,EAAQD,EAC7CH,UAAW,CAAC,EAAGF,KAEbS,EAAWC,KAAKC,IAClBC,EAAqBA,sBAACJ,GACtBK,EAAAA,sBAGJ,MAAO,CACHC,KAAM,YACNC,KAAOC,GACIR,EAAUS,KAAKR,EAAWO,GAAUE,MAAQlB,EAEvDS,SAAUU,EAAqBA,sBAACV,GAExC"}
@@ -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.getGeneratorVelocity=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");function t(t,o,r){const c=Math.max(o-5,0);return e.velocityPerSecond(r-t(c),o-c)}exports.calcGeneratorVelocity=function(e,o,r=0){return o<=0?r:e.velocity?e.velocity(o):t(t=>e.next(t).value,o,e.next(o).value)},exports.getGeneratorVelocity=t;
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 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"}
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/**\n * A generator's velocity at time t in units/second: analytical where the\n * generator provides it (springs), otherwise by finite difference. Before\n * the animation has started this is its initial velocity.\n */\nfunction calcGeneratorVelocity(generator, t, initialVelocity = 0) {\n if (t <= 0)\n return initialVelocity;\n return generator.velocity\n ? generator.velocity(t)\n : getGeneratorVelocity((s) => generator.next(s).value, t, generator.next(t).value);\n}\n\nexport { calcGeneratorVelocity, getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n"],"names":["getGeneratorVelocity","resolveValue","t","current","prevT","Math","max","velocityPerSecond","generator","initialVelocity","velocity","s","next","value"],"mappings":"uJAKgBA,SAAAA,EACZC,EACAC,EACAC,GAEA,MAAMC,EAAQC,KAAKC,IAAIJ,EAPI,EAOwB,GACnD,OAAOK,EAAAA,kBAAkBJ,EAAUF,EAAaG,GAAQF,EAAIE,EAChE,+BAOM,SACFI,EACAN,EACAO,EAAkB,GAElB,OAAIP,GAAK,EAAUO,EAEZD,EAAUE,SACXF,EAAUE,SAASR,GACnBF,EACKW,GAAMH,EAAUI,KAAKD,GAAGE,MACzBX,EACAM,EAAUI,KAAKV,GAAGW,MAEhC"}
@@ -1,2 +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=(u,d,y,p={},j,f)=>c=>{const A=t.getValueTransition(p,u)||{},g=A.delay||p.delay||0;let{elapsed:k=0}=p;k-=l.secondsToMilliseconds(g);const q={keyframes:Array.isArray(y)?y:[null,y],ease:"easeOut",velocity:d.getVelocity(),...A,delay:-k,onUpdate:e=>{d.set(e),A.onUpdate&&A.onUpdate(e)},onComplete:()=>{c(),A.onComplete&&A.onComplete()},name:u,motionValue:d,element:f?void 0:j};a.isTransitionDefined(A)||Object.assign(q,o.getDefaultTransition(u,q)),q.duration&&(q.duration=l.secondsToMilliseconds(q.duration)),q.repeatDelay&&(q.repeatDelay=l.secondsToMilliseconds(q.repeatDelay)),void 0!==q.from&&(q.keyframes[0]=q.from);let v=!1;if((!1===q.type||0===q.duration&&!q.repeatDelay)&&(n.makeAnimationInstant(q),0===q.delay&&(v=!0)),(m.MotionGlobalConfig.instantAnimations||m.MotionGlobalConfig.skipAnimations||j?.shouldSkipAnimations||A.skipAnimations)&&(v=!0,n.makeAnimationInstant(q),q.delay=0),q.allowFlatten=!A.type&&!A.ease,v&&!f&&void 0!==d.get()){const e=s.getFinalKeyframe(q.keyframes,A);if(void 0!==e)return void r.frame.update(()=>{q.onUpdate(e),q.onComplete()})}return A.isSync?new i.JSAnimation(q):new e.AsyncMotionValueAnimation(q)};
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=(d,u,p,y={},j,f)=>c=>{const A=t.getValueTransition(y,d)||{},g=A.delay||y.delay||0;let{elapsed:k=0}=y;k-=l.secondsToMilliseconds(g);const q={keyframes:Array.isArray(p)?p:[null,p],ease:"easeOut",velocity:u.getVelocity(),...A,delay:-k,onUpdate:e=>{u.set(e),A.onUpdate&&A.onUpdate(e)},onComplete:()=>{c(),A.onComplete&&A.onComplete()},name:d,motionValue:u,element:f?void 0:j,hasOnUpdate:!!A.onUpdate};a.isTransitionDefined(A)||Object.assign(q,o.getDefaultTransition(d,q)),q.duration&&(q.duration=l.secondsToMilliseconds(q.duration)),q.repeatDelay&&(q.repeatDelay=l.secondsToMilliseconds(q.repeatDelay)),void 0!==q.from&&(q.keyframes[0]=q.from);let v=!1;if((!1===q.type||0===q.duration&&!q.repeatDelay)&&(n.makeAnimationInstant(q),0===q.delay&&(v=!0)),(m.MotionGlobalConfig.instantAnimations||m.MotionGlobalConfig.skipAnimations||j?.shouldSkipAnimations||A.skipAnimations)&&(v=!0,n.makeAnimationInstant(q),q.delay=0),q.allowFlatten=!A.type&&!A.ease,v&&!f&&void 0!==u.get()){const e=s.getFinalKeyframe(q.keyframes,A);if(void 0!==e)return void r.frame.update(()=>{q.onUpdate(e),q.onComplete()})}return A.isSync?new i.JSAnimation(q):new e.AsyncMotionValueAnimation(q)};
2
2
  //# sourceMappingURL=motion-value.mjs.js.map
@@ -1 +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":["animateMotionValue","name","value","target","transition","element","isHandoff","onComplete","valueTransition","getValueTransition","delay","elapsed","secondsToMilliseconds","options","keyframes","Array","isArray","ease","velocity","getVelocity","onUpdate","v","set","motionValue","undefined","isTransitionDefined","Object","assign","getDefaultTransition","duration","repeatDelay","from","shouldSkip","type","makeAnimationInstant","MotionGlobalConfig","instantAnimations","skipAnimations","shouldSkipAnimations","allowFlatten","get","finalKeyframe","getFinalKeyframe","frame","update","isSync","JSAnimation","AsyncMotionValueAnimation"],"mappings":"omBAmBIA,CACIC,EACAC,EACAC,EACAC,EAAqD,GACrDC,EACAC,IAEHC,IACG,MAAMC,EAAkBC,EAAkBA,mBAACL,EAAYH,IAAS,CAAA,EAO1DS,EAAQF,EAAgBE,OAASN,EAAWM,OAAS,EAM3D,IAAIC,QAAEA,EAAU,GAAMP,EACtBO,GAAoBC,wBAAsBF,GAE1C,MAAMG,EAAiC,CACnCC,UAAWC,MAAMC,QAAQb,GAAUA,EAAS,CAAC,KAAMA,GACnDc,KAAM,UACNC,SAAUhB,EAAMiB,iBACbX,EACHE,OAAQC,EACRS,SAAWC,IACPnB,EAAMoB,IAAID,GACVb,EAAgBY,UAAYZ,EAAgBY,SAASC,IAEzDd,WAAYA,KACRA,IACAC,EAAgBD,YAAcC,EAAgBD,cAElDN,OACAsB,YAAarB,EACbG,QAASC,OAAYkB,EAAYnB,GAOhCoB,EAAAA,oBAAoBjB,IACrBkB,OAAOC,OAAOd,EAASe,EAAoBA,qBAAC3B,EAAMY,IAQtDA,EAAQgB,WAARhB,EAAQgB,SAAajB,EAAAA,sBAAsBC,EAAQgB,WACnDhB,EAAQiB,cAARjB,EAAQiB,YAAgBlB,EAAAA,sBAAsBC,EAAQiB,mBAKjCN,IAAjBX,EAAQkB,OACRlB,EAAQC,UAAU,GAAKD,EAAQkB,MAGnC,IAAIC,GAAa,EAmCjB,KAhC8B,IAAzBnB,EAAgBoB,MACK,IAArBpB,EAAQgB,WAAmBhB,EAAQiB,eAEpCI,EAAoBA,qBAACrB,GAEC,IAAlBA,EAAQH,QACRsB,GAAa,KAKjBG,EAAkBA,mBAACC,mBACnBD,qBAAmBE,gBACnBhC,GAASiC,sBACT9B,EAAgB6B,kBAEhBL,GAAa,EACbE,EAAoBA,qBAACrB,GACrBA,EAAQH,MAAQ,GAOpBG,EAAQ0B,cAAgB/B,EAAgByB,OAASzB,EAAgBS,KAO7De,IAAe1B,QAA6BkB,IAAhBtB,EAAMsC,MAAqB,CACvD,MAAMC,EAAgBC,EAAgBA,iBAClC7B,EAAQC,UACRN,GAGJ,QAAsBgB,IAAlBiB,EAMA,YALAE,EAAKA,MAACC,OAAO,KACT/B,EAAQO,SAAUqB,GAClB5B,EAAQN,cAKpB,CAEA,OAAOC,EAAgBqC,OACjB,IAAIC,EAAWA,YAACjC,GAChB,IAAIkC,EAAAA,0BAA0BlC"}
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 hasOnUpdate: !!valueTransition.onUpdate,\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":["animateMotionValue","name","value","target","transition","element","isHandoff","onComplete","valueTransition","getValueTransition","delay","elapsed","secondsToMilliseconds","options","keyframes","Array","isArray","ease","velocity","getVelocity","onUpdate","v","set","motionValue","undefined","hasOnUpdate","isTransitionDefined","Object","assign","getDefaultTransition","duration","repeatDelay","from","shouldSkip","type","makeAnimationInstant","MotionGlobalConfig","instantAnimations","skipAnimations","shouldSkipAnimations","allowFlatten","get","finalKeyframe","getFinalKeyframe","frame","update","isSync","JSAnimation","AsyncMotionValueAnimation"],"mappings":"omBAmBIA,CACIC,EACAC,EACAC,EACAC,EAAqD,GACrDC,EACAC,IAEHC,IACG,MAAMC,EAAkBC,EAAkBA,mBAACL,EAAYH,IAAS,CAAA,EAO1DS,EAAQF,EAAgBE,OAASN,EAAWM,OAAS,EAM3D,IAAIC,QAAEA,EAAU,GAAMP,EACtBO,GAAoBC,wBAAsBF,GAE1C,MAAMG,EAAiC,CACnCC,UAAWC,MAAMC,QAAQb,GAAUA,EAAS,CAAC,KAAMA,GACnDc,KAAM,UACNC,SAAUhB,EAAMiB,iBACbX,EACHE,OAAQC,EACRS,SAAWC,IACPnB,EAAMoB,IAAID,GACVb,EAAgBY,UAAYZ,EAAgBY,SAASC,IAEzDd,WAAYA,KACRA,IACAC,EAAgBD,YAAcC,EAAgBD,cAElDN,OACAsB,YAAarB,EACbG,QAASC,OAAYkB,EAAYnB,EACjCoB,cAAejB,EAAgBY,UAO9BM,EAAAA,oBAAoBlB,IACrBmB,OAAOC,OAAOf,EAASgB,EAAoBA,qBAAC5B,EAAMY,IAQtDA,EAAQiB,WAARjB,EAAQiB,SAAalB,EAAAA,sBAAsBC,EAAQiB,WACnDjB,EAAQkB,cAARlB,EAAQkB,YAAgBnB,EAAAA,sBAAsBC,EAAQkB,mBAKjCP,IAAjBX,EAAQmB,OACRnB,EAAQC,UAAU,GAAKD,EAAQmB,MAGnC,IAAIC,GAAa,EAmCjB,KAhC8B,IAAzBpB,EAAgBqB,MACK,IAArBrB,EAAQiB,WAAmBjB,EAAQkB,eAEpCI,EAAoBA,qBAACtB,GAEC,IAAlBA,EAAQH,QACRuB,GAAa,KAKjBG,EAAkBA,mBAACC,mBACnBD,qBAAmBE,gBACnBjC,GAASkC,sBACT/B,EAAgB8B,kBAEhBL,GAAa,EACbE,EAAoBA,qBAACtB,GACrBA,EAAQH,MAAQ,GAOpBG,EAAQ2B,cAAgBhC,EAAgB0B,OAAS1B,EAAgBS,KAO7DgB,IAAe3B,QAA6BkB,IAAhBtB,EAAMuC,MAAqB,CACvD,MAAMC,EAAgBC,EAAgBA,iBAClC9B,EAAQC,UACRN,GAGJ,QAAsBgB,IAAlBkB,EAMA,YALAE,EAAKA,MAACC,OAAO,KACThC,EAAQO,SAAUsB,GAClB7B,EAAQN,cAKpB,CAEA,OAAOC,EAAgBsC,OACjB,IAAIC,EAAWA,YAAClC,GAChB,IAAImC,EAAAA,0BAA0BnC"}
@@ -1,2 +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({protectedKeys:e,needsAnimating:t},i){const n=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,n}exports.animateTarget=function(u,m,{delay:d=0,transitionOverride:c,type:p}={}){let{transition:f,transitionEnd:j,...g}=m;const y=u.getDefaultTransition();f=f?t.resolveTransition(f,y):y;const v=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,g,f,d,A);for(const t in g){const n=u.getValue(t,u.latestValues[t]??null),m=g[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 j=!1;if(window.MotionHandoffAnimation){const e=a.getOptimisedAppearId(u);if(e){const i=window.MotionHandoffAnimation(e,t,r.frame);null!==i&&(c.startTime=i,j=!0)}}s.addValueToWillChange(u,t);const y=v??u.shouldReduceMotion;n.start(o.animateMotionValue(t,n,m,y&&i.positionalKeys.has(t)?{type:!1}:c,u,j));const w=n.animation;w&&A.push(w)}if(j){const e=()=>r.frame.update(()=>{j&&n.setTarget(u,j)});A.length?Promise.all(A).then(e):e()}return A};
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"),a=require("../../value/will-change/add-will-change.mjs.js"),s=require("../optimized-appear/get-appear-id.mjs.js"),o=require("./motion-value.mjs.js"),r=require("../../frameloop/frame.mjs.js");const l="undefined"!=typeof window;function u({protectedKeys:e,needsAnimating:t},i){const n=i in e&&!t[i];return t[i]=!1,n}exports.animateTarget=function(d,m,{delay:c=0,transitionOverride:p,type:f}={}){let{transition:g,transitionEnd:j,...y}=m;const v=d.getDefaultTransition();g=g?t.resolveTransition(g,v):v;const V=g?.reduceMotion,h=g?.skipAnimations;p&&(g=p);const A=[],q=f&&d.animationState?.getState()[f],w=g?.path;w&&(w.animateValues?w.animateValues(e=>d.getValue(e,d.latestValues[e]??0),y,g,c,A):w.animateVisualElement?.(d,y,g,c,A));for(const t in y){const n=d.getValue(t,d.latestValues[t]??null),m=y[t];if(void 0===m||q&&u(q,t))continue;const p={delay:c,...e.getValueTransition(g||{},t)};h&&(p.skipAnimations=!0);const f=n.get();if(void 0!==f&&!n.isAnimating()&&!Array.isArray(m)&&m===f&&!p.velocity){r.frame.update(()=>n.set(m));continue}let j=!1;if(l&&window.MotionHandoffAnimation){const e=s.getOptimisedAppearId(d);if(e){const i=window.MotionHandoffAnimation(e,t,r.frame);null!==i&&(p.startTime=i,j=!0)}}a.addValueToWillChange(d,t);const v=V??d.shouldReduceMotion;n.start(o.animateMotionValue(t,n,m,v&&i.positionalKeys.has(t)?{type:!1}:p,d,j));const w=n.animation;w&&A.push(w)}if(j){const e=()=>r.frame.update(()=>{j&&n.setTarget(d,j)});A.length?Promise.all(A).then(e):e()}return A};
2
2
  //# sourceMappingURL=visual-element-target.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-element-target.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs"],"sourcesContent":["import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n"],"names":["shouldBlockAnimation","protectedKeys","needsAnimating","key","shouldBlock","hasOwnProperty","animateTarget","visualElement","targetAndTransition","delay","transitionOverride","type","transition","transitionEnd","target","defaultTransition","getDefaultTransition","resolveTransition","reduceMotion","skipAnimations","animations","animationTypeState","animationState","getState","path","animateVisualElement","value","getValue","latestValues","valueTarget","undefined","valueTransition","getValueTransition","currentValue","get","isAnimating","Array","isArray","velocity","frame","update","set","isHandoff","window","MotionHandoffAnimation","appearId","getOptimisedAppearId","startTime","addValueToWillChange","shouldReduceMotion","start","animateMotionValue","positionalKeys","has","animation","push","applyTransitionEnd","setTarget","length","Promise","all","then"],"mappings":"6cAqBA,SAASA,GACLC,cAAEA,EAAaC,eAAEA,GACjBC,GAEA,MAAMC,EACFH,EAAcI,eAAeF,KAAgC,IAAxBD,EAAeC,GAGxD,OADAD,EAAeC,IAAO,EACfC,CACX,uBAEgBE,SACZC,EACAC,GACAC,MAAEA,EAAQ,EAACC,mBAAEA,EAAkBC,KAAEA,GAAwC,IAEzE,IAAIC,WACAA,EAAUC,cACVA,KACGC,GACHN,EAEJ,MAAMO,EAAoBR,EAAcS,uBACxCJ,EAAaA,EACPK,EAAiBA,kBAACL,EAAYG,GAC9BA,EAEN,MAAMG,EAAgBN,GAA2CM,aAC3DC,EAAiBP,GAAYO,eAE/BT,IAAoBE,EAAaF,GAErC,MAAMU,EAAkD,GAElDC,EACFV,GACAJ,EAAce,gBACdf,EAAce,eAAeC,WAAWZ,GAEtCa,EAAQZ,GAAkDY,KAC5DA,GAEAA,EAAKC,qBACDlB,EACAO,EACAF,EACAH,EACAW,GAIR,IAAK,MAAMjB,KAAOW,EAAQ,CACtB,MAAMY,EAAQnB,EAAcoB,SACxBxB,EACAI,EAAcqB,aAAazB,IAAQ,MAEjC0B,EAAcf,EAAOX,GAE3B,QACoB2B,IAAhBD,GACCR,GACGrB,EAAqBqB,EAAoBlB,GAE7C,SAGJ,MAAM4B,EAAkB,CACpBtB,WACGuB,qBAAmBpB,GAAc,CAAE,EAAET,IAGxCgB,IAAgBY,EAAgBZ,gBAAiB,GAOrD,MAAMc,EAAeP,EAAMQ,MAC3B,QACqBJ,IAAjBG,IACCP,EAAMS,gBACNC,MAAMC,QAAQR,IACfA,IAAgBI,IACfF,EAAgBO,SACnB,CACEC,EAAKA,MAACC,OAAO,IAAMd,EAAMe,IAAIZ,IAC7B,QACJ,CAMA,IAAIa,GAAY,EAChB,GAAIC,OAAOC,uBAAwB,CAC/B,MAAMC,EAAWC,uBAAqBvC,GAEtC,GAAIsC,EAAU,CACV,MAAME,EAAYJ,OAAOC,uBACrBC,EACA1C,EACAoC,EAAAA,OAGc,OAAdQ,IACAhB,EAAgBgB,UAAYA,EAC5BL,GAAY,EAEpB,CACJ,CAEAM,uBAAqBzC,EAAeJ,GAEpC,MAAM8C,EACF/B,GAAgBX,EAAc0C,mBAElCvB,EAAMwB,MACFC,qBACIhD,EACAuB,EACAG,EACAoB,GAAsBG,EAAcA,eAACC,IAAIlD,GACnC,CAAEQ,MAAM,GACRoB,EACNxB,EACAmC,IAIR,MAAMY,EAAY5B,EAAM4B,UAEpBA,GACAlC,EAAWmC,KAAKD,EAExB,CAEA,GAAIzC,EAAe,CACf,MAAM2C,EAAqBA,IACvBjB,QAAMC,OAAO,KACT3B,GAAiB4C,EAASA,UAAClD,EAAeM,KAG9CO,EAAWsC,OACXC,QAAQC,IAAIxC,GAAYyC,KAAKL,GAE7BA,GAER,CAEA,OAAOpC,CACX"}
1
+ {"version":3,"file":"visual-element-target.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs"],"sourcesContent":["import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst isBrowser = typeof window !== \"undefined\";\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = key in protectedKeys && !needsAnimating[key];\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type && visualElement.animationState?.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateValues\n ? path.animateValues((key) => visualElement.getValue(key, visualElement.latestValues[key] ?? 0), target, transition, delay, animations)\n : path.animateVisualElement?.(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (isBrowser && window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n"],"names":["isBrowser","window","shouldBlockAnimation","protectedKeys","needsAnimating","key","shouldBlock","animateTarget","visualElement","targetAndTransition","delay","transitionOverride","type","transition","transitionEnd","target","defaultTransition","getDefaultTransition","resolveTransition","reduceMotion","skipAnimations","animations","animationTypeState","animationState","getState","path","animateValues","getValue","latestValues","animateVisualElement","value","valueTarget","undefined","valueTransition","getValueTransition","currentValue","get","isAnimating","Array","isArray","velocity","frame","update","set","isHandoff","MotionHandoffAnimation","appearId","getOptimisedAppearId","startTime","addValueToWillChange","shouldReduceMotion","start","animateMotionValue","positionalKeys","has","animation","push","applyTransitionEnd","setTarget","length","Promise","all","then"],"mappings":"6cAeA,MAAMA,EAA8B,oBAAXC,OAQzB,SAASC,GACLC,cAAEA,EAAaC,eAAEA,GACjBC,GAEA,MAAMC,EAAcD,KAAOF,IAAkBC,EAAeC,GAG5D,OADAD,EAAeC,IAAO,EACfC,CACX,uBAEgBC,SACZC,EACAC,GACAC,MAAEA,EAAQ,EAACC,mBAAEA,EAAkBC,KAAEA,GAAwC,IAEzE,IAAIC,WACAA,EAAUC,cACVA,KACGC,GACHN,EAEJ,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,EACAmB,GAAsBG,EAAcA,eAACC,IAAIjD,GACnC,CAAEO,MAAM,GACRqB,EACNzB,EACAoC,IAIR,MAAMW,EAAYzB,EAAMyB,UAIpBA,GACAlC,EAAWmC,KAAKD,EAExB,CAEA,GAAIzC,EAAe,CACf,MAAM2C,EAAqBA,IACvBhB,QAAMC,OAAO,KACT5B,GAAiB4C,EAASA,UAAClD,EAAeM,KAG9CO,EAAWsC,OACXC,QAAQC,IAAIxC,GAAYyC,KAAKL,GAE7BA,GAER,CAEA,OAAOpC,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),r=require("../utils/calc-child-stagger.mjs.js"),t=require("./visual-element-target.mjs.js");function i(n,a,s={}){const o=e.resolveVariant(n,a,"exit"===s.type?n.presenceContext?.custom:void 0);let{transition:l=n.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(l=s.transitionOverride);const c=o?()=>Promise.all(t.animateTarget(n,o,s)):()=>Promise.resolve(),d=n.variantChildren&&n.variantChildren.size?(e=0)=>{const{delayChildren:t=0,staggerChildren:o,staggerDirection:c}=l;return function(e,t,n=0,a=0,s=0,o=1,l){const c=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),c.push(i(d,t,{...l,delay:n+("function"==typeof a?0:a)+r.calcChildStagger(e.variantChildren,d,a,s,o)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(c)}(n,a,e,t,o,c,s)}:()=>Promise.resolve(),{when:u}=l;if(u){const[e,r]="beforeChildren"===u?[c,d]:[d,c];return e().then(()=>r())}return Promise.all([c(),d(s.delay)])}exports.animateVariant=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("../utils/calc-child-stagger.mjs.js"),r=require("./visual-element-target.mjs.js");exports.animateVariant=function i(n,a,s={}){const l=e.resolveVariant(n,a,e.getTypeCustom(n,s.type)),o=s.transitionOverride||(l?.transition??(n.getDefaultTransition()||{})),u=()=>Promise.all(l?r.animateTarget(n,l,s):[]),c=(e=0)=>{const{variantChildren:r}=n,{delayChildren:l=0,staggerChildren:u,staggerDirection:c}=o,d=[];return r?.forEach(n=>{n.notify("AnimationStart",a),d.push(i(n,a,{...s,delay:e+("function"==typeof l?0:l)+t.calcChildStagger(r,n,l,u,c)}).then(()=>n.notify("AnimationComplete",a)))}),Promise.all(d)},{when:d}=o;return d?"beforeChildren"===d?u().then(()=>c()):c().then(u):Promise.all([u(),c(s.delay)])};
2
2
  //# sourceMappingURL=visual-element-variant.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-element-variant.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n for (const child of visualElement.variantChildren) {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n }\n return Promise.all(animations);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n"],"names":["animateVariant","visualElement","variant","options","resolved","resolveVariant","type","presenceContext","custom","undefined","transition","getDefaultTransition","transitionOverride","getAnimation","Promise","all","animateTarget","resolve","getChildAnimations","variantChildren","size","forwardDelay","delayChildren","staggerChildren","staggerDirection","delay","animations","child","notify","push","calcChildStagger","then","animateChildren","when","first","last"],"mappings":"oOAOM,SAAUA,EACZC,EACAC,EACAC,EAAyC,CAAA,GAEzC,MAAMC,EAAWC,EAAAA,eACbJ,EACAC,EACiB,SAAjBC,EAAQG,KACFL,EAAcM,iBAAiBC,YAC/BC,GAGV,IAAIC,WAAEA,EAAaT,EAAcU,wBAA0B,CAAA,GACvDP,GAAY,CAAA,EAEZD,EAAQS,qBACRF,EAAaP,EAAQS,oBAOzB,MAAMC,EAAmCT,EACnC,IAAMU,QAAQC,IAAIC,EAAaA,cAACf,EAAeG,EAAUD,IACzD,IAAMW,QAAQG,UAMdC,EACFjB,EAAckB,iBAAmBlB,EAAckB,gBAAgBC,KACzD,CAACC,EAAe,KACZ,MAAMC,cACFA,EAAgB,EAACC,gBACjBA,EAAeC,iBACfA,GACAd,EAEJ,OA6BlB,SACIT,EACAC,EACAuB,EAAgB,EAChBH,EAAgD,EAChDC,EAAkB,EAClBC,EAAmB,EACnBrB,GAEA,MAAMuB,EAA6B,GAEnC,IAAK,MAAMC,KAAS1B,EAAckB,gBAC9BQ,EAAMC,OAAO,iBAAkB1B,GAC/BwB,EAAWG,KACP7B,EAAe2B,EAAOzB,EAAS,IACxBC,EACHsB,MACIA,GAC0B,mBAAlBH,EAA+B,EAAIA,GAC3CQ,EAAAA,iBACI7B,EAAckB,gBACdQ,EACAL,EACAC,EACAC,KAETO,KAAK,IAAMJ,EAAMC,OAAO,oBAAqB1B,KAIxD,OAAOY,QAAQC,IAAIW,EACvB,CA5DyBM,CACH/B,EACAC,EACAmB,EACAC,EACAC,EACAC,EACArB,IAGR,IAAMW,QAAQG,WAMlBgB,KAAEA,GAASvB,EACjB,GAAIuB,EAAM,CACN,MAAOC,EAAOC,GACD,mBAATF,EACM,CAACpB,EAAcK,GACf,CAACA,EAAoBL,GAE/B,OAAOqB,IAAQH,KAAK,IAAMI,KAE1B,OAAOrB,QAAQC,IAAI,CAACF,IAAgBK,EAAmBf,EAAQsB,QAEvE"}
1
+ {"version":3,"file":"visual-element-variant.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs"],"sourcesContent":["import { resolveVariant, getTypeCustom } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, getTypeCustom(visualElement, options.type));\n const transition = options.transitionOverride ||\n (resolved?.transition ?? (visualElement.getDefaultTransition() || {}));\n const getAnimation = () => Promise.all(resolved ? animateTarget(visualElement, resolved, options) : []);\n const getChildAnimations = (delay = 0) => {\n const { variantChildren } = visualElement;\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n const animations = [];\n variantChildren?.forEach((child) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\"\n ? 0\n : delayChildren) +\n calcChildStagger(variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n };\n /**\n * when: \"beforeChildren\" | \"afterChildren\" runs this element's animation\n * and its children's in sequence.\n */\n const { when } = transition;\n return when\n ? when === \"beforeChildren\"\n ? getAnimation().then(() => getChildAnimations())\n : getChildAnimations().then(getAnimation)\n : Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n"],"names":["animateVariant","visualElement","variant","options","resolved","resolveVariant","getTypeCustom","type","transition","transitionOverride","getDefaultTransition","getAnimation","Promise","all","animateTarget","getChildAnimations","delay","variantChildren","delayChildren","staggerChildren","staggerDirection","animations","forEach","child","notify","push","calcChildStagger","then","when"],"mappings":"2PASM,SAAUA,EACZC,EACAC,EACAC,EAAyC,CAAA,GAEzC,MAAMC,EAAWC,iBACbJ,EACAC,EACAI,EAAaA,cAACL,EAAeE,EAAQI,OAGnCC,EACFL,EAAQM,qBACPL,GAAUI,aAAeP,EAAcS,wBAA0B,CAAE,IAElEC,EAAeA,IACjBC,QAAQC,IACJT,EAAWU,gBAAcb,EAAeG,EAAUD,GAAW,IAG/DY,EAAqBA,CAACC,EAAQ,KAChC,MAAMC,gBAAEA,GAAoBhB,GACtBiB,cACFA,EAAgB,EAACC,gBACjBA,EAAeC,iBACfA,GACAZ,EACEa,EAA6B,GAuBnC,OArBAJ,GAAiBK,QAASC,IACtBA,EAAMC,OAAO,iBAAkBtB,GAC/BmB,EAAWI,KACPzB,EAAeuB,EAAOrB,EAAS,IACxBC,EACHa,MACIA,GAC0B,mBAAlBE,EACF,EACAA,GACNQ,EAAAA,iBACIT,EACAM,EACAL,EACAC,EACAC,KAETO,KAAK,IAAMJ,EAAMC,OAAO,oBAAqBtB,OAIjDU,QAAQC,IAAIQ,KAOjBO,KAAEA,GAASpB,EAEjB,OAAOoB,EACQ,mBAATA,EACIjB,IAAegB,KAAK,IAAMZ,KAC1BA,IAAqBY,KAAKhB,GAC9BC,QAAQC,IAAI,CAACF,IAAgBI,EAAmBZ,EAAQa,QAClE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("./visual-element-target.mjs.js"),a=require("./visual-element-variant.mjs.js");exports.animateVisualElement=function(i,r,n={}){let s;if(i.notify("AnimationStart",r),Array.isArray(r)){const e=r.map(e=>a.animateVariant(i,e,n));s=Promise.all(e)}else if("string"==typeof r)s=a.animateVariant(i,r,n);else{const a="function"==typeof r?e.resolveVariant(i,r,n.custom):r;s=Promise.all(t.animateTarget(i,a,n))}return s.then(()=>{i.notify("AnimationComplete",r)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("./visual-element-target.mjs.js"),a=require("./visual-element-variant.mjs.js");exports.animateVisualElement=function(r,i,n={}){return r.notify("AnimationStart",i),(Array.isArray(i)?Promise.all(i.map(e=>a.animateVariant(r,e,n))):"string"==typeof i?a.animateVariant(r,i,n):Promise.all(t.animateTarget(r,e.resolveVariant(r,i,n.custom),n))).then(()=>{r.notify("AnimationComplete",i)})};
2
2
  //# sourceMappingURL=visual-element.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-element.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n"],"names":["visualElement","definition","options","animation","notify","Array","isArray","animations","map","variant","animateVariant","Promise","all","resolvedDefinition","resolveVariant","custom","animateTarget","then"],"mappings":"8PAOM,SACFA,EACAC,EACAC,EAAyC,CAAA,GAGzC,IAAIC,EAEJ,GAHAH,EAAcI,OAAO,iBAAkBH,GAGnCI,MAAMC,QAAQL,GAAa,CAC3B,MAAMM,EAAaN,EAAWO,IAAKC,GAC/BC,EAAcA,eAACV,EAAeS,EAASP,IAE3CC,EAAYQ,QAAQC,IAAIL,EAC5B,MAAO,GAA0B,iBAAfN,EACdE,EAAYO,EAAAA,eAAeV,EAAeC,EAAYC,OACnD,CACH,MAAMW,EACoB,mBAAfZ,EACDa,EAAcA,eAACd,EAAeC,EAAYC,EAAQa,QAClDd,EAEVE,EAAYQ,QAAQC,IAChBI,EAAAA,cAAchB,EAAea,EAAoBX,GAEzD,CAEA,OAAOC,EAAUc,KAAK,KAClBjB,EAAcI,OAAO,oBAAqBH,IAElD"}
1
+ {"version":3,"file":"visual-element.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n const animation = Array.isArray(definition)\n ? Promise.all(definition.map((variant) => animateVariant(visualElement, variant, options)))\n : typeof definition === \"string\"\n ? animateVariant(visualElement, definition, options)\n : Promise.all(animateTarget(visualElement, resolveVariant(visualElement, definition, options.custom), options));\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n"],"names":["visualElement","definition","options","notify","Array","isArray","Promise","all","map","variant","animateVariant","animateTarget","resolveVariant","custom","then"],"mappings":"8PAOM,SACFA,EACAC,EACAC,EAAyC,CAAA,GAoBzC,OAlBAF,EAAcG,OAAO,iBAAkBF,IAErBG,MAAMC,QAAQJ,GAC1BK,QAAQC,IACJN,EAAWO,IAAKC,GACZC,EAAAA,eAAeV,EAAeS,EAASP,KAGzB,iBAAfD,EACPS,EAAAA,eAAeV,EAAeC,EAAYC,GAC1CI,QAAQC,IACJI,EAAaA,cACTX,EACAY,EAAcA,eAACZ,EAAeC,EAAYC,EAAQW,QAClDX,KAIGY,KAAK,KAClBd,EAAcG,OAAO,oBAAqBF,IAElD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),i=require("./KeyframesResolver.mjs.js"),n=require("./utils/is-none.mjs.js"),a=require("./utils/make-none-animatable.mjs.js"),o=require("./utils/unit-conversion.mjs.js");class l extends i.KeyframeResolver{constructor(e,s,r,t,i){super(e,s,r,t,i,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let e=0;e<i.length;e++){let s=i[e];if("string"==typeof s&&(s=s.trim(),t.isCSSVariableToken(s))){const t=r.getVariableValue(s,n.current);void 0!==t&&(i[e]=t),e===i.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!e.positionalKeys.has(a)||2!==i.length)return;const[l,u]=i,m=s.findDimensionValueType(l),f=s.findDimensionValueType(u);if(t.containsCSSVariable(l)!==t.containsCSSVariable(u)&&o.positionalValues[a])this.needsMeasurement=!0;else if(m!==f)if(o.isNumOrPxType(m)&&o.isNumOrPxType(f))for(let e=0;e<i.length;e++){const s=i[e];"string"==typeof s&&(i[e]=parseFloat(s))}else o.positionalValues[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,r=[];for(let s=0;s<e.length;s++)(null===e[s]||n.isNone(e[s]))&&r.push(s);r.length&&a.makeNoneKeyframesAnimatable(e,r,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=o.positionalValues[r](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const t=s[s.length-1];void 0!==t&&e.getValue(r,t).jump(t,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const t=e.getValue(s);t&&t.jump(this.measuredOrigin,!1);const i=r.length-1,n=r[i];r[i]=o.positionalValues[s](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,r])=>{e.getValue(s).set(r)}),this.resolveNoneKeyframes()}}exports.DOMKeyframesResolver=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),n=require("./KeyframesResolver.mjs.js"),i=require("./utils/is-none.mjs.js"),a=require("./utils/make-none-animatable.mjs.js"),o=require("./utils/unit-conversion.mjs.js");class l extends n.KeyframeResolver{constructor(e,s,r,t,n){super(e,s,r,t,n,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:e,element:s,motionValue:r}=this,n=e[0]??r?.get();if(!s?.current||void 0===n)return!1;for(let s=0;s<e.length;s++)if(t.containsCSSVariable(s?e[s]:n))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:n,element:i,name:a}=this;if(!i||!i.current)return;super.readKeyframes();for(let e=0;e<n.length;e++){let s=n[e];if("string"==typeof s&&(s=s.trim(),t.isCSSVariableToken(s))){const t=r.getVariableValue(s,i.current);void 0!==t&&(n[e]=t),e===n.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!e.positionalKeys.has(a)||2!==n.length)return;const[l,u]=n;if("number"==typeof l&&"number"==typeof u)return;const m=s.findDimensionValueType(l),f=s.findDimensionValueType(u);if(t.containsCSSVariable(l)!==t.containsCSSVariable(u)&&o.positionalValues[a])this.needsMeasurement=!0;else if(m!==f)if(o.isNumOrPxType(m)&&o.isNumOrPxType(f))for(let e=0;e<n.length;e++){const s=n[e];"string"==typeof s&&(n[e]=parseFloat(s))}else o.positionalValues[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,r=[];for(let s=0;s<e.length;s++)(null===e[s]||i.isNone(e[s]))&&r.push(s);r.length&&a.makeNoneKeyframesAnimatable(e,r,s)}measure(){const{element:e,name:s}=this;return o.positionalValues[s](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const t=s[s.length-1];void 0!==t&&this.motionValue?.jump(t,!1)}measureEndState(){const{element:e,unresolvedKeyframes:s}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const r=s.length-1,t=s[r];s[r]=this.measure(),null!==t&&void 0===this.finalKeyframe&&(this.finalKeyframe=t),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,r])=>{e.getValue(s).set(r)}),this.resolveNoneKeyframes()}}exports.DOMKeyframesResolver=l;
2
2
  //# sourceMappingURL=DOMKeyframesResolver.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DOMKeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs"],"sourcesContent":["import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n"],"names":["DOMKeyframesResolver","KeyframeResolver","constructor","unresolvedKeyframes","onComplete","name","motionValue","element","super","readKeyframes","this","current","i","length","keyframe","trim","isCSSVariableToken","resolved","getVariableValue","undefined","finalKeyframe","resolveNoneKeyframes","positionalKeys","has","origin","target","originType","findDimensionValueType","targetType","containsCSSVariable","positionalValues","needsMeasurement","isNumOrPxType","value","parseFloat","noneKeyframeIndexes","isNone","push","makeNoneKeyframesAnimatable","measureInitialState","suspendedScrollY","window","pageYOffset","measuredOrigin","measureViewportBox","getComputedStyle","measureKeyframe","getValue","jump","measureEndState","finalKeyframeIndex","removedTransforms","forEach","unsetTransformName","unsetTransformValue","set"],"mappings":"0bAmBM,MAAOA,UAEHC,EAAAA,iBAONC,WAAAA,CACIC,EACAC,EACAC,EACAC,EACAC,GAEAC,MAAML,EAAqBC,EAAYC,EAAMC,EAAaC,GAAS,EACvE,CAEAE,aAAAA,GACI,MAAMN,oBAAEA,EAAmBI,QAAEA,EAAOF,KAAEA,GAASK,KAE/C,IAAKH,IAAYA,EAAQI,QAAS,OAElCH,MAAMC,gBAKN,IA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WAATN,IACAK,KAAK8B,iBAAmBC,OAAOC,aAGnChC,KAAKiC,eAAiBb,mBAAiBzB,GACnCE,EAAQqC,qBACRH,OAAOI,iBAAiBtC,EAAQI,UAGpCR,EAAoB,GAAKO,KAAKiC,eAG9B,MAAMG,EACF3C,EAAoBA,EAAoBU,OAAS,QAE7BM,IAApB2B,GACAvC,EAAQwC,SAAS1C,EAAMyC,GAAiBE,KAAKF,GAAiB,EAEtE,CAEAG,eAAAA,GACI,MAAM1C,QAAEA,EAAOF,KAAEA,EAAIF,oBAAEA,GAAwBO,KAE/C,IAAKH,IAAYA,EAAQI,QAAS,OAElC,MAAMsB,EAAQ1B,EAAQwC,SAAS1C,GAC/B4B,GAASA,EAAMe,KAAKtC,KAAKiC,gBAAgB,GAEzC,MAAMO,EAAqB/C,EAAoBU,OAAS,EAClDO,EAAgBjB,EAAoB+C,GAE1C/C,EAAoB+C,GAAsBpB,mBAAiBzB,GACvDE,EAAQqC,qBACRH,OAAOI,iBAAiBtC,EAAQI,UAGd,OAAlBS,QAAiDD,IAAvBT,KAAKU,gBAC/BV,KAAKU,cAAgBA,GAIrBV,KAAKyC,mBAAmBtC,QACxBH,KAAKyC,kBAAkBC,QACnB,EAAEC,EAAoBC,MAClB/C,EACKwC,SAASM,GACTE,IAAID,KAKrB5C,KAAKW,sBACT"}
1
+ {"version":3,"file":"DOMKeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs"],"sourcesContent":["import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { containsCSSVariable, isCSSVariableToken } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n /**\n * Keyframes that don't need reading from the DOM, or measuring,\n * resolve straight away rather than in the frame loop's batched read.\n */\n scheduleResolve() {\n if (this.canReadNow()) {\n this.readKeyframes();\n if (!this.needsMeasurement)\n return this.complete();\n }\n super.scheduleResolve();\n }\n canReadNow() {\n const { unresolvedKeyframes, element, motionValue } = this;\n const origin = unresolvedKeyframes[0] ?? motionValue?.get();\n if (!element?.current || origin === undefined)\n return false;\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (containsCSSVariable(i ? unresolvedKeyframes[i] : origin)) {\n return false;\n }\n }\n return true;\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n // Two numbers share a unit, so skip the value type search.\n if (typeof origin === \"number\" && typeof target === \"number\")\n return;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measure() {\n const { element, name } = this;\n return positionalValues[name](window.getComputedStyle(element.current), () => element.measureViewportBox());\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = this.measure();\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n this.motionValue?.jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n this.motionValue?.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = this.measure();\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n"],"names":["DOMKeyframesResolver","KeyframeResolver","constructor","unresolvedKeyframes","onComplete","name","motionValue","element","super","scheduleResolve","this","canReadNow","readKeyframes","needsMeasurement","complete","origin","get","current","undefined","i","length","containsCSSVariable","keyframe","trim","isCSSVariableToken","resolved","getVariableValue","finalKeyframe","resolveNoneKeyframes","positionalKeys","has","target","originType","findDimensionValueType","targetType","positionalValues","isNumOrPxType","value","parseFloat","noneKeyframeIndexes","isNone","push","makeNoneKeyframesAnimatable","measure","window","getComputedStyle","measureViewportBox","measureInitialState","suspendedScrollY","pageYOffset","measuredOrigin","measureKeyframe","jump","measureEndState","finalKeyframeIndex","removedTransforms","forEach","unsetTransformName","unsetTransformValue","getValue","set"],"mappings":"0bAmBM,MAAOA,UAEHC,EAAAA,iBAONC,WAAAA,CACIC,EACAC,EACAC,EACAC,EACAC,GAEAC,MAAML,EAAqBC,EAAYC,EAAMC,EAAaC,GAAS,EACvE,CAMAE,eAAAA,GACI,GAAIC,KAAKC,eACLD,KAAKE,iBACAF,KAAKG,kBAAkB,OAAOH,KAAKI,WAG5CN,MAAMC,iBACV,CAEQE,UAAAA,GACJ,MAAMR,oBAAEA,EAAmBI,QAAEA,EAAOD,YAAEA,GAAgBI,KAChDK,EAASZ,EAAoB,IAAMG,GAAaU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