@nethesis/phone-island 1.0.5-dev.1 → 1.0.5-dev.3
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.
- package/dist/App.js +1 -1
- package/dist/App.js.map +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/components/AudioPlayerView/Progress.js +1 -1
- package/dist/components/AudioPlayerView/Progress.js.map +1 -1
- package/dist/components/CallView/BackCall.js +1 -1
- package/dist/components/CallView/BackCall.js.map +1 -1
- package/dist/components/CallView/DisplayNameUtils.js.map +1 -1
- package/dist/components/CallView/Number.js +1 -1
- package/dist/components/CallView/Number.js.map +1 -1
- package/dist/components/CallView/index.js +1 -1
- package/dist/components/CallView/index.js.map +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/TextScroll.js.map +1 -1
- package/dist/events/SocketEvents.js +1 -1
- package/dist/events/SocketEvents.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/models/currentCall.js +1 -1
- package/dist/models/currentCall.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-dom-event.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-dom-event.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
- package/dist/node_modules/mic-check/lib/index.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js +2 -0
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js.map +1 -0
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
- package/dist/node_modules/style-inject/dist/style-inject.es.js +2 -0
- package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/dist/public/locales/en/translation.json.js +1 -1
- package/dist/public/locales/it/translation.json.js +1 -1
- package/dist/services/user.js.map +1 -1
- package/dist/styles/CustomRange.styles.js.map +1 -1
- package/dist/styles/Island.styles.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/phone/queue.js +0 -2
- package/dist/lib/phone/queue.js.map +0 -1
- package/dist/models/queue.js +0 -2
- package/dist/models/queue.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delay.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/utils/delay.mjs"],"sourcesContent":["import { time, frame, cancelFrame } from 'motion-dom';\nimport { secondsToMilliseconds } from 'motion-utils';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.setup(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\nfunction delayInSeconds(callback, timeout) {\n return delay(callback, secondsToMilliseconds(timeout));\n}\n\nexport { delay, delayInSeconds };\n"],"names":["callback","timeout","start","time","now","checkElapsed","
|
|
1
|
+
{"version":3,"file":"delay.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/utils/delay.mjs"],"sourcesContent":["import { time, frame, cancelFrame } from 'motion-dom';\nimport { secondsToMilliseconds } from 'motion-utils';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.setup(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\nfunction delayInSeconds(callback, timeout) {\n return delay(callback, secondsToMilliseconds(timeout));\n}\n\nexport { delay, delayInSeconds };\n"],"names":["callback","timeout","start","time","now","checkElapsed","timestamp","elapsed","cancelFrame","frame","setup"],"mappings":"gOAMA,SAAeA,EAAUC,GACrB,MAAMC,EAAQC,OAAKC,MACbC,EAAeA,EAAGC,gBACpB,MAAMC,EAAUD,EAAYJ,EACxBK,GAAWN,IACXO,EAAWA,YAACH,GACZL,EAASO,EAAUN,GACvB,EAGJ,OADAQ,EAAAA,MAAMC,MAAML,GAAc,GACnB,IAAMG,EAAAA,YAAYH,EAC7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.getContextWindow=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null;
|
|
2
2
|
//# sourceMappingURL=get-context-window.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-context-window.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/utils/get-context-window.mjs"],"sourcesContent":["// Fixes https://github.com/motiondivision/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n"],"names":["
|
|
1
|
+
{"version":3,"file":"get-context-window.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/utils/get-context-window.mjs"],"sourcesContent":["// Fixes https://github.com/motiondivision/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n"],"names":["getContextWindow","current","ownerDocument","defaultView"],"mappings":"6FACyBA,EAAGC,aACjBA,EAAUA,EAAQC,cAAcC,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="3.7.8",t=e,r="function"==typeof Buffer,o="function"==typeof TextDecoder?new TextDecoder:void 0,n="function"==typeof TextEncoder?new TextEncoder:void 0,a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),i=(e=>{let t={};return a.forEach(((e,r)=>t[e]=r)),t})(),s=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),f="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),u=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),l=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="3.7.8",t=e,r="function"==typeof Buffer,o="function"==typeof TextDecoder?new TextDecoder:void 0,n="function"==typeof TextEncoder?new TextEncoder:void 0,a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),i=(e=>{let t={};return a.forEach(((e,r)=>t[e]=r)),t})(),s=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),f="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),u=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),l=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),p=e=>{let t,r,o,n,i="";const s=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,i+=a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},d="function"==typeof btoa?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):p,x=r?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;r<o;r+=4096)t.push(c.apply(null,e.subarray(r,r+4096)));return d(t.join(""))},h=(e,t=!1)=>t?u(x(e)):x(e),A=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},y=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=e=>e.replace(y,A),g=r?e=>Buffer.from(e,"utf8").toString("base64"):n?e=>x(n.encode(e)):e=>d(b(e)),B=(e,t=!1)=>t?u(g(e)):g(e),C=e=>B(e,!0),U=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,m=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},F=e=>e.replace(U,m),S=e=>{if(e=e.replace(/\s+/g,""),!s.test(e))throw new TypeError("malformed base64.");let t,r,o;e+="==".slice(2-(3&e.length));let n=[];for(let a=0;a<e.length;)t=i[e.charAt(a++)]<<18|i[e.charAt(a++)]<<12|(r=i[e.charAt(a++)])<<6|(o=i[e.charAt(a++)]),64===r?n.push(c(t>>16&255)):64===o?n.push(c(t>>16&255,t>>8&255)):n.push(c(t>>16&255,t>>8&255,255&t));return n.join("")},R="function"==typeof atob?e=>atob(l(e)):r?e=>Buffer.from(e,"base64").toString("binary"):S,v=r?e=>f(Buffer.from(e,"base64")):e=>f(R(e).split("").map((e=>e.charCodeAt(0)))),w=e=>v(D(e)),E=r?e=>Buffer.from(e,"base64").toString("utf8"):o?e=>o.decode(v(e)):e=>F(R(e)),D=e=>l(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),P=e=>E(D(e)),z=e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},I=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),T=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,I(t));e("fromBase64",(function(){return P(this)})),e("toBase64",(function(e){return B(this,e)})),e("toBase64URI",(function(){return B(this,!0)})),e("toBase64URL",(function(){return B(this,!0)})),e("toUint8Array",(function(){return w(this)}))},Z=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,I(t));e("toBase64",(function(e){return h(this,e)})),e("toBase64URI",(function(){return h(this,!0)})),e("toBase64URL",(function(){return h(this,!0)}))},j=()=>{T(),Z()},O={version:e,VERSION:t,atob:R,atobPolyfill:S,btoa:d,btoaPolyfill:p,fromBase64:P,toBase64:B,encode:B,encodeURI:C,encodeURL:C,utob:b,btou:F,decode:P,isValid:z,fromUint8Array:h,toUint8Array:w,extendString:T,extendUint8Array:Z,extendBuiltins:j};exports.Base64=O,exports.VERSION=t,exports.atob=R,exports.atobPolyfill=S,exports.btoa=d,exports.btoaPolyfill=p,exports.btou=F,exports.decode=P,exports.encode=B,exports.encodeURI=C,exports.encodeURL=C,exports.extendBuiltins=j,exports.extendString=T,exports.extendUint8Array=Z,exports.fromBase64=P,exports.fromUint8Array=h,exports.isValid=z,exports.toBase64=B,exports.toUint8Array=w,exports.utob=b,exports.version=e;
|
|
2
2
|
//# sourceMappingURL=base64.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.mjs.js","sources":["../../../node_modules/js-base64/base64.mjs"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.8';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, r1, r2;\n let binArray = []; // use array to avoid minor gc in loop\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n if (r1 === 64) {\n binArray.push(_fromCC(u24 >> 16 & 255));\n }\n else if (r2 === 64) {\n binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));\n }\n else {\n binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255));\n }\n }\n return binArray.join('');\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n"],"names":["version","VERSION","_hasBuffer","Buffer","_TD","TextDecoder","undefined","_TE","TextEncoder","b64chs","Array","prototype","slice","call","b64tab","a","tab","forEach","c","i","b64re","_fromCC","String","fromCharCode","bind","_U8Afrom","Uint8Array","from","it","_mkUriSafe","src","replace","m0","_tidyB64","s","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","length","charCodeAt","TypeError","substring","_btoa","btoa","toString","_fromUint8Array","u8a","strs","l","push","apply","subarray","join","fromUint8Array","arguments","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","offset","btou","b","atobPolyfill","test","u24","r1","r2","binArray","charAt","_atob","atob","_toUint8Array","split","map","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","v","value","enumerable","writable","configurable","extendString","_add","name","body","Object","defineProperty","this","urlsafe","extendUint8Array","extendBuiltins","gBase64","fromBase64","toBase64","encodeURL"],"mappings":"oEAWMA,MAAAA,EAAU,QAIVC,EAAUD,EACVE,EAA+B,mBAAXC,OACpBC,EAA6B,mBAAhBC,YAA6B,IAAIA,iBAAgBC,EAC9DC,EAA6B,mBAAhBC,YAA6B,IAAIA,iBAAgBF,EAE9DG,EAASC,MAAMC,UAAUC,MAAMC,KADvB,qEAERC,EAAS,CAAEC,IACb,IAAIC,EAAM,CAAA,EAEV,OACDP,EAFGQ,SAAQ,CAACC,EAAGC,IAAMH,EAAIE,GAAKC,IACtBH,CACV,EAJc,GAKTI,EAAQ,0EACRC,EAAUC,OAAOC,aAAaC,KAAKF,QACnCG,EAAsC,mBAApBC,WAAWC,KAC7BD,WAAWC,KAAKH,KAAKE,YACpBE,GAAO,IAAIF,WAAWh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,QAASA,EACTiF,KAAMD,EACNP,aAAcA,EACd1B,KAAMD,EACNZ,aAAcA,EACdyE,WAAYnB,EACZoB,SAAU3C,EACVA,OAAQA,EACRC,UAAWA,EACX2C,UAAW3C,EACXJ,KAAMA,EACNS,KAAMA,EACNiB,OAAQA,EACRC,QAASA,EACThC,eAAgBA,EAChB4B,aAAcA,EACdW,aAAcA,EACdQ,iBAAkBA,EAClBC,eAAgBA"}
|
|
1
|
+
{"version":3,"file":"base64.mjs.js","sources":["../../../node_modules/js-base64/base64.mjs"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.8';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, r1, r2;\n let binArray = []; // use array to avoid minor gc in loop\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n if (r1 === 64) {\n binArray.push(_fromCC(u24 >> 16 & 255));\n }\n else if (r2 === 64) {\n binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));\n }\n else {\n binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255));\n }\n }\n return binArray.join('');\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n"],"names":["version","VERSION","_hasBuffer","Buffer","_TD","TextDecoder","undefined","_TE","TextEncoder","b64chs","Array","prototype","slice","call","b64tab","a","tab","forEach","c","i","b64re","_fromCC","String","fromCharCode","bind","_U8Afrom","Uint8Array","from","it","_mkUriSafe","src","replace","m0","_tidyB64","s","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","length","charCodeAt","TypeError","substring","_btoa","btoa","toString","_fromUint8Array","u8a","strs","l","push","apply","subarray","join","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","offset","btou","b","atobPolyfill","test","u24","r1","r2","binArray","charAt","_atob","atob","_toUint8Array","split","map","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","v","value","enumerable","writable","configurable","extendString","_add","name","body","Object","defineProperty","this","extendUint8Array","extendBuiltins","gBase64","fromBase64","toBase64","encodeURL"],"mappings":"oEAWMA,MAAAA,EAAU,QAIVC,EAAUD,EACVE,EAA+B,mBAAXC,OACpBC,EAA6B,mBAAhBC,YAA6B,IAAIA,iBAAgBC,EAC9DC,EAA6B,mBAAhBC,YAA6B,IAAIA,iBAAgBF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OD,EAAe6C,KAAM5C,EAAU,IAC5EuC,EAAK,eAAe,WAAc,OAAOxC,EAAe6C,MAAM,EAAO,IACrEL,EAAK,eAAe,WAAc,OAAOxC,EAAe6C,MAAM,EAAO,GACzE,EAIME,EAAiBA,KACnBR,IACAO,GAAkB,EAEhBE,EAAU,CACZ1G,QAASA,EACTC,QAASA,EACTiF,KAAMD,EACNP,aAAcA,EACd1B,KAAMD,EACNZ,aAAcA,EACdwE,WAAYlB,EACZmB,SAAU1C,EACVA,OAAQA,EACRC,UAAWA,EACX0C,UAAW1C,EACXJ,KAAMA,EACNS,KAAMA,EACNiB,OAAQA,EACRC,QAASA,EACThC,eAAgBA,EAChB4B,aAAcA,EACdW,aAAcA,EACdO,iBAAkBA,EAClBC,eAAgBA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../../../_virtual/
|
|
1
|
+
"use strict";var e=require("../../../_virtual/index8.js");require("./requestMediaPermissions.js");var r=require("../../../_virtual/requestMediaPermissions.js");!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.requestMediaPermissions=e.MediaPermissionsErrorType=void 0;var i=r.__exports;Object.defineProperty(e,"MediaPermissionsErrorType",{enumerable:!0,get:function(){return i.MediaPermissionsErrorType}}),Object.defineProperty(e,"requestMediaPermissions",{enumerable:!0,get:function(){return i.requestMediaPermissions}})}(e.__exports);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),i=require("./JSAnimation.mjs.js"),t=require("./keyframes/get-final.mjs.js"),n=require("./keyframes/KeyframesResolver.mjs.js"),s=require("./NativeAnimationExtended.mjs.js"),a=require("./utils/can-animate.mjs.js"),o=require("./utils/WithPromise.mjs.js"),r=require("./waapi/supports/waapi.mjs.js"),m=require("../../../../motion-utils/dist/es/global-config.mjs.js"),l=require("../../../../motion-utils/dist/es/noop.mjs.js");class h extends o.WithPromise{constructor({autoplay:i=!0,delay:t=0,type:s="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:r="loop",keyframes:m,name:l,motionValue:h,element:p,...d}){super(),this.stop=()=>{this._animation?(this._animation.stop(),this.stopTimeline?.()):this.keyframeResolver?.cancel()},this.createdAt=e.time.now();const u={autoplay:i,delay:t,type:s,repeat:a,repeatDelay:o,repeatType:r,name:l,motionValue:h,element:p,...d},y=p?.KeyframeResolver||n.KeyframeResolver;this.keyframeResolver=new y(m,((e,i,t)=>this.onKeyframesResolved(e,i,u,!t)),l,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,o,h,p){this.keyframeResolver=void 0;const{name:d,type:u,velocity:y,delay:f,isHandoff:c,onUpdate:v}=h;this.resolvedAt=e.time.now(),a.canAnimate(n,d,u,y)||(!m.MotionGlobalConfig.instantAnimations&&f||v?.(t.getFinalKeyframe(n,h,o)),n[0]=n[n.length-1],h.duration=0,h.repeat=0);const j={startTime:p?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:o,...h,keyframes:n},g=!c&&r.supportsBrowserAnimation(j)?new s.NativeAnimationExtended({...j,element:j.motionValue.owner.current}):new i.JSAnimation(j);g.finished.then((()=>this.notifyFinished())).catch(l.noop),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,i){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||n.flushKeyframeResolvers(),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this.animation.cancel()}}exports.AsyncMotionValueAnimation=h;
|
|
2
2
|
//# sourceMappingURL=AsyncMotionValueAnimation.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncMotionValueAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs"],"sourcesContent":["import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n else {\n this.keyframeResolver?.cancel();\n }\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!canAnimate(keyframes, name, type, velocity)) {\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n options.duration = 0;\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n */\n const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n ? new NativeAnimationExtended({\n ...resolvedOptions,\n element: resolvedOptions.motionValue.owner.current,\n })\n : new JSAnimation(resolvedOptions);\n animation.finished.then(() => this.notifyFinished()).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n this.animation.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n"],"names":["AsyncMotionValueAnimation","WithPromise","constructor","
|
|
1
|
+
{"version":3,"file":"AsyncMotionValueAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs"],"sourcesContent":["import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n else {\n this.keyframeResolver?.cancel();\n }\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!canAnimate(keyframes, name, type, velocity)) {\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n options.duration = 0;\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n */\n const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n ? new NativeAnimationExtended({\n ...resolvedOptions,\n element: resolvedOptions.motionValue.owner.current,\n })\n : new JSAnimation(resolvedOptions);\n animation.finished.then(() => this.notifyFinished()).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n this.animation.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n"],"names":["AsyncMotionValueAnimation","WithPromise","constructor","autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element","options","super","this","stop","_animation","stopTimeline","keyframeResolver","cancel","createdAt","time","now","optionsWithDefaults","KeyframeResolver$1","KeyframeResolver","resolvedKeyframes","finalKeyframe","forced","onKeyframesResolved","scheduleResolve","sync","undefined","velocity","isHandoff","onUpdate","resolvedAt","canAnimate","MotionGlobalConfig","instantAnimations","getFinalKeyframe","length","duration","resolvedOptions","startTime","animation","supportsBrowserAnimation","NativeAnimationExtended","owner","current","JSAnimation","finished","then","notifyFinished","catch","noop","pendingTimeline","attachTimeline","_finished","onResolve","_onReject","finally","flushKeyframeResolvers","newTime","speed","state","newSpeed","timeline","play","pause","complete"],"mappings":"uhBAmBA,MAAMA,UAAkCC,EAAAA,YACpCC,WAAAA,EAAYC,SAAEA,GAAW,EAAIC,MAAEA,EAAQ,EAACC,KAAEA,EAAO,YAAWC,OAAEA,EAAS,EAACC,YAAEA,EAAc,EAACC,WAAEA,EAAa,OAAMC,UAAEA,EAASC,KAAEA,EAAIC,YAAEA,EAAWC,QAAEA,KAAYC,IACtJC,QAIAC,KAAKC,KAAO,KACJD,KAAKE,YACLF,KAAKE,WAAWD,OAChBD,KAAKG,kBAGLH,KAAKI,kBAAkBC,QAC3B,EAEJL,KAAKM,UAAYC,OAAKC,MACtB,MAAMC,EAAsB,CACxBrB,WACAC,QACAC,OACAC,SACAC,cACAC,aACAE,OACAC,cACAC,aACGC,GAEDY,EAAqBb,GAASc,kBAAoBA,mBACxDX,KAAKI,iBAAmB,IAAIM,EAAmBhB,GAAW,CAACkB,EAAmBC,EAAeC,IAAWd,KAAKe,oBAAoBH,EAAmBC,EAAeJ,GAAsBK,IAASnB,EAAMC,EAAaC,GACrNG,KAAKI,kBAAkBY,iBAC3B,CACAD,mBAAAA,CAAoBrB,EAAWmB,EAAef,EAASmB,GACnDjB,KAAKI,sBAAmBc,EACxB,MAAMvB,KAAEA,EAAIL,KAAEA,EAAI6B,SAAEA,EAAQ9B,MAAEA,EAAK+B,UAAEA,EAASC,SAAEA,GAAavB,EAC7DE,KAAKsB,WAAaf,OAAKC,MAKlBe,EAAUA,WAAC7B,EAAWC,EAAML,EAAM6B,MAC/BK,EAAkBA,mBAACC,mBAAsBpC,GACzCgC,IAAWK,EAAAA,iBAAiBhC,EAAWI,EAASe,IAEpDnB,EAAU,GAAKA,EAAUA,EAAUiC,OAAS,GAC5C7B,EAAQ8B,SAAW,EACnB9B,EA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ACItD,KAAK+B,UAAUuB,MACnB,CACAC,KAAAA,GACIvD,KAAK+B,UAAUwB,OACnB,CACAC,QAAAA,GACIxD,KAAK+B,UAAUyB,UACnB,CACAnD,MAAAA,GACIL,KAAK+B,UAAU1B,QACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../frameloop/sync-time.mjs.js"),e=require("../utils/mix/index.mjs.js"),i=require("./drivers/driver-frameloop.mjs.js"),s=require("./generators/inertia.mjs.js"),r=require("./generators/keyframes.mjs.js"),n=require("./generators/utils/calc-duration.mjs.js"),a=require("./keyframes/get-final.mjs.js"),o=require("./utils/replace-transition-type.mjs.js"),h=require("./utils/WithPromise.mjs.js"),l=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/pipe.mjs.js"),u=require("../../../../motion-utils/dist/es/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../frameloop/sync-time.mjs.js"),e=require("../utils/mix/index.mjs.js"),i=require("./drivers/driver-frameloop.mjs.js"),s=require("./generators/inertia.mjs.js"),r=require("./generators/keyframes.mjs.js"),n=require("./generators/utils/calc-duration.mjs.js"),a=require("./keyframes/get-final.mjs.js"),o=require("./utils/replace-transition-type.mjs.js"),h=require("./utils/WithPromise.mjs.js"),l=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/pipe.mjs.js"),u=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),d=require("../../../../motion-utils/dist/es/clamp.mjs.js");const p=t=>t/100;class c extends h.WithPromise{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;if(e&&e.updatedAt!==t.time.now()&&this.tick(t.time.now()),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:i}=this.options;i&&i()},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:t}=this;o.replaceTransitionType(t);const{type:i=r.keyframes,repeat:s=0,repeatDelay:a=0,repeatType:h,velocity:u=0}=t;let{keyframes:d}=t;const c=i||r.keyframes;"production"!==process.env.NODE_ENV&&c!==r.keyframes&&l.invariant(d.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${d}`),c!==r.keyframes&&"number"!=typeof d[0]&&(this.mixKeyframes=m.pipe(p,e.mix(d[0],d[1])),d=[0,100]);const T=c({...t,keyframes:d});"mirror"===h&&(this.mirroredGenerator=c({...t,keyframes:[...d].reverse(),velocity:-u})),null===T.calculatedDuration&&(T.calculatedDuration=n.calcGeneratorDuration(T));const{calculatedDuration:y}=T;this.calculatedDuration=y,this.resolvedDuration=y+a,this.totalDuration=this.resolvedDuration*(s+1)-a,this.generator=T}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:i,totalDuration:r,mixKeyframes:n,mirroredGenerator:o,resolvedDuration:h,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:m=0,keyframes:u,repeat:p,repeatType:c,repeatDelay:T,type:y,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const j=this.currentTime-m*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?j<0:j>r;this.currentTime=Math.max(j,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let D=this.currentTime,S=i;if(p){const t=Math.min(this.currentTime,r)/h;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,p+1);Boolean(e%2)&&("reverse"===c?(i=1-i,T&&(i-=T/h)):"mirror"===c&&(S=o)),D=d.clamp(0,1,i)*h}const g=k?{done:!1,value:u[0]}:S.next(D);n&&(g.value=n(g.value));let{done:b}=g;k||null===l||(b=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const q=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return q&&y!==s.inertia&&(g.value=a.getFinalKeyframe(u,this.options,v,this.speed)),f&&f(g.value),q&&this.finish(),g}then(t,e){return this.finished.then(t,e)}get duration(){return u.millisecondsToSeconds(this.calculatedDuration)}get time(){return u.millisecondsToSeconds(this.currentTime)}set time(t){t=u.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(t.time.now());const i=this.playbackSpeed!==e;this.playbackSpeed=e,i&&(this.time=u.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=i.frameloopDriver,onPlay:e,startTime:s}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(t.time.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown()}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),t.observe(this)}}exports.JSAnimation=c;
|
|
2
2
|
//# sourceMappingURL=JSAnimation.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mixKeyframes) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n this.updateTime(time.now());\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n }\n teardown() {\n this.notifyFinished();\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","arguments","undefined","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","done","value","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","newTime","secondsToMilliseconds","driver","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","start","complete","onComplete","cancel","notifyFinished","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"8sBAYA,MAAMA,EAAqBC,GAAYA,EAAU,IACjD,MAAMC,UAAoBC,EAAAA,YACtBC,WAAAA,CAAYC,GACRC,QACAC,KAAKC,MAAQ,OACbD,KAAKE,UAAY,KACjBF,KAAKG,WAAY,EAIjBH,KAAKI,YAAc,EAInBJ,KAAKK,SAAW,KAIhBL,KAAKM,cAAgB,EAKrBN,KAAKO,KAAO,KACR,MAAMC,YAAEA,GAAgBR,KAAKF,QAK7B,GAJIU,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9CX,KAAKY,KAAKF,OAAKC,OAEnBX,KAAKG,WAAY,EACE,SAAfH,KAAKC,MACL,OACJD,KAAKa,WACL,MAAMC,OAAEA,GAAWd,KAAKF,QACxBgB,GAAUA,GAAQ,EAGtBd,KAAKF,QAAUA,EACfE,KAAKe,gBACLf,KAAKgB,QACoB,IAArBlB,EAAQmB,UACRjB,KAAKkB,OACb,CACAH,aAAAA,GACI,MAAMjB,QAAEA,GAAYE,KACpBmB,EAAqBA,sBAACrB,GACtB,MAAMsB,KAAEA,EAAOC,EAASA,UAAAC,OAAEA,EAAS,EAACC,YAAEA,EAAc,EAACC,WAAEA,EAAUC,SAAEA,EAAW,GAAO3B,EACrF,IAAMuB,UAAWK,GAAgB5B,EACjC,MAAM6B,EAAmBP,GAAQC,YACJ,eAAzBO,QAAQC,IAAIC,UACZH,IAAqBN,EAAAA,WACrBU,EAASA,UAACL,EAAYM,QAAU,EAAG,gGAAgGN,KAEnIC,IAAqBN,EAAAA,WACK,iBAAnBK,EAAY,KACnB1B,KAAKiC,aAAeC,OAAKzC,EAAmB0C,EAAGA,IAACT,EAAY,GAAIA,EAAY,KAC5EA,EAAc,CAAC,EAAG,MAEtB,MAAMU,EAAYT,EAAiB,IAAK7B,EAASuB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OAAKC,OACrBX,KAAKK,SAAWL,KAAKI,WACzB,CACAqF,QAAAA,GACuB,YAAfzF,KAAKC,OACLD,KAAKgB,OAEThB,KAAKC,MAAQ,WACbD,KAAKK,SAAW,IACpB,CACAoE,MAAAA,GACIzE,KAAKa,WACLb,KAAKC,MAAQ,WACb,MAAMyF,WAAEA,GAAe1F,KAAKF,QAC5B4F,GAAcA,GAClB,CACAC,MAAAA,GACI3F,KAAKK,SAAW,KAChBL,KAAKE,UAAY,EACjBF,KAAKY,KAAK,GACVZ,KAAKa,UACT,CACAA,QAAAA,GACIb,KAAK4F,iBACL5F,KAAKC,MAAQ,OACbD,KAAK6F,aACL7F,KAAKE,UAAYF,KAAKK,SAAW,IAErC,CACAwF,UAAAA,GACS7F,KAAKkF,SAEVlF,KAAKkF,OAAO3E,OACZP,KAAKkF,YAAShC,EAClB,CACAF,MAAAA,CAAO8C,GAEH,OADA9F,KAAKE,UAAY,EACVF,KAAKY,KAAKkF,GAAY,EACjC,CACAC,cAAAA,CAAeC,GAMX,OALIhG,KAAKF,QAAQmG,eACbjG,KAAKF,QAAQsB,KAAO,YACpBpB,KAAKF,QAAQoG,KAAO,SACpBlG,KAAKe,iBAEFiF,EAASG,QAAQnG,KAC5B"}
|
|
1
|
+
{"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mixKeyframes) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n this.updateTime(time.now());\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n }\n teardown() {\n this.notifyFinished();\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","done","value","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","newTime","secondsToMilliseconds","driver","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","start","complete","onComplete","cancel","notifyFinished","stopDriver","undefined","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"8sBAYA,MAAMA,EAAqBC,GAAYA,EAAU,IACjD,MAAMC,UAAoBC,EAAAA,YACtBC,WAAAA,CAAYC,GACRC,QACAC,KAAKC,MAAQ,OACbD,KAAKE,UAAY,KACjBF,KAAKG,WAAY,EAIjBH,KAAKI,YAAc,EAInBJ,KAAKK,SAAW,KAIhBL,KAAKM,cAAgB,EAKrBN,KAAKO,KAAO,KACR,MAAMC,YAAEA,GAAgBR,KAAKF,QAK7B,GAJIU,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9CX,KAAKY,KAAKF,OA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AO6C,GAEH,OADA7F,KAAKE,UAAY,EACVF,KAAKY,KAAKiF,GAAY,EACjC,CACAC,cAAAA,CAAeC,GAMX,OALI/F,KAAKF,QAAQkG,eACbhG,KAAKF,QAAQsB,KAAO,YACpBpB,KAAKF,QAAQmG,KAAO,SACpBjG,KAAKe,iBAEFgF,EAASG,QAAQlG,KAC5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const d=a.applyGeneratorOptions(t);this.animation=n.startWaapiAnimation(s,m,r,d,l),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const t=e.getFinalKeyframe(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(t):i.setStyle(s,m,t),this.animation.cancel()}p?.(),this.notifyFinished()},this.animation.oncancel=()=>this.notifyFinished()}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(i){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;"idle"!==i&&"finished"!==i&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return m.millisecondsToSeconds(Number(i))}get time(){return m.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(i){this.finishedTime=null,this.animation.currentTime=m.secondsToMilliseconds(i)}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(i){this.animation.startTime=i}attachTimeline(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const d=a.applyGeneratorOptions(t);this.animation=n.startWaapiAnimation(s,m,r,d,l),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const t=e.getFinalKeyframe(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(t):i.setStyle(s,m,t),this.animation.cancel()}p?.(),this.notifyFinished()},this.animation.oncancel=()=>this.notifyFinished()}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(i){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;"idle"!==i&&"finished"!==i&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return m.millisecondsToSeconds(Number(i))}get time(){return m.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(i){this.finishedTime=null,this.animation.currentTime=m.secondsToMilliseconds(i)}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(i){this.animation.startTime=i}attachTimeline({timeline:i,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,i&&t.supportsScrollTimeline()?(this.animation.timeline=i,r.noop):e(this)}}exports.NativeAnimation=l;
|
|
2
2
|
//# sourceMappingURL=NativeAnimation.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n else {\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n */\n setStyle(element, name, keyframe);\n }\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n /**\n * TODO: In a breaking change, we should replace this with `.notifyCancel()`\n */\n this.animation.oncancel = () => this.notifyFinished();\n }\n play() {\n if (this.isStopped)\n return;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n if (!this.isPseudoElement) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, observe }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","oncancel","play","state","updateFinished","complete","finish","e","stop","commitStyles","duration","effect","getComputedTiming","millisecondsToSeconds","Number","currentTime","newTime","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","
|
|
1
|
+
{"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n else {\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n */\n setStyle(element, name, keyframe);\n }\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n /**\n * TODO: In a breaking change, we should replace this with `.notifyCancel()`\n */\n this.animation.oncancel = () => this.notifyFinished();\n }\n play() {\n if (this.isStopped)\n return;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n if (!this.isPseudoElement) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, observe }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","oncancel","play","state","updateFinished","complete","finish","e","stop","commitStyles","duration","effect","getComputedTiming","millisecondsToSeconds","Number","currentTime","newTime","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","timeline","observe","updateTiming","easing","supportsScrollTimeline","noop"],"mappings":"2hBAWA,MAAMA,UAAwBC,EAAAA,YAC1BC,WAAAA,CAAYC,GAIR,GAHAC,QACAC,KAAKC,aAAe,KACpBD,KAAKE,WAAY,GACZJ,EACD,OACJ,MAAMK,QAAEA,EAAOC,KAAEA,EAAIC,UAAEA,EAASC,cAAEA,EAAaC,aAAEA,GAAe,EAAKC,cAAEA,EAAaC,WAAEA,GAAgBX,EACtGE,KAAKU,gBAAkBC,QAAQL,GAC/BN,KAAKO,aAAeA,EACpBP,KAAKF,QAAUA,EACfc,EAASA,UAAyB,iBAAjBd,EAAQe,KAAmB,qGAC5C,MAAMC,EAAaC,wBAAsBjB,GACzCE,KAAKgB,UAAYC,EAAAA,oBAAoBd,EAASC,EAAMC,EAAWS,EAAYR,IAC/C,IAAxBQ,EAAWI,UACXlB,KAAKgB,UAAUG,QAEnBnB,KAAKgB,UAAUI,SAAW,KAEtB,GADApB,KAAKC,aAAeD,KAAKqB,MACpBf,EAAe,CAChB,MAAMgB,EAAWC,EAAgBA,iBAAClB,EAAWL,KAAKF,QAASU,EAAeR,KAAKwB,OAC3ExB,KAAKyB,kBACLzB,KAAKyB,kBAAkBH,GAOvBI,EAAAA,SAASvB,EAASC,EAAMkB,GAE5BtB,KAAKgB,UAAUW,QACnB,CACAlB,MACAT,KAAK4B,gBAAgB,EAKzB5B,KAAKgB,UAAUa,SAAW,IAAM7B,KAAK4B,gBACzC,CACAE,IAAAA,GACQ9B,KAAKE,YAETF,KAAKgB,UAAUc,OACI,aAAf9B,KAAK+B,OACL/B,KAAKgC,i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B,UAAUoC,SAAWA,EACnBK,QAGAJ,EAAQrD,KAEvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../frameloop/sync-time.mjs.js"),r=require("../../frameloop/frame.mjs.js");exports.frameloopDriver=t=>{const a=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../frameloop/sync-time.mjs.js"),r=require("../../frameloop/frame.mjs.js");exports.frameloopDriver=t=>{const a=({timestamp:e})=>t(e);return{start:()=>r.frame.update(a,!0),stop:()=>r.cancelFrame(a),now:()=>r.frameData.isProcessing?r.frameData.timestamp:e.time.now()}};
|
|
2
2
|
//# sourceMappingURL=driver-frameloop.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver-frameloop.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs"],"sourcesContent":["import { time } from '../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n"],"names":["update","passTimestamp","
|
|
1
|
+
{"version":3,"file":"driver-frameloop.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs"],"sourcesContent":["import { time } from '../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n"],"names":["update","passTimestamp","timestamp","start","frame","stop","cancelFrame","now","frameData","isProcessing","time"],"mappings":"wLAGyBA,IACrB,MAAMC,EAAgBA,EAAGC,eAAgBF,EAAOE,GAChD,MAAO,CACHC,MAAOA,IAAMC,EAAKA,MAACJ,OAAOC,GAAe,GACzCI,KAAMA,IAAMC,EAAWA,YAACL,GAKxBM,IAAKA,IAAOC,EAAAA,UAAUC,aAAeD,EAASA,UAACN,UAAYQ,EAAIA,KAACH,MACnE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring/index.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring/index.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function({keyframes:s,velocity:a=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:l,min:u,max:v,restDelta:c=.5,restSpeed:d}){const p=s[0],m={done:!1,value:p},f=e=>void 0===u?v:void 0===v||Math.abs(u-e)<Math.abs(v-e)?u:v;let y=n*a;const x=p+y,b=void 0===l?x:l(x);b!==x&&(y=b-p);const g=e=>-y*Math.exp(-e/o),j=e=>b+g(e),M=e=>{const t=g(e),s=j(e);m.done=Math.abs(t)<=c,m.value=m.done?b:s};let h,D;const S=s=>{var a;(a=m.value,void 0!==u&&a<u||void 0!==v&&a>v)&&(h=s,D=e.spring({keyframes:[m.value,f(m.value)],velocity:t.calcGeneratorVelocity(j,s,m.value),damping:i,stiffness:r,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return D||void 0!==h||(t=!0,M(e),S(e)),void 0!==h&&e>=h?D.next(e-h):(!t&&M(e),m)}}};
|
|
2
2
|
//# sourceMappingURL=inertia.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n"],"names":["
|
|
1
|
+
{"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n"],"names":["keyframes","velocity","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","min","max","restDelta","restSpeed","origin","state","done","value","nearestBoundary","v","undefined","Math","abs","amplitude","ideal","target","calcDelta","t","exp","calcLatest","applyFriction","delta","latest","timeReachedBoundary","spring$1","checkCatchBoundary","spring","calcGeneratorVelocity","damping","stiffness","calculatedDuration","next","hasUpdatedFrame"],"mappings":"gKAGA,UAAiBA,UAAEA,EAAWC,SAAAA,EAAW,EAAGC,MAAEA,EAAQ,GAAGC,aAAEA,EAAe,IAAGC,cAAEA,EAAgB,GAAEC,gBAAEA,EAAkB,IAAGC,aAAEA,EAAYC,IAAEA,EAAGC,IAAEA,EAAGC,UAAEA,EAAY,GAAGC,UAAEA,IAC/J,MAAMC,EAASX,EAAU,GACnBY,EAAQ,CACVC,MAAM,EACNC,MAAOH,GAGLI,EAAmBC,QACTC,IAARV,EACOC,OACCS,IAART,GAEGU,KAAKC,IAAIZ,EAAMS,GAAKE,KAAKC,IAAIX,EAAMQ,GAD/BT,EAC0CC,EAEzD,IAAIY,EAAYlB,EAAQD,EACxB,MAAMoB,EAAQV,EAASS,EACjBE,OAA0BL,IAAjBX,EAA6Be,EAAQf,EAAae,GAK7DC,IAAWD,IACXD,EAAYE,EAASX,GACzB,MAAMY,EAAaC,IAAOJ,EAAYF,KAAKO,KAAKD,EAAIrB,GAC9CuB,EAAcF,GAAMF,EAASC,EAAUC,GACvCG,EAAiBH,IACnB,MAAMI,EAAQL,EAAUC,GAClBK,EAASH,EAAWF,GAC1BZ,EAAMC,KAAOK,KAAKC,IAAIS,IAAUnB,EAChCG,EAAME,MAAQF,EAAMC,KAAOS,EAASO,CAAM,EAQ9C,IAAIC,EACAC,EACJ,MAAMC,EAAsBR,IAjCLR,SAkCAJ,EAAME,WAlCSG,IAARV,GAAqBS,EAAIT,QAAiBU,IAART,GAAqBQ,EAAIR,KAoCrFsB,EAAsBN,EACtBO,EAAWE,EAAAA,OAAO,CACdjC,UAAW,CAACY,EAAME,MAAOC,EAAgBH,EAAME,QAC/Cb,SAAUiC,EAAAA,sBAAsBR,EAAYF,EAAGZ,EAAME,OACrDqB,QAAS/B,EACTgC,UAAW/B,EACXI,YACAC,cACF,EAGN,OADAsB,EAAmB,GACZ,CACHK,mBAAoB,KACpBC,KAAOd,IAOH,IAAIe,GAAkB,EAUtB,OATKR,QAAoCd,IAAxBa,IACbS,GAAkB,EAClBZ,EAAcH,GACdQ,EAAmBR,SAMKP,IAAxBa,GAAqCN,GAAKM,EACnCC,EAASO,KAAKd,EAAIM,KAGxBS,GAAmBZ,EAAcH,GAC3BZ,EACX,EAGZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/interpolate.mjs.js"),s=require("../keyframes/offsets/default.mjs.js"),t=require("../keyframes/offsets/time.mjs.js"),i=require("../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs.js"),n=require("../../../../../motion-utils/dist/es/easing/utils/map.mjs.js"),r=require("../../../../../motion-utils/dist/es/easing/ease.mjs.js");function a(e,s){return e.map((()=>s||r.easeInOut)).splice(0,e.length-1)}exports.defaultEasing=a,exports.keyframes=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../utils/interpolate.mjs.js"),s=require("../keyframes/offsets/default.mjs.js"),t=require("../keyframes/offsets/time.mjs.js"),i=require("../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs.js"),n=require("../../../../../motion-utils/dist/es/easing/utils/map.mjs.js"),r=require("../../../../../motion-utils/dist/es/easing/ease.mjs.js");function a(e,s){return e.map((()=>s||r.easeInOut)).splice(0,e.length-1)}exports.defaultEasing=a,exports.keyframes=function({duration:r=300,keyframes:u,times:o,ease:l="easeInOut"}){const f=i.isEasingArray(l)?l.map(n.easingDefinitionToFunction):n.easingDefinitionToFunction(l),m={done:!1,value:u[0]},j=t.convertOffsetToTimes(o&&o.length===u.length?o:s.defaultOffset(u),r),d=e.interpolate(j,u,{ease:Array.isArray(f)?f:a(u,f)});return{calculatedDuration:r,next:e=>(m.value=d(e),m.done=e>=r,m)}};
|
|
2
2
|
//# sourceMappingURL=keyframes.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","
|
|
1
|
+
{"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","duration","keyframes","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate","Array","isArray","calculatedDuration","next","t"],"mappings":"qbAKA,SAASA,EAAcC,EAAQC,GAC3B,OAAOD,EAAOE,KAAI,IAAMD,GAAUE,EAASA,YAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,2CACA,UAAmBC,SAAEA,EAAW,IAAKC,UAAWC,EAAcC,MAAEA,EAAKC,KAAEA,EAAO,cAK1E,MAAMC,EAAkBC,gBAAcF,GAChCA,EAAKR,IAAIW,8BACTA,6BAA2BH,GAK3BI,EAAQ,CACVC,MAAM,EACNC,MAAOR,EAAe,IAKpBS,EAAgBC,EAAoBA,qBAG1CT,GAASA,EAAMJ,SAAWG,EAAeH,OACnCI,EACAU,gBAAcX,GAAiBF,GAC/Bc,EAAoBC,EAAAA,YAAYJ,EAAeT,EAAgB,CACjEE,KAAMY,MAAMC,QAAQZ,GACdA,EACAZ,EAAcS,EAAgBG,KAExC,MAAO,CACHa,mBAAoBlB,EACpBmB,KAAOC,IACHZ,EAAME,MAAQI,EAAkBM,GAChCZ,EAAMC,KAAOW,GAAKpB,EACXQ,GAGnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./defaults.mjs.js"),t=require("../../../../../../motion-utils/dist/es/errors.mjs.js"),e=require("../../../../../../motion-utils/dist/es/time-conversion.mjs.js"),n=require("../../../../../../motion-utils/dist/es/clamp.mjs.js");const i=.001;const r=12;function o(s,t){return s*Math.sqrt(1-t*t)}exports.calcAngularFreq=o,exports.findSpring=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./defaults.mjs.js"),t=require("../../../../../../motion-utils/dist/es/errors.mjs.js"),e=require("../../../../../../motion-utils/dist/es/time-conversion.mjs.js"),n=require("../../../../../../motion-utils/dist/es/clamp.mjs.js");const i=.001;const r=12;function o(s,t){return s*Math.sqrt(1-t*t)}exports.calcAngularFreq=o,exports.findSpring=function({duration:a=s.springDefaults.duration,bounce:u=s.springDefaults.bounce,velocity:l=s.springDefaults.velocity,mass:p=s.springDefaults.mass}){let c,f;t.warning(a<=e.secondsToMilliseconds(s.springDefaults.maxDuration),"Spring duration must be 10 seconds or less");let m=1-u;m=n.clamp(s.springDefaults.minDamping,s.springDefaults.maxDamping,m),a=n.clamp(s.springDefaults.minDuration,s.springDefaults.maxDuration,e.millisecondsToSeconds(a)),m<1?(c=s=>{const t=s*m,e=t*a,n=t-l,r=o(s,m),u=Math.exp(-e);return i-n/r*u},f=s=>{const t=s*m*a,e=t*l+l,n=Math.pow(m,2)*Math.pow(s,2)*a,r=Math.exp(-t),u=o(Math.pow(s,2),m);return(-c(s)+i>0?-1:1)*((e-n)*r)/u}):(c=s=>Math.exp(-s*a)*((s-l)*a+1)-.001,f=s=>Math.exp(-s*a)*(a*a*(l-s)));const d=function(s,t,e){let n=e;for(let e=1;e<r;e++)n-=s(n)/t(n);return n}(c,f,5/a);if(a=e.secondsToMilliseconds(a),isNaN(d))return{stiffness:s.springDefaults.stiffness,damping:s.springDefaults.damping,duration:a};{const s=Math.pow(d,2)*p;return{stiffness:s,damping:2*m*Math.sqrt(p*s),duration:a}}};
|
|
2
2
|
//# sourceMappingURL=find.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs"],"sourcesContent":["import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\n\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring };\n"],"names":["safeMin","rootIterations","calcAngularFreq","undampedFreq","dampingRatio","Math","sqrt","
|
|
1
|
+
{"version":3,"file":"find.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs"],"sourcesContent":["import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\n\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring };\n"],"names":["safeMin","rootIterations","calcAngularFreq","undampedFreq","dampingRatio","Math","sqrt","duration","springDefaults","bounce","velocity","mass","envelope","derivative","warning","secondsToMilliseconds","maxDuration","clamp","minDamping","maxDamping","minDuration","millisecondsToSeconds","exponentialDec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