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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/dist/components/AudioPlayerView/index.js +1 -1
  2. package/dist/components/AudioPlayerView/index.js.map +1 -1
  3. package/dist/components/CallView/Actions.js.map +1 -1
  4. package/dist/components/CallView/index.js +1 -1
  5. package/dist/components/CallView/index.js.map +1 -1
  6. package/dist/components/RecorderView/index.js +1 -1
  7. package/dist/components/RecorderView/index.js.map +1 -1
  8. package/dist/components/SideView/SideView.js.map +1 -1
  9. package/dist/components/Socket.js +1 -1
  10. package/dist/components/Socket.js.map +1 -1
  11. package/dist/components/StreamingAnswerView/index.js.map +1 -1
  12. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  13. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  14. package/dist/components/VideoView/index.js.map +1 -1
  15. package/dist/components/WebRTC.js +1 -1
  16. package/dist/components/WebRTC.js.map +1 -1
  17. package/dist/events/RecorderEvents.js +1 -1
  18. package/dist/events/RecorderEvents.js.map +1 -1
  19. package/dist/index.css +1 -1
  20. package/dist/lib/devices/devices.js +1 -1
  21. package/dist/lib/devices/devices.js.map +1 -1
  22. package/dist/models/motions.js.map +1 -1
  23. package/dist/models/webrtc.js.map +1 -1
  24. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js +1 -1
  25. package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js.map +1 -1
  26. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
  27. package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
  28. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
  29. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
  30. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
  31. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
  32. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
  33. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
  34. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +1 -1
  35. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js.map +1 -1
  36. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
  37. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
  38. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
  39. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
  40. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +1 -1
  41. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js.map +1 -1
  42. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
  43. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
  44. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
  45. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
  46. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
  47. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
  48. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
  49. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
  50. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
  51. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
  52. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
  53. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
  54. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
  55. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
  56. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
  57. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
  58. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
  59. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
  60. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
  61. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
  62. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
  63. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
  64. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
  65. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
  66. package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
  67. package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
  68. package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js +1 -1
  69. package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js.map +1 -1
  70. package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
  71. package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
  72. package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
  73. package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
  74. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
  75. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
  76. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
  77. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
  78. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
  79. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
  80. package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
  81. package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
  82. package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
  83. package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
  84. package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
  85. package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
  86. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
  87. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
  88. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
  89. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
  90. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js +1 -1
  91. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js.map +1 -1
  92. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
  93. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
  94. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
  95. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
  96. package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
  97. package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
  98. package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
  99. package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
  100. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +1 -1
  101. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js.map +1 -1
  102. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
  103. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
  104. package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
  105. package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
  106. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
  107. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  114. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
  116. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  117. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  118. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
  119. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
  120. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  121. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  122. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  123. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  124. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
  125. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
  126. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js +1 -1
  127. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
  128. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  129. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  130. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
  131. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
  132. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  133. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  134. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
  135. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
  136. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +1 -1
  137. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
  138. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +1 -1
  139. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -1
  140. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  141. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  142. package/dist/node_modules/moment/moment.js +2 -2
  143. package/dist/node_modules/moment/moment.js.map +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  195. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  196. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js +1 -1
  201. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -1
  212. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  213. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  214. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  215. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  216. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +1 -1
  217. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  220. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +1 -1
  221. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
  223. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
  224. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +1 -1
  225. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -1
  226. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  227. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  228. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +1 -1
  229. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -1
  230. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +1 -1
  231. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -1
  232. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
  233. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  234. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  235. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  236. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  237. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  238. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js +1 -1
  239. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
  240. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js +1 -1
  241. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
  242. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js +1 -1
  243. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
  244. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  245. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  246. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
  247. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
  248. package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
  249. package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
  250. package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
  251. package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
  252. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
  253. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
  254. package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
  255. package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
  256. package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
  257. package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
  258. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
  259. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
  260. package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
  261. package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
  262. package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
  263. package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
  264. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
  265. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
  266. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
  267. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
  268. package/dist/package.json.js +1 -1
  269. package/dist/services/astproxy.js.map +1 -1
  270. package/package.json +7 -22
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../engine.io-parser/build/esm/encodePacket.browser.js");var e=require("../../../engine.io-parser/build/esm/decodePacket.browser.js");require("../../../engine.io-parser/build/esm/commons.js");var t=require("../../../@socket.io/component-emitter/lib/esm/index.js"),s=require("./util.js"),r=require("./contrib/parseqs.js");class o extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class i extends t.Emitter{constructor(e){super(),this.writable=!1,s.installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new o(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=e.decodePacket(t,this.socket.binaryType);this.onPacket(s)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=r.encode(e);return t.length?"?"+t:""}}exports.Transport=i,exports.TransportError=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../engine.io-parser/build/esm/encodePacket.browser.js");var e=require("../../../engine.io-parser/build/esm/decodePacket.browser.js");require("../../../engine.io-parser/build/esm/commons.js");var t=require("../../../@socket.io/component-emitter/lib/esm/index.js"),s=require("./util.js"),r=require("./contrib/parseqs.js");class o extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class i extends t.Emitter{constructor(e){super(),this.writable=!1,s.installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new o(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=e.decodePacket(t,this.socket.binaryType);this.onPacket(s)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=r.encode(e);return t.length?"?"+t:""}}exports.Transport=i,exports.TransportError=o;
2
2
  //# sourceMappingURL=transport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transport.js","sources":["../../../../../node_modules/engine.io-client/build/esm/transport.js"],"sourcesContent":["import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nimport { encode } from \"./contrib/parseqs.js\";\nexport class TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} opts - options\n * @protected\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.socket = opts.socket;\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n */\n open() {\n this.readyState = \"opening\";\n this.doOpen();\n return this;\n }\n /**\n * Closes the transport.\n */\n close() {\n if (this.readyState === \"opening\" || this.readyState === \"open\") {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n */\n send(packets) {\n if (this.readyState === \"open\") {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n /**\n * Pauses the transport, in order not to lose packets during an upgrade.\n *\n * @param onPause\n */\n pause(onPause) { }\n createUri(schema, query = {}) {\n return (schema +\n \"://\" +\n this._hostname() +\n this._port() +\n this.opts.path +\n this._query(query));\n }\n _hostname() {\n const hostname = this.opts.hostname;\n return hostname.indexOf(\":\") === -1 ? hostname : \"[\" + hostname + \"]\";\n }\n _port() {\n if (this.opts.port &&\n ((this.opts.secure && Number(this.opts.port) !== 443) ||\n (!this.opts.secure && Number(this.opts.port) !== 80))) {\n return \":\" + this.opts.port;\n }\n else {\n return \"\";\n }\n }\n _query(query) {\n const encodedQuery = encode(query);\n return encodedQuery.length ? \"?\" + encodedQuery : \"\";\n }\n}\n"],"names":["TransportError","Error","constructor","reason","description","context","super","this","type","Transport","Emitter","opts","writable","installTimerFunctions","query","socket","supportsBinary","forceBase64","onError","emitReserved","open","readyState","doOpen","close","doClose","onClose","send","packets","write","onOpen","onData","data","packet","decodePacket","binaryType","onPacket","details","pause","onPause","createUri","schema","arguments","length","undefined","_hostname","_port","path","_query","hostname","indexOf","port","secure","Number","encodedQuery","encode"],"mappings":"mZAIO,MAAMA,UAAuBC,MAChCC,WAAAA,CAAYC,EAAQC,EAAaC,GAC7BC,MAAMH,GACNI,KAAKH,YAAcA,EACnBG,KAAKF,QAAUA,EACfE,KAAKC,KAAO,gBAChB,EAEG,MAAMC,UAAkBC,EAAAA,QAO3BR,WAAAA,CAAYS,GACRL,QACAC,KAAKK,UAAW,EAChBC,wBAAsBN,KAAMI,GAC5BJ,KAAKI,KAAOA,EACZJ,KAAKO,MAAQH,EAAKG,MAClBP,KAAKQ,OAASJ,EAAKI,OACnBR,KAAKS,gBAAkBL,EAAKM,WAChC,CAUAC,OAAAA,CAAQf,EAAQC,EAAaC,GAEzB,OADAC,MAAMa,aAAa,QAAS,IAAInB,EAAeG,EAAQC,EAAaC,IAC7DE,IACX,CAIAa,IAAAA,GAGI,OAFAb,KAAKc,WAAa,UAClBd,KAAKe,SACEf,IACX,CAIAgB,KAAAA,GAKI,MAJwB,YAApBhB,KAAKc,YAAgD,SAApBd,KAAKc,aACtCd,KAAKiB,UACLjB,KAAKkB,WAEFlB,IACX,CAMAmB,IAAAA,CAAKC,GACuB,SAApBpB,KAAKc,YACLd,KAAKqB,MAAMD,EAKnB,CAMAE,MAAAA,GACItB,KAAKc,WAAa,OAClBd,KAAKK,UAAW,EAChBN,MAAMa,aAAa,OACvB,CAOAW,MAAAA,CAAOC,GACH,MAAMC,EAASC,EAAAA,aAAaF,EAAMxB,KAAKQ,OAAOmB,YAC9C3B,KAAK4B,SAASH,EAClB,CAMAG,QAAAA,CAASH,GACL1B,MAAMa,aAAa,SAAUa,EACjC,CAMAP,OAAAA,CAAQW,GACJ7B,KAAKc,WAAa,SAClBf,MAAMa,aAAa,QAASiB,EAChC,CAMAC,KAAAA,CAAMC,GAAW,CACjBC,SAAAA,CAAUC,GAAoB,IAAZ1B,EAAK2B,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAA,EACtB,OAAQD,EACJ,MACAjC,KAAKqC,YACLrC,KAAKsC,QACLtC,KAAKI,KAAKmC,KACVvC,KAAKwC,OAAOjC,EACpB,CACA8B,SAAAA,GACI,MAAMI,EAAWzC,KAAKI,KAAKqC,SAC3B,OAAkC,IAA3BA,EAASC,QAAQ,KAAcD,EAAW,IAAMA,EAAW,GACtE,CACAH,KAAAA,GACI,OAAItC,KAAKI,KAAKuC,OACR3C,KAAKI,KAAKwC,QAAqC,MAA3BC,OAAO7C,KAAKI,KAAKuC,QACjC3C,KAAKI,KAAKwC,QAAqC,KAA3BC,OAAO7C,KAAKI,KAAKuC,OACpC,IAAM3C,KAAKI,KAAKuC,KAGhB,EAEf,CACAH,MAAAA,CAAOjC,GACH,MAAMuC,EAAeC,SAAOxC,GAC5B,OAAOuC,EAAaX,OAAS,IAAMW,EAAe,EACtD"}
1
+ {"version":3,"file":"transport.js","sources":["../../../../../node_modules/engine.io-client/build/esm/transport.js"],"sourcesContent":["import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nimport { encode } from \"./contrib/parseqs.js\";\nexport class TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} opts - options\n * @protected\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.socket = opts.socket;\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n */\n open() {\n this.readyState = \"opening\";\n this.doOpen();\n return this;\n }\n /**\n * Closes the transport.\n */\n close() {\n if (this.readyState === \"opening\" || this.readyState === \"open\") {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n */\n send(packets) {\n if (this.readyState === \"open\") {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n /**\n * Pauses the transport, in order not to lose packets during an upgrade.\n *\n * @param onPause\n */\n pause(onPause) { }\n createUri(schema, query = {}) {\n return (schema +\n \"://\" +\n this._hostname() +\n this._port() +\n this.opts.path +\n this._query(query));\n }\n _hostname() {\n const hostname = this.opts.hostname;\n return hostname.indexOf(\":\") === -1 ? hostname : \"[\" + hostname + \"]\";\n }\n _port() {\n if (this.opts.port &&\n ((this.opts.secure && Number(this.opts.port) !== 443) ||\n (!this.opts.secure && Number(this.opts.port) !== 80))) {\n return \":\" + this.opts.port;\n }\n else {\n return \"\";\n }\n }\n _query(query) {\n const encodedQuery = encode(query);\n return encodedQuery.length ? \"?\" + encodedQuery : \"\";\n }\n}\n"],"names":["TransportError","Error","constructor","reason","description","context","super","this","type","Transport","Emitter","opts","writable","installTimerFunctions","query","socket","supportsBinary","forceBase64","onError","emitReserved","open","readyState","doOpen","close","doClose","onClose","send","packets","write","onOpen","onData","data","packet","decodePacket","binaryType","onPacket","details","pause","onPause","createUri","schema","_hostname","_port","path","_query","hostname","indexOf","port","secure","Number","encodedQuery","encode","length"],"mappings":"mZAIO,MAAMA,UAAuBC,MAChCC,WAAAA,CAAYC,EAAQC,EAAaC,GAC7BC,MAAMH,GACNI,KAAKH,YAAcA,EACnBG,KAAKF,QAAUA,EACfE,KAAKC,KAAO,gBAChB,EAEG,MAAMC,UAAkBC,EAAAA,QAO3BR,WAAAA,CAAYS,GACRL,QACAC,KAAKK,UAAW,EAChBC,wBAAsBN,KAAMI,GAC5BJ,KAAKI,KAAOA,EACZJ,KAAKO,MAAQH,EAAKG,MAClBP,KAAKQ,OAASJ,EAAKI,OACnBR,KAAKS,gBAAkBL,EAAKM,WAChC,CAUAC,OAAAA,CAAQf,EAAQC,EAAaC,GAEzB,OADAC,MAAMa,aAAa,QAAS,IAAInB,EAAeG,EAAQC,EAAaC,IAC7DE,IACX,CAIAa,IAAAA,GAGI,OAFAb,KAAKc,WAAa,UAClBd,KAAKe,SACEf,IACX,CAIAgB,KAAAA,GAKI,MAJwB,YAApBhB,KAAKc,YAAgD,SAApBd,KAAKc,aACtCd,KAAKiB,UACLjB,KAAKkB,WAEFlB,IACX,CAMAmB,IAAAA,CAAKC,GACuB,SAApBpB,KAAKc,YACLd,KAAKqB,MAAMD,EAKnB,CAMAE,MAAAA,GACItB,KAAKc,WAAa,OAClBd,KAAKK,UAAW,EAChBN,MAAMa,aAAa,OACvB,CAOAW,MAAAA,CAAOC,GACH,MAAMC,EAASC,EAAAA,aAAaF,EAAMxB,KAAKQ,OAAOmB,YAC9C3B,KAAK4B,SAASH,EAClB,CAMAG,QAAAA,CAASH,GACL1B,MAAMa,aAAa,SAAUa,EACjC,CAMAP,OAAAA,CAAQW,GACJ7B,KAAKc,WAAa,SAClBf,MAAMa,aAAa,QAASiB,EAChC,CAMAC,KAAAA,CAAMC,GAAW,CACjBC,SAAAA,CAAUC,EAAQ1B,EAAQ,IACtB,OAAQ0B,EACJ,MACAjC,KAAKkC,YACLlC,KAAKmC,QACLnC,KAAKI,KAAKgC,KACVpC,KAAKqC,OAAO9B,EACpB,CACA2B,SAAAA,GACI,MAAMI,EAAWtC,KAAKI,KAAKkC,SAC3B,OAAkC,IAA3BA,EAASC,QAAQ,KAAcD,EAAW,IAAMA,EAAW,GACtE,CACAH,KAAAA,GACI,OAAInC,KAAKI,KAAKoC,OACRxC,KAAKI,KAAKqC,QAAqC,MAA3BC,OAAO1C,KAAKI,KAAKoC,QACjCxC,KAAKI,KAAKqC,QAAqC,KAA3BC,OAAO1C,KAAKI,KAAKoC,OACpC,IAAMxC,KAAKI,KAAKoC,KAGhB,EAEf,CACAH,MAAAA,CAAO9B,GACH,MAAMoC,EAAeC,SAAOrC,GAC5B,OAAOoC,EAAaE,OAAS,IAAMF,EAAe,EACtD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./polling.js"),e=require("../../../../@socket.io/component-emitter/lib/esm/index.js"),s=require("../util.js"),o=require("../globals.js"),r=require("../contrib/has-cors.js");function i(){}class n extends t.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class a extends e.Emitter{constructor(t,e,o){super(),this.createRequest=t,s.installTimerFunctions(this,o),this._opts=o,this._method=o.method||"GET",this._uri=e,this._data=void 0!==o.data?o.data:null,this._create()}_create(){var t;const e=s.pick(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(e);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&o.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{o.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var t;3===o.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(o.getResponseHeader("set-cookie"))),4===o.readyState&&(200===o.status||1223===o.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof o.status?o.status:0)},0))},o.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=a.requestsCount++,a.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=i,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete a.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(a.requestsCount=0,a.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",h);else if("function"==typeof addEventListener){const t="onpagehide"in o.globalThisShim?"pagehide":"unload";addEventListener(t,h,!1)}function h(){for(let t in a.requests)a.requests.hasOwnProperty(t)&&a.requests[t].abort()}const c=function(){const t=u({xdomain:!1});return t&&null!==t.responseType}();function u(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(o.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}exports.BaseXHR=n,exports.Request=a,exports.XHR=class extends n{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=c&&!e}request(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(t,{xd:this.xd},this.opts),new a(u,this.uri(),t)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./polling.js"),e=require("../../../../@socket.io/component-emitter/lib/esm/index.js"),s=require("../util.js"),o=require("../globals.js"),r=require("../contrib/has-cors.js");function i(){}class n extends t.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class a extends e.Emitter{constructor(t,e,o){super(),this.createRequest=t,s.installTimerFunctions(this,o),this._opts=o,this._method=o.method||"GET",this._uri=e,this._data=void 0!==o.data?o.data:null,this._create()}_create(){var t;const e=s.pick(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(e);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&o.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{o.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var t;3===o.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(o.getResponseHeader("set-cookie"))),4===o.readyState&&(200===o.status||1223===o.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof o.status?o.status:0)},0))},o.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=a.requestsCount++,a.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=i,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete a.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(a.requestsCount=0,a.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",h);else if("function"==typeof addEventListener){const t="onpagehide"in o.globalThisShim?"pagehide":"unload";addEventListener(t,h,!1)}function h(){for(let t in a.requests)a.requests.hasOwnProperty(t)&&a.requests[t].abort()}const c=function(){const t=u({xdomain:!1});return t&&null!==t.responseType}();function u(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(o.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}exports.BaseXHR=n,exports.Request=a,exports.XHR=class extends n{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=c&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new a(u,this.uri(),t)}};
2
2
  //# sourceMappingURL=polling-xhr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polling-xhr.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/polling-xhr.js"],"sourcesContent":["import { Polling } from \"./polling.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globals.node.js\";\nimport { hasCORS } from \"../contrib/has-cors.js\";\nfunction empty() { }\nexport class BaseXHR extends Polling {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @package\n */\n constructor(opts) {\n super(opts);\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n }\n }\n /**\n * Sends data.\n *\n * @param {String} data - data to send.\n * @param {Function} fn - called upon flush.\n * @private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data,\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @package\n */\n constructor(createRequest, uri, opts) {\n super();\n this.createRequest = createRequest;\n installTimerFunctions(this, opts);\n this._opts = opts;\n this._method = opts.method || \"GET\";\n this._uri = uri;\n this._data = undefined !== opts.data ? opts.data : null;\n this._create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @private\n */\n _create() {\n var _a;\n const opts = pick(this._opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this._opts.xd;\n const xhr = (this._xhr = this.createRequest(opts));\n try {\n xhr.open(this._method, this._uri, true);\n try {\n if (this._opts.extraHeaders) {\n // @ts-ignore\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this._opts.extraHeaders) {\n if (this._opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this._opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this._method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this._opts.withCredentials;\n }\n if (this._opts.requestTimeout) {\n xhr.timeout = this._opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n var _a;\n if (xhr.readyState === 3) {\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(\n // @ts-ignore\n xhr.getResponseHeader(\"set-cookie\"));\n }\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this._onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this._onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this._data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this._onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this._index = Request.requestsCount++;\n Request.requests[this._index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @private\n */\n _onError(err) {\n this.emitReserved(\"error\", err, this._xhr);\n this._cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @private\n */\n _cleanup(fromError) {\n if (\"undefined\" === typeof this._xhr || null === this._xhr) {\n return;\n }\n this._xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this._xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this._index];\n }\n this._xhr = null;\n }\n /**\n * Called upon load.\n *\n * @private\n */\n _onLoad() {\n const data = this._xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this._cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @package\n */\n abort() {\n this._cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\nconst hasXHR2 = (function () {\n const xhr = newRequest({\n xdomain: false,\n });\n return xhr && xhr.responseType !== null;\n})();\n/**\n * HTTP long-polling based on the built-in `XMLHttpRequest` object.\n *\n * Usage: browser\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n */\nexport class XHR extends BaseXHR {\n constructor(opts) {\n super(opts);\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd }, this.opts);\n return new Request(newRequest, this.uri(), opts);\n }\n}\nfunction newRequest(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n"],"names":["empty","BaseXHR","Polling","constructor","opts","super","location","isSSL","protocol","port","this","xd","hostname","doWrite","data","fn","req","request","method","on","xhrStatus","context","onError","doPoll","onData","bind","pollXhr","Request","Emitter","createRequest","uri","installTimerFunctions","_opts","_method","_uri","_data","undefined","_create","_a","pick","xdomain","xhr","_xhr","open","extraHeaders","setDisableHeaderCheck","i","hasOwnProperty","setRequestHeader","e","cookieJar","addCookies","withCredentials","requestTimeout","timeout","onreadystatechange","readyState","parseCookies","getResponseHeader","status","_onLoad","setTimeoutFn","_onError","send","document","_index","requestsCount","requests","err","emitReserved","_cleanup","fromError","abort","responseText","attachEvent","unloadHandler","addEventListener","terminationEvent","globalThis","hasXHR2","newRequest","responseType","XMLHttpRequest","hasCORS","globalThisShim","concat","join","forceBase64","supportsBinary","arguments","length","Object","assign"],"mappings":"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"}
1
+ {"version":3,"file":"polling-xhr.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/polling-xhr.js"],"sourcesContent":["import { Polling } from \"./polling.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globals.node.js\";\nimport { hasCORS } from \"../contrib/has-cors.js\";\nfunction empty() { }\nexport class BaseXHR extends Polling {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @package\n */\n constructor(opts) {\n super(opts);\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n }\n }\n /**\n * Sends data.\n *\n * @param {String} data - data to send.\n * @param {Function} fn - called upon flush.\n * @private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data,\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @package\n */\n constructor(createRequest, uri, opts) {\n super();\n this.createRequest = createRequest;\n installTimerFunctions(this, opts);\n this._opts = opts;\n this._method = opts.method || \"GET\";\n this._uri = uri;\n this._data = undefined !== opts.data ? opts.data : null;\n this._create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @private\n */\n _create() {\n var _a;\n const opts = pick(this._opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this._opts.xd;\n const xhr = (this._xhr = this.createRequest(opts));\n try {\n xhr.open(this._method, this._uri, true);\n try {\n if (this._opts.extraHeaders) {\n // @ts-ignore\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this._opts.extraHeaders) {\n if (this._opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this._opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this._method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this._opts.withCredentials;\n }\n if (this._opts.requestTimeout) {\n xhr.timeout = this._opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n var _a;\n if (xhr.readyState === 3) {\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(\n // @ts-ignore\n xhr.getResponseHeader(\"set-cookie\"));\n }\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this._onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this._onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this._data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this._onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this._index = Request.requestsCount++;\n Request.requests[this._index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @private\n */\n _onError(err) {\n this.emitReserved(\"error\", err, this._xhr);\n this._cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @private\n */\n _cleanup(fromError) {\n if (\"undefined\" === typeof this._xhr || null === this._xhr) {\n return;\n }\n this._xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this._xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this._index];\n }\n this._xhr = null;\n }\n /**\n * Called upon load.\n *\n * @private\n */\n _onLoad() {\n const data = this._xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this._cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @package\n */\n abort() {\n this._cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\nconst hasXHR2 = (function () {\n const xhr = newRequest({\n xdomain: false,\n });\n return xhr && xhr.responseType !== null;\n})();\n/**\n * HTTP long-polling based on the built-in `XMLHttpRequest` object.\n *\n * Usage: browser\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n */\nexport class XHR extends BaseXHR {\n constructor(opts) {\n super(opts);\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd }, this.opts);\n return new Request(newRequest, this.uri(), opts);\n }\n}\nfunction newRequest(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n"],"names":["empty","BaseXHR","Polling","constructor","opts","super","location","isSSL","protocol","port","this","xd","hostname","doWrite","data","fn","req","request","method","on","xhrStatus","context","onError","doPoll","onData","bind","pollXhr","Request","Emitter","createRequest","uri","installTimerFunctions","_opts","_method","_uri","_data","undefined","_create","_a","pick","xdomain","xhr","_xhr","open","extraHeaders","setDisableHeaderCheck","i","hasOwnProperty","setRequestHeader","e","cookieJar","addCookies","withCredentials","requestTimeout","timeout","onreadystatechange","readyState","parseCookies","getResponseHeader","status","_onLoad","setTimeoutFn","_onError","send","document","_index","requestsCount","requests","err","emitReserved","_cleanup","fromError","abort","responseText","attachEvent","unloadHandler","addEventListener","terminationEvent","globalThis","hasXHR2","newRequest","responseType","XMLHttpRequest","hasCORS","globalThisShim","concat","join","forceBase64","supportsBinary","Object","assign"],"mappings":"gQAKA,SAASA,IAAU,CACZ,MAAMC,UAAgBC,EAAAA,QAOzBC,WAAAA,CAAYC,GAER,GADAC,MAAMD,GACkB,oBAAbE,SAA0B,CACjC,MAAMC,EAAQ,WAAaD,SAASE,SACpC,IAAIC,EAAOH,SAASG,KAEfA,IACDA,EAAOF,EAAQ,MAAQ,MAE3BG,KAAKC,GACoB,oBAAbL,UACJF,EAAKQ,WAAaN,SAASM,UAC3BH,IAASL,EAAKK,IAC1B,CACJ,CAQAI,OAAAA,CAAQC,EAAMC,GACV,MAAMC,EAAMN,KAAKO,QAAQ,CACrBC,OAAQ,OACRJ,KAAMA,IAEVE,EAAIG,GAAG,UAAWJ,GAClBC,EAAIG,GAAG,QAAS,CAACC,EAAWC,KACxBX,KAAKY,QAAQ,iBAAkBF,EAAWC,IAElD,CAMAE,MAAAA,GACI,MAAMP,EAAMN,KAAKO,UACjBD,EAAIG,GAAG,OAAQT,KAAKc,OAAOC,KAAKf,OAChCM,EAAIG,GAAG,QAAS,CAACC,EAAWC,KACxBX,KAAKY,QAAQ,iBAAkBF,EAAWC,KAE9CX,KAAKgB,QAAUV,CACnB,EAEG,MAAMW,UAAgBC,EAAAA,QAOzBzB,WAAAA,CAAY0B,EAAeC,EAAK1B,GAC5BC,QACAK,KAAKmB,cAAgBA,EACrBE,wBAAsBrB,KAAMN,GAC5BM,KAAKsB,MAAQ5B,EACbM,KAAKuB,QAAU7B,EAAKc,QAAU,MAC9BR,KAAKwB,KAAOJ,EACZpB,KAAKyB,WAAQC,IAAchC,EAAKU,KAAOV,EAAKU,KAAO,KACnDJ,KAAK2B,SACT,CAMAA,OAAAA,GACI,IAAIC,EACJ,MAAMlC,EAAOmC,EAAIA,KAAC7B,KAAKsB,MAAO,QAAS,MAAO,MAAO,aAAc,OAAQ,KAAM,UAAW,qBAAsB,aAClH5B,EAAKoC,UAAY9B,KAAKsB,MAAMrB,GAC5B,MAAM8B,EAAO/B,KAAKgC,KAAOhC,KAAKmB,cAAczB,GAC5C,IACIqC,EAAIE,KAAKjC,KAAKuB,QAASvB,KAAKwB,MAAM,GAClC,IACI,GAAIxB,KAAKsB,MAAMY,aAAc,CAEzBH,EAAII,uBAAyBJ,EAAII,uBAAsB,GACvD,IAAK,IAAIC,KAAKpC,KAAKsB,MAAMY,aACjBlC,KAAKsB,MAAMY,aAAaG,eAAeD,IACvCL,EAAIO,iBAAiBF,EAAGpC,KAAKsB,MAAMY,aAAaE,GAG5D,CACJ,CACA,MAAOG,GAAK,CACZ,GAAI,SAAWvC,KAAKuB,QAChB,IACIQ,EAAIO,iBAAiB,eAAgB,2BACzC,CACA,MAAOC,GAAK,CAEhB,IACIR,EAAIO,iBAAiB,SAAU,MACnC,CACA,MAAOC,GAAK,CACoB,QAA/BX,EAAK5B,KAAKsB,MAAMkB,iBAAmC,IAAZZ,GAAyBA,EAAGa,WAAWV,GAE3E,oBAAqBA,IACrBA,EAAIW,gBAAkB1C,KAAKsB,MAAMoB,iBAEjC1C,KAAKsB,MAAMqB,iBACXZ,EAAIa,QAAU5C,KAAKsB,MAAMqB,gBAE7BZ,EAAIc,mBAAqB,KACrB,IAAIjB,EACmB,IAAnBG,EAAIe,aAC4B,QAA/BlB,EAAK5B,KAAKsB,MAAMkB,iBAAmC,IAAZZ,GAAyBA,EAAGmB,aAEpEhB,EAAIiB,kBAAkB,gBAEtB,IAAMjB,EAAIe,aAEV,MAAQf,EAAIkB,QAAU,OAASlB,EAAIkB,OACnCjD,KAAKkD,UAKLlD,KAAKmD,aAAa,KACdnD,KAAKoD,SAA+B,iBAAfrB,EAAIkB,OAAsBlB,EAAIkB,OAAS,IAC7D,KAGXlB,EAAIsB,KAAKrD,KAAKyB,MACjB,CACD,MAAOc,GAOH,YAHAvC,KAAKmD,aAAa,KACdnD,KAAKoD,SAASb,IACf,EAEP,CACwB,oBAAbe,WACPtD,KAAKuD,OAAStC,EAAQuC,gBACtBvC,EAAQwC,SAASzD,KAAKuD,QAAUvD,KAExC,CAMAoD,QAAAA,CAASM,GACL1D,KAAK2D,aAAa,QAASD,EAAK1D,KAAKgC,MACrChC,KAAK4D,UAAS,EAClB,CAMAA,QAAAA,CAASC,GACL,QAAI,IAAuB7D,KAAKgC,MAAQ,OAAShC,KAAKgC,KAAtD,CAIA,GADAhC,KAAKgC,KAAKa,mBAAqBvD,EAC3BuE,EACA,IACI7D,KAAKgC,KAAK8B,OACd,CACA,MAAOvB,GAAK,CAEQ,oBAAbe,iBACArC,EAAQwC,SAASzD,KAAKuD,QAEjCvD,KAAKgC,KAAO,IAXZ,CAYJ,CAMAkB,OAAAA,GACI,MAAM9C,EAAOJ,KAAKgC,KAAK+B,aACV,OAAT3D,IACAJ,KAAK2D,aAAa,OAAQvD,GAC1BJ,KAAK2D,aAAa,WAClB3D,KAAK4D,WAEb,CAMAE,KAAAA,GACI9D,KAAK4D,UACT,EASJ,GAPA3C,EAAQuC,cAAgB,EACxBvC,EAAQwC,SAAW,CAAA,EAMK,oBAAbH,SAEP,GAA2B,mBAAhBU,YAEPA,YAAY,WAAYC,QAEvB,GAAgC,mBAArBC,iBAAiC,CAC7C,MAAMC,EAAmB,eAAgBC,iBAAa,WAAa,SACnEF,iBAAiBC,EAAkBF,GAAe,EACtD,CAEJ,SAASA,IACL,IAAK,IAAI7B,KAAKnB,EAAQwC,SACdxC,EAAQwC,SAASpB,eAAeD,IAChCnB,EAAQwC,SAASrB,GAAG0B,OAGhC,CACA,MAAMO,EAAW,WACb,MAAMtC,EAAMuC,EAAW,CACnBxC,SAAS,IAEb,OAAOC,GAA4B,OAArBA,EAAIwC,YACtB,CALiB,GAwBjB,SAASD,EAAW5E,GAChB,MAAMoC,EAAUpC,EAAKoC,QAErB,IACI,GAAI,oBAAuB0C,kBAAoB1C,GAAW2C,EAAOA,SAC7D,OAAO,IAAID,cAEnB,CACA,MAAOjC,GAAK,CACZ,IAAKT,EACD,IACI,OAAO,IAAIsC,EAAUM,eAAC,CAAC,UAAUC,OAAO,UAAUC,KAAK,OAAM,oBACjE,CACA,MAAOrC,GAAK,CAEpB,iDA1BO,cAAkBhD,EACrBE,WAAAA,CAAYC,GACRC,MAAMD,GACN,MAAMmF,EAAcnF,GAAQA,EAAKmF,YACjC7E,KAAK8E,eAAiBT,IAAYQ,CACtC,CACAtE,OAAAA,CAAQb,EAAO,IAEX,OADAqF,OAAOC,OAAOtF,EAAM,CAAEO,GAAID,KAAKC,IAAMD,KAAKN,MACnC,IAAIuB,EAAQqD,EAAYtE,KAAKoB,MAAO1B,EAC/C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../transport.js"),t=require("../globals.js"),r=require("../../../../engine.io-parser/build/esm/index.js");class s extends e.Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=r.createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=r.createPacketEncoderStream();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const a=()=>{s.read().then(e=>{let{done:t,value:r}=e;t||(this.onPacket(r),a())}).catch(e=>{})};a();const n={type:"open"};this.query.sid&&(n.data=`{"sid":"${this.query.sid}"}`),this._writer.write(n).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const s=e[r],i=r===e.length-1;this._writer.write(s).then(()=>{i&&t.nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}}exports.WT=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../transport.js"),t=require("../globals.js"),r=require("../../../../engine.io-parser/build/esm/index.js");class s extends e.Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=r.createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=r.createPacketEncoderStream();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const a=()=>{s.read().then(({done:e,value:t})=>{e||(this.onPacket(t),a())}).catch(e=>{})};a();const n={type:"open"};this.query.sid&&(n.data=`{"sid":"${this.query.sid}"}`),this._writer.write(n).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const s=e[r],i=r===e.length-1;this._writer.write(s).then(()=>{i&&t.nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}}exports.WT=s;
2
2
  //# sourceMappingURL=webtransport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webtransport.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/webtransport.js"],"sourcesContent":["import { Transport } from \"../transport.js\";\nimport { nextTick } from \"../globals.node.js\";\nimport { createPacketDecoderStream, createPacketEncoderStream, } from \"engine.io-parser\";\n/**\n * WebTransport transport based on the built-in `WebTransport` object.\n *\n * Usage: browser, Node.js (with the `@fails-components/webtransport` package)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport\n * @see https://caniuse.com/webtransport\n */\nexport class WT extends Transport {\n get name() {\n return \"webtransport\";\n }\n doOpen() {\n try {\n // @ts-ignore\n this._transport = new WebTransport(this.createUri(\"https\"), this.opts.transportOptions[this.name]);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this._transport.closed\n .then(() => {\n this.onClose();\n })\n .catch((err) => {\n this.onError(\"webtransport error\", err);\n });\n // note: we could have used async/await, but that would require some additional polyfills\n this._transport.ready.then(() => {\n this._transport.createBidirectionalStream().then((stream) => {\n const decoderStream = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, this.socket.binaryType);\n const reader = stream.readable.pipeThrough(decoderStream).getReader();\n const encoderStream = createPacketEncoderStream();\n encoderStream.readable.pipeTo(stream.writable);\n this._writer = encoderStream.writable.getWriter();\n const read = () => {\n reader\n .read()\n .then(({ done, value }) => {\n if (done) {\n return;\n }\n this.onPacket(value);\n read();\n })\n .catch((err) => {\n });\n };\n read();\n const packet = { type: \"open\" };\n if (this.query.sid) {\n packet.data = `{\"sid\":\"${this.query.sid}\"}`;\n }\n this._writer.write(packet).then(() => this.onOpen());\n });\n });\n }\n write(packets) {\n this.writable = false;\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n this._writer.write(packet).then(() => {\n if (lastPacket) {\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n var _a;\n (_a = this._transport) === null || _a === void 0 ? void 0 : _a.close();\n }\n}\n"],"names":["WT","Transport","name","doOpen","this","_transport","WebTransport","createUri","opts","transportOptions","err","emitReserved","closed","then","onClose","catch","onError","ready","createBidirectionalStream","stream","decoderStream","createPacketDecoderStream","Number","MAX_SAFE_INTEGER","socket","binaryType","reader","readable","pipeThrough","getReader","encoderStream","createPacketEncoderStream","pipeTo","writable","_writer","getWriter","read","_ref","done","value","onPacket","packet","type","query","sid","data","write","onOpen","packets","i","length","lastPacket","nextTick","setTimeoutFn","doClose","_a","close"],"mappings":"6LAWO,MAAMA,UAAWC,EAAAA,UACpB,QAAIC,GACA,MAAO,cACX,CACAC,MAAAA,GACI,IAEIC,KAAKC,WAAa,IAAIC,aAAaF,KAAKG,UAAU,SAAUH,KAAKI,KAAKC,iBAAiBL,KAAKF,MAC/F,CACD,MAAOQ,GACH,OAAON,KAAKO,aAAa,QAASD,EACtC,CACAN,KAAKC,WAAWO,OACXC,KAAK,KACNT,KAAKU,YAEJC,MAAOL,IACRN,KAAKY,QAAQ,qBAAsBN,KAGvCN,KAAKC,WAAWY,MAAMJ,KAAK,KACvBT,KAAKC,WAAWa,4BAA4BL,KAAMM,IAC9C,MAAMC,EAAgBC,EAAAA,0BAA0BC,OAAOC,iBAAkBnB,KAAKoB,OAAOC,YAC/EC,EAASP,EAAOQ,SAASC,YAAYR,GAAeS,YACpDC,EAAgBC,EAAAA,4BACtBD,EAAcH,SAASK,OAAOb,EAAOc,UACrC7B,KAAK8B,QAAUJ,EAAcG,SAASE,YACtC,MAAMC,EAAOA,KACTV,EACKU,OACAvB,KAAKwB,IAAqB,IAApBC,KAAEA,EAAIC,MAAEA,GAAOF,EAClBC,IAGJlC,KAAKoC,SAASD,GACdH,OAECrB,MAAOL,QAGhB0B,IACA,MAAMK,EAAS,CAAEC,KAAM,QACnBtC,KAAKuC,MAAMC,MACXH,EAAOI,KAAO,WAAWzC,KAAKuC,MAAMC,SAExCxC,KAAK8B,QAAQY,MAAML,GAAQ5B,KAAK,IAAMT,KAAK2C,aAGvD,CACAD,KAAAA,CAAME,GACF5C,KAAK6B,UAAW,EAChB,IAAK,IAAIgB,EAAI,EAAGA,EAAID,EAAQE,OAAQD,IAAK,CACrC,MAAMR,EAASO,EAAQC,GACjBE,EAAaF,IAAMD,EAAQE,OAAS,EAC1C9C,KAAK8B,QAAQY,MAAML,GAAQ5B,KAAK,KACxBsC,GACAC,EAAAA,SAAS,KACLhD,KAAK6B,UAAW,EAChB7B,KAAKO,aAAa,UACnBP,KAAKiD,eAGpB,CACJ,CACAC,OAAAA,GACI,IAAIC,EACuB,QAA1BA,EAAKnD,KAAKC,kBAAoC,IAAZkD,GAAyBA,EAAGC,OACnE"}
1
+ {"version":3,"file":"webtransport.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/webtransport.js"],"sourcesContent":["import { Transport } from \"../transport.js\";\nimport { nextTick } from \"../globals.node.js\";\nimport { createPacketDecoderStream, createPacketEncoderStream, } from \"engine.io-parser\";\n/**\n * WebTransport transport based on the built-in `WebTransport` object.\n *\n * Usage: browser, Node.js (with the `@fails-components/webtransport` package)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport\n * @see https://caniuse.com/webtransport\n */\nexport class WT extends Transport {\n get name() {\n return \"webtransport\";\n }\n doOpen() {\n try {\n // @ts-ignore\n this._transport = new WebTransport(this.createUri(\"https\"), this.opts.transportOptions[this.name]);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this._transport.closed\n .then(() => {\n this.onClose();\n })\n .catch((err) => {\n this.onError(\"webtransport error\", err);\n });\n // note: we could have used async/await, but that would require some additional polyfills\n this._transport.ready.then(() => {\n this._transport.createBidirectionalStream().then((stream) => {\n const decoderStream = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, this.socket.binaryType);\n const reader = stream.readable.pipeThrough(decoderStream).getReader();\n const encoderStream = createPacketEncoderStream();\n encoderStream.readable.pipeTo(stream.writable);\n this._writer = encoderStream.writable.getWriter();\n const read = () => {\n reader\n .read()\n .then(({ done, value }) => {\n if (done) {\n return;\n }\n this.onPacket(value);\n read();\n })\n .catch((err) => {\n });\n };\n read();\n const packet = { type: \"open\" };\n if (this.query.sid) {\n packet.data = `{\"sid\":\"${this.query.sid}\"}`;\n }\n this._writer.write(packet).then(() => this.onOpen());\n });\n });\n }\n write(packets) {\n this.writable = false;\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n this._writer.write(packet).then(() => {\n if (lastPacket) {\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n var _a;\n (_a = this._transport) === null || _a === void 0 ? void 0 : _a.close();\n }\n}\n"],"names":["WT","Transport","name","doOpen","this","_transport","WebTransport","createUri","opts","transportOptions","err","emitReserved","closed","then","onClose","catch","onError","ready","createBidirectionalStream","stream","decoderStream","createPacketDecoderStream","Number","MAX_SAFE_INTEGER","socket","binaryType","reader","readable","pipeThrough","getReader","encoderStream","createPacketEncoderStream","pipeTo","writable","_writer","getWriter","read","done","value","onPacket","packet","type","query","sid","data","write","onOpen","packets","i","length","lastPacket","nextTick","setTimeoutFn","doClose","_a","close"],"mappings":"6LAWO,MAAMA,UAAWC,EAAAA,UACpB,QAAIC,GACA,MAAO,cACX,CACAC,MAAAA,GACI,IAEIC,KAAKC,WAAa,IAAIC,aAAaF,KAAKG,UAAU,SAAUH,KAAKI,KAAKC,iBAAiBL,KAAKF,MAC/F,CACD,MAAOQ,GACH,OAAON,KAAKO,aAAa,QAASD,EACtC,CACAN,KAAKC,WAAWO,OACXC,KAAK,KACNT,KAAKU,YAEJC,MAAOL,IACRN,KAAKY,QAAQ,qBAAsBN,KAGvCN,KAAKC,WAAWY,MAAMJ,KAAK,KACvBT,KAAKC,WAAWa,4BAA4BL,KAAMM,IAC9C,MAAMC,EAAgBC,EAAAA,0BAA0BC,OAAOC,iBAAkBnB,KAAKoB,OAAOC,YAC/EC,EAASP,EAAOQ,SAASC,YAAYR,GAAeS,YACpDC,EAAgBC,EAAAA,4BACtBD,EAAcH,SAASK,OAAOb,EAAOc,UACrC7B,KAAK8B,QAAUJ,EAAcG,SAASE,YACtC,MAAMC,EAAOA,KACTV,EACKU,OACAvB,KAAK,EAAGwB,OAAMC,YACXD,IAGJjC,KAAKmC,SAASD,GACdF,OAECrB,MAAOL,QAGhB0B,IACA,MAAMI,EAAS,CAAEC,KAAM,QACnBrC,KAAKsC,MAAMC,MACXH,EAAOI,KAAO,WAAWxC,KAAKsC,MAAMC,SAExCvC,KAAK8B,QAAQW,MAAML,GAAQ3B,KAAK,IAAMT,KAAK0C,aAGvD,CACAD,KAAAA,CAAME,GACF3C,KAAK6B,UAAW,EAChB,IAAK,IAAIe,EAAI,EAAGA,EAAID,EAAQE,OAAQD,IAAK,CACrC,MAAMR,EAASO,EAAQC,GACjBE,EAAaF,IAAMD,EAAQE,OAAS,EAC1C7C,KAAK8B,QAAQW,MAAML,GAAQ3B,KAAK,KACxBqC,GACAC,EAAAA,SAAS,KACL/C,KAAK6B,UAAW,EAChB7B,KAAKO,aAAa,UACnBP,KAAKgD,eAGpB,CACJ,CACAC,OAAAA,GACI,IAAIC,EACuB,QAA1BA,EAAKlD,KAAKC,kBAAoC,IAAZiD,GAAyBA,EAAGC,OACnE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./globals.js");const t=e.globalThisShim.setTimeout,i=e.globalThisShim.clearTimeout;exports.byteLength=function(e){return"string"==typeof e?function(e){let t=0,i=0;for(let n=0,r=e.length;n<r;n++)t=e.charCodeAt(n),t<128?i+=1:t<2048?i+=2:t<55296||t>=57344?i+=3:(n++,i+=4);return i}(e):Math.ceil(1.33*(e.byteLength||e.size))},exports.installTimerFunctions=function(n,r){r.useNativeTimers?(n.setTimeoutFn=t.bind(e.globalThisShim),n.clearTimeoutFn=i.bind(e.globalThisShim)):(n.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),n.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))},exports.pick=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return i.reduce((t,i)=>(e.hasOwnProperty(i)&&(t[i]=e[i]),t),{})},exports.randomString=function(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./globals.js");const e=t.globalThisShim.setTimeout,i=t.globalThisShim.clearTimeout;exports.byteLength=function(t){return"string"==typeof t?function(t){let e=0,i=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?i+=1:e<2048?i+=2:e<55296||e>=57344?i+=3:(n++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))},exports.installTimerFunctions=function(n,o){o.useNativeTimers?(n.setTimeoutFn=e.bind(t.globalThisShim),n.clearTimeoutFn=i.bind(t.globalThisShim)):(n.setTimeoutFn=t.globalThisShim.setTimeout.bind(t.globalThisShim),n.clearTimeoutFn=t.globalThisShim.clearTimeout.bind(t.globalThisShim))},exports.pick=function(t,...e){return e.reduce((e,i)=>(t.hasOwnProperty(i)&&(e[i]=t[i]),e),{})},exports.randomString=function(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)};
2
2
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../node_modules/engine.io-client/build/esm/util.js"],"sourcesContent":["import { globalThisShim as globalThis } from \"./globals.node.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = globalThis.setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = globalThis.clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = globalThis.setTimeout.bind(globalThis);\n obj.clearTimeoutFn = globalThis.clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n/**\n * Generates a random 8-characters string.\n */\nexport function randomString() {\n return (Date.now().toString(36).substring(3) +\n Math.random().toString(36).substring(2, 5));\n}\n"],"names":["NATIVE_SET_TIMEOUT","globalThis","globalThisShim","setTimeout","NATIVE_CLEAR_TIMEOUT","clearTimeout","obj","str","c","length","i","l","charCodeAt","utf8Length","Math","ceil","byteLength","size","opts","useNativeTimers","setTimeoutFn","bind","clearTimeoutFn","_len","arguments","attr","Array","_key","reduce","acc","k","hasOwnProperty","Date","now","toString","substring","random"],"mappings":"kGAUA,MAAMA,EAAqBC,EAAUC,eAACC,WAChCC,EAAuBH,EAAUC,eAACG,gCAcjC,SAAoBC,GACvB,MAAmB,iBAARA,EAMf,SAAoBC,GAChB,IAAIC,EAAI,EAAGC,EAAS,EACpB,IAAK,IAAIC,EAAI,EAAGC,EAAIJ,EAAIE,OAAQC,EAAIC,EAAGD,IACnCF,EAAID,EAAIK,WAAWF,GACfF,EAAI,IACJC,GAAU,EAELD,EAAI,KACTC,GAAU,EAELD,EAAI,OAAUA,GAAK,MACxBC,GAAU,GAGVC,IACAD,GAAU,GAGlB,OAAOA,CACX,CAxBeI,CAAWP,GAGfQ,KAAKC,KAPQ,MAOFT,EAAIU,YAAcV,EAAIW,MAC5C,gCAnBO,SAA+BX,EAAKY,GACnCA,EAAKC,iBACLb,EAAIc,aAAepB,EAAmBqB,KAAKpB,EAAUC,gBACrDI,EAAIgB,eAAiBlB,EAAqBiB,KAAKpB,EAAUC,kBAGzDI,EAAIc,aAAenB,EAAUC,eAACC,WAAWkB,KAAKpB,EAAUC,gBACxDI,EAAIgB,eAAiBrB,EAAUC,eAACG,aAAagB,KAAKpB,EAAUC,gBAEpE,eApBO,SAAcI,GAAc,IAAAiB,IAAAA,EAAAC,UAAAf,OAANgB,MAAIC,MAAAH,EAAAA,EAAAA,OAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,EAAAH,GAAAA,UAAAG,GAC7B,OAAOF,EAAKG,OAAO,CAACC,EAAKC,KACjBxB,EAAIyB,eAAeD,KACnBD,EAAIC,GAAKxB,EAAIwB,IAEVD,GACR,CAAE,EACT,uBA+CO,WACH,OAAQG,KAAKC,MAAMC,SAAS,IAAIC,UAAU,GACtCrB,KAAKsB,SAASF,SAAS,IAAIC,UAAU,EAAG,EAChD"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../node_modules/engine.io-client/build/esm/util.js"],"sourcesContent":["import { globalThisShim as globalThis } from \"./globals.node.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = globalThis.setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = globalThis.clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = globalThis.setTimeout.bind(globalThis);\n obj.clearTimeoutFn = globalThis.clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n/**\n * Generates a random 8-characters string.\n */\nexport function randomString() {\n return (Date.now().toString(36).substring(3) +\n Math.random().toString(36).substring(2, 5));\n}\n"],"names":["NATIVE_SET_TIMEOUT","globalThis","globalThisShim","setTimeout","NATIVE_CLEAR_TIMEOUT","clearTimeout","obj","str","c","length","i","l","charCodeAt","utf8Length","Math","ceil","byteLength","size","opts","useNativeTimers","setTimeoutFn","bind","clearTimeoutFn","attr","reduce","acc","k","hasOwnProperty","Date","now","toString","substring","random"],"mappings":"kGAUA,MAAMA,EAAqBC,EAAUC,eAACC,WAChCC,EAAuBH,EAAUC,eAACG,gCAcjC,SAAoBC,GACvB,MAAmB,iBAARA,EAMf,SAAoBC,GAChB,IAAIC,EAAI,EAAGC,EAAS,EACpB,IAAK,IAAIC,EAAI,EAAGC,EAAIJ,EAAIE,OAAQC,EAAIC,EAAGD,IACnCF,EAAID,EAAIK,WAAWF,GACfF,EAAI,IACJC,GAAU,EAELD,EAAI,KACTC,GAAU,EAELD,EAAI,OAAUA,GAAK,MACxBC,GAAU,GAGVC,IACAD,GAAU,GAGlB,OAAOA,CACX,CAxBeI,CAAWP,GAGfQ,KAAKC,KAPQ,MAOFT,EAAIU,YAAcV,EAAIW,MAC5C,gCAnBO,SAA+BX,EAAKY,GACnCA,EAAKC,iBACLb,EAAIc,aAAepB,EAAmBqB,KAAKpB,EAAUC,gBACrDI,EAAIgB,eAAiBlB,EAAqBiB,KAAKpB,EAAUC,kBAGzDI,EAAIc,aAAenB,EAAUC,eAACC,WAAWkB,KAAKpB,EAAUC,gBACxDI,EAAIgB,eAAiBrB,EAAUC,eAACG,aAAagB,KAAKpB,EAAUC,gBAEpE,eApBO,SAAcI,KAAQiB,GACzB,OAAOA,EAAKC,OAAO,CAACC,EAAKC,KACjBpB,EAAIqB,eAAeD,KACnBD,EAAIC,GAAKpB,EAAIoB,IAEVD,GACR,CAAE,EACT,uBA+CO,WACH,OAAQG,KAAKC,MAAMC,SAAS,IAAIC,UAAU,GACtCjB,KAAKkB,SAASF,SAAS,IAAIC,UAAU,EAAG,EAChD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./commons.js");const t="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),r="function"==typeof ArrayBuffer,n=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=(o,f,c)=>{let{type:i,data:u}=o;return t&&u instanceof Blob?f?c(u):a(u,c):r&&(u instanceof ArrayBuffer||n(u))?f?c(u):a(new Blob([u]),c):c(e.PACKET_TYPES[i]+(u||""))},a=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function f(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;exports.encodePacket=o,exports.encodePacketToBinary=function(e,a){return t&&e.data instanceof Blob?e.data.arrayBuffer().then(f).then(a):r&&(e.data instanceof ArrayBuffer||n(e.data))?a(f(e.data)):void o(e,!1,e=>{c||(c=new TextEncoder),a(c.encode(e))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./commons.js");const t="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),r="function"==typeof ArrayBuffer,n=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=({type:o,data:f},c,i)=>t&&f instanceof Blob?c?i(f):a(f,i):r&&(f instanceof ArrayBuffer||n(f))?c?i(f):a(new Blob([f]),i):i(e.PACKET_TYPES[o]+(f||"")),a=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function f(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;exports.encodePacket=o,exports.encodePacketToBinary=function(e,a){return t&&e.data instanceof Blob?e.data.arrayBuffer().then(f).then(a):r&&(e.data instanceof ArrayBuffer||n(e.data))?a(f(e.data)):void o(e,!1,e=>{c||(c=new TextEncoder),a(c.encode(e))})};
2
2
  //# sourceMappingURL=encodePacket.browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encodePacket.browser.js","sources":["../../../../../node_modules/engine.io-parser/build/esm/encodePacket.browser.js"],"sourcesContent":["import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + (content || \"\"));\n };\n return fileReader.readAsDataURL(data);\n};\nfunction toArray(data) {\n if (data instanceof Uint8Array) {\n return data;\n }\n else if (data instanceof ArrayBuffer) {\n return new Uint8Array(data);\n }\n else {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n }\n}\nlet TEXT_ENCODER;\nexport function encodePacketToBinary(packet, callback) {\n if (withNativeBlob && packet.data instanceof Blob) {\n return packet.data.arrayBuffer().then(toArray).then(callback);\n }\n else if (withNativeArrayBuffer &&\n (packet.data instanceof ArrayBuffer || isView(packet.data))) {\n return callback(toArray(packet.data));\n }\n encodePacket(packet, false, (encoded) => {\n if (!TEXT_ENCODER) {\n TEXT_ENCODER = new TextEncoder();\n }\n callback(TEXT_ENCODER.encode(encoded));\n });\n}\nexport { encodePacket };\n"],"names":["withNativeBlob","Blob","Object","prototype","toString","call","withNativeArrayBuffer","ArrayBuffer","isView","obj","buffer","encodePacket","_ref","supportsBinary","callback","type","data","encodeBlobAsBase64","PACKET_TYPES","fileReader","FileReader","onload","content","result","split","readAsDataURL","toArray","Uint8Array","byteOffset","byteLength","TEXT_ENCODER","packet","arrayBuffer","then","encoded","TextEncoder","encode"],"mappings":"kGACA,MAAMA,EAAiC,mBAATC,MACT,oBAATA,MACqC,6BAAzCC,OAAOC,UAAUC,SAASC,KAAKJ,MACjCK,EAA+C,mBAAhBC,YAE/BC,EAAUC,GACyB,mBAAvBF,YAAYC,OACpBD,YAAYC,OAAOC,GACnBA,GAAOA,EAAIC,kBAAkBH,YAEjCI,EAAeA,CAAAC,EAAiBC,EAAgBC,KAAa,IAA7CC,KAAEA,EAAIC,KAAEA,GAAMJ,EAChC,OAAIZ,GAAkBgB,aAAgBf,KAC9BY,EACOC,EAASE,GAGTC,EAAmBD,EAAMF,GAG/BR,IACJU,aAAgBT,aAAeC,EAAOQ,IACnCH,EACOC,EAASE,GAGTC,EAAmB,IAAIhB,KAAK,CAACe,IAAQF,GAI7CA,EAASI,EAAAA,aAAaH,IAASC,GAAQ,MAE5CC,EAAqBA,CAACD,EAAMF,KAC9B,MAAMK,EAAa,IAAIC,WAKvB,OAJAD,EAAWE,OAAS,WAChB,MAAMC,EAAUH,EAAWI,OAAOC,MAAM,KAAK,GAC7CV,EAAS,KAAOQ,GAAW,MAExBH,EAAWM,cAAcT,IAEpC,SAASU,EAAQV,GACb,OAAIA,aAAgBW,WACTX,EAEFA,aAAgBT,YACd,IAAIoB,WAAWX,GAGf,IAAIW,WAAWX,EAAKN,OAAQM,EAAKY,WAAYZ,EAAKa,WAEjE,CACA,IAAIC,sDACG,SAA8BC,EAAQjB,GACzC,OAAId,GAAkB+B,EAAOf,gBAAgBf,KAClC8B,EAAOf,KAAKgB,cAAcC,KAAKP,GAASO,KAAKnB,GAE/CR,IACJyB,EAAOf,gBAAgBT,aAAeC,EAAOuB,EAAOf,OAC9CF,EAASY,EAAQK,EAAOf,YAEnCL,EAAaoB,GAAQ,EAAQG,IACpBJ,IACDA,EAAe,IAAIK,aAEvBrB,EAASgB,EAAaM,OAAOF,KAErC"}
1
+ {"version":3,"file":"encodePacket.browser.js","sources":["../../../../../node_modules/engine.io-parser/build/esm/encodePacket.browser.js"],"sourcesContent":["import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + (content || \"\"));\n };\n return fileReader.readAsDataURL(data);\n};\nfunction toArray(data) {\n if (data instanceof Uint8Array) {\n return data;\n }\n else if (data instanceof ArrayBuffer) {\n return new Uint8Array(data);\n }\n else {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n }\n}\nlet TEXT_ENCODER;\nexport function encodePacketToBinary(packet, callback) {\n if (withNativeBlob && packet.data instanceof Blob) {\n return packet.data.arrayBuffer().then(toArray).then(callback);\n }\n else if (withNativeArrayBuffer &&\n (packet.data instanceof ArrayBuffer || isView(packet.data))) {\n return callback(toArray(packet.data));\n }\n encodePacket(packet, false, (encoded) => {\n if (!TEXT_ENCODER) {\n TEXT_ENCODER = new TextEncoder();\n }\n callback(TEXT_ENCODER.encode(encoded));\n });\n}\nexport { encodePacket };\n"],"names":["withNativeBlob","Blob","Object","prototype","toString","call","withNativeArrayBuffer","ArrayBuffer","isView","obj","buffer","encodePacket","type","data","supportsBinary","callback","encodeBlobAsBase64","PACKET_TYPES","fileReader","FileReader","onload","content","result","split","readAsDataURL","toArray","Uint8Array","byteOffset","byteLength","TEXT_ENCODER","packet","arrayBuffer","then","encoded","TextEncoder","encode"],"mappings":"kGACA,MAAMA,EAAiC,mBAATC,MACT,oBAATA,MACqC,6BAAzCC,OAAOC,UAAUC,SAASC,KAAKJ,MACjCK,EAA+C,mBAAhBC,YAE/BC,EAAUC,GACyB,mBAAvBF,YAAYC,OACpBD,YAAYC,OAAOC,GACnBA,GAAOA,EAAIC,kBAAkBH,YAEjCI,EAAeA,EAAGC,OAAMC,QAAQC,EAAgBC,IAC9Cf,GAAkBa,aAAgBZ,KAC9Ba,EACOC,EAASF,GAGTG,EAAmBH,EAAME,GAG/BT,IACJO,aAAgBN,aAAeC,EAAOK,IACnCC,EACOC,EAASF,GAGTG,EAAmB,IAAIf,KAAK,CAACY,IAAQE,GAI7CA,EAASE,EAAAA,aAAaL,IAASC,GAAQ,KAE5CG,EAAqBA,CAACH,EAAME,KAC9B,MAAMG,EAAa,IAAIC,WAKvB,OAJAD,EAAWE,OAAS,WAChB,MAAMC,EAAUH,EAAWI,OAAOC,MAAM,KAAK,GAC7CR,EAAS,KAAOM,GAAW,MAExBH,EAAWM,cAAcX,IAEpC,SAASY,EAAQZ,GACb,OAAIA,aAAgBa,WACTb,EAEFA,aAAgBN,YACd,IAAImB,WAAWb,GAGf,IAAIa,WAAWb,EAAKH,OAAQG,EAAKc,WAAYd,EAAKe,WAEjE,CACA,IAAIC,sDACG,SAA8BC,EAAQf,GACzC,OAAIf,GAAkB8B,EAAOjB,gBAAgBZ,KAClC6B,EAAOjB,KAAKkB,cAAcC,KAAKP,GAASO,KAAKjB,GAE/CT,IACJwB,EAAOjB,gBAAgBN,aAAeC,EAAOsB,EAAOjB,OAC9CE,EAASU,EAAQK,EAAOjB,YAEnCF,EAAamB,GAAQ,EAAQG,IACpBJ,IACDA,EAAe,IAAIK,aAEvBnB,EAASc,EAAaM,OAAOF,KAErC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/MotionConfigContext.mjs.js"),o=require("../../utils/use-composed-ref.mjs.js"),r=require("../../../../../motion-dom/dist/es/utils/is-html-element.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var s=i(e);class p extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(r.isHTMLElement(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,o=r.isHTMLElement(e)&&e.offsetWidth||0,n=r.isHTMLElement(e)&&e.offsetHeight||0,i=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=o-s.width-s.left,s.bottom=n-s.height-s.top,s.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}exports.PopChild=function(r){let{children:i,isPresent:c,anchorX:u,anchorY:f,root:l,pop:d}=r;const h=e.useId(),a=e.useRef(null),m=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:g}=e.useContext(t.MotionConfigContext),j=!1!==d?i.props?.ref??i?.ref:void 0,x=o.useComposedRefs(a,j);return e.useInsertionEffect(()=>{const{width:e,height:t,top:o,left:r,right:n,bottom:i,direction:s}=m.current;if(c||!1===d||!a.current||!e||!t)return;const p="rtl"===s,j="left"===u?p?`right: ${n}`:`left: ${r}`:p?`left: ${r}`:`right: ${n}`,x="bottom"===f?`bottom: ${i}`:`top: ${o}`;a.current.dataset.motionPopId=h;const b=document.createElement("style");g&&(b.nonce=g);const C=l??document.head;return C.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${h}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${j}px !important;\n ${x}px !important;\n }\n `),()=>{a.current?.removeAttribute("data-motion-pop-id"),C.contains(b)&&C.removeChild(b)}},[c]),n.exports.jsx(p,{isPresent:c,childRef:a,sizeRef:m,pop:d,children:!1===d?i:s.cloneElement(i,{ref:x})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/MotionConfigContext.mjs.js"),o=require("../../utils/use-composed-ref.mjs.js"),r=require("../../../../../motion-dom/dist/es/utils/is-html-element.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var s=i(e);class p extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(r.isHTMLElement(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,o=r.isHTMLElement(e)&&e.offsetWidth||0,n=r.isHTMLElement(e)&&e.offsetHeight||0,i=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=o-s.width-s.left,s.bottom=n-s.height-s.top,s.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}exports.PopChild=function({children:r,isPresent:i,anchorX:c,anchorY:u,root:f,pop:d}){const l=e.useId(),h=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=e.useContext(t.MotionConfigContext),g=!1!==d?r.props?.ref??r?.ref:void 0,j=o.useComposedRefs(h,g);return e.useInsertionEffect(()=>{const{width:e,height:t,top:o,left:r,right:n,bottom:s,direction:p}=a.current;if(i||!1===d||!h.current||!e||!t)return;const g="rtl"===p,j="left"===c?g?`right: ${n}`:`left: ${r}`:g?`left: ${r}`:`right: ${n}`,x="bottom"===u?`bottom: ${s}`:`top: ${o}`;h.current.dataset.motionPopId=l;const b=document.createElement("style");m&&(b.nonce=m);const C=f??document.head;return C.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${j}px !important;\n ${x}px !important;\n }\n `),()=>{h.current?.removeAttribute("data-motion-pop-id"),C.contains(b)&&C.removeChild(b)}},[i]),n.exports.jsx(p,{isPresent:i,childRef:h,sizeRef:a,pop:d,children:!1===d?r:s.cloneElement(r,{ref:j})})};
2
2
  //# sourceMappingURL=PopChild.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","element","offsetParent","parentWidth","isHTMLElement","offsetWidth","parentHeight","offsetHeight","computedStyle","getComputedStyle","size","top","offsetTop","left","offsetLeft","right","width","bottom","height","direction","componentDidUpdate","props","children","_ref","isPresent","anchorX","anchorY","root","pop","id","useId","ref","useRef","childRef","current","isRTL","x","y","nonce","style","document","head","appendChild","sheet","insertRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"4pBAqCA,MAAAA,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,uHAGQ,MAAAC,EAAAC,EAAAC,aACAC,EAAAC,EAAAA,cAAAJ,IACIA,EAAAK,eAEJC,EAAAF,EAAAA,cAAAJ,IACIA,EAAAO,gBAGJC,EAAAC,iBAAAR,0FAIAS,EAAAC,IAAAV,EAAAW,UACAF,EAAAG,KAAAZ,EAAAa,WACAJ,EAAAK,MAAAZ,EAAAO,EAAAM,MAAAN,EAAAG,KACAH,EAAAO,OAAAX,EAAAI,EAAAQ,OAAAR,EAAAC,IACAD,EAAAS,UAAAX,EAAAW,UAGJ,OAAA,KAMJC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,2BAIF,SAAAC,GAAA,IAAAD,SAAAA,EAAAE,UAAAA,EAAAC,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAC,IAAAA,GAAAL,EACF,MAAAM,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEIhB,MAAA,EACAE,OAAA,EACAP,IAAA,EACAE,KAAA,EACAE,MAAA,EACAE,OAAA,EACAE,UAAA,sDAWJc,GAAA,IAAAL,EAEQN,EAAAD,OAAAU,6EAeJ,MAAAf,MAAAA,EAAAE,OAAAA,EAAAP,IAAAA,EAAAE,KAAAA,EAAAE,MAAAA,EAAAE,OAAAA,EAAAE,UAAAA,GAAAT,EAAAwB,QACA,GAAAV,IAAAO,IAAAH,IAAAG,EAAAG,UAAAlB,IAAAE,SAEA,MAAAiB,EAAA,QAAAhB,EACAiB,EAAA,SAAAX,EACIU,EAAApB,UAAAA,IAAAF,SAAAA,IACAsB,EAAAtB,SAAAA,cAAAE,IACJsB,EAAApB,WAAAS,EAAAT,WAAAA,YAAAN,4EAKA2B,IAAWC,EAAAD,MAAAA,GAEX,MAAAtC,EAAA2B,GAAAa,SAAAC,KAeA,OAdAzC,EAAA0C,YAAAH,GAEAA,EAAAI,OACIJ,EAAAI,MAAAC,WAAA,+PAWJ,KACIb,EAAAG,SAAAW,gBAAA,sBACA7C,EAAA8C,SAAAP,IACIvC,EAAA+C,YAAAR,KAGZ,CAAAf,4DAKYF,UAAAA,IAAAA,EAAAA,EACA1B,EAAAoD,aAAA1B,EAAA,CAAAS,IAAAkB,KAGhB"}
1
+ {"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","element","offsetParent","parentWidth","isHTMLElement","offsetWidth","parentHeight","offsetHeight","computedStyle","getComputedStyle","size","top","offsetTop","left","offsetLeft","right","width","bottom","height","direction","componentDidUpdate","props","children","isPresent","anchorX","anchorY","root","pop","id","useId","ref","useRef","childRef","current","isRTL","x","y","nonce","style","document","head","appendChild","sheet","insertRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"4pBAqCA,MAAAA,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,uHAGQ,MAAAC,EAAAC,EAAAC,aACAC,EAAAC,EAAAA,cAAAJ,IACIA,EAAAK,eAEJC,EAAAF,EAAAA,cAAAJ,IACIA,EAAAO,gBAGJC,EAAAC,iBAAAR,0FAIAS,EAAAC,IAAAV,EAAAW,UACAF,EAAAG,KAAAZ,EAAAa,WACAJ,EAAAK,MAAAZ,EAAAO,EAAAM,MAAAN,EAAAG,KACAH,EAAAO,OAAAX,EAAAI,EAAAQ,OAAAR,EAAAC,IACAD,EAAAS,UAAAX,EAAAW,UAGJ,OAAA,KAMJC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,2BAIF,UAAAA,SAAAA,EAAAC,UAAAA,EAAAC,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAC,IAAAA,IACF,MAAAC,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEIf,MAAA,EACAE,OAAA,EACAP,IAAA,EACAE,KAAA,EACAE,MAAA,EACAE,OAAA,EACAE,UAAA,sDAWJa,GAAA,IAAAL,EAEQL,EAAAD,OAAAS,6EAeJ,MAAAd,MAAAA,EAAAE,OAAAA,EAAAP,IAAAA,EAAAE,KAAAA,EAAAE,MAAAA,EAAAE,OAAAA,EAAAE,UAAAA,GAAAT,EAAAuB,QACA,GAAAV,IAAAO,IAAAH,IAAAG,EAAAG,UAAAjB,IAAAE,SAEA,MAAAgB,EAAA,QAAAf,EACAgB,EAAA,SAAAX,EACIU,EAAAnB,UAAAA,IAAAF,SAAAA,IACAqB,EAAArB,SAAAA,cAAAE,IACJqB,EAAAnB,WAAAQ,EAAAR,WAAAA,YAAAN,4EAKA0B,IAAWC,EAAAD,MAAAA,GAEX,MAAArC,EAAA0B,GAAAa,SAAAC,KAeA,OAdAxC,EAAAyC,YAAAH,GAEAA,EAAAI,OACIJ,EAAAI,MAAAC,WAAA,+PAWJ,KACIb,EAAAG,SAAAW,gBAAA,sBACA5C,EAAA6C,SAAAP,IACItC,EAAA8C,YAAAR,KAGZ,CAAAf,4DAKYD,UAAAA,IAAAA,EAAAA,EACA1B,EAAAmD,aAAAzB,EAAA,CAAAQ,IAAAkB,KAGhB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),r=require("../../context/PresenceContext.mjs.js"),t=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),o=require("./PopChild.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function u(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var i=u(e);function c(){return new Map}exports.PresenceChild=u=>{let{children:a,initial:f,isPresent:l,onExitComplete:j,custom:p,presenceAffectsLayout:d,mode:m,anchorX:h,anchorY:x,root:P}=u;const v=t.useConstant(c),C=e.useId(),b=e.useRef(l),q=e.useRef(j);s.useIsomorphicLayoutEffect(()=>{b.current=l,q.current=j});let y=!0,O=e.useMemo(()=>(y=!1,{id:C,initial:f,isPresent:l,custom:p,onExitComplete:e=>{v.set(e,!0);for(const e of v.values())if(!e)return;j&&j()},register:e=>(v.set(e,!1),()=>{v.delete(e),!b.current&&!v.size&&q.current?.()})}),[l,v,j]);return d&&y&&(O={...O}),e.useMemo(()=>{v.forEach((e,r)=>v.set(r,!1))},[l]),i.useEffect(()=>{!l&&!v.size&&j&&j()},[l]),a=n.exports.jsx(o.PopChild,{pop:"popLayout"===m,isPresent:l,anchorX:h,anchorY:x,root:P,children:a}),n.exports.jsx(r.PresenceContext.Provider,{value:O,children:a})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),r=require("../../context/PresenceContext.mjs.js"),t=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),o=require("./PopChild.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function u(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var i=u(e);function c(){return new Map}exports.PresenceChild=({children:u,initial:a,isPresent:f,onExitComplete:l,custom:j,presenceAffectsLayout:p,mode:d,anchorX:m,anchorY:h,root:x})=>{const P=t.useConstant(c),v=e.useId(),C=e.useRef(f),b=e.useRef(l);s.useIsomorphicLayoutEffect(()=>{C.current=f,b.current=l});let q=!0,y=e.useMemo(()=>(q=!1,{id:v,initial:a,isPresent:f,custom:j,onExitComplete:e=>{P.set(e,!0);for(const e of P.values())if(!e)return;l&&l()},register:e=>(P.set(e,!1),()=>{P.delete(e),!C.current&&!P.size&&b.current?.()})}),[f,P,l]);return p&&q&&(y={...y}),e.useMemo(()=>{P.forEach((e,r)=>P.set(r,!1))},[f]),i.useEffect(()=>{!f&&!P.size&&l&&l()},[f]),u=n.exports.jsx(o.PopChild,{pop:"popLayout"===d,isPresent:f,anchorX:m,anchorY:h,root:x,children:u}),n.exports.jsx(r.PresenceContext.Provider,{value:y,children:u})};
2
2
  //# sourceMappingURL=PresenceChild.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PresenceChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":["newChildrenMap","_ref","children","initial","isPresent","onExitComplete","custom","presenceAffectsLayout","mode","anchorX","anchorY","root","presenceChildren","useConstant","id","useId","isPresentRef","useRef","onExitCompleteRef","current","context","useMemo","childId","set","isComplete","register","delete","isReusedContext","forEach","_","key","React","useEffect","jsx","exports","PopChild","pop","PresenceContext","Provider","value"],"mappings":"6pBAoHA,SAAAA,kBAEA,uBA5FOC,IAAA,IAAAC,SAAAA,EAAAC,QAAAA,EAAAC,UAAAA,EAAAC,eAAAA,EAAAC,OAAAA,EAAAC,sBAAAA,EAAAC,KAAAA,EAAAC,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,GAAAV,EAYH,MAAAW,EAAAC,cAAAb,GACAc,EAAAC,EAAAA,QAIAC,EAAAC,SAAAb,GACAc,EAAAD,SAAAZ,oCAEIW,EAAAG,QAAAf,EACAc,EAAAC,QAAAd,aAIJe,EAAAC,EAAAA,QAAA,+CAOQhB,eAAAiB,IACIV,EAAAW,IAAAD,GAAA,6BAGI,IAAAE,EAAiB,eAKzBC,SAAAH,IACIV,EAAAW,IAAAD,GAAA,GACA,KACIV,EAAAc,OAAAJ,IAGIJ,EAAAA,UAAAA,EAAAA,MAAAA,EAAAC,yBAoCpB,OAzBAZ,GAAAoB,IACIP,EAAA,IAAAA,mBAIAR,EAAAgB,QAAA,CAAAC,EAAAC,IAAAlB,EAAAW,IAAAO,GAAA,KACJ,CAAA1B,IAMA2B,EAAAC,UAAA,MACI5B,eAGIC,KACR,CAAAD,IAEAF,EAAA+B,EAAAC,QAAAD,IAAAE,WAAA,CAAAC,IAAA,cAAA5B,EAAAJ,UAAAA,EAAAK,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAT,SAAAA,IAMA+B,EAAAC,QAAAD,IAAAI,EAAAA,gBAAAC,SAAA,CAAAC,MAAAnB,EAAAlB,SAAAA"}
1
+ {"version":3,"file":"PresenceChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":["newChildrenMap","PresenceChild","children","initial","isPresent","onExitComplete","custom","presenceAffectsLayout","mode","anchorX","anchorY","root","presenceChildren","useConstant","id","useId","isPresentRef","useRef","onExitCompleteRef","current","context","useMemo","childId","set","isComplete","register","delete","isReusedContext","forEach","_","key","React","useEffect","jsx","exports","PopChild","pop","PresenceContext","Provider","value"],"mappings":"6pBAoHA,SAAAA,kBAEA,uBA5FOC,EAAAC,WAAAC,UAAAC,YAAAC,iBAAAC,SAAAC,wBAAAC,OAAAC,UAAAC,UAAAC,WAYH,MAAAC,EAAAC,cAAAb,GACAc,EAAAC,EAAAA,QAIAC,EAAAC,SAAAb,GACAc,EAAAD,SAAAZ,oCAEIW,EAAAG,QAAAf,EACAc,EAAAC,QAAAd,aAIJe,EAAAC,EAAAA,QAAA,+CAOQhB,eAAAiB,IACIV,EAAAW,IAAAD,GAAA,6BAGI,IAAAE,EAAiB,eAKzBC,SAAAH,IACIV,EAAAW,IAAAD,GAAA,GACA,KACIV,EAAAc,OAAAJ,IAGIJ,EAAAA,UAAAA,EAAAA,MAAAA,EAAAC,yBAoCpB,OAzBAZ,GAAAoB,IACIP,EAAA,IAAAA,mBAIAR,EAAAgB,QAAA,CAAAC,EAAAC,IAAAlB,EAAAW,IAAAO,GAAA,KACJ,CAAA1B,IAMA2B,EAAAC,UAAA,MACI5B,eAGIC,KACR,CAAAD,IAEAF,EAAA+B,EAAAC,QAAAD,IAAAE,WAAA,CAAAC,IAAA,cAAA5B,EAAAJ,UAAAA,EAAAK,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAT,SAAAA,IAMA+B,EAAAC,QAAAD,IAAAI,EAAAA,gBAAAC,SAAA,CAAAC,MAAAnB,EAAAlB,SAAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/LayoutGroupContext.mjs.js"),r=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),n=require("./PresenceChild.mjs.js"),o=require("./use-presence.mjs.js"),i=require("./utils.mjs.js"),u=require("../../../../../../_virtual/jsx-runtime.js");exports.AnimatePresence=c=>{let{children:l,custom:a,initial:d=!0,onExitComplete:h,presenceAffectsLayout:m=!0,mode:p="sync",propagate:f=!1,anchorX:j="left",anchorY:x="top",root:g}=c;const[y,C]=o.usePresence(f),q=e.useMemo(()=>i.onlyElements(l),[l]),v=f&&!y?[]:q.map(i.getChildKey),w=e.useRef(!0),E=e.useRef(q),P=r.useConstant(()=>new Map),L=e.useRef(new Set),[A,K]=e.useState(q),[R,_]=e.useState(q);s.useIsomorphicLayoutEffect(()=>{w.current=!1,E.current=q;for(let e=0;e<R.length;e++){const t=i.getChildKey(R[e]);v.includes(t)?(P.delete(t),L.current.delete(t)):!0!==P.get(t)&&P.set(t,!1)}},[R,v.length,v.join("-")]);const b=[];if(q!==A){let e=[...q];for(let t=0;t<R.length;t++){const r=R[t],s=i.getChildKey(r);v.includes(s)||(e.splice(t,0,r),b.push(r))}return"wait"===p&&b.length&&(e=b),_(i.onlyElements(e)),K(q),null}"production"!==process.env.NODE_ENV&&"wait"===p&&R.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:M}=e.useContext(t.LayoutGroupContext);return u.exports.jsx(u.exports.Fragment,{children:R.map(e=>{const t=i.getChildKey(e),r=!(f&&!y)&&(q===R||v.includes(t));return u.exports.jsx(n.PresenceChild,{isPresent:r,initial:!(w.current&&!d)&&void 0,custom:a,presenceAffectsLayout:m,mode:p,root:g,onExitComplete:r?void 0:()=>{if(L.current.has(t))return;if(!P.has(t))return;L.current.add(t),P.set(t,!0);let e=!0;P.forEach(t=>{t||(e=!1)}),e&&(M?.(),_(E.current),f&&C?.(),h&&h())},anchorX:j,anchorY:x,children:e},t)})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/LayoutGroupContext.mjs.js"),r=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),n=require("./PresenceChild.mjs.js"),o=require("./use-presence.mjs.js"),i=require("./utils.mjs.js"),u=require("../../../../../../_virtual/jsx-runtime.js");exports.AnimatePresence=({children:c,custom:l,initial:a=!0,onExitComplete:d,presenceAffectsLayout:h=!0,mode:m="sync",propagate:p=!1,anchorX:f="left",anchorY:j="top",root:x})=>{const[g,y]=o.usePresence(p),C=e.useMemo(()=>i.onlyElements(c),[c]),q=p&&!g?[]:C.map(i.getChildKey),v=e.useRef(!0),w=e.useRef(C),E=r.useConstant(()=>new Map),P=e.useRef(new Set),[L,A]=e.useState(C),[K,R]=e.useState(C);s.useIsomorphicLayoutEffect(()=>{v.current=!1,w.current=C;for(let e=0;e<K.length;e++){const t=i.getChildKey(K[e]);q.includes(t)?(E.delete(t),P.current.delete(t)):!0!==E.get(t)&&E.set(t,!1)}},[K,q.length,q.join("-")]);const _=[];if(C!==L){let e=[...C];for(let t=0;t<K.length;t++){const r=K[t],s=i.getChildKey(r);q.includes(s)||(e.splice(t,0,r),_.push(r))}return"wait"===m&&_.length&&(e=_),R(i.onlyElements(e)),A(C),null}"production"!==process.env.NODE_ENV&&"wait"===m&&K.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:b}=e.useContext(t.LayoutGroupContext);return u.exports.jsx(u.exports.Fragment,{children:K.map(e=>{const t=i.getChildKey(e),r=!(p&&!g)&&(C===K||q.includes(t));return u.exports.jsx(n.PresenceChild,{isPresent:r,initial:!(v.current&&!a)&&void 0,custom:l,presenceAffectsLayout:h,mode:m,root:x,onExitComplete:r?void 0:()=>{if(P.current.has(t))return;if(!E.has(t))return;P.current.add(t),E.set(t,!0);let e=!0;E.forEach(t=>{t||(e=!1)}),e&&(b?.(),R(w.current),p&&y?.(),d&&d())},anchorX:f,anchorY:j,children:e},t)})})};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n"],"names":["_ref","children","custom","initial","onExitComplete","presenceAffectsLayout","mode","propagate","anchorX","anchorY","root","presentChildren","useMemo","onlyElements","presentKeys","isParentPresent","map","getChildKey","isInitialRender","useRef","pendingPresentChildren","current","i","renderedChildren","length","exitComplete","delete","key","exitingComponents","set","join","diffedChildren","nextChildren","child","exitingChildren","push","setRenderedChildren","process","env","NODE_ENV","console","warn","isPresent","includes","jsx","PresenceChild","undefined","has","add","forEach","isExitComplete","safeToRemove"],"mappings":"odA6COA,IAAA,IAAAC,SAAAA,EAAAC,OAAAA,EAAAC,QAAAA,GAAA,EAAAC,eAAAA,EAAAC,sBAAAA,GAAA,EAAAC,KAAAA,EAAA,OAAAC,UAAAA,GAAA,EAAAC,QAAAA,EAAA,OAAAC,QAAAA,EAAA,MAAAC,KAAAA,GAAAV,8BAkBHW,EAAAC,EAAAA,QAAA,IAAAC,EAAAA,aAAAZ,IAAAA,IAMAa,EAAAP,IAAAQ,KAAAJ,EAAAK,IAAAC,EAAAA,aAMAC,EAAAC,UAAA,GAOAC,EAAAD,SAAAR,6HAoBIO,EAAAG,SAAA,EACAD,EAAAC,QAAAV,EAKA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,4CAQQG,EAAAC,OAAAC,GACAC,EAAAP,QAAAK,OAAAC,mBAJIF,EAAAI,IAAAF,GAAA,KAOhBJ,CAAAA,EAAAT,EAAAU,OAAAV,EAAAgB,KAAA,kBAIA,GAAAnB,IAAAoB,EAAA,CACI,IAAAC,MAAArB,GAMA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,CACI,MAAAW,EAAAV,EAAAD,GACAK,EAAAV,cAAAgB,mCAIIC,EAAAC,KAAAF,IAmBR,kCAPAG,EAAAvB,EAAAA,aAAAmB,SAOA,oBAGJK,QAAAC,IAAAC,UAEI,SAAAjC,GACAiB,EAAAC,OAAA,GAEAgB,QAAAC,KAAA,sQAeQ,MAAAd,EAAAV,cAAAgB,GAEAS,IAAAnC,IAAAQ,YAIUD,EAAA6B,SAAAhB,IA6BV,OAAAiB,EAAAA,QAAAA,IAAAC,EAAAA,cAAA,CAAAH,UAAAA,EAAAvC,UAAAe,EAAAG,UAAAlB,SAMgB2C,yGA5BZ,IAAArB,EAAAsB,IAAApB,UACIC,EAAAP,QAAA2B,IAAArB,GACAF,EAAAI,IAAAF,GAAA,YAMJF,EAAAwB,QAAAC,IACIA,sBAKAd,EAAAhB,EAAAC,SAEAd,GAAA4C"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n"],"names":["AnimatePresence","children","custom","initial","onExitComplete","presenceAffectsLayout","mode","propagate","anchorX","anchorY","root","presentChildren","useMemo","onlyElements","presentKeys","isParentPresent","map","getChildKey","isInitialRender","useRef","pendingPresentChildren","current","i","renderedChildren","length","exitComplete","delete","key","exitingComponents","set","join","diffedChildren","nextChildren","child","exitingChildren","push","setRenderedChildren","process","env","NODE_ENV","console","warn","isPresent","includes","jsx","PresenceChild","undefined","has","add","forEach","isExitComplete","safeToRemove"],"mappings":"odA6COA,EAAAC,WAAAC,SAAAC,WAAA,EAAAC,iBAAAC,yBAAA,EAAAC,OAAA,OAAAC,aAAA,EAAAC,UAAA,OAAAC,UAAA,MAAAC,uCAkBHC,EAAAC,EAAAA,QAAA,IAAAC,EAAAA,aAAAZ,IAAAA,IAMAa,EAAAP,IAAAQ,KAAAJ,EAAAK,IAAAC,EAAAA,aAMAC,EAAAC,UAAA,GAOAC,EAAAD,SAAAR,6HAoBIO,EAAAG,SAAA,EACAD,EAAAC,QAAAV,EAKA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,4CAQQG,EAAAC,OAAAC,GACAC,EAAAP,QAAAK,OAAAC,mBAJIF,EAAAI,IAAAF,GAAA,KAOhBJ,CAAAA,EAAAT,EAAAU,OAAAV,EAAAgB,KAAA,kBAIA,GAAAnB,IAAAoB,EAAA,CACI,IAAAC,MAAArB,GAMA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,CACI,MAAAW,EAAAV,EAAAD,GACAK,EAAAV,cAAAgB,mCAIIC,EAAAC,KAAAF,IAmBR,kCAPAG,EAAAvB,EAAAA,aAAAmB,SAOA,oBAGJK,QAAAC,IAAAC,UAEI,SAAAjC,GACAiB,EAAAC,OAAA,GAEAgB,QAAAC,KAAA,sQAeQ,MAAAd,EAAAV,cAAAgB,GAEAS,IAAAnC,IAAAQ,YAIUD,EAAA6B,SAAAhB,IA6BV,OAAAiB,EAAAA,QAAAA,IAAAC,EAAAA,cAAA,CAAAH,UAAAA,EAAAvC,UAAAe,EAAAG,UAAAlB,SAMgB2C,yGA5BZ,IAAArB,EAAAsB,IAAApB,UACIC,EAAAP,QAAA2B,IAAArB,GACAF,EAAAI,IAAAF,GAAA,YAMJF,EAAAwB,QAAAC,IACIA,sBAKAd,EAAAhB,EAAAC,SAEAd,GAAA4C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../context/PresenceContext.mjs.js");exports.usePresence=function(){let r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=e.useContext(t.PresenceContext);if(null===n)return[!0,null];const{isPresent:s,onExitComplete:u,register:o}=n,c=e.useId();e.useEffect(()=>{if(r)return o(c)},[r]);const i=e.useCallback(()=>r&&u&&u(c),[c,u,r]);return!s&&u?[!1,i]:[!0]};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../context/PresenceContext.mjs.js");exports.usePresence=function(r=!0){const s=e.useContext(t.PresenceContext);if(null===s)return[!0,null];const{isPresent:n,onExitComplete:u,register:o}=s,c=e.useId();e.useEffect(()=>{if(r)return o(c)},[r]);const i=e.useCallback(()=>r&&u&&u(c),[c,u,r]);return!n&&u?[!1,i]:[!0]};
2
2
  //# sourceMappingURL=use-presence.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-presence.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs"],"sourcesContent":["\"use client\";\nimport { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n//# sourceMappingURL=use-presence.mjs.map\n"],"names":["subscribe","arguments","length","undefined","context","useContext","PresenceContext","id","useId","register","isPresent","onExitComplete","safeToRemove"],"mappings":"iKAuCM,WAAA,IAAAA,IAAAC,UAAAC,eAAAC,IAAAF,UAAA,KAAAA,UAAA,GAGF,MAAAG,EAAAC,aAAAC,EAAAA,iBAEsB,GAAA,OAAAF,EAAA,MAAA,EAAA,EAAA,uDAOtBG,EAAAC,EAAAA,8BAGQ,OAAAC,EAAAF,IAER,CAAAP,kDAOA,OAAAU,GAAAC,EAAA,EAAA,EAAAC,GAAA,EAAA,EACJ"}
1
+ {"version":3,"file":"use-presence.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs"],"sourcesContent":["\"use client\";\nimport { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n//# sourceMappingURL=use-presence.mjs.map\n"],"names":["subscribe","context","useContext","PresenceContext","id","useId","register","isPresent","onExitComplete","safeToRemove"],"mappings":"iKAuCM,SAAAA,GAAA,GAGF,MAAAC,EAAAC,aAAAC,EAAAA,iBAEsB,GAAA,OAAAF,EAAA,MAAA,EAAA,EAAA,uDAOtBG,EAAAC,EAAAA,8BAGQ,OAAAC,EAAAF,IAER,CAAAJ,kDAOA,OAAAO,GAAAC,EAAA,EAAA,EAAAC,GAAA,EAAA,EACJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),s=require("../../events/event-info.mjs.js"),e=require("../../utils/get-context-window.mjs.js"),i=require("../../utils/is-ref-object.mjs.js"),n=require("../pan/PanSession.mjs.js"),o=require("./utils/constraints.mjs.js"),r=require("../../../../../motion-dom/dist/es/projection/geometry/models.mjs.js"),a=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),l=require("../../../../../motion-dom/dist/es/projection/utils/each-axis.mjs.js"),c=require("../../../../../motion-utils/dist/es/errors.mjs.js"),u=require("../../../../../motion-dom/dist/es/projection/utils/measure.mjs.js"),h=require("../../../../../motion-dom/dist/es/projection/geometry/conversion.mjs.js"),m=require("../../../../../motion-dom/dist/es/value/will-change/add-will-change.mjs.js"),g=require("../../../../../motion-dom/dist/es/animation/interfaces/motion-value.mjs.js"),d=require("../../../../../motion-dom/dist/es/events/add-dom-event.mjs.js"),p=require("../../../../../motion-dom/dist/es/gestures/drag/state/set-active.mjs.js"),v=require("../../../../../motion-dom/dist/es/value/types/numbers/units.mjs.js"),j=require("../../../../../motion-dom/dist/es/projection/geometry/delta-calc.mjs.js"),f=require("../../../../../motion-dom/dist/es/utils/mix/number.mjs.js"),x=require("../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js"),E=require("../../../../../motion-dom/dist/es/resize/index.mjs.js");const P=new WeakMap;function D(t){let s=!0;return()=>{s?s=!1:t()}}function A(t,s,e){return!(!0!==s&&s!==t||null!==e&&e!==t)}exports.VisualElementDragControls=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r.createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t){let{snapToCursor:i=!1,distanceThreshold:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:c}=this.getProps();this.panSession=new n.PanSession(t,{onSessionStart:t=>{i&&this.snapToCursor(s.extractEventInfo(t).point),this.stopAnimation()},onStart:(t,s)=>{const{drag:e,dragPropagation:i,onDragStart:n}=this.getProps();if(e&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p.setDragLock(e),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=s,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),l.eachAxis(t=>{let s=this.getAxisMotionValue(t).get()||0;if(v.percent.test(s)){const{projection:e}=this.visualElement;if(e&&e.layout){const i=e.layout.layoutBox[t];if(i){s=j.calcLength(i)*(parseFloat(s)/100)}}}this.originPoint[t]=s}),n&&a.frame.update(()=>n(t,s),!1,!0),m.addValueToWillChange(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s;const{dragPropagation:e,dragDirectionLock:i,onDirectionLock:n,onDrag:o}=this.getProps();if(!e&&!this.openDragLock)return;const{offset:r}=s;if(i&&null===this.currentDirection)return this.currentDirection=function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,e=null;Math.abs(t.y)>s?e="y":Math.abs(t.x)>s&&(e="x");return e}(r),void(null!==this.currentDirection&&n&&n(this.currentDirection));this.updateAxis("x",s.point,r),this.updateAxis("y",s.point,r),this.visualElement.render(),o&&a.frame.update(()=>o(t,s),!1,!0)},onSessionEnd:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s,this.stop(t,s),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:e.getContextWindow(this.visualElement),element:this.visualElement.current})}stop(t,s){const e=t||this.latestPointerEvent,i=s||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!i||!e)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&a.frame.postRender(()=>r(e,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:e}=this.getProps();!e&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,e){const{drag:i}=this.getProps();if(!e||!A(t,i,this.currentDirection))return;const n=this.getAxisMotionValue(t);let r=this.originPoint[t]+e[t];this.constraints&&this.constraints[t]&&(r=o.applyConstraints(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),e=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&i.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!e)&&o.calcRelativeConstraints(e.layoutBox,t),this.elastic=o.resolveDragElastic(s),n!==this.constraints&&!i.isRefObject(t)&&e&&this.constraints&&!this.hasMutatedConstraints&&l.eachAxis(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=o.rebaseAxisConstraints(e.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!i.isRefObject(t))return!1;const e=t.current;c.invariant(null!==e,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());const r=u.measurePageBox(e,n.root,this.visualElement.getTransformPagePoint());let a=o.calcViewportConstraints(n.layout.layoutBox,r);if(s){const t=s(h.convertBoxToBoundingBox(a));this.hasMutatedConstraints=!!t,t&&(a=h.convertBoundingBoxToBox(t))}return a}startAnimation(t){const{drag:s,dragMomentum:e,dragElastic:i,dragTransition:n,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=l.eachAxis(r=>{if(!A(r,s,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:e?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,s){const e=this.getAxisMotionValue(t);return m.addValueToWillChange(this.visualElement,t),e.start(g.animateMotionValue(t,e,0,s,this.visualElement,!1))}stopAnimation(){l.eachAxis(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,e=this.visualElement.getProps()[s];return e||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){l.eachAxis(s=>{const{drag:e}=this.getProps();if(!A(s,e,this.currentDirection))return;const{projection:i}=this.visualElement,n=this.getAxisMotionValue(s);if(i&&i.layout){const{min:e,max:o}=i.layout.layoutBox[s],r=n.get()||0;n.set(t[s]-f.mixNumber(e,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:e}=this.visualElement;if(!i.isRefObject(s)||!e||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};l.eachAxis(t=>{const s=this.getAxisMotionValue(t);if(s&&!1!==this.constraints){const e=s.get();n[t]=o.calcOrigin({min:e,max:e},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",e.root&&e.root.updateScroll(),e.updateLayout(),this.constraints=!1,this.resolveConstraints(),l.eachAxis(s=>{if(!A(s,t,null))return;const e=this.getAxisMotionValue(s),{min:i,max:o}=this.constraints[s];e.set(f.mixNumber(i,o,n[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;P.set(this.visualElement,this);const s=this.visualElement.current,e=t.addPointerEvent(s,"pointerdown",t=>{const{drag:e,dragListener:i=!0}=this.getProps(),n=t.target,o=n!==s&&x.isElementTextInput(n);e&&i&&!o&&this.start(t)});let n;const o=()=>{const{dragConstraints:t}=this.getProps();i.isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,s,e){const i=E.resize(t,D(e)),n=E.resize(s,D(e));return()=>{i(),n()}}(s,t.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,c=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),a.frame.read(o);const u=d.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),h=r.addEventListener("didUpdate",t=>{let{delta:s,hasLayoutChanged:e}=t;this.isDragging&&e&&(l.eachAxis(t=>{const e=this.getAxisMotionValue(t);e&&(this.originPoint[t]+=s[t].translate,e.set(e.get()+s[t].translate))}),this.visualElement.render())});return()=>{u(),e(),c(),h&&h(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:e=!1,dragPropagation:i=!1,dragConstraints:n=!1,dragElastic:r=o.defaultElastic,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:e,dragPropagation:i,dragConstraints:n,dragElastic:r,dragMomentum:a}}},exports.elementDragControls=P;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),s=require("../../events/event-info.mjs.js"),e=require("../../utils/get-context-window.mjs.js"),i=require("../../utils/is-ref-object.mjs.js"),n=require("../pan/PanSession.mjs.js"),o=require("./utils/constraints.mjs.js"),r=require("../../../../../motion-dom/dist/es/projection/geometry/models.mjs.js"),a=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),l=require("../../../../../motion-dom/dist/es/projection/utils/each-axis.mjs.js"),c=require("../../../../../motion-utils/dist/es/errors.mjs.js"),u=require("../../../../../motion-dom/dist/es/projection/utils/measure.mjs.js"),h=require("../../../../../motion-dom/dist/es/projection/geometry/conversion.mjs.js"),m=require("../../../../../motion-dom/dist/es/value/will-change/add-will-change.mjs.js"),g=require("../../../../../motion-dom/dist/es/animation/interfaces/motion-value.mjs.js"),d=require("../../../../../motion-dom/dist/es/events/add-dom-event.mjs.js"),p=require("../../../../../motion-dom/dist/es/gestures/drag/state/set-active.mjs.js"),v=require("../../../../../motion-dom/dist/es/value/types/numbers/units.mjs.js"),j=require("../../../../../motion-dom/dist/es/projection/geometry/delta-calc.mjs.js"),f=require("../../../../../motion-dom/dist/es/utils/mix/number.mjs.js"),x=require("../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js"),E=require("../../../../../motion-dom/dist/es/resize/index.mjs.js");const P=new WeakMap;function D(t){let s=!0;return()=>{s?s=!1:t()}}function A(t,s,e){return!(!0!==s&&s!==t||null!==e&&e!==t)}exports.VisualElementDragControls=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r.createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:o}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:c}=this.getProps();this.panSession=new n.PanSession(t,{onSessionStart:t=>{i&&this.snapToCursor(s.extractEventInfo(t).point),this.stopAnimation()},onStart:(t,s)=>{const{drag:e,dragPropagation:i,onDragStart:n}=this.getProps();if(e&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p.setDragLock(e),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=s,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),l.eachAxis(t=>{let s=this.getAxisMotionValue(t).get()||0;if(v.percent.test(s)){const{projection:e}=this.visualElement;if(e&&e.layout){const i=e.layout.layoutBox[t];if(i){s=j.calcLength(i)*(parseFloat(s)/100)}}}this.originPoint[t]=s}),n&&a.frame.update(()=>n(t,s),!1,!0),m.addValueToWillChange(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s;const{dragPropagation:e,dragDirectionLock:i,onDirectionLock:n,onDrag:o}=this.getProps();if(!e&&!this.openDragLock)return;const{offset:r}=s;if(i&&null===this.currentDirection)return this.currentDirection=function(t,s=10){let e=null;Math.abs(t.y)>s?e="y":Math.abs(t.x)>s&&(e="x");return e}(r),void(null!==this.currentDirection&&n&&n(this.currentDirection));this.updateAxis("x",s.point,r),this.updateAxis("y",s.point,r),this.visualElement.render(),o&&a.frame.update(()=>o(t,s),!1,!0)},onSessionEnd:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s,this.stop(t,s),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:e.getContextWindow(this.visualElement),element:this.visualElement.current})}stop(t,s){const e=t||this.latestPointerEvent,i=s||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!i||!e)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&a.frame.postRender(()=>r(e,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:e}=this.getProps();!e&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,e){const{drag:i}=this.getProps();if(!e||!A(t,i,this.currentDirection))return;const n=this.getAxisMotionValue(t);let r=this.originPoint[t]+e[t];this.constraints&&this.constraints[t]&&(r=o.applyConstraints(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),e=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&i.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!e)&&o.calcRelativeConstraints(e.layoutBox,t),this.elastic=o.resolveDragElastic(s),n!==this.constraints&&!i.isRefObject(t)&&e&&this.constraints&&!this.hasMutatedConstraints&&l.eachAxis(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=o.rebaseAxisConstraints(e.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!i.isRefObject(t))return!1;const e=t.current;c.invariant(null!==e,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());const r=u.measurePageBox(e,n.root,this.visualElement.getTransformPagePoint());let a=o.calcViewportConstraints(n.layout.layoutBox,r);if(s){const t=s(h.convertBoxToBoundingBox(a));this.hasMutatedConstraints=!!t,t&&(a=h.convertBoundingBoxToBox(t))}return a}startAnimation(t){const{drag:s,dragMomentum:e,dragElastic:i,dragTransition:n,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=l.eachAxis(r=>{if(!A(r,s,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:e?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,s){const e=this.getAxisMotionValue(t);return m.addValueToWillChange(this.visualElement,t),e.start(g.animateMotionValue(t,e,0,s,this.visualElement,!1))}stopAnimation(){l.eachAxis(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,e=this.visualElement.getProps()[s];return e||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){l.eachAxis(s=>{const{drag:e}=this.getProps();if(!A(s,e,this.currentDirection))return;const{projection:i}=this.visualElement,n=this.getAxisMotionValue(s);if(i&&i.layout){const{min:e,max:o}=i.layout.layoutBox[s],r=n.get()||0;n.set(t[s]-f.mixNumber(e,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:e}=this.visualElement;if(!i.isRefObject(s)||!e||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};l.eachAxis(t=>{const s=this.getAxisMotionValue(t);if(s&&!1!==this.constraints){const e=s.get();n[t]=o.calcOrigin({min:e,max:e},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",e.root&&e.root.updateScroll(),e.updateLayout(),this.constraints=!1,this.resolveConstraints(),l.eachAxis(s=>{if(!A(s,t,null))return;const e=this.getAxisMotionValue(s),{min:i,max:o}=this.constraints[s];e.set(f.mixNumber(i,o,n[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;P.set(this.visualElement,this);const s=this.visualElement.current,e=t.addPointerEvent(s,"pointerdown",t=>{const{drag:e,dragListener:i=!0}=this.getProps(),n=t.target,o=n!==s&&x.isElementTextInput(n);e&&i&&!o&&this.start(t)});let n;const o=()=>{const{dragConstraints:t}=this.getProps();i.isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,s,e){const i=E.resize(t,D(e)),n=E.resize(s,D(e));return()=>{i(),n()}}(s,t.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,c=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),a.frame.read(o);const u=d.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),h=r.addEventListener("didUpdate",({delta:t,hasLayoutChanged:s})=>{this.isDragging&&s&&(l.eachAxis(s=>{const e=this.getAxisMotionValue(s);e&&(this.originPoint[s]+=t[s].translate,e.set(e.get()+t[s].translate))}),this.visualElement.render())});return()=>{u(),e(),c(),h&&h(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:e=!1,dragPropagation:i=!1,dragConstraints:n=!1,dragElastic:r=o.defaultElastic,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:e,dragPropagation:i,dragConstraints:n,dragElastic:r,dragMomentum:a}}},exports.elementDragControls=P;
2
2
  //# sourceMappingURL=VisualElementDragControls.mjs.js.map