@nethesis/phone-island 1.0.15-dev.3 → 1.0.15-dev.4

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 (272) hide show
  1. package/dist/components/AudioPlayerView/index.js +1 -1
  2. package/dist/components/AudioPlayerView/index.js.map +1 -1
  3. package/dist/components/CallView/Actions.js.map +1 -1
  4. package/dist/components/RecorderView/index.js +1 -1
  5. package/dist/components/RecorderView/index.js.map +1 -1
  6. package/dist/components/SideView/SideView.js.map +1 -1
  7. package/dist/components/Socket.js +1 -1
  8. package/dist/components/Socket.js.map +1 -1
  9. package/dist/components/StreamingAnswerView/index.js.map +1 -1
  10. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  11. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  12. package/dist/components/VideoView/index.js.map +1 -1
  13. package/dist/components/WebRTC.js +1 -1
  14. package/dist/components/WebRTC.js.map +1 -1
  15. package/dist/events/RecorderEvents.js +1 -1
  16. package/dist/events/RecorderEvents.js.map +1 -1
  17. package/dist/index.css +1 -1
  18. package/dist/lib/devices/devices.js +1 -1
  19. package/dist/lib/devices/devices.js.map +1 -1
  20. package/dist/models/motions.js.map +1 -1
  21. package/dist/models/webrtc.js.map +1 -1
  22. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js +1 -1
  23. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js.map +1 -1
  24. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
  25. package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
  26. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
  27. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
  28. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
  29. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
  30. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
  31. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
  32. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +1 -1
  33. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js.map +1 -1
  34. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
  35. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
  36. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
  37. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
  38. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +1 -1
  39. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js.map +1 -1
  40. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
  41. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
  42. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
  43. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
  44. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
  45. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
  46. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
  47. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
  48. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
  49. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
  50. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
  51. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
  52. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
  53. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
  54. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
  55. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
  56. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
  57. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
  58. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
  59. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
  60. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
  61. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
  62. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
  63. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
  64. package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
  65. package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
  66. package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js +1 -1
  67. package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js.map +1 -1
  68. package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
  69. package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
  70. package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
  71. package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
  72. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
  73. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
  74. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
  75. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
  76. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
  77. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
  78. package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
  79. package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
  80. package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
  81. package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
  82. package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
  83. package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
  84. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
  85. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
  86. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
  87. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
  88. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js +1 -1
  89. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js.map +1 -1
  90. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
  91. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
  92. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
  93. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
  94. package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
  95. package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
  96. package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
  97. package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
  98. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +1 -1
  99. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js.map +1 -1
  100. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
  101. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
  102. package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
  103. package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
  104. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
  105. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
  114. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  116. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
  117. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
  118. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  119. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  120. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  121. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  122. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
  123. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
  124. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js +1 -1
  125. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
  126. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  127. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  128. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
  129. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
  130. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  131. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  132. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
  133. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
  134. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +1 -1
  135. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
  136. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +1 -1
  137. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -1
  138. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  139. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  140. package/dist/node_modules/moment/moment.js +2 -2
  141. package/dist/node_modules/moment/moment.js.map +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  195. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  196. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  201. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  212. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  213. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  214. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +1 -1
  215. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  216. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  217. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -1
  220. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
  221. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +1 -1
  223. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -1
  224. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  225. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  226. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +1 -1
  227. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -1
  228. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +1 -1
  229. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -1
  230. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
  231. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  232. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  233. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  234. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  235. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  236. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js +1 -1
  237. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
  238. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js +1 -1
  239. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
  240. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js +1 -1
  241. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
  242. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  243. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  244. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
  245. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
  246. package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
  247. package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
  248. package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
  249. package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
  250. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
  251. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
  252. package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
  253. package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
  254. package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
  255. package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
  256. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  257. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
  258. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
  259. package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
  260. package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
  261. package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
  262. package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
  263. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  264. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
  265. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  266. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
  267. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
  268. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
  269. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
  270. package/dist/package.json.js +1 -1
  271. package/dist/services/astproxy.js.map +1 -1
  272. package/package.json +7 -22
@@ -1 +1 @@
1
- {"version":3,"file":"batcher.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/batcher.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n"],"names":["scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","stepsOrder","reduce","acc","key","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","MotionGlobalConfig","performance","now","Math","max","min","process","schedule","step","keepAlive","arguments","length","undefined","immediate","cancel","i"],"mappings":"qOAOM,SACFA,EACAC,GAEA,IAAIC,GAAe,EACfC,GAAoB,EAExB,MAAMC,EAAmB,CACrBC,MAAO,EACPC,UAAW,EACXC,cAAc,GAGZC,EAAmBA,IAAON,GAAe,EAEzCO,EAAQC,EAAUA,WAACC,OAAO,CAACC,EAAKC,KAClCD,EAAIC,GAAOC,EAAgBA,iBAACN,GACrBI,GACR,CAAW,IAERG,MACFA,EAAKC,KACLA,EAAIC,iBACJA,EAAgBC,UAChBA,EAASC,OACTA,EAAMC,UACNA,EAASC,OACTA,EAAMC,WACNA,GACAb,EAEEc,EAAeA,KACjB,MAAMC,EAAkBC,EAAkBA,mBAACD,gBACrClB,EAAYkB,EACZpB,EAAME,UACNoB,YAAYC,MAClBzB,GAAe,EAEVsB,IACDpB,EAAMC,MAAQF,EACR,IAAO,GACPyB,KAAKC,IAAID,KAAKE,IAAIxB,EAAYF,EAAME,UA3CnC,IA2C2D,IAGtEF,EAAME,UAAYA,EAClBF,EAAMG,cAAe,EAGrBQ,EAAMgB,QAAQ3B,GACdY,EAAKe,QAAQ3B,GACba,EAAiBc,QAAQ3B,GACzBc,EAAUa,QAAQ3B,GAClBe,EAAOY,QAAQ3B,GACfgB,EAAUW,QAAQ3B,GAClBiB,EAAOU,QAAQ3B,GACfkB,EAAWS,QAAQ3B,GAEnBA,EAAMG,cAAe,EAEjBL,GAAgBD,IAChBE,GAAoB,EACpBH,EAAkBuB,KA6B1B,MAAO,CAAES,SAhBQtB,EAAUA,WAACC,OAAO,CAACC,EAAKC,KACrC,MAAMoB,EAAOxB,EAAMI,GAMnB,OALAD,EAAIC,GAAO,SAACkB,GAA0D,IAAxCG,EAASC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAAUG,EAASH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAGtD,OAFKjC,IAXTA,GAAe,EACfC,GAAoB,EAEfC,EAAMG,cACPP,EAAkBuB,IASXU,EAAKD,SAASD,EAASG,EAAWI,IAEtC1B,GACR,CAAa,GAQG2B,OANHR,IACZ,IAAK,IAAIS,EAAI,EAAGA,EAAI9B,EAAAA,WAAW0B,OAAQI,IACnC/B,EAAMC,EAAUA,WAAC8B,IAAID,OAAOR,IAIT3B,QAAOK,QACtC"}
1
+ {"version":3,"file":"batcher.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/batcher.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n"],"names":["scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","stepsOrder","reduce","acc","key","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","MotionGlobalConfig","performance","now","Math","max","min","process","schedule","step","keepAlive","immediate","cancel","i","length"],"mappings":"qOAOM,SACFA,EACAC,GAEA,IAAIC,GAAe,EACfC,GAAoB,EAExB,MAAMC,EAAmB,CACrBC,MAAO,EACPC,UAAW,EACXC,cAAc,GAGZC,EAAmBA,IAAON,GAAe,EAEzCO,EAAQC,EAAUA,WAACC,OAAO,CAACC,EAAKC,KAClCD,EAAIC,GAAOC,EAAgBA,iBAACN,GACrBI,GACR,CAAW,IAERG,MACFA,EAAKC,KACLA,EAAIC,iBACJA,EAAgBC,UAChBA,EAASC,OACTA,EAAMC,UACNA,EAASC,OACTA,EAAMC,WACNA,GACAb,EAEEc,EAAeA,KACjB,MAAMC,EAAkBC,EAAkBA,mBAACD,gBACrClB,EAAYkB,EACZpB,EAAME,UACNoB,YAAYC,MAClBzB,GAAe,EAEVsB,IACDpB,EAAMC,MAAQF,EACR,IAAO,GACPyB,KAAKC,IAAID,KAAKE,IAAIxB,EAAYF,EAAME,UA3CnC,IA2C2D,IAGtEF,EAAME,UAAYA,EAClBF,EAAMG,cAAe,EAGrBQ,EAAMgB,QAAQ3B,GACdY,EAAKe,QAAQ3B,GACba,EAAiBc,QAAQ3B,GACzBc,EAAUa,QAAQ3B,GAClBe,EAAOY,QAAQ3B,GACfgB,EAAUW,QAAQ3B,GAClBiB,EAAOU,QAAQ3B,GACfkB,EAAWS,QAAQ3B,GAEnBA,EAAMG,cAAe,EAEjBL,GAAgBD,IAChBE,GAAoB,EACpBH,EAAkBuB,KA6B1B,MAAO,CAAES,SAhBQtB,EAAUA,WAACC,OAAO,CAACC,EAAKC,KACrC,MAAMoB,EAAOxB,EAAMI,GAMnB,OALAD,EAAIC,GAAO,CAACkB,EAAkBG,GAAY,EAAOC,GAAY,KACpDjC,IAXTA,GAAe,EACfC,GAAoB,EAEfC,EAAMG,cACPP,EAAkBuB,IASXU,EAAKD,SAASD,EAASG,EAAWC,IAEtCvB,GACR,CAAa,GAQGwB,OANHL,IACZ,IAAK,IAAIM,EAAI,EAAGA,EAAI3B,EAAAA,WAAW4B,OAAQD,IACnC5B,EAAMC,EAAUA,WAAC2B,IAAID,OAAOL,IAIT3B,QAAOK,QACtC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createRenderStep=function(e){let t=new Set,n=new Set,s=!1,c=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function d(t){o.has(t)&&(l.schedule(t),e()),t(r)}const l={schedule:function(e){const c=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&s?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&o.add(e),c.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(r=e,s)return void(c=!0);s=!0;const o=t;t=n,n=o,t.forEach(d),t.clear(),s=!1,c&&(c=!1,l.process(e))}};return l};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createRenderStep=function(e){let t=new Set,s=new Set,c=!1,n=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function d(t){r.has(t)&&(a.schedule(t),e()),t(o)}const a={schedule:(e,n=!1,o=!1)=>{const d=o&&c?t:s;return n&&r.add(e),d.add(e),e},cancel:e=>{s.delete(e),r.delete(e)},process:e=>{if(o=e,c)return void(n=!0);c=!0;const r=t;t=s,s=r,t.forEach(d),t.clear(),c=!1,n&&(n=!1,a.process(e))}};return a};
2
2
  //# sourceMappingURL=render-step.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-step.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/render-step.mjs"],"sourcesContent":["function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n"],"names":["runNextFrame","thisFrame","Set","nextFrame","isProcessing","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","delta","timestamp","triggerCallback","callback","has","step","schedule","queue","arguments","length","undefined","add","cancel","delete","process","frameData","prevFrame","forEach","clear"],"mappings":"6FAEM,SAA2BA,GAK7B,IAAIC,EAAY,IAAIC,IAChBC,EAAY,IAAID,IAMhBE,GAAe,EAEfC,GAAiB,EAKrB,MAAMC,EAAc,IAAIC,QAExB,IAAIC,EAA6B,CAC7BC,MAAO,EACPC,UAAW,EACXN,cAAc,GAGlB,SAASO,EAAgBC,GACjBN,EAAYO,IAAID,KAChBE,EAAKC,SAASH,GACdZ,KAGJY,EAASJ,EACb,CAEA,MAAMM,EAAa,CAIfC,SAAU,SAACH,GACP,MACMI,EAFuCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,IACNb,EACLH,EAAYE,EAM9C,OAR0Bc,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,IAIXX,EAAYc,IAAIR,GAE/BI,EAAMI,IAAIR,GAEHA,CACV,EAKDS,OAAST,IACLT,EAAUmB,OAAOV,GACjBN,EAAYgB,OAAOV,IAMvBW,QAAUC,IAQN,GAPAhB,EAAkBgB,EAOdpB,EAEA,YADAC,GAAiB,GAIrBD,GAAe,EAGf,MAAMqB,EAAYxB,EAClBA,EAAYE,EACZA,EAAYsB,EAGZxB,EAAUyB,QAAQf,GAIlBV,EAAU0B,QAEVvB,GAAe,EAEXC,IACAA,GAAiB,EACjBS,EAAKS,QAAQC,MAKzB,OAAOV,CACX"}
1
+ {"version":3,"file":"render-step.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/render-step.mjs"],"sourcesContent":["function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n"],"names":["runNextFrame","thisFrame","Set","nextFrame","isProcessing","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","delta","timestamp","triggerCallback","callback","has","step","schedule","keepAlive","immediate","queue","add","cancel","delete","process","frameData","prevFrame","forEach","clear"],"mappings":"6FAEM,SAA2BA,GAK7B,IAAIC,EAAY,IAAIC,IAChBC,EAAY,IAAID,IAMhBE,GAAe,EAEfC,GAAiB,EAKrB,MAAMC,EAAc,IAAIC,QAExB,IAAIC,EAA6B,CAC7BC,MAAO,EACPC,UAAW,EACXN,cAAc,GAGlB,SAASO,EAAgBC,GACjBN,EAAYO,IAAID,KAChBE,EAAKC,SAASH,GACdZ,KAGJY,EAASJ,EACb,CAEA,MAAMM,EAAa,CAIfC,SAAUA,CAACH,EAAUI,GAAY,EAAOC,GAAY,KAChD,MACMC,EADoBD,GAAab,EACLH,EAAYE,EAM9C,OAJIa,GAAWV,EAAYa,IAAIP,GAE/BM,EAAMC,IAAIP,GAEHA,GAMXQ,OAASR,IACLT,EAAUkB,OAAOT,GACjBN,EAAYe,OAAOT,IAMvBU,QAAUC,IAQN,GAPAf,EAAkBe,EAOdnB,EAEA,YADAC,GAAiB,GAIrBD,GAAe,EAGf,MAAMoB,EAAYvB,EAClBA,EAAYE,EACZA,EAAYqB,EAGZvB,EAAUwB,QAAQd,GAIlBV,EAAUyB,QAEVtB,GAAe,EAEXC,IACAA,GAAiB,EACjBS,EAAKQ,QAAQC,MAKzB,OAAOT,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./drag/state/is-active.mjs.js"),t=require("./utils/setup.mjs.js");exports.hover=function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[o,s,d]=t.setupGesture(n,i);return o.forEach(t=>{let n,i=!1,o=!1;const d=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",v)},p=e=>{i=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),o&&(o=!1,d(e))},v=e=>{"touch"!==e.pointerType&&(i?o=!0:d(e))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||e.isDragActive())return;o=!1;const d=r(t,i);"function"==typeof d&&(n=d,t.addEventListener("pointerleave",v,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)},s)}),d};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./drag/state/is-active.mjs.js"),t=require("./utils/setup.mjs.js");exports.hover=function(n,r,i={}){const[o,s,p]=t.setupGesture(n,i);return o.forEach(t=>{let n,i=!1,o=!1;const p=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",v)},d=e=>{i=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),o&&(o=!1,p(e))},v=e=>{"touch"!==e.pointerType&&(i?o=!0:p(e))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||e.isDragActive())return;o=!1;const p=r(t,i);"function"==typeof p&&(n=p,t.addEventListener("pointerleave",v,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",d,s)},s)}),p};
2
2
  //# sourceMappingURL=hover.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/gestures/hover.mjs"],"sourcesContent":["import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n elements.forEach((element) => {\n let isPressed = false;\n let deferredHoverEnd = false;\n let hoverEndCallback;\n const removePointerLeave = () => {\n element.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n const endHover = (event) => {\n if (hoverEndCallback) {\n hoverEndCallback(event);\n hoverEndCallback = undefined;\n }\n removePointerLeave();\n };\n const onPointerUp = (event) => {\n isPressed = false;\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerUp);\n if (deferredHoverEnd) {\n deferredHoverEnd = false;\n endHover(event);\n }\n };\n const onPointerDown = () => {\n isPressed = true;\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerUp, eventOptions);\n };\n const onPointerLeave = (leaveEvent) => {\n if (leaveEvent.pointerType === \"touch\")\n return;\n if (isPressed) {\n deferredHoverEnd = true;\n return;\n }\n endHover(leaveEvent);\n };\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n deferredHoverEnd = false;\n const onHoverEnd = onHoverStart(element, enterEvent);\n if (typeof onHoverEnd !== \"function\")\n return;\n hoverEndCallback = onHoverEnd;\n element.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n element.addEventListener(\"pointerdown\", onPointerDown, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["elementOrSelector","onHoverStart","options","arguments","length","undefined","elements","eventOptions","cancel","setupGesture","forEach","element","hoverEndCallback","isPressed","deferredHoverEnd","endHover","event","removeEventListener","onPointerLeave","onPointerUp","window","leaveEvent","pointerType","addEventListener","enterEvent","isDragActive","onHoverEnd","onPointerDown"],"mappings":"mKAoCM,SACFA,EACAC,GAC0B,IAA1BC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAwB,CAAA,EAExB,MAAOG,EAAUC,EAAcC,GAAUC,eACrCT,EACAE,GAkGJ,OA/FAI,EAASI,QAASC,IACd,IAEIC,EAFAC,GAAY,EACZC,GAAmB,EAGvB,MAOMC,EAAYC,IACVJ,IACAA,EAAiBI,GACjBJ,OAAmBP,GATvBM,EAAQM,oBACJ,eACAC,IAYFC,EAAeH,IACjBH,GAAY,EACZO,OAAOH,oBACH,YACAE,GAEJC,OAAOH,oBACH,gBACAE,GAGAL,IACAA,GAAmB,EACnBC,EAASC,KAkBXE,EAAkBG,IACW,UAA3BA,EAAWC,cAEXT,EACAC,GAAmB,EAIvBC,EAASM,KAwBbV,EAAQY,iBACJ,eAtBoBC,IACpB,GAnFuB,UAmFLA,EAnFXF,aAA2BG,EAAAA,eAmFH,OAE/BX,GAAmB,EAEnB,MAAMY,EAAazB,EACfU,EACAa,GAGsB,mBAAfE,IAEXd,EAAmBc,EAEnBf,EAAQY,iBACJ,eACAL,EACAX,KAOJA,GAEJI,EAAQY,iBACJ,cApDkBI,KAClBd,GAAY,EACZO,OAAOG,iBACH,YACAJ,EACAZ,GAEJa,OAAOG,iBACH,gBACAJ,EACAZ,IA4CJA,KAIDC,CACX"}
1
+ {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/gestures/hover.mjs"],"sourcesContent":["import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n elements.forEach((element) => {\n let isPressed = false;\n let deferredHoverEnd = false;\n let hoverEndCallback;\n const removePointerLeave = () => {\n element.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n const endHover = (event) => {\n if (hoverEndCallback) {\n hoverEndCallback(event);\n hoverEndCallback = undefined;\n }\n removePointerLeave();\n };\n const onPointerUp = (event) => {\n isPressed = false;\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerUp);\n if (deferredHoverEnd) {\n deferredHoverEnd = false;\n endHover(event);\n }\n };\n const onPointerDown = () => {\n isPressed = true;\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerUp, eventOptions);\n };\n const onPointerLeave = (leaveEvent) => {\n if (leaveEvent.pointerType === \"touch\")\n return;\n if (isPressed) {\n deferredHoverEnd = true;\n return;\n }\n endHover(leaveEvent);\n };\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n deferredHoverEnd = false;\n const onHoverEnd = onHoverStart(element, enterEvent);\n if (typeof onHoverEnd !== \"function\")\n return;\n hoverEndCallback = onHoverEnd;\n element.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n element.addEventListener(\"pointerdown\", onPointerDown, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["elementOrSelector","onHoverStart","options","elements","eventOptions","cancel","setupGesture","forEach","element","hoverEndCallback","isPressed","deferredHoverEnd","endHover","event","undefined","removeEventListener","onPointerLeave","onPointerUp","window","leaveEvent","pointerType","addEventListener","enterEvent","isDragActive","onHoverEnd","onPointerDown"],"mappings":"mKAoCM,SACFA,EACAC,EACAC,EAAwB,CAAA,GAExB,MAAOC,EAAUC,EAAcC,GAAUC,eACrCN,EACAE,GAkGJ,OA/FAC,EAASI,QAASC,IACd,IAEIC,EAFAC,GAAY,EACZC,GAAmB,EAGvB,MAOMC,EAAYC,IACVJ,IACAA,EAAiBI,GACjBJ,OAAmBK,GATvBN,EAAQO,oBACJ,eACAC,IAYFC,EAAeJ,IACjBH,GAAY,EACZQ,OAAOH,oBACH,YACAE,GAEJC,OAAOH,oBACH,gBACAE,GAGAN,IACAA,GAAmB,EACnBC,EAASC,KAkBXG,EAAkBG,IACW,UAA3BA,EAAWC,cAEXV,EACAC,GAAmB,EAIvBC,EAASO,KAwBbX,EAAQa,iBACJ,eAtBoBC,IACpB,GAnFuB,UAmFLA,EAnFXF,aAA2BG,EAAAA,eAmFH,OAE/BZ,GAAmB,EAEnB,MAAMa,EAAavB,EACfO,EACAc,GAGsB,mBAAfE,IAEXf,EAAmBe,EAEnBhB,EAAQa,iBACJ,eACAL,EACAZ,KAOJA,GAEJI,EAAQa,iBACJ,cApDkBI,KAClBf,GAAY,EACZQ,OAAOG,iBACH,YACAJ,EACAb,GAEJc,OAAOG,iBACH,gBACAJ,EACAb,IA4CJA,KAIDC,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/is-html-element.mjs.js"),s=require("../drag/state/is-active.mjs.js"),t=require("../utils/is-node-or-child.mjs.js"),r=require("../utils/is-primary-pointer.mjs.js"),i=require("../utils/setup.mjs.js"),n=require("./utils/is-keyboard-accessible.mjs.js"),o=require("./utils/keyboard.mjs.js"),a=require("./utils/state.mjs.js");function u(e){return r.isPrimaryPointer(e)&&!s.isDragActive()}const d=new WeakSet;exports.press=function(s,r){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[l,p,j]=i.setupGesture(s,c),m=e=>{const s=e.currentTarget;if(!u(e))return;if(d.has(e))return;a.isPressing.add(s),c.stopPropagation&&d.add(e);const i=r(s,e),n={...p,capture:!0},o=(e,t)=>{window.removeEventListener("pointerup",l,n),window.removeEventListener("pointercancel",j,n),a.isPressing.has(s)&&a.isPressing.delete(s),u(e)&&"function"==typeof i&&i(e,{success:t})},l=e=>{o(e,s===window||s===document||c.useGlobalTarget||t.isNodeOrChild(s,e.target))},j=e=>{o(e,!1)};window.addEventListener("pointerup",l,n),window.addEventListener("pointercancel",j,n)};return l.forEach(s=>{(c.useGlobalTarget?window:s).addEventListener("pointerdown",m,p),e.isHTMLElement(s)&&(s.addEventListener("focus",e=>o.enableKeyboardPress(e,p)),n.isElementKeyboardAccessible(s)||s.hasAttribute("tabindex")||(s.tabIndex=0))}),j};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/is-html-element.mjs.js"),s=require("../drag/state/is-active.mjs.js"),t=require("../utils/is-node-or-child.mjs.js"),r=require("../utils/is-primary-pointer.mjs.js"),i=require("../utils/setup.mjs.js"),n=require("./utils/is-keyboard-accessible.mjs.js"),o=require("./utils/keyboard.mjs.js"),a=require("./utils/state.mjs.js");function u(e){return r.isPrimaryPointer(e)&&!s.isDragActive()}const d=new WeakSet;exports.press=function(s,r,c={}){const[l,p,j]=i.setupGesture(s,c),m=e=>{const s=e.currentTarget;if(!u(e))return;if(d.has(e))return;a.isPressing.add(s),c.stopPropagation&&d.add(e);const i=r(s,e),n={...p,capture:!0},o=(e,t)=>{window.removeEventListener("pointerup",l,n),window.removeEventListener("pointercancel",j,n),a.isPressing.has(s)&&a.isPressing.delete(s),u(e)&&"function"==typeof i&&i(e,{success:t})},l=e=>{o(e,s===window||s===document||c.useGlobalTarget||t.isNodeOrChild(s,e.target))},j=e=>{o(e,!1)};window.addEventListener("pointerup",l,n),window.addEventListener("pointercancel",j,n)};return l.forEach(s=>{(c.useGlobalTarget?window:s).addEventListener("pointerdown",m,p),e.isHTMLElement(s)&&(s.addEventListener("focus",e=>o.enableKeyboardPress(e,p)),n.isElementKeyboardAccessible(s)||s.hasAttribute("tabindex")||(s.tabIndex=0))}),j};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/gestures/press/index.mjs"],"sourcesContent":["import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\nconst claimedPointerDownEvents = new WeakSet();\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n if (claimedPointerDownEvents.has(startEvent))\n return;\n isPressing.add(target);\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent);\n }\n const onPressEnd = onPressStart(target, startEvent);\n /**\n * End listeners run in the capture phase so a descendant calling\n * stopPropagation() in its own pointerup handler can't prevent the\n * press gesture from ending. This also keeps the gesture-end\n * ordering consistent with the drag gesture. See #2794.\n */\n const endEventOptions = { ...eventOptions, capture: true };\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.removeEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n//# sourceMappingURL=index.mjs.map\n"],"names":["isValidPressEvent","event","isPrimaryPointer","isDragActive","claimedPointerDownEvents","WeakSet","targetOrSelector","onPressStart","options","arguments","length","undefined","targets","eventOptions","cancelEvents","setupGesture","startPress","startEvent","target","currentTarget","has","isPressing","add","stopPropagation","onPressEnd","endEventOptions","capture","onPointerEnd","endEvent","success","window","removeEventListener","onPointerUp","onPointerCancel","delete","upEvent","document","useGlobalTarget","isNodeOrChild","cancelEvent","addEventListener","forEach","isHTMLElement","enableKeyboardPress","isElementKeyboardAccessible","hasAttribute","tabIndex"],"mappings":"+ZAgBA,SAASA,EAAkBC,GACvB,OAAOC,mBAAiBD,KAAWE,EAAYA,cACnD,CAEA,MAAMC,EAA2B,IAAIC,sBA0B/B,SACFC,EACAC,GACiC,IAAjCC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAA+B,CAAA,EAE/B,MAAOG,EAASC,EAAcC,GAAgBC,eAC1CT,EACAE,GAGEQ,EAAcC,IAChB,MAAMC,EAASD,EAAWE,cAE1B,IAAKnB,EAAkBiB,GAAa,OACpC,GAAIb,EAAyBgB,IAAIH,GAAa,OAE9CI,aAAWC,IAAIJ,GAEXV,EAAQe,iBACRnB,EAAyBkB,IAAIL,GAGjC,MAAMO,EAAajB,EAAaW,EAAQD,GAQlCQ,EAAkB,IAAKZ,EAAca,SAAS,GAE9CC,EAAeA,CAACC,EAAwBC,KAC1CC,OAAOC,oBACH,YACAC,EACAP,GAEJK,OAAOC,oBACH,gBACAE,EACAR,GAGAJ,EAAUA,WAACD,IAAIF,IACfG,aAAWa,OAAOhB,GAGjBlB,EAAkB4B,IAIG,mBAAfJ,GACPA,EAAWI,EAAU,CAAEC,aAIzBG,EAAeG,IACjBR,EACIQ,EACCjB,IAAmBY,QACfZ,IAAmBkB,UACpB5B,EAAQ6B,iBACRC,EAAAA,cAAcpB,EAAQiB,EAAQjB,UAIpCe,EAAmBM,IACrBZ,EAAaY,GAAa,IAG9BT,OAAOU,iBAAiB,YAAaR,EAAaP,GAClDK,OAAOU,iBACH,gBACAP,EACAR,IA0BR,OAtBAb,EAAQ6B,QAASvB,KACaV,EAAQ6B,gBAAkBP,OAASZ,GAC3CsB,iBACd,cACAxB,EACAH,GAGA6B,EAAAA,cAAcxB,KACdA,EAAOsB,iBAAiB,QAAUvC,GAC9B0C,EAAAA,oBAAoB1C,EAAqBY,IAIxC+B,EAA2BA,4BAAC1B,IAC5BA,EAAO2B,aAAa,cAErB3B,EAAO4B,SAAW,MAKvBhC,CACX"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/gestures/press/index.mjs"],"sourcesContent":["import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\nconst claimedPointerDownEvents = new WeakSet();\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n if (claimedPointerDownEvents.has(startEvent))\n return;\n isPressing.add(target);\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent);\n }\n const onPressEnd = onPressStart(target, startEvent);\n /**\n * End listeners run in the capture phase so a descendant calling\n * stopPropagation() in its own pointerup handler can't prevent the\n * press gesture from ending. This also keeps the gesture-end\n * ordering consistent with the drag gesture. See #2794.\n */\n const endEventOptions = { ...eventOptions, capture: true };\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.removeEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n//# sourceMappingURL=index.mjs.map\n"],"names":["isValidPressEvent","event","isPrimaryPointer","isDragActive","claimedPointerDownEvents","WeakSet","targetOrSelector","onPressStart","options","targets","eventOptions","cancelEvents","setupGesture","startPress","startEvent","target","currentTarget","has","isPressing","add","stopPropagation","onPressEnd","endEventOptions","capture","onPointerEnd","endEvent","success","window","removeEventListener","onPointerUp","onPointerCancel","delete","upEvent","document","useGlobalTarget","isNodeOrChild","cancelEvent","addEventListener","forEach","isHTMLElement","enableKeyboardPress","isElementKeyboardAccessible","hasAttribute","tabIndex"],"mappings":"+ZAgBA,SAASA,EAAkBC,GACvB,OAAOC,mBAAiBD,KAAWE,EAAYA,cACnD,CAEA,MAAMC,EAA2B,IAAIC,sBA0B/B,SACFC,EACAC,EACAC,EAA+B,CAAA,GAE/B,MAAOC,EAASC,EAAcC,GAAgBC,eAC1CN,EACAE,GAGEK,EAAcC,IAChB,MAAMC,EAASD,EAAWE,cAE1B,IAAKhB,EAAkBc,GAAa,OACpC,GAAIV,EAAyBa,IAAIH,GAAa,OAE9CI,aAAWC,IAAIJ,GAEXP,EAAQY,iBACRhB,EAAyBe,IAAIL,GAGjC,MAAMO,EAAad,EAAaQ,EAAQD,GAQlCQ,EAAkB,IAAKZ,EAAca,SAAS,GAE9CC,EAAeA,CAACC,EAAwBC,KAC1CC,OAAOC,oBACH,YACAC,EACAP,GAEJK,OAAOC,oBACH,gBACAE,EACAR,GAGAJ,EAAUA,WAACD,IAAIF,IACfG,aAAWa,OAAOhB,GAGjBf,EAAkByB,IAIG,mBAAfJ,GACPA,EAAWI,EAAU,CAAEC,aAIzBG,EAAeG,IACjBR,EACIQ,EACCjB,IAAmBY,QACfZ,IAAmBkB,UACpBzB,EAAQ0B,iBACRC,EAAAA,cAAcpB,EAAQiB,EAAQjB,UAIpCe,EAAmBM,IACrBZ,EAAaY,GAAa,IAG9BT,OAAOU,iBAAiB,YAAaR,EAAaP,GAClDK,OAAOU,iBACH,gBACAP,EACAR,IA0BR,OAtBAb,EAAQ6B,QAASvB,KACaP,EAAQ0B,gBAAkBP,OAASZ,GAC3CsB,iBACd,cACAxB,EACAH,GAGA6B,EAAAA,cAAcxB,KACdA,EAAOsB,iBAAiB,QAAUpC,GAC9BuC,EAAAA,oBAAoBvC,EAAqBS,IAIxC+B,EAA2BA,4BAAC1B,IAC5BA,EAAO2B,aAAa,cAErB3B,EAAO4B,SAAW,MAKvBhC,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.convertBoundingBoxToBox=function(t){let{top:o,left:e,right:n,bottom:r}=t;return{x:{min:e,max:n},y:{min:o,max:r}}},exports.convertBoxToBoundingBox=function(t){let{x:o,y:e}=t;return{top:e.min,right:o.max,bottom:e.max,left:o.min}},exports.transformBoxPoints=function(t,o){if(!o)return t;const e=o({x:t.left,y:t.top}),n=o({x:t.right,y:t.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.convertBoundingBoxToBox=function({top:t,left:o,right:n,bottom:r}){return{x:{min:o,max:n},y:{min:t,max:r}}},exports.convertBoxToBoundingBox=function({x:t,y:o}){return{top:o.min,right:t.max,bottom:o.max,left:t.min}},exports.transformBoxPoints=function(t,o){if(!o)return t;const n=o({x:t.left,y:t.top}),r=o({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}};
2
2
  //# sourceMappingURL=conversion.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversion.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs"],"sourcesContent":["/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n"],"names":["_ref","top","left","right","bottom","x","min","max","y","_ref2","point","transformPoint","topLeft","bottomRight"],"mappings":"oGAOM,SAAiCA,GAKzB,IAL0BC,IACpCA,EAAGC,KACHA,EAAIC,MACJA,EAAKC,OACLA,GACUJ,EACV,MAAO,CACHK,EAAG,CAAEC,IAAKJ,EAAMK,IAAKJ,GACrBK,EAAG,CAAEF,IAAKL,EAAKM,IAAKH,GAE5B,2CAEuCK,GAAc,IAAbJ,EAAEA,EAACG,EAAEA,GAAQC,EACjD,MAAO,CAAER,IAAKO,EAAEF,IAAKH,MAAOE,EAAEE,IAAKH,OAAQI,EAAED,IAAKL,KAAMG,EAAEC,IAC9D,6BAOM,SACFI,EACAC,GAEA,IAAKA,EAAgB,OAAOD,EAC5B,MAAME,EAAUD,EAAe,CAAEN,EAAGK,EAAMR,KAAMM,EAAGE,EAAMT,MACnDY,EAAcF,EAAe,CAAEN,EAAGK,EAAMP,MAAOK,EAAGE,EAAMN,SAE9D,MAAO,CACHH,IAAKW,EAAQJ,EACbN,KAAMU,EAAQP,EACdD,OAAQS,EAAYL,EACpBL,MAAOU,EAAYR,EAE3B"}
1
+ {"version":3,"file":"conversion.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs"],"sourcesContent":["/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n"],"names":["top","left","right","bottom","x","min","max","y","convertBoxToBoundingBox","point","transformPoint","topLeft","bottomRight"],"mappings":"oGAOM,UAAkCA,IACpCA,EAAGC,KACHA,EAAIC,MACJA,EAAKC,OACLA,IAEA,MAAO,CACHC,EAAG,CAAEC,IAAKJ,EAAMK,IAAKJ,GACrBK,EAAG,CAAEF,IAAKL,EAAKM,IAAKH,GAE5B,kCAEgBK,UAAwBJ,EAAEA,EAACG,EAAEA,IACzC,MAAO,CAAEP,IAAKO,EAAEF,IAAKH,MAAOE,EAAEE,IAAKH,OAAQI,EAAED,IAAKL,KAAMG,EAAEC,IAC9D,6BAOM,SACFI,EACAC,GAEA,IAAKA,EAAgB,OAAOD,EAC5B,MAAME,EAAUD,EAAe,CAAEN,EAAGK,EAAMR,KAAMM,EAAGE,EAAMT,MACnDY,EAAcF,EAAe,CAAEN,EAAGK,EAAMP,MAAOK,EAAGE,EAAMN,SAE9D,MAAO,CACHH,IAAKW,EAAQJ,EACbN,KAAMU,EAAQP,EACdD,OAAQS,EAAYL,EACpBL,MAAOU,EAAYR,EAE3B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/mix/number.mjs.js"),e=require("../utils/has-transform.mjs.js");function o(t,e,o){return o+e*(t-o)}function s(t,e,s,n,l){return void 0!==l&&(t=o(t,l,n)),o(t,s,n)+e}function n(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;t.min=s(t.min,e,o,n,l),t.max=s(t.max,e,o,n,l)}function l(t,e){let{x:o,y:s}=e;n(t.x,o.translate,o.scale,o.originPoint),n(t.y,s.translate,s.scale,s.originPoint)}const r=.999999999999,i=1.0000000000001;function a(t,e){t.min+=e,t.max+=e}function x(e,o,s,l){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5;n(e,o,s,t.mixNumber(e.min,e.max,r),l)}function c(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function p(t,e,o){const s=o??t;x(t.x,c(e.x,s.x),e.scaleX,e.scale,e.originX),x(t.y,c(e.y,s.y),e.scaleY,e.scale,e.originY)}exports.applyAxisDelta=n,exports.applyBoxDelta=l,exports.applyPointDelta=s,exports.applyTreeDeltas=function(t,o,s){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const x=s.length;if(!x)return;let c,u;o.x=o.y=1;for(let r=0;r<x;r++){c=s[r],u=c.projectionDelta;const{visualElement:i}=c.options;i&&i.props.style&&"contents"===i.props.style.display||(n&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(a(t.x,-c.scroll.offset.x),a(t.y,-c.scroll.offset.y)),u&&(o.x*=u.x.scale,o.y*=u.y.scale,l(t,u)),n&&e.hasTransform(c.latestValues)&&p(t,c.latestValues,c.layout?.layoutBox))}o.x<i&&o.x>r&&(o.x=1),o.y<i&&o.y>r&&(o.y=1)},exports.scalePoint=o,exports.transformAxis=x,exports.transformBox=p,exports.translateAxis=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/mix/number.mjs.js"),s=require("../utils/has-transform.mjs.js");function e(t,s,e){return e+s*(t-e)}function o(t,s,o,n,r){return void 0!==r&&(t=e(t,r,n)),e(t,o,n)+s}function n(t,s=0,e=1,n,r){t.min=o(t.min,s,e,n,r),t.max=o(t.max,s,e,n,r)}function r(t,{x:s,y:e}){n(t.x,s.translate,s.scale,s.originPoint),n(t.y,e.translate,e.scale,e.originPoint)}const l=.999999999999,a=1.0000000000001;function i(t,s){t.min+=s,t.max+=s}function x(s,e,o,r,l=.5){n(s,e,o,t.mixNumber(s.min,s.max,l),r)}function c(t,s){return"string"==typeof t?parseFloat(t)/100*(s.max-s.min):t}function p(t,s,e){const o=e??t;x(t.x,c(s.x,o.x),s.scaleX,s.scale,s.originX),x(t.y,c(s.y,o.y),s.scaleY,s.scale,s.originY)}exports.applyAxisDelta=n,exports.applyBoxDelta=r,exports.applyPointDelta=o,exports.applyTreeDeltas=function(t,e,o,n=!1){const x=o.length;if(!x)return;let c,u;e.x=e.y=1;for(let l=0;l<x;l++){c=o[l],u=c.projectionDelta;const{visualElement:a}=c.options;a&&a.props.style&&"contents"===a.props.style.display||(n&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(i(t.x,-c.scroll.offset.x),i(t.y,-c.scroll.offset.y)),u&&(e.x*=u.x.scale,e.y*=u.y.scale,r(t,u)),n&&s.hasTransform(c.latestValues)&&p(t,c.latestValues,c.layout?.layoutBox))}e.x<a&&e.x>l&&(e.x=1),e.y<a&&e.y>l&&(e.y=1)},exports.scalePoint=e,exports.transformAxis=x,exports.transformBox=p,exports.translateAxis=i;
2
2
  //# sourceMappingURL=delta-apply.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delta-apply.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(box.x, -node.scroll.offset.x);\n translateAxis(box.y, -node.scroll.offset.y);\n }\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues, node.layout?.layoutBox);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min += distance;\n axis.max += distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\nfunction resolveAxisTranslate(value, axis) {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min);\n }\n return value;\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform, sourceBox) {\n const resolveBox = sourceBox ?? box;\n transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n//# sourceMappingURL=delta-apply.mjs.map\n"],"names":["scalePoint","point","scale","originPoint","applyPointDelta","translate","boxScale","undefined","applyAxisDelta","axis","arguments","length","min","max","applyBoxDelta","box","_ref","x","y","TREE_SCALE_SNAP_MIN","TREE_SCALE_SNAP_MAX","translateAxis","distance","transformAxis","axisTranslate","axisScale","axisOrigin","mixNumber","resolveAxisTranslate","value","parseFloat","transformBox","transform","sourceBox","resolveBox","scaleX","originX","scaleY","originY","treeScale","treePath","isSharedTransition","treeLength","node","delta","i","projectionDelta","visualElement","options","props","style","display","layoutScroll","scroll","root","offset","hasTransform","latestValues","layout","layoutBox"],"mappings":"8JAQgBA,SAAAA,EAAWC,EAAeC,EAAeC,GAGrD,OAAOA,EADQD,GADYD,EAAQE,EAGvC,CAKM,SAAUC,EACZH,EACAI,EACAH,EACAC,EACAG,GAMA,YAJiBC,IAAbD,IACAL,EAAQD,EAAWC,EAAOK,EAAUH,IAGjCH,EAAWC,EAAOC,EAAOC,GAAeE,CACnD,CAKM,SAAUG,EACZC,GAIiB,IAHjBJ,EAAAK,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAoB,EACpBR,EAAAQ,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAgB,EAChBP,EAAmBO,UAAAC,OAAAD,EAAAA,kBAAAH,EACnBD,EAAiBI,UAAAC,OAAAD,EAAAA,kBAAAH,EAEjBE,EAAKG,IAAMR,EACPK,EAAKG,IACLP,EACAH,EACAC,EACAG,GAGJG,EAAKI,IAAMT,EACPK,EAAKI,IACLR,EACAH,EACAC,EACAG,EAER,CAKM,SAAUQ,EAAcC,EAAQC,GAAiB,IAAfC,EAAEA,EAACC,EAAEA,GAAUF,EACnDR,EAAeO,EAAIE,EAAGA,EAAEZ,UAAWY,EAAEf,MAAOe,EAAEd,aAC9CK,EAAeO,EAAIG,EAAGA,EAAEb,UAAWa,EAAEhB,MAAOgB,EAAEf,YAClD,CAEA,MAAMgB,EAAsB,cACtBC,EAAsB,gBAkFtB,SAAUC,EAAcZ,EAAYa,GACtCb,EAAKG,KAAOU,EACZb,EAAKI,KAAOS,CAChB,CAOM,SAAUC,EACZd,EACAe,EACAC,EACAnB,GACwB,IAAxBoB,EAAAhB,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAqB,GAKrBF,EAAeC,EAAMe,EAAeC,EAHhBE,EAAAA,UAAUlB,EAAKG,IAAKH,EAAKI,IAAKa,GAGUpB,EAChE,CAEA,SAASsB,EACLC,EACApB,GAEA,MAAqB,iBAAVoB,EACCC,WAAWD,GAAS,KAAQpB,EAAKI,IAAMJ,EAAKG,KAEjDiB,CACX,CAKgBE,SAAAA,EACZhB,EACAiB,EACAC,GAEA,MAAMC,EAAaD,GAAalB,EAChCQ,EACIR,EAAIE,EACJW,EAAqBI,EAAUf,EAAGiB,EAAWjB,GAC7Ce,EAAUG,OACVH,EAAU9B,MACV8B,EAAUI,SAEdb,EACIR,EAAIG,EACJU,EAAqBI,EAAUd,EAAGgB,EAAWhB,GAC7Cc,EAAUK,OACVL,EAAU9B,MACV8B,EAAUM,QAElB,oGAlIM,SACFvB,EACAwB,EACAC,GACmC,IAAnCC,EAAA/B,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,IAAAA,UAAA,GAEA,MAAMgC,EAAaF,EAAS7B,OAC5B,IAAK+B,EAAY,OAKjB,IAAIC,EACAC,EAHJL,EAAUtB,EAAIsB,EAAUrB,EAAI,EAK5B,IAAK,IAAI2B,EAAI,EAAGA,EAAIH,EAAYG,IAAK,CACjCF,EAAOH,EAASK,GAChBD,EAAQD,EAAKG,gBAMb,MAAMC,cAAEA,GAAkBJ,EAAKK,QAE3BD,GACAA,EAAcE,MAAMC,OACkB,aAAtCH,EAAcE,MAAMC,MAAMC,UAM1BV,GACAE,EAAKK,QAAQI,cACbT,EAAKU,QACLV,IAASA,EAAKW,OAEdjC,EAAcN,EAAIE,GAAI0B,EAAKU,OAAOE,OAAOtC,GACzCI,EAAcN,EAAIG,GAAIyB,EAAKU,OAAOE,OAAOrC,IAGzC0B,IAEAL,EAAUtB,GAAK2B,EAAM3B,EAAEf,MACvBqC,EAAUrB,GAAK0B,EAAM1B,EAAEhB,MAGvBY,EAAcC,EAAK6B,IAGnBH,GAAsBe,EAAAA,aAAab,EAAKc,eACxC1B,EAAahB,EAAK4B,EAAKc,aAAcd,EAAKe,QAAQC,WAE1D,CAOIpB,EAAUtB,EAAIG,GACdmB,EAAUtB,EAAIE,IAEdoB,EAAUtB,EAAI,GAGdsB,EAAUrB,EAAIE,GACdmB,EAAUrB,EAAIC,IAEdoB,EAAUrB,EAAI,EAEtB"}
1
+ {"version":3,"file":"delta-apply.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(box.x, -node.scroll.offset.x);\n translateAxis(box.y, -node.scroll.offset.y);\n }\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues, node.layout?.layoutBox);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min += distance;\n axis.max += distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\nfunction resolveAxisTranslate(value, axis) {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min);\n }\n return value;\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform, sourceBox) {\n const resolveBox = sourceBox ?? box;\n transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n//# sourceMappingURL=delta-apply.mjs.map\n"],"names":["scalePoint","point","scale","originPoint","applyPointDelta","translate","boxScale","undefined","applyAxisDelta","axis","min","max","applyBoxDelta","box","x","y","TREE_SCALE_SNAP_MIN","TREE_SCALE_SNAP_MAX","translateAxis","distance","transformAxis","axisTranslate","axisScale","axisOrigin","mixNumber","resolveAxisTranslate","value","parseFloat","transformBox","transform","sourceBox","resolveBox","scaleX","originX","scaleY","originY","treeScale","treePath","isSharedTransition","treeLength","length","node","delta","i","projectionDelta","visualElement","options","props","style","display","layoutScroll","scroll","root","offset","hasTransform","latestValues","layout","layoutBox"],"mappings":"8JAQgBA,SAAAA,EAAWC,EAAeC,EAAeC,GAGrD,OAAOA,EADQD,GADYD,EAAQE,EAGvC,CAKM,SAAUC,EACZH,EACAI,EACAH,EACAC,EACAG,GAMA,YAJiBC,IAAbD,IACAL,EAAQD,EAAWC,EAAOK,EAAUH,IAGjCH,EAAWC,EAAOC,EAAOC,GAAeE,CACnD,CAKM,SAAUG,EACZC,EACAJ,EAAoB,EACpBH,EAAgB,EAChBC,EACAG,GAEAG,EAAKC,IAAMN,EACPK,EAAKC,IACLL,EACAH,EACAC,EACAG,GAGJG,EAAKE,IAAMP,EACPK,EAAKE,IACLN,EACAH,EACAC,EACAG,EAER,CAKM,SAAUM,EAAcC,GAAUC,EAAEA,EAACC,EAAEA,IACzCP,EAAeK,EAAIC,EAAGA,EAAET,UAAWS,EAAEZ,MAAOY,EAAEX,aAC9CK,EAAeK,EAAIE,EAAGA,EAAEV,UAAWU,EAAEb,MAAOa,EAAEZ,YAClD,CAEA,MAAMa,EAAsB,cACtBC,EAAsB,gBAkFtB,SAAUC,EAAcT,EAAYU,GACtCV,EAAKC,KAAOS,EACZV,EAAKE,KAAOQ,CAChB,CAOM,SAAUC,EACZX,EACAY,EACAC,EACAhB,EACAiB,EAAqB,IAKrBf,EAAeC,EAAMY,EAAeC,EAHhBE,EAAAA,UAAUf,EAAKC,IAAKD,EAAKE,IAAKY,GAGUjB,EAChE,CAEA,SAASmB,EACLC,EACAjB,GAEA,MAAqB,iBAAViB,EACCC,WAAWD,GAAS,KAAQjB,EAAKE,IAAMF,EAAKC,KAEjDgB,CACX,CAKgBE,SAAAA,EACZf,EACAgB,EACAC,GAEA,MAAMC,EAAaD,GAAajB,EAChCO,EACIP,EAAIC,EACJW,EAAqBI,EAAUf,EAAGiB,EAAWjB,GAC7Ce,EAAUG,OACVH,EAAU3B,MACV2B,EAAUI,SAEdb,EACIP,EAAIE,EACJU,EAAqBI,EAAUd,EAAGgB,EAAWhB,GAC7Cc,EAAUK,OACVL,EAAU3B,MACV2B,EAAUM,QAElB,oGAlIM,SACFtB,EACAuB,EACAC,EACAC,GAA8B,GAE9B,MAAMC,EAAaF,EAASG,OAC5B,IAAKD,EAAY,OAKjB,IAAIE,EACAC,EAHJN,EAAUtB,EAAIsB,EAAUrB,EAAI,EAK5B,IAAK,IAAI4B,EAAI,EAAGA,EAAIJ,EAAYI,IAAK,CACjCF,EAAOJ,EAASM,GAChBD,EAAQD,EAAKG,gBAMb,MAAMC,cAAEA,GAAkBJ,EAAKK,QAE3BD,GACAA,EAAcE,MAAMC,OACkB,aAAtCH,EAAcE,MAAMC,MAAMC,UAM1BX,GACAG,EAAKK,QAAQI,cACbT,EAAKU,QACLV,IAASA,EAAKW,OAEdlC,EAAcL,EAAIC,GAAI2B,EAAKU,OAAOE,OAAOvC,GACzCI,EAAcL,EAAIE,GAAI0B,EAAKU,OAAOE,OAAOtC,IAGzC2B,IAEAN,EAAUtB,GAAK4B,EAAM5B,EAAEZ,MACvBkC,EAAUrB,GAAK2B,EAAM3B,EAAEb,MAGvBU,EAAcC,EAAK6B,IAGnBJ,GAAsBgB,EAAAA,aAAab,EAAKc,eACxC3B,EAAaf,EAAK4B,EAAKc,aAAcd,EAAKe,QAAQC,WAE1D,CAOIrB,EAAUtB,EAAIG,GACdmB,EAAUtB,EAAIE,IAEdoB,EAAUtB,EAAI,GAGdsB,EAAUrB,EAAIE,GACdmB,EAAUrB,EAAIC,IAEdoB,EAAUrB,EAAI,EAEtB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../utils/mix/number.mjs.js");function n(i){return i.max-i.min}function e(e,t,a){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=o,e.originPoint=i.mixNumber(t.min,t.max,e.origin),e.scale=n(a)/n(t),e.translate=i.mixNumber(a.min,a.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function t(e,t,a){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const r=o?i.mixNumber(a.min,a.max,o):a.min;e.min=r+t.min,e.max=e.min+n(t)}function a(e,t,a){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const r=o?i.mixNumber(a.min,a.max,o):a.min;e.min=t.min-r,e.max=e.min+n(t)}exports.calcAxisDelta=e,exports.calcBoxDelta=function(i,n,t,a){e(i.x,n.x,t.x,a?a.originX:void 0),e(i.y,n.y,t.y,a?a.originY:void 0)},exports.calcLength=n,exports.calcRelativeAxis=t,exports.calcRelativeAxisPosition=a,exports.calcRelativeBox=function(i,n,e,a){t(i.x,n.x,e.x,a?.x),t(i.y,n.y,e.y,a?.y)},exports.calcRelativePosition=function(i,n,e,t){a(i.x,n.x,e.x,t?.x),a(i.y,n.y,e.y,t?.y)},exports.isNear=function(i,n,e){return Math.abs(i-n)<=e};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../utils/mix/number.mjs.js");function n(i){return i.max-i.min}function e(e,t,a,o=.5){e.origin=o,e.originPoint=i.mixNumber(t.min,t.max,e.origin),e.scale=n(a)/n(t),e.translate=i.mixNumber(a.min,a.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function t(e,t,a,o=0){const r=o?i.mixNumber(a.min,a.max,o):a.min;e.min=r+t.min,e.max=e.min+n(t)}function a(e,t,a,o=0){const r=o?i.mixNumber(a.min,a.max,o):a.min;e.min=t.min-r,e.max=e.min+n(t)}exports.calcAxisDelta=e,exports.calcBoxDelta=function(i,n,t,a){e(i.x,n.x,t.x,a?a.originX:void 0),e(i.y,n.y,t.y,a?a.originY:void 0)},exports.calcLength=n,exports.calcRelativeAxis=t,exports.calcRelativeAxisPosition=a,exports.calcRelativeBox=function(i,n,e,a){t(i.x,n.x,e.x,a?.x),t(i.y,n.y,e.y,a?.y)},exports.calcRelativePosition=function(i,n,e,t){a(i.x,n.x,e.x,t?.x),a(i.y,n.y,e.y,t?.y)},exports.isNear=function(i,n,e){return Math.abs(i-n)<=e};
2
2
  //# sourceMappingURL=delta-calc.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delta-calc.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = anchorPoint + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent, anchor) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x);\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = layout.min - anchorPoint;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent, anchor) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n//# sourceMappingURL=delta-calc.mjs.map\n"],"names":["calcLength","axis","max","min","calcAxisDelta","delta","source","target","origin","arguments","length","undefined","originPoint","mixNumber","scale","translate","isNaN","calcRelativeAxis","relative","parent","anchor","anchorPoint","calcRelativeAxisPosition","layout","x","originX","y","originY","isNear","value","maxDistance","Math","abs"],"mappings":"mHAWM,SAAUA,EAAWC,GACvB,OAAOA,EAAKC,IAAMD,EAAKE,GAC3B,CAUM,SAAUC,EACZC,EACAC,EACAC,GACoB,IAApBC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAiB,GAEjBJ,EAAMG,OAASA,EACfH,EAAMO,YAAcC,EAASA,UAACP,EAAOH,IAAKG,EAAOJ,IAAKG,EAAMG,QAC5DH,EAAMS,MAAQd,EAAWO,GAAUP,EAAWM,GAC9CD,EAAMU,UACFF,YAAUN,EAAOJ,IAAKI,EAAOL,IAAKG,EAAMG,QAAUH,EAAMO,aAGvDP,EAAMS,OA/BG,OA+BmBT,EAAMS,OA9BzB,QA+BVE,MAAMX,EAAMS,UAEZT,EAAMS,MAAQ,IAIbT,EAAMU,YAnCO,KAoCVV,EAAMU,WAnCI,KAoCdC,MAAMX,EAAMU,cAEZV,EAAMU,UAAY,EAE1B,CAsBM,SAAUE,EACZV,EACAW,EACAC,GACkB,IAAlBC,EAAAX,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAiB,EAEjB,MAAMY,EAAcD,EACdP,EAASA,UAACM,EAAOhB,IAAKgB,EAAOjB,IAAKkB,GAClCD,EAAOhB,IACbI,EAAOJ,IAAMkB,EAAcH,EAASf,IACpCI,EAAOL,IAAMK,EAAOJ,IAAMH,EAAWkB,EACzC,CAYM,SAAUI,EACZf,EACAgB,EACAJ,GACkB,IAAlBC,EAAAX,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAiB,EAEjB,MAAMY,EAAcD,EACdP,EAASA,UAACM,EAAOhB,IAAKgB,EAAOjB,IAAKkB,GAClCD,EAAOhB,IACbI,EAAOJ,IAAMoB,EAAOpB,IAAMkB,EAC1Bd,EAAOL,IAAMK,EAAOJ,IAAMH,EAAWuB,EACzC,8CAtDM,SACFlB,EACAC,EACAC,EACAC,GAEAJ,EACIC,EAAMmB,EACNlB,EAAOkB,EACPjB,EAAOiB,EACPhB,EAAUA,EAAOiB,aAAqBd,GAE1CP,EACIC,EAAMqB,EACNpB,EAAOoB,EACPnB,EAAOmB,EACPlB,EAAUA,EAAOmB,aAAqBhB,EAE9C,6GAeM,SACFJ,EACAW,EACAC,EACAC,GAEAH,EAAiBV,EAAOiB,EAAGN,EAASM,EAAGL,EAAOK,EAAGJ,GAAQI,GACzDP,EAAiBV,EAAOmB,EAAGR,EAASQ,EAAGP,EAAOO,EAAGN,GAAQM,EAC7D,+BAeM,SACFnB,EACAgB,EACAJ,EACAC,GAEAE,EAAyBf,EAAOiB,EAAGD,EAAOC,EAAGL,EAAOK,EAAGJ,GAAQI,GAC/DF,EAAyBf,EAAOmB,EAAGH,EAAOG,EAAGP,EAAOO,EAAGN,GAAQM,EACnE,iBApGgBE,SACZC,EACAtB,EACAuB,GAEA,OAAOC,KAAKC,IAAIH,EAAQtB,IAAWuB,CACvC"}
1
+ {"version":3,"file":"delta-calc.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = anchorPoint + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent, anchor) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x);\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = layout.min - anchorPoint;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent, anchor) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n//# sourceMappingURL=delta-calc.mjs.map\n"],"names":["calcLength","axis","max","min","calcAxisDelta","delta","source","target","origin","originPoint","mixNumber","scale","translate","isNaN","calcRelativeAxis","relative","parent","anchor","anchorPoint","calcRelativeAxisPosition","layout","x","originX","undefined","y","originY","isNear","value","maxDistance","Math","abs"],"mappings":"mHAWM,SAAUA,EAAWC,GACvB,OAAOA,EAAKC,IAAMD,EAAKE,GAC3B,CAUM,SAAUC,EACZC,EACAC,EACAC,EACAC,EAAiB,IAEjBH,EAAMG,OAASA,EACfH,EAAMI,YAAcC,EAASA,UAACJ,EAAOH,IAAKG,EAAOJ,IAAKG,EAAMG,QAC5DH,EAAMM,MAAQX,EAAWO,GAAUP,EAAWM,GAC9CD,EAAMO,UACFF,YAAUH,EAAOJ,IAAKI,EAAOL,IAAKG,EAAMG,QAAUH,EAAMI,aAGvDJ,EAAMM,OA/BG,OA+BmBN,EAAMM,OA9BzB,QA+BVE,MAAMR,EAAMM,UAEZN,EAAMM,MAAQ,IAIbN,EAAMO,YAnCO,KAoCVP,EAAMO,WAnCI,KAoCdC,MAAMR,EAAMO,cAEZP,EAAMO,UAAY,EAE1B,CAsBM,SAAUE,EACZP,EACAQ,EACAC,EACAC,EAAiB,GAEjB,MAAMC,EAAcD,EACdP,EAASA,UAACM,EAAOb,IAAKa,EAAOd,IAAKe,GAClCD,EAAOb,IACbI,EAAOJ,IAAMe,EAAcH,EAASZ,IACpCI,EAAOL,IAAMK,EAAOJ,IAAMH,EAAWe,EACzC,CAYM,SAAUI,EACZZ,EACAa,EACAJ,EACAC,EAAiB,GAEjB,MAAMC,EAAcD,EACdP,EAASA,UAACM,EAAOb,IAAKa,EAAOd,IAAKe,GAClCD,EAAOb,IACbI,EAAOJ,IAAMiB,EAAOjB,IAAMe,EAC1BX,EAAOL,IAAMK,EAAOJ,IAAMH,EAAWoB,EACzC,8CAtDM,SACFf,EACAC,EACAC,EACAC,GAEAJ,EACIC,EAAMgB,EACNf,EAAOe,EACPd,EAAOc,EACPb,EAAUA,EAAOc,aAAqBC,GAE1CnB,EACIC,EAAMmB,EACNlB,EAAOkB,EACPjB,EAAOiB,EACPhB,EAAUA,EAAOiB,aAAqBF,EAE9C,6GAeM,SACFhB,EACAQ,EACAC,EACAC,GAEAH,EAAiBP,EAAOc,EAAGN,EAASM,EAAGL,EAAOK,EAAGJ,GAAQI,GACzDP,EAAiBP,EAAOiB,EAAGT,EAASS,EAAGR,EAAOQ,EAAGP,GAAQO,EAC7D,+BAeM,SACFjB,EACAa,EACAJ,EACAC,GAEAE,EAAyBZ,EAAOc,EAAGD,EAAOC,EAAGL,EAAOK,EAAGJ,GAAQI,GAC/DF,EAAyBZ,EAAOiB,EAAGJ,EAAOI,EAAGR,EAAOQ,EAAGP,GAAQO,EACnE,iBApGgBE,SACZC,EACApB,EACAqB,GAEA,OAAOC,KAAKC,IAAIH,EAAQpB,IAAWqB,CACvC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/mix/number.mjs.js"),i=require("../../value/types/numbers/units.mjs.js"),t=require("./delta-apply.mjs.js");function o(e,i,o,r,n){return e-=i,e=t.scalePoint(e,1/o,r),void 0!==n&&(e=t.scalePoint(e,1/n,r)),e}function r(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,m=arguments.length>4?arguments[4]:void 0,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t;if(i.percent.test(r)){r=parseFloat(r);r=e.mixNumber(a.min,a.max,r/100)-a.min}if("number"!=typeof r)return;let u=e.mixNumber(l.min,l.max,s);t===l&&(u-=r),t.min=o(t.min,r,n,u,m),t.max=o(t.max,r,n,u,m)}function n(e,i,t,o,n){let[s,m,l]=t;r(e,i[s],i[m],i[l],i.scale,o,n)}const s=["x","scaleX","originX"],m=["y","scaleY","originY"];exports.removeAxisDelta=r,exports.removeAxisTransforms=n,exports.removeBoxTransforms=function(e,i,t,o){n(e.x,i,s,t?t.x:void 0,o?o.x:void 0),n(e.y,i,m,t?t.y:void 0,o?o.y:void 0)},exports.removePointDelta=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/mix/number.mjs.js"),r=require("../../value/types/numbers/units.mjs.js"),i=require("./delta-apply.mjs.js");function s(e,r,s,o,t){return e-=r,e=i.scalePoint(e,1/s,o),void 0!==t&&(e=i.scalePoint(e,1/t,o)),e}function o(i,o=0,t=1,n=.5,m,a=i,u=i){if(r.percent.test(o)){o=parseFloat(o);o=e.mixNumber(u.min,u.max,o/100)-u.min}if("number"!=typeof o)return;let x=e.mixNumber(a.min,a.max,n);i===a&&(x-=o),i.min=s(i.min,o,t,x,m),i.max=s(i.max,o,t,x,m)}function t(e,r,[i,s,t],n,m){o(e,r[i],r[s],r[t],r.scale,n,m)}const n=["x","scaleX","originX"],m=["y","scaleY","originY"];exports.removeAxisDelta=o,exports.removeAxisTransforms=t,exports.removeBoxTransforms=function(e,r,i,s){t(e.x,r,n,i?i.x:void 0,s?s.x:void 0),t(e.y,r,m,i?i.y:void 0,s?s.y:void 0)},exports.removePointDelta=s;
2
2
  //# sourceMappingURL=delta-remove.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delta-remove.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n//# sourceMappingURL=delta-remove.mjs.map\n"],"names":["removePointDelta","point","translate","scale","originPoint","boxScale","scalePoint","undefined","removeAxisDelta","axis","arguments","length","origin","originAxis","sourceAxis","percent","test","parseFloat","mixNumber","min","max","removeAxisTransforms","transforms","_ref","key","scaleKey","originKey","xKeys","yKeys","box","originBox","sourceBox","x","y"],"mappings":"yMASM,SAAUA,EACZC,EACAC,EACAC,EACAC,EACAC,GASA,OAPAJ,GAASC,EACTD,EAAQK,EAAUA,WAACL,EAAO,EAAIE,EAAOC,QAEpBG,IAAbF,IACAJ,EAAQK,EAAUA,WAACL,EAAO,EAAII,EAAUD,IAGrCH,CACX,CAKM,SAAUO,EACZC,GAMuB,IALvBP,EAAAQ,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAA6B,EAC7BP,EAAAO,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAgB,EAChBE,EAAAF,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAiB,GACjBL,EAAiBK,UAAAC,OAAAD,EAAAA,kBAAAH,EACjBM,EAAAH,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAmBD,EACnBK,EAAAJ,UAAAC,OAAA,QAAAJ,IAAAG,UAAA,GAAAA,UAAA,GAAmBD,EAEnB,GAAIM,EAAOA,QAACC,KAAKd,GAAY,CACzBA,EAAYe,WAAWf,GAMvBA,EALyBgB,EAASA,UAC9BJ,EAAWK,IACXL,EAAWM,IACXlB,EAAY,KAEeY,EAAWK,GAC9C,CAEA,GAAyB,iBAAdjB,EAAwB,OAEnC,IAAIE,EAAcc,EAAAA,UAAUL,EAAWM,IAAKN,EAAWO,IAAKR,GACxDH,IAASI,IAAYT,GAAeF,GAExCO,EAAKU,IAAMnB,EACPS,EAAKU,IACLjB,EACAC,EACAC,EACAC,GAGJI,EAAKW,IAAMpB,EACPS,EAAKW,IACLlB,EACAC,EACAC,EACAC,EAER,UAMgBgB,EACZZ,EACAa,EAA0BC,EAE1BX,EACAE,GAAiB,IAFhBU,EAAKC,EAAUC,GAAoBH,EAIpCf,EACIC,EACAa,EAAWE,GACXF,EAAWG,GACXH,EAAWI,GACXJ,EAAWnB,MACXS,EACAE,EAER,CAKA,MAAMa,EAAQ,CAAC,IAAK,SAAU,WACxBC,EAAQ,CAAC,IAAK,SAAU,gGAMxB,SACFC,EACAP,EACAQ,EACAC,GAEAV,EACIQ,EAAIG,EACJV,EACAK,EACAG,EAAYA,EAAUE,OAAIzB,EAC1BwB,EAAYA,EAAUC,OAAIzB,GAE9Bc,EACIQ,EAAII,EACJX,EACAM,EACAE,EAAYA,EAAUG,OAAI1B,EAC1BwB,EAAYA,EAAUE,OAAI1B,EAElC"}
1
+ {"version":3,"file":"delta-remove.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs"],"sourcesContent":["import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n//# sourceMappingURL=delta-remove.mjs.map\n"],"names":["removePointDelta","point","translate","scale","originPoint","boxScale","scalePoint","undefined","removeAxisDelta","axis","origin","originAxis","sourceAxis","percent","test","parseFloat","mixNumber","min","max","removeAxisTransforms","transforms","key","scaleKey","originKey","xKeys","yKeys","box","originBox","sourceBox","x","y"],"mappings":"yMASM,SAAUA,EACZC,EACAC,EACAC,EACAC,EACAC,GASA,OAPAJ,GAASC,EACTD,EAAQK,EAAUA,WAACL,EAAO,EAAIE,EAAOC,QAEpBG,IAAbF,IACAJ,EAAQK,EAAUA,WAACL,EAAO,EAAII,EAAUD,IAGrCH,CACX,CAKM,SAAUO,EACZC,EACAP,EAA6B,EAC7BC,EAAgB,EAChBO,EAAiB,GACjBL,EACAM,EAAmBF,EACnBG,EAAmBH,GAEnB,GAAII,EAAOA,QAACC,KAAKZ,GAAY,CACzBA,EAAYa,WAAWb,GAMvBA,EALyBc,EAASA,UAC9BJ,EAAWK,IACXL,EAAWM,IACXhB,EAAY,KAEeU,EAAWK,GAC9C,CAEA,GAAyB,iBAAdf,EAAwB,OAEnC,IAAIE,EAAcY,EAAAA,UAAUL,EAAWM,IAAKN,EAAWO,IAAKR,GACxDD,IAASE,IAAYP,GAAeF,GAExCO,EAAKQ,IAAMjB,EACPS,EAAKQ,IACLf,EACAC,EACAC,EACAC,GAGJI,EAAKS,IAAMlB,EACPS,EAAKS,IACLhB,EACAC,EACAC,EACAC,EAER,CAMgBc,SAAAA,EACZV,EACAW,GACCC,EAAKC,EAAUC,GAChBb,EACAE,GAEAJ,EACIC,EACAW,EAAWC,GACXD,EAAWE,GACXF,EAAWG,GACXH,EAAWjB,MACXO,EACAE,EAER,CAKA,MAAMY,EAAQ,CAAC,IAAK,SAAU,WACxBC,EAAQ,CAAC,IAAK,SAAU,gGAMxB,SACFC,EACAN,EACAO,EACAC,GAEAT,EACIO,EAAIG,EACJT,EACAI,EACAG,EAAYA,EAAUE,OAAItB,EAC1BqB,EAAYA,EAAUC,OAAItB,GAE9BY,EACIO,EAAII,EACJV,EACAK,EACAE,EAAYA,EAAUG,OAAIvB,EAC1BqB,EAAYA,EAAUE,OAAIvB,EAElC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../animation/animate/single-value.mjs.js"),e=require("../../animation/optimized-appear/get-appear-id.mjs.js"),i=require("../../animation/utils/get-value-transition.mjs.js"),s=require("../../frameloop/microtask.mjs.js"),o=require("../../frameloop/sync-time.mjs.js"),a=require("../styles/scale-correction.mjs.js"),r=require("../../utils/delay.mjs.js"),n=require("../../utils/is-svg-element.mjs.js"),l=require("../../utils/is-svg-svg-element.mjs.js"),h=require("../../utils/mix/number.mjs.js"),c=require("../../value/index.mjs.js"),u=require("../../value/utils/resolve-motion-value.mjs.js"),d=require("../animation/mix-values.mjs.js"),m=require("../geometry/copy.mjs.js"),p=require("../geometry/delta-apply.mjs.js"),y=require("../geometry/delta-calc.mjs.js"),g=require("../geometry/delta-remove.mjs.js"),v=require("../geometry/models.mjs.js"),f=require("../geometry/utils.mjs.js"),x=require("../shared/stack.mjs.js"),j=require("../styles/transform.mjs.js"),T=require("../utils/each-axis.mjs.js"),D=require("../utils/flat-tree.mjs.js"),B=require("../utils/has-transform.mjs.js"),P=require("./state.mjs.js"),S=require("../../frameloop/frame.mjs.js"),A=require("../../../../../motion-utils/dist/es/noop.mjs.js"),R=require("../../../../../motion-utils/dist/es/subscription-manager.mjs.js"),V=require("../../../../../motion-utils/dist/es/clamp.mjs.js");const L=["","X","Y","Z"];let k=0;function E(t,e,i,s){const{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function w(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:i}=t.options;if(!i)return;const s=e.getOptimisedAppearId(i);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",S.frame,!(e||i))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&w(o)}function C(t){t.updateLayout()}function U(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,a=e.source!==t.layout.source;if("size"===o)T.eachAxis(t=>{const s=a?e.measuredBox[t]:e.layoutBox[t],o=y.calcLength(s);s.min=i[t].min,s.max=s.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";m.copyAxisInto(a?e.measuredBox[t]:e.layoutBox[t],i[t])}else it(o,e.layoutBox,i)&&T.eachAxis(s=>{const o=a?e.measuredBox[s]:e.layoutBox[s],r=y.calcLength(i[s]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r=v.createDelta();y.calcBoxDelta(r,i,e.layoutBox);const n=v.createDelta();a?y.calcBoxDelta(n,t.applyTransform(s,!0),e.measuredBox):y.calcBoxDelta(n,i,e.layoutBox);const l=!f.isDeltaZero(r);let h=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:o,layout:a}=s;if(o&&a){const r=t.options.layoutAnchor||void 0,n=v.createBox();y.calcRelativePosition(n,e.layoutBox,o.layoutBox,r);const l=v.createBox();y.calcRelativePosition(l,i,a.layoutBox,r),f.boxEqualsRounded(n,l)||(h=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=n,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:n,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function I(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function F(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function q(t){t.clearSnapshot()}function b(t){t.clearMeasurements()}function O(t){t.isLayoutDirty=!0,t.updateLayout()}function M(t){t.isLayoutDirty=!1}function N(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function z(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function H(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function W(t){t.resolveTargetDelta()}function G(t){t.calcProjection()}function Z(t){t.resetSkewAndRotation()}function $(t){t.removeLeadSnapshot()}function X(t,e,i){t.translate=h.mixNumber(e.translate,0,i),t.scale=h.mixNumber(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function Y(t,e,i,s){t.min=h.mixNumber(e.min,i.min,s),t.max=h.mixNumber(e.max,i.max,s)}function _(t,e,i,s){Y(t.x,e.x,i.x,s),Y(t.y,e.y,i.y,s)}function J(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const K={duration:.45,ease:[.4,0,.1,1]},Q=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),tt=Q("applewebkit/")&&!Q("chrome/")?Math.round:A.noop;function et(t){t.min=tt(t.min),t.max=tt(t.max)}function it(t,e,i){return"position"===t||"preserve-aspect"===t&&!y.isNear(f.aspectRatio(e),f.aspectRatio(i),.2)}function st(t){return t!==t.root&&t.scroll?.wasRoot}exports.cleanDirtyNodes=F,exports.createProjectionNode=function(e){let{attachResizeListener:T,defaultParent:A,measureScroll:Y,checkIsScrollRoot:Q,resetTransform:tt}=e;return class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A?.();this.id=k++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(I),this.nodes.forEach(W),this.nodes.forEach(G),this.nodes.forEach(F)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new D.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new R.SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t){const e=this.eventHandlers.get(t);for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];e&&e.notify(...s)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;this.isSVG=n.isSVGElement(t)&&!l.isSVGSVGElement(t),this.instance=t;const{layoutId:e,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||e)&&(this.isLayoutDirty=!0),T){let e,i=0;const s=()=>this.root.updateBlockedByResize=!1;S.frame.read(()=>{i=window.innerWidth}),T(t,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,e&&e(),e=r.delay(s,250),P.globalProjectionState.hasAnimatedSinceResize&&(P.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(H)))})}e&&this.root.registerSharedNode(e,this),!1!==this.options.animate&&o&&(e||s)&&this.addEventListener("didUpdate",t=>{let{delta:e,hasLayoutChanged:s,hasRelativeLayoutChanged:a,layout:r}=t;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const n=this.options.transition||o.getDefaultTransition()||K,{onLayoutAnimationStart:l,onLayoutAnimationComplete:h}=o.getProps(),c=!this.targetLayout||!f.boxEqualsRounded(this.targetLayout,r),u=!s&&a;if(this.options.layoutRoot||this.resumeFrom||u||s&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...i.getValueTransition(n,"layout"),onPlay:l,onComplete:h};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else s||H(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),S.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Z),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&w(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(O),void this.nodes.forEach(b)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(M);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(N),this.nodes.forEach(z),this.nodes.forEach(C),this.nodes.forEach(U)):this.nodes.forEach(M),this.clearAllSnapshots();const t=o.time.now();S.frameData.delta=V.clamp(0,1e3/60,t-S.frameData.timestamp),S.frameData.timestamp=t,S.frameData.isProcessing=!0,S.frameSteps.update.process(S.frameData),S.frameSteps.preRender.process(S.frameData),S.frameSteps.render.process(S.frameData),S.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,s.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(q),this.sharedNodes.forEach($)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,S.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){S.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||y.calcLength(this.snapshot.measuredBox.x)||y.calcLength(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=v.createBox()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=Q(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:Y(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!tt)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!f.isDeltaZero(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||B.hasTransform(this.latestValues)||o)&&(tt(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.measurePageBox();let i=this.removeElementScroll(e);var s;return t&&(i=this.removeTransform(i)),et((s=i).x),et(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return v.createBox();const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(st))){const{scroll:t}=this.root;t&&(p.translateAxis(e.x,t.offset.x),p.translateAxis(e.y,t.offset.y))}return e}removeElementScroll(t){const e=v.createBox();if(m.copyBoxInto(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const s=this.path[i],{scroll:o,options:a}=s;s!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&m.copyBoxInto(e,t),p.translateAxis(e.x,o.offset.x),p.translateAxis(e.y,o.offset.y))}return e}applyTransform(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=(arguments.length>2?arguments[2]:void 0)||v.createBox();m.copyBoxInto(i,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(p.translateAxis(i.x,-s.scroll.offset.x),p.translateAxis(i.y,-s.scroll.offset.y)),B.hasTransform(s.latestValues)&&p.transformBox(i,s.latestValues,s.layout?.layoutBox)}return B.hasTransform(this.latestValues)&&p.transformBox(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e=v.createBox();m.copyBoxInto(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!B.hasTransform(i.latestValues))continue;let s;i.instance&&(B.hasScale(i.latestValues)&&i.updateSnapshot(),s=v.createBox(),m.copyBoxInto(s,i.measurePageBox())),g.removeBoxTransforms(e,i.latestValues,i.snapshot?.layoutBox,s)}return B.hasTransform(this.latestValues)&&g.removeBoxTransforms(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==S.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=S.frameData.timestamp;const a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=v.createBox(),this.targetWithTransforms=v.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),y.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):m.copyBoxInto(this.target,this.layout.layoutBox),p.applyBoxDelta(this.target,this.targetDelta)):m.copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!B.hasScale(this.parent.latestValues)&&!B.has2DTranslate(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=v.createBox(),this.relativeTargetOrigin=v.createBox(),y.calcRelativePosition(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),m.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===S.frameData.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;m.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,r=this.treeScale.y;p.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=v.createBox());const{target:n}=t;n?(this.projectionDelta&&this.prevProjectionDelta?(m.copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),m.copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),y.calcBoxDelta(this.projectionDelta,this.layoutCorrected,n,this.latestValues),this.treeScale.x===a&&this.treeScale.y===r&&f.axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&f.axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",n))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=v.createDelta(),this.projectionDelta=v.createDelta(),this.projectionDeltaWithTransform=v.createDelta()}setAnimationOrigin(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;const s=this.snapshot,o=s?s.latestValues:{},a={...this.latestValues},r=v.createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const n=v.createBox(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,p=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(J));let g;this.animationProgress=0;const x=i?.interpolateProjection(t);this.mixTargetDelta=e=>{const i=e/1e3,s=x?.(i);s?(r.x.translate=s.x,r.x.scale=h.mixNumber(t.x.scale,1,i),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=s.y,r.y.scale=h.mixNumber(t.y.scale,1,i),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(X(r.x,t.x,i),X(r.y,t.y,i)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(y.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),_(this.relativeTarget,this.relativeTargetOrigin,n,i),g&&f.boxEquals(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=v.createBox()),m.copyBoxInto(g,this.relativeTarget)),l&&(this.animationValues=a,d.mixValues(a,o,this.latestValues,i,p,u)),s&&void 0!==s.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=s.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(S.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=S.frame.update(()=>{P.globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=c.motionValue(0)),this.motionValue.jump(0,!1),this.currentAnimation=t.animateSingleValue(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:i,layout:s,latestValues:o}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&it(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||v.createBox();const e=y.calcLength(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;const s=y.calcLength(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}m.copyBoxInto(e,i),p.transformBox(e,o),y.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new x.NodeStack);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote(){let{needsReset:t,transition:e,preserveFollowOpacity:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const s={};i.z&&E("z",t,s,this.animationValues);for(let e=0;e<L.length;e++)E(`rotate${L[e]}`,t,s,this.animationValues),E(`skew${L[e]}`,t,s,this.animationValues);t.render();for(const e in s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=u.resolveMotionValue(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=u.resolveMotionValue(e?.pointerEvents)||""),void(this.hasProjected&&!B.hasTransform(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const o=s.animationValues||s.latestValues;this.applyTransformsToTarget();let r=j.buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,o);i&&(r=i(o,r)),t.transform=r;const{x:n,y:l}=this.projectionDelta;t.transformOrigin=`${100*n.origin}% ${100*l.origin}% 0`,s.animationValues?t.opacity=s===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=s===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in a.scaleCorrectors){if(void 0===o[e])continue;const{correct:i,applyTo:n,isCSSVariable:l}=a.scaleCorrectors[e],h="none"===r?o[e]:i(o[e],s);if(n){const e=n.length;for(let i=0;i<e;i++)t[n[i]]=h}else l?this.options.visualElement.renderState.vars[e]=h:t[e]=h}this.options.layoutId&&(t.pointerEvents=s===this?u.resolveMotionValue(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(b),this.root.sharedNodes.clear()}}},exports.mixAxis=Y,exports.mixBox=_,exports.propagateDirtyNodes=I;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../animation/animate/single-value.mjs.js"),e=require("../../animation/optimized-appear/get-appear-id.mjs.js"),i=require("../../animation/utils/get-value-transition.mjs.js"),s=require("../../frameloop/microtask.mjs.js"),o=require("../../frameloop/sync-time.mjs.js"),a=require("../styles/scale-correction.mjs.js"),r=require("../../utils/delay.mjs.js"),n=require("../../utils/is-svg-element.mjs.js"),l=require("../../utils/is-svg-svg-element.mjs.js"),h=require("../../utils/mix/number.mjs.js"),c=require("../../value/index.mjs.js"),u=require("../../value/utils/resolve-motion-value.mjs.js"),m=require("../animation/mix-values.mjs.js"),d=require("../geometry/copy.mjs.js"),p=require("../geometry/delta-apply.mjs.js"),y=require("../geometry/delta-calc.mjs.js"),g=require("../geometry/delta-remove.mjs.js"),f=require("../geometry/models.mjs.js"),v=require("../geometry/utils.mjs.js"),x=require("../shared/stack.mjs.js"),j=require("../styles/transform.mjs.js"),T=require("../utils/each-axis.mjs.js"),D=require("../utils/flat-tree.mjs.js"),B=require("../utils/has-transform.mjs.js"),P=require("./state.mjs.js"),S=require("../../frameloop/frame.mjs.js"),R=require("../../../../../motion-utils/dist/es/noop.mjs.js"),A=require("../../../../../motion-utils/dist/es/subscription-manager.mjs.js"),V=require("../../../../../motion-utils/dist/es/clamp.mjs.js");const L=["","X","Y","Z"];let k=0;function E(t,e,i,s){const{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function w(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:i}=t.options;if(!i)return;const s=e.getOptimisedAppearId(i);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",S.frame,!(e||i))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&w(o)}function C(t){t.updateLayout()}function U(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,a=e.source!==t.layout.source;if("size"===o)T.eachAxis(t=>{const s=a?e.measuredBox[t]:e.layoutBox[t],o=y.calcLength(s);s.min=i[t].min,s.max=s.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";d.copyAxisInto(a?e.measuredBox[t]:e.layoutBox[t],i[t])}else it(o,e.layoutBox,i)&&T.eachAxis(s=>{const o=a?e.measuredBox[s]:e.layoutBox[s],r=y.calcLength(i[s]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r=f.createDelta();y.calcBoxDelta(r,i,e.layoutBox);const n=f.createDelta();a?y.calcBoxDelta(n,t.applyTransform(s,!0),e.measuredBox):y.calcBoxDelta(n,i,e.layoutBox);const l=!v.isDeltaZero(r);let h=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:o,layout:a}=s;if(o&&a){const r=t.options.layoutAnchor||void 0,n=f.createBox();y.calcRelativePosition(n,e.layoutBox,o.layoutBox,r);const l=f.createBox();y.calcRelativePosition(l,i,a.layoutBox,r),v.boxEqualsRounded(n,l)||(h=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=n,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:n,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function I(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function F(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function q(t){t.clearSnapshot()}function b(t){t.clearMeasurements()}function O(t){t.isLayoutDirty=!0,t.updateLayout()}function M(t){t.isLayoutDirty=!1}function N(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function z(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function H(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function W(t){t.resolveTargetDelta()}function G(t){t.calcProjection()}function Z(t){t.resetSkewAndRotation()}function $(t){t.removeLeadSnapshot()}function X(t,e,i){t.translate=h.mixNumber(e.translate,0,i),t.scale=h.mixNumber(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function Y(t,e,i,s){t.min=h.mixNumber(e.min,i.min,s),t.max=h.mixNumber(e.max,i.max,s)}function _(t,e,i,s){Y(t.x,e.x,i.x,s),Y(t.y,e.y,i.y,s)}function J(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const K={duration:.45,ease:[.4,0,.1,1]},Q=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),tt=Q("applewebkit/")&&!Q("chrome/")?Math.round:R.noop;function et(t){t.min=tt(t.min),t.max=tt(t.max)}function it(t,e,i){return"position"===t||"preserve-aspect"===t&&!y.isNear(v.aspectRatio(e),v.aspectRatio(i),.2)}function st(t){return t!==t.root&&t.scroll?.wasRoot}exports.cleanDirtyNodes=F,exports.createProjectionNode=function({attachResizeListener:e,defaultParent:T,measureScroll:R,checkIsScrollRoot:Y,resetTransform:Q}){return class{constructor(t={},e=T?.()){this.id=k++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(I),this.nodes.forEach(W),this.nodes.forEach(G),this.nodes.forEach(F)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new D.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new A.SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;this.isSVG=n.isSVGElement(t)&&!l.isSVGSVGElement(t),this.instance=t;const{layoutId:s,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||s)&&(this.isLayoutDirty=!0),e){let i,s=0;const o=()=>this.root.updateBlockedByResize=!1;S.frame.read(()=>{s=window.innerWidth}),e(t,()=>{const t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,i&&i(),i=r.delay(o,250),P.globalProjectionState.hasAnimatedSinceResize&&(P.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(H)))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&a&&(s||o)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:s,layout:o})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||a.getDefaultTransition()||K,{onLayoutAnimationStart:n,onLayoutAnimationComplete:l}=a.getProps(),h=!this.targetLayout||!v.boxEqualsRounded(this.targetLayout,o),c=!e&&s;if(this.options.layoutRoot||this.resumeFrom||c||e&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...i.getValueTransition(r,"layout"),onPlay:n,onComplete:l};(a.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||H(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=o})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),S.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Z),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&w(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(O),void this.nodes.forEach(b)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(M);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(N),this.nodes.forEach(z),this.nodes.forEach(C),this.nodes.forEach(U)):this.nodes.forEach(M),this.clearAllSnapshots();const t=o.time.now();S.frameData.delta=V.clamp(0,1e3/60,t-S.frameData.timestamp),S.frameData.timestamp=t,S.frameData.isProcessing=!0,S.frameSteps.update.process(S.frameData),S.frameSteps.preRender.process(S.frameData),S.frameSteps.render.process(S.frameData),S.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,s.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(q),this.sharedNodes.forEach($)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,S.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){S.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||y.calcLength(this.snapshot.measuredBox.x)||y.calcLength(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=f.createBox()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=Y(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:R(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!Q)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!v.isDeltaZero(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||B.hasTransform(this.latestValues)||o)&&(Q(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let i=this.removeElementScroll(e);var s;return t&&(i=this.removeTransform(i)),et((s=i).x),et(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return f.createBox();const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(st))){const{scroll:t}=this.root;t&&(p.translateAxis(e.x,t.offset.x),p.translateAxis(e.y,t.offset.y))}return e}removeElementScroll(t){const e=f.createBox();if(d.copyBoxInto(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const s=this.path[i],{scroll:o,options:a}=s;s!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&d.copyBoxInto(e,t),p.translateAxis(e.x,o.offset.x),p.translateAxis(e.y,o.offset.y))}return e}applyTransform(t,e=!1,i){const s=i||f.createBox();d.copyBoxInto(s,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(p.translateAxis(s.x,-i.scroll.offset.x),p.translateAxis(s.y,-i.scroll.offset.y)),B.hasTransform(i.latestValues)&&p.transformBox(s,i.latestValues,i.layout?.layoutBox)}return B.hasTransform(this.latestValues)&&p.transformBox(s,this.latestValues,this.layout?.layoutBox),s}removeTransform(t){const e=f.createBox();d.copyBoxInto(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!B.hasTransform(i.latestValues))continue;let s;i.instance&&(B.hasScale(i.latestValues)&&i.updateSnapshot(),s=f.createBox(),d.copyBoxInto(s,i.measurePageBox())),g.removeBoxTransforms(e,i.latestValues,i.snapshot?.layoutBox,s)}return B.hasTransform(this.latestValues)&&g.removeBoxTransforms(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==S.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=S.frameData.timestamp;const a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=f.createBox(),this.targetWithTransforms=f.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),y.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):d.copyBoxInto(this.target,this.layout.layoutBox),p.applyBoxDelta(this.target,this.targetDelta)):d.copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!B.hasScale(this.parent.latestValues)&&!B.has2DTranslate(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=f.createBox(),this.relativeTargetOrigin=f.createBox(),y.calcRelativePosition(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),d.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===S.frameData.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;d.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,r=this.treeScale.y;p.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=f.createBox());const{target:n}=t;n?(this.projectionDelta&&this.prevProjectionDelta?(d.copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),d.copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),y.calcBoxDelta(this.projectionDelta,this.layoutCorrected,n,this.latestValues),this.treeScale.x===a&&this.treeScale.y===r&&v.axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&v.axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",n))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=f.createDelta(),this.projectionDelta=f.createDelta(),this.projectionDeltaWithTransform=f.createDelta()}setAnimationOrigin(t,e=!1,i){const s=this.snapshot,o=s?s.latestValues:{},a={...this.latestValues},r=f.createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const n=f.createBox(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,p=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(J));let g;this.animationProgress=0;const x=i?.interpolateProjection(t);this.mixTargetDelta=e=>{const i=e/1e3,s=x?.(i);s?(r.x.translate=s.x,r.x.scale=h.mixNumber(t.x.scale,1,i),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=s.y,r.y.scale=h.mixNumber(t.y.scale,1,i),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(X(r.x,t.x,i),X(r.y,t.y,i)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(y.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),_(this.relativeTarget,this.relativeTargetOrigin,n,i),g&&v.boxEquals(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=f.createBox()),d.copyBoxInto(g,this.relativeTarget)),l&&(this.animationValues=a,m.mixValues(a,o,this.latestValues,i,p,u)),s&&void 0!==s.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=s.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(S.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=S.frame.update(()=>{P.globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=c.motionValue(0)),this.motionValue.jump(0,!1),this.currentAnimation=t.animateSingleValue(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:i,layout:s,latestValues:o}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&it(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||f.createBox();const e=y.calcLength(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;const s=y.calcLength(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}d.copyBoxInto(e,i),p.transformBox(e,o),y.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new x.NodeStack);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){const s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const s={};i.z&&E("z",t,s,this.animationValues);for(let e=0;e<L.length;e++)E(`rotate${L[e]}`,t,s,this.animationValues),E(`skew${L[e]}`,t,s,this.animationValues);t.render();for(const e in s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=u.resolveMotionValue(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=u.resolveMotionValue(e?.pointerEvents)||""),void(this.hasProjected&&!B.hasTransform(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const o=s.animationValues||s.latestValues;this.applyTransformsToTarget();let r=j.buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,o);i&&(r=i(o,r)),t.transform=r;const{x:n,y:l}=this.projectionDelta;t.transformOrigin=`${100*n.origin}% ${100*l.origin}% 0`,s.animationValues?t.opacity=s===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=s===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in a.scaleCorrectors){if(void 0===o[e])continue;const{correct:i,applyTo:n,isCSSVariable:l}=a.scaleCorrectors[e],h="none"===r?o[e]:i(o[e],s);if(n){const e=n.length;for(let i=0;i<e;i++)t[n[i]]=h}else l?this.options.visualElement.renderState.vars[e]=h:t[e]=h}this.options.layoutId&&(t.pointerEvents=s===this?u.resolveMotionValue(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(b),this.root.sharedNodes.clear()}}},exports.mixAxis=Y,exports.mixBox=_,exports.propagateDirtyNodes=I;
2
2
  //# sourceMappingURL=create-projection-node.mjs.js.map