{"version":3,"sources":["jsdelivr-header.js","/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","/node_modules/framer-motion/dist/es/utils/use-constant.mjs","/node_modules/framer-motion/dist/es/utils/is-browser.mjs","/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","/node_modules/framer-motion/dist/es/context/PresenceContext.mjs","/node_modules/motion-utils/dist/es/array.mjs","/node_modules/motion-utils/dist/es/clamp.mjs","/node_modules/motion-utils/dist/es/errors.mjs","/node_modules/motion-utils/dist/es/global-config.mjs","/node_modules/motion-utils/dist/es/is-numerical-string.mjs","/node_modules/motion-utils/dist/es/is-object.mjs","/node_modules/motion-utils/dist/es/is-zero-value-string.mjs","/node_modules/motion-utils/dist/es/memo.mjs","/node_modules/motion-utils/dist/es/noop.mjs","/node_modules/motion-utils/dist/es/pipe.mjs","/node_modules/motion-utils/dist/es/progress.mjs","/node_modules/motion-utils/dist/es/subscription-manager.mjs","/node_modules/motion-utils/dist/es/time-conversion.mjs","/node_modules/motion-utils/dist/es/velocity-per-second.mjs","/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs","/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs","/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs","/node_modules/motion-utils/dist/es/easing/back.mjs","/node_modules/motion-utils/dist/es/easing/anticipate.mjs","/node_modules/motion-utils/dist/es/easing/circ.mjs","/node_modules/motion-utils/dist/es/easing/ease.mjs","/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs","/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","/node_modules/motion-utils/dist/es/easing/utils/map.mjs","/node_modules/motion-dom/dist/es/frameloop/order.mjs","/node_modules/motion-dom/dist/es/stats/buffer.mjs","/node_modules/motion-utils/dist/es/index.mjs","/node_modules/motion-dom/dist/es/frameloop/render-step.mjs","/node_modules/motion-dom/dist/es/frameloop/batcher.mjs","/node_modules/motion-dom/dist/es/frameloop/frame.mjs","/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs","/node_modules/motion-dom/dist/es/stats/animation-count.mjs","/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs","/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs","/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs","/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs","/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs","/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","/node_modules/motion-dom/dist/es/value/types/color/utils.mjs","/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs","/node_modules/motion-dom/dist/es/value/types/color/hex.mjs","/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs","/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs","/node_modules/motion-dom/dist/es/value/types/color/index.mjs","/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs","/node_modules/motion-dom/dist/es/value/types/complex/index.mjs","/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs","/node_modules/motion-dom/dist/es/utils/mix/number.mjs","/node_modules/motion-dom/dist/es/utils/mix/color.mjs","/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs","/node_modules/motion-dom/dist/es/utils/mix/complex.mjs","/node_modules/motion-dom/dist/es/utils/mix/index.mjs","/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs","/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs","/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs","/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs","/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs","/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs","/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs","/node_modules/motion-dom/dist/es/utils/interpolate.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs","/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs","/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs","/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs","/node_modules/motion-dom/dist/es/render/dom/style-set.mjs","/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","/node_modules/motion-dom/dist/es/utils/supports/flags.mjs","/node_modules/motion-dom/dist/es/utils/supports/memo.mjs","/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs","/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs","/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs","/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs","/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs","/node_modules/motion-dom/dist/es/utils/is-html-element.mjs","/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs","/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs","/node_modules/motion-dom/dist/es/value/types/auto.mjs","/node_modules/motion-dom/dist/es/value/types/test.mjs","/node_modules/motion-dom/dist/es/value/types/dimensions.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs","/node_modules/motion-dom/dist/es/value/types/int.mjs","/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs","/node_modules/motion-dom/dist/es/value/types/maps/number.mjs","/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs","/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","/node_modules/motion-dom/dist/es/value/index.mjs","/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs","/node_modules/motion-dom/dist/es/frameloop/microtask.mjs","/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs","/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs","/node_modules/motion-dom/dist/es/gestures/hover.mjs","/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs","/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs","/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs","/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs","/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs","/node_modules/motion-dom/dist/es/gestures/press/index.mjs","/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs","/node_modules/motion-dom/dist/es/value/types/utils/find.mjs","/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","/node_modules/motion-dom/dist/es/index.mjs","/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs","/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","/node_modules/framer-motion/dist/es/context/LazyContext.mjs","/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","/node_modules/framer-motion/dist/es/motion/features/load-features.mjs","/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs","/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs","/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","/node_modules/framer-motion/dist/es/motion/index.mjs","/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","/node_modules/framer-motion/dist/es/render/html/use-props.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","/node_modules/framer-motion/dist/es/render/components/create-factory.mjs","/node_modules/framer-motion/dist/es/render/components/m/create.mjs","/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs","/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","/node_modules/framer-motion/dist/es/render/utils/setters.mjs","/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs","/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs","/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs","/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs","/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","/node_modules/framer-motion/dist/es/motion/features/Feature.mjs","/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","/node_modules/framer-motion/dist/es/motion/features/animations.mjs","/node_modules/framer-motion/dist/es/events/add-dom-event.mjs","/node_modules/framer-motion/dist/es/events/event-info.mjs","/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","/node_modules/framer-motion/dist/es/gestures/hover.mjs","/node_modules/framer-motion/dist/es/gestures/focus.mjs","/node_modules/framer-motion/dist/es/gestures/press.mjs","/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","/node_modules/framer-motion/dist/es/render/store.mjs","/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","/node_modules/framer-motion/dist/es/render/VisualElement.mjs","/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs","/node_modules/framer-motion/dist/es/index.mjs","/node_modules/@heroui/dom-animation/dist/index.mjs","/node_modules/lodash/isObject.js","/node_modules/lodash/_freeGlobal.js","/node_modules/lodash/_root.js","/node_modules/lodash/now.js","/node_modules/lodash/_trimmedEndIndex.js","/node_modules/lodash/_baseTrim.js","/node_modules/lodash/_Symbol.js","/node_modules/lodash/_getRawTag.js","/node_modules/lodash/_objectToString.js","/node_modules/lodash/_baseGetTag.js","/node_modules/lodash/isObjectLike.js","/node_modules/lodash/isSymbol.js","/node_modules/lodash/toNumber.js","/node_modules/lodash/debounce.js","/npm/@openassistant/echarts@1.0.0-alpha.0/src/index.ts","/node_modules/@heroui/react-utils/dist/chunk-3XT5V4LF.mjs","/node_modules/@heroui/react-utils/dist/chunk-OEE6MISH.mjs","/node_modules/@heroui/shared-utils/dist/index.mjs","/node_modules/@heroui/react-utils/dist/chunk-OTWYT2HS.mjs","/node_modules/@heroui/react-rsc-utils/dist/chunk-RFWDHYLZ.mjs","/node_modules/@heroui/react-rsc-utils/dist/chunk-RJKRL3AU.mjs","/node_modules/@heroui/system/dist/chunk-Q3W45BN5.mjs","/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/utils.ts","/node_modules/@react-aria/ssr/dist/packages/@react-aria/ssr/src/SSRProvider.tsx","/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/context.tsx","/node_modules/@internationalized/string/dist/packages/@internationalized/string/src/LocalizedStringDictionary.ts","/node_modules/@internationalized/string/dist/packages/@internationalized/string/src/LocalizedStringFormatter.ts","/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useLocalizedStringFormatter.ts","/node_modules/@swc/helpers/esm/_check_private_redeclaration.js","/node_modules/@swc/helpers/esm/_class_private_field_init.js","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useLayoutEffect.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useEffectEvent.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","/node_modules/@react-stately/flags/dist/packages/@react-stately/flags/src/index.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/ShadowTreeWalker.ts","/node_modules/clsx/dist/clsx.mjs","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/filterDOMProps.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/focusWithoutScrolling.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/platform.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/openLink.tsx","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/runAfterTransition.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useUpdateEffect.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useUpdateLayoutEffect.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useSyncRef.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isScrollable.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/getScrollParent.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/getScrollParents.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useDescription.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useEvent.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/scrollIntoView.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isVirtualEvent.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useFormReset.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/constants.ts","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/keyboard.tsx","/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isFocusable.ts","/node_modules/@react-stately/utils/dist/packages/@react-stately/utils/src/useControlledState.ts","/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useCollator.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/utils.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/textSelection.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/context.ts","/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js","/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js","/node_modules/@swc/helpers/esm/_class_private_field_get.js","/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js","/node_modules/@swc/helpers/esm/_class_private_field_set.js","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/usePress.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/focusSafely.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/createEventHandler.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useKeyboard.ts","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useFocusable.tsx","/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useLongPress.ts","/node_modules/@heroui/system-rsc/dist/chunk-YFAKJTDR.mjs","/node_modules/@heroui/theme/dist/chunk-GQT3YUX3.mjs","/node_modules/@heroui/theme/dist/chunk-GIXI35A3.mjs","/node_modules/tailwind-variants/dist/chunk-I2QGXAA3.js","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/class-group-utils.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/lru-cache.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/parse-class-name.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/config-utils.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/merge-classlist.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/tw-join.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/create-tailwind-merge.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/from-theme.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/validators.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/default-config.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/merge-configs.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/extend-tailwind-merge.ts","/node_modules/tailwind-variants/node_modules/tailwind-merge/src/lib/tw-merge.ts","/node_modules/tailwind-variants/dist/index.js","/node_modules/@heroui/theme/dist/chunk-UWE6H66T.mjs","/node_modules/@heroui/theme/dist/chunk-AKXXHKTO.mjs","/node_modules/@heroui/theme/dist/chunk-LXB7QLNC.mjs","/node_modules/@heroui/theme/dist/chunk-CNTMWM4F.mjs","/node_modules/@heroui/theme/dist/chunk-YXHEIVTO.mjs","/node_modules/@heroui/theme/dist/chunk-E257OVH3.mjs","/node_modules/@heroui/theme/dist/chunk-CNG7ZRCV.mjs","/node_modules/@heroui/theme/dist/chunk-UERLDXVP.mjs","/node_modules/@react-aria/focus/dist/packages/@react-aria/focus/src/useFocusRing.ts","/node_modules/@heroui/shared-icons/dist/chunk-7F3ZLNJ6.mjs","/node_modules/@react-stately/selection/dist/packages/@react-stately/selection/src/Selection.ts","/node_modules/@react-stately/selection/dist/packages/@react-stately/selection/src/useMultipleSelectionState.ts","/node_modules/@react-stately/collections/dist/packages/@react-stately/collections/src/CollectionBuilder.ts","/node_modules/@react-stately/collections/dist/packages/@react-stately/collections/src/useCollection.ts","/node_modules/@react-stately/collections/dist/packages/@react-stately/collections/src/getChildNodes.ts","/node_modules/@react-stately/selection/dist/packages/@react-stately/selection/src/SelectionManager.ts","/node_modules/@heroui/button/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/use-safe-layout-effect/dist/index.mjs","/node_modules/@heroui/button/dist/chunk-3SAWKTTV.mjs","/node_modules/@heroui/button/dist/chunk-AJAU6WEQ.mjs","/node_modules/@heroui/button/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/filterDOMProps.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useLayoutEffect.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useEffectEvent.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/focusWithoutScrolling.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/platform.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/runAfterTransition.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useSyncRef.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isVirtualEvent.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isFocusable.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/utils.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/textSelection.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/context.ts","/node_modules/@heroui/use-aria-button/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/usePress.ts","/node_modules/@heroui/use-aria-button/dist/index.mjs","/node_modules/@heroui/button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","/node_modules/@heroui/button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","/node_modules/@heroui/button/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","/node_modules/@heroui/button/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useHover.ts","/node_modules/@heroui/ripple/dist/chunk-QHRCZSEO.mjs","/node_modules/@heroui/ripple/dist/chunk-6VC6TS2O.mjs","/node_modules/@heroui/spinner/dist/chunk-IKKYW34A.mjs","/node_modules/@heroui/spinner/dist/chunk-MSDKUXDP.mjs","/node_modules/@heroui/button/dist/chunk-GT2IF6NJ.mjs","/node_modules/@heroui/checkbox/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/checkbox/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@react-stately/form/dist/packages/@react-stately/form/src/useFormValidationState.ts","/node_modules/@react-aria/toggle/dist/packages/@react-aria/toggle/src/useToggle.ts","/node_modules/@react-aria/checkbox/dist/packages/@react-aria/checkbox/src/utils.ts","/node_modules/@react-stately/toggle/dist/packages/@react-stately/toggle/src/useToggleState.ts","/node_modules/@heroui/form/dist/chunk-BSTJ7ZCN.mjs","/node_modules/@heroui/form/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/form/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@heroui/form/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeRefs.ts","/node_modules/@heroui/form/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useObjectRef.ts","/node_modules/@heroui/form/node_modules/@react-stately/form/dist/packages/@react-stately/form/src/useFormValidationState.ts","/node_modules/@heroui/form/dist/chunk-SLABUSGS.mjs","/node_modules/@heroui/checkbox/dist/chunk-LK575OWX.mjs","/node_modules/@heroui/checkbox/dist/chunk-FFVF7OUL.mjs","/node_modules/@heroui/checkbox/dist/chunk-B4HPXQQT.mjs","/node_modules/@heroui/checkbox/node_modules/@react-stately/toggle/dist/packages/@react-stately/toggle/src/useToggleState.ts","/node_modules/@heroui/use-callback-ref/dist/index.mjs","/node_modules/@heroui/checkbox/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","/node_modules/@heroui/checkbox/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","/node_modules/@heroui/checkbox/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","/node_modules/@heroui/checkbox/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useHover.ts","/node_modules/@heroui/checkbox/dist/chunk-MZRCPRP2.mjs","/node_modules/@react-aria/selection/dist/packages/@react-aria/selection/src/utils.ts","/node_modules/@react-aria/selection/dist/packages/@react-aria/selection/src/useTypeSelect.ts","/node_modules/@react-aria/selection/node_modules/@react-aria/focus/dist/packages/@react-aria/focus/src/isElementVisible.ts","/node_modules/@react-aria/selection/node_modules/@react-aria/focus/dist/packages/@react-aria/focus/src/virtualFocus.ts","/node_modules/@react-aria/selection/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/utils.ts","/node_modules/@react-aria/selection/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/context.tsx","/node_modules/@react-aria/selection/dist/packages/@react-aria/selection/src/useSelectableItem.ts","/node_modules/@react-aria/selection/dist/packages/@react-aria/selection/src/DOMLayoutDelegate.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/utils.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/ar-AE.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/bg-BG.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/cs-CZ.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/da-DK.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/de-DE.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/el-GR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/en-US.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/es-ES.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/et-EE.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/fi-FI.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/fr-FR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/he-IL.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/hr-HR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/hu-HU.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/it-IT.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/ja-JP.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/ko-KR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/lt-LT.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/lv-LV.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/nb-NO.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/nl-NL.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/pl-PL.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/pt-BR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/pt-PT.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/ro-RO.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/ru-RU.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/sk-SK.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/sl-SI.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/sr-SP.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/sv-SE.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/tr-TR.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/uk-UA.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/zh-CN.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/intl/zh-TW.json","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/*.js","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/GridKeyboardDelegate.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/utils.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/ar-AE.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/bg-BG.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/cs-CZ.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/da-DK.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/de-DE.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/el-GR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/en-US.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/es-ES.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/et-EE.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/fi-FI.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/fr-FR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/he-IL.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/hr-HR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/hu-HU.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/it-IT.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/ja-JP.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/ko-KR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/lt-LT.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/lv-LV.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/nb-NO.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/nl-NL.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/pl-PL.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/pt-BR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/pt-PT.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/ro-RO.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/ru-RU.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/sk-SK.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/sl-SI.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/sr-SP.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/sv-SE.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/tr-TR.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/uk-UA.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/zh-CN.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/intl/zh-TW.json","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/*.js","/node_modules/@react-aria/live-announcer/dist/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx","/node_modules/@react-aria/grid/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/utils.ts","/node_modules/@react-aria/grid/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/context.tsx","/node_modules/@react-aria/grid/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useLocalizedStringFormatter.ts","/node_modules/@react-aria/grid/node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useCollator.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/useGridSelectionAnnouncement.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/useHighlightSelectionDescription.ts","/node_modules/@react-aria/grid/node_modules/@react-aria/focus/dist/packages/@react-aria/focus/src/isElementVisible.ts","/node_modules/@react-aria/grid/node_modules/@react-aria/focus/dist/packages/@react-aria/focus/src/useHasTabbableChild.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/useGridRowGroup.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/useGridRow.ts","/node_modules/@react-aria/grid/dist/packages/@react-aria/grid/src/useGridSelectionCheckbox.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/TableKeyboardDelegate.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/useTable.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/useTableRow.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/useTableHeaderRow.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/useTableCell.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/useTableSelectionCheckbox.ts","/node_modules/@react-aria/table/dist/packages/@react-aria/table/src/index.ts","/node_modules/@heroui/table/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","/node_modules/@heroui/table/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","/node_modules/@heroui/table/dist/chunk-PRBPVC6X.mjs","/node_modules/@heroui/table/dist/chunk-6P56MRLR.mjs","/node_modules/@react-stately/grid/dist/packages/@react-stately/grid/src/useGridState.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/TableCollection.ts","/node_modules/@react-stately/grid/dist/packages/@react-stately/grid/src/GridCollection.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/TableHeader.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/TableBody.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/Column.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/Row.ts","/node_modules/@heroui/table/node_modules/@react-stately/table/dist/packages/@react-stately/table/src/Cell.ts","/node_modules/@heroui/table/dist/chunk-S6V3WGEL.mjs","/node_modules/@heroui/table/dist/chunk-UGS3DB5V.mjs","/node_modules/@heroui/table/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","/node_modules/@heroui/table/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","/node_modules/@heroui/table/node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","/node_modules/@heroui/table/node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useHover.ts","/node_modules/@heroui/table/dist/chunk-N22KOF64.mjs","/node_modules/@heroui/table/dist/chunk-RBALAGDS.mjs","/node_modules/@heroui/table/dist/chunk-PZT4K2LB.mjs","/node_modules/@heroui/table/dist/chunk-V2BF6S4T.mjs","/node_modules/@heroui/table/dist/chunk-DVOW65RZ.mjs","/node_modules/@heroui/table/dist/chunk-O5IH762T.mjs","/node_modules/@heroui/spacer/dist/chunk-CH7FQ62Q.mjs","/node_modules/@heroui/spacer/dist/chunk-BRFD4NXM.mjs","/node_modules/@heroui/spacer/dist/chunk-AWMMSYR4.mjs","/node_modules/@tanstack/virtual-core/src/utils.ts","/node_modules/@tanstack/virtual-core/src/index.ts","/node_modules/@heroui/table/dist/chunk-HDDKCVLI.mjs","/node_modules/@heroui/table/dist/chunk-LSJ2YEQL.mjs","/node_modules/@heroui/table/dist/chunk-TSPNSPCL.mjs","/node_modules/@heroui/table/dist/chunk-YRZGWF2W.mjs","/node_modules/@heroui/table/dist/chunk-CIL4Y7FA.mjs","/node_modules/@heroui/table/dist/chunk-FKPXBCGS.mjs","/node_modules/@heroui/table/dist/chunk-F3UDT23P.mjs","/npm/@openassistant/echarts@1.0.0-alpha.0/src/boxplot/box-plot.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/boxplot/boxplot-option.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/echarts-theme.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/echarts-updater.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/boxplot/box-plot-component.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/bubble-chart/bubble-chart.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/bubble-chart/bubble-chart-option.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/bubble-chart/bubble-chart-component.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/histogram/histogram-component.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/histogram/histogram-plot.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/histogram/histogram-option.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/pcp/pcp.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/pcp/pcp-option.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/pcp/pcp-component.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/scatterplot/scatter-option.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/scatterplot/scatter-plot-component.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/scatterplot/scatter-regression-plot.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/scatterplot/simple-scatter-plots.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/scatterplot/simple-chart-option.ts","/npm/@openassistant/echarts@1.0.0-alpha.0/src/moran-scatterplot/moran-scatter-plot.tsx","/npm/@openassistant/echarts@1.0.0-alpha.0/src/moran-scatterplot/moran-scatter-option.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,iBCLA,GAEM,G,8nBAHN,GAAA,GAAA,KACA,GAA8B,QAAA,SAExB,MAAqB,GAAA,eAAc,CAAC,EAAC,ICM3C,SAAS,GAAY,GACjB,IAAM,KAAM,GAAA,QAAO,MACnB,OAAoB,OAAhB,EAAI,UACJ,EAAI,QAAU,KAEX,EAAI,OACf,CAfA,IAAA,GCAM,GCAN,GAGM,GCFN,GAKM,GHNN,GAAA,GAAA,KAAA,GAAuB,QAAA,YCAvB,GAAA,GAAA,KAAM,UAAmB,OAAW,OCApC,GAAA,GAAA,KAAA,GAA2C,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,OAAO,KAAK,UAAU,EACxB,OACE,MAAO,EACT,CACF,CA2FA,SAAS,GAAM,EAAO,EAAK,GACzB,OAAO,KAAK,IAAI,KAAK,IAAI,EAAO,GAAM,EACxC,CAMA,IAAI,GAAe,CAAC,EACpB,SAAS,GAAK,EAAS,KAAc,GAEnC,IAAM,EAAM,YADA,EAAY,KAAK,KAAe,QACZ,WACrB,QAAY,KACnB,GAAa,KACjB,GAAa,IAAO,EAItB,CCxTA,SAAS,GAAU,EAAK,GACtB,GAAW,MAAP,EACJ,IAAI,GAAW,GAEb,YADA,EAAI,GAGN,IACE,EAAI,QAAU,CAChB,OACE,MAAM,IAAI,MAAM,wBAAwB,cAAkB,KAC5D,EACF,CACA,SAAS,MAAa,GACpB,OAAQ,IACN,EAAK,SAAS,GAAQ,GAAU,EAAK,IAAK,CAE9C,CCnBA,IAAI,GAA+B,IAAI,IAAI,CACzC,KACA,OACA,QACA,QACA,OACA,WACA,UACA,QACA,SACA,OACA,SACA,gBACA,YACA,SACA,kBACA,oBACA,MACA,QACA,eACA,YACA,WACA,cACA,cACA,YACA,UACA,UACA,OACA,QACA,YACA,OACA,UACA,UACA,UACA,kBACA,cACA,WACA,SACA,cACA,OACA,WACA,UACA,QACA,MACA,WACA,WACA,YACA,WACA,UACA,eACA,MACA,OACA,aACA,cACA,aACA,iBACA,aACA,cACA,UACA,SACA,OACA,OACA,WACA,YACA,OACA,YACA,QACA,SACA,WACA,UACA,YACA,WACA,OACA,QACA,OACA,OACA,OACA,WACA,MACA,YACA,QACA,aACA,SACA,MACA,YACA,WACA,QACA,OACA,aACA,OACA,UACA,UACA,OACA,cACA,SACA,UACA,aACA,iBACA,WACA,MACA,WACA,OACA,UACA,UACA,QACA,SACA,YACA,WACA,WACA,QACA,OACA,QACA,OACA,WACA,OACA,aACA,MACA,SACA,SACA,QACA,OACA,SACA,YACA,gBACA,SACA,QACA,QACA,SAEE,GAAgC,IAAI,IAAI,CAC1C,SACA,QACA,UACA,SACA,UACA,UACA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,CACL,QAAS,YAGb,CACE,QAAS,SACT,KAAM,KACN,MAAO,CACL,QAAS,YAGb,CACE,QAAS,SACT,KAAM,KACN,MAAO,CACL,QAAS,cAIb,CACE,QAAS,SACT,MAAO,UACP,MAAO,CACL,QAAS,iBAGb,CACE,QAAS,SACT,MAAO,QACP,MAAO,CACL,QAAS,eAGb,CACE,QAAS,SACT,MAAO,UACP,MAAO,CACL,QAAS,iBAGb,CACE,QAAS,SACT,MAAO,UACP,MAAO,CACL,QAAS,iBAGb,CACE,QAAS,SACT,MAAO,YACP,MAAO,CACL,QAAS,mBAGb,CACE,QAAS,SACT,MAAO,UACP,MAAO,CACL,QAAS,iBAGb,CACE,QAAS,SACT,MAAO,UACP,MAAO,CACL,QAAS,iBAGb,CACE,QAAS,SACT,MAAO,SACP,MAAO,CACL,QAAS,mBChSb,GAA0B,CAC5B,eACA,iCACA,sCACA,0CACA,8CAEE,GAA+B,CACjC,eACA,uCACA,yCACA,6CACA,gDACA,0DAiBE,GAAiC,CACnC,QAAS,CAAC,6EACV,QAAS,CAAC,6EACV,UAAW,CAAC,+EACZ,QAAS,CAAC,6EACV,QAAS,CAAC,6EACV,OAAQ,CAAC,6EAEP,GAAqB,CAEvB,eACA,cACA,iBAEA,MACA,MAEA,mBACA,aAEA,WACA,QACA,SACA,SAEA,mBACA,QAEA,iBAEA,2BC/DE,GAAQ,GAAG,CACb,MAAO,CACL,KAAM,+BACN,QAAS,CACP,MACA,MACA,OACA,WACA,WACA,kBACA,QACA,eACA,cACA,iBAEF,MAAO,oBACP,MAAO,0BACP,MAAO,cACP,GAAI,CAAC,WAAY,kBAAmB,IACpC,GAAI,CACF,WACA,OACA,OACA,aACA,eACA,iBACA,oBACA,sBACA,YACA,gBACA,qBACA,oBACA,eACA,sCACA,2CACG,IAEL,GAAI,CACF,OACA,OACA,WACA,eACA,oBACA,aACA,cACA,eACA,YACA,oBACG,GAEH,sBACA,kBACA,aACA,iBACA,mBACA,0CAEA,oDACA,oDAEF,MAA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B,EAAQ,EAAS,EAAM,YAAa,EAC3D,EACA,SAAU,WACR,GAAY,EACd,KAEF,CAAC,EAAO,EAAM,cAGhB,SACE,GAAA,KAAC,OAAI,UAAU,6CACb,UAAA,EAAA,GAAA,MAAC,OAAI,UAAU,+GACb,SAAA,IAAA,GAAA,MAAC,OAAI,UAAU,2BACb,SAAA,IAAA,GAAA,KAAC,KAAE,UAAU,gCAAiC,SAAA,EAAM,gBAAa,EACjE,GAAA,KAAC,SAAM,UAAU,4BACd,SAAA,EAAM,mBAEX,EACA,GAAA,KAAC,OAAI,MAAO,CAAE,OAAQ,QAAU,UAAU,iBACxC,UAAA,EAAA,GAAA,KAAC,GAAA,QAAA,CACC,OAAQ,EACR,UAAU,EACV,YAAY,EACZ,MAAO,CAAE,OAAQ,OAAQ,MAAO,QAChC,IAAK,EACL,MAAO,EAAM,OAAS,OACtB,SAAU,EACV,aAAc,KACZ,GAAY,EAAI,UAO9B,CAhJQ,GAAA,IAAI,CACV,GAAA,iBACA,GAAA,cACA,GAAA,aACA,GAAA,eACA,GAAA,eACA,GAAA,iBACA,GAAA","file":"/npm/@openassistant/echarts@1.0.0-alpha.0/dist/index.cjs.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@openassistant/echarts@1.0.0-alpha.0/dist/index.cjs.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n    const ref = useRef(null);\n    if (ref.current === null) {\n        ref.current = init();\n    }\n    return ref.current;\n}\n\nexport { useConstant };\n","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = \n/* @__PURE__ */ createContext(null);\n\nexport { PresenceContext };\n","function addUniqueItem(arr, item) {\n    if (arr.indexOf(item) === -1)\n        arr.push(item);\n}\nfunction removeItem(arr, item) {\n    const index = arr.indexOf(item);\n    if (index > -1)\n        arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n    const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n    if (startIndex >= 0 && startIndex < arr.length) {\n        const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n        const [item] = arr.splice(fromIndex, 1);\n        arr.splice(endIndex, 0, item);\n    }\n    return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","const clamp = (min, max, v) => {\n    if (v > max)\n        return max;\n    if (v < min)\n        return min;\n    return v;\n};\n\nexport { clamp };\n","let warning = () => { };\nlet invariant = () => { };\nif (process.env.NODE_ENV !== \"production\") {\n    warning = (check, message) => {\n        if (!check && typeof console !== \"undefined\") {\n            console.warn(message);\n        }\n    };\n    invariant = (check, message) => {\n        if (!check) {\n            throw new Error(message);\n        }\n    };\n}\n\nexport { invariant, warning };\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n","function isObject(value) {\n    return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n    let result;\n    return () => {\n        if (result === undefined)\n            result = callback();\n        return result;\n    };\n}\n\nexport { memo };\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param  {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","/*\n  Progress within given range\n\n  Given a lower limit and an upper limit, we return the progress\n  (expressed as a number 0-1) represented by the given value, and\n  limit that progress to within 0-1.\n\n  @param [number]: Lower limit\n  @param [number]: Upper limit\n  @param [number]: Value to find progress within given range\n  @return [number]: Progress of value within range as expressed 0-1\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n    const toFromDifference = to - from;\n    return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n    constructor() {\n        this.subscriptions = [];\n    }\n    add(handler) {\n        addUniqueItem(this.subscriptions, handler);\n        return () => removeItem(this.subscriptions, handler);\n    }\n    notify(a, b, c) {\n        const numSubscriptions = this.subscriptions.length;\n        if (!numSubscriptions)\n            return;\n        if (numSubscriptions === 1) {\n            /**\n             * If there's only a single handler we can just call it without invoking a loop.\n             */\n            this.subscriptions[0](a, b, c);\n        }\n        else {\n            for (let i = 0; i < numSubscriptions; i++) {\n                /**\n                 * Check whether the handler exists before firing as it's possible\n                 * the subscriptions were modified during this loop running.\n                 */\n                const handler = this.subscriptions[i];\n                handler && handler(a, b, c);\n            }\n        }\n    }\n    getSize() {\n        return this.subscriptions.length;\n    }\n    clear() {\n        this.subscriptions.length = 0;\n    }\n}\n\nexport { SubscriptionManager };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","/*\n  Convert velocity into velocity per second\n\n  @param [number]: Unit per frame\n  @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n    return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { noop } from '../noop.mjs';\n\n/*\n  Bezier function generator\n  This has been modified from Gaëtan Renaudeau's BezierEasing\n  https://github.com/gre/bezier-easing/blob/master/src/index.js\n  https://github.com/gre/bezier-easing/blob/master/LICENSE\n  \n  I've removed the newtonRaphsonIterate algo because in benchmarking it\n  wasn't noticiably faster than binarySubdivision, indeed removing it\n  usually improved times, depending on the curve.\n  I also removed the lookup table, as for the added bundle size and loop we're\n  only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n  to 12 to compensate and this still tended to be faster for no perceivable\n  loss in accuracy.\n  Usage\n    const easeOut = cubicBezier(.17,.67,.83,.67);\n    const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n    t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n    let currentX;\n    let currentT;\n    let i = 0;\n    do {\n        currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n        currentX = calcBezier(currentT, mX1, mX2) - x;\n        if (currentX > 0.0) {\n            upperBound = currentT;\n        }\n        else {\n            lowerBound = currentT;\n        }\n    } while (Math.abs(currentX) > subdivisionPrecision &&\n        ++i < subdivisionMaxIterations);\n    return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n    // If this is a linear gradient, return linear easing\n    if (mX1 === mY1 && mX2 === mY2)\n        return noop;\n    const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n    // If animation is at start/end, return t without easing\n    return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","const isEasingArray = (ease) => {\n    return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n    linear: noop,\n    easeIn,\n    easeInOut,\n    easeOut,\n    circIn,\n    circInOut,\n    circOut,\n    backIn,\n    backInOut,\n    backOut,\n    anticipate,\n};\nconst isValidEasing = (easing) => {\n    return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n    if (isBezierDefinition(definition)) {\n        // If cubic bezier definition, create bezier curve\n        invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n        const [x1, y1, x2, y2] = definition;\n        return cubicBezier(x1, y1, x2, y2);\n    }\n    else if (isValidEasing(definition)) {\n        // Else lookup from table\n        invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n        return easingLookup[definition];\n    }\n    return definition;\n};\n\nexport { easingDefinitionToFunction };\n","const stepsOrder = [\n    \"setup\", // Compute\n    \"read\", // Read\n    \"resolveKeyframes\", // Write/Read/Write/Read\n    \"preUpdate\", // Compute\n    \"update\", // Compute\n    \"preRender\", // Compute\n    \"render\", // Write\n    \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n","const statsBuffer = {\n    value: null,\n    addProjectionMetrics: null,\n};\n\nexport { statsBuffer };\n","export { addUniqueItem, moveItem, removeItem } from './array.mjs';\nexport { clamp } from './clamp.mjs';\nexport { invariant, warning } from './errors.mjs';\nexport { MotionGlobalConfig } from './global-config.mjs';\nexport { isNumericalString } from './is-numerical-string.mjs';\nexport { isObject } from './is-object.mjs';\nexport { isZeroValueString } from './is-zero-value-string.mjs';\nexport { memo } from './memo.mjs';\nexport { noop } from './noop.mjs';\nexport { pipe } from './pipe.mjs';\nexport { progress } from './progress.mjs';\nexport { SubscriptionManager } from './subscription-manager.mjs';\nexport { millisecondsToSeconds, secondsToMilliseconds } from './time-conversion.mjs';\nexport { velocityPerSecond } from './velocity-per-second.mjs';\nexport { hasWarned, warnOnce } from './warn-once.mjs';\nexport { wrap } from './wrap.mjs';\nexport { anticipate } from './easing/anticipate.mjs';\nexport { backIn, backInOut, backOut } from './easing/back.mjs';\nexport { circIn, circInOut, circOut } from './easing/circ.mjs';\nexport { cubicBezier } from './easing/cubic-bezier.mjs';\nexport { easeIn, easeInOut, easeOut } from './easing/ease.mjs';\nexport { mirrorEasing } from './easing/modifiers/mirror.mjs';\nexport { reverseEasing } from './easing/modifiers/reverse.mjs';\nexport { steps } from './easing/steps.mjs';\nexport { getEasingForSegment } from './easing/utils/get-easing-for-segment.mjs';\nexport { isBezierDefinition } from './easing/utils/is-bezier-definition.mjs';\nexport { isEasingArray } from './easing/utils/is-easing-array.mjs';\nexport { easingDefinitionToFunction } from './easing/utils/map.mjs';\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n    /**\n     * We create and reuse two queues, one to queue jobs for the current frame\n     * and one for the next. We reuse to avoid triggering GC after x frames.\n     */\n    let thisFrame = new Set();\n    let nextFrame = new Set();\n    /**\n     * Track whether we're currently processing jobs in this step. This way\n     * we can decide whether to schedule new jobs for this frame or next.\n     */\n    let isProcessing = false;\n    let flushNextFrame = false;\n    /**\n     * A set of processes which were marked keepAlive when scheduled.\n     */\n    const toKeepAlive = new WeakSet();\n    let latestFrameData = {\n        delta: 0.0,\n        timestamp: 0.0,\n        isProcessing: false,\n    };\n    let numCalls = 0;\n    function triggerCallback(callback) {\n        if (toKeepAlive.has(callback)) {\n            step.schedule(callback);\n            runNextFrame();\n        }\n        numCalls++;\n        callback(latestFrameData);\n    }\n    const step = {\n        /**\n         * Schedule a process to run on the next frame.\n         */\n        schedule: (callback, keepAlive = false, immediate = false) => {\n            const addToCurrentFrame = immediate && isProcessing;\n            const queue = addToCurrentFrame ? thisFrame : nextFrame;\n            if (keepAlive)\n                toKeepAlive.add(callback);\n            if (!queue.has(callback))\n                queue.add(callback);\n            return callback;\n        },\n        /**\n         * Cancel the provided callback from running on the next frame.\n         */\n        cancel: (callback) => {\n            nextFrame.delete(callback);\n            toKeepAlive.delete(callback);\n        },\n        /**\n         * Execute all schedule callbacks.\n         */\n        process: (frameData) => {\n            latestFrameData = frameData;\n            /**\n             * If we're already processing we've probably been triggered by a flushSync\n             * inside an existing process. Instead of executing, mark flushNextFrame\n             * as true and ensure we flush the following frame at the end of this one.\n             */\n            if (isProcessing) {\n                flushNextFrame = true;\n                return;\n            }\n            isProcessing = true;\n            [thisFrame, nextFrame] = [nextFrame, thisFrame];\n            // Execute this frame\n            thisFrame.forEach(triggerCallback);\n            /**\n             * If we're recording stats then\n             */\n            if (stepName && statsBuffer.value) {\n                statsBuffer.value.frameloop[stepName].push(numCalls);\n            }\n            numCalls = 0;\n            // Clear the frame so no callbacks remain. This is to avoid\n            // memory leaks should this render step not run for a while.\n            thisFrame.clear();\n            isProcessing = false;\n            if (flushNextFrame) {\n                flushNextFrame = false;\n                step.process(frameData);\n            }\n        },\n    };\n    return step;\n}\n\nexport { createRenderStep };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n    let runNextFrame = false;\n    let useDefaultElapsed = true;\n    const state = {\n        delta: 0.0,\n        timestamp: 0.0,\n        isProcessing: false,\n    };\n    const flagRunNextFrame = () => (runNextFrame = true);\n    const steps = stepsOrder.reduce((acc, key) => {\n        acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n        return acc;\n    }, {});\n    const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n    const processBatch = () => {\n        const timestamp = MotionGlobalConfig.useManualTiming\n            ? state.timestamp\n            : performance.now();\n        runNextFrame = false;\n        if (!MotionGlobalConfig.useManualTiming) {\n            state.delta = useDefaultElapsed\n                ? 1000 / 60\n                : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n        }\n        state.timestamp = timestamp;\n        state.isProcessing = true;\n        // Unrolled render loop for better per-frame performance\n        setup.process(state);\n        read.process(state);\n        resolveKeyframes.process(state);\n        preUpdate.process(state);\n        update.process(state);\n        preRender.process(state);\n        render.process(state);\n        postRender.process(state);\n        state.isProcessing = false;\n        if (runNextFrame && allowKeepAlive) {\n            useDefaultElapsed = false;\n            scheduleNextBatch(processBatch);\n        }\n    };\n    const wake = () => {\n        runNextFrame = true;\n        useDefaultElapsed = true;\n        if (!state.isProcessing) {\n            scheduleNextBatch(processBatch);\n        }\n    };\n    const schedule = stepsOrder.reduce((acc, key) => {\n        const step = steps[key];\n        acc[key] = (process, keepAlive = false, immediate = false) => {\n            if (!runNextFrame)\n                wake();\n            return step.schedule(process, keepAlive, immediate);\n        };\n        return acc;\n    }, {});\n    const cancel = (process) => {\n        for (let i = 0; i < stepsOrder.length; i++) {\n            steps[stepsOrder[i]].cancel(process);\n        }\n    };\n    return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n    now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n    now: () => {\n        if (now === undefined) {\n            time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n                ? frameData.timestamp\n                : performance.now());\n        }\n        return now;\n    },\n    set: (newTime) => {\n        now = newTime;\n        queueMicrotask(clearTime);\n    },\n};\n\nexport { time };\n","const activeAnimations = {\n    layout: 0,\n    mainThread: 0,\n    waapi: 0,\n};\n\nexport { activeAnimations };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n    const startsWithToken = startsAsVariableToken(value);\n    if (!startsWithToken)\n        return false;\n    // Ensure any comments are stripped from the value as this can harm performance of the regex.\n    return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n\nexport { isCSSVariableName, isCSSVariableToken };\n","import { clamp } from 'motion-utils';\n\nconst number = {\n    test: (v) => typeof v === \"number\",\n    parse: parseFloat,\n    transform: (v) => v,\n};\nconst alpha = {\n    ...number,\n    transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n    ...number,\n    default: 1,\n};\n\nexport { alpha, number, scale };\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n","function isNullish(v) {\n    return v == null;\n}\n\nexport { isNullish };\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n    return Boolean((typeof v === \"string\" &&\n        singleColorRegex.test(v) &&\n        v.startsWith(type)) ||\n        (testProp &&\n            !isNullish(v) &&\n            Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n    if (typeof v !== \"string\")\n        return v;\n    const [a, b, c, alpha] = v.match(floatRegex);\n    return {\n        [aName]: parseFloat(a),\n        [bName]: parseFloat(b),\n        [cName]: parseFloat(c),\n        alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n    };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n    ...number,\n    transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n    test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n    parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n    transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n        rgbUnit.transform(red) +\n        \", \" +\n        rgbUnit.transform(green) +\n        \", \" +\n        rgbUnit.transform(blue) +\n        \", \" +\n        sanitize(alpha.transform(alpha$1)) +\n        \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n    let r = \"\";\n    let g = \"\";\n    let b = \"\";\n    let a = \"\";\n    // If we have 6 characters, ie #FF0000\n    if (v.length > 5) {\n        r = v.substring(1, 3);\n        g = v.substring(3, 5);\n        b = v.substring(5, 7);\n        a = v.substring(7, 9);\n        // Or we have 3 characters, ie #F00\n    }\n    else {\n        r = v.substring(1, 2);\n        g = v.substring(2, 3);\n        b = v.substring(3, 4);\n        a = v.substring(4, 5);\n        r += r;\n        g += g;\n        b += b;\n        a += a;\n    }\n    return {\n        red: parseInt(r, 16),\n        green: parseInt(g, 16),\n        blue: parseInt(b, 16),\n        alpha: a ? parseInt(a, 16) / 255 : 1,\n    };\n}\nconst hex = {\n    test: /*@__PURE__*/ isColorString(\"#\"),\n    parse: parseHex,\n    transform: rgba.transform,\n};\n\nexport { hex };\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n    test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n    parse: parseFloat,\n    transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n    ...percent,\n    parse: (v) => percent.parse(v) / 100,\n    transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n    test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n    parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n    transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n        return (\"hsla(\" +\n            Math.round(hue) +\n            \", \" +\n            percent.transform(sanitize(saturation)) +\n            \", \" +\n            percent.transform(sanitize(lightness)) +\n            \", \" +\n            sanitize(alpha.transform(alpha$1)) +\n            \")\");\n    },\n};\n\nexport { hsla };\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n    test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n    parse: (v) => {\n        if (rgba.test(v)) {\n            return rgba.parse(v);\n        }\n        else if (hsla.test(v)) {\n            return hsla.parse(v);\n        }\n        else {\n            return hex.parse(v);\n        }\n    },\n    transform: (v) => {\n        return typeof v === \"string\"\n            ? v\n            : v.hasOwnProperty(\"red\")\n                ? rgba.transform(v)\n                : hsla.transform(v);\n    },\n};\n\nexport { color };\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n    return (isNaN(v) &&\n        typeof v === \"string\" &&\n        (v.match(floatRegex)?.length || 0) +\n            (v.match(colorRegex)?.length || 0) >\n            0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n    const originalValue = value.toString();\n    const values = [];\n    const indexes = {\n        color: [],\n        number: [],\n        var: [],\n    };\n    const types = [];\n    let i = 0;\n    const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n        if (color.test(parsedValue)) {\n            indexes.color.push(i);\n            types.push(COLOR_TOKEN);\n            values.push(color.parse(parsedValue));\n        }\n        else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n            indexes.var.push(i);\n            types.push(VAR_TOKEN);\n            values.push(parsedValue);\n        }\n        else {\n            indexes.number.push(i);\n            types.push(NUMBER_TOKEN);\n            values.push(parseFloat(parsedValue));\n        }\n        ++i;\n        return SPLIT_TOKEN;\n    });\n    const split = tokenised.split(SPLIT_TOKEN);\n    return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n    return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n    const { split, types } = analyseComplexValue(source);\n    const numSections = split.length;\n    return (v) => {\n        let output = \"\";\n        for (let i = 0; i < numSections; i++) {\n            output += split[i];\n            if (v[i] !== undefined) {\n                const type = types[i];\n                if (type === NUMBER_TOKEN) {\n                    output += sanitize(v[i]);\n                }\n                else if (type === COLOR_TOKEN) {\n                    output += color.transform(v[i]);\n                }\n                else {\n                    output += v[i];\n                }\n            }\n        }\n        return output;\n    };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n    const parsed = parseComplexValue(v);\n    const transformer = createTransformer(v);\n    return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n    test,\n    parse: parseComplexValue,\n    createTransformer,\n    getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n    if (t < 0)\n        t += 1;\n    if (t > 1)\n        t -= 1;\n    if (t < 1 / 6)\n        return p + (q - p) * 6 * t;\n    if (t < 1 / 2)\n        return q;\n    if (t < 2 / 3)\n        return p + (q - p) * (2 / 3 - t) * 6;\n    return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n    hue /= 360;\n    saturation /= 100;\n    lightness /= 100;\n    let red = 0;\n    let green = 0;\n    let blue = 0;\n    if (!saturation) {\n        red = green = blue = lightness;\n    }\n    else {\n        const q = lightness < 0.5\n            ? lightness * (1 + saturation)\n            : lightness + saturation - lightness * saturation;\n        const p = 2 * lightness - q;\n        red = hueToRgb(p, q, hue + 1 / 3);\n        green = hueToRgb(p, q, hue);\n        blue = hueToRgb(p, q, hue - 1 / 3);\n    }\n    return {\n        red: Math.round(red * 255),\n        green: Math.round(green * 255),\n        blue: Math.round(blue * 255),\n        alpha,\n    };\n}\n\nexport { hslaToRgba };\n","function mixImmediate(a, b) {\n    return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n","/*\n  Value in range from progress\n\n  Given a lower limit and an upper limit, we return the value within\n  that range as expressed by progress (usually a number from 0 to 1)\n\n  So progress = 0.5 would change\n\n  from -------- to\n\n  to\n\n  from ---- to\n\n  E.g. from = 10, to = 20, progress = 0.5 => 15\n\n  @param [number]: Lower limit of range\n  @param [number]: Upper limit of range\n  @param [number]: The progress between lower and upper limits expressed 0-1\n  @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n    return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n    const fromExpo = from * from;\n    const expo = v * (to * to - fromExpo) + fromExpo;\n    return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n    const type = getColorType(color);\n    warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n    if (!Boolean(type))\n        return false;\n    let model = type.parse(color);\n    if (type === hsla) {\n        // TODO Remove this cast - needed since Motion's stricter typing\n        model = hslaToRgba(model);\n    }\n    return model;\n}\nconst mixColor = (from, to) => {\n    const fromRGBA = asRGBA(from);\n    const toRGBA = asRGBA(to);\n    if (!fromRGBA || !toRGBA) {\n        return mixImmediate(from, to);\n    }\n    const blended = { ...fromRGBA };\n    return (v) => {\n        blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n        blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n        blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n        blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n        return rgba.transform(blended);\n    };\n};\n\nexport { mixColor, mixLinearColor };\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n    if (invisibleValues.has(origin)) {\n        return (p) => (p <= 0 ? origin : target);\n    }\n    else {\n        return (p) => (p >= 1 ? target : origin);\n    }\n}\n\nexport { invisibleValues, mixVisibility };\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n    return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n    if (typeof a === \"number\") {\n        return mixNumber;\n    }\n    else if (typeof a === \"string\") {\n        return isCSSVariableToken(a)\n            ? mixImmediate\n            : color.test(a)\n                ? mixColor\n                : mixComplex;\n    }\n    else if (Array.isArray(a)) {\n        return mixArray;\n    }\n    else if (typeof a === \"object\") {\n        return color.test(a) ? mixColor : mixObject;\n    }\n    return mixImmediate;\n}\nfunction mixArray(a, b) {\n    const output = [...a];\n    const numValues = output.length;\n    const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n    return (p) => {\n        for (let i = 0; i < numValues; i++) {\n            output[i] = blendValue[i](p);\n        }\n        return output;\n    };\n}\nfunction mixObject(a, b) {\n    const output = { ...a, ...b };\n    const blendValue = {};\n    for (const key in output) {\n        if (a[key] !== undefined && b[key] !== undefined) {\n            blendValue[key] = getMixer(a[key])(a[key], b[key]);\n        }\n    }\n    return (v) => {\n        for (const key in blendValue) {\n            output[key] = blendValue[key](v);\n        }\n        return output;\n    };\n}\nfunction matchOrder(origin, target) {\n    const orderedOrigin = [];\n    const pointers = { color: 0, var: 0, number: 0 };\n    for (let i = 0; i < target.values.length; i++) {\n        const type = target.types[i];\n        const originIndex = origin.indexes[type][pointers[type]];\n        const originValue = origin.values[originIndex] ?? 0;\n        orderedOrigin[i] = originValue;\n        pointers[type]++;\n    }\n    return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n    const template = complex.createTransformer(target);\n    const originStats = analyseComplexValue(origin);\n    const targetStats = analyseComplexValue(target);\n    const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n        originStats.indexes.color.length === targetStats.indexes.color.length &&\n        originStats.indexes.number.length >= targetStats.indexes.number.length;\n    if (canInterpolate) {\n        if ((invisibleValues.has(origin) &&\n            !targetStats.values.length) ||\n            (invisibleValues.has(target) &&\n                !originStats.values.length)) {\n            return mixVisibility(origin, target);\n        }\n        return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n    }\n    else {\n        warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n        return mixImmediate(origin, target);\n    }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n    if (typeof from === \"number\" &&\n        typeof to === \"number\" &&\n        typeof p === \"number\") {\n        return mixNumber(from, to, p);\n    }\n    const mixer = getMixer(from);\n    return mixer(from, to);\n}\n\nexport { mix };\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n    const passTimestamp = ({ timestamp }) => update(timestamp);\n    return {\n        start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n        stop: () => cancelFrame(passTimestamp),\n        /**\n         * If we're processing this frame we can use the\n         * framelocked timestamp to keep things in sync.\n         */\n        now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n    };\n};\n\nexport { frameloopDriver };\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n    let points = \"\";\n    const numPoints = Math.max(Math.round(duration / resolution), 2);\n    for (let i = 0; i < numPoints; i++) {\n        points += easing(i / (numPoints - 1)) + \", \";\n    }\n    return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n    let duration = 0;\n    const timeStep = 50;\n    let state = generator.next(duration);\n    while (!state.done && duration < maxGeneratorDuration) {\n        duration += timeStep;\n        state = generator.next(duration);\n    }\n    return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n    const generator = createGenerator({ ...options, keyframes: [0, scale] });\n    const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n    return {\n        type: \"keyframes\",\n        ease: (progress) => {\n            return generator.next(duration * progress).value / scale;\n        },\n        duration: millisecondsToSeconds(duration),\n    };\n}\n\nexport { createGeneratorEasing };\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n    const prevT = Math.max(t - velocitySampleDuration, 0);\n    return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","const springDefaults = {\n    // Default spring physics\n    stiffness: 100,\n    damping: 10,\n    mass: 1.0,\n    velocity: 0.0,\n    // Default duration/bounce-based options\n    duration: 800, // in ms\n    bounce: 0.3,\n    visualDuration: 0.3, // in seconds\n    // Rest thresholds\n    restSpeed: {\n        granular: 0.01,\n        default: 2,\n    },\n    restDelta: {\n        granular: 0.005,\n        default: 0.5,\n    },\n    // Limits\n    minDuration: 0.01, // in seconds\n    maxDuration: 10.0, // in seconds\n    minDamping: 0.05,\n    maxDamping: 1,\n};\n\nexport { springDefaults };\n","import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\n\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n    let envelope;\n    let derivative;\n    warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n    let dampingRatio = 1 - bounce;\n    /**\n     * Restrict dampingRatio and duration to within acceptable ranges.\n     */\n    dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n    duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n    if (dampingRatio < 1) {\n        /**\n         * Underdamped spring\n         */\n        envelope = (undampedFreq) => {\n            const exponentialDecay = undampedFreq * dampingRatio;\n            const delta = exponentialDecay * duration;\n            const a = exponentialDecay - velocity;\n            const b = calcAngularFreq(undampedFreq, dampingRatio);\n            const c = Math.exp(-delta);\n            return safeMin - (a / b) * c;\n        };\n        derivative = (undampedFreq) => {\n            const exponentialDecay = undampedFreq * dampingRatio;\n            const delta = exponentialDecay * duration;\n            const d = delta * velocity + velocity;\n            const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n            const f = Math.exp(-delta);\n            const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n            const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n            return (factor * ((d - e) * f)) / g;\n        };\n    }\n    else {\n        /**\n         * Critically-damped spring\n         */\n        envelope = (undampedFreq) => {\n            const a = Math.exp(-undampedFreq * duration);\n            const b = (undampedFreq - velocity) * duration + 1;\n            return -safeMin + a * b;\n        };\n        derivative = (undampedFreq) => {\n            const a = Math.exp(-undampedFreq * duration);\n            const b = (velocity - undampedFreq) * (duration * duration);\n            return a * b;\n        };\n    }\n    const initialGuess = 5 / duration;\n    const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n    duration = secondsToMilliseconds(duration);\n    if (isNaN(undampedFreq)) {\n        return {\n            stiffness: springDefaults.stiffness,\n            damping: springDefaults.damping,\n            duration,\n        };\n    }\n    else {\n        const stiffness = Math.pow(undampedFreq, 2) * mass;\n        return {\n            stiffness,\n            damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n            duration,\n        };\n    }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n    let result = initialGuess;\n    for (let i = 1; i < rootIterations; i++) {\n        result = result - envelope(result) / derivative(result);\n    }\n    return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring };\n","import { millisecondsToSeconds, secondsToMilliseconds, clamp } from 'motion-utils';\nimport { generateLinearEasing } from '../../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from '../utils/calc-duration.mjs';\nimport { createGeneratorEasing } from '../utils/create-generator-easing.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { springDefaults } from './defaults.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n    return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n    let springOptions = {\n        velocity: springDefaults.velocity,\n        stiffness: springDefaults.stiffness,\n        damping: springDefaults.damping,\n        mass: springDefaults.mass,\n        isResolvedFromDuration: false,\n        ...options,\n    };\n    // stiffness/damping/mass overrides duration/bounce\n    if (!isSpringType(options, physicsKeys) &&\n        isSpringType(options, durationKeys)) {\n        if (options.visualDuration) {\n            const visualDuration = options.visualDuration;\n            const root = (2 * Math.PI) / (visualDuration * 1.2);\n            const stiffness = root * root;\n            const damping = 2 *\n                clamp(0.05, 1, 1 - (options.bounce || 0)) *\n                Math.sqrt(stiffness);\n            springOptions = {\n                ...springOptions,\n                mass: springDefaults.mass,\n                stiffness,\n                damping,\n            };\n        }\n        else {\n            const derived = findSpring(options);\n            springOptions = {\n                ...springOptions,\n                ...derived,\n                mass: springDefaults.mass,\n            };\n            springOptions.isResolvedFromDuration = true;\n        }\n    }\n    return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n    const options = typeof optionsOrVisualDuration !== \"object\"\n        ? {\n            visualDuration: optionsOrVisualDuration,\n            keyframes: [0, 1],\n            bounce,\n        }\n        : optionsOrVisualDuration;\n    let { restSpeed, restDelta } = options;\n    const origin = options.keyframes[0];\n    const target = options.keyframes[options.keyframes.length - 1];\n    /**\n     * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n     * to reduce GC during animation.\n     */\n    const state = { done: false, value: origin };\n    const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n        ...options,\n        velocity: -millisecondsToSeconds(options.velocity || 0),\n    });\n    const initialVelocity = velocity || 0.0;\n    const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n    const initialDelta = target - origin;\n    const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n    /**\n     * If we're working on a granular scale, use smaller defaults for determining\n     * when the spring is finished.\n     *\n     * These defaults have been selected emprically based on what strikes a good\n     * ratio between feeling good and finishing as soon as changes are imperceptible.\n     */\n    const isGranularScale = Math.abs(initialDelta) < 5;\n    restSpeed || (restSpeed = isGranularScale\n        ? springDefaults.restSpeed.granular\n        : springDefaults.restSpeed.default);\n    restDelta || (restDelta = isGranularScale\n        ? springDefaults.restDelta.granular\n        : springDefaults.restDelta.default);\n    let resolveSpring;\n    if (dampingRatio < 1) {\n        const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n        // Underdamped spring\n        resolveSpring = (t) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n            return (target -\n                envelope *\n                    (((initialVelocity +\n                        dampingRatio * undampedAngularFreq * initialDelta) /\n                        angularFreq) *\n                        Math.sin(angularFreq * t) +\n                        initialDelta * Math.cos(angularFreq * t)));\n        };\n    }\n    else if (dampingRatio === 1) {\n        // Critically damped spring\n        resolveSpring = (t) => target -\n            Math.exp(-undampedAngularFreq * t) *\n                (initialDelta +\n                    (initialVelocity + undampedAngularFreq * initialDelta) * t);\n    }\n    else {\n        // Overdamped spring\n        const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n        resolveSpring = (t) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n            // When performing sinh or cosh values can hit Infinity so we cap them here\n            const freqForT = Math.min(dampedAngularFreq * t, 300);\n            return (target -\n                (envelope *\n                    ((initialVelocity +\n                        dampingRatio * undampedAngularFreq * initialDelta) *\n                        Math.sinh(freqForT) +\n                        dampedAngularFreq *\n                            initialDelta *\n                            Math.cosh(freqForT))) /\n                    dampedAngularFreq);\n        };\n    }\n    const generator = {\n        calculatedDuration: isResolvedFromDuration ? duration || null : null,\n        next: (t) => {\n            const current = resolveSpring(t);\n            if (!isResolvedFromDuration) {\n                let currentVelocity = t === 0 ? initialVelocity : 0.0;\n                /**\n                 * We only need to calculate velocity for under-damped springs\n                 * as over- and critically-damped springs can't overshoot, so\n                 * checking only for displacement is enough.\n                 */\n                if (dampingRatio < 1) {\n                    currentVelocity =\n                        t === 0\n                            ? secondsToMilliseconds(initialVelocity)\n                            : calcGeneratorVelocity(resolveSpring, t, current);\n                }\n                const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n                const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n                state.done =\n                    isBelowVelocityThreshold && isBelowDisplacementThreshold;\n            }\n            else {\n                state.done = t >= duration;\n            }\n            state.value = state.done ? target : current;\n            return state;\n        },\n        toString: () => {\n            const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n            const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n            return calculatedDuration + \"ms \" + easing;\n        },\n        toTransition: () => { },\n    };\n    return generator;\n}\nspring.applyToOptions = (options) => {\n    const generatorOptions = createGeneratorEasing(options, 100, spring);\n    options.ease = generatorOptions.ease;\n    options.duration = secondsToMilliseconds(generatorOptions.duration);\n    options.type = \"keyframes\";\n    return options;\n};\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n    const origin = keyframes[0];\n    const state = {\n        done: false,\n        value: origin,\n    };\n    const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n    const nearestBoundary = (v) => {\n        if (min === undefined)\n            return max;\n        if (max === undefined)\n            return min;\n        return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n    };\n    let amplitude = power * velocity;\n    const ideal = origin + amplitude;\n    const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n    /**\n     * If the target has changed we need to re-calculate the amplitude, otherwise\n     * the animation will start from the wrong position.\n     */\n    if (target !== ideal)\n        amplitude = target - origin;\n    const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n    const calcLatest = (t) => target + calcDelta(t);\n    const applyFriction = (t) => {\n        const delta = calcDelta(t);\n        const latest = calcLatest(t);\n        state.done = Math.abs(delta) <= restDelta;\n        state.value = state.done ? target : latest;\n    };\n    /**\n     * Ideally this would resolve for t in a stateless way, we could\n     * do that by always precalculating the animation but as we know\n     * this will be done anyway we can assume that spring will\n     * be discovered during that.\n     */\n    let timeReachedBoundary;\n    let spring$1;\n    const checkCatchBoundary = (t) => {\n        if (!isOutOfBounds(state.value))\n            return;\n        timeReachedBoundary = t;\n        spring$1 = spring({\n            keyframes: [state.value, nearestBoundary(state.value)],\n            velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n            damping: bounceDamping,\n            stiffness: bounceStiffness,\n            restDelta,\n            restSpeed,\n        });\n    };\n    checkCatchBoundary(0);\n    return {\n        calculatedDuration: null,\n        next: (t) => {\n            /**\n             * We need to resolve the friction to figure out if we need a\n             * spring but we don't want to do this twice per frame. So here\n             * we flag if we updated for this frame and later if we did\n             * we can skip doing it again.\n             */\n            let hasUpdatedFrame = false;\n            if (!spring$1 && timeReachedBoundary === undefined) {\n                hasUpdatedFrame = true;\n                applyFriction(t);\n                checkCatchBoundary(t);\n            }\n            /**\n             * If we have a spring and the provided t is beyond the moment the friction\n             * animation crossed the min/max boundary, use the spring.\n             */\n            if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n                return spring$1.next(t - timeReachedBoundary);\n            }\n            else {\n                !hasUpdatedFrame && applyFriction(t);\n                return state;\n            }\n        },\n    };\n}\n\nexport { inertia };\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n    const mixers = [];\n    const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n    const numMixers = output.length - 1;\n    for (let i = 0; i < numMixers; i++) {\n        let mixer = mixerFactory(output[i], output[i + 1]);\n        if (ease) {\n            const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n            mixer = pipe(easingFunction, mixer);\n        }\n        mixers.push(mixer);\n    }\n    return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n *   - Numbers\n *   - Colors (hex, hsl, hsla, rgb, rgba)\n *   - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n    const inputLength = input.length;\n    invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n    /**\n     * If we're only provided a single input, we can just make a function\n     * that returns the output.\n     */\n    if (inputLength === 1)\n        return () => output[0];\n    if (inputLength === 2 && output[0] === output[1])\n        return () => output[1];\n    const isZeroDeltaRange = input[0] === input[1];\n    // If input runs highest -> lowest, reverse both arrays\n    if (input[0] > input[inputLength - 1]) {\n        input = [...input].reverse();\n        output = [...output].reverse();\n    }\n    const mixers = createMixers(output, ease, mixer);\n    const numMixers = mixers.length;\n    const interpolator = (v) => {\n        if (isZeroDeltaRange && v < input[0])\n            return output[0];\n        let i = 0;\n        if (numMixers > 1) {\n            for (; i < input.length - 2; i++) {\n                if (v < input[i + 1])\n                    break;\n            }\n        }\n        const progressInRange = progress(input[i], input[i + 1], v);\n        return mixers[i](progressInRange);\n    };\n    return isClamp\n        ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n        : interpolator;\n}\n\nexport { interpolate };\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n    const min = offset[offset.length - 1];\n    for (let i = 1; i <= remaining; i++) {\n        const offsetProgress = progress(0, remaining, i);\n        offset.push(mixNumber(min, 1, offsetProgress));\n    }\n}\n\nexport { fillOffset };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n    const offset = [0];\n    fillOffset(offset, arr.length - 1);\n    return offset;\n}\n\nexport { defaultOffset };\n","function convertOffsetToTimes(offset, duration) {\n    return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n    return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n    /**\n     * Easing functions can be externally defined as strings. Here we convert them\n     * into actual functions.\n     */\n    const easingFunctions = isEasingArray(ease)\n        ? ease.map(easingDefinitionToFunction)\n        : easingDefinitionToFunction(ease);\n    /**\n     * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n     * to reduce GC during animation.\n     */\n    const state = {\n        done: false,\n        value: keyframeValues[0],\n    };\n    /**\n     * Create a times array based on the provided 0-1 offsets\n     */\n    const absoluteTimes = convertOffsetToTimes(\n    // Only use the provided offsets if they're the correct length\n    // TODO Maybe we should warn here if there's a length mismatch\n    times && times.length === keyframeValues.length\n        ? times\n        : defaultOffset(keyframeValues), duration);\n    const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n        ease: Array.isArray(easingFunctions)\n            ? easingFunctions\n            : defaultEasing(keyframeValues, easingFunctions),\n    });\n    return {\n        calculatedDuration: duration,\n        next: (t) => {\n            state.value = mapTimeToKeyframe(t);\n            state.done = t >= duration;\n            return state;\n        },\n    };\n}\n\nexport { defaultEasing, keyframes };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n    const resolvedKeyframes = keyframes.filter(isNotNull);\n    const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n    const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n    return !index || finalKeyframe === undefined\n        ? resolvedKeyframes[index]\n        : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring/index.mjs';\n\nconst transitionTypeMap = {\n    decay: inertia,\n    inertia,\n    tween: keyframes,\n    keyframes: keyframes,\n    spring,\n};\nfunction replaceTransitionType(transition) {\n    if (typeof transition.type === \"string\") {\n        transition.type = transitionTypeMap[transition.type];\n    }\n}\n\nexport { replaceTransitionType };\n","class WithPromise {\n    constructor() {\n        this.updateFinished();\n    }\n    get finished() {\n        return this._finished;\n    }\n    updateFinished() {\n        this._finished = new Promise((resolve) => {\n            this.resolve = resolve;\n        });\n    }\n    notifyFinished() {\n        this.resolve();\n    }\n    /**\n     * Allows the animation to be awaited.\n     *\n     * @deprecated Use `finished` instead.\n     */\n    then(onResolve, onReject) {\n        return this.finished.then(onResolve, onReject);\n    }\n}\n\nexport { WithPromise };\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n    constructor(options) {\n        super();\n        this.state = \"idle\";\n        this.startTime = null;\n        this.isStopped = false;\n        /**\n         * The current time of the animation.\n         */\n        this.currentTime = 0;\n        /**\n         * The time at which the animation was paused.\n         */\n        this.holdTime = null;\n        /**\n         * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n         */\n        this.playbackSpeed = 1;\n        /**\n         * This method is bound to the instance to fix a pattern where\n         * animation.stop is returned as a reference from a useEffect.\n         */\n        this.stop = (sync = true) => {\n            if (sync) {\n                const { motionValue } = this.options;\n                if (motionValue && motionValue.updatedAt !== time.now()) {\n                    this.tick(time.now());\n                }\n            }\n            this.isStopped = true;\n            if (this.state === \"idle\")\n                return;\n            this.teardown();\n            this.options.onStop?.();\n        };\n        activeAnimations.mainThread++;\n        this.options = options;\n        this.initAnimation();\n        this.play();\n        if (options.autoplay === false)\n            this.pause();\n    }\n    initAnimation() {\n        const { options } = this;\n        replaceTransitionType(options);\n        const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n        let { keyframes: keyframes$1 } = options;\n        const generatorFactory = type || keyframes;\n        if (process.env.NODE_ENV !== \"production\" &&\n            generatorFactory !== keyframes) {\n            invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n        }\n        if (generatorFactory !== keyframes &&\n            typeof keyframes$1[0] !== \"number\") {\n            this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n            keyframes$1 = [0, 100];\n        }\n        const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n        /**\n         * If we have a mirror repeat type we need to create a second generator that outputs the\n         * mirrored (not reversed) animation and later ping pong between the two generators.\n         */\n        if (repeatType === \"mirror\") {\n            this.mirroredGenerator = generatorFactory({\n                ...options,\n                keyframes: [...keyframes$1].reverse(),\n                velocity: -velocity,\n            });\n        }\n        /**\n         * If duration is undefined and we have repeat options,\n         * we need to calculate a duration from the generator.\n         *\n         * We set it to the generator itself to cache the duration.\n         * Any timeline resolver will need to have already precalculated\n         * the duration by this step.\n         */\n        if (generator.calculatedDuration === null) {\n            generator.calculatedDuration = calcGeneratorDuration(generator);\n        }\n        const { calculatedDuration } = generator;\n        this.calculatedDuration = calculatedDuration;\n        this.resolvedDuration = calculatedDuration + repeatDelay;\n        this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n        this.generator = generator;\n    }\n    updateTime(timestamp) {\n        const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n        // Update currentTime\n        if (this.holdTime !== null) {\n            this.currentTime = this.holdTime;\n        }\n        else {\n            // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n            // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n            // example.\n            this.currentTime = animationTime;\n        }\n    }\n    tick(timestamp, sample = false) {\n        const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n        if (this.startTime === null)\n            return generator.next(0);\n        const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n        /**\n         * requestAnimationFrame timestamps can come through as lower than\n         * the startTime as set by performance.now(). Here we prevent this,\n         * though in the future it could be possible to make setting startTime\n         * a pending operation that gets resolved here.\n         */\n        if (this.speed > 0) {\n            this.startTime = Math.min(this.startTime, timestamp);\n        }\n        else if (this.speed < 0) {\n            this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n        }\n        if (sample) {\n            this.currentTime = timestamp;\n        }\n        else {\n            this.updateTime(timestamp);\n        }\n        // Rebase on delay\n        const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n        const isInDelayPhase = this.playbackSpeed >= 0\n            ? timeWithoutDelay < 0\n            : timeWithoutDelay > totalDuration;\n        this.currentTime = Math.max(timeWithoutDelay, 0);\n        // If this animation has finished, set the current time  to the total duration.\n        if (this.state === \"finished\" && this.holdTime === null) {\n            this.currentTime = totalDuration;\n        }\n        let elapsed = this.currentTime;\n        let frameGenerator = generator;\n        if (repeat) {\n            /**\n             * Get the current progress (0-1) of the animation. If t is >\n             * than duration we'll get values like 2.5 (midway through the\n             * third iteration)\n             */\n            const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n            /**\n             * Get the current iteration (0 indexed). For instance the floor of\n             * 2.5 is 2.\n             */\n            let currentIteration = Math.floor(progress);\n            /**\n             * Get the current progress of the iteration by taking the remainder\n             * so 2.5 is 0.5 through iteration 2\n             */\n            let iterationProgress = progress % 1.0;\n            /**\n             * If iteration progress is 1 we count that as the end\n             * of the previous iteration.\n             */\n            if (!iterationProgress && progress >= 1) {\n                iterationProgress = 1;\n            }\n            iterationProgress === 1 && currentIteration--;\n            currentIteration = Math.min(currentIteration, repeat + 1);\n            /**\n             * Reverse progress if we're not running in \"normal\" direction\n             */\n            const isOddIteration = Boolean(currentIteration % 2);\n            if (isOddIteration) {\n                if (repeatType === \"reverse\") {\n                    iterationProgress = 1 - iterationProgress;\n                    if (repeatDelay) {\n                        iterationProgress -= repeatDelay / resolvedDuration;\n                    }\n                }\n                else if (repeatType === \"mirror\") {\n                    frameGenerator = mirroredGenerator;\n                }\n            }\n            elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n        }\n        /**\n         * If we're in negative time, set state as the initial keyframe.\n         * This prevents delay: x, duration: 0 animations from finishing\n         * instantly.\n         */\n        const state = isInDelayPhase\n            ? { done: false, value: keyframes[0] }\n            : frameGenerator.next(elapsed);\n        if (mixKeyframes) {\n            state.value = mixKeyframes(state.value);\n        }\n        let { done } = state;\n        if (!isInDelayPhase && calculatedDuration !== null) {\n            done =\n                this.playbackSpeed >= 0\n                    ? this.currentTime >= totalDuration\n                    : this.currentTime <= 0;\n        }\n        const isAnimationFinished = this.holdTime === null &&\n            (this.state === \"finished\" || (this.state === \"running\" && done));\n        // TODO: The exception for inertia could be cleaner here\n        if (isAnimationFinished && type !== inertia) {\n            state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n        }\n        if (onUpdate) {\n            onUpdate(state.value);\n        }\n        if (isAnimationFinished) {\n            this.finish();\n        }\n        return state;\n    }\n    /**\n     * Allows the returned animation to be awaited or promise-chained. Currently\n     * resolves when the animation finishes at all but in a future update could/should\n     * reject if its cancels.\n     */\n    then(resolve, reject) {\n        return this.finished.then(resolve, reject);\n    }\n    get duration() {\n        return millisecondsToSeconds(this.calculatedDuration);\n    }\n    get time() {\n        return millisecondsToSeconds(this.currentTime);\n    }\n    set time(newTime) {\n        newTime = secondsToMilliseconds(newTime);\n        this.currentTime = newTime;\n        if (this.startTime === null ||\n            this.holdTime !== null ||\n            this.playbackSpeed === 0) {\n            this.holdTime = newTime;\n        }\n        else if (this.driver) {\n            this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n        }\n        this.driver?.start(false);\n    }\n    get speed() {\n        return this.playbackSpeed;\n    }\n    set speed(newSpeed) {\n        this.updateTime(time.now());\n        const hasChanged = this.playbackSpeed !== newSpeed;\n        this.playbackSpeed = newSpeed;\n        if (hasChanged) {\n            this.time = millisecondsToSeconds(this.currentTime);\n        }\n    }\n    play() {\n        if (this.isStopped)\n            return;\n        const { driver = frameloopDriver, startTime } = this.options;\n        if (!this.driver) {\n            this.driver = driver((timestamp) => this.tick(timestamp));\n        }\n        this.options.onPlay?.();\n        const now = this.driver.now();\n        if (this.state === \"finished\") {\n            this.updateFinished();\n            this.startTime = now;\n        }\n        else if (this.holdTime !== null) {\n            this.startTime = now - this.holdTime;\n        }\n        else if (!this.startTime) {\n            this.startTime = startTime ?? now;\n        }\n        if (this.state === \"finished\" && this.speed < 0) {\n            this.startTime += this.calculatedDuration;\n        }\n        this.holdTime = null;\n        /**\n         * Set playState to running only after we've used it in\n         * the previous logic.\n         */\n        this.state = \"running\";\n        this.driver.start();\n    }\n    pause() {\n        this.state = \"paused\";\n        this.updateTime(time.now());\n        this.holdTime = this.currentTime;\n    }\n    complete() {\n        if (this.state !== \"running\") {\n            this.play();\n        }\n        this.state = \"finished\";\n        this.holdTime = null;\n    }\n    finish() {\n        this.notifyFinished();\n        this.teardown();\n        this.state = \"finished\";\n        this.options.onComplete?.();\n    }\n    cancel() {\n        this.holdTime = null;\n        this.startTime = 0;\n        this.tick(0);\n        this.teardown();\n        this.options.onCancel?.();\n    }\n    teardown() {\n        this.state = \"idle\";\n        this.stopDriver();\n        this.startTime = this.holdTime = null;\n        activeAnimations.mainThread--;\n    }\n    stopDriver() {\n        if (!this.driver)\n            return;\n        this.driver.stop();\n        this.driver = undefined;\n    }\n    sample(sampleTime) {\n        this.startTime = 0;\n        return this.tick(sampleTime, true);\n    }\n    attachTimeline(timeline) {\n        if (this.options.allowFlatten) {\n            this.options.type = \"keyframes\";\n            this.options.ease = \"linear\";\n            this.initAnimation();\n        }\n        this.driver?.stop();\n        return timeline.observe(this);\n    }\n}\n// Legacy function support\nfunction animateValue(options) {\n    return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n","function fillWildcards(keyframes) {\n    for (let i = 1; i < keyframes.length; i++) {\n        keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n    }\n}\n\nexport { fillWildcards };\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n    const angle = radToDeg(Math.atan2(v[1], v[0]));\n    return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n    x: 4,\n    y: 5,\n    translateX: 4,\n    translateY: 5,\n    scaleX: 0,\n    scaleY: 3,\n    scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n    rotate,\n    rotateZ: rotate,\n    skewX: (v) => radToDeg(Math.atan(v[1])),\n    skewY: (v) => radToDeg(Math.atan(v[2])),\n    skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n    angle = angle % 360;\n    if (angle < 0)\n        angle += 360;\n    return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n    x: 12,\n    y: 13,\n    z: 14,\n    translateX: 12,\n    translateY: 13,\n    translateZ: 14,\n    scaleX,\n    scaleY,\n    scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n    rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n    rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n    rotateZ,\n    rotate: rotateZ,\n    skewX: (v) => radToDeg(Math.atan(v[4])),\n    skewY: (v) => radToDeg(Math.atan(v[1])),\n    skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n    return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n    if (!transform || transform === \"none\") {\n        return defaultTransformValue(name);\n    }\n    const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n    let parsers;\n    let match;\n    if (matrix3dMatch) {\n        parsers = matrix3dParsers;\n        match = matrix3dMatch;\n    }\n    else {\n        const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n        parsers = matrix2dParsers;\n        match = matrix2dMatch;\n    }\n    if (!match) {\n        return defaultTransformValue(name);\n    }\n    const valueParser = parsers[name];\n    const values = match[1].split(\",\").map(convertTransformToNumber);\n    return typeof valueParser === \"function\"\n        ? valueParser(values)\n        : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n    const { transform = \"none\" } = getComputedStyle(instance);\n    return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n    return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n    \"transformPerspective\",\n    \"x\",\n    \"y\",\n    \"z\",\n    \"translateX\",\n    \"translateY\",\n    \"translateZ\",\n    \"scale\",\n    \"scaleX\",\n    \"scaleY\",\n    \"rotate\",\n    \"rotateX\",\n    \"rotateY\",\n    \"rotateZ\",\n    \"skew\",\n    \"skewX\",\n    \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = /*@__PURE__*/ (() => new Set(transformPropOrder))();\n\nexport { transformPropOrder, transformProps };\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n    const removedTransforms = [];\n    nonTranslationalTransformKeys.forEach((key) => {\n        const value = visualElement.getValue(key);\n        if (value !== undefined) {\n            removedTransforms.push([key, value.get()]);\n            value.set(key.startsWith(\"scale\") ? 1 : 0);\n        }\n    });\n    return removedTransforms;\n}\nconst positionalValues = {\n    // Dimensions\n    width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n    height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n    top: (_bbox, { top }) => parseFloat(top),\n    left: (_bbox, { left }) => parseFloat(left),\n    bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n    right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n    // Transform\n    x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n    y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n    if (anyNeedsMeasurement) {\n        const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n        const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n        const transformsToRestore = new Map();\n        /**\n         * Write pass\n         * If we're measuring elements we want to remove bounding box-changing transforms.\n         */\n        elementsToMeasure.forEach((element) => {\n            const removedTransforms = removeNonTranslationalTransform(element);\n            if (!removedTransforms.length)\n                return;\n            transformsToRestore.set(element, removedTransforms);\n            element.render();\n        });\n        // Read\n        resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n        // Write\n        elementsToMeasure.forEach((element) => {\n            element.render();\n            const restore = transformsToRestore.get(element);\n            if (restore) {\n                restore.forEach(([key, value]) => {\n                    element.getValue(key)?.set(value);\n                });\n            }\n        });\n        // Read\n        resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n        // Write\n        resolversToMeasure.forEach((resolver) => {\n            if (resolver.suspendedScrollY !== undefined) {\n                window.scrollTo(0, resolver.suspendedScrollY);\n            }\n        });\n    }\n    anyNeedsMeasurement = false;\n    isScheduled = false;\n    toResolve.forEach((resolver) => resolver.complete(isForced));\n    toResolve.clear();\n}\nfunction readAllKeyframes() {\n    toResolve.forEach((resolver) => {\n        resolver.readKeyframes();\n        if (resolver.needsMeasurement) {\n            anyNeedsMeasurement = true;\n        }\n    });\n}\nfunction flushKeyframeResolvers() {\n    isForced = true;\n    readAllKeyframes();\n    measureAllKeyframes();\n    isForced = false;\n}\nclass KeyframeResolver {\n    constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n        this.state = \"pending\";\n        /**\n         * Track whether this resolver is async. If it is, it'll be added to the\n         * resolver queue and flushed in the next frame. Resolvers that aren't going\n         * to trigger read/write thrashing don't need to be async.\n         */\n        this.isAsync = false;\n        /**\n         * Track whether this resolver needs to perform a measurement\n         * to resolve its keyframes.\n         */\n        this.needsMeasurement = false;\n        this.unresolvedKeyframes = [...unresolvedKeyframes];\n        this.onComplete = onComplete;\n        this.name = name;\n        this.motionValue = motionValue;\n        this.element = element;\n        this.isAsync = isAsync;\n    }\n    scheduleResolve() {\n        this.state = \"scheduled\";\n        if (this.isAsync) {\n            toResolve.add(this);\n            if (!isScheduled) {\n                isScheduled = true;\n                frame.read(readAllKeyframes);\n                frame.resolveKeyframes(measureAllKeyframes);\n            }\n        }\n        else {\n            this.readKeyframes();\n            this.complete();\n        }\n    }\n    readKeyframes() {\n        const { unresolvedKeyframes, name, element, motionValue } = this;\n        // If initial keyframe is null we need to read it from the DOM\n        if (unresolvedKeyframes[0] === null) {\n            const currentValue = motionValue?.get();\n            // TODO: This doesn't work if the final keyframe is a wildcard\n            const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n            if (currentValue !== undefined) {\n                unresolvedKeyframes[0] = currentValue;\n            }\n            else if (element && name) {\n                const valueAsRead = element.readValue(name, finalKeyframe);\n                if (valueAsRead !== undefined && valueAsRead !== null) {\n                    unresolvedKeyframes[0] = valueAsRead;\n                }\n            }\n            if (unresolvedKeyframes[0] === undefined) {\n                unresolvedKeyframes[0] = finalKeyframe;\n            }\n            if (motionValue && currentValue === undefined) {\n                motionValue.set(unresolvedKeyframes[0]);\n            }\n        }\n        fillWildcards(unresolvedKeyframes);\n    }\n    setFinalKeyframe() { }\n    measureInitialState() { }\n    renderEndStyles() { }\n    measureEndState() { }\n    complete(isForcedComplete = false) {\n        this.state = \"complete\";\n        this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n        toResolve.delete(this);\n    }\n    cancel() {\n        if (this.state === \"scheduled\") {\n            toResolve.delete(this);\n            this.state = \"pending\";\n        }\n    }\n    resume() {\n        if (this.state === \"pending\")\n            this.scheduleResolve();\n    }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n    isCSSVar(name)\n        ? element.style.setProperty(name, value)\n        : (element.style[name] = value);\n}\n\nexport { setStyle };\n","import { memo } from 'motion-utils';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n    const memoized = memo(callback);\n    return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n    try {\n        document\n            .createElement(\"div\")\n            .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n    }\n    catch (e) {\n        return false;\n    }\n    return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n    linear: \"linear\",\n    ease: \"ease\",\n    easeIn: \"ease-in\",\n    easeOut: \"ease-out\",\n    easeInOut: \"ease-in-out\",\n    circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n    circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n    backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n    backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n    if (!easing) {\n        return undefined;\n    }\n    else if (typeof easing === \"function\") {\n        return supportsLinearEasing()\n            ? generateLinearEasing(easing, duration)\n            : \"ease-out\";\n    }\n    else if (isBezierDefinition(easing)) {\n        return cubicBezierAsString(easing);\n    }\n    else if (Array.isArray(easing)) {\n        return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n            supportedWaapiEasing.easeOut);\n    }\n    else {\n        return supportedWaapiEasing[easing];\n    }\n}\n\nexport { mapEasingToNativeEasing };\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n    const keyframeOptions = {\n        [valueName]: keyframes,\n    };\n    if (times)\n        keyframeOptions.offset = times;\n    const easing = mapEasingToNativeEasing(ease, duration);\n    /**\n     * If this is an easing array, apply to keyframes, not animation as a whole\n     */\n    if (Array.isArray(easing))\n        keyframeOptions.easing = easing;\n    if (statsBuffer.value) {\n        activeAnimations.waapi++;\n    }\n    const options = {\n        delay,\n        duration,\n        easing: !Array.isArray(easing) ? easing : \"linear\",\n        fill: \"both\",\n        iterations: repeat + 1,\n        direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n    };\n    if (pseudoElement)\n        options.pseudoElement = pseudoElement;\n    const animation = element.animate(keyframeOptions, options);\n    if (statsBuffer.value) {\n        animation.finished.finally(() => {\n            activeAnimations.waapi--;\n        });\n    }\n    return animation;\n}\n\nexport { startWaapiAnimation };\n","function isGenerator(type) {\n    return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n    if (isGenerator(type) && supportsLinearEasing()) {\n        return type.applyToOptions(options);\n    }\n    else {\n        options.duration ?? (options.duration = 300);\n        options.ease ?? (options.ease = \"easeOut\");\n    }\n    return options;\n}\n\nexport { applyGeneratorOptions };\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n    constructor(options) {\n        super();\n        this.finishedTime = null;\n        this.isStopped = false;\n        if (!options)\n            return;\n        const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n        this.isPseudoElement = Boolean(pseudoElement);\n        this.allowFlatten = allowFlatten;\n        this.options = options;\n        invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n        const transition = applyGeneratorOptions(options);\n        this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n        if (transition.autoplay === false) {\n            this.animation.pause();\n        }\n        this.animation.onfinish = () => {\n            this.finishedTime = this.time;\n            if (!pseudoElement) {\n                const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n                if (this.updateMotionValue) {\n                    this.updateMotionValue(keyframe);\n                }\n                else {\n                    /**\n                     * If we can, we want to commit the final style as set by the user,\n                     * rather than the computed keyframe value supplied by the animation.\n                     */\n                    setStyle(element, name, keyframe);\n                }\n                this.animation.cancel();\n            }\n            onComplete?.();\n            this.notifyFinished();\n        };\n    }\n    play() {\n        if (this.isStopped)\n            return;\n        this.animation.play();\n        if (this.state === \"finished\") {\n            this.updateFinished();\n        }\n    }\n    pause() {\n        this.animation.pause();\n    }\n    complete() {\n        this.animation.finish?.();\n    }\n    cancel() {\n        try {\n            this.animation.cancel();\n        }\n        catch (e) { }\n    }\n    stop() {\n        if (this.isStopped)\n            return;\n        this.isStopped = true;\n        const { state } = this;\n        if (state === \"idle\" || state === \"finished\") {\n            return;\n        }\n        if (this.updateMotionValue) {\n            this.updateMotionValue();\n        }\n        else {\n            this.commitStyles();\n        }\n        if (!this.isPseudoElement)\n            this.cancel();\n    }\n    /**\n     * WAAPI doesn't natively have any interruption capabilities.\n     *\n     * In this method, we commit styles back to the DOM before cancelling\n     * the animation.\n     *\n     * This is designed to be overridden by NativeAnimationExtended, which\n     * will create a renderless JS animation and sample it twice to calculate\n     * its current value, \"previous\" value, and therefore allow\n     * Motion to also correctly calculate velocity for any subsequent animation\n     * while deferring the commit until the next animation frame.\n     */\n    commitStyles() {\n        if (!this.isPseudoElement) {\n            this.animation.commitStyles?.();\n        }\n    }\n    get duration() {\n        const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n        return millisecondsToSeconds(Number(duration));\n    }\n    get time() {\n        return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n    }\n    set time(newTime) {\n        this.finishedTime = null;\n        this.animation.currentTime = secondsToMilliseconds(newTime);\n    }\n    /**\n     * The playback speed of the animation.\n     * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n     */\n    get speed() {\n        return this.animation.playbackRate;\n    }\n    set speed(newSpeed) {\n        // Allow backwards playback after finishing\n        if (newSpeed < 0)\n            this.finishedTime = null;\n        this.animation.playbackRate = newSpeed;\n    }\n    get state() {\n        return this.finishedTime !== null\n            ? \"finished\"\n            : this.animation.playState;\n    }\n    get startTime() {\n        return Number(this.animation.startTime);\n    }\n    set startTime(newStartTime) {\n        this.animation.startTime = newStartTime;\n    }\n    /**\n     * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n     */\n    attachTimeline({ timeline, observe }) {\n        if (this.allowFlatten) {\n            this.animation.effect?.updateTiming({ easing: \"linear\" });\n        }\n        this.animation.onfinish = null;\n        if (timeline && supportsScrollTimeline()) {\n            this.animation.timeline = timeline;\n            return noop;\n        }\n        else {\n            return observe(this);\n        }\n    }\n}\n\nexport { NativeAnimation };\n","import { anticipate, backInOut, circInOut } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n    anticipate,\n    backInOut,\n    circInOut,\n};\nfunction isUnsupportedEase(key) {\n    return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n    if (typeof transition.ease === \"string\" &&\n        isUnsupportedEase(transition.ease)) {\n        transition.ease = unsupportedEasingFunctions[transition.ease];\n    }\n}\n\nexport { replaceStringEasing };\n","import { secondsToMilliseconds } from 'motion-utils';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n    constructor(options) {\n        /**\n         * The base NativeAnimation function only supports a subset\n         * of Motion easings, and WAAPI also only supports some\n         * easing functions via string/cubic-bezier definitions.\n         *\n         * This function replaces those unsupported easing functions\n         * with a JS easing function. This will later get compiled\n         * to a linear() easing function.\n         */\n        replaceStringEasing(options);\n        /**\n         * Ensure we replace the transition type with a generator function\n         * before passing to WAAPI.\n         *\n         * TODO: Does this have a better home? It could be shared with\n         * JSAnimation.\n         */\n        replaceTransitionType(options);\n        super(options);\n        if (options.startTime) {\n            this.startTime = options.startTime;\n        }\n        this.options = options;\n    }\n    /**\n     * WAAPI doesn't natively have any interruption capabilities.\n     *\n     * Rather than read commited styles back out of the DOM, we can\n     * create a renderless JS animation and sample it twice to calculate\n     * its current value, \"previous\" value, and therefore allow\n     * Motion to calculate velocity for any subsequent animation.\n     */\n    updateMotionValue(value) {\n        const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n        if (!motionValue)\n            return;\n        if (value !== undefined) {\n            motionValue.set(value);\n            return;\n        }\n        const sampleAnimation = new JSAnimation({\n            ...options,\n            autoplay: false,\n        });\n        const sampleTime = secondsToMilliseconds(this.finishedTime ?? this.time);\n        motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n        sampleAnimation.stop();\n    }\n}\n\nexport { NativeAnimationExtended };\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n    // If the list of keys tat might be non-animatable grows, replace with Set\n    if (name === \"zIndex\")\n        return false;\n    // If it's a number or a keyframes array, we can animate it. We might at some point\n    // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n    // but for now lets leave it like this for performance reasons\n    if (typeof value === \"number\" || Array.isArray(value))\n        return true;\n    if (typeof value === \"string\" && // It's animatable if we have a string\n        (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n        !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n    ) {\n        return true;\n    }\n    return false;\n};\n\nexport { isAnimatable };\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n    const current = keyframes[0];\n    if (keyframes.length === 1)\n        return true;\n    for (let i = 0; i < keyframes.length; i++) {\n        if (keyframes[i] !== current)\n            return true;\n    }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n    /**\n     * Check if we're able to animate between the start and end keyframes,\n     * and throw a warning if we're attempting to animate between one that's\n     * animatable and another that isn't.\n     */\n    const originKeyframe = keyframes[0];\n    if (originKeyframe === null)\n        return false;\n    /**\n     * These aren't traditionally animatable but we do support them.\n     * In future we could look into making this more generic or replacing\n     * this function with mix() === mixImmediate\n     */\n    if (name === \"display\" || name === \"visibility\")\n        return true;\n    const targetKeyframe = keyframes[keyframes.length - 1];\n    const isOriginAnimatable = isAnimatable(originKeyframe, name);\n    const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n    warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n    // Always skip if any of these are true\n    if (!isOriginAnimatable || !isTargetAnimatable) {\n        return false;\n    }\n    return (hasKeyframesChanged(keyframes) ||\n        ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n    return isObject(element) && \"offsetHeight\" in element;\n}\n\nexport { isHTMLElement };\n","import { memo } from 'motion-utils';\nimport { isHTMLElement } from '../../../utils/is-html-element.mjs';\n\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n    \"opacity\",\n    \"clipPath\",\n    \"filter\",\n    \"transform\",\n    // TODO: Could be re-enabled now we have support for linear() easing\n    // \"background-color\"\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n    const { motionValue, name, repeatDelay, repeatType, damping, type } = options;\n    if (!isHTMLElement(motionValue?.owner?.current)) {\n        return false;\n    }\n    const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n    return (supportsWaapi() &&\n        name &&\n        acceleratedValues.has(name) &&\n        (name !== \"transform\" || !transformTemplate) &&\n        /**\n         * If we're outputting values to onUpdate then we can't use WAAPI as there's\n         * no way to read the value from WAAPI every frame.\n         */\n        !onUpdate &&\n        !repeatDelay &&\n        repeatType !== \"mirror\" &&\n        damping !== 0 &&\n        type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n    constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n        super();\n        /**\n         * Bound to support return animation.stop pattern\n         */\n        this.stop = () => {\n            if (this._animation) {\n                this._animation.stop();\n                this.stopTimeline?.();\n            }\n            this.keyframeResolver?.cancel();\n        };\n        this.createdAt = time.now();\n        const optionsWithDefaults = {\n            autoplay,\n            delay,\n            type,\n            repeat,\n            repeatDelay,\n            repeatType,\n            name,\n            motionValue,\n            element,\n            ...options,\n        };\n        const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n        this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n        this.keyframeResolver?.scheduleResolve();\n    }\n    onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n        this.keyframeResolver = undefined;\n        const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n        this.resolvedAt = time.now();\n        /**\n         * If we can't animate this value with the resolved keyframes\n         * then we should complete it immediately.\n         */\n        if (!canAnimate(keyframes, name, type, velocity)) {\n            if (MotionGlobalConfig.instantAnimations || !delay) {\n                onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n            }\n            keyframes[0] = keyframes[keyframes.length - 1];\n            options.duration = 0;\n            options.repeat = 0;\n        }\n        /**\n         * Resolve startTime for the animation.\n         *\n         * This method uses the createdAt and resolvedAt to calculate the\n         * animation startTime. *Ideally*, we would use the createdAt time as t=0\n         * as the following frame would then be the first frame of the animation in\n         * progress, which would feel snappier.\n         *\n         * However, if there's a delay (main thread work) between the creation of\n         * the animation and the first commited frame, we prefer to use resolvedAt\n         * to avoid a sudden jump into the animation.\n         */\n        const startTime = sync\n            ? !this.resolvedAt\n                ? this.createdAt\n                : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n                    ? this.resolvedAt\n                    : this.createdAt\n            : undefined;\n        const resolvedOptions = {\n            startTime,\n            finalKeyframe,\n            ...options,\n            keyframes,\n        };\n        /**\n         * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n         * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n         * optimised animation.\n         */\n        const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n            ? new NativeAnimationExtended({\n                ...resolvedOptions,\n                element: resolvedOptions.motionValue.owner.current,\n            })\n            : new JSAnimation(resolvedOptions);\n        animation.finished.then(() => this.notifyFinished()).catch(noop);\n        if (this.pendingTimeline) {\n            this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n            this.pendingTimeline = undefined;\n        }\n        this._animation = animation;\n    }\n    get finished() {\n        if (!this._animation) {\n            return this._finished;\n        }\n        else {\n            return this.animation.finished;\n        }\n    }\n    then(onResolve, _onReject) {\n        return this.finished.finally(onResolve).then(() => { });\n    }\n    get animation() {\n        if (!this._animation) {\n            this.keyframeResolver?.resume();\n            flushKeyframeResolvers();\n        }\n        return this._animation;\n    }\n    get duration() {\n        return this.animation.duration;\n    }\n    get time() {\n        return this.animation.time;\n    }\n    set time(newTime) {\n        this.animation.time = newTime;\n    }\n    get speed() {\n        return this.animation.speed;\n    }\n    get state() {\n        return this.animation.state;\n    }\n    set speed(newSpeed) {\n        this.animation.speed = newSpeed;\n    }\n    get startTime() {\n        return this.animation.startTime;\n    }\n    attachTimeline(timeline) {\n        if (this._animation) {\n            this.stopTimeline = this.animation.attachTimeline(timeline);\n        }\n        else {\n            this.pendingTimeline = timeline;\n        }\n        return () => this.stop();\n    }\n    play() {\n        this.animation.play();\n    }\n    pause() {\n        this.animation.pause();\n    }\n    complete() {\n        this.animation.complete();\n    }\n    cancel() {\n        if (this._animation) {\n            this.animation.cancel();\n        }\n        this.keyframeResolver?.cancel();\n    }\n}\n\nexport { AsyncMotionValueAnimation };\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n    const match = splitCSSVariableRegex.exec(current);\n    if (!match)\n        return [,];\n    const [, token1, token2, fallback] = match;\n    return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n    invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n    const [token, fallback] = parseCSSVariable(current);\n    // No CSS variable detected\n    if (!token)\n        return;\n    // Attempt to read this CSS variable off the element\n    const resolved = window.getComputedStyle(element).getPropertyValue(token);\n    if (resolved) {\n        const trimmed = resolved.trim();\n        return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n    }\n    return isCSSVariableToken(fallback)\n        ? getVariableValue(fallback, element, depth + 1)\n        : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n","function getValueTransition(transition, key) {\n    return (transition?.[key] ??\n        transition?.[\"default\"] ??\n        transition);\n}\n\nexport { getValueTransition };\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n    \"width\",\n    \"height\",\n    \"top\",\n    \"left\",\n    \"right\",\n    \"bottom\",\n    ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n    test: (v) => v === \"auto\",\n    parse: (v) => v,\n};\n\nexport { auto };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n    if (typeof value === \"number\") {\n        return value === 0;\n    }\n    else if (value !== null) {\n        return value === \"none\" || value === \"0\" || isZeroValueString(value);\n    }\n    else {\n        return true;\n    }\n}\n\nexport { isNone };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n    const [name, value] = v.slice(0, -1).split(\"(\");\n    if (name === \"drop-shadow\")\n        return v;\n    const [number] = value.match(floatRegex) || [];\n    if (!number)\n        return v;\n    const unit = value.replace(number, \"\");\n    let defaultValue = maxDefaults.has(name) ? 1 : 0;\n    if (number !== value)\n        defaultValue *= 100;\n    return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n    ...complex,\n    getAnimatableNone: (v) => {\n        const functions = v.match(functionRegex);\n        return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n    },\n};\n\nexport { filter };\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n    ...number,\n    transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../numbers/index.mjs';\nimport { degrees, px, progressPercentage } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n    rotate: degrees,\n    rotateX: degrees,\n    rotateY: degrees,\n    rotateZ: degrees,\n    scale,\n    scaleX: scale,\n    scaleY: scale,\n    scaleZ: scale,\n    skew: degrees,\n    skewX: degrees,\n    skewY: degrees,\n    distance: px,\n    translateX: px,\n    translateY: px,\n    translateZ: px,\n    x: px,\n    y: px,\n    z: px,\n    perspective: px,\n    transformPerspective: px,\n    opacity: alpha,\n    originX: progressPercentage,\n    originY: progressPercentage,\n    originZ: px,\n};\n\nexport { transformValueTypes };\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n    // Border props\n    borderWidth: px,\n    borderTopWidth: px,\n    borderRightWidth: px,\n    borderBottomWidth: px,\n    borderLeftWidth: px,\n    borderRadius: px,\n    radius: px,\n    borderTopLeftRadius: px,\n    borderTopRightRadius: px,\n    borderBottomRightRadius: px,\n    borderBottomLeftRadius: px,\n    // Positioning props\n    width: px,\n    maxWidth: px,\n    height: px,\n    maxHeight: px,\n    top: px,\n    right: px,\n    bottom: px,\n    left: px,\n    // Spacing props\n    padding: px,\n    paddingTop: px,\n    paddingRight: px,\n    paddingBottom: px,\n    paddingLeft: px,\n    margin: px,\n    marginTop: px,\n    marginRight: px,\n    marginBottom: px,\n    marginLeft: px,\n    // Misc\n    backgroundPositionX: px,\n    backgroundPositionY: px,\n    ...transformValueTypes,\n    zIndex: int,\n    // SVG\n    fillOpacity: alpha,\n    strokeOpacity: alpha,\n    numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n    ...numberValueTypes,\n    // Color props\n    color,\n    backgroundColor: color,\n    outlineColor: color,\n    fill: color,\n    stroke: color,\n    // Border props\n    borderColor: color,\n    borderTopColor: color,\n    borderRightColor: color,\n    borderBottomColor: color,\n    borderLeftColor: color,\n    filter,\n    WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n    let defaultValueType = getDefaultValueType(key);\n    if (defaultValueType !== filter)\n        defaultValueType = complex;\n    // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n    return defaultValueType.getAnimatableNone\n        ? defaultValueType.getAnimatableNone(value)\n        : undefined;\n}\n\nexport { getAnimatableNone };\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n    let i = 0;\n    let animatableTemplate = undefined;\n    while (i < unresolvedKeyframes.length && !animatableTemplate) {\n        const keyframe = unresolvedKeyframes[i];\n        if (typeof keyframe === \"string\" &&\n            !invalidTemplates.has(keyframe) &&\n            analyseComplexValue(keyframe).values.length) {\n            animatableTemplate = unresolvedKeyframes[i];\n        }\n        i++;\n    }\n    if (animatableTemplate && name) {\n        for (const noneIndex of noneKeyframeIndexes) {\n            unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n        }\n    }\n}\n\nexport { makeNoneKeyframesAnimatable };\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { isNumOrPxType, positionalValues } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n    constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n        super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n    }\n    readKeyframes() {\n        const { unresolvedKeyframes, element, name } = this;\n        if (!element || !element.current)\n            return;\n        super.readKeyframes();\n        /**\n         * If any keyframe is a CSS variable, we need to find its value by sampling the element\n         */\n        for (let i = 0; i < unresolvedKeyframes.length; i++) {\n            let keyframe = unresolvedKeyframes[i];\n            if (typeof keyframe === \"string\") {\n                keyframe = keyframe.trim();\n                if (isCSSVariableToken(keyframe)) {\n                    const resolved = getVariableValue(keyframe, element.current);\n                    if (resolved !== undefined) {\n                        unresolvedKeyframes[i] = resolved;\n                    }\n                    if (i === unresolvedKeyframes.length - 1) {\n                        this.finalKeyframe = keyframe;\n                    }\n                }\n            }\n        }\n        /**\n         * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n         * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n         * have a far bigger performance impact.\n         */\n        this.resolveNoneKeyframes();\n        /**\n         * Check to see if unit type has changed. If so schedule jobs that will\n         * temporarily set styles to the destination keyframes.\n         * Skip if we have more than two keyframes or this isn't a positional value.\n         * TODO: We can throw if there are multiple keyframes and the value type changes.\n         */\n        if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n            return;\n        }\n        const [origin, target] = unresolvedKeyframes;\n        const originType = findDimensionValueType(origin);\n        const targetType = findDimensionValueType(target);\n        /**\n         * Either we don't recognise these value types or we can animate between them.\n         */\n        if (originType === targetType)\n            return;\n        /**\n         * If both values are numbers or pixels, we can animate between them by\n         * converting them to numbers.\n         */\n        if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n            for (let i = 0; i < unresolvedKeyframes.length; i++) {\n                const value = unresolvedKeyframes[i];\n                if (typeof value === \"string\") {\n                    unresolvedKeyframes[i] = parseFloat(value);\n                }\n            }\n        }\n        else if (positionalValues[name]) {\n            /**\n             * Else, the only way to resolve this is by measuring the element.\n             */\n            this.needsMeasurement = true;\n        }\n    }\n    resolveNoneKeyframes() {\n        const { unresolvedKeyframes, name } = this;\n        const noneKeyframeIndexes = [];\n        for (let i = 0; i < unresolvedKeyframes.length; i++) {\n            if (unresolvedKeyframes[i] === null ||\n                isNone(unresolvedKeyframes[i])) {\n                noneKeyframeIndexes.push(i);\n            }\n        }\n        if (noneKeyframeIndexes.length) {\n            makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n        }\n    }\n    measureInitialState() {\n        const { element, unresolvedKeyframes, name } = this;\n        if (!element || !element.current)\n            return;\n        if (name === \"height\") {\n            this.suspendedScrollY = window.pageYOffset;\n        }\n        this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n        unresolvedKeyframes[0] = this.measuredOrigin;\n        // Set final key frame to measure after next render\n        const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n        if (measureKeyframe !== undefined) {\n            element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n        }\n    }\n    measureEndState() {\n        const { element, name, unresolvedKeyframes } = this;\n        if (!element || !element.current)\n            return;\n        const value = element.getValue(name);\n        value && value.jump(this.measuredOrigin, false);\n        const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n        const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n        unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n        if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n            this.finalKeyframe = finalKeyframe;\n        }\n        // If we removed transform values, reapply them before the next render\n        if (this.removedTransforms?.length) {\n            this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n                element\n                    .getValue(unsetTransformName)\n                    .set(unsetTransformValue);\n            });\n        }\n        this.resolveNoneKeyframes();\n    }\n}\n\nexport { DOMKeyframesResolver };\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n    if (elementOrSelector instanceof EventTarget) {\n        return [elementOrSelector];\n    }\n    else if (typeof elementOrSelector === \"string\") {\n        let root = document;\n        if (scope) {\n            root = scope.current;\n        }\n        const elements = selectorCache?.[elementOrSelector] ??\n            root.querySelectorAll(elementOrSelector);\n        return elements ? Array.from(elements) : [];\n    }\n    return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n    return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n    current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n    /**\n     * @param init - The initiating value\n     * @param config - Optional configuration options\n     *\n     * -  `transformer`: A function to transform incoming values with.\n     */\n    constructor(init, options = {}) {\n        /**\n         * Tracks whether this value can output a velocity. Currently this is only true\n         * if the value is numerical, but we might be able to widen the scope here and support\n         * other value types.\n         *\n         * @internal\n         */\n        this.canTrackVelocity = null;\n        /**\n         * An object containing a SubscriptionManager for each active event.\n         */\n        this.events = {};\n        this.updateAndNotify = (v, render = true) => {\n            const currentTime = time.now();\n            /**\n             * If we're updating the value during another frame or eventloop\n             * than the previous frame, then the we set the previous frame value\n             * to current.\n             */\n            if (this.updatedAt !== currentTime) {\n                this.setPrevFrameValue();\n            }\n            this.prev = this.current;\n            this.setCurrent(v);\n            // Update update subscribers\n            if (this.current !== this.prev) {\n                this.events.change?.notify(this.current);\n                if (this.dependents) {\n                    for (const dependent of this.dependents) {\n                        dependent.dirty();\n                    }\n                }\n            }\n            // Update render subscribers\n            if (render) {\n                this.events.renderRequest?.notify(this.current);\n            }\n        };\n        this.hasAnimated = false;\n        this.setCurrent(init);\n        this.owner = options.owner;\n    }\n    setCurrent(current) {\n        this.current = current;\n        this.updatedAt = time.now();\n        if (this.canTrackVelocity === null && current !== undefined) {\n            this.canTrackVelocity = isFloat(this.current);\n        }\n    }\n    setPrevFrameValue(prevFrameValue = this.current) {\n        this.prevFrameValue = prevFrameValue;\n        this.prevUpdatedAt = this.updatedAt;\n    }\n    /**\n     * Adds a function that will be notified when the `MotionValue` is updated.\n     *\n     * It returns a function that, when called, will cancel the subscription.\n     *\n     * When calling `onChange` inside a React component, it should be wrapped with the\n     * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n     * from the `useEffect` function to ensure you don't add duplicate subscribers..\n     *\n     * ```jsx\n     * export const MyComponent = () => {\n     *   const x = useMotionValue(0)\n     *   const y = useMotionValue(0)\n     *   const opacity = useMotionValue(1)\n     *\n     *   useEffect(() => {\n     *     function updateOpacity() {\n     *       const maxXY = Math.max(x.get(), y.get())\n     *       const newOpacity = transform(maxXY, [0, 100], [1, 0])\n     *       opacity.set(newOpacity)\n     *     }\n     *\n     *     const unsubscribeX = x.on(\"change\", updateOpacity)\n     *     const unsubscribeY = y.on(\"change\", updateOpacity)\n     *\n     *     return () => {\n     *       unsubscribeX()\n     *       unsubscribeY()\n     *     }\n     *   }, [])\n     *\n     *   return <motion.div style={{ x }} />\n     * }\n     * ```\n     *\n     * @param subscriber - A function that receives the latest value.\n     * @returns A function that, when called, will cancel this subscription.\n     *\n     * @deprecated\n     */\n    onChange(subscription) {\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n        }\n        return this.on(\"change\", subscription);\n    }\n    on(eventName, callback) {\n        if (!this.events[eventName]) {\n            this.events[eventName] = new SubscriptionManager();\n        }\n        const unsubscribe = this.events[eventName].add(callback);\n        if (eventName === \"change\") {\n            return () => {\n                unsubscribe();\n                /**\n                 * If we have no more change listeners by the start\n                 * of the next frame, stop active animations.\n                 */\n                frame.read(() => {\n                    if (!this.events.change.getSize()) {\n                        this.stop();\n                    }\n                });\n            };\n        }\n        return unsubscribe;\n    }\n    clearListeners() {\n        for (const eventManagers in this.events) {\n            this.events[eventManagers].clear();\n        }\n    }\n    /**\n     * Attaches a passive effect to the `MotionValue`.\n     */\n    attach(passiveEffect, stopPassiveEffect) {\n        this.passiveEffect = passiveEffect;\n        this.stopPassiveEffect = stopPassiveEffect;\n    }\n    /**\n     * Sets the state of the `MotionValue`.\n     *\n     * @remarks\n     *\n     * ```jsx\n     * const x = useMotionValue(0)\n     * x.set(10)\n     * ```\n     *\n     * @param latest - Latest value to set.\n     * @param render - Whether to notify render subscribers. Defaults to `true`\n     *\n     * @public\n     */\n    set(v, render = true) {\n        if (!render || !this.passiveEffect) {\n            this.updateAndNotify(v, render);\n        }\n        else {\n            this.passiveEffect(v, this.updateAndNotify);\n        }\n    }\n    setWithVelocity(prev, current, delta) {\n        this.set(current);\n        this.prev = undefined;\n        this.prevFrameValue = prev;\n        this.prevUpdatedAt = this.updatedAt - delta;\n    }\n    /**\n     * Set the state of the `MotionValue`, stopping any active animations,\n     * effects, and resets velocity to `0`.\n     */\n    jump(v, endAnimation = true) {\n        this.updateAndNotify(v);\n        this.prev = v;\n        this.prevUpdatedAt = this.prevFrameValue = undefined;\n        endAnimation && this.stop();\n        if (this.stopPassiveEffect)\n            this.stopPassiveEffect();\n    }\n    dirty() {\n        this.events.change?.notify(this.current);\n    }\n    addDependent(dependent) {\n        if (!this.dependents) {\n            this.dependents = new Set();\n        }\n        this.dependents.add(dependent);\n    }\n    removeDependent(dependent) {\n        if (this.dependents) {\n            this.dependents.delete(dependent);\n        }\n    }\n    /**\n     * Returns the latest state of `MotionValue`\n     *\n     * @returns - The latest state of `MotionValue`\n     *\n     * @public\n     */\n    get() {\n        if (collectMotionValues.current) {\n            collectMotionValues.current.push(this);\n        }\n        return this.current;\n    }\n    /**\n     * @public\n     */\n    getPrevious() {\n        return this.prev;\n    }\n    /**\n     * Returns the latest velocity of `MotionValue`\n     *\n     * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n     *\n     * @public\n     */\n    getVelocity() {\n        const currentTime = time.now();\n        if (!this.canTrackVelocity ||\n            this.prevFrameValue === undefined ||\n            currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n            return 0;\n        }\n        const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n        // Casts because of parseFloat's poor typing\n        return velocityPerSecond(parseFloat(this.current) -\n            parseFloat(this.prevFrameValue), delta);\n    }\n    /**\n     * Registers a new animation to control this `MotionValue`. Only one\n     * animation can drive a `MotionValue` at one time.\n     *\n     * ```jsx\n     * value.start()\n     * ```\n     *\n     * @param animation - A function that starts the provided animation\n     */\n    start(startAnimation) {\n        this.stop();\n        return new Promise((resolve) => {\n            this.hasAnimated = true;\n            this.animation = startAnimation(resolve);\n            if (this.events.animationStart) {\n                this.events.animationStart.notify();\n            }\n        }).then(() => {\n            if (this.events.animationComplete) {\n                this.events.animationComplete.notify();\n            }\n            this.clearAnimation();\n        });\n    }\n    /**\n     * Stop the currently active animation.\n     *\n     * @public\n     */\n    stop() {\n        if (this.animation) {\n            this.animation.stop();\n            if (this.events.animationCancel) {\n                this.events.animationCancel.notify();\n            }\n        }\n        this.clearAnimation();\n    }\n    /**\n     * Returns `true` if this value is currently animating.\n     *\n     * @public\n     */\n    isAnimating() {\n        return !!this.animation;\n    }\n    clearAnimation() {\n        delete this.animation;\n    }\n    /**\n     * Destroy and clean up subscribers to this `MotionValue`.\n     *\n     * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n     * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n     * created a `MotionValue` via the `motionValue` function.\n     *\n     * @public\n     */\n    destroy() {\n        this.dependents?.clear();\n        this.events.destroy?.notify();\n        this.clearListeners();\n        this.stop();\n        if (this.stopPassiveEffect) {\n            this.stopPassiveEffect();\n        }\n    }\n}\nfunction motionValue(init, options) {\n    return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n    return type && typeof value === \"number\"\n        ? type.transform(value)\n        : value;\n};\n\nexport { getValueAsType };\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n","const isDragging = {\n    x: false,\n    y: false,\n};\nfunction isDragActive() {\n    return isDragging.x || isDragging.y;\n}\n\nexport { isDragActive, isDragging };\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nfunction setupGesture(elementOrSelector, options) {\n    const elements = resolveElements(elementOrSelector);\n    const gestureAbortController = new AbortController();\n    const eventOptions = {\n        passive: true,\n        ...options,\n        signal: gestureAbortController.signal,\n    };\n    const cancel = () => gestureAbortController.abort();\n    return [elements, eventOptions, cancel];\n}\n\nexport { setupGesture };\n","import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n    return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n    const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n    const onPointerEnter = (enterEvent) => {\n        if (!isValidHover(enterEvent))\n            return;\n        const { target } = enterEvent;\n        const onHoverEnd = onHoverStart(target, enterEvent);\n        if (typeof onHoverEnd !== \"function\" || !target)\n            return;\n        const onPointerLeave = (leaveEvent) => {\n            if (!isValidHover(leaveEvent))\n                return;\n            onHoverEnd(leaveEvent);\n            target.removeEventListener(\"pointerleave\", onPointerLeave);\n        };\n        target.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n    };\n    elements.forEach((element) => {\n        element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n    });\n    return cancel;\n}\n\nexport { hover };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n    if (!child) {\n        return false;\n    }\n    else if (parent === child) {\n        return true;\n    }\n    else {\n        return isNodeOrChild(parent, child.parentElement);\n    }\n};\n\nexport { isNodeOrChild };\n","const isPrimaryPointer = (event) => {\n    if (event.pointerType === \"mouse\") {\n        return typeof event.button !== \"number\" || event.button <= 0;\n    }\n    else {\n        /**\n         * isPrimary is true for all mice buttons, whereas every touch point\n         * is regarded as its own input. So subsequent concurrent touch points\n         * will be false.\n         *\n         * Specifically match against false here as incomplete versions of\n         * PointerEvents in very old browser might have it set as undefined.\n         */\n        return event.isPrimary !== false;\n    }\n};\n\nexport { isPrimaryPointer };\n","const focusableElements = new Set([\n    \"BUTTON\",\n    \"INPUT\",\n    \"SELECT\",\n    \"TEXTAREA\",\n    \"A\",\n]);\nfunction isElementKeyboardAccessible(element) {\n    return (focusableElements.has(element.tagName) ||\n        element.tabIndex !== -1);\n}\n\nexport { isElementKeyboardAccessible };\n","const isPressing = new WeakSet();\n\nexport { isPressing };\n","import { isPressing } from './state.mjs';\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback) {\n    return (event) => {\n        if (event.key !== \"Enter\")\n            return;\n        callback(event);\n    };\n}\nfunction firePointerEvent(target, type) {\n    target.dispatchEvent(new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true }));\n}\nconst enableKeyboardPress = (focusEvent, eventOptions) => {\n    const element = focusEvent.currentTarget;\n    if (!element)\n        return;\n    const handleKeydown = filterEvents(() => {\n        if (isPressing.has(element))\n            return;\n        firePointerEvent(element, \"down\");\n        const handleKeyup = filterEvents(() => {\n            firePointerEvent(element, \"up\");\n        });\n        const handleBlur = () => firePointerEvent(element, \"cancel\");\n        element.addEventListener(\"keyup\", handleKeyup, eventOptions);\n        element.addEventListener(\"blur\", handleBlur, eventOptions);\n    });\n    element.addEventListener(\"keydown\", handleKeydown, eventOptions);\n    /**\n     * Add an event listener that fires on blur to remove the keydown events.\n     */\n    element.addEventListener(\"blur\", () => element.removeEventListener(\"keydown\", handleKeydown), eventOptions);\n};\n\nexport { enableKeyboardPress };\n","import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n    return isPrimaryPointer(event) && !isDragActive();\n}\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n *  trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n    const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n    const startPress = (startEvent) => {\n        const target = startEvent.currentTarget;\n        if (!isValidPressEvent(startEvent))\n            return;\n        isPressing.add(target);\n        const onPressEnd = onPressStart(target, startEvent);\n        const onPointerEnd = (endEvent, success) => {\n            window.removeEventListener(\"pointerup\", onPointerUp);\n            window.removeEventListener(\"pointercancel\", onPointerCancel);\n            if (isPressing.has(target)) {\n                isPressing.delete(target);\n            }\n            if (!isValidPressEvent(endEvent)) {\n                return;\n            }\n            if (typeof onPressEnd === \"function\") {\n                onPressEnd(endEvent, { success });\n            }\n        };\n        const onPointerUp = (upEvent) => {\n            onPointerEnd(upEvent, target === window ||\n                target === document ||\n                options.useGlobalTarget ||\n                isNodeOrChild(target, upEvent.target));\n        };\n        const onPointerCancel = (cancelEvent) => {\n            onPointerEnd(cancelEvent, false);\n        };\n        window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n        window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions);\n    };\n    targets.forEach((target) => {\n        const pointerDownTarget = options.useGlobalTarget ? window : target;\n        pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n        if (isHTMLElement(target)) {\n            target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n            if (!isElementKeyboardAccessible(target) &&\n                !target.hasAttribute(\"tabindex\")) {\n                target.tabIndex = 0;\n            }\n        }\n    });\n    return cancelEvents;\n}\n\nexport { press };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n    transformPagePoint: (p) => p,\n    isStatic: false,\n    reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","export { AsyncMotionValueAnimation } from './animation/AsyncMotionValueAnimation.mjs';\nexport { GroupAnimation } from './animation/GroupAnimation.mjs';\nexport { GroupAnimationWithThen } from './animation/GroupAnimationWithThen.mjs';\nexport { JSAnimation, animateValue } from './animation/JSAnimation.mjs';\nexport { NativeAnimation } from './animation/NativeAnimation.mjs';\nexport { NativeAnimationExtended } from './animation/NativeAnimationExtended.mjs';\nexport { NativeAnimationWrapper } from './animation/NativeAnimationWrapper.mjs';\nexport { animationMapKey, getAnimationMap } from './animation/utils/active-animations.mjs';\nexport { getVariableValue, parseCSSVariable } from './animation/utils/css-variables-conversion.mjs';\nexport { getValueTransition } from './animation/utils/get-value-transition.mjs';\nexport { isCSSVariableName, isCSSVariableToken } from './animation/utils/is-css-variable.mjs';\nexport { inertia } from './animation/generators/inertia.mjs';\nexport { defaultEasing, keyframes } from './animation/generators/keyframes.mjs';\nexport { spring } from './animation/generators/spring/index.mjs';\nexport { calcGeneratorDuration, maxGeneratorDuration } from './animation/generators/utils/calc-duration.mjs';\nexport { createGeneratorEasing } from './animation/generators/utils/create-generator-easing.mjs';\nexport { isGenerator } from './animation/generators/utils/is-generator.mjs';\nexport { DOMKeyframesResolver } from './animation/keyframes/DOMKeyframesResolver.mjs';\nexport { KeyframeResolver, flushKeyframeResolvers } from './animation/keyframes/KeyframesResolver.mjs';\nexport { defaultOffset } from './animation/keyframes/offsets/default.mjs';\nexport { fillOffset } from './animation/keyframes/offsets/fill.mjs';\nexport { convertOffsetToTimes } from './animation/keyframes/offsets/time.mjs';\nexport { applyPxDefaults } from './animation/keyframes/utils/apply-px-defaults.mjs';\nexport { fillWildcards } from './animation/keyframes/utils/fill-wildcards.mjs';\nexport { cubicBezierAsString } from './animation/waapi/easing/cubic-bezier.mjs';\nexport { isWaapiSupportedEasing } from './animation/waapi/easing/is-supported.mjs';\nexport { mapEasingToNativeEasing } from './animation/waapi/easing/map-easing.mjs';\nexport { supportedWaapiEasing } from './animation/waapi/easing/supported.mjs';\nexport { startWaapiAnimation } from './animation/waapi/start-waapi-animation.mjs';\nexport { supportsPartialKeyframes } from './animation/waapi/supports/partial-keyframes.mjs';\nexport { supportsBrowserAnimation } from './animation/waapi/supports/waapi.mjs';\nexport { acceleratedValues } from './animation/waapi/utils/accelerated-values.mjs';\nexport { generateLinearEasing } from './animation/waapi/utils/linear.mjs';\nexport { styleEffect } from './effects/style/index.mjs';\nexport { createRenderBatcher } from './frameloop/batcher.mjs';\nexport { cancelMicrotask, microtask } from './frameloop/microtask.mjs';\nexport { time } from './frameloop/sync-time.mjs';\nexport { isDragActive, isDragging } from './gestures/drag/state/is-active.mjs';\nexport { setDragLock } from './gestures/drag/state/set-active.mjs';\nexport { hover } from './gestures/hover.mjs';\nexport { press } from './gestures/press/index.mjs';\nexport { isNodeOrChild } from './gestures/utils/is-node-or-child.mjs';\nexport { isPrimaryPointer } from './gestures/utils/is-primary-pointer.mjs';\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue } from './render/dom/parse-transform.mjs';\nexport { getComputedStyle } from './render/dom/style-computed.mjs';\nexport { setStyle } from './render/dom/style-set.mjs';\nexport { positionalKeys } from './render/utils/keys-position.mjs';\nexport { transformPropOrder, transformProps } from './render/utils/keys-transform.mjs';\nexport { observeTimeline } from './scroll/observe.mjs';\nexport { recordStats } from './stats/index.mjs';\nexport { activeAnimations } from './stats/animation-count.mjs';\nexport { statsBuffer } from './stats/buffer.mjs';\nexport { interpolate } from './utils/interpolate.mjs';\nexport { isHTMLElement } from './utils/is-html-element.mjs';\nexport { isSVGElement } from './utils/is-svg-element.mjs';\nexport { isSVGSVGElement } from './utils/is-svg-svg-element.mjs';\nexport { mix } from './utils/mix/index.mjs';\nexport { mixColor, mixLinearColor } from './utils/mix/color.mjs';\nexport { getMixer, mixArray, mixComplex, mixObject } from './utils/mix/complex.mjs';\nexport { mixImmediate } from './utils/mix/immediate.mjs';\nexport { mixNumber } from './utils/mix/number.mjs';\nexport { invisibleValues, mixVisibility } from './utils/mix/visibility.mjs';\nexport { resolveElements } from './utils/resolve-elements.mjs';\nexport { supportsFlags } from './utils/supports/flags.mjs';\nexport { supportsLinearEasing } from './utils/supports/linear-easing.mjs';\nexport { supportsScrollTimeline } from './utils/supports/scroll-timeline.mjs';\nexport { transform } from './utils/transform.mjs';\nexport { MotionValue, collectMotionValues, motionValue } from './value/index.mjs';\nexport { mapValue } from './value/map-value.mjs';\nexport { attachSpring, springValue } from './value/spring-value.mjs';\nexport { transformValue } from './value/transform-value.mjs';\nexport { color } from './value/types/color/index.mjs';\nexport { hex } from './value/types/color/hex.mjs';\nexport { hsla } from './value/types/color/hsla.mjs';\nexport { hslaToRgba } from './value/types/color/hsla-to-rgba.mjs';\nexport { rgbUnit, rgba } from './value/types/color/rgba.mjs';\nexport { analyseComplexValue, complex } from './value/types/complex/index.mjs';\nexport { dimensionValueTypes, findDimensionValueType } from './value/types/dimensions.mjs';\nexport { defaultValueTypes, getDefaultValueType } from './value/types/maps/defaults.mjs';\nexport { numberValueTypes } from './value/types/maps/number.mjs';\nexport { transformValueTypes } from './value/types/maps/transform.mjs';\nexport { alpha, number, scale } from './value/types/numbers/index.mjs';\nexport { degrees, percent, progressPercentage, px, vh, vw } from './value/types/numbers/units.mjs';\nexport { testValueType } from './value/types/test.mjs';\nexport { getAnimatableNone } from './value/types/utils/animatable-none.mjs';\nexport { findValueType } from './value/types/utils/find.mjs';\nexport { getValueAsType } from './value/types/utils/get-as-type.mjs';\nexport { isMotionValue } from './value/utils/is-motion-value.mjs';\nexport { ViewTransitionBuilder, animateView } from './view/index.mjs';\nexport { cancelSync, sync } from './frameloop/index-legacy.mjs';\nexport { cancelFrame, frame, frameData, frameSteps } from './frameloop/frame.mjs';\n","\"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';\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 (element && prevProps.isPresent && !this.props.isPresent) {\n            const parent = element.offsetParent;\n            const parentWidth = isHTMLElement(parent)\n                ? parent.offsetWidth || 0\n                : 0;\n            const size = this.props.sizeRef.current;\n            size.height = element.offsetHeight || 0;\n            size.width = element.offsetWidth || 0;\n            size.top = element.offsetTop;\n            size.left = element.offsetLeft;\n            size.right = parentWidth - size.width - size.left;\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 }) {\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    });\n    const { nonce } = useContext(MotionConfigContext);\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 } = size.current;\n        if (isPresent || !ref.current || !width || !height)\n            return;\n        const x = anchorX === \"left\" ? `left: ${left}` : `right: ${right}`;\n        ref.current.dataset.motionPopId = id;\n        const style = document.createElement(\"style\");\n        if (nonce)\n            style.nonce = nonce;\n        document.head.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            top: ${top}px !important;\n          }\n        `);\n        }\n        return () => {\n            if (document.head.contains(style)) {\n                document.head.removeChild(style);\n            }\n        };\n    }, [isPresent]);\n    return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {\n    const presenceChildren = useConstant(newChildrenMap);\n    const id = useId();\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 () => presenceChildren.delete(childId);\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    if (mode === \"popLayout\") {\n        children = (jsx(PopChild, { isPresent: isPresent, anchorX: anchorX, children: children }));\n    }\n    return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n    return new Map();\n}\n\nexport { PresenceChild };\n","import { 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 the tree, but\n * `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","import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n    const filtered = [];\n    // We use forEach here instead of map as map mutates the component key by preprending `.$`\n    Children.forEach(children, (child) => {\n        if (isValidElement(child))\n            filtered.push(child);\n    });\n    return filtered;\n}\n\nexport { getChildKey, onlyElements };\n","\"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\", }) => {\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     * 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            }\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 (exitComplete.has(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, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, children: child }, key));\n        }) }));\n};\n\nexport { AnimatePresence };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","const featureProps = {\n    animation: [\n        \"animate\",\n        \"variants\",\n        \"whileHover\",\n        \"whileTap\",\n        \"exit\",\n        \"whileInView\",\n        \"whileFocus\",\n        \"whileDrag\",\n    ],\n    exit: [\"exit\"],\n    drag: [\"drag\", \"dragControls\"],\n    focus: [\"whileFocus\"],\n    hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n    tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n    pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n    inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n    layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n    featureDefinitions[key] = {\n        isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n    };\n}\n\nexport { featureDefinitions };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n    for (const key in features) {\n        featureDefinitions[key] = {\n            ...featureDefinitions[key],\n            ...features[key],\n        };\n    }\n}\n\nexport { loadFeatures };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useState, useRef, useEffect } from 'react';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { loadFeatures } from '../../motion/features/load-features.mjs';\n\n/**\n * Used in conjunction with the `m` component to reduce bundle size.\n *\n * `m` is a version of the `motion` component that only loads functionality\n * critical for the initial render.\n *\n * `LazyMotion` can then be used to either synchronously or asynchronously\n * load animation and gesture support.\n *\n * ```jsx\n * // Synchronous loading\n * import { LazyMotion, m, domAnimation } from \"framer-motion\"\n *\n * function App() {\n *   return (\n *     <LazyMotion features={domAnimation}>\n *       <m.div animate={{ scale: 2 }} />\n *     </LazyMotion>\n *   )\n * }\n *\n * // Asynchronous loading\n * import { LazyMotion, m } from \"framer-motion\"\n *\n * function App() {\n *   return (\n *     <LazyMotion features={() => import('./path/to/domAnimation')}>\n *       <m.div animate={{ scale: 2 }} />\n *     </LazyMotion>\n *   )\n * }\n * ```\n *\n * @public\n */\nfunction LazyMotion({ children, features, strict = false }) {\n    const [, setIsLoaded] = useState(!isLazyBundle(features));\n    const loadedRenderer = useRef(undefined);\n    /**\n     * If this is a synchronous load, load features immediately\n     */\n    if (!isLazyBundle(features)) {\n        const { renderer, ...loadedFeatures } = features;\n        loadedRenderer.current = renderer;\n        loadFeatures(loadedFeatures);\n    }\n    useEffect(() => {\n        if (isLazyBundle(features)) {\n            features().then(({ renderer, ...loadedFeatures }) => {\n                loadFeatures(loadedFeatures);\n                loadedRenderer.current = renderer;\n                setIsLoaded(true);\n            });\n        }\n    }, []);\n    return (jsx(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children }));\n}\nfunction isLazyBundle(features) {\n    return typeof features === \"function\";\n}\n\nexport { LazyMotion };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n    \"animate\",\n    \"exit\",\n    \"variants\",\n    \"initial\",\n    \"style\",\n    \"values\",\n    \"variants\",\n    \"transition\",\n    \"transformTemplate\",\n    \"custom\",\n    \"inherit\",\n    \"onBeforeLayoutMeasure\",\n    \"onAnimationStart\",\n    \"onAnimationComplete\",\n    \"onUpdate\",\n    \"onDragStart\",\n    \"onDrag\",\n    \"onDragEnd\",\n    \"onMeasureDragConstraints\",\n    \"onDirectionLock\",\n    \"onDragTransitionEnd\",\n    \"_dragX\",\n    \"_dragY\",\n    \"onHoverStart\",\n    \"onHoverEnd\",\n    \"onViewportEnter\",\n    \"onViewportLeave\",\n    \"globalTapTarget\",\n    \"ignoreStrict\",\n    \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n    return (key.startsWith(\"while\") ||\n        (key.startsWith(\"drag\") && key !== \"draggable\") ||\n        key.startsWith(\"layout\") ||\n        key.startsWith(\"onTap\") ||\n        key.startsWith(\"onPan\") ||\n        key.startsWith(\"onLayout\") ||\n        validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","function memoize(fn) {\n  var cache = Object.create(null);\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n    if (!isValidProp)\n        return;\n    // Explicitly filter our events\n    shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n    /**\n     * We attempt to import this package but require won't be defined in esm environments, in that case\n     * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n     * in favour of explicit injection.\n     */\n    loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch {\n    // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n    const filteredProps = {};\n    for (const key in props) {\n        /**\n         * values is considered a valid prop by Emotion, so if it's present\n         * this will be rendered out to the DOM unless explicitly filtered.\n         *\n         * We check the type as it could be used with the `feColorMatrix`\n         * element, which we support.\n         */\n        if (key === \"values\" && typeof props.values === \"object\")\n            continue;\n        if (shouldForward(key) ||\n            (forwardMotionProps === true && isValidMotionProp(key)) ||\n            (!isDom && !isValidMotionProp(key)) ||\n            // If trying to use native HTML drag events, forward drag listeners\n            (props[\"draggable\"] &&\n                key.startsWith(\"onDrag\"))) {\n            filteredProps[key] =\n                props[key];\n        }\n    }\n    return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { warnOnce } from 'motion-utils';\n\nfunction createDOMMotionComponentProxy(componentFactory) {\n    if (typeof Proxy === \"undefined\") {\n        return componentFactory;\n    }\n    /**\n     * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n     * Rather than generating them anew every render.\n     */\n    const componentCache = new Map();\n    const deprecatedFactoryFunction = (...args) => {\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(false, \"motion() is deprecated. Use motion.create() instead.\");\n        }\n        return componentFactory(...args);\n    };\n    return new Proxy(deprecatedFactoryFunction, {\n        /**\n         * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n         * The prop name is passed through as `key` and we can use that to generate a `motion`\n         * DOM component with that name.\n         */\n        get: (_target, key) => {\n            if (key === \"create\")\n                return componentFactory;\n            /**\n             * If this element doesn't exist in the component cache, create it and cache.\n             */\n            if (!componentCache.has(key)) {\n                componentCache.set(key, componentFactory(key));\n            }\n            return componentCache.get(key);\n        },\n    });\n}\n\nexport { createDOMMotionComponentProxy };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst MotionContext = /* @__PURE__ */ createContext({});\n\nexport { MotionContext };\n","function isAnimationControls(v) {\n    return (v !== null &&\n        typeof v === \"object\" &&\n        typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n    return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","const variantPriorityOrder = [\n    \"animate\",\n    \"whileInView\",\n    \"whileFocus\",\n    \"whileHover\",\n    \"whileTap\",\n    \"whileDrag\",\n    \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n    return (isAnimationControls(props.animate) ||\n        variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n    return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n    if (isControllingVariants(props)) {\n        const { initial, animate } = props;\n        return {\n            initial: initial === false || isVariantLabel(initial)\n                ? initial\n                : undefined,\n            animate: isVariantLabel(animate) ? animate : undefined,\n        };\n    }\n    return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n    const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n    return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n    return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","function isRefObject(ref) {\n    return (ref &&\n        typeof ref === \"object\" &&\n        Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n    return useCallback((instance) => {\n        if (instance) {\n            visualState.onMount && visualState.onMount(instance);\n        }\n        if (visualElement) {\n            if (instance) {\n                visualElement.mount(instance);\n            }\n            else {\n                visualElement.unmount();\n            }\n        }\n        if (externalRef) {\n            if (typeof externalRef === \"function\") {\n                externalRef(instance);\n            }\n            else if (isRefObject(externalRef)) {\n                externalRef.current = instance;\n            }\n        }\n    }, \n    /**\n     * Only pass a new ref callback to React if we've received a visual element\n     * factory. Otherwise we'll be mounting/remounting every time externalRef\n     * or other dependencies change.\n     */\n    [visualElement]);\n}\n\nexport { useMotionRef };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { microtask } from 'motion-dom';\nimport { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor) {\n    const { visualElement: parent } = useContext(MotionContext);\n    const lazyContext = useContext(LazyContext);\n    const presenceContext = useContext(PresenceContext);\n    const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n    const visualElementRef = useRef(null);\n    /**\n     * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n     */\n    createVisualElement = createVisualElement || lazyContext.renderer;\n    if (!visualElementRef.current && createVisualElement) {\n        visualElementRef.current = createVisualElement(Component, {\n            visualState,\n            parent,\n            props,\n            presenceContext,\n            blockInitialAnimation: presenceContext\n                ? presenceContext.initial === false\n                : false,\n            reducedMotionConfig,\n        });\n    }\n    const visualElement = visualElementRef.current;\n    /**\n     * Load Motion gesture and animation features. These are rendered as renderless\n     * components so each feature can optionally make use of React lifecycle methods.\n     */\n    const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n    if (visualElement &&\n        !visualElement.projection &&\n        ProjectionNodeConstructor &&\n        (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n        createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n    }\n    const isMounted = useRef(false);\n    useInsertionEffect(() => {\n        /**\n         * Check the component has already mounted before calling\n         * `update` unnecessarily. This ensures we skip the initial update.\n         */\n        if (visualElement && isMounted.current) {\n            visualElement.update(props, presenceContext);\n        }\n    });\n    /**\n     * Cache this value as we want to know whether HandoffAppearAnimations\n     * was present on initial render - it will be deleted after this.\n     */\n    const optimisedAppearId = props[optimizedAppearDataAttribute];\n    const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n        !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n        window.MotionHasOptimisedAnimation?.(optimisedAppearId));\n    useIsomorphicLayoutEffect(() => {\n        if (!visualElement)\n            return;\n        isMounted.current = true;\n        window.MotionIsMounted = true;\n        visualElement.updateFeatures();\n        microtask.render(visualElement.render);\n        /**\n         * Ideally this function would always run in a useEffect.\n         *\n         * However, if we have optimised appear animations to handoff from,\n         * it needs to happen synchronously to ensure there's no flash of\n         * incorrect styles in the event of a hydration error.\n         *\n         * So if we detect a situtation where optimised appear animations\n         * are running, we use useLayoutEffect to trigger animations.\n         */\n        if (wantsHandoff.current && visualElement.animationState) {\n            visualElement.animationState.animateChanges();\n        }\n    });\n    useEffect(() => {\n        if (!visualElement)\n            return;\n        if (!wantsHandoff.current && visualElement.animationState) {\n            visualElement.animationState.animateChanges();\n        }\n        if (wantsHandoff.current) {\n            // This ensures all future calls to animateChanges() in this component will run in useEffect\n            queueMicrotask(() => {\n                window.MotionHandoffMarkAsComplete?.(optimisedAppearId);\n            });\n            wantsHandoff.current = false;\n        }\n    });\n    return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n    const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;\n    visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n        ? undefined\n        : getClosestProjectingNode(visualElement.parent));\n    visualElement.projection.setOptions({\n        layoutId,\n        layout,\n        alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n        visualElement,\n        /**\n         * TODO: Update options in an effect. This could be tricky as it'll be too late\n         * to update by the time layout animations run.\n         * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n         * ensuring it gets called if there's no potential layout animations.\n         *\n         */\n        animationType: typeof layout === \"string\" ? layout : \"both\",\n        initialPromotionConfig,\n        crossfade: layoutCrossfade,\n        layoutScroll,\n        layoutRoot,\n    });\n}\nfunction getClosestProjectingNode(visualElement) {\n    if (!visualElement)\n        return undefined;\n    return visualElement.options.allowProjection !== false\n        ? visualElement.projection\n        : getClosestProjectingNode(visualElement.parent);\n}\n\nexport { useVisualElement };\n","\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { featureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n    preloadedFeatures && loadFeatures(preloadedFeatures);\n    function MotionComponent(props, externalRef) {\n        /**\n         * If we need to measure the element we load this functionality in a\n         * separate class component in order to gain access to getSnapshotBeforeUpdate.\n         */\n        let MeasureLayout;\n        const configAndProps = {\n            ...useContext(MotionConfigContext),\n            ...props,\n            layoutId: useLayoutId(props),\n        };\n        const { isStatic } = configAndProps;\n        const context = useCreateMotionContext(props);\n        const visualState = useVisualState(props, isStatic);\n        if (!isStatic && isBrowser) {\n            useStrictMode(configAndProps, preloadedFeatures);\n            const layoutProjection = getProjectionFunctionality(configAndProps);\n            MeasureLayout = layoutProjection.MeasureLayout;\n            /**\n             * Create a VisualElement for this component. A VisualElement provides a common\n             * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n             * providing a way of rendering to these APIs outside of the React render loop\n             * for more performant animations and interactions\n             */\n            context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n        }\n        /**\n         * The mount order and hierarchy is specific to ensure our element ref\n         * is hydrated by the time features fire their effects.\n         */\n        return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n    }\n    MotionComponent.displayName = `motion.${typeof Component === \"string\"\n        ? Component\n        : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n    const ForwardRefMotionComponent = forwardRef(MotionComponent);\n    ForwardRefMotionComponent[motionComponentSymbol] = Component;\n    return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n    const layoutGroupId = useContext(LayoutGroupContext).id;\n    return layoutGroupId && layoutId !== undefined\n        ? layoutGroupId + \"-\" + layoutId\n        : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n    const isStrict = useContext(LazyContext).strict;\n    /**\n     * If we're in development mode, check to make sure we're not rendering a motion component\n     * as a child of LazyMotion, as this will break the file-size benefits of using it.\n     */\n    if (process.env.NODE_ENV !== \"production\" &&\n        preloadedFeatures &&\n        isStrict) {\n        const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n        configAndProps.ignoreStrict\n            ? warning(false, strictMessage)\n            : invariant(false, strictMessage);\n    }\n}\nfunction getProjectionFunctionality(props) {\n    const { drag, layout } = featureDefinitions;\n    if (!drag && !layout)\n        return {};\n    const combined = { ...drag, ...layout };\n    return {\n        MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n            ? combined.MeasureLayout\n            : undefined,\n        ProjectionNode: combined.ProjectionNode,\n    };\n}\n\nexport { createRendererMotionComponent };\n","import { isCSSVariableName } from 'motion-dom';\n\nconst scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n    for (const key in correctors) {\n        scaleCorrectors[key] = correctors[key];\n        if (isCSSVariableName(key)) {\n            scaleCorrectors[key].isCSSVariable = true;\n        }\n    }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","import { transformProps } from 'motion-dom';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n    return (transformProps.has(key) ||\n        key.startsWith(\"origin\") ||\n        ((layout || layoutId !== undefined) &&\n            (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","import { transformPropOrder, getValueAsType, numberValueTypes } from 'motion-dom';\n\nconst translateAlias = {\n    x: \"translateX\",\n    y: \"translateY\",\n    z: \"translateZ\",\n    transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n    // The transform string we're going to build into.\n    let transformString = \"\";\n    let transformIsDefault = true;\n    /**\n     * Loop over all possible transforms in order, adding the ones that\n     * are present to the transform string.\n     */\n    for (let i = 0; i < numTransforms; i++) {\n        const key = transformPropOrder[i];\n        const value = latestValues[key];\n        if (value === undefined)\n            continue;\n        let valueIsDefault = true;\n        if (typeof value === \"number\") {\n            valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n        }\n        else {\n            valueIsDefault = parseFloat(value) === 0;\n        }\n        if (!valueIsDefault || transformTemplate) {\n            const valueAsType = getValueAsType(value, numberValueTypes[key]);\n            if (!valueIsDefault) {\n                transformIsDefault = false;\n                const transformName = translateAlias[key] || key;\n                transformString += `${transformName}(${valueAsType}) `;\n            }\n            if (transformTemplate) {\n                transform[key] = valueAsType;\n            }\n        }\n    }\n    transformString = transformString.trim();\n    // If we have a custom `transform` template, pass our transform values and\n    // generated transformString to that before returning\n    if (transformTemplate) {\n        transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n    }\n    else if (transformIsDefault) {\n        transformString = \"none\";\n    }\n    return transformString;\n}\n\nexport { buildTransform };\n","import { transformProps, isCSSVariableName, getValueAsType, numberValueTypes } from 'motion-dom';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n    const { style, vars, transformOrigin } = state;\n    // Track whether we encounter any transform or transformOrigin values.\n    let hasTransform = false;\n    let hasTransformOrigin = false;\n    /**\n     * Loop over all our latest animated values and decide whether to handle them\n     * as a style or CSS variable.\n     *\n     * Transforms and transform origins are kept separately for further processing.\n     */\n    for (const key in latestValues) {\n        const value = latestValues[key];\n        if (transformProps.has(key)) {\n            // If this is a transform, flag to enable further transform processing\n            hasTransform = true;\n            continue;\n        }\n        else if (isCSSVariableName(key)) {\n            vars[key] = value;\n            continue;\n        }\n        else {\n            // Convert the value to its default value type, ie 0 -> \"0px\"\n            const valueAsType = getValueAsType(value, numberValueTypes[key]);\n            if (key.startsWith(\"origin\")) {\n                // If this is a transform origin, flag and enable further transform-origin processing\n                hasTransformOrigin = true;\n                transformOrigin[key] =\n                    valueAsType;\n            }\n            else {\n                style[key] = valueAsType;\n            }\n        }\n    }\n    if (!latestValues.transform) {\n        if (hasTransform || transformTemplate) {\n            style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n        }\n        else if (style.transform) {\n            /**\n             * If we have previously created a transform but currently don't have any,\n             * reset transform style to none.\n             */\n            style.transform = \"none\";\n        }\n    }\n    /**\n     * Build a transformOrigin style. Uses the same defaults as the browser for\n     * undefined origins.\n     */\n    if (hasTransformOrigin) {\n        const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n        style.transformOrigin = `${originX} ${originY} ${originZ}`;\n    }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n    style: {},\n    transform: {},\n    transformOrigin: {},\n    vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { isMotionValue } from 'motion-dom';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n    for (const key in source) {\n        if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n            target[key] = source[key];\n        }\n    }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n    return useMemo(() => {\n        const state = createHtmlRenderState();\n        buildHTMLStyles(state, visualState, transformTemplate);\n        return Object.assign({}, state.vars, state.style);\n    }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n    const styleProp = props.style || {};\n    const style = {};\n    /**\n     * Copy non-Motion Values straight into style\n     */\n    copyRawValuesOnly(style, styleProp, props);\n    Object.assign(style, useInitialMotionValues(props, visualState));\n    return style;\n}\nfunction useHTMLProps(props, visualState) {\n    // The `any` isn't ideal but it is the type of createElement props argument\n    const htmlProps = {};\n    const style = useStyle(props, visualState);\n    if (props.drag && props.dragListener !== false) {\n        // Disable the ghost element when a user drags\n        htmlProps.draggable = false;\n        // Disable text selection\n        style.userSelect =\n            style.WebkitUserSelect =\n                style.WebkitTouchCallout =\n                    \"none\";\n        // Disable scrolling on the draggable direction\n        style.touchAction =\n            props.drag === true\n                ? \"none\"\n                : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n    }\n    if (props.tabIndex === undefined &&\n        (props.onTap || props.onTapStart || props.whileTap)) {\n        htmlProps.tabIndex = 0;\n    }\n    htmlProps.style = style;\n    return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","import { px } from 'motion-dom';\n\nconst dashKeys = {\n    offset: \"stroke-dashoffset\",\n    array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n    offset: \"strokeDashoffset\",\n    array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n    // Normalise path length by setting SVG attribute pathLength to 1\n    attrs.pathLength = 1;\n    // We use dash case when setting attributes directly to the DOM node and camel case\n    // when defining props on a React component.\n    const keys = useDashCase ? dashKeys : camelKeys;\n    // Build the dash offset\n    attrs[keys.offset] = px.transform(-offset);\n    // Build the dash array\n    const pathLength = px.transform(length);\n    const pathSpacing = px.transform(spacing);\n    attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n    buildHTMLStyles(state, latest, transformTemplate);\n    /**\n     * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n     * as normal HTML tags.\n     */\n    if (isSVGTag) {\n        if (state.style.viewBox) {\n            state.attrs.viewBox = state.style.viewBox;\n        }\n        return;\n    }\n    state.attrs = state.style;\n    state.style = {};\n    const { attrs, style } = state;\n    /**\n     * However, we apply transforms as CSS transforms.\n     * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n     */\n    if (attrs.transform) {\n        style.transform = attrs.transform;\n        delete attrs.transform;\n    }\n    if (style.transform || attrs.transformOrigin) {\n        style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n        delete attrs.transformOrigin;\n    }\n    if (style.transform) {\n        /**\n         * SVG's element transform-origin uses its own median as a reference.\n         * Therefore, transformBox becomes a fill-box\n         */\n        style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n        delete attrs.transformBox;\n    }\n    // Render attrX/attrY/attrScale as attributes\n    if (attrX !== undefined)\n        attrs.x = attrX;\n    if (attrY !== undefined)\n        attrs.y = attrY;\n    if (attrScale !== undefined)\n        attrs.scale = attrScale;\n    // Build SVG path if one has been defined\n    if (pathLength !== undefined) {\n        buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n    }\n}\n\nexport { buildSVGAttrs };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n    ...createHtmlRenderState(),\n    attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n    const visualProps = useMemo(() => {\n        const state = createSvgRenderState();\n        buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);\n        return {\n            ...state.attrs,\n            style: { ...state.style },\n        };\n    }, [visualState]);\n    if (props.style) {\n        const rawStyles = {};\n        copyRawValuesOnly(rawStyles, props.style, props);\n        visualProps.style = { ...rawStyles, ...visualProps.style };\n    }\n    return visualProps;\n}\n\nexport { useSVGProps };\n","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n    \"animate\",\n    \"circle\",\n    \"defs\",\n    \"desc\",\n    \"ellipse\",\n    \"g\",\n    \"image\",\n    \"line\",\n    \"filter\",\n    \"marker\",\n    \"mask\",\n    \"metadata\",\n    \"path\",\n    \"pattern\",\n    \"polygon\",\n    \"polyline\",\n    \"rect\",\n    \"stop\",\n    \"switch\",\n    \"symbol\",\n    \"svg\",\n    \"text\",\n    \"tspan\",\n    \"use\",\n    \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n    if (\n    /**\n     * If it's not a string, it's a custom React component. Currently we only support\n     * HTML custom React components.\n     */\n    typeof Component !== \"string\" ||\n        /**\n         * If it contains a dash, the element is a custom HTML webcomponent.\n         */\n        Component.includes(\"-\")) {\n        return false;\n    }\n    else if (\n    /**\n     * If it's in our list of lowercase SVG tags, it's an SVG component\n     */\n    lowercaseSVGElements.indexOf(Component) > -1 ||\n        /**\n         * If it contains a capital letter, it's an SVG component\n         */\n        /[A-Z]/u.test(Component)) {\n        return true;\n    }\n    return false;\n}\n\nexport { isSVGComponent };\n","import { isMotionValue } from 'motion-dom';\nimport { Fragment, useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n    const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n        const useVisualProps = isSVGComponent(Component)\n            ? useSVGProps\n            : useHTMLProps;\n        const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n        const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n        const elementProps = Component !== Fragment\n            ? { ...filteredProps, ...visualProps, ref }\n            : {};\n        /**\n         * If component has been handed a motion value as its child,\n         * memoise its initial value and render that. Subsequent updates\n         * will be handled by the onChange handler\n         */\n        const { children } = props;\n        const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n        return createElement(Component, {\n            ...elementProps,\n            children: renderedChildren,\n        });\n    };\n    return useRender;\n}\n\nexport { createUseRender };\n","function getValueState(visualElement) {\n    const state = [{}, {}];\n    visualElement?.values.forEach((value, key) => {\n        state[0][key] = value.get();\n        state[1][key] = value.getVelocity();\n    });\n    return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n    /**\n     * If the variant definition is a function, resolve.\n     */\n    if (typeof definition === \"function\") {\n        const [current, velocity] = getValueState(visualElement);\n        definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n    }\n    /**\n     * If the variant definition is a variant label, or\n     * the function returned a variant label, resolve.\n     */\n    if (typeof definition === \"string\") {\n        definition = props.variants && props.variants[definition];\n    }\n    /**\n     * At this point we've resolved both functions and variant labels,\n     * but the resolved variant label might itself have been a function.\n     * If so, resolve. This can only have returned a valid target object.\n     */\n    if (typeof definition === \"function\") {\n        const [current, velocity] = getValueState(visualElement);\n        definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n    }\n    return definition;\n}\n\nexport { resolveVariantFromProps };\n","import { isMotionValue } from 'motion-dom';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n    return isMotionValue(value) ? value.get() : value;\n}\n\nexport { resolveMotionValue };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {\n    const state = {\n        latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n        renderState: createRenderState(),\n    };\n    return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n    const context = useContext(MotionContext);\n    const presenceContext = useContext(PresenceContext);\n    const make = () => makeState(config, props, context, presenceContext);\n    return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n    const values = {};\n    const motionValues = scrapeMotionValues(props, {});\n    for (const key in motionValues) {\n        values[key] = resolveMotionValue(motionValues[key]);\n    }\n    let { initial, animate } = props;\n    const isControllingVariants$1 = isControllingVariants(props);\n    const isVariantNode$1 = isVariantNode(props);\n    if (context &&\n        isVariantNode$1 &&\n        !isControllingVariants$1 &&\n        props.inherit !== false) {\n        if (initial === undefined)\n            initial = context.initial;\n        if (animate === undefined)\n            animate = context.animate;\n    }\n    let isInitialAnimationBlocked = presenceContext\n        ? presenceContext.initial === false\n        : false;\n    isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n    const variantToSet = isInitialAnimationBlocked ? animate : initial;\n    if (variantToSet &&\n        typeof variantToSet !== \"boolean\" &&\n        !isAnimationControls(variantToSet)) {\n        const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n        for (let i = 0; i < list.length; i++) {\n            const resolved = resolveVariantFromProps(props, list[i]);\n            if (resolved) {\n                const { transitionEnd, transition, ...target } = resolved;\n                for (const key in target) {\n                    let valueTarget = target[key];\n                    if (Array.isArray(valueTarget)) {\n                        /**\n                         * Take final keyframe if the initial animation is blocked because\n                         * we want to initialise at the end of that blocked animation.\n                         */\n                        const index = isInitialAnimationBlocked\n                            ? valueTarget.length - 1\n                            : 0;\n                        valueTarget = valueTarget[index];\n                    }\n                    if (valueTarget !== null) {\n                        values[key] = valueTarget;\n                    }\n                }\n                for (const key in transitionEnd) {\n                    values[key] = transitionEnd[key];\n                }\n            }\n        }\n    }\n    return values;\n}\n\nexport { makeUseVisualState };\n","import { isMotionValue } from 'motion-dom';\nimport { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n    const { style } = props;\n    const newValues = {};\n    for (const key in style) {\n        if (isMotionValue(style[key]) ||\n            (prevProps.style &&\n                isMotionValue(prevProps.style[key])) ||\n            isForcedMotionValue(key, props) ||\n            visualElement?.getValue(key)?.liveStyle !== undefined) {\n            newValues[key] = style[key];\n        }\n    }\n    return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n    useVisualState: makeUseVisualState({\n        scrapeMotionValuesFromProps,\n        createRenderState: createHtmlRenderState,\n    }),\n};\n\nexport { htmlMotionConfig };\n","import { isMotionValue, transformPropOrder } from 'motion-dom';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n    const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n    for (const key in props) {\n        if (isMotionValue(props[key]) ||\n            isMotionValue(prevProps[key])) {\n            const targetKey = transformPropOrder.indexOf(key) !== -1\n                ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n                : key;\n            newValues[targetKey] = props[key];\n        }\n    }\n    return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nconst svgMotionConfig = {\n    useVisualState: makeUseVisualState({\n        scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n        createRenderState: createSvgRenderState,\n    }),\n};\n\nexport { svgMotionConfig };\n","import { createRendererMotionComponent } from '../../motion/index.mjs';\nimport { createUseRender } from '../dom/use-render.mjs';\nimport { isSVGComponent } from '../dom/utils/is-svg-component.mjs';\nimport { htmlMotionConfig } from '../html/config-motion.mjs';\nimport { svgMotionConfig } from '../svg/config-motion.mjs';\n\nfunction createMotionComponentFactory(preloadedFeatures, createVisualElement) {\n    return function createMotionComponent(Component, { forwardMotionProps } = { forwardMotionProps: false }) {\n        const baseConfig = isSVGComponent(Component)\n            ? svgMotionConfig\n            : htmlMotionConfig;\n        const config = {\n            ...baseConfig,\n            preloadedFeatures,\n            useRender: createUseRender(forwardMotionProps),\n            createVisualElement,\n            Component,\n        };\n        return createRendererMotionComponent(config);\n    };\n}\n\nexport { createMotionComponentFactory };\n","import { createMotionComponentFactory } from '../create-factory.mjs';\n\nconst createMinimalMotionComponent = \n/*@__PURE__*/ createMotionComponentFactory();\n\nexport { createMinimalMotionComponent };\n","import { createDOMMotionComponentProxy } from '../create-proxy.mjs';\nimport { createMinimalMotionComponent } from './create.mjs';\n\nconst m = /*@__PURE__*/ createDOMMotionComponentProxy(createMinimalMotionComponent);\n\nexport { m };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n    const props = visualElement.getProps();\n    return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n","const isKeyframesTarget = (v) => {\n    return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { motionValue } from 'motion-dom';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n    if (visualElement.hasValue(key)) {\n        visualElement.getValue(key).set(value);\n    }\n    else {\n        visualElement.addValue(key, motionValue(value));\n    }\n}\nfunction resolveFinalValueInKeyframes(v) {\n    // TODO maybe throw if v.length - 1 is placeholder token?\n    return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n    const resolved = resolveVariant(visualElement, definition);\n    let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n    target = { ...target, ...transitionEnd };\n    for (const key in target) {\n        const value = resolveFinalValueInKeyframes(target[key]);\n        setMotionValue(visualElement, key, value);\n    }\n}\n\nexport { setTarget };\n","import { isMotionValue } from 'motion-dom';\n\nfunction isWillChangeMotionValue(value) {\n    return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n    const willChange = visualElement.getValue(\"willChange\");\n    /**\n     * It could be that a user has set willChange to a regular MotionValue,\n     * in which case we can't add the value to it.\n     */\n    if (isWillChangeMotionValue(willChange)) {\n        return willChange.add(key);\n    }\n    else if (!willChange && MotionGlobalConfig.WillChange) {\n        const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n        visualElement.addValue(\"willChange\", newWillChange);\n        newWillChange.add(key);\n    }\n}\n\nexport { addValueToWillChange };\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n    return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n    const resolvedKeyframes = keyframes.filter(isNotNull);\n    const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n        ? 0\n        : resolvedKeyframes.length - 1;\n    return !index || finalKeyframe === undefined\n        ? resolvedKeyframes[index]\n        : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","import { transformProps } from 'motion-dom';\n\nconst underDampedSpring = {\n    type: \"spring\",\n    stiffness: 500,\n    damping: 25,\n    restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n    type: \"spring\",\n    stiffness: 550,\n    damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n    restSpeed: 10,\n});\nconst keyframesTransition = {\n    type: \"keyframes\",\n    duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n    type: \"keyframes\",\n    ease: [0.25, 0.1, 0.35, 1],\n    duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n    if (keyframes.length > 2) {\n        return keyframesTransition;\n    }\n    else if (transformProps.has(valueKey)) {\n        return valueKey.startsWith(\"scale\")\n            ? criticallyDampedSpring(keyframes[1])\n            : underDampedSpring;\n    }\n    return ease;\n};\n\nexport { getDefaultTransition };\n","/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n    return !!Object.keys(transition).length;\n}\n\nexport { isTransitionDefined };\n","import { getValueTransition, frame, JSAnimation, AsyncMotionValueAnimation } from 'motion-dom';\nimport { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n    const valueTransition = getValueTransition(transition, name) || {};\n    /**\n     * Most transition values are currently completely overwritten by value-specific\n     * transitions. In the future it'd be nicer to blend these transitions. But for now\n     * delay actually does inherit from the root transition if not value-specific.\n     */\n    const delay = valueTransition.delay || transition.delay || 0;\n    /**\n     * Elapsed isn't a public transition option but can be passed through from\n     * optimized appear effects in milliseconds.\n     */\n    let { elapsed = 0 } = transition;\n    elapsed = elapsed - secondsToMilliseconds(delay);\n    const options = {\n        keyframes: Array.isArray(target) ? target : [null, target],\n        ease: \"easeOut\",\n        velocity: value.getVelocity(),\n        ...valueTransition,\n        delay: -elapsed,\n        onUpdate: (v) => {\n            value.set(v);\n            valueTransition.onUpdate && valueTransition.onUpdate(v);\n        },\n        onComplete: () => {\n            onComplete();\n            valueTransition.onComplete && valueTransition.onComplete();\n        },\n        name,\n        motionValue: value,\n        element: isHandoff ? undefined : element,\n    };\n    /**\n     * If there's no transition defined for this value, we can generate\n     * unique transition settings for this value.\n     */\n    if (!isTransitionDefined(valueTransition)) {\n        Object.assign(options, getDefaultTransition(name, options));\n    }\n    /**\n     * Both WAAPI and our internal animation functions use durations\n     * as defined by milliseconds, while our external API defines them\n     * as seconds.\n     */\n    options.duration && (options.duration = secondsToMilliseconds(options.duration));\n    options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n    /**\n     * Support deprecated way to set initial value. Prefer keyframe syntax.\n     */\n    if (options.from !== undefined) {\n        options.keyframes[0] = options.from;\n    }\n    let shouldSkip = false;\n    if (options.type === false ||\n        (options.duration === 0 && !options.repeatDelay)) {\n        options.duration = 0;\n        if (options.delay === 0) {\n            shouldSkip = true;\n        }\n    }\n    if (MotionGlobalConfig.instantAnimations ||\n        MotionGlobalConfig.skipAnimations) {\n        shouldSkip = true;\n        options.duration = 0;\n        options.delay = 0;\n    }\n    /**\n     * If the transition type or easing has been explicitly set by the user\n     * then we don't want to allow flattening the animation.\n     */\n    options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n    /**\n     * If we can or must skip creating the animation, and apply only\n     * the final keyframe, do so. We also check once keyframes are resolved but\n     * this early check prevents the need to create an animation at all.\n     */\n    if (shouldSkip && !isHandoff && value.get() !== undefined) {\n        const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n        if (finalKeyframe !== undefined) {\n            frame.update(() => {\n                options.onUpdate(finalKeyframe);\n                options.onComplete();\n            });\n            return;\n        }\n    }\n    return valueTransition.isSync\n        ? new JSAnimation(options)\n        : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n","import { getValueTransition, frame, positionalKeys } from 'motion-dom';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n    const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n    needsAnimating[key] = false;\n    return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n    let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;\n    if (transitionOverride)\n        transition = transitionOverride;\n    const animations = [];\n    const animationTypeState = type &&\n        visualElement.animationState &&\n        visualElement.animationState.getState()[type];\n    for (const key in target) {\n        const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n        const valueTarget = target[key];\n        if (valueTarget === undefined ||\n            (animationTypeState &&\n                shouldBlockAnimation(animationTypeState, key))) {\n            continue;\n        }\n        const valueTransition = {\n            delay,\n            ...getValueTransition(transition || {}, key),\n        };\n        /**\n         * If the value is already at the defined target, skip the animation.\n         */\n        const currentValue = value.get();\n        if (currentValue !== undefined &&\n            !value.isAnimating &&\n            !Array.isArray(valueTarget) &&\n            valueTarget === currentValue &&\n            !valueTransition.velocity) {\n            continue;\n        }\n        /**\n         * If this is the first time a value is being animated, check\n         * to see if we're handling off from an existing animation.\n         */\n        let isHandoff = false;\n        if (window.MotionHandoffAnimation) {\n            const appearId = getOptimisedAppearId(visualElement);\n            if (appearId) {\n                const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n                if (startTime !== null) {\n                    valueTransition.startTime = startTime;\n                    isHandoff = true;\n                }\n            }\n        }\n        addValueToWillChange(visualElement, key);\n        value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && positionalKeys.has(key)\n            ? { type: false }\n            : valueTransition, visualElement, isHandoff));\n        const animation = value.animation;\n        if (animation) {\n            animations.push(animation);\n        }\n    }\n    if (transitionEnd) {\n        Promise.all(animations).then(() => {\n            frame.update(() => {\n                transitionEnd && setTarget(visualElement, transitionEnd);\n            });\n        });\n    }\n    return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n    const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n        ? visualElement.presenceContext?.custom\n        : undefined);\n    let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n    if (options.transitionOverride) {\n        transition = options.transitionOverride;\n    }\n    /**\n     * If we have a variant, create a callback that runs it as an animation.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    const getAnimation = resolved\n        ? () => Promise.all(animateTarget(visualElement, resolved, options))\n        : () => Promise.resolve();\n    /**\n     * If we have children, create a callback that runs all their animations.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n        ? (forwardDelay = 0) => {\n            const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n            return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n        }\n        : () => Promise.resolve();\n    /**\n     * If the transition explicitly defines a \"when\" option, we need to resolve either\n     * this animation or all children animations before playing the other.\n     */\n    const { when } = transition;\n    if (when) {\n        const [first, last] = when === \"beforeChildren\"\n            ? [getAnimation, getChildAnimations]\n            : [getChildAnimations, getAnimation];\n        return first().then(() => last());\n    }\n    else {\n        return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n    }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n    const animations = [];\n    const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n    const generateStaggerDuration = staggerDirection === 1\n        ? (i = 0) => i * staggerChildren\n        : (i = 0) => maxStaggerDuration - i * staggerChildren;\n    Array.from(visualElement.variantChildren)\n        .sort(sortByTreeOrder)\n        .forEach((child, i) => {\n        child.notify(\"AnimationStart\", variant);\n        animations.push(animateVariant(child, variant, {\n            ...options,\n            delay: delayChildren + generateStaggerDuration(i),\n        }).then(() => child.notify(\"AnimationComplete\", variant)));\n    });\n    return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n    return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n    visualElement.notify(\"AnimationStart\", definition);\n    let animation;\n    if (Array.isArray(definition)) {\n        const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n        animation = Promise.all(animations);\n    }\n    else if (typeof definition === \"string\") {\n        animation = animateVariant(visualElement, definition, options);\n    }\n    else {\n        const resolvedDefinition = typeof definition === \"function\"\n            ? resolveVariant(visualElement, definition, options.custom)\n            : definition;\n        animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n    }\n    return animation.then(() => {\n        visualElement.notify(\"AnimationComplete\", definition);\n    });\n}\n\nexport { animateVisualElement };\n","function shallowCompare(next, prev) {\n    if (!Array.isArray(prev))\n        return false;\n    const prevLength = prev.length;\n    if (prevLength !== next.length)\n        return false;\n    for (let i = 0; i < prevLength; i++) {\n        if (prev[i] !== next[i])\n            return false;\n    }\n    return true;\n}\n\nexport { shallowCompare };\n","import { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nconst numVariantProps = variantProps.length;\nfunction getVariantContext(visualElement) {\n    if (!visualElement)\n        return undefined;\n    if (!visualElement.isControllingVariants) {\n        const context = visualElement.parent\n            ? getVariantContext(visualElement.parent) || {}\n            : {};\n        if (visualElement.props.initial !== undefined) {\n            context.initial = visualElement.props.initial;\n        }\n        return context;\n    }\n    const context = {};\n    for (let i = 0; i < numVariantProps; i++) {\n        const name = variantProps[i];\n        const prop = visualElement.props[name];\n        if (isVariantLabel(prop) || prop === false) {\n            context[name] = prop;\n        }\n    }\n    return context;\n}\n\nexport { getVariantContext };\n","import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n    return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n    let animate = animateList(visualElement);\n    let state = createState();\n    let isInitialRender = true;\n    /**\n     * This function will be used to reduce the animation definitions for\n     * each active animation type into an object of resolved values for it.\n     */\n    const buildResolvedTypeValues = (type) => (acc, definition) => {\n        const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n            ? visualElement.presenceContext?.custom\n            : undefined);\n        if (resolved) {\n            const { transition, transitionEnd, ...target } = resolved;\n            acc = { ...acc, ...target, ...transitionEnd };\n        }\n        return acc;\n    };\n    /**\n     * This just allows us to inject mocked animation functions\n     * @internal\n     */\n    function setAnimateFunction(makeAnimator) {\n        animate = makeAnimator(visualElement);\n    }\n    /**\n     * When we receive new props, we need to:\n     * 1. Create a list of protected keys for each type. This is a directory of\n     *    value keys that are currently being \"handled\" by types of a higher priority\n     *    so that whenever an animation is played of a given type, these values are\n     *    protected from being animated.\n     * 2. Determine if an animation type needs animating.\n     * 3. Determine if any values have been removed from a type and figure out\n     *    what to animate those to.\n     */\n    function animateChanges(changedActiveType) {\n        const { props } = visualElement;\n        const context = getVariantContext(visualElement.parent) || {};\n        /**\n         * A list of animations that we'll build into as we iterate through the animation\n         * types. This will get executed at the end of the function.\n         */\n        const animations = [];\n        /**\n         * Keep track of which values have been removed. Then, as we hit lower priority\n         * animation types, we can check if they contain removed values and animate to that.\n         */\n        const removedKeys = new Set();\n        /**\n         * A dictionary of all encountered keys. This is an object to let us build into and\n         * copy it without iteration. Each time we hit an animation type we set its protected\n         * keys - the keys its not allowed to animate - to the latest version of this object.\n         */\n        let encounteredKeys = {};\n        /**\n         * If a variant has been removed at a given index, and this component is controlling\n         * variant animations, we want to ensure lower-priority variants are forced to animate.\n         */\n        let removedVariantIndex = Infinity;\n        /**\n         * Iterate through all animation types in reverse priority order. For each, we want to\n         * detect which values it's handling and whether or not they've changed (and therefore\n         * need to be animated). If any values have been removed, we want to detect those in\n         * lower priority props and flag for animation.\n         */\n        for (let i = 0; i < numAnimationTypes; i++) {\n            const type = reversePriorityOrder[i];\n            const typeState = state[type];\n            const prop = props[type] !== undefined\n                ? props[type]\n                : context[type];\n            const propIsVariant = isVariantLabel(prop);\n            /**\n             * If this type has *just* changed isActive status, set activeDelta\n             * to that status. Otherwise set to null.\n             */\n            const activeDelta = type === changedActiveType ? typeState.isActive : null;\n            if (activeDelta === false)\n                removedVariantIndex = i;\n            /**\n             * If this prop is an inherited variant, rather than been set directly on the\n             * component itself, we want to make sure we allow the parent to trigger animations.\n             *\n             * TODO: Can probably change this to a !isControllingVariants check\n             */\n            let isInherited = prop === context[type] &&\n                prop !== props[type] &&\n                propIsVariant;\n            /**\n             *\n             */\n            if (isInherited &&\n                isInitialRender &&\n                visualElement.manuallyAnimateOnMount) {\n                isInherited = false;\n            }\n            /**\n             * Set all encountered keys so far as the protected keys for this type. This will\n             * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n             */\n            typeState.protectedKeys = { ...encounteredKeys };\n            // Check if we can skip analysing this prop early\n            if (\n            // If it isn't active and hasn't *just* been set as inactive\n            (!typeState.isActive && activeDelta === null) ||\n                // If we didn't and don't have any defined prop for this animation type\n                (!prop && !typeState.prevProp) ||\n                // Or if the prop doesn't define an animation\n                isAnimationControls(prop) ||\n                typeof prop === \"boolean\") {\n                continue;\n            }\n            /**\n             * As we go look through the values defined on this type, if we detect\n             * a changed value or a value that was removed in a higher priority, we set\n             * this to true and add this prop to the animation list.\n             */\n            const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n            let shouldAnimateType = variantDidChange ||\n                // If we're making this variant active, we want to always make it active\n                (type === changedActiveType &&\n                    typeState.isActive &&\n                    !isInherited &&\n                    propIsVariant) ||\n                // If we removed a higher-priority variant (i is in reverse order)\n                (i > removedVariantIndex && propIsVariant);\n            let handledRemovedValues = false;\n            /**\n             * As animations can be set as variant lists, variants or target objects, we\n             * coerce everything to an array if it isn't one already\n             */\n            const definitionList = Array.isArray(prop) ? prop : [prop];\n            /**\n             * Build an object of all the resolved values. We'll use this in the subsequent\n             * animateChanges calls to determine whether a value has changed.\n             */\n            let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n            if (activeDelta === false)\n                resolvedValues = {};\n            /**\n             * Now we need to loop through all the keys in the prev prop and this prop,\n             * and decide:\n             * 1. If the value has changed, and needs animating\n             * 2. If it has been removed, and needs adding to the removedKeys set\n             * 3. If it has been removed in a higher priority type and needs animating\n             * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n             *    needs adding to the type's protectedKeys list.\n             */\n            const { prevResolvedValues = {} } = typeState;\n            const allKeys = {\n                ...prevResolvedValues,\n                ...resolvedValues,\n            };\n            const markToAnimate = (key) => {\n                shouldAnimateType = true;\n                if (removedKeys.has(key)) {\n                    handledRemovedValues = true;\n                    removedKeys.delete(key);\n                }\n                typeState.needsAnimating[key] = true;\n                const motionValue = visualElement.getValue(key);\n                if (motionValue)\n                    motionValue.liveStyle = false;\n            };\n            for (const key in allKeys) {\n                const next = resolvedValues[key];\n                const prev = prevResolvedValues[key];\n                // If we've already handled this we can just skip ahead\n                if (encounteredKeys.hasOwnProperty(key))\n                    continue;\n                /**\n                 * If the value has changed, we probably want to animate it.\n                 */\n                let valueHasChanged = false;\n                if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n                    valueHasChanged = !shallowCompare(next, prev);\n                }\n                else {\n                    valueHasChanged = next !== prev;\n                }\n                if (valueHasChanged) {\n                    if (next !== undefined && next !== null) {\n                        // If next is defined and doesn't equal prev, it needs animating\n                        markToAnimate(key);\n                    }\n                    else {\n                        // If it's undefined, it's been removed.\n                        removedKeys.add(key);\n                    }\n                }\n                else if (next !== undefined && removedKeys.has(key)) {\n                    /**\n                     * If next hasn't changed and it isn't undefined, we want to check if it's\n                     * been removed by a higher priority\n                     */\n                    markToAnimate(key);\n                }\n                else {\n                    /**\n                     * If it hasn't changed, we add it to the list of protected values\n                     * to ensure it doesn't get animated.\n                     */\n                    typeState.protectedKeys[key] = true;\n                }\n            }\n            /**\n             * Update the typeState so next time animateChanges is called we can compare the\n             * latest prop and resolvedValues to these.\n             */\n            typeState.prevProp = prop;\n            typeState.prevResolvedValues = resolvedValues;\n            /**\n             *\n             */\n            if (typeState.isActive) {\n                encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n            }\n            if (isInitialRender && visualElement.blockInitialAnimation) {\n                shouldAnimateType = false;\n            }\n            /**\n             * If this is an inherited prop we want to skip this animation\n             * unless the inherited variants haven't changed on this render.\n             */\n            const willAnimateViaParent = isInherited && variantDidChange;\n            const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n            if (shouldAnimateType && needsAnimating) {\n                animations.push(...definitionList.map((animation) => ({\n                    animation: animation,\n                    options: { type },\n                })));\n            }\n        }\n        /**\n         * If there are some removed value that haven't been dealt with,\n         * we need to create a new animation that falls back either to the value\n         * defined in the style prop, or the last read value.\n         */\n        if (removedKeys.size) {\n            const fallbackAnimation = {};\n            /**\n             * If the initial prop contains a transition we can use that, otherwise\n             * allow the animation function to use the visual element's default.\n             */\n            if (typeof props.initial !== \"boolean\") {\n                const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n                    ? props.initial[0]\n                    : props.initial);\n                if (initialTransition && initialTransition.transition) {\n                    fallbackAnimation.transition = initialTransition.transition;\n                }\n            }\n            removedKeys.forEach((key) => {\n                const fallbackTarget = visualElement.getBaseTarget(key);\n                const motionValue = visualElement.getValue(key);\n                if (motionValue)\n                    motionValue.liveStyle = true;\n                // @ts-expect-error - @mattgperry to figure if we should do something here\n                fallbackAnimation[key] = fallbackTarget ?? null;\n            });\n            animations.push({ animation: fallbackAnimation });\n        }\n        let shouldAnimate = Boolean(animations.length);\n        if (isInitialRender &&\n            (props.initial === false || props.initial === props.animate) &&\n            !visualElement.manuallyAnimateOnMount) {\n            shouldAnimate = false;\n        }\n        isInitialRender = false;\n        return shouldAnimate ? animate(animations) : Promise.resolve();\n    }\n    /**\n     * Change whether a certain animation type is active.\n     */\n    function setActive(type, isActive) {\n        // If the active state hasn't changed, we can safely do nothing here\n        if (state[type].isActive === isActive)\n            return Promise.resolve();\n        // Propagate active change to children\n        visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n        state[type].isActive = isActive;\n        const animations = animateChanges(type);\n        for (const key in state) {\n            state[key].protectedKeys = {};\n        }\n        return animations;\n    }\n    return {\n        animateChanges,\n        setActive,\n        setAnimateFunction,\n        getState: () => state,\n        reset: () => {\n            state = createState();\n            isInitialRender = true;\n        },\n    };\n}\nfunction checkVariantsDidChange(prev, next) {\n    if (typeof next === \"string\") {\n        return next !== prev;\n    }\n    else if (Array.isArray(next)) {\n        return !shallowCompare(next, prev);\n    }\n    return false;\n}\nfunction createTypeState(isActive = false) {\n    return {\n        isActive,\n        protectedKeys: {},\n        needsAnimating: {},\n        prevResolvedValues: {},\n    };\n}\nfunction createState() {\n    return {\n        animate: createTypeState(true),\n        whileInView: createTypeState(),\n        whileHover: createTypeState(),\n        whileTap: createTypeState(),\n        whileDrag: createTypeState(),\n        whileFocus: createTypeState(),\n        exit: createTypeState(),\n    };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","class Feature {\n    constructor(node) {\n        this.isMounted = false;\n        this.node = node;\n    }\n    update() { }\n}\n\nexport { Feature };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n    /**\n     * We dynamically generate the AnimationState manager as it contains a reference\n     * to the underlying animation library. We only want to load that if we load this,\n     * so people can optionally code split it out using the `m` component.\n     */\n    constructor(node) {\n        super(node);\n        node.animationState || (node.animationState = createAnimationState(node));\n    }\n    updateAnimationControlsSubscription() {\n        const { animate } = this.node.getProps();\n        if (isAnimationControls(animate)) {\n            this.unmountControls = animate.subscribe(this.node);\n        }\n    }\n    /**\n     * Subscribe any provided AnimationControls to the component's VisualElement\n     */\n    mount() {\n        this.updateAnimationControlsSubscription();\n    }\n    update() {\n        const { animate } = this.node.getProps();\n        const { animate: prevAnimate } = this.node.prevProps || {};\n        if (animate !== prevAnimate) {\n            this.updateAnimationControlsSubscription();\n        }\n    }\n    unmount() {\n        this.node.animationState.reset();\n        this.unmountControls?.();\n    }\n}\n\nexport { AnimationFeature };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n    constructor() {\n        super(...arguments);\n        this.id = id++;\n    }\n    update() {\n        if (!this.node.presenceContext)\n            return;\n        const { isPresent, onExitComplete } = this.node.presenceContext;\n        const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n        if (!this.node.animationState || isPresent === prevIsPresent) {\n            return;\n        }\n        const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n        if (onExitComplete && !isPresent) {\n            exitAnimation.then(() => {\n                onExitComplete(this.id);\n            });\n        }\n    }\n    mount() {\n        const { register, onExitComplete } = this.node.presenceContext || {};\n        if (onExitComplete) {\n            onExitComplete(this.id);\n        }\n        if (register) {\n            this.unmount = register(this.id);\n        }\n    }\n    unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n    animation: {\n        Feature: AnimationFeature,\n    },\n    exit: {\n        Feature: ExitAnimationFeature,\n    },\n};\n\nexport { animations };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n    target.addEventListener(eventName, handler, options);\n    return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","import { isPrimaryPointer } from 'motion-dom';\n\nfunction extractEventInfo(event) {\n    return {\n        point: {\n            x: event.pageX,\n            y: event.pageY,\n        },\n    };\n}\nconst addPointerInfo = (handler) => {\n    return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n    return {\n        x: { min: left, max: right },\n        y: { min: top, max: bottom },\n    };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n    return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n    if (!transformPoint)\n        return point;\n    const topLeft = transformPoint({ x: point.left, y: point.top });\n    const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n    return {\n        top: topLeft.y,\n        left: topLeft.x,\n        bottom: bottomRight.y,\n        right: bottomRight.x,\n    };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","const createAxisDelta = () => ({\n    translate: 0,\n    scale: 1,\n    origin: 0,\n    originPoint: 0,\n});\nconst createDelta = () => ({\n    x: createAxisDelta(),\n    y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n    x: createAxis(),\n    y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n    return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n    const viewportBox = measureViewportBox(element, transformPagePoint);\n    const { scroll } = rootProjectionNode;\n    if (scroll) {\n        translateAxis(viewportBox.x, scroll.offset.x);\n        translateAxis(viewportBox.y, scroll.offset.y);\n    }\n    return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n    const { props } = node;\n    if (node.animationState && props.whileHover) {\n        node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n    }\n    const eventName = (\"onHover\" + lifecycle);\n    const callback = props[eventName];\n    if (callback) {\n        frame.postRender(() => callback(event, extractEventInfo(event)));\n    }\n}\nclass HoverGesture extends Feature {\n    mount() {\n        const { current } = this.node;\n        if (!current)\n            return;\n        this.unmount = hover(current, (_element, startEvent) => {\n            handleHoverEvent(this.node, startEvent, \"Start\");\n            return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n        });\n    }\n    unmount() { }\n}\n\nexport { HoverGesture };\n","import { pipe } from 'motion-utils';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nclass FocusGesture extends Feature {\n    constructor() {\n        super(...arguments);\n        this.isActive = false;\n    }\n    onFocus() {\n        let isFocusVisible = false;\n        /**\n         * If this element doesn't match focus-visible then don't\n         * apply whileHover. But, if matches throws that focus-visible\n         * is not a valid selector then in that browser outline styles will be applied\n         * to the element by default and we want to match that behaviour with whileFocus.\n         */\n        try {\n            isFocusVisible = this.node.current.matches(\":focus-visible\");\n        }\n        catch (e) {\n            isFocusVisible = true;\n        }\n        if (!isFocusVisible || !this.node.animationState)\n            return;\n        this.node.animationState.setActive(\"whileFocus\", true);\n        this.isActive = true;\n    }\n    onBlur() {\n        if (!this.isActive || !this.node.animationState)\n            return;\n        this.node.animationState.setActive(\"whileFocus\", false);\n        this.isActive = false;\n    }\n    mount() {\n        this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n    }\n    unmount() { }\n}\n\nexport { FocusGesture };\n","import { press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n    const { props } = node;\n    if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n        return;\n    }\n    if (node.animationState && props.whileTap) {\n        node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n    }\n    const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n    const callback = props[eventName];\n    if (callback) {\n        frame.postRender(() => callback(event, extractEventInfo(event)));\n    }\n}\nclass PressGesture extends Feature {\n    mount() {\n        const { current } = this.node;\n        if (!current)\n            return;\n        this.unmount = press(current, (_element, startEvent) => {\n            handlePressEvent(this.node, startEvent, \"Start\");\n            return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n        }, { useGlobalTarget: this.node.props.globalTapTarget });\n    }\n    unmount() { }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n    const callback = observerCallbacks.get(entry.target);\n    callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n    entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n    const lookupRoot = root || document;\n    /**\n     * If we don't have an observer lookup map for this root, create one.\n     */\n    if (!observers.has(lookupRoot)) {\n        observers.set(lookupRoot, {});\n    }\n    const rootObservers = observers.get(lookupRoot);\n    const key = JSON.stringify(options);\n    /**\n     * If we don't have an observer for this combination of root and settings,\n     * create one.\n     */\n    if (!rootObservers[key]) {\n        rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n    }\n    return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n    const rootInteresectionObserver = initIntersectionObserver(options);\n    observerCallbacks.set(element, callback);\n    rootInteresectionObserver.observe(element);\n    return () => {\n        observerCallbacks.delete(element);\n        rootInteresectionObserver.unobserve(element);\n    };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n    some: 0,\n    all: 1,\n};\nclass InViewFeature extends Feature {\n    constructor() {\n        super(...arguments);\n        this.hasEnteredView = false;\n        this.isInView = false;\n    }\n    startObserver() {\n        this.unmount();\n        const { viewport = {} } = this.node.getProps();\n        const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n        const options = {\n            root: root ? root.current : undefined,\n            rootMargin,\n            threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n        };\n        const onIntersectionUpdate = (entry) => {\n            const { isIntersecting } = entry;\n            /**\n             * If there's been no change in the viewport state, early return.\n             */\n            if (this.isInView === isIntersecting)\n                return;\n            this.isInView = isIntersecting;\n            /**\n             * Handle hasEnteredView. If this is only meant to run once, and\n             * element isn't visible, early return. Otherwise set hasEnteredView to true.\n             */\n            if (once && !isIntersecting && this.hasEnteredView) {\n                return;\n            }\n            else if (isIntersecting) {\n                this.hasEnteredView = true;\n            }\n            if (this.node.animationState) {\n                this.node.animationState.setActive(\"whileInView\", isIntersecting);\n            }\n            /**\n             * Use the latest committed props rather than the ones in scope\n             * when this observer is created\n             */\n            const { onViewportEnter, onViewportLeave } = this.node.getProps();\n            const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n            callback && callback(entry);\n        };\n        return observeIntersection(this.node.current, options, onIntersectionUpdate);\n    }\n    mount() {\n        this.startObserver();\n    }\n    update() {\n        if (typeof IntersectionObserver === \"undefined\")\n            return;\n        const { props, prevProps } = this.node;\n        const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n        if (hasOptionsChanged) {\n            this.startObserver();\n        }\n    }\n    unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n    return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n    inView: {\n        Feature: InViewFeature,\n    },\n    tap: {\n        Feature: PressGesture,\n    },\n    focus: {\n        Feature: FocusGesture,\n    },\n    hover: {\n        Feature: HoverGesture,\n    },\n};\n\nexport { gestureAnimations };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n    hasReducedMotionListener.current = true;\n    if (!isBrowser)\n        return;\n    if (window.matchMedia) {\n        const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n        const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n        motionMediaQuery.addListener(setReducedMotionPreferences);\n        setReducedMotionPreferences();\n    }\n    else {\n        prefersReducedMotion.current = false;\n    }\n}\n\nexport { initPrefersReducedMotion };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { isMotionValue, motionValue } from 'motion-dom';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n    for (const key in next) {\n        const nextValue = next[key];\n        const prevValue = prev[key];\n        if (isMotionValue(nextValue)) {\n            /**\n             * If this is a motion value found in props or style, we want to add it\n             * to our visual element's motion value map.\n             */\n            element.addValue(key, nextValue);\n        }\n        else if (isMotionValue(prevValue)) {\n            /**\n             * If we're swapping from a motion value to a static value,\n             * create a new motion value from that\n             */\n            element.addValue(key, motionValue(nextValue, { owner: element }));\n        }\n        else if (prevValue !== nextValue) {\n            /**\n             * If this is a flat value that has changed, update the motion value\n             * or create one if it doesn't exist. We only want to do this if we're\n             * not handling the value with our animation state.\n             */\n            if (element.hasValue(key)) {\n                const existingValue = element.getValue(key);\n                if (existingValue.liveStyle === true) {\n                    existingValue.jump(nextValue);\n                }\n                else if (!existingValue.hasAnimated) {\n                    existingValue.set(nextValue);\n                }\n            }\n            else {\n                const latestValue = element.getStaticValue(key);\n                element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n            }\n        }\n    }\n    // Handle removed values\n    for (const key in prev) {\n        if (next[key] === undefined)\n            element.removeValue(key);\n    }\n    return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { KeyframeResolver, time, frame, isMotionValue, cancelFrame, transformProps, motionValue, findValueType, complex, getAnimatableNone } from 'motion-dom';\nimport { warnOnce, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\n\nconst propEventHandlers = [\n    \"AnimationStart\",\n    \"AnimationComplete\",\n    \"Update\",\n    \"BeforeLayoutMeasure\",\n    \"LayoutMeasure\",\n    \"LayoutAnimationStart\",\n    \"LayoutAnimationComplete\",\n];\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n    /**\n     * This method takes React props and returns found MotionValues. For example, HTML\n     * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n     *\n     * This isn't an abstract method as it needs calling in the constructor, but it is\n     * intended to be one.\n     */\n    scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n        return {};\n    }\n    constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {\n        /**\n         * A reference to the current underlying Instance, e.g. a HTMLElement\n         * or Three.Mesh etc.\n         */\n        this.current = null;\n        /**\n         * A set containing references to this VisualElement's children.\n         */\n        this.children = new Set();\n        /**\n         * Determine what role this visual element should take in the variant tree.\n         */\n        this.isVariantNode = false;\n        this.isControllingVariants = false;\n        /**\n         * Decides whether this VisualElement should animate in reduced motion\n         * mode.\n         *\n         * TODO: This is currently set on every individual VisualElement but feels\n         * like it could be set globally.\n         */\n        this.shouldReduceMotion = null;\n        /**\n         * A map of all motion values attached to this visual element. Motion\n         * values are source of truth for any given animated value. A motion\n         * value might be provided externally by the component via props.\n         */\n        this.values = new Map();\n        this.KeyframeResolver = KeyframeResolver;\n        /**\n         * Cleanup functions for active features (hover/tap/exit etc)\n         */\n        this.features = {};\n        /**\n         * A map of every subscription that binds the provided or generated\n         * motion values onChange listeners to this visual element.\n         */\n        this.valueSubscriptions = new Map();\n        /**\n         * A reference to the previously-provided motion values as returned\n         * from scrapeMotionValuesFromProps. We use the keys in here to determine\n         * if any motion values need to be removed after props are updated.\n         */\n        this.prevMotionValues = {};\n        /**\n         * An object containing a SubscriptionManager for each active event.\n         */\n        this.events = {};\n        /**\n         * An object containing an unsubscribe function for each prop event subscription.\n         * For example, every \"Update\" event can have multiple subscribers via\n         * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n         */\n        this.propEventSubscriptions = {};\n        this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n        this.render = () => {\n            if (!this.current)\n                return;\n            this.triggerBuild();\n            this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n        };\n        this.renderScheduledAt = 0.0;\n        this.scheduleRender = () => {\n            const now = time.now();\n            if (this.renderScheduledAt < now) {\n                this.renderScheduledAt = now;\n                frame.render(this.render, false, true);\n            }\n        };\n        const { latestValues, renderState } = visualState;\n        this.latestValues = latestValues;\n        this.baseTarget = { ...latestValues };\n        this.initialValues = props.initial ? { ...latestValues } : {};\n        this.renderState = renderState;\n        this.parent = parent;\n        this.props = props;\n        this.presenceContext = presenceContext;\n        this.depth = parent ? parent.depth + 1 : 0;\n        this.reducedMotionConfig = reducedMotionConfig;\n        this.options = options;\n        this.blockInitialAnimation = Boolean(blockInitialAnimation);\n        this.isControllingVariants = isControllingVariants(props);\n        this.isVariantNode = isVariantNode(props);\n        if (this.isVariantNode) {\n            this.variantChildren = new Set();\n        }\n        this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n        /**\n         * Any motion values that are provided to the element when created\n         * aren't yet bound to the element, as this would technically be impure.\n         * However, we iterate through the motion values and set them to the\n         * initial values for this component.\n         *\n         * TODO: This is impure and we should look at changing this to run on mount.\n         * Doing so will break some tests but this isn't necessarily a breaking change,\n         * more a reflection of the test.\n         */\n        const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n        for (const key in initialMotionValues) {\n            const value = initialMotionValues[key];\n            if (latestValues[key] !== undefined && isMotionValue(value)) {\n                value.set(latestValues[key], false);\n            }\n        }\n    }\n    mount(instance) {\n        this.current = instance;\n        visualElementStore.set(instance, this);\n        if (this.projection && !this.projection.instance) {\n            this.projection.mount(instance);\n        }\n        if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n            this.removeFromVariantTree = this.parent.addVariantChild(this);\n        }\n        this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n        if (!hasReducedMotionListener.current) {\n            initPrefersReducedMotion();\n        }\n        this.shouldReduceMotion =\n            this.reducedMotionConfig === \"never\"\n                ? false\n                : this.reducedMotionConfig === \"always\"\n                    ? true\n                    : prefersReducedMotion.current;\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n        }\n        if (this.parent)\n            this.parent.children.add(this);\n        this.update(this.props, this.presenceContext);\n    }\n    unmount() {\n        this.projection && this.projection.unmount();\n        cancelFrame(this.notifyUpdate);\n        cancelFrame(this.render);\n        this.valueSubscriptions.forEach((remove) => remove());\n        this.valueSubscriptions.clear();\n        this.removeFromVariantTree && this.removeFromVariantTree();\n        this.parent && this.parent.children.delete(this);\n        for (const key in this.events) {\n            this.events[key].clear();\n        }\n        for (const key in this.features) {\n            const feature = this.features[key];\n            if (feature) {\n                feature.unmount();\n                feature.isMounted = false;\n            }\n        }\n        this.current = null;\n    }\n    bindToMotionValue(key, value) {\n        if (this.valueSubscriptions.has(key)) {\n            this.valueSubscriptions.get(key)();\n        }\n        const valueIsTransform = transformProps.has(key);\n        if (valueIsTransform && this.onBindTransform) {\n            this.onBindTransform();\n        }\n        const removeOnChange = value.on(\"change\", (latestValue) => {\n            this.latestValues[key] = latestValue;\n            this.props.onUpdate && frame.preRender(this.notifyUpdate);\n            if (valueIsTransform && this.projection) {\n                this.projection.isTransformDirty = true;\n            }\n        });\n        const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n        let removeSyncCheck;\n        if (window.MotionCheckAppearSync) {\n            removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n        }\n        this.valueSubscriptions.set(key, () => {\n            removeOnChange();\n            removeOnRenderRequest();\n            if (removeSyncCheck)\n                removeSyncCheck();\n            if (value.owner)\n                value.stop();\n        });\n    }\n    sortNodePosition(other) {\n        /**\n         * If these nodes aren't even of the same type we can't compare their depth.\n         */\n        if (!this.current ||\n            !this.sortInstanceNodePosition ||\n            this.type !== other.type) {\n            return 0;\n        }\n        return this.sortInstanceNodePosition(this.current, other.current);\n    }\n    updateFeatures() {\n        let key = \"animation\";\n        for (key in featureDefinitions) {\n            const featureDefinition = featureDefinitions[key];\n            if (!featureDefinition)\n                continue;\n            const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n            /**\n             * If this feature is enabled but not active, make a new instance.\n             */\n            if (!this.features[key] &&\n                FeatureConstructor &&\n                isEnabled(this.props)) {\n                this.features[key] = new FeatureConstructor(this);\n            }\n            /**\n             * If we have a feature, mount or update it.\n             */\n            if (this.features[key]) {\n                const feature = this.features[key];\n                if (feature.isMounted) {\n                    feature.update();\n                }\n                else {\n                    feature.mount();\n                    feature.isMounted = true;\n                }\n            }\n        }\n    }\n    triggerBuild() {\n        this.build(this.renderState, this.latestValues, this.props);\n    }\n    /**\n     * Measure the current viewport box with or without transforms.\n     * Only measures axis-aligned boxes, rotate and skew must be manually\n     * removed with a re-render to work.\n     */\n    measureViewportBox() {\n        return this.current\n            ? this.measureInstanceViewportBox(this.current, this.props)\n            : createBox();\n    }\n    getStaticValue(key) {\n        return this.latestValues[key];\n    }\n    setStaticValue(key, value) {\n        this.latestValues[key] = value;\n    }\n    /**\n     * Update the provided props. Ensure any newly-added motion values are\n     * added to our map, old ones removed, and listeners updated.\n     */\n    update(props, presenceContext) {\n        if (props.transformTemplate || this.props.transformTemplate) {\n            this.scheduleRender();\n        }\n        this.prevProps = this.props;\n        this.props = props;\n        this.prevPresenceContext = this.presenceContext;\n        this.presenceContext = presenceContext;\n        /**\n         * Update prop event handlers ie onAnimationStart, onAnimationComplete\n         */\n        for (let i = 0; i < propEventHandlers.length; i++) {\n            const key = propEventHandlers[i];\n            if (this.propEventSubscriptions[key]) {\n                this.propEventSubscriptions[key]();\n                delete this.propEventSubscriptions[key];\n            }\n            const listenerName = (\"on\" + key);\n            const listener = props[listenerName];\n            if (listener) {\n                this.propEventSubscriptions[key] = this.on(key, listener);\n            }\n        }\n        this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);\n        if (this.handleChildMotionValue) {\n            this.handleChildMotionValue();\n        }\n    }\n    getProps() {\n        return this.props;\n    }\n    /**\n     * Returns the variant definition with a given name.\n     */\n    getVariant(name) {\n        return this.props.variants ? this.props.variants[name] : undefined;\n    }\n    /**\n     * Returns the defined default transition on this component.\n     */\n    getDefaultTransition() {\n        return this.props.transition;\n    }\n    getTransformPagePoint() {\n        return this.props.transformPagePoint;\n    }\n    getClosestVariantNode() {\n        return this.isVariantNode\n            ? this\n            : this.parent\n                ? this.parent.getClosestVariantNode()\n                : undefined;\n    }\n    /**\n     * Add a child visual element to our set of children.\n     */\n    addVariantChild(child) {\n        const closestVariantNode = this.getClosestVariantNode();\n        if (closestVariantNode) {\n            closestVariantNode.variantChildren &&\n                closestVariantNode.variantChildren.add(child);\n            return () => closestVariantNode.variantChildren.delete(child);\n        }\n    }\n    /**\n     * Add a motion value and bind it to this visual element.\n     */\n    addValue(key, value) {\n        // Remove existing value if it exists\n        const existingValue = this.values.get(key);\n        if (value !== existingValue) {\n            if (existingValue)\n                this.removeValue(key);\n            this.bindToMotionValue(key, value);\n            this.values.set(key, value);\n            this.latestValues[key] = value.get();\n        }\n    }\n    /**\n     * Remove a motion value and unbind any active subscriptions.\n     */\n    removeValue(key) {\n        this.values.delete(key);\n        const unsubscribe = this.valueSubscriptions.get(key);\n        if (unsubscribe) {\n            unsubscribe();\n            this.valueSubscriptions.delete(key);\n        }\n        delete this.latestValues[key];\n        this.removeValueFromRenderState(key, this.renderState);\n    }\n    /**\n     * Check whether we have a motion value for this key\n     */\n    hasValue(key) {\n        return this.values.has(key);\n    }\n    getValue(key, defaultValue) {\n        if (this.props.values && this.props.values[key]) {\n            return this.props.values[key];\n        }\n        let value = this.values.get(key);\n        if (value === undefined && defaultValue !== undefined) {\n            value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n            this.addValue(key, value);\n        }\n        return value;\n    }\n    /**\n     * If we're trying to animate to a previously unencountered value,\n     * we need to check for it in our state and as a last resort read it\n     * directly from the instance (which might have performance implications).\n     */\n    readValue(key, target) {\n        let value = this.latestValues[key] !== undefined || !this.current\n            ? this.latestValues[key]\n            : this.getBaseTargetFromProps(this.props, key) ??\n                this.readValueFromInstance(this.current, key, this.options);\n        if (value !== undefined && value !== null) {\n            if (typeof value === \"string\" &&\n                (isNumericalString(value) || isZeroValueString(value))) {\n                // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n                value = parseFloat(value);\n            }\n            else if (!findValueType(value) && complex.test(target)) {\n                value = getAnimatableNone(key, target);\n            }\n            this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n        }\n        return isMotionValue(value) ? value.get() : value;\n    }\n    /**\n     * Set the base target to later animate back to. This is currently\n     * only hydrated on creation and when we first read a value.\n     */\n    setBaseTarget(key, value) {\n        this.baseTarget[key] = value;\n    }\n    /**\n     * Find the base target for a value thats been removed from all animation\n     * props.\n     */\n    getBaseTarget(key) {\n        const { initial } = this.props;\n        let valueFromInitial;\n        if (typeof initial === \"string\" || typeof initial === \"object\") {\n            const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n            if (variant) {\n                valueFromInitial = variant[key];\n            }\n        }\n        /**\n         * If this value still exists in the current initial variant, read that.\n         */\n        if (initial && valueFromInitial !== undefined) {\n            return valueFromInitial;\n        }\n        /**\n         * Alternatively, if this VisualElement config has defined a getBaseTarget\n         * so we can read the value from an alternative source, try that.\n         */\n        const target = this.getBaseTargetFromProps(this.props, key);\n        if (target !== undefined && !isMotionValue(target))\n            return target;\n        /**\n         * If the value was initially defined on initial, but it doesn't any more,\n         * return undefined. Otherwise return the value as initially read from the DOM.\n         */\n        return this.initialValues[key] !== undefined &&\n            valueFromInitial === undefined\n            ? undefined\n            : this.baseTarget[key];\n    }\n    on(eventName, callback) {\n        if (!this.events[eventName]) {\n            this.events[eventName] = new SubscriptionManager();\n        }\n        return this.events[eventName].add(callback);\n    }\n    notify(eventName, ...args) {\n        if (this.events[eventName]) {\n            this.events[eventName].notify(...args);\n        }\n    }\n}\n\nexport { VisualElement };\n","import { DOMKeyframesResolver, isMotionValue } from 'motion-dom';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n    constructor() {\n        super(...arguments);\n        this.KeyframeResolver = DOMKeyframesResolver;\n    }\n    sortInstanceNodePosition(a, b) {\n        /**\n         * compareDocumentPosition returns a bitmask, by using the bitwise &\n         * we're returning true if 2 in that bitmask is set to true. 2 is set\n         * to true if b preceeds a.\n         */\n        return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n    }\n    getBaseTargetFromProps(props, key) {\n        return props.style\n            ? props.style[key]\n            : undefined;\n    }\n    removeValueFromRenderState(key, { vars, style }) {\n        delete vars[key];\n        delete style[key];\n    }\n    handleChildMotionValue() {\n        if (this.childSubscription) {\n            this.childSubscription();\n            delete this.childSubscription;\n        }\n        const { children } = this.props;\n        if (isMotionValue(children)) {\n            this.childSubscription = children.on(\"change\", (latest) => {\n                if (this.current) {\n                    this.current.textContent = `${latest}`;\n                }\n            });\n        }\n    }\n}\n\nexport { DOMVisualElement };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n    Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n    // Loop over any CSS variables and assign those.\n    for (const key in vars) {\n        element.style.setProperty(key, vars[key]);\n    }\n}\n\nexport { renderHTML };\n","import { transformProps, defaultTransformValue, readTransformValue, isCSSVariableName } from 'motion-dom';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n    return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n    constructor() {\n        super(...arguments);\n        this.type = \"html\";\n        this.renderInstance = renderHTML;\n    }\n    readValueFromInstance(instance, key) {\n        if (transformProps.has(key)) {\n            return this.projection?.isProjecting\n                ? defaultTransformValue(key)\n                : readTransformValue(instance, key);\n        }\n        else {\n            const computedStyle = getComputedStyle(instance);\n            const value = (isCSSVariableName(key)\n                ? computedStyle.getPropertyValue(key)\n                : computedStyle[key]) || 0;\n            return typeof value === \"string\" ? value.trim() : value;\n        }\n    }\n    measureInstanceViewportBox(instance, { transformPagePoint }) {\n        return measureViewportBox(instance, transformPagePoint);\n    }\n    build(renderState, latestValues, props) {\n        buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n    }\n    scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n        return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n    }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n    \"baseFrequency\",\n    \"diffuseConstant\",\n    \"kernelMatrix\",\n    \"kernelUnitLength\",\n    \"keySplines\",\n    \"keyTimes\",\n    \"limitingConeAngle\",\n    \"markerHeight\",\n    \"markerWidth\",\n    \"numOctaves\",\n    \"targetX\",\n    \"targetY\",\n    \"surfaceScale\",\n    \"specularConstant\",\n    \"specularExponent\",\n    \"stdDeviation\",\n    \"tableValues\",\n    \"viewBox\",\n    \"gradientTransform\",\n    \"pathLength\",\n    \"startOffset\",\n    \"textLength\",\n    \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n    renderHTML(element, renderState, undefined, projection);\n    for (const key in renderState.attrs) {\n        element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n    }\n}\n\nexport { renderSVG };\n","import { transformProps, getDefaultValueType } from 'motion-dom';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n    constructor() {\n        super(...arguments);\n        this.type = \"svg\";\n        this.isSVGTag = false;\n        this.measureInstanceViewportBox = createBox;\n    }\n    getBaseTargetFromProps(props, key) {\n        return props[key];\n    }\n    readValueFromInstance(instance, key) {\n        if (transformProps.has(key)) {\n            const defaultType = getDefaultValueType(key);\n            return defaultType ? defaultType.default || 0 : 0;\n        }\n        key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n        return instance.getAttribute(key);\n    }\n    scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n        return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n    }\n    build(renderState, latestValues, props) {\n        buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n    }\n    renderInstance(instance, renderState, styleProp, projection) {\n        renderSVG(instance, renderState, styleProp, projection);\n    }\n    mount(instance) {\n        this.isSVGTag = isSVGTag(instance.tagName);\n        super.mount(instance);\n    }\n}\n\nexport { SVGVisualElement };\n","import { Fragment } from 'react';\nimport { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n    return isSVGComponent(Component)\n        ? new SVGVisualElement(options)\n        : new HTMLVisualElement(options, {\n            allowProjection: Component !== Fragment,\n        });\n};\n\nexport { createDomVisualElement };\n","import { animations } from '../../motion/features/animations.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\n\n/**\n * @public\n */\nconst domAnimation = {\n    renderer: createDomVisualElement,\n    ...animations,\n    ...gestureAnimations,\n};\n\nexport { domAnimation };\n","\"use client\";\nexport { AnimatePresence } from './components/AnimatePresence/index.mjs';\nexport { LayoutGroup } from './components/LayoutGroup/index.mjs';\nexport { LazyMotion } from './components/LazyMotion/index.mjs';\nexport { MotionConfig } from './components/MotionConfig/index.mjs';\nexport { m } from './render/components/m/proxy.mjs';\nexport { motion } from './render/components/motion/proxy.mjs';\nexport { addPointerEvent } from './events/add-pointer-event.mjs';\nexport { addPointerInfo } from './events/event-info.mjs';\nexport { animations } from './motion/features/animations.mjs';\nexport { makeUseVisualState } from './motion/utils/use-visual-state.mjs';\nexport { calcLength } from './projection/geometry/delta-calc.mjs';\nexport { createBox } from './projection/geometry/models.mjs';\nexport { filterProps } from './render/dom/utils/filter-props.mjs';\nexport { isBrowser } from './utils/is-browser.mjs';\nexport { useForceUpdate } from './utils/use-force-update.mjs';\nexport { useIsomorphicLayoutEffect } from './utils/use-isomorphic-effect.mjs';\nexport { useUnmountEffect } from './utils/use-unmount-effect.mjs';\nexport { domAnimation } from './render/dom/features-animation.mjs';\nexport { domMax } from './render/dom/features-max.mjs';\nexport { domMin } from './render/dom/features-min.mjs';\nexport { useMotionValueEvent } from './utils/use-motion-value-event.mjs';\nexport { useElementScroll } from './value/scroll/use-element-scroll.mjs';\nexport { useViewportScroll } from './value/scroll/use-viewport-scroll.mjs';\nexport { useMotionTemplate } from './value/use-motion-template.mjs';\nexport { useMotionValue } from './value/use-motion-value.mjs';\nexport { useScroll } from './value/use-scroll.mjs';\nexport { useSpring } from './value/use-spring.mjs';\nexport { useTime } from './value/use-time.mjs';\nexport { useTransform } from './value/use-transform.mjs';\nexport { useVelocity } from './value/use-velocity.mjs';\nexport { useWillChange } from './value/use-will-change/index.mjs';\nexport { WillChangeMotionValue } from './value/use-will-change/WillChangeMotionValue.mjs';\nexport { resolveMotionValue } from './value/utils/resolve-motion-value.mjs';\nexport { useReducedMotion } from './utils/reduced-motion/use-reduced-motion.mjs';\nexport { useReducedMotionConfig } from './utils/reduced-motion/use-reduced-motion-config.mjs';\nexport * from 'motion-utils';\nexport { MotionGlobalConfig } from 'motion-utils';\nexport { animationControls } from './animation/hooks/animation-controls.mjs';\nexport { useAnimate } from './animation/hooks/use-animate.mjs';\nexport { useAnimateMini } from './animation/hooks/use-animate-style.mjs';\nexport { useAnimation, useAnimationControls } from './animation/hooks/use-animation.mjs';\nexport { animateVisualElement } from './animation/interfaces/visual-element.mjs';\nexport { useIsPresent, usePresence } from './components/AnimatePresence/use-presence.mjs';\nexport { usePresenceData } from './components/AnimatePresence/use-presence-data.mjs';\nexport { useDomEvent } from './events/use-dom-event.mjs';\nexport { DragControls, useDragControls } from './gestures/drag/use-drag-controls.mjs';\nexport { createRendererMotionComponent } from './motion/index.mjs';\nexport { isMotionComponent } from './motion/utils/is-motion-component.mjs';\nexport { unwrapMotionComponent } from './motion/utils/unwrap-motion-component.mjs';\nexport { isValidMotionProp } from './motion/utils/valid-prop.mjs';\nexport { addScaleCorrector } from './projection/styles/scale-correction.mjs';\nexport { useInstantLayoutTransition } from './projection/use-instant-layout-transition.mjs';\nexport { useResetProjection } from './projection/use-reset-projection.mjs';\nexport { buildTransform } from './render/html/utils/build-transform.mjs';\nexport { visualElementStore } from './render/store.mjs';\nexport { VisualElement } from './render/VisualElement.mjs';\nexport { useAnimationFrame } from './utils/use-animation-frame.mjs';\nexport { useCycle } from './utils/use-cycle.mjs';\nexport { useInView } from './utils/use-in-view.mjs';\nexport { disableInstantTransitions, useInstantTransition } from './utils/use-instant-transition.mjs';\nexport { optimizedAppearDataAttribute } from './animation/optimized-appear/data-id.mjs';\nexport { startOptimizedAppearAnimation } from './animation/optimized-appear/start.mjs';\nexport { LayoutGroupContext } from './context/LayoutGroupContext.mjs';\nexport { MotionConfigContext } from './context/MotionConfigContext.mjs';\nexport { MotionContext } from './context/MotionContext/index.mjs';\nexport { PresenceContext } from './context/PresenceContext.mjs';\nexport { SwitchLayoutGroupContext } from './context/SwitchLayoutGroupContext.mjs';\nexport { FlatTree } from './render/utils/flat-tree.mjs';\nexport { useAnimatedState as useDeprecatedAnimatedState } from './animation/hooks/use-animated-state.mjs';\nexport { AnimateSharedLayout } from './components/AnimateSharedLayout.mjs';\nexport { DeprecatedLayoutGroupContext } from './context/DeprecatedLayoutGroupContext.mjs';\nexport { useInvertedScale as useDeprecatedInvertedScale } from './value/use-inverted-scale.mjs';\nexport { delay } from './utils/delay.mjs';\nimport * as namespace from './components/Reorder/namespace.mjs';\nexport { namespace as Reorder };\nexport { animate, createScopedAnimate } from './animation/animate/index.mjs';\nexport { animateMini } from './animation/animators/waapi/animate-style.mjs';\nexport { scroll } from './render/dom/scroll/index.mjs';\nexport { scrollInfo } from './render/dom/scroll/track.mjs';\nexport { inView } from './render/dom/viewport/index.mjs';\nexport { stagger } from './animation/utils/stagger.mjs';\nexport { distance, distance2D } from './utils/distance.mjs';\nexport * from 'motion-dom';\n","\"use client\";\n\n// src/index.ts\nimport { domAnimation } from \"framer-motion\";\nvar index_default = domAnimation;\nexport {\n  index_default as default\n};\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n    isObject = require('./isObject'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n    now = require('./now'),\n    toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport './index.css';\n\nexport * from './boxplot/box-plot-component';\nexport * from './boxplot/box-plot';\nexport * from './boxplot/boxplot-option';\n\nexport * from './bubble-chart/bubble-chart-component';\nexport * from './bubble-chart/bubble-chart';\nexport * from './bubble-chart/bubble-chart-option';\n\nexport * from './histogram/histogram-component';\nexport * from './histogram/histogram-plot';\nexport * from './histogram/histogram-option';\n\nexport * from './pcp/pcp-component';\nexport * from './pcp/pcp-option';\nexport * from './pcp/pcp';\n\nexport * from './scatterplot/scatter-option';\nexport * from './scatterplot/scatter-plot-component';\nexport * from './scatterplot/scatter-regression-plot';\nexport * from './scatterplot/simple-chart-option';\nexport * from './scatterplot/simple-scatter-plots';\n\nexport * from './moran-scatterplot/moran-scatter-plot';\n\nexport * from './echarts-updater';\n","\"use client\";\n\n// src/context.ts\nimport * as React from \"react\";\nfunction createContext2(options = {}) {\n  const {\n    strict = true,\n    errorMessage = \"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider\",\n    name\n  } = options;\n  const Context = React.createContext(void 0);\n  Context.displayName = name;\n  function useContext2() {\n    var _a;\n    const context = React.useContext(Context);\n    if (!context && strict) {\n      const error = new Error(errorMessage);\n      error.name = \"ContextError\";\n      (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext2);\n      throw error;\n    }\n    return context;\n  }\n  return [Context.Provider, useContext2, Context];\n}\n\nexport {\n  createContext2 as createContext\n};\n","\"use client\";\n\n// src/dom.ts\nimport {\n  useImperativeHandle,\n  useLayoutEffect,\n  useRef\n} from \"react\";\nfunction canUseDOM() {\n  return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\nvar isBrowser = canUseDOM();\nfunction getUserAgentBrowser(navigator) {\n  const { userAgent: ua, vendor } = navigator;\n  const android = /(android)/i.test(ua);\n  switch (true) {\n    case /CriOS/.test(ua):\n      return \"Chrome for iOS\";\n    case /Edg\\//.test(ua):\n      return \"Edge\";\n    case (android && /Silk\\//.test(ua)):\n      return \"Silk\";\n    case (/Chrome/.test(ua) && /Google Inc/.test(vendor)):\n      return \"Chrome\";\n    case /Firefox\\/\\d+\\.\\d+$/.test(ua):\n      return \"Firefox\";\n    case android:\n      return \"AOSP\";\n    case /MSIE|Trident/.test(ua):\n      return \"IE\";\n    case (/Safari/.test(navigator.userAgent) && /Apple Computer/.test(ua)):\n      return \"Safari\";\n    case /AppleWebKit/.test(ua):\n      return \"WebKit\";\n    default:\n      return null;\n  }\n}\nfunction getUserAgentOS(navigator) {\n  const { userAgent: ua, platform } = navigator;\n  switch (true) {\n    case /Android/.test(ua):\n      return \"Android\";\n    case /iPhone|iPad|iPod/.test(platform):\n      return \"iOS\";\n    case /Win/.test(platform):\n      return \"Windows\";\n    case /Mac/.test(platform):\n      return \"Mac\";\n    case /CrOS/.test(ua):\n      return \"Chrome OS\";\n    case /Firefox/.test(ua):\n      return \"Firefox OS\";\n    default:\n      return null;\n  }\n}\nfunction detectDeviceType(navigator) {\n  const { userAgent: ua } = navigator;\n  if (/(tablet)|(iPad)|(Nexus 9)/i.test(ua)) return \"tablet\";\n  if (/(mobi)/i.test(ua)) return \"phone\";\n  return \"desktop\";\n}\nfunction detectOS(os) {\n  if (!isBrowser) return false;\n  return getUserAgentOS(window.navigator) === os;\n}\nfunction detectBrowser(browser) {\n  if (!isBrowser) return false;\n  return getUserAgentBrowser(window.navigator) === browser;\n}\nfunction detectTouch() {\n  if (!isBrowser) return false;\n  return window.ontouchstart === null && window.ontouchmove === null && window.ontouchend === null;\n}\nfunction createDOMRef(ref) {\n  return {\n    UNSAFE_getDOMNode() {\n      return ref.current;\n    }\n  };\n}\nfunction createFocusableRef(domRef, focusableRef = domRef) {\n  return {\n    ...createDOMRef(domRef),\n    focus() {\n      if (focusableRef.current) {\n        focusableRef.current.focus();\n      }\n    }\n  };\n}\nfunction useDOMRef(ref) {\n  const domRef = useRef(null);\n  useImperativeHandle(ref, () => domRef.current);\n  return domRef;\n}\nfunction useFocusableRef(ref, focusableRef) {\n  const domRef = useRef(null);\n  useImperativeHandle(ref, () => createFocusableRef(domRef, focusableRef));\n  return domRef;\n}\nfunction useSyncRef(context, ref) {\n  useLayoutEffect(() => {\n    if (context && context.ref && ref && ref.current) {\n      context.ref.current = ref.current;\n      return () => {\n        var _a;\n        if ((_a = context.ref) == null ? void 0 : _a.current) {\n          context.ref.current = null;\n        }\n      };\n    }\n  }, [context, ref]);\n}\nfunction areRectsIntersecting(rect1, rect2) {\n  return rect1 && rect2 && rect1.x < rect2.x + rect2.width && rect1.x + rect1.width > rect2.x && rect1.y < rect2.y + rect2.height && rect1.y + rect1.height > rect2.y;\n}\n\nexport {\n  canUseDOM,\n  isBrowser,\n  getUserAgentBrowser,\n  getUserAgentOS,\n  detectDeviceType,\n  detectOS,\n  detectBrowser,\n  detectTouch,\n  createDOMRef,\n  createFocusableRef,\n  useDOMRef,\n  useFocusableRef,\n  useSyncRef,\n  areRectsIntersecting\n};\n","// src/demi/react18/getInertValue.ts\nvar getInertValue = (v) => {\n  return v ? \"\" : void 0;\n};\n\n// src/common/assertion.ts\nvar __DEV__ = process.env.NODE_ENV !== \"production\";\nvar __TEST__ = process.env.NODE_ENV === \"test\";\nfunction isArray(value) {\n  return Array.isArray(value);\n}\nfunction isEmptyArray(value) {\n  return isArray(value) && value.length === 0;\n}\nfunction isObject(value) {\n  const type = typeof value;\n  return value != null && (type === \"object\" || type === \"function\") && !isArray(value);\n}\nfunction isEmptyObject(value) {\n  return isObject(value) && Object.keys(value).length === 0;\n}\nfunction isEmpty(value) {\n  if (isArray(value)) return isEmptyArray(value);\n  if (isObject(value)) return isEmptyObject(value);\n  if (value == null || value === \"\") return true;\n  return false;\n}\nfunction isFunction(value) {\n  return typeof value === \"function\";\n}\nvar dataAttr = (condition) => condition ? \"true\" : void 0;\nvar isNumeric = (value) => value != null && parseInt(value.toString(), 10) > 0;\n\n// src/common/clsx.ts\nfunction toVal(mix) {\n  var k, y, str = \"\";\n  if (typeof mix === \"string\" || typeof mix === \"number\") {\n    str += mix;\n  } else if (typeof mix === \"object\") {\n    if (Array.isArray(mix)) {\n      for (k = 0; k < mix.length; k++) {\n        if (mix[k]) {\n          if (y = toVal(mix[k])) {\n            str && (str += \" \");\n            str += y;\n          }\n        }\n      }\n    } else {\n      for (k in mix) {\n        if (mix[k]) {\n          str && (str += \" \");\n          str += k;\n        }\n      }\n    }\n  }\n  return str;\n}\nfunction clsx(...args) {\n  var i = 0, tmp, x, str = \"\";\n  while (i < args.length) {\n    if (tmp = args[i++]) {\n      if (x = toVal(tmp)) {\n        str && (str += \" \");\n        str += x;\n      }\n    }\n  }\n  return str;\n}\n\n// src/common/object.ts\nvar renameProp = (oldProp, newProp, { [oldProp]: old, ...others }) => ({\n  [newProp]: old,\n  ...others\n});\nvar copyObject = (obj) => {\n  if (!isObject(obj)) return obj;\n  if (obj instanceof Array) return [...obj];\n  return { ...obj };\n};\nvar omitObject = (obj, omitKeys) => {\n  if (!isObject(obj)) return obj;\n  if (obj instanceof Array) return [...obj];\n  const newObj = { ...obj };\n  omitKeys.forEach((key) => newObj[key] && delete newObj[key]);\n  return newObj;\n};\nvar cleanObject = (obj) => {\n  if (!isObject(obj)) return obj;\n  if (obj instanceof Array) return [...obj];\n  const newObj = { ...obj };\n  Object.keys(newObj).forEach((key) => {\n    if (newObj[key] === void 0 || newObj[key] === null) {\n      delete newObj[key];\n    }\n  });\n  return newObj;\n};\nvar cleanObjectKeys = (obj, keys = []) => {\n  if (!isObject(obj)) return obj;\n  if (obj instanceof Array) return [...obj];\n  const newObj = { ...obj };\n  keys.forEach((key) => {\n    if (newObj[key]) {\n      delete newObj[key];\n    }\n  });\n  return newObj;\n};\nvar getKeyValue = (obj, key) => {\n  if (!isObject(obj)) return obj;\n  if (obj instanceof Array) return [...obj];\n  return obj[key];\n};\nvar getProp = (obj, path, fallback, index) => {\n  const key = typeof path === \"string\" ? path.split(\".\") : [path];\n  for (index = 0; index < key.length; index += 1) {\n    if (!obj) break;\n    obj = obj[key[index]];\n  }\n  return obj === void 0 ? fallback : obj;\n};\nvar arrayToObject = (arr) => {\n  if (!arr.length || !Array.isArray(arr)) return {};\n  return arr.reduce((acc, item) => {\n    return { ...acc, ...item };\n  }, {});\n};\nfunction compact(object) {\n  const clone = Object.assign({}, object);\n  for (let key in clone) {\n    if (clone[key] === void 0) delete clone[key];\n  }\n  return clone;\n}\n\n// src/common/text.ts\nvar safeText = (text) => {\n  if ((text == null ? void 0 : text.length) <= 4) return text;\n  return text == null ? void 0 : text.slice(0, 3);\n};\nvar safeAriaLabel = (...texts) => {\n  let ariaLabel = \" \";\n  for (const text of texts) {\n    if (typeof text === \"string\" && text.length > 0) {\n      ariaLabel = text;\n      break;\n    }\n  }\n  return ariaLabel;\n};\n\n// src/common/dimensions.ts\nvar getMargin = (num) => {\n  return `calc(${num * 15.25}pt + 1px * ${num - 1})`;\n};\n\n// src/common/functions.ts\nvar capitalize = (s) => {\n  return s ? s.charAt(0).toUpperCase() + s.slice(1).toLowerCase() : \"\";\n};\nfunction callAllHandlers(...fns) {\n  return function func(event) {\n    fns.some((fn) => {\n      fn == null ? void 0 : fn(event);\n      return event == null ? void 0 : event.defaultPrevented;\n    });\n  };\n}\nfunction callAll(...fns) {\n  return function mergedFn(arg) {\n    fns.forEach((fn) => {\n      fn == null ? void 0 : fn(arg);\n    });\n  };\n}\nfunction extractProperty(key, defaultValue, ...objs) {\n  let result = defaultValue;\n  for (const obj of objs) {\n    if (obj && key in obj && !!obj[key]) {\n      result = obj[key];\n    }\n  }\n  return result;\n}\nfunction getUniqueID(prefix) {\n  return `${prefix}-${Math.floor(Math.random() * 1e6)}`;\n}\nfunction removeEvents(input) {\n  for (const key in input) {\n    if (key.startsWith(\"on\")) {\n      delete input[key];\n    }\n  }\n  return input;\n}\nfunction objectToDeps(obj) {\n  if (!obj || typeof obj !== \"object\") {\n    return \"\";\n  }\n  try {\n    return JSON.stringify(obj);\n  } catch (e) {\n    return \"\";\n  }\n}\nfunction debounce(func, waitMilliseconds = 0) {\n  let timeout;\n  return function(...args) {\n    const later = () => {\n      timeout = void 0;\n      func.apply(this, args);\n    };\n    if (timeout !== void 0) {\n      clearTimeout(timeout);\n    }\n    timeout = setTimeout(later, waitMilliseconds);\n  };\n}\nfunction uniqBy(arr, iteratee) {\n  if (typeof iteratee === \"string\") {\n    iteratee = (item) => item[iteratee];\n  }\n  return arr.filter((x, i, self) => i === self.findIndex((y) => iteratee(x) === iteratee(y)));\n}\nvar omit = (obj, keys) => {\n  const res = Object.assign({}, obj);\n  keys.forEach((key) => {\n    delete res[key];\n  });\n  return res;\n};\nvar kebabCase = (s) => {\n  return s.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n};\nvar mapKeys = (obj, iteratee) => {\n  return Object.fromEntries(\n    Object.entries(obj).map(([key, value]) => [iteratee(value, key), value])\n  );\n};\nvar get = (object, path, defaultValue) => {\n  const keys = Array.isArray(path) ? path : path.replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\");\n  let res = object;\n  for (const key of keys) {\n    res = res == null ? void 0 : res[key];\n    if (res === void 0) {\n      return defaultValue;\n    }\n  }\n  return res;\n};\nvar intersectionBy = (...args) => {\n  if (args.length < 2) {\n    throw new Error(\"intersectionBy requires at least two arrays and an iteratee\");\n  }\n  const iteratee = args[args.length - 1];\n  const arrays = args.slice(0, -1);\n  if (arrays.length === 0) {\n    return [];\n  }\n  const getIterateeValue = (item) => {\n    if (typeof iteratee === \"function\") {\n      return iteratee(item);\n    } else if (typeof iteratee === \"string\") {\n      return item[iteratee];\n    } else {\n      throw new Error(\"Iteratee must be a function or a string key of the array elements\");\n    }\n  };\n  const [first, ...rest] = arrays;\n  const transformedFirst = first.map((item) => getIterateeValue(item));\n  const transformedSets = rest.map(\n    (array) => new Set(array.map((item) => getIterateeValue(item)))\n  );\n  const res = [];\n  const seen = /* @__PURE__ */ new Set();\n  for (let i = 0; i < first.length; i++) {\n    const item = first[i];\n    const transformed = transformedFirst[i];\n    if (seen.has(transformed)) {\n      continue;\n    }\n    const existsInAll = transformedSets.every((set) => set.has(transformed));\n    if (existsInAll) {\n      res.push(item);\n      seen.add(transformed);\n    }\n  }\n  return res;\n};\n\n// src/common/numbers.ts\nfunction range(start, end) {\n  const length = end - start + 1;\n  return Array.from({ length }, (_, index) => index + start);\n}\nfunction clamp(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\nfunction clampPercentage(value, max = 100) {\n  return Math.min(Math.max(value, 0), max);\n}\n\n// src/common/console.ts\nvar warningStack = {};\nfunction warn(message, component, ...args) {\n  const tag = component ? ` [${component}]` : \" \";\n  const log = `[Hero UI]${tag}: ${message}`;\n  if (typeof console === \"undefined\") return;\n  if (warningStack[log]) return;\n  warningStack[log] = true;\n  if (process.env.NODE_ENV !== \"production\") {\n    return console.warn(log, args);\n  }\n}\n\n// src/common/dates.ts\nfunction getGregorianYearOffset(identifier) {\n  switch (identifier) {\n    case \"buddhist\":\n      return 543;\n    case \"ethiopic\":\n    case \"ethioaa\":\n      return -8;\n    case \"coptic\":\n      return -284;\n    case \"hebrew\":\n      return 3760;\n    case \"indian\":\n      return -78;\n    case \"islamic-civil\":\n    case \"islamic-tbla\":\n    case \"islamic-umalqura\":\n      return -579;\n    case \"persian\":\n      return -600;\n    case \"roc\":\n    case \"japanese\":\n    case \"gregory\":\n    default:\n      return 0;\n  }\n}\n\n// src/common/regex.ts\nvar isPatternNumeric = (pattern) => {\n  const numericPattern = /(^|\\W)[0-9](\\W|$)/;\n  return numericPattern.test(pattern) && !/[^\\d\\^$\\[\\]\\(\\)\\*\\+\\-\\.\\|]/.test(pattern);\n};\nexport {\n  __DEV__,\n  __TEST__,\n  arrayToObject,\n  callAll,\n  callAllHandlers,\n  capitalize,\n  clamp,\n  clampPercentage,\n  cleanObject,\n  cleanObjectKeys,\n  clsx,\n  compact,\n  copyObject,\n  dataAttr,\n  debounce,\n  extractProperty,\n  get,\n  getGregorianYearOffset,\n  getInertValue,\n  getKeyValue,\n  getMargin,\n  getProp,\n  getUniqueID,\n  intersectionBy,\n  isArray,\n  isEmpty,\n  isEmptyArray,\n  isEmptyObject,\n  isFunction,\n  isNumeric,\n  isObject,\n  isPatternNumeric,\n  kebabCase,\n  mapKeys,\n  objectToDeps,\n  omit,\n  omitObject,\n  range,\n  removeEvents,\n  renameProp,\n  safeAriaLabel,\n  safeText,\n  uniqBy,\n  warn\n};\n","\"use client\";\n\n// src/refs.ts\nimport { isFunction } from \"@heroui/shared-utils\";\nfunction assignRef(ref, value) {\n  if (ref == null) return;\n  if (isFunction(ref)) {\n    ref(value);\n    return;\n  }\n  try {\n    ref.current = value;\n  } catch (error) {\n    throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);\n  }\n}\nfunction mergeRefs(...refs) {\n  return (node) => {\n    refs.forEach((ref) => assignRef(ref, node));\n  };\n}\n\nexport {\n  assignRef,\n  mergeRefs\n};\n","// src/dom-props.ts\nvar DOMPropNames = /* @__PURE__ */ new Set([\n  \"id\",\n  \"type\",\n  \"style\",\n  \"title\",\n  \"role\",\n  \"tabIndex\",\n  \"htmlFor\",\n  \"width\",\n  \"height\",\n  \"abbr\",\n  \"accept\",\n  \"acceptCharset\",\n  \"accessKey\",\n  \"action\",\n  \"allowFullScreen\",\n  \"allowTransparency\",\n  \"alt\",\n  \"async\",\n  \"autoComplete\",\n  \"autoFocus\",\n  \"autoPlay\",\n  \"cellPadding\",\n  \"cellSpacing\",\n  \"challenge\",\n  \"charset\",\n  \"checked\",\n  \"cite\",\n  \"class\",\n  \"className\",\n  \"cols\",\n  \"colSpan\",\n  \"command\",\n  \"content\",\n  \"contentEditable\",\n  \"contextMenu\",\n  \"controls\",\n  \"coords\",\n  \"crossOrigin\",\n  \"data\",\n  \"dateTime\",\n  \"default\",\n  \"defer\",\n  \"dir\",\n  \"disabled\",\n  \"download\",\n  \"draggable\",\n  \"dropzone\",\n  \"encType\",\n  \"enterKeyHint\",\n  \"for\",\n  \"form\",\n  \"formAction\",\n  \"formEncType\",\n  \"formMethod\",\n  \"formNoValidate\",\n  \"formTarget\",\n  \"frameBorder\",\n  \"headers\",\n  \"hidden\",\n  \"high\",\n  \"href\",\n  \"hrefLang\",\n  \"httpEquiv\",\n  \"icon\",\n  \"inputMode\",\n  \"isMap\",\n  \"itemId\",\n  \"itemProp\",\n  \"itemRef\",\n  \"itemScope\",\n  \"itemType\",\n  \"kind\",\n  \"label\",\n  \"lang\",\n  \"list\",\n  \"loop\",\n  \"manifest\",\n  \"max\",\n  \"maxLength\",\n  \"media\",\n  \"mediaGroup\",\n  \"method\",\n  \"min\",\n  \"minLength\",\n  \"multiple\",\n  \"muted\",\n  \"name\",\n  \"noValidate\",\n  \"open\",\n  \"optimum\",\n  \"pattern\",\n  \"ping\",\n  \"placeholder\",\n  \"poster\",\n  \"preload\",\n  \"radioGroup\",\n  \"referrerPolicy\",\n  \"readOnly\",\n  \"rel\",\n  \"required\",\n  \"rows\",\n  \"rowSpan\",\n  \"sandbox\",\n  \"scope\",\n  \"scoped\",\n  \"scrolling\",\n  \"seamless\",\n  \"selected\",\n  \"shape\",\n  \"size\",\n  \"sizes\",\n  \"slot\",\n  \"sortable\",\n  \"span\",\n  \"spellCheck\",\n  \"src\",\n  \"srcDoc\",\n  \"srcSet\",\n  \"start\",\n  \"step\",\n  \"target\",\n  \"translate\",\n  \"typeMustMatch\",\n  \"useMap\",\n  \"value\",\n  \"wmode\",\n  \"wrap\"\n]);\nvar DOMEventNames = /* @__PURE__ */ new Set([\n  \"onCopy\",\n  \"onCut\",\n  \"onPaste\",\n  \"onLoad\",\n  \"onError\",\n  \"onWheel\",\n  \"onScroll\",\n  \"onCompositionEnd\",\n  \"onCompositionStart\",\n  \"onCompositionUpdate\",\n  \"onKeyDown\",\n  \"onKeyPress\",\n  \"onKeyUp\",\n  \"onFocus\",\n  \"onBlur\",\n  \"onChange\",\n  \"onInput\",\n  \"onSubmit\",\n  \"onClick\",\n  \"onContextMenu\",\n  \"onDoubleClick\",\n  \"onDrag\",\n  \"onDragEnd\",\n  \"onDragEnter\",\n  \"onDragExit\",\n  \"onDragLeave\",\n  \"onDragOver\",\n  \"onDragStart\",\n  \"onDrop\",\n  \"onMouseDown\",\n  \"onMouseEnter\",\n  \"onMouseLeave\",\n  \"onMouseMove\",\n  \"onMouseOut\",\n  \"onMouseOver\",\n  \"onMouseUp\",\n  \"onPointerDown\",\n  \"onPointerEnter\",\n  \"onPointerLeave\",\n  \"onPointerUp\",\n  \"onSelect\",\n  \"onTouchCancel\",\n  \"onTouchEnd\",\n  \"onTouchMove\",\n  \"onTouchStart\",\n  \"onAnimationStart\",\n  \"onAnimationEnd\",\n  \"onAnimationIteration\",\n  \"onTransitionEnd\"\n]);\n\nexport {\n  DOMPropNames,\n  DOMEventNames\n};\n","import {\n  DOMEventNames,\n  DOMPropNames\n} from \"./chunk-RFWDHYLZ.mjs\";\n\n// src/filter-dom-props.ts\nvar propRe = /^(data-.*)$/;\nvar ariaRe = /^(aria-.*)$/;\nvar funcRe = /^(on[A-Z].*)$/;\nfunction filterDOMProps(props, opts = {}) {\n  let {\n    labelable = true,\n    enabled = true,\n    propNames,\n    omitPropNames,\n    omitEventNames,\n    omitDataProps,\n    omitEventProps\n  } = opts;\n  let filteredProps = {};\n  if (!enabled) {\n    return props;\n  }\n  for (const prop in props) {\n    if (omitPropNames == null ? void 0 : omitPropNames.has(prop)) {\n      continue;\n    }\n    if ((omitEventNames == null ? void 0 : omitEventNames.has(prop)) && funcRe.test(prop)) {\n      continue;\n    }\n    if (funcRe.test(prop) && !DOMEventNames.has(prop)) {\n      continue;\n    }\n    if (omitDataProps && propRe.test(prop)) {\n      continue;\n    }\n    if (omitEventProps && funcRe.test(prop)) {\n      continue;\n    }\n    if (Object.prototype.hasOwnProperty.call(props, prop) && (DOMPropNames.has(prop) || labelable && ariaRe.test(prop) || (propNames == null ? void 0 : propNames.has(prop)) || propRe.test(prop)) || funcRe.test(prop)) {\n      filteredProps[prop] = props[prop];\n    }\n  }\n  return filteredProps;\n}\n\nexport {\n  filterDOMProps\n};\n","\"use client\";\n\n// src/provider-context.ts\nimport { createContext } from \"@heroui/react-utils\";\nvar [ProviderContext, useProviderContext] = createContext({\n  name: \"ProviderContext\",\n  strict: false\n});\n\nexport {\n  ProviderContext,\n  useProviderContext\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string): boolean {\n  // If the Intl.Locale API is available, use it to get the locale's text direction.\n  if (Intl.Locale) {\n    let locale = new Intl.Locale(localeString).maximize();\n\n    // Use the text info object to get the direction if possible.\n    // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n    let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n    if (textInfo) {\n      return textInfo.direction === 'rtl';\n    }\n\n    // Fallback: guess using the script.\n    // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n    if (locale.script) {\n      return RTL_SCRIPTS.has(locale.script);\n    }\n  }\n\n  // If not, just guess by the language (first part of the locale)\n  let lang = localeString.split('-')[0];\n  return RTL_LANGS.has(lang);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\nimport React, {JSX, ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react';\n\n// To support SSR, the auto incrementing id counter is stored in a context. This allows\n// it to be reset on every request to ensure the client and server are consistent.\n// There is also a prefix string that is used to support async loading components\n// Each async boundary must be wrapped in an SSR provider, which appends to the prefix\n// and resets the current id counter. This ensures that async loaded components have\n// consistent ids regardless of the loading order.\ninterface SSRContextValue {\n  prefix: string,\n  current: number\n}\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst defaultContext: SSRContextValue = {\n  prefix: String(Math.round(Math.random() * 10000000000)),\n  current: 0\n};\n\nconst SSRContext = React.createContext<SSRContextValue>(defaultContext);\nconst IsSSRContext = React.createContext(false);\n\nexport interface SSRProviderProps {\n  /** Your application here. */\n  children: ReactNode\n}\n\n// This is only used in React < 18.\nfunction LegacySSRProvider(props: SSRProviderProps): JSX.Element {\n  let cur = useContext(SSRContext);\n  let counter = useCounter(cur === defaultContext);\n  let [isSSR, setIsSSR] = useState(true);\n  let value: SSRContextValue = useMemo(() => ({\n    // If this is the first SSRProvider, start with an empty string prefix, otherwise\n    // append and increment the counter.\n    prefix: cur === defaultContext ? '' : `${cur.prefix}-${counter}`,\n    current: 0\n  }), [cur, counter]);\n\n  // If on the client, and the component was initially server rendered,\n  // then schedule a layout effect to update the component after hydration.\n  if (typeof document !== 'undefined') {\n    // This if statement technically breaks the rules of hooks, but is safe\n    // because the condition never changes after mounting.\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useLayoutEffect(() => {\n      setIsSSR(false);\n    }, []);\n  }\n\n  return (\n    <SSRContext.Provider value={value}>\n      <IsSSRContext.Provider value={isSSR}>\n        {props.children}\n      </IsSSRContext.Provider>\n    </SSRContext.Provider>\n  );\n}\n\nlet warnedAboutSSRProvider = false;\n\n/**\n * When using SSR with React Aria in React 16 or 17, applications must be wrapped in an SSRProvider.\n * This ensures that auto generated ids are consistent between the client and server.\n */\nexport function SSRProvider(props: SSRProviderProps): JSX.Element {\n  if (typeof React['useId'] === 'function') {\n    if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !warnedAboutSSRProvider) {\n      console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n      warnedAboutSSRProvider = true;\n    }\n    return <>{props.children}</>;\n  }\n  return <LegacySSRProvider {...props} />;\n}\n\nlet canUseDOM = Boolean(\n  typeof window !== 'undefined' &&\n  window.document &&\n  window.document.createElement\n);\n\nlet componentIds = new WeakMap();\n\nfunction useCounter(isDisabled = false) {\n  let ctx = useContext(SSRContext);\n  let ref = useRef<number | null>(null);\n  // eslint-disable-next-line rulesdir/pure-render\n  if (ref.current === null && !isDisabled) {\n    // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n    // This means our id counter will be incremented twice instead of once. This is a problem because on the\n    // server, components are only rendered once and so ids generated on the server won't match the client.\n    // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n    // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n    // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n    // To ensure that we only increment the global counter once, we store the starting id for this component in\n    // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n    // Since React runs the second render immediately after the first, this is safe.\n    // @ts-ignore\n    let currentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;\n    if (currentOwner) {\n      let prevComponentValue = componentIds.get(currentOwner);\n      if (prevComponentValue == null) {\n        // On the first render, and first call to useId, store the id and state in our weak map.\n        componentIds.set(currentOwner, {\n          id: ctx.current,\n          state: currentOwner.memoizedState\n        });\n      } else if (currentOwner.memoizedState !== prevComponentValue.state) {\n        // On the second render, the memoizedState gets reset by React.\n        // Reset the counter, and remove from the weak map so we don't\n        // do this for subsequent useId calls.\n        ctx.current = prevComponentValue.id;\n        componentIds.delete(currentOwner);\n      }\n    }\n\n    // eslint-disable-next-line rulesdir/pure-render\n    ref.current = ++ctx.current;\n  }\n\n  // eslint-disable-next-line rulesdir/pure-render\n  return ref.current;\n}\n\nfunction useLegacySSRSafeId(defaultId?: string): string {\n  let ctx = useContext(SSRContext);\n\n  // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n  // provide a warning to hint to the developer to add one.\n  if (ctx === defaultContext && !canUseDOM && process.env.NODE_ENV !== 'production') {\n    console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n  }\n\n  let counter = useCounter(!!defaultId);\n  let prefix = ctx === defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n  return defaultId || `${prefix}-${counter}`;\n}\n\nfunction useModernSSRSafeId(defaultId?: string): string {\n  let id = React.useId();\n  let [didSSR] = useState(useIsSSR());\n  let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${defaultContext.prefix}`;\n  return defaultId || `${prefix}-${id}`;\n}\n\n// Use React.useId in React 18 if available, otherwise fall back to our old implementation.\n/** @private */\nexport const useSSRSafeId = typeof React['useId'] === 'function' ? useModernSSRSafeId : useLegacySSRSafeId;\n\nfunction getSnapshot() {\n  return false;\n}\n\nfunction getServerSnapshot() {\n  return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction subscribe(onStoreChange: () => void): () => void {\n  // noop\n  return () => {};\n}\n\n/**\n * Returns whether the component is currently being server side rendered or\n * hydrated on the client. Can be used to delay browser-specific rendering\n * until after hydration.\n */\nexport function useIsSSR(): boolean {\n  // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n  if (typeof React['useSyncExternalStore'] === 'function') {\n    return React['useSyncExternalStore'](subscribe, getSnapshot, getServerSnapshot);\n  }\n\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useContext(IsSSRContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n  /** Contents that should have the locale applied. */\n  children: ReactNode,\n  /** The locale to apply to the children. */\n  locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): ReactNode {\n  let {locale, children} = props;\n  let defaultLocale = useDefaultLocale();\n\n  let value: Locale = React.useMemo(() => {\n    if (!locale) {\n      return defaultLocale;\n    }\n\n    return {\n      locale,\n      direction: isRTL(locale) ? 'rtl' : 'ltr'\n    };\n  }, [defaultLocale, locale]);\n\n  return (\n    <I18nContext.Provider value={value}>\n      {children}\n    </I18nContext.Provider>\n  );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n  let defaultLocale = useDefaultLocale();\n  let context = useContext(I18nContext);\n  return context || defaultLocale;\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedString} from './LocalizedStringFormatter';\n\nexport type LocalizedStrings<K extends string, T extends LocalizedString> = {\n  [lang: string]: Record<K, T>\n};\n\nconst localeSymbol = Symbol.for('react-aria.i18n.locale');\nconst stringsSymbol = Symbol.for('react-aria.i18n.strings');\nlet cachedGlobalStrings: {[packageName: string]: LocalizedStringDictionary<any, any>} | null | undefined = undefined;\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class LocalizedStringDictionary<K extends string = string, T extends LocalizedString = string> {\n  private strings: LocalizedStrings<K, T>;\n  private defaultLocale: string;\n\n  constructor(messages: LocalizedStrings<K, T>, defaultLocale: string = 'en-US') {\n    // Clone messages so we don't modify the original object.\n    // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n    this.strings = Object.fromEntries(\n      Object.entries(messages).filter(([, v]) => v)\n    );\n    this.defaultLocale = defaultLocale;\n  }\n\n  /** Returns a localized string for the given key and locale. */\n  getStringForLocale(key: K, locale: string): T {\n    let strings = this.getStringsForLocale(locale);\n    let string = strings[key];\n    if (!string) {\n      throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n    }\n\n    return string;\n  }\n\n  /** Returns all localized strings for the given locale. */\n  getStringsForLocale(locale: string): Record<K, T> {\n    let strings = this.strings[locale];\n    if (!strings) {\n      strings = getStringsForLocale(locale, this.strings, this.defaultLocale);\n      this.strings[locale] = strings;\n    }\n\n    return strings;\n  }\n\n  static getGlobalDictionaryForPackage<K extends string = string, T extends LocalizedString = string>(packageName: string): LocalizedStringDictionary<K, T> | null {\n    if (typeof window === 'undefined') {\n      return null;\n    }\n\n    let locale = window[localeSymbol];\n    if (cachedGlobalStrings === undefined) {\n      let globalStrings = window[stringsSymbol];\n      if (!globalStrings) {\n        return null;\n      }\n\n      cachedGlobalStrings = {};\n      for (let pkg in globalStrings) {\n        cachedGlobalStrings[pkg] = new LocalizedStringDictionary({[locale]: globalStrings[pkg]}, locale);\n      }\n    }\n\n    let dictionary = cachedGlobalStrings?.[packageName];\n    if (!dictionary) {\n      throw new Error(`Strings for package \"${packageName}\" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);\n    }\n\n    return dictionary;\n  }\n}\n\nfunction getStringsForLocale<K extends string, T extends LocalizedString>(locale: string, strings: LocalizedStrings<K, T>, defaultLocale = 'en-US') {\n  // If there is an exact match, use it.\n  if (strings[locale]) {\n    return strings[locale];\n  }\n\n  // Attempt to find the closest match by language.\n  // For example, if the locale is fr-CA (French Canadian), but there is only\n  // an fr-FR (France) set of strings, use that.\n  // This could be replaced with Intl.LocaleMatcher once it is supported.\n  // https://github.com/tc39/proposal-intl-localematcher\n  let language = getLanguage(locale);\n  if (strings[language]) {\n    return strings[language];\n  }\n\n  for (let key in strings) {\n    if (key.startsWith(language + '-')) {\n      return strings[key];\n    }\n  }\n\n  // Nothing close, use english.\n  return strings[defaultLocale];\n}\n\nfunction getLanguage(locale: string) {\n  // @ts-ignore\n  if (Intl.Locale) {\n    // @ts-ignore\n    return new Intl.Locale(locale).language;\n  }\n\n  return locale.split('-')[0];\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedStringDictionary} from './LocalizedStringDictionary';\n\nexport type Variables = Record<string, string | number | boolean> | undefined;\nexport type LocalizedString = string | ((args: Variables, formatter?: LocalizedStringFormatter<any, any>) => string);\ntype InternalString = string | (() => string);\n\nconst pluralRulesCache = new Map<string, Intl.PluralRules>();\nconst numberFormatCache = new Map<string, Intl.NumberFormat>();\n\n/**\n * Formats localized strings from a LocalizedStringDictionary. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers for the locale.\n */\nexport class LocalizedStringFormatter<K extends string = string, T extends LocalizedString = string> {\n  private locale: string;\n  private strings: LocalizedStringDictionary<K, T>;\n\n  constructor(locale: string, strings: LocalizedStringDictionary<K, T>) {\n    this.locale = locale;\n    this.strings = strings;\n  }\n\n  /** Formats a localized string for the given key with the provided variables. */\n  format(key: K, variables?: Variables): string {\n    let message = this.strings.getStringForLocale(key, this.locale);\n    return typeof message === 'function' ? message(variables, this) : message;\n  }\n\n  protected plural(count: number, options: Record<string, InternalString>, type: Intl.PluralRuleType = 'cardinal'): string {\n    let opt = options['=' + count];\n    if (opt) {\n      return typeof opt === 'function' ? opt() : opt;\n    }\n\n    let key = this.locale + ':' + type;\n    let pluralRules = pluralRulesCache.get(key);\n    if (!pluralRules) {\n      pluralRules = new Intl.PluralRules(this.locale, {type});\n      pluralRulesCache.set(key, pluralRules);\n    }\n\n    let selected = pluralRules.select(count);\n    opt = options[selected] || options.other;\n    return typeof opt === 'function' ? opt() : opt;\n  }\n\n  protected number(value: number): string {\n    let numberFormat = numberFormatCache.get(this.locale);\n    if (!numberFormat) {\n      numberFormat = new Intl.NumberFormat(this.locale);\n      numberFormatCache.set(this.locale, numberFormat);\n    }\n    return numberFormat.format(value);\n  }\n\n  protected select(options: Record<string, InternalString>, value: string): string {\n    let opt = options[value] || options.other;\n    return typeof opt === 'function' ? opt() : opt;\n  }\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedString, LocalizedStringDictionary, LocalizedStringFormatter, LocalizedStrings} from '@internationalized/string';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\nconst cache = new WeakMap();\nfunction getCachedDictionary<K extends string, T extends LocalizedString>(strings: LocalizedStrings<K, T>): LocalizedStringDictionary<K, T> {\n  let dictionary = cache.get(strings);\n  if (!dictionary) {\n    dictionary = new LocalizedStringDictionary(strings);\n    cache.set(strings, dictionary);\n  }\n\n  return dictionary;\n}\n\n/**\n * Returns a cached LocalizedStringDictionary for the given strings.\n */\nexport function useLocalizedStringDictionary<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringDictionary<K, T> {\n  return (packageName && LocalizedStringDictionary.getGlobalDictionaryForPackage(packageName)) || getCachedDictionary(strings);\n}\n\n/**\n * Provides localized string formatting for the current locale. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.\n * @param strings - A mapping of languages to localized strings by key.\n */\nexport function useLocalizedStringFormatter<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringFormatter<K, T> {\n  let {locale} = useLocale();\n  let dictionary = useLocalizedStringDictionary(strings, packageName);\n  return useMemo(() => new LocalizedStringFormatter(locale, dictionary), [locale, dictionary]);\n}\n","function _check_private_redeclaration(obj, privateCollection) {\n    if (privateCollection.has(obj)) {\n        throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n    }\n}\nexport { _check_private_redeclaration as _ };\n","import { _ as _check_private_redeclaration } from \"./_check_private_redeclaration.js\";\n\nfunction _class_private_field_init(obj, privateMap, value) {\n    _check_private_redeclaration(obj, privateMap);\n    privateMap.set(obj, value);\n}\nexport { _class_private_field_init as _ };\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof document !== 'undefined'\n  ? React.useLayoutEffect\n  : () => {};\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useRef} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport function useEffectEvent<T extends Function>(fn?: T): T {\n  const ref = useRef<T | null | undefined>(null);\n  useLayoutEffect(() => {\n    ref.current = fn;\n  }, [fn]);\n  // @ts-ignore\n  return useCallback<T>((...args) => {\n    const f = ref.current!;\n    return f?.(...args);\n  }, []);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n  return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n  el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n  if (el && 'window' in el && el.window === el) {\n    return el;\n  }\n\n  const doc = getOwnerDocument(el as Element | null | undefined);\n  return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n  return value !== null &&\n    typeof value === 'object' &&\n    'nodeType' in value &&\n    typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n  return isNode(node) &&\n    node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    'host' in node;\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nlet _tableNestedRows = false;\nlet _shadowDOM = false;\n\nexport function enableTableNestedRows(): void {\n  _tableNestedRows = true;\n}\n\nexport function tableNestedRows(): boolean {\n  return _tableNestedRows;\n}\n\nexport function enableShadowDOM(): void {\n  _shadowDOM = true;\n}\n\nexport function shadowDOM(): boolean {\n  return _shadowDOM;\n}\n","// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n  node: Node | null | undefined,\n  otherNode: Node | null | undefined\n): boolean {\n  if (!shadowDOM()) {\n    return otherNode && node ? node.contains(otherNode) : false;\n  }\n\n  if (!node || !otherNode) {\n    return false;\n  }\n\n  let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n  while (currentNode !== null) {\n    if (currentNode === node) {\n      return true;\n    }\n\n    if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n      (currentNode as HTMLSlotElement).assignedSlot) {\n      // Element is slotted\n      currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n    } else if (isShadowRoot(currentNode)) {\n      // Element is in shadow root\n      currentNode = currentNode.host;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n  if (!shadowDOM()) {\n    return doc.activeElement;\n  }\n  let activeElement: Element | null = doc.activeElement;\n\n  while (activeElement && 'shadowRoot' in activeElement &&\n  activeElement.shadowRoot?.activeElement) {\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n\n  return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n  if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n    if (event.composedPath) {\n      return event.composedPath()[0] as Element;\n    }\n  }\n  return event.target as Element;\n}\n","// https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/ShadowTreeWalker.ts\n\nimport {nodeContains} from './DOMFunctions';\nimport {shadowDOM} from '@react-stately/flags';\n\nexport class ShadowTreeWalker implements TreeWalker {\n  public readonly filter: NodeFilter | null;\n  public readonly root: Node;\n  public readonly whatToShow: number;\n\n  private _doc: Document;\n  private _walkerStack: Array<TreeWalker> = [];\n  private _currentNode: Node;\n  private _currentSetFor: Set<TreeWalker> = new Set();\n\n  constructor(\n      doc: Document,\n      root: Node,\n      whatToShow?: number,\n      filter?: NodeFilter | null\n    ) {\n    this._doc = doc;\n    this.root = root;\n    this.filter = filter ?? null;\n    this.whatToShow = whatToShow ?? NodeFilter.SHOW_ALL;\n    this._currentNode = root;\n\n    this._walkerStack.unshift(\n      doc.createTreeWalker(root, whatToShow, this._acceptNode)\n    );\n\n    const shadowRoot = (root as Element).shadowRoot;\n\n    if (shadowRoot) {\n      const walker = this._doc.createTreeWalker(\n        shadowRoot,\n        this.whatToShow,\n        {acceptNode: this._acceptNode}\n      );\n\n      this._walkerStack.unshift(walker);\n    }\n  }\n\n  private _acceptNode = (node: Node): number => {\n    if (node.nodeType === Node.ELEMENT_NODE) {\n      const shadowRoot = (node as Element).shadowRoot;\n\n      if (shadowRoot) {\n        const walker = this._doc.createTreeWalker(\n          shadowRoot,\n          this.whatToShow,\n          {acceptNode: this._acceptNode}\n        );\n\n        this._walkerStack.unshift(walker);\n\n        return NodeFilter.FILTER_ACCEPT;\n      } else {\n        if (typeof this.filter === 'function') {\n          return this.filter(node);\n        } else if (this.filter?.acceptNode) {\n          return this.filter.acceptNode(node);\n        } else if (this.filter === null) {\n          return NodeFilter.FILTER_ACCEPT;\n        }\n      }\n    }\n\n    return NodeFilter.FILTER_SKIP;\n  };\n\n  public get currentNode(): Node {\n    return this._currentNode;\n  }\n\n  public set currentNode(node: Node) {\n    if (!nodeContains(this.root, node)) {\n      throw new Error(\n        'Cannot set currentNode to a node that is not contained by the root node.'\n      );\n    }\n\n    const walkers: TreeWalker[] = [];\n    let curNode: Node | null | undefined = node;\n    let currentWalkerCurrentNode = node;\n\n    this._currentNode = node;\n\n    while (curNode && curNode !== this.root) {\n      if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n        const shadowRoot = curNode as ShadowRoot;\n\n        const walker = this._doc.createTreeWalker(\n          shadowRoot,\n          this.whatToShow,\n          {acceptNode: this._acceptNode}\n        );\n\n        walkers.push(walker);\n\n        walker.currentNode = currentWalkerCurrentNode;\n\n        this._currentSetFor.add(walker);\n\n        curNode = currentWalkerCurrentNode = shadowRoot.host;\n      } else {\n        curNode = curNode.parentNode;\n      }\n    }\n\n    const walker = this._doc.createTreeWalker(\n      this.root,\n      this.whatToShow,\n      {acceptNode: this._acceptNode}\n    );\n\n    walkers.push(walker);\n\n    walker.currentNode = currentWalkerCurrentNode;\n\n    this._currentSetFor.add(walker);\n\n    this._walkerStack = walkers;\n  }\n\n  public get doc(): Document {\n    return this._doc;\n  }\n\n  public firstChild(): Node | null {\n    let currentNode = this.currentNode;\n    let newNode = this.nextNode();\n    if (!nodeContains(currentNode, newNode)) {\n      this.currentNode = currentNode;\n      return null;\n    }\n    if (newNode) {\n      this.currentNode = newNode;\n    }\n    return newNode;\n  }\n\n  public lastChild(): Node | null {\n    let walker = this._walkerStack[0];\n    let newNode = walker.lastChild();\n    if (newNode) {\n      this.currentNode = newNode;\n    }\n    return newNode;\n  }\n\n  public nextNode(): Node | null {\n    const nextNode = this._walkerStack[0].nextNode();\n\n    if (nextNode) {\n      const shadowRoot = (nextNode as Element).shadowRoot;\n\n      if (shadowRoot) {\n        let nodeResult: number | undefined;\n\n        if (typeof this.filter === 'function') {\n          nodeResult = this.filter(nextNode);\n        } else if (this.filter?.acceptNode) {\n          nodeResult = this.filter.acceptNode(nextNode);\n        }\n\n        if (nodeResult === NodeFilter.FILTER_ACCEPT) {\n          this.currentNode = nextNode;\n          return nextNode;\n        }\n\n        // _acceptNode should have added new walker for this shadow,\n        // go in recursively.\n        let newNode = this.nextNode();\n        if (newNode) {\n          this.currentNode = newNode;\n        }\n        return newNode;\n      }\n\n      if (nextNode) {\n        this.currentNode = nextNode;\n      }\n      return nextNode;\n    } else {\n      if (this._walkerStack.length > 1) {\n        this._walkerStack.shift();\n\n        let newNode = this.nextNode();\n        if (newNode) {\n          this.currentNode = newNode;\n        }\n        return newNode;\n      } else {\n        return null;\n      }\n    }\n  }\n\n  public previousNode(): Node | null {\n    const currentWalker = this._walkerStack[0];\n\n    if (currentWalker.currentNode === currentWalker.root) {\n      if (this._currentSetFor.has(currentWalker)) {\n        this._currentSetFor.delete(currentWalker);\n\n        if (this._walkerStack.length > 1) {\n          this._walkerStack.shift();\n          let newNode = this.previousNode();\n          if (newNode) {\n            this.currentNode = newNode;\n          }\n          return newNode;\n        } else {\n          return null;\n        }\n      }\n\n      return null;\n    }\n\n    const previousNode = currentWalker.previousNode();\n\n    if (previousNode) {\n      const shadowRoot = (previousNode as Element).shadowRoot;\n\n      if (shadowRoot) {\n        let nodeResult: number | undefined;\n\n        if (typeof this.filter === 'function') {\n          nodeResult = this.filter(previousNode);\n        } else if (this.filter?.acceptNode) {\n          nodeResult = this.filter.acceptNode(previousNode);\n        }\n\n        if (nodeResult === NodeFilter.FILTER_ACCEPT) {\n          if (previousNode) {\n            this.currentNode = previousNode;\n          }\n          return previousNode;\n        }\n\n        // _acceptNode should have added new walker for this shadow,\n        // go in recursively.\n        let newNode = this.lastChild();\n        if (newNode) {\n          this.currentNode = newNode;\n        }\n        return newNode;\n      }\n\n      if (previousNode) {\n        this.currentNode = previousNode;\n      }\n      return previousNode;\n    } else {\n      if (this._walkerStack.length > 1) {\n        this._walkerStack.shift();\n\n        let newNode = this.previousNode();\n        if (newNode) {\n          this.currentNode = newNode;\n        }\n        return newNode;\n      } else {\n        return null;\n      }\n    }\n  }\n\n    /**\n     * @deprecated\n     */\n  public nextSibling(): Node | null {\n    // if (__DEV__) {\n    //     throw new Error(\"Method not implemented.\");\n    // }\n\n    return null;\n  }\n\n    /**\n     * @deprecated\n     */\n  public previousSibling(): Node | null {\n    // if (__DEV__) {\n    //     throw new Error(\"Method not implemented.\");\n    // }\n\n    return null;\n  }\n\n    /**\n     * @deprecated\n     */\n  public parentNode(): Node | null {\n    // if (__DEV__) {\n    //     throw new Error(\"Method not implemented.\");\n    // }\n\n    return null;\n  }\n}\n\n/**\n * ShadowDOM safe version of document.createTreeWalker.\n */\nexport function createShadowTreeWalker(\n    doc: Document,\n    root: Node,\n    whatToShow?: number,\n    filter?: NodeFilter | null\n): TreeWalker {\n  if (shadowDOM()) {\n    return new ShadowTreeWalker(doc, root, whatToShow, filter);\n  }\n  return doc.createTreeWalker(root, whatToShow, filter);\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LinkDOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n  'id'\n]);\n\nconst labelablePropNames = new Set([\n  'aria-label',\n  'aria-labelledby',\n  'aria-describedby',\n  'aria-details'\n]);\n\n// See LinkDOMProps in dom.d.ts.\nconst linkPropNames = new Set([\n  'href',\n  'hrefLang',\n  'target',\n  'rel',\n  'download',\n  'ping',\n  'referrerPolicy'\n]);\n\ninterface Options {\n  /**\n   * If labelling associated aria properties should be included in the filter.\n   */\n  labelable?: boolean,\n  /** Whether the element is a link and should include DOM props for <a> elements. */\n  isLink?: boolean,\n  /**\n   * A Set of other property names that should be included in the filter.\n   */\n  propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n  let {labelable, isLink, propNames} = opts;\n  let filteredProps = {};\n\n  for (const prop in props) {\n    if (\n      Object.prototype.hasOwnProperty.call(props, prop) && (\n        DOMPropNames.has(prop) ||\n        (labelable && labelablePropNames.has(prop)) ||\n        (isLink && linkPropNames.has(prop)) ||\n        propNames?.has(prop) ||\n        propRe.test(prop)\n      )\n    ) {\n      filteredProps[prop] = props[prop];\n    }\n  }\n\n  return filteredProps;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n  element: HTMLElement,\n  scrollTop: number,\n  scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement): void {\n  if (supportsPreventScroll()) {\n    element.focus({preventScroll: true});\n  } else {\n    let scrollableElements = getScrollableElements(element);\n    element.focus();\n    restoreScrollPosition(scrollableElements);\n  }\n}\n\nlet supportsPreventScrollCached: boolean | null = null;\nfunction supportsPreventScroll() {\n  if (supportsPreventScrollCached == null) {\n    supportsPreventScrollCached = false;\n    try {\n      let focusElem = document.createElement('div');\n      focusElem.focus({\n        get preventScroll() {\n          supportsPreventScrollCached = true;\n          return true;\n        }\n      });\n    } catch {\n      // Ignore\n    }\n  }\n\n  return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n  let parent = element.parentNode;\n  let scrollableElements: ScrollableElement[] = [];\n  let rootScrollingElement = document.scrollingElement || document.documentElement;\n\n  while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n    if (\n      parent.offsetHeight < parent.scrollHeight ||\n      parent.offsetWidth < parent.scrollWidth\n    ) {\n      scrollableElements.push({\n        element: parent,\n        scrollTop: parent.scrollTop,\n        scrollLeft: parent.scrollLeft\n      });\n    }\n    parent = parent.parentNode;\n  }\n\n  if (rootScrollingElement instanceof HTMLElement) {\n    scrollableElements.push({\n      element: rootScrollingElement,\n      scrollTop: rootScrollingElement.scrollTop,\n      scrollLeft: rootScrollingElement.scrollLeft\n    });\n  }\n\n  return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n  for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n    element.scrollTop = scrollTop;\n    element.scrollLeft = scrollLeft;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n  if (typeof window === 'undefined' || window.navigator == null) {\n    return false;\n  }\n  return (\n    window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n  ) ||\n  re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n  return typeof window !== 'undefined' && window.navigator != null\n    ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n    : false;\n}\n\nfunction cached(fn: () => boolean) {\n  if (process.env.NODE_ENV === 'test') {\n    return fn;\n  }\n  \n  let res: boolean | null = null;\n  return () => {\n    if (res == null) {\n      res = fn();\n    }\n    return res;\n  };\n}\n\nexport const isMac = cached(function () {\n  return testPlatform(/^Mac/i);\n});\n\nexport const isIPhone = cached(function () {\n  return testPlatform(/^iPhone/i);\n});\n\nexport const isIPad = cached(function () {\n  return testPlatform(/^iPad/i) ||\n    // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n    (isMac() && navigator.maxTouchPoints > 1);\n});\n\nexport const isIOS = cached(function () {\n  return isIPhone() || isIPad();\n});\n\nexport const isAppleDevice = cached(function () {\n  return isMac() || isIOS();\n});\n\nexport const isWebKit = cached(function () {\n  return testUserAgent(/AppleWebKit/i) && !isChrome();\n});\n\nexport const isChrome = cached(function () {\n  return testUserAgent(/Chrome/i);\n});\n\nexport const isAndroid = cached(function () {\n  return testUserAgent(/Android/i);\n});\n\nexport const isFirefox = cached(function () {\n  return testUserAgent(/Firefox/i);\n});\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {focusWithoutScrolling, isMac, isWebKit} from './index';\nimport {Href, LinkDOMProps, RouterOptions} from '@react-types/shared';\nimport {isFirefox, isIPad} from './platform';\nimport React, {createContext, DOMAttributes, JSX, ReactNode, useContext, useMemo} from 'react';\n\ninterface Router {\n  isNative: boolean,\n  open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => void,\n  useHref: (href: Href) => string\n}\n\nconst RouterContext = createContext<Router>({\n  isNative: true,\n  open: openSyntheticLink,\n  useHref: (href) => href\n});\n\ninterface RouterProviderProps {\n  navigate: (path: Href, routerOptions: RouterOptions | undefined) => void,\n  useHref?: (href: Href) => string,\n  children: ReactNode\n}\n\n/**\n * A RouterProvider accepts a `navigate` function from a framework or client side router,\n * and provides it to all nested React Aria links to enable client side navigation.\n */\nexport function RouterProvider(props: RouterProviderProps): JSX.Element {\n  let {children, navigate, useHref} = props;\n\n  let ctx = useMemo(() => ({\n    isNative: false,\n    open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => {\n      getSyntheticLink(target, link => {\n        if (shouldClientNavigate(link, modifiers)) {\n          navigate(href, routerOptions);\n        } else {\n          openLink(link, modifiers);\n        }\n      });\n    },\n    useHref: useHref || ((href) => href)\n  }), [navigate, useHref]);\n\n  return (\n    <RouterContext.Provider value={ctx}>\n      {children}\n    </RouterContext.Provider>\n  );\n}\n\nexport function useRouter(): Router {\n  return useContext(RouterContext);\n}\n\ninterface Modifiers {\n  metaKey?: boolean,\n  ctrlKey?: boolean,\n  altKey?: boolean,\n  shiftKey?: boolean\n}\n\nexport function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers): boolean {\n  // Use getAttribute here instead of link.target. Firefox will default link.target to \"_parent\" when inside an iframe.\n  let target = link.getAttribute('target');\n  return (\n    (!target || target === '_self') &&\n    link.origin === location.origin &&\n    !link.hasAttribute('download') &&\n    !modifiers.metaKey && // open in new tab (mac)\n    !modifiers.ctrlKey && // open in new tab (windows)\n    !modifiers.altKey && // download\n    !modifiers.shiftKey\n  );\n}\n\nexport function openLink(target: HTMLAnchorElement, modifiers: Modifiers, setOpening = true): void {\n  let {metaKey, ctrlKey, altKey, shiftKey} = modifiers;\n\n  // Firefox does not recognize keyboard events as a user action by default, and the popup blocker\n  // will prevent links with target=\"_blank\" from opening. However, it does allow the event if the\n  // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.\n  // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.\n  if (isFirefox() && window.event?.type?.startsWith('key') && target.target === '_blank') {\n    if (isMac()) {\n      metaKey = true;\n    } else {\n      ctrlKey = true;\n    }\n  }\n\n  // WebKit does not support firing click events with modifier keys, but does support keyboard events.\n  // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184\n  let event = isWebKit() && isMac() && !isIPad() && process.env.NODE_ENV !== 'test'\n    // @ts-ignore - keyIdentifier is a non-standard property, but it's what webkit expects\n    ? new KeyboardEvent('keydown', {keyIdentifier: 'Enter', metaKey, ctrlKey, altKey, shiftKey})\n    : new MouseEvent('click', {metaKey, ctrlKey, altKey, shiftKey, bubbles: true, cancelable: true});\n  (openLink as any).isOpening = setOpening;\n  focusWithoutScrolling(target);\n  target.dispatchEvent(event);\n  (openLink as any).isOpening = false;\n}\n// https://github.com/parcel-bundler/parcel/issues/8724\n(openLink as any).isOpening = false;\n\nfunction getSyntheticLink(target: Element, open: (link: HTMLAnchorElement) => void) {\n  if (target instanceof HTMLAnchorElement) {\n    open(target);\n  } else if (target.hasAttribute('data-href')) {\n    let link = document.createElement('a');\n    link.href = target.getAttribute('data-href')!;\n    if (target.hasAttribute('data-target')) {\n      link.target = target.getAttribute('data-target')!;\n    }\n    if (target.hasAttribute('data-rel')) {\n      link.rel = target.getAttribute('data-rel')!;\n    }\n    if (target.hasAttribute('data-download')) {\n      link.download = target.getAttribute('data-download')!;\n    }\n    if (target.hasAttribute('data-ping')) {\n      link.ping = target.getAttribute('data-ping')!;\n    }\n    if (target.hasAttribute('data-referrer-policy')) {\n      link.referrerPolicy = target.getAttribute('data-referrer-policy')!;\n    }\n    target.appendChild(link);\n    open(link);\n    target.removeChild(link);\n  }\n}\n\nfunction openSyntheticLink(target: Element, modifiers: Modifiers) {\n  getSyntheticLink(target, link => openLink(link, modifiers));\n}\n\nexport function useSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> {\n  let router = useRouter();\n  const href = router.useHref(props.href ?? '');\n  return {\n    'data-href': props.href ? href : undefined,\n    'data-target': props.target,\n    'data-rel': props.rel,\n    'data-download': props.download,\n    'data-ping': props.ping,\n    'data-referrer-policy': props.referrerPolicy\n  } as DOMAttributes<HTMLElement>;\n}\n\n/** @deprecated - For backward compatibility. */\nexport function getSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> {\n  return {\n    'data-href': props.href,\n    'data-target': props.target,\n    'data-rel': props.rel,\n    'data-download': props.download,\n    'data-ping': props.ping,\n    'data-referrer-policy': props.referrerPolicy\n  } as DOMAttributes<HTMLElement>;\n}\n\nexport function useLinkProps(props?: LinkDOMProps): LinkDOMProps {\n  let router = useRouter();\n  const href = router.useHref(props?.href ?? '');\n  return {\n    href: props?.href ? href : undefined,\n    target: props?.target,\n    rel: props?.rel,\n    download: props?.download,\n    ping: props?.ping,\n    referrerPolicy: props?.referrerPolicy\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n  if (typeof window === 'undefined') {\n    return;\n  }\n\n  function isTransitionEvent(event: Event): event is TransitionEvent {\n    return 'propertyName' in event;\n  }\n\n  let onTransitionStart = (e: Event) => {\n    if (!isTransitionEvent(e) || !e.target) {\n      return;\n    }\n    // Add the transitioning property to the list for this element.\n    let transitions = transitionsByElement.get(e.target);\n    if (!transitions) {\n      transitions = new Set();\n      transitionsByElement.set(e.target, transitions);\n\n      // The transitioncancel event must be registered on the element itself, rather than as a global\n      // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n      // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n      e.target.addEventListener('transitioncancel', onTransitionEnd, {\n        once: true\n      });\n    }\n\n    transitions.add(e.propertyName);\n  };\n\n  let onTransitionEnd = (e: Event) => {\n    if (!isTransitionEvent(e) || !e.target) {\n      return;\n    }\n    // Remove property from list of transitioning properties.\n    let properties = transitionsByElement.get(e.target);\n    if (!properties) {\n      return;\n    }\n\n    properties.delete(e.propertyName);\n\n    // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n    if (properties.size === 0) {\n      e.target.removeEventListener('transitioncancel', onTransitionEnd);\n      transitionsByElement.delete(e.target);\n    }\n\n    // If no transitioning elements, call all of the queued callbacks.\n    if (transitionsByElement.size === 0) {\n      for (let cb of transitionCallbacks) {\n        cb();\n      }\n\n      transitionCallbacks.clear();\n    }\n  };\n\n  document.body.addEventListener('transitionrun', onTransitionStart);\n  document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n  if (document.readyState !== 'loading') {\n    setupGlobalEvents();\n  } else {\n    document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n  }\n}\n\n/**\n * Cleans up any elements that are no longer in the document.\n * This is necessary because we can't rely on transitionend events to fire\n * for elements that are removed from the document while transitioning.\n */\nfunction cleanupDetachedElements() {\n  for (const [eventTarget] of transitionsByElement) {\n    // Similar to `eventTarget instanceof Element && !eventTarget.isConnected`, but avoids\n    // the explicit instanceof check, since it may be different in different contexts.\n    if ('isConnected' in eventTarget && !eventTarget.isConnected) {\n      transitionsByElement.delete(eventTarget);\n    }\n  }\n}\n\nexport function runAfterTransition(fn: () => void): void {\n  // Wait one frame to see if an animation starts, e.g. a transition on mount.\n  requestAnimationFrame(() => {\n    cleanupDetachedElements();\n    // If no transitions are running, call the function immediately.\n    // Otherwise, add it to a list of callbacks to run at the end of the animation.\n    if (transitionsByElement.size === 0) {\n      fn();\n    } else {\n      transitionCallbacks.add(fn);\n    }\n  });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof WindowEventMap>(el: Window, type: K, listener: (this: Document, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, fn, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n   \n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {EffectCallback, useEffect, useRef} from 'react';\n\n// Like useEffect, but only called for updates after the initial render.\nexport function useUpdateEffect(effect: EffectCallback, dependencies: any[]): void {\n  const isInitialMount = useRef(true);\n  const lastDeps = useRef<any[] | null>(null);\n\n  useEffect(() => {\n    isInitialMount.current = true;\n    return () => {\n      isInitialMount.current = false;\n    };\n  }, []);\n\n  useEffect(() => {\n    let prevDeps = lastDeps.current;\n    if (isInitialMount.current) {\n      isInitialMount.current = false;\n    } else if (!prevDeps || dependencies.some((dep, i) => !Object.is(dep, prevDeps[i]))) {\n      effect();\n    }\n    lastDeps.current = dependencies;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencies);\n}\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {EffectCallback, useRef} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\n\n// Like useLayoutEffect, but only called for updates after the initial render.\nexport function useUpdateLayoutEffect(effect: EffectCallback, dependencies: any[]): void {\n  const isInitialMount = useRef(true);\n  const lastDeps = useRef<any[] | null>(null);\n\n  useLayoutEffect(() => {\n    isInitialMount.current = true;\n    return () => {\n      isInitialMount.current = false;\n    };\n  }, []);\n\n  useLayoutEffect(() => {\n    if (isInitialMount.current) {\n      isInitialMount.current = false;\n    } else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) {\n      effect();\n    }\n    lastDeps.current = dependencies;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencies);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n  ref?: MutableRefObject<T | null>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>): void {\n  useLayoutEffect(() => {\n    if (context && context.ref && ref) {\n      context.ref.current = ref.current;\n      return () => {\n        if (context.ref) {\n          context.ref.current = null;\n        }\n      };\n    }\n  });\n}\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n  if (!node) {\n    return false;\n  }\n  let style = window.getComputedStyle(node);\n  let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n  if (isScrollable && checkForOverflow) {\n    isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n  }\n\n  return isScrollable;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isScrollable} from './isScrollable';\n\nexport function getScrollParent(node: Element, checkForOverflow?: boolean): Element {\n  let scrollableNode: Element | null = node;\n  if (isScrollable(scrollableNode, checkForOverflow)) {\n    scrollableNode = scrollableNode.parentElement;\n  }\n\n  while (scrollableNode && !isScrollable(scrollableNode, checkForOverflow)) {\n    scrollableNode = scrollableNode.parentElement;\n  }\n\n  return scrollableNode || document.scrollingElement || document.documentElement;\n}\n\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isScrollable} from './isScrollable';\n\nexport function getScrollParents(node: Element, checkForOverflow?: boolean): Element[] {\n  const scrollParents: Element[] = [];\n\n  while (node && node !== document.documentElement) {\n    if (isScrollable(node, checkForOverflow)) {\n      scrollParents.push(node);\n    }\n    node = node.parentElement as Element;\n  }\n\n  return scrollParents;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useState} from 'react';\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map<string, {refCount: number, element: Element}>();\n\nexport function useDescription(description?: string): AriaLabelingProps {\n  let [id, setId] = useState<string | undefined>();\n\n  useLayoutEffect(() => {\n    if (!description) {\n      return;\n    }\n\n    let desc = descriptionNodes.get(description);\n    if (!desc) {\n      let id = `react-aria-description-${descriptionId++}`;\n      setId(id);\n\n      let node = document.createElement('div');\n      node.id = id;\n      node.style.display = 'none';\n      node.textContent = description;\n      document.body.appendChild(node);\n      desc = {refCount: 0, element: node};\n      descriptionNodes.set(description, desc);\n    } else {\n      setId(desc.element.id);\n    }\n\n    desc.refCount++;\n    return () => {\n      if (desc && --desc.refCount === 0) {\n        desc.element.remove();\n        descriptionNodes.delete(description);\n      }\n    };\n  }, [description]);\n\n  return {\n    'aria-describedby': description ? id : undefined\n  };\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n  ref: RefObject<EventTarget | null>,\n  event: K | (string & {}),\n  handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n  options?: boolean | AddEventListenerOptions\n): void {\n  let handleEvent = useEffectEvent(handler);\n  let isDisabled = handler == null;\n\n  useEffect(() => {\n    if (isDisabled || !ref.current) {\n      return;\n    }\n\n    let element = ref.current;\n    element.addEventListener(event, handleEvent as EventListener, options);\n    return () => {\n      element.removeEventListener(event, handleEvent as EventListener, options);\n    };\n  }, [ref, event, options, isDisabled, handleEvent]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParents} from './getScrollParents';\n\ninterface ScrollIntoViewportOpts {\n  /** The optional containing element of the target to be centered in the viewport. */\n  containingElement?: Element | null\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement): void {\n  let offsetX = relativeOffset(scrollView, element, 'left');\n  let offsetY = relativeOffset(scrollView, element, 'top');\n  let width = element.offsetWidth;\n  let height = element.offsetHeight;\n  let x = scrollView.scrollLeft;\n  let y = scrollView.scrollTop;\n\n  // Account for top/left border offsetting the scroll top/Left + scroll padding\n  let {\n    borderTopWidth,\n    borderLeftWidth,\n    scrollPaddingTop,\n    scrollPaddingRight,\n    scrollPaddingBottom,\n    scrollPaddingLeft\n  } = getComputedStyle(scrollView);\n\n  let borderAdjustedX = x + parseInt(borderLeftWidth, 10);\n  let borderAdjustedY = y + parseInt(borderTopWidth, 10);\n  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n  let maxX = borderAdjustedX + scrollView.clientWidth;\n  let maxY = borderAdjustedY + scrollView.clientHeight;\n\n  // Get scroll padding values as pixels - defaults to 0 if no scroll padding\n  // is used.\n  let scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0;\n  let scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0;\n  let scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0;\n  let scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;\n\n  if (offsetX <= x + scrollPaddingLeftNumber) {\n    x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;\n  } else if (offsetX + width > maxX - scrollPaddingRightNumber) {\n    x += offsetX + width - maxX + scrollPaddingRightNumber;\n  }\n  if (offsetY <= borderAdjustedY + scrollPaddingTopNumber) {\n    y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;\n  } else if (offsetY + height > maxY - scrollPaddingBottomNumber) {\n    y += offsetY + height - maxY + scrollPaddingBottomNumber;\n  }\n\n  scrollView.scrollLeft = x;\n  scrollView.scrollTop = y;\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n  const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n  let sum = 0;\n  while (child.offsetParent) {\n    sum += child[prop];\n    if (child.offsetParent === ancestor) {\n      // Stop once we have found the ancestor we are interested in.\n      break;\n    } else if (child.offsetParent.contains(ancestor)) {\n      // If the ancestor is not `position:relative`, then we stop at\n      // _its_ offset parent, and we subtract off _its_ offset, so that\n      // we end up with the proper offset from child to ancestor.\n      sum -= ancestor[prop];\n      break;\n    }\n    child = child.offsetParent as HTMLElement;\n  }\n  return sum;\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional `opts.containingElement`\n * that will be centered in the viewport prior to scrolling the targetElement into view. If scrolling is prevented on\n * the body (e.g. targetElement is in a popover), this will only scroll the scroll parents of the targetElement up to but not including the body itself.\n */\nexport function scrollIntoViewport(targetElement: Element | null, opts?: ScrollIntoViewportOpts): void {\n  if (targetElement && document.contains(targetElement)) {\n    let root = document.scrollingElement || document.documentElement;\n    let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';\n    // If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view\n    if (!isScrollPrevented) {\n      let {left: originalLeft, top: originalTop} = targetElement.getBoundingClientRect();\n\n      // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n      // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n      targetElement?.scrollIntoView?.({block: 'nearest'});\n      let {left: newLeft, top: newTop} = targetElement.getBoundingClientRect();\n      // Account for sub pixel differences from rounding\n      if ((Math.abs(originalLeft - newLeft) > 1) || (Math.abs(originalTop - newTop) > 1)) {\n        opts?.containingElement?.scrollIntoView?.({block: 'center', inline: 'center'});\n        targetElement.scrollIntoView?.({block: 'nearest'});\n      }\n    } else {\n      let scrollParents = getScrollParents(targetElement);\n      // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n      for (let scrollParent of scrollParents) {\n        scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n      }\n    }\n  }\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n  // JAWS/NVDA with Firefox.\n  if ((event as any).mozInputSource === 0 && event.isTrusted) {\n    return true;\n  }\n\n  // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n  // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n  // to detect TalkBack virtual clicks.\n  if (isAndroid() && (event as PointerEvent).pointerType) {\n    return event.type === 'click' && event.buttons === 1;\n  }\n\n  return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent): boolean {\n  // If the pointer size is zero, then we assume it's from a screen reader.\n  // Android TalkBack double tap will sometimes return a event with width and height of 1\n  // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n  // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n  // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n  // Talkback double tap from Windows Firefox touch screen press\n  return (\n    (!isAndroid() && event.width === 0 && event.height === 0) ||\n    (event.width === 1 &&\n      event.height === 1 &&\n      event.pressure === 0 &&\n      event.detail === 0 &&\n      event.pointerType === 'mouse'\n    )\n  );\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n  ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n  initialValue: T,\n  onReset: (value: T) => void\n): void {\n  let resetValue = useRef(initialValue);\n  let handleReset = useEffectEvent(() => {\n    if (onReset) {\n      onReset(resetValue.current);\n    }\n  });\n\n  useEffect(() => {\n    let form = ref?.current?.form;\n    form?.addEventListener('reset', handleReset);\n    return () => {\n      form?.removeEventListener('reset', handleReset);\n    };\n  }, [ref, handleReset]);\n}\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Custom event names for updating the autocomplete's aria-activedecendant.\nexport const CLEAR_FOCUS_EVENT = 'react-aria-clear-focus';\nexport const FOCUS_EVENT = 'react-aria-focus';\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isMac} from './platform';\n\ninterface Event {\n  altKey: boolean,\n  ctrlKey: boolean,\n  metaKey: boolean\n}\n\nexport function isCtrlKeyPressed(e: Event): boolean {\n  if (isMac()) {\n    return e.metaKey;\n  }\n\n  return e.ctrlKey;\n}\n","const focusableElements = [\n  'input:not([disabled]):not([type=hidden])',\n  'select:not([disabled])',\n  'textarea:not([disabled])',\n  'button:not([disabled])',\n  'a[href]',\n  'area[href]',\n  'summary',\n  'iframe',\n  'object',\n  'embed',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable^=\"false\"])'\n];\n\nconst FOCUSABLE_ELEMENT_SELECTOR = focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';\n\nfocusableElements.push('[tabindex]:not([tabindex=\"-1\"]):not([disabled])');\nconst TABBABLE_ELEMENT_SELECTOR = focusableElements.join(':not([hidden]):not([tabindex=\"-1\"]),');\n\nexport function isFocusable(element: Element): boolean {\n  return element.matches(FOCUSABLE_ELEMENT_SELECTOR);\n}\n\nexport function isTabbable(element: Element): boolean {\n  return element.matches(TABBABLE_ELEMENT_SELECTOR);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\n\nexport function useControlledState<T, C = T>(value: Exclude<T, undefined>, defaultValue: Exclude<T, undefined> | undefined, onChange?: (v: C, ...args: any[]) => void): [T, (value: T, ...args: any[]) => void];\nexport function useControlledState<T, C = T>(value: Exclude<T, undefined> | undefined, defaultValue: Exclude<T, undefined>, onChange?: (v: C, ...args: any[]) => void): [T, (value: T, ...args: any[]) => void];\nexport function useControlledState<T, C = T>(value: T, defaultValue: T, onChange?: (v: C, ...args: any[]) => void): [T, (value: T, ...args: any[]) => void] {\n  let [stateValue, setStateValue] = useState(value || defaultValue);\n\n  let isControlledRef = useRef(value !== undefined);\n  let isControlled = value !== undefined;\n  useEffect(() => {\n    let wasControlled = isControlledRef.current;\n    if (wasControlled !== isControlled && process.env.NODE_ENV !== 'production') {\n      console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);\n    }\n    isControlledRef.current = isControlled;\n  }, [isControlled]);\n\n  let currentValue = isControlled ? value : stateValue;\n  let setValue = useCallback((value, ...args) => {\n    let onChangeCaller = (value, ...onChangeArgs) => {\n      if (onChange) {\n        if (!Object.is(currentValue, value)) {\n          onChange(value, ...onChangeArgs);\n        }\n      }\n      if (!isControlled) {\n        // If uncontrolled, mutate the currentValue local variable so that\n        // calling setState multiple times with the same value only emits onChange once.\n        // We do not use a ref for this because we specifically _do_ want the value to\n        // reset every render, and assigning to a ref in render breaks aborted suspended renders.\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n        currentValue = value;\n      }\n    };\n\n    if (typeof value === 'function') {\n      if (process.env.NODE_ENV !== 'production') {\n        console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');\n      }\n      // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates\n      // when someone using useControlledState calls setControlledState(myFunc)\n      // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc\n      // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning\n      // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same\n      let updateFunction = (oldValue, ...functionArgs) => {\n        let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);\n        onChangeCaller(interceptedValue, ...args);\n        if (!isControlled) {\n          return interceptedValue;\n        }\n        return oldValue;\n      };\n      setStateValue(updateFunction);\n    } else {\n      if (!isControlled) {\n        setStateValue(value);\n      }\n      onChangeCaller(value, ...args);\n    }\n  }, [isControlled, currentValue, onChange]);\n\n  return [currentValue, setValue];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\n\nlet cache = new Map<string, Intl.Collator>();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n * @param options - Collator options.\n */\nexport function useCollator(options?: Intl.CollatorOptions): Intl.Collator {\n  let {locale} = useLocale();\n\n  let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : '');\n  if (cache.has(cacheKey)) {\n    return cache.get(cacheKey)!;\n  }\n\n  let formatter = new Intl.Collator(locale, options);\n  cache.set(cacheKey, formatter);\n  return formatter;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {focusWithoutScrolling, getOwnerWindow, isFocusable, useEffectEvent, useLayoutEffect} from '@react-aria/utils';\nimport {FocusEvent as ReactFocusEvent, SyntheticEvent, useCallback, useRef} from 'react';\n\n// Turn a native event into a React synthetic event.\nexport function createSyntheticEvent<E extends SyntheticEvent>(nativeEvent: Event): E {\n  let event = nativeEvent as any as E;\n  event.nativeEvent = nativeEvent;\n  event.isDefaultPrevented = () => event.defaultPrevented;\n  // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n  event.isPropagationStopped = () => (event as any).cancelBubble;\n  event.persist = () => {};\n  return event;\n}\n\nexport function setEventTarget(event: Event, target: Element): void {\n  Object.defineProperty(event, 'target', {value: target});\n  Object.defineProperty(event, 'currentTarget', {value: target});\n}\n\nexport function useSyntheticBlurEvent<Target extends Element = Element>(onBlur: (e: ReactFocusEvent<Target>) => void): (e: ReactFocusEvent<Target>) => void {\n  let stateRef = useRef({\n    isFocused: false,\n    observer: null as MutationObserver | null\n  });\n\n  // Clean up MutationObserver on unmount. See below.\n\n  useLayoutEffect(() => {\n    const state = stateRef.current;\n    return () => {\n      if (state.observer) {\n        state.observer.disconnect();\n        state.observer = null;\n      }\n    };\n  }, []);\n\n  let dispatchBlur = useEffectEvent((e: ReactFocusEvent<Target>) => {\n    onBlur?.(e);\n  });\n\n  // This function is called during a React onFocus event.\n  return useCallback((e: ReactFocusEvent<Target>) => {\n    // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n    // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n    // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n    // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n    if (\n      e.target instanceof HTMLButtonElement ||\n      e.target instanceof HTMLInputElement ||\n      e.target instanceof HTMLTextAreaElement ||\n      e.target instanceof HTMLSelectElement\n    ) {\n      stateRef.current.isFocused = true;\n\n      let target = e.target;\n      let onBlurHandler: EventListenerOrEventListenerObject | null = (e) => {\n        stateRef.current.isFocused = false;\n\n        if (target.disabled) {\n          // For backward compatibility, dispatch a (fake) React synthetic event.\n          let event = createSyntheticEvent<ReactFocusEvent<Target>>(e);\n          dispatchBlur(event);\n        }\n\n        // We no longer need the MutationObserver once the target is blurred.\n        if (stateRef.current.observer) {\n          stateRef.current.observer.disconnect();\n          stateRef.current.observer = null;\n        }\n      };\n\n      target.addEventListener('focusout', onBlurHandler, {once: true});\n\n      stateRef.current.observer = new MutationObserver(() => {\n        if (stateRef.current.isFocused && target.disabled) {\n          stateRef.current.observer?.disconnect();\n          let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n          target.dispatchEvent(new FocusEvent('blur', {relatedTarget: relatedTargetEl}));\n          target.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: relatedTargetEl}));\n        }\n      });\n\n      stateRef.current.observer.observe(target, {attributes: true, attributeFilter: ['disabled']});\n    }\n  }, [dispatchBlur]);\n}\n\nexport let ignoreFocusEvent = false;\n\n/**\n * This function prevents the next focus event fired on `target`, without using `event.preventDefault()`.\n * It works by waiting for the series of focus events to occur, and reverts focus back to where it was before.\n * It also makes these events mostly non-observable by using a capturing listener on the window and stopping propagation.\n */\nexport function preventFocus(target: FocusableElement | null): (() => void) | undefined {\n  // The browser will focus the nearest focusable ancestor of our target.\n  while (target && !isFocusable(target)) {\n    target = target.parentElement;\n  }\n\n  let window = getOwnerWindow(target);\n  let activeElement = window.document.activeElement as FocusableElement | null;\n  if (!activeElement || activeElement === target) {\n    return;\n  }\n\n  ignoreFocusEvent = true;\n  let isRefocusing = false;\n  let onBlur = (e: FocusEvent) => {\n    if (e.target === activeElement || isRefocusing) {\n      e.stopImmediatePropagation();\n    }\n  };\n\n  let onFocusOut = (e: FocusEvent) => {\n    if (e.target === activeElement || isRefocusing) {\n      e.stopImmediatePropagation();\n\n      // If there was no focusable ancestor, we don't expect a focus event.\n      // Re-focus the original active element here.\n      if (!target && !isRefocusing) {\n        isRefocusing = true;\n        focusWithoutScrolling(activeElement);\n        cleanup();\n      }\n    }\n  };\n\n  let onFocus = (e: FocusEvent) => {\n    if (e.target === target || isRefocusing) {\n      e.stopImmediatePropagation();\n    }\n  };\n\n  let onFocusIn = (e: FocusEvent) => {\n    if (e.target === target || isRefocusing) {\n      e.stopImmediatePropagation();\n\n      if (!isRefocusing) {\n        isRefocusing = true;\n        focusWithoutScrolling(activeElement);\n        cleanup();\n      }\n    }\n  };\n\n  window.addEventListener('blur', onBlur, true);\n  window.addEventListener('focusout', onFocusOut, true);\n  window.addEventListener('focusin', onFocusIn, true);\n  window.addEventListener('focus', onFocus, true);\n\n  let cleanup = () => {\n    cancelAnimationFrame(raf);\n    window.removeEventListener('blur', onBlur, true);\n    window.removeEventListener('focusout', onFocusOut, true);\n    window.removeEventListener('focusin', onFocusIn, true);\n    window.removeEventListener('focus', onFocus, true);\n    ignoreFocusEvent = false;\n    isRefocusing = false;\n  };\n\n  let raf = requestAnimationFrame(cleanup);\n  return cleanup;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOwnerDocument, isIOS, runAfterTransition} from '@react-aria/utils';\n\n// Safari on iOS starts selecting text on long press. The only way to avoid this, it seems,\n// is to add user-select: none to the entire page. Adding it to the pressable element prevents\n// that element from being selected, but nearby elements may still receive selection. We add\n// user-select: none on touch start, and remove it again on touch end to prevent this.\n// This must be implemented using global state to avoid race conditions between multiple elements.\n\n// There are three possible states due to the delay before removing user-select: none after\n// pointer up. The 'default' state always transitions to the 'disabled' state, which transitions\n// to 'restoring'. The 'restoring' state can either transition back to 'disabled' or 'default'.\n\n// For non-iOS devices, we apply user-select: none to the pressed element instead to avoid possible\n// performance issues that arise from applying and removing user-select: none to the entire page\n// (see https://github.com/adobe/react-spectrum/issues/1609).\ntype State = 'default' | 'disabled' | 'restoring';\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet state: State = 'default';\nlet savedUserSelect = '';\nlet modifiedElementMap = new WeakMap<Element, string>();\n\nexport function disableTextSelection(target?: Element): void {\n  if (isIOS()) {\n    if (state === 'default') {\n\n      const documentObject = getOwnerDocument(target);\n      savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n      documentObject.documentElement.style.webkitUserSelect = 'none';\n    }\n\n    state = 'disabled';\n  } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n    // If not iOS, store the target's original user-select and change to user-select: none\n    // Ignore state since it doesn't apply for non iOS\n    let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n    modifiedElementMap.set(target, target.style[property]);\n    target.style[property] = 'none';\n  }\n}\n\nexport function restoreTextSelection(target?: Element): void {\n  if (isIOS()) {\n    // If the state is already default, there's nothing to do.\n    // If it is restoring, then there's no need to queue a second restore.\n    if (state !== 'disabled') {\n      return;\n    }\n\n    state = 'restoring';\n\n    // There appears to be a delay on iOS where selection still might occur\n    // after pointer up, so wait a bit before removing user-select.\n    setTimeout(() => {\n      // Wait for any CSS transitions to complete so we don't recompute style\n      // for the whole page in the middle of the animation and cause jank.\n      runAfterTransition(() => {\n        // Avoid race conditions\n        if (state === 'restoring') {\n\n          const documentObject = getOwnerDocument(target);\n          if (documentObject.documentElement.style.webkitUserSelect === 'none') {\n            documentObject.documentElement.style.webkitUserSelect = savedUserSelect || '';\n          }\n\n          savedUserSelect = '';\n          state = 'default';\n        }\n      });\n    }, 300);\n  } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n    // If not iOS, restore the target's original user-select if any\n    // Ignore state since it doesn't apply for non iOS\n    if (target && modifiedElementMap.has(target)) {\n      let targetOldUserSelect = modifiedElementMap.get(target) as string;\n      let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n\n      if (target.style[property] === 'none') {\n        target.style[property] = targetOldUserSelect;\n      }\n\n      if (target.getAttribute('style') === '') {\n        target.removeAttribute('style');\n      }\n      modifiedElementMap.delete(target);\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n  register(): void,\n  ref?: MutableRefObject<FocusableElement>\n}\n\nexport const PressResponderContext = React.createContext<IPressResponderContext>({register: () => {}});\nPressResponderContext.displayName = 'PressResponderContext';\n","function _class_apply_descriptor_get(receiver, descriptor) {\n    if (descriptor.get) return descriptor.get.call(receiver);\n\n    return descriptor.value;\n}\nexport { _class_apply_descriptor_get as _ };\n","function _class_extract_field_descriptor(receiver, privateMap, action) {\n    if (!privateMap.has(receiver)) throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n\n    return privateMap.get(receiver);\n}\nexport { _class_extract_field_descriptor as _ };\n","import { _ as _class_apply_descriptor_get } from \"./_class_apply_descriptor_get.js\";\nimport { _ as _class_extract_field_descriptor } from \"./_class_extract_field_descriptor.js\";\n\nfunction _class_private_field_get(receiver, privateMap) {\n    var descriptor = _class_extract_field_descriptor(receiver, privateMap, \"get\");\n    return _class_apply_descriptor_get(receiver, descriptor);\n}\nexport { _class_private_field_get as _ };\n","function _class_apply_descriptor_set(receiver, descriptor, value) {\n    if (descriptor.set) descriptor.set.call(receiver, value);\n    else {\n        if (!descriptor.writable) {\n            // This should only throw in strict mode, but class bodies are\n            // always strict and private fields can only be used inside\n            // class bodies.\n            throw new TypeError(\"attempted to set read only private field\");\n        }\n        descriptor.value = value;\n    }\n}\nexport { _class_apply_descriptor_set as _ };\n","import { _ as _class_apply_descriptor_set } from \"./_class_apply_descriptor_set.js\";\nimport { _ as _class_extract_field_descriptor } from \"./_class_extract_field_descriptor.js\";\n\nfunction _class_private_field_set(receiver, privateMap, value) {\n    var descriptor = _class_extract_field_descriptor(receiver, privateMap, \"set\");\n    _class_apply_descriptor_set(receiver, descriptor, value);\n    return value;\n}\nexport { _class_private_field_set as _ };\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {\n  chain,\n  focusWithoutScrolling,\n  getEventTarget,\n  getOwnerDocument,\n  getOwnerWindow,\n  isMac,\n  isVirtualClick,\n  isVirtualPointerEvent,\n  mergeProps,\n  nodeContains,\n  openLink,\n  useEffectEvent,\n  useGlobalListeners,\n  useSyncRef\n} from '@react-aria/utils';\nimport {createSyntheticEvent, preventFocus, setEventTarget} from './utils';\nimport {disableTextSelection, restoreTextSelection} from './textSelection';\nimport {DOMAttributes, FocusableElement, PressEvent as IPressEvent, PointerType, PressEvents, RefObject} from '@react-types/shared';\nimport {flushSync} from 'react-dom';\nimport {PressResponderContext} from './context';\nimport {MouseEvent as RMouseEvent, TouchEvent as RTouchEvent, useContext, useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface PressProps extends PressEvents {\n  /** Whether the target is in a controlled press state (e.g. an overlay it triggers is open). */\n  isPressed?: boolean,\n  /** Whether the press events should be disabled. */\n  isDisabled?: boolean,\n  /** Whether the target should not receive focus on press. */\n  preventFocusOnPress?: boolean,\n  /**\n   * Whether press events should be canceled when the pointer leaves the target while pressed.\n   * By default, this is `false`, which means if the pointer returns back over the target while\n   * still pressed, onPressStart will be fired again. If set to `true`, the press is canceled\n   * when the pointer leaves the target and onPressStart will not be fired if the pointer returns.\n   */\n  shouldCancelOnPointerExit?: boolean,\n  /** Whether text selection should be enabled on the pressable element. */\n  allowTextSelectionOnPress?: boolean\n}\n\nexport interface PressHookProps extends PressProps {\n  /** A ref to the target element. */\n  ref?: RefObject<Element | null>\n}\n\ninterface PressState {\n  isPressed: boolean,\n  ignoreEmulatedMouseEvents: boolean,\n  didFirePressStart: boolean,\n  isTriggeringEvent: boolean,\n  activePointerId: any,\n  target: FocusableElement | null,\n  isOverTarget: boolean,\n  pointerType: PointerType | null,\n  userSelect?: string,\n  metaKeyEvents?: Map<string, KeyboardEvent>,\n  disposables: Array<() => void>\n}\n\ninterface EventBase {\n  currentTarget: EventTarget | null,\n  shiftKey: boolean,\n  ctrlKey: boolean,\n  metaKey: boolean,\n  altKey: boolean,\n  clientX?: number,\n  clientY?: number,\n  targetTouches?: Array<{clientX?: number, clientY?: number}>\n}\n\nexport interface PressResult {\n  /** Whether the target is currently pressed. */\n  isPressed: boolean,\n  /** Props to spread on the target element. */\n  pressProps: DOMAttributes\n}\n\nfunction usePressResponderContext(props: PressHookProps): PressHookProps {\n  // Consume context from <PressResponder> and merge with props.\n  let context = useContext(PressResponderContext);\n  if (context) {\n    let {register, ...contextProps} = context;\n    props = mergeProps(contextProps, props) as PressHookProps;\n    register();\n  }\n  useSyncRef(context, props.ref);\n\n  return props;\n}\n\nclass PressEvent implements IPressEvent {\n  type: IPressEvent['type'];\n  pointerType: PointerType;\n  target: Element;\n  shiftKey: boolean;\n  ctrlKey: boolean;\n  metaKey: boolean;\n  altKey: boolean;\n  x: number;\n  y: number;\n  #shouldStopPropagation = true;\n\n  constructor(type: IPressEvent['type'], pointerType: PointerType, originalEvent: EventBase, state?: PressState) {\n    let currentTarget = state?.target ?? originalEvent.currentTarget;\n    const rect: DOMRect | undefined = (currentTarget as Element)?.getBoundingClientRect();\n    let x, y = 0;\n    let clientX, clientY: number | null = null;\n    if (originalEvent.clientX != null && originalEvent.clientY != null) {\n      clientX = originalEvent.clientX;\n      clientY = originalEvent.clientY;\n    }\n    if (rect) {\n      if (clientX != null && clientY != null) {\n        x = clientX - rect.left;\n        y = clientY - rect.top;\n      } else {\n        x = rect.width / 2;\n        y = rect.height / 2;\n      }\n    }\n    this.type = type;\n    this.pointerType = pointerType;\n    this.target = originalEvent.currentTarget as Element;\n    this.shiftKey = originalEvent.shiftKey;\n    this.metaKey = originalEvent.metaKey;\n    this.ctrlKey = originalEvent.ctrlKey;\n    this.altKey = originalEvent.altKey;\n    this.x = x;\n    this.y = y;\n  }\n\n  continuePropagation() {\n    this.#shouldStopPropagation = false;\n  }\n\n  get shouldStopPropagation() {\n    return this.#shouldStopPropagation;\n  }\n}\n\nconst LINK_CLICKED = Symbol('linkClicked');\nconst STYLE_ID = 'react-aria-pressable-style';\nconst PRESSABLE_ATTRIBUTE = 'data-react-aria-pressable';\n\n/**\n * Handles press interactions across mouse, touch, keyboard, and screen readers.\n * It normalizes behavior across browsers and platforms, and handles many nuances\n * of dealing with pointer and keyboard events.\n */\nexport function usePress(props: PressHookProps): PressResult {\n  let {\n    onPress,\n    onPressChange,\n    onPressStart,\n    onPressEnd,\n    onPressUp,\n    onClick,\n    isDisabled,\n    isPressed: isPressedProp,\n    preventFocusOnPress,\n    shouldCancelOnPointerExit,\n    allowTextSelectionOnPress,\n    ref: domRef,\n    ...domProps\n  } = usePressResponderContext(props);\n\n  let [isPressed, setPressed] = useState(false);\n  let ref = useRef<PressState>({\n    isPressed: false,\n    ignoreEmulatedMouseEvents: false,\n    didFirePressStart: false,\n    isTriggeringEvent: false,\n    activePointerId: null,\n    target: null,\n    isOverTarget: false,\n    pointerType: null,\n    disposables: []\n  });\n\n  let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n  let triggerPressStart = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n    let state = ref.current;\n    if (isDisabled || state.didFirePressStart) {\n      return false;\n    }\n\n    let shouldStopPropagation = true;\n    state.isTriggeringEvent = true;\n    if (onPressStart) {\n      let event = new PressEvent('pressstart', pointerType, originalEvent);\n      onPressStart(event);\n      shouldStopPropagation = event.shouldStopPropagation;\n    }\n\n    if (onPressChange) {\n      onPressChange(true);\n    }\n\n    state.isTriggeringEvent = false;\n    state.didFirePressStart = true;\n    setPressed(true);\n    return shouldStopPropagation;\n  });\n\n  let triggerPressEnd = useEffectEvent((originalEvent: EventBase, pointerType: PointerType, wasPressed = true) => {\n    let state = ref.current;\n    if (!state.didFirePressStart) {\n      return false;\n    }\n\n    state.didFirePressStart = false;\n    state.isTriggeringEvent = true;\n\n    let shouldStopPropagation = true;\n    if (onPressEnd) {\n      let event = new PressEvent('pressend', pointerType, originalEvent);\n      onPressEnd(event);\n      shouldStopPropagation = event.shouldStopPropagation;\n    }\n\n    if (onPressChange) {\n      onPressChange(false);\n    }\n\n    setPressed(false);\n\n    if (onPress && wasPressed && !isDisabled) {\n      let event = new PressEvent('press', pointerType, originalEvent);\n      onPress(event);\n      shouldStopPropagation &&= event.shouldStopPropagation;\n    }\n\n    state.isTriggeringEvent = false;\n    return shouldStopPropagation;\n  });\n\n  let triggerPressUp = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n    let state = ref.current;\n    if (isDisabled) {\n      return false;\n    }\n\n    if (onPressUp) {\n      state.isTriggeringEvent = true;\n      let event = new PressEvent('pressup', pointerType, originalEvent);\n      onPressUp(event);\n      state.isTriggeringEvent = false;\n      return event.shouldStopPropagation;\n    }\n\n    return true;\n  });\n\n  let cancel = useEffectEvent((e: EventBase) => {\n    let state = ref.current;\n    if (state.isPressed && state.target) {\n      if (state.didFirePressStart && state.pointerType != null) {\n        triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n      }\n      state.isPressed = false;\n      state.isOverTarget = false;\n      state.activePointerId = null;\n      state.pointerType = null;\n      removeAllGlobalListeners();\n      if (!allowTextSelectionOnPress) {\n        restoreTextSelection(state.target);\n      }\n      for (let dispose of state.disposables) {\n        dispose();\n      }\n      state.disposables = [];\n    }\n  });\n\n  let cancelOnPointerExit = useEffectEvent((e: EventBase) => {\n    if (shouldCancelOnPointerExit) {\n      cancel(e);\n    }\n  });\n\n  let triggerClick = useEffectEvent((e: RMouseEvent<FocusableElement>) => {\n    onClick?.(e);\n  });\n\n  let triggerSyntheticClick = useEffectEvent((e: KeyboardEvent | TouchEvent, target: FocusableElement) => {\n    // Some third-party libraries pass in onClick instead of onPress.\n    // Create a fake mouse event and trigger onClick as well.\n    // This matches the browser's native activation behavior for certain elements (e.g. button).\n    // https://html.spec.whatwg.org/#activation\n    // https://html.spec.whatwg.org/#fire-a-synthetic-pointer-event\n    if (onClick) {\n      let event = new MouseEvent('click', e);\n      setEventTarget(event, target);\n      onClick(createSyntheticEvent(event));\n    }\n  });\n\n  let pressProps = useMemo(() => {\n    let state = ref.current;\n    let pressProps: DOMAttributes = {\n      onKeyDown(e) {\n        if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          if (shouldPreventDefaultKeyboard(getEventTarget(e.nativeEvent), e.key)) {\n            e.preventDefault();\n          }\n\n          // If the event is repeating, it may have started on a different element\n          // after which focus moved to the current element. Ignore these events and\n          // only handle the first key down event.\n          let shouldStopPropagation = true;\n          if (!state.isPressed && !e.repeat) {\n            state.target = e.currentTarget;\n            state.isPressed = true;\n            state.pointerType = 'keyboard';\n            shouldStopPropagation = triggerPressStart(e, 'keyboard');\n\n            // Focus may move before the key up event, so register the event on the document\n            // instead of the same element where the key down event occurred. Make it capturing so that it will trigger\n            // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.\n            let originalTarget = e.currentTarget;\n            let pressUp = (e) => {\n              if (isValidKeyboardEvent(e, originalTarget) && !e.repeat && nodeContains(originalTarget, getEventTarget(e)) && state.target) {\n                triggerPressUp(createEvent(state.target, e), 'keyboard');\n              }\n            };\n\n            addGlobalListener(getOwnerDocument(e.currentTarget), 'keyup', chain(pressUp, onKeyUp), true);\n          }\n\n          if (shouldStopPropagation) {\n            e.stopPropagation();\n          }\n\n          // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.\n          // macOS has a bug where keyup events are not fired while the Meta key is down.\n          // When the Meta key itself is released we will get an event for that, and we'll act as if\n          // all of these other keys were released as well.\n          // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524\n          // https://bugs.webkit.org/show_bug.cgi?id=55291\n          // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553\n          if (e.metaKey && isMac()) {\n            state.metaKeyEvents?.set(e.key, e.nativeEvent);\n          }\n        } else if (e.key === 'Meta') {\n          state.metaKeyEvents = new Map();\n        }\n      },\n      onClick(e) {\n        if (e && !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (e && e.button === 0 && !state.isTriggeringEvent && !(openLink as any).isOpening) {\n          let shouldStopPropagation = true;\n          if (isDisabled) {\n            e.preventDefault();\n          }\n          \n          // If triggered from a screen reader or by using element.click(),\n          // trigger as if it were a keyboard click.\n          if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || isVirtualClick(e.nativeEvent))) {\n            let stopPressStart = triggerPressStart(e, 'virtual');\n            let stopPressUp = triggerPressUp(e, 'virtual');\n            let stopPressEnd = triggerPressEnd(e, 'virtual');\n            triggerClick(e);\n            shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n          } else if (state.isPressed && state.pointerType !== 'keyboard') {\n            let pointerType = state.pointerType || (e.nativeEvent as PointerEvent).pointerType as PointerType || 'virtual';\n            shouldStopPropagation = triggerPressEnd(createEvent(e.currentTarget, e), pointerType, true);\n            state.isOverTarget = false;\n            triggerClick(e);\n            cancel(e);\n          }\n\n          state.ignoreEmulatedMouseEvents = false;\n          if (shouldStopPropagation) {\n            e.stopPropagation();\n          }\n        }\n      }\n    };\n\n    let onKeyUp = (e: KeyboardEvent) => {\n      if (state.isPressed && state.target && isValidKeyboardEvent(e, state.target)) {\n        if (shouldPreventDefaultKeyboard(getEventTarget(e), e.key)) {\n          e.preventDefault();\n        }\n\n        let target = getEventTarget(e);\n        let wasPressed = nodeContains(state.target, getEventTarget(e));\n        triggerPressEnd(createEvent(state.target, e), 'keyboard', wasPressed);\n        if (wasPressed) {\n          triggerSyntheticClick(e, state.target);\n        }\n        removeAllGlobalListeners();\n\n        // If a link was triggered with a key other than Enter, open the URL ourselves.\n        // This means the link has a role override, and the default browser behavior\n        // only applies when using the Enter key.\n        if (e.key !== 'Enter' && isHTMLAnchorLink(state.target) && nodeContains(state.target, target) && !e[LINK_CLICKED]) {\n          // Store a hidden property on the event so we only trigger link click once,\n          // even if there are multiple usePress instances attached to the element.\n          e[LINK_CLICKED] = true;\n          openLink(state.target, e, false);\n        }\n\n        state.isPressed = false;\n        state.metaKeyEvents?.delete(e.key);\n      } else if (e.key === 'Meta' && state.metaKeyEvents?.size) {\n        // If we recorded keydown events that occurred while the Meta key was pressed,\n        // and those haven't received keyup events already, fire keyup events ourselves.\n        // See comment above for more info about the macOS bug causing this.\n        let events = state.metaKeyEvents;\n        state.metaKeyEvents = undefined;\n        for (let event of events.values()) {\n          state.target?.dispatchEvent(new KeyboardEvent('keyup', event));\n        }\n      }\n    };\n\n    if (typeof PointerEvent !== 'undefined') {\n      pressProps.onPointerDown = (e) => {\n        // Only handle left clicks, and ignore events that bubbled through portals.\n        if (e.button !== 0 || !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n        // Ignore and let the onClick handler take care of it instead.\n        // https://bugs.webkit.org/show_bug.cgi?id=222627\n        // https://bugs.webkit.org/show_bug.cgi?id=223202\n        if (isVirtualPointerEvent(e.nativeEvent)) {\n          state.pointerType = 'virtual';\n          return;\n        }\n\n        state.pointerType = e.pointerType;\n\n        let shouldStopPropagation = true;\n        if (!state.isPressed) {\n          state.isPressed = true;\n          state.isOverTarget = true;\n          state.activePointerId = e.pointerId;\n          state.target = e.currentTarget as FocusableElement;\n\n          if (!allowTextSelectionOnPress) {\n            disableTextSelection(state.target);\n          }\n\n          shouldStopPropagation = triggerPressStart(e, state.pointerType);\n\n          // Release pointer capture so that touch interactions can leave the original target.\n          // This enables onPointerLeave and onPointerEnter to fire.\n          let target = getEventTarget(e.nativeEvent);\n          if ('releasePointerCapture' in target) {\n            target.releasePointerCapture(e.pointerId);\n          }\n\n          addGlobalListener(getOwnerDocument(e.currentTarget), 'pointerup', onPointerUp, false);\n          addGlobalListener(getOwnerDocument(e.currentTarget), 'pointercancel', onPointerCancel, false);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseDown = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (e.button === 0) {\n          if (preventFocusOnPress) {\n            let dispose = preventFocus(e.target as FocusableElement);\n            if (dispose) {\n              state.disposables.push(dispose);\n            }\n          }\n\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onPointerUp = (e) => {\n        // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent)) || state.pointerType === 'virtual') {\n          return;\n        }\n\n        // Only handle left clicks\n        if (e.button === 0) {\n          triggerPressUp(e, state.pointerType || e.pointerType);\n        }\n      };\n\n      pressProps.onPointerEnter = (e) => {\n        if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = true;\n          triggerPressStart(createEvent(state.target, e), state.pointerType);\n        }\n      };\n\n      pressProps.onPointerLeave = (e) => {\n        if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = false;\n          triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n          cancelOnPointerExit(e);\n        }\n      };\n\n      let onPointerUp = (e: PointerEvent) => {\n        if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {\n          if (nodeContains(state.target, getEventTarget(e)) && state.pointerType != null) {\n            // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n            // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.\n            // https://github.com/adobe/react-spectrum/issues/1513\n            // https://issues.chromium.org/issues/40732224\n            // However, iOS and Android do not focus or fire onClick after a long press.\n            // We work around this by triggering a click ourselves after a timeout.\n            // This timeout is canceled during the click event in case the real one fires first.\n            // The timeout must be at least 32ms, because Safari on iOS delays the click event on\n            // non-form elements without certain ARIA roles (for hover emulation).\n            // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892\n            let clicked = false;\n            let timeout = setTimeout(() => {\n              if (state.isPressed && state.target instanceof HTMLElement) {\n                if (clicked) {\n                  cancel(e);\n                } else {\n                  focusWithoutScrolling(state.target);\n                  state.target.click();\n                }\n              }\n            }, 80);\n            // Use a capturing listener to track if a click occurred.\n            // If stopPropagation is called it may never reach our handler.\n            addGlobalListener(e.currentTarget as Document, 'click', () => clicked = true, true);\n            state.disposables.push(() => clearTimeout(timeout));\n          } else {\n            cancel(e);\n          }\n\n          // Ignore subsequent onPointerLeave event before onClick on touch devices.\n          state.isOverTarget = false;\n        }\n      };\n\n      let onPointerCancel = (e: PointerEvent) => {\n        cancel(e);\n      };\n\n      pressProps.onDragStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n        cancel(e);\n      };\n    } else if (process.env.NODE_ENV === 'test') {\n      // NOTE: this fallback branch is entirely used by unit tests.\n      // All browsers now support pointer events, but JSDOM still does not.\n\n      pressProps.onMouseDown = (e) => {\n        // Only handle left clicks\n        if (e.button !== 0 || !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (state.ignoreEmulatedMouseEvents) {\n          e.stopPropagation();\n          return;\n        }\n\n        state.isPressed = true;\n        state.isOverTarget = true;\n        state.target = e.currentTarget;\n        state.pointerType = isVirtualClick(e.nativeEvent) ? 'virtual' : 'mouse';\n\n        // Flush sync so that focus moved during react re-renders occurs before we yield back to the browser.\n        let shouldStopPropagation = flushSync(() => triggerPressStart(e, state.pointerType!));\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        if (preventFocusOnPress) {\n          let dispose = preventFocus(e.target as FocusableElement);\n          if (dispose) {\n            state.disposables.push(dispose);\n          }\n        }\n\n        addGlobalListener(getOwnerDocument(e.currentTarget), 'mouseup', onMouseUp, false);\n      };\n\n      pressProps.onMouseEnter = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let shouldStopPropagation = true;\n        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n          state.isOverTarget = true;\n          shouldStopPropagation = triggerPressStart(e, state.pointerType);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseLeave = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let shouldStopPropagation = true;\n        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n          state.isOverTarget = false;\n          shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n          cancelOnPointerExit(e);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseUp = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.ignoreEmulatedMouseEvents && e.button === 0) {\n          triggerPressUp(e, state.pointerType || 'mouse');\n        }\n      };\n\n      let onMouseUp = (e: MouseEvent) => {\n        // Only handle left clicks\n        if (e.button !== 0) {\n          return;\n        }\n\n        if (state.ignoreEmulatedMouseEvents) {\n          state.ignoreEmulatedMouseEvents = false;\n          return;\n        }\n\n        if (state.target && state.target.contains(e.target as Element) && state.pointerType != null) {\n          // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n          // is mutated between onMouseUp and onClick, and is more compatible with third party libraries.\n        } else {\n          cancel(e);\n        }\n\n        state.isOverTarget = false;\n      };\n\n      pressProps.onTouchStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let touch = getTouchFromEvent(e.nativeEvent);\n        if (!touch) {\n          return;\n        }\n        state.activePointerId = touch.identifier;\n        state.ignoreEmulatedMouseEvents = true;\n        state.isOverTarget = true;\n        state.isPressed = true;\n        state.target = e.currentTarget;\n        state.pointerType = 'touch';\n\n        if (!allowTextSelectionOnPress) {\n          disableTextSelection(state.target);\n        }\n\n        let shouldStopPropagation = triggerPressStart(createTouchEvent(state.target, e), state.pointerType);\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        addGlobalListener(getOwnerWindow(e.currentTarget), 'scroll', onScroll, true);\n      };\n\n      pressProps.onTouchMove = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.isPressed) {\n          e.stopPropagation();\n          return;\n        }\n\n        let touch = getTouchById(e.nativeEvent, state.activePointerId);\n        let shouldStopPropagation = true;\n        if (touch && isOverTarget(touch, e.currentTarget)) {\n          if (!state.isOverTarget && state.pointerType != null) {\n            state.isOverTarget = true;\n            shouldStopPropagation = triggerPressStart(createTouchEvent(state.target!, e), state.pointerType);\n          }\n        } else if (state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = false;\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType, false);\n          cancelOnPointerExit(createTouchEvent(state.target!, e));\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onTouchEnd = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.isPressed) {\n          e.stopPropagation();\n          return;\n        }\n\n        let touch = getTouchById(e.nativeEvent, state.activePointerId);\n        let shouldStopPropagation = true;\n        if (touch && isOverTarget(touch, e.currentTarget) && state.pointerType != null) {\n          triggerPressUp(createTouchEvent(state.target!, e), state.pointerType);\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType);\n          triggerSyntheticClick(e.nativeEvent, state.target!);\n        } else if (state.isOverTarget && state.pointerType != null) {\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType, false);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        state.isPressed = false;\n        state.activePointerId = null;\n        state.isOverTarget = false;\n        state.ignoreEmulatedMouseEvents = true;\n        if (state.target && !allowTextSelectionOnPress) {\n          restoreTextSelection(state.target);\n        }\n        removeAllGlobalListeners();\n      };\n\n      pressProps.onTouchCancel = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        e.stopPropagation();\n        if (state.isPressed) {\n          cancel(createTouchEvent(state.target!, e));\n        }\n      };\n\n      let onScroll = (e: Event) => {\n        if (state.isPressed && nodeContains(getEventTarget(e), state.target)) {\n          cancel({\n            currentTarget: state.target,\n            shiftKey: false,\n            ctrlKey: false,\n            metaKey: false,\n            altKey: false\n          });\n        }\n      };\n\n      pressProps.onDragStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        cancel(e);\n      };\n    }\n\n    return pressProps;\n  }, [\n    addGlobalListener,\n    isDisabled,\n    preventFocusOnPress,\n    removeAllGlobalListeners,\n    allowTextSelectionOnPress,\n    cancel,\n    cancelOnPointerExit,\n    triggerPressEnd,\n    triggerPressStart,\n    triggerPressUp,\n    triggerClick,\n    triggerSyntheticClick\n  ]);\n\n  // Avoid onClick delay for double tap to zoom by default.\n  useEffect(() => {\n    if (!domRef || process.env.NODE_ENV === 'test') {\n      return;\n    }\n\n    const ownerDocument = getOwnerDocument(domRef.current);\n    if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById(STYLE_ID)) {\n      return;\n    }\n\n    const style = ownerDocument.createElement('style');\n    style.id = STYLE_ID;\n    // touchAction: 'manipulation' is supposed to be equivalent, but in\n    // Safari it causes onPointerCancel not to fire on scroll.\n    // https://bugs.webkit.org/show_bug.cgi?id=240917\n    style.textContent = `\n@layer {\n  [${PRESSABLE_ATTRIBUTE}] {\n    touch-action: pan-x pan-y pinch-zoom;\n  }\n}\n    `.trim();\n    ownerDocument.head.prepend(style);\n  }, [domRef]);\n\n  // Remove user-select: none in case component unmounts immediately after pressStart\n  useEffect(() => {\n    let state = ref.current;\n    return () => {\n      if (!allowTextSelectionOnPress) {\n        restoreTextSelection(state.target ?? undefined);\n      }\n      for (let dispose of state.disposables) {\n        dispose();\n      }\n      state.disposables = [];\n    };\n  }, [allowTextSelectionOnPress]);\n\n  return {\n    isPressed: isPressedProp || isPressed,\n    pressProps: mergeProps(domProps, pressProps, {[PRESSABLE_ATTRIBUTE]: true})\n  };\n}\n\nfunction isHTMLAnchorLink(target: Element): target is HTMLAnchorElement {\n  return target.tagName === 'A' && target.hasAttribute('href');\n}\n\nfunction isValidKeyboardEvent(event: KeyboardEvent, currentTarget: Element): boolean {\n  const {key, code} = event;\n  const element = currentTarget as HTMLElement;\n  const role = element.getAttribute('role');\n  // Accessibility for keyboards. Space and Enter only.\n  // \"Spacebar\" is for IE 11\n  return (\n    (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') &&\n    !((element instanceof getOwnerWindow(element).HTMLInputElement && !isValidInputKey(element, key)) ||\n      element instanceof getOwnerWindow(element).HTMLTextAreaElement ||\n      element.isContentEditable) &&\n    // Links should only trigger with Enter key\n    !((role === 'link' || (!role && isHTMLAnchorLink(element))) && key !== 'Enter')\n  );\n}\n\nfunction getTouchFromEvent(event: TouchEvent): Touch | null {\n  const {targetTouches} = event;\n  if (targetTouches.length > 0) {\n    return targetTouches[0];\n  }\n  return null;\n}\n\nfunction getTouchById(\n  event: TouchEvent,\n  pointerId: null | number\n): null | Touch {\n  const changedTouches = event.changedTouches;\n  for (let i = 0; i < changedTouches.length; i++) {\n    const touch = changedTouches[i];\n    if (touch.identifier === pointerId) {\n      return touch;\n    }\n  }\n  return null;\n}\n\nfunction createTouchEvent(target: FocusableElement, e: RTouchEvent<FocusableElement>): EventBase {\n  let clientX = 0;\n  let clientY = 0;\n  if (e.targetTouches && e.targetTouches.length === 1) {\n    clientX = e.targetTouches[0].clientX;\n    clientY = e.targetTouches[0].clientY;\n  }\n  return {\n    currentTarget: target,\n    shiftKey: e.shiftKey,\n    ctrlKey: e.ctrlKey,\n    metaKey: e.metaKey,\n    altKey: e.altKey,\n    clientX,\n    clientY\n  };\n}\n\nfunction createEvent(target: FocusableElement, e: EventBase): EventBase {\n  let clientX = e.clientX;\n  let clientY = e.clientY;\n  return {\n    currentTarget: target,\n    shiftKey: e.shiftKey,\n    ctrlKey: e.ctrlKey,\n    metaKey: e.metaKey,\n    altKey: e.altKey,\n    clientX,\n    clientY\n  };\n}\n\ninterface Rect {\n  top: number,\n  right: number,\n  bottom: number,\n  left: number\n}\n\ninterface EventPoint {\n  clientX: number,\n  clientY: number,\n  width?: number,\n  height?: number,\n  radiusX?: number,\n  radiusY?: number\n}\n\nfunction getPointClientRect(point: EventPoint): Rect {\n  let offsetX = 0;\n  let offsetY = 0;\n  if (point.width !== undefined) {\n    offsetX = (point.width / 2);\n  } else if (point.radiusX !== undefined) {\n    offsetX = point.radiusX;\n  }\n  if (point.height !== undefined) {\n    offsetY = (point.height / 2);\n  } else if (point.radiusY !== undefined) {\n    offsetY = point.radiusY;\n  }\n\n  return {\n    top: point.clientY - offsetY,\n    right: point.clientX + offsetX,\n    bottom: point.clientY + offsetY,\n    left: point.clientX - offsetX\n  };\n}\n\nfunction areRectanglesOverlapping(a: Rect, b: Rect) {\n  // check if they cannot overlap on x axis\n  if (a.left > b.right || b.left > a.right) {\n    return false;\n  }\n  // check if they cannot overlap on y axis\n  if (a.top > b.bottom || b.top > a.bottom) {\n    return false;\n  }\n  return true;\n}\n\nfunction isOverTarget(point: EventPoint, target: Element) {\n  let rect = target.getBoundingClientRect();\n  let pointRect = getPointClientRect(point);\n  return areRectanglesOverlapping(rect, pointRect);\n}\n\nfunction shouldPreventDefaultUp(target: Element) {\n  if (target instanceof HTMLInputElement) {\n    return false;\n  }\n\n  if (target instanceof HTMLButtonElement) {\n    return target.type !== 'submit' && target.type !== 'reset';\n  }\n\n  if (isHTMLAnchorLink(target)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction shouldPreventDefaultKeyboard(target: Element, key: string) {\n  if (target instanceof HTMLInputElement) {\n    return !isValidInputKey(target, key);\n  }\n\n  return shouldPreventDefaultUp(target);\n}\n\nconst nonTextInputTypes = new Set([\n  'checkbox',\n  'radio',\n  'range',\n  'color',\n  'file',\n  'image',\n  'button',\n  'submit',\n  'reset'\n]);\n\nfunction isValidInputKey(target: HTMLInputElement, key: string) {\n  // Only space should toggle checkboxes and radios, not enter.\n  return target.type === 'checkbox' || target.type === 'radio'\n    ? key === ' '\n    : nonTextInputTypes.has(target.type);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {\n  focusWithoutScrolling,\n  getActiveElement,\n  getOwnerDocument,\n  runAfterTransition\n} from '@react-aria/utils';\nimport {getInteractionModality} from './useFocusVisible';\n\n/**\n * A utility function that focuses an element while avoiding undesired side effects such\n * as page scrolling and screen reader issues with CSS transitions.\n */\nexport function focusSafely(element: FocusableElement): void {\n  // If the user is interacting with a virtual cursor, e.g. screen reader, then\n  // wait until after any animated transitions that are currently occurring on\n  // the page before shifting focus. This avoids issues with VoiceOver on iOS\n  // causing the page to scroll when moving focus if the element is transitioning\n  // from off the screen.\n  const ownerDocument = getOwnerDocument(element);\n  const activeElement = getActiveElement(ownerDocument);\n  if (getInteractionModality() === 'virtual') {\n    let lastFocusedElement = activeElement;\n    runAfterTransition(() => {\n      // If focus did not move and the element is still in the document, focus it.\n      if (getActiveElement(ownerDocument) === lastFocusedElement && element.isConnected) {\n        focusWithoutScrolling(element);\n      }\n    });\n  } else {\n    focusWithoutScrolling(element);\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BaseEvent} from '@react-types/shared';\nimport {SyntheticEvent} from 'react';\n\n/**\n * This function wraps a React event handler to make stopPropagation the default, and support continuePropagation instead.\n */\nexport function createEventHandler<T extends SyntheticEvent>(handler?: (e: BaseEvent<T>) => void): ((e: T) => void) | undefined {\n  if (!handler) {\n    return undefined;\n  }\n\n  let shouldStopPropagation = true;\n  return (e: T) => {\n    let event: BaseEvent<T> = {\n      ...e,\n      preventDefault() {\n        e.preventDefault();\n      },\n      isDefaultPrevented() {\n        return e.isDefaultPrevented();\n      },\n      stopPropagation() {\n        if (shouldStopPropagation && process.env.NODE_ENV !== 'production') {\n          console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');\n        } else {\n          shouldStopPropagation = true;\n        }\n      },\n      continuePropagation() {\n        shouldStopPropagation = false;\n      },\n      isPropagationStopped() {\n        return shouldStopPropagation;\n      }\n    };\n\n    handler(event);\n\n    if (shouldStopPropagation) {\n      e.stopPropagation();\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createEventHandler} from './createEventHandler';\nimport {DOMAttributes, KeyboardEvents} from '@react-types/shared';\n\nexport interface KeyboardProps extends KeyboardEvents {\n  /** Whether the keyboard events should be disabled. */\n  isDisabled?: boolean\n}\n\nexport interface KeyboardResult {\n  /** Props to spread onto the target element. */\n  keyboardProps: DOMAttributes\n}\n\n/**\n * Handles keyboard interactions for a focusable element.\n */\nexport function useKeyboard(props: KeyboardProps): KeyboardResult {\n  return {\n    keyboardProps: props.isDisabled ? {} : {\n      onKeyDown: createEventHandler(props.onKeyDown),\n      onKeyUp: createEventHandler(props.onKeyUp)\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, FocusableDOMProps, FocusableElement, FocusableProps, RefObject} from '@react-types/shared';\nimport {focusSafely} from './';\nimport {getOwnerWindow, isFocusable, mergeProps, mergeRefs, useObjectRef, useSyncRef} from '@react-aria/utils';\nimport React, {ForwardedRef, forwardRef, MutableRefObject, ReactElement, ReactNode, useContext, useEffect, useRef} from 'react';\nimport {useFocus} from './useFocus';\nimport {useKeyboard} from './useKeyboard';\n\nexport interface FocusableOptions<T = FocusableElement> extends FocusableProps<T>, FocusableDOMProps {\n  /** Whether focus should be disabled. */\n  isDisabled?: boolean\n}\n\nexport interface FocusableProviderProps extends DOMAttributes {\n  /** The child element to provide DOM props to. */\n  children?: ReactNode\n}\n\ninterface FocusableContextValue extends FocusableProviderProps {\n  ref?: MutableRefObject<FocusableElement | null>\n}\n\n// Exported for @react-aria/collections, which forwards this context.\n/** @private */\nexport let FocusableContext = React.createContext<FocusableContextValue | null>(null);\n\nfunction useFocusableContext(ref: RefObject<FocusableElement | null>): FocusableContextValue {\n  let context = useContext(FocusableContext) || {};\n  useSyncRef(context, ref);\n\n  // eslint-disable-next-line\n  let {ref: _, ...otherProps} = context;\n  return otherProps;\n}\n\n/**\n * Provides DOM props to the nearest focusable child.\n */\nexport const FocusableProvider = React.forwardRef(function FocusableProvider(props: FocusableProviderProps, ref: ForwardedRef<FocusableElement>) {\n  let {children, ...otherProps} = props;\n  let objRef = useObjectRef(ref);\n  let context = {\n    ...otherProps,\n    ref: objRef\n  };\n\n  return (\n    <FocusableContext.Provider value={context}>\n      {children}\n    </FocusableContext.Provider>\n  );\n});\n\nexport interface FocusableAria {\n  /** Props for the focusable element. */\n  focusableProps: DOMAttributes\n}\n\n/**\n * Used to make an element focusable and capable of auto focus.\n */\nexport function useFocusable<T extends FocusableElement = FocusableElement>(props: FocusableOptions<T>, domRef: RefObject<FocusableElement | null>): FocusableAria {\n  let {focusProps} = useFocus(props);\n  let {keyboardProps} = useKeyboard(props);\n  let interactions = mergeProps(focusProps, keyboardProps);\n  let domProps = useFocusableContext(domRef);\n  let interactionProps = props.isDisabled ? {} : domProps;\n  let autoFocusRef = useRef(props.autoFocus);\n\n  useEffect(() => {\n    if (autoFocusRef.current && domRef.current) {\n      focusSafely(domRef.current);\n    }\n    autoFocusRef.current = false;\n  }, [domRef]);\n\n  // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n  let tabIndex: number | undefined = props.excludeFromTabOrder ? -1 : 0;\n  if (props.isDisabled) {\n    tabIndex = undefined;\n  }\n\n  return {\n    focusableProps: mergeProps(\n      {\n        ...interactions,\n        tabIndex\n      },\n      interactionProps\n    )\n  };\n}\n\nexport interface FocusableComponentProps extends FocusableOptions {\n  children: ReactElement<DOMAttributes, string>\n}\n\nexport const Focusable = forwardRef(({children, ...props}: FocusableComponentProps, ref: ForwardedRef<FocusableElement>) => {\n  ref = useObjectRef(ref);\n  let {focusableProps} = useFocusable(props, ref);\n  let child = React.Children.only(children);\n\n  useEffect(() => {\n    if (process.env.NODE_ENV === 'production') {\n      return;\n    }\n\n    let el = ref.current;\n    if (!el || !(el instanceof getOwnerWindow(el).Element)) {\n      console.error('<Focusable> child must forward its ref to a DOM element.');\n      return;\n    }\n\n    if (!props.isDisabled && !isFocusable(el)) {\n      console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n      return;\n    }\n\n    if (\n      el.localName !== 'button' &&\n      el.localName !== 'input' &&\n      el.localName !== 'select' &&\n      el.localName !== 'textarea' &&\n      el.localName !== 'a' &&\n      el.localName !== 'area' &&\n      el.localName !== 'summary' &&\n      el.localName !== 'img' &&\n      el.localName !== 'svg'\n    ) {\n      let role = el.getAttribute('role');\n      if (!role) {\n        console.warn('<Focusable> child must have an interactive ARIA role.');\n      } else if (\n        // https://w3c.github.io/aria/#widget_roles\n        role !== 'application' &&\n        role !== 'button' &&\n        role !== 'checkbox' &&\n        role !== 'combobox' &&\n        role !== 'gridcell' &&\n        role !== 'link' &&\n        role !== 'menuitem' &&\n        role !== 'menuitemcheckbox' &&\n        role !== 'menuitemradio' &&\n        role !== 'option' &&\n        role !== 'radio' &&\n        role !== 'searchbox' &&\n        role !== 'separator' &&\n        role !== 'slider' &&\n        role !== 'spinbutton' &&\n        role !== 'switch' &&\n        role !== 'tab' &&\n        role !== 'tabpanel' &&\n        role !== 'textbox' &&\n        role !== 'treeitem' &&\n        // aria-describedby is also announced on these roles\n        role !== 'img' &&\n        role !== 'meter' &&\n        role !== 'progressbar'\n      ) {\n        console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n      }\n    }\n  }, [ref, props.isDisabled]);\n\n  // @ts-ignore\n  let childRef = parseInt(React.version, 10) < 19 ? child.ref : child.props.ref;\n\n  return React.cloneElement(\n    child,\n    {\n      ...mergeProps(focusableProps, child.props),\n      // @ts-ignore\n      ref: mergeRefs(childRef, ref)\n    }\n  );\n});\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, FocusableElement, LongPressEvent} from '@react-types/shared';\nimport {focusWithoutScrolling, getOwnerDocument, mergeProps, useDescription, useGlobalListeners} from '@react-aria/utils';\nimport {usePress} from './usePress';\nimport {useRef} from 'react';\n\nexport interface LongPressProps {\n  /** Whether long press events should be disabled. */\n  isDisabled?: boolean,\n  /** Handler that is called when a long press interaction starts. */\n  onLongPressStart?: (e: LongPressEvent) => void,\n  /**\n   * Handler that is called when a long press interaction ends, either\n   * over the target or when the pointer leaves the target.\n   */\n  onLongPressEnd?: (e: LongPressEvent) => void,\n  /**\n   * Handler that is called when the threshold time is met while\n   * the press is over the target.\n   */\n  onLongPress?: (e: LongPressEvent) => void,\n  /**\n   * The amount of time in milliseconds to wait before triggering a long press.\n   * @default 500ms\n   */\n  threshold?: number,\n  /**\n   * A description for assistive techology users indicating that a long press\n   * action is available, e.g. \"Long press to open menu\".\n   */\n  accessibilityDescription?: string\n}\n\nexport interface LongPressResult {\n  /** Props to spread on the target element. */\n  longPressProps: DOMAttributes\n}\n\nconst DEFAULT_THRESHOLD = 500;\n\n/**\n * Handles long press interactions across mouse and touch devices. Supports a customizable time threshold,\n * accessibility description, and normalizes behavior across browsers and devices.\n */\nexport function useLongPress(props: LongPressProps): LongPressResult {\n  let {\n    isDisabled,\n    onLongPressStart,\n    onLongPressEnd,\n    onLongPress,\n    threshold = DEFAULT_THRESHOLD,\n    accessibilityDescription\n  } = props;\n\n  const timeRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n  let {addGlobalListener, removeGlobalListener} = useGlobalListeners();\n\n  let {pressProps} = usePress({\n    isDisabled,\n    onPressStart(e) {\n      e.continuePropagation();\n      if (e.pointerType === 'mouse' || e.pointerType === 'touch') {\n        if (onLongPressStart) {\n          onLongPressStart({\n            ...e,\n            type: 'longpressstart'\n          });\n        }\n\n        timeRef.current = setTimeout(() => {\n          // Prevent other usePress handlers from also handling this event.\n          e.target.dispatchEvent(new PointerEvent('pointercancel', {bubbles: true}));\n\n          // Ensure target is focused. On touch devices, browsers typically focus on pointer up.\n          if (getOwnerDocument(e.target).activeElement !== e.target) {\n            focusWithoutScrolling(e.target as FocusableElement);\n          }\n\n          if (onLongPress) {\n            onLongPress({\n              ...e,\n              type: 'longpress'\n            });\n          }\n          timeRef.current = undefined;\n        }, threshold);\n\n        // Prevent context menu, which may be opened on long press on touch devices\n        if (e.pointerType === 'touch') {\n          let onContextMenu = e => {\n            e.preventDefault();\n          };\n\n          addGlobalListener(e.target, 'contextmenu', onContextMenu, {once: true});\n          addGlobalListener(window, 'pointerup', () => {\n            // If no contextmenu event is fired quickly after pointerup, remove the handler\n            // so future context menu events outside a long press are not prevented.\n            setTimeout(() => {\n              removeGlobalListener(e.target, 'contextmenu', onContextMenu);\n            }, 30);\n          }, {once: true});\n        }\n      }\n    },\n    onPressEnd(e) {\n      if (timeRef.current) {\n        clearTimeout(timeRef.current);\n      }\n\n      if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {\n        onLongPressEnd({\n          ...e,\n          type: 'longpressend'\n        });\n      }\n    }\n  });\n\n  let descriptionProps = useDescription(onLongPress && !isDisabled ? accessibilityDescription : undefined);\n\n  return {\n    longPressProps: mergeProps(pressProps, descriptionProps)\n  };\n}\n","// src/utils.ts\nimport { forwardRef as baseForwardRef } from \"react\";\nfunction forwardRef(component) {\n  return baseForwardRef(component);\n}\nvar toIterator = (obj) => {\n  return {\n    ...obj,\n    [Symbol.iterator]: function() {\n      const keys = Object.keys(this);\n      let index = 0;\n      return {\n        next: () => {\n          if (index >= keys.length) {\n            return { done: true };\n          }\n          const key = keys[index];\n          const value = this[key];\n          index++;\n          return { value: { key, value }, done: false };\n        }\n      };\n    }\n  };\n};\nvar mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {\n  if (!variantKeys) {\n    return [props, {}];\n  }\n  const picked = variantKeys.reduce((acc, key) => {\n    if (key in props) {\n      return { ...acc, [key]: props[key] };\n    } else {\n      return acc;\n    }\n  }, {});\n  if (removeVariantProps) {\n    const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});\n    return [omitted, picked];\n  } else {\n    return [props, picked];\n  }\n};\nvar mapPropsVariantsWithCommon = (originalProps, variantKeys, commonKeys) => {\n  const props = Object.keys(originalProps).filter((key) => !variantKeys.includes(key) || (commonKeys == null ? void 0 : commonKeys.includes(key))).reduce((acc, key) => ({ ...acc, [key]: originalProps[key] }), {});\n  const variants = variantKeys.reduce(\n    (acc, key) => ({ ...acc, [key]: originalProps[key] }),\n    {}\n  );\n  return [props, variants];\n};\nvar isHeroUIEl = (component) => {\n  var _a, _b, _c;\n  return !!((_c = (_b = (_a = component.type) == null ? void 0 : _a.render) == null ? void 0 : _b.displayName) == null ? void 0 : _c.includes(\"HeroUI\"));\n};\n\nexport {\n  forwardRef,\n  toIterator,\n  mapPropsVariants,\n  mapPropsVariantsWithCommon,\n  isHeroUIEl\n};\n","// src/utils/variants.ts\nvar solid = {\n  default: \"bg-default text-default-foreground\",\n  primary: \"bg-primary text-primary-foreground\",\n  secondary: \"bg-secondary text-secondary-foreground\",\n  success: \"bg-success text-success-foreground\",\n  warning: \"bg-warning text-warning-foreground\",\n  danger: \"bg-danger text-danger-foreground\",\n  foreground: \"bg-foreground text-background\"\n};\nvar shadow = {\n  default: \"shadow-lg shadow-default/50 bg-default text-default-foreground\",\n  primary: \"shadow-lg shadow-primary/40 bg-primary text-primary-foreground\",\n  secondary: \"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground\",\n  success: \"shadow-lg shadow-success/40 bg-success text-success-foreground\",\n  warning: \"shadow-lg shadow-warning/40 bg-warning text-warning-foreground\",\n  danger: \"shadow-lg shadow-danger/40 bg-danger text-danger-foreground\",\n  foreground: \"shadow-lg shadow-foreground/40 bg-foreground text-background\"\n};\nvar bordered = {\n  default: \"bg-transparent border-default text-foreground\",\n  primary: \"bg-transparent border-primary text-primary\",\n  secondary: \"bg-transparent border-secondary text-secondary\",\n  success: \"bg-transparent border-success text-success\",\n  warning: \"bg-transparent border-warning text-warning\",\n  danger: \"bg-transparent border-danger text-danger\",\n  foreground: \"bg-transparent border-foreground text-foreground\"\n};\nvar flat = {\n  default: \"bg-default/40 text-default-700\",\n  primary: \"bg-primary/20 text-primary-600\",\n  secondary: \"bg-secondary/20 text-secondary-600\",\n  success: \"bg-success/20 text-success-700 dark:text-success\",\n  warning: \"bg-warning/20 text-warning-700 dark:text-warning\",\n  danger: \"bg-danger/20 text-danger-600 dark:text-danger-500\",\n  foreground: \"bg-foreground/10 text-foreground\"\n};\nvar faded = {\n  default: \"border-default bg-default-100 text-default-foreground\",\n  primary: \"border-default bg-default-100 text-primary\",\n  secondary: \"border-default bg-default-100 text-secondary\",\n  success: \"border-default bg-default-100 text-success\",\n  warning: \"border-default bg-default-100 text-warning\",\n  danger: \"border-default bg-default-100 text-danger\",\n  foreground: \"border-default bg-default-100 text-foreground\"\n};\nvar light = {\n  default: \"bg-transparent text-default-foreground\",\n  primary: \"bg-transparent text-primary\",\n  secondary: \"bg-transparent text-secondary\",\n  success: \"bg-transparent text-success\",\n  warning: \"bg-transparent text-warning\",\n  danger: \"bg-transparent text-danger\",\n  foreground: \"bg-transparent text-foreground\"\n};\nvar ghost = {\n  default: \"border-default text-default-foreground\",\n  primary: \"border-primary text-primary\",\n  secondary: \"border-secondary text-secondary\",\n  success: \"border-success text-success\",\n  warning: \"border-warning text-warning\",\n  danger: \"border-danger text-danger\",\n  foreground: \"border-foreground text-foreground hover:!bg-foreground\"\n};\nvar colorVariants = {\n  solid,\n  shadow,\n  bordered,\n  flat,\n  faded,\n  light,\n  ghost\n};\n\nexport {\n  colorVariants\n};\n","// src/utils/tw-merge-config.ts\nvar COMMON_UNITS = [\"small\", \"medium\", \"large\"];\nvar twMergeConfig = {\n  theme: {\n    opacity: [\"disabled\"],\n    spacing: [\"divider\"],\n    borderWidth: COMMON_UNITS,\n    borderRadius: COMMON_UNITS\n  },\n  classGroups: {\n    shadow: [{ shadow: COMMON_UNITS }],\n    \"font-size\": [{ text: [\"tiny\", ...COMMON_UNITS] }],\n    \"bg-image\": [\n      \"bg-stripe-gradient-default\",\n      \"bg-stripe-gradient-primary\",\n      \"bg-stripe-gradient-secondary\",\n      \"bg-stripe-gradient-success\",\n      \"bg-stripe-gradient-warning\",\n      \"bg-stripe-gradient-danger\"\n    ]\n  }\n};\n\nexport {\n  COMMON_UNITS,\n  twMergeConfig\n};\n","var l=e=>typeof e==\"boolean\"?`${e}`:e===0?\"0\":e,u=e=>!e||typeof e!=\"object\"||Object.keys(e).length===0,x=(e,o)=>JSON.stringify(e)===JSON.stringify(o),A=e=>typeof e==\"boolean\";function i(e,o){e.forEach(function(r){Array.isArray(r)?i(r,o):o.push(r);});}function y(e){let o=[];return i(e,o),o}var a=(...e)=>y(e).filter(Boolean),p=(e,o)=>{let r={},c=Object.keys(e),f=Object.keys(o);for(let t of c)if(f.includes(t)){let s=e[t],n=o[t];Array.isArray(s)||Array.isArray(n)?r[t]=a(n,s):typeof s==\"object\"&&typeof n==\"object\"?r[t]=p(s,n):r[t]=n+\" \"+s;}else r[t]=e[t];for(let t of f)c.includes(t)||(r[t]=o[t]);return r},g=e=>!e||typeof e!=\"string\"?e:e.replace(/\\s+/g,\" \").trim();\n\nexport { l as a, u as b, x as c, A as d, y as e, a as f, p as g, g as h };\n","import {\n    AnyClassGroupIds,\n    AnyConfig,\n    AnyThemeGroupIds,\n    ClassGroup,\n    ClassValidator,\n    Config,\n    ThemeGetter,\n    ThemeObject,\n} from './types'\n\nexport interface ClassPartObject {\n    nextPart: Map<string, ClassPartObject>\n    validators: ClassValidatorObject[]\n    classGroupId?: AnyClassGroupIds\n}\n\ninterface ClassValidatorObject {\n    classGroupId: AnyClassGroupIds\n    validator: ClassValidator\n}\n\nconst CLASS_PART_SEPARATOR = '-'\n\nexport const createClassGroupUtils = (config: AnyConfig) => {\n    const classMap = createClassMap(config)\n    const { conflictingClassGroups, conflictingClassGroupModifiers } = config\n\n    const getClassGroupId = (className: string) => {\n        const classParts = className.split(CLASS_PART_SEPARATOR)\n\n        // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n        if (classParts[0] === '' && classParts.length !== 1) {\n            classParts.shift()\n        }\n\n        return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className)\n    }\n\n    const getConflictingClassGroupIds = (\n        classGroupId: AnyClassGroupIds,\n        hasPostfixModifier: boolean,\n    ) => {\n        const conflicts = conflictingClassGroups[classGroupId] || []\n\n        if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n            return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]!]\n        }\n\n        return conflicts\n    }\n\n    return {\n        getClassGroupId,\n        getConflictingClassGroupIds,\n    }\n}\n\nconst getGroupRecursive = (\n    classParts: string[],\n    classPartObject: ClassPartObject,\n): AnyClassGroupIds | undefined => {\n    if (classParts.length === 0) {\n        return classPartObject.classGroupId\n    }\n\n    const currentClassPart = classParts[0]!\n    const nextClassPartObject = classPartObject.nextPart.get(currentClassPart)\n    const classGroupFromNextClassPart = nextClassPartObject\n        ? getGroupRecursive(classParts.slice(1), nextClassPartObject)\n        : undefined\n\n    if (classGroupFromNextClassPart) {\n        return classGroupFromNextClassPart\n    }\n\n    if (classPartObject.validators.length === 0) {\n        return undefined\n    }\n\n    const classRest = classParts.join(CLASS_PART_SEPARATOR)\n\n    return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId\n}\n\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/\n\nconst getGroupIdForArbitraryProperty = (className: string) => {\n    if (arbitraryPropertyRegex.test(className)) {\n        const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)![1]\n        const property = arbitraryPropertyClassName?.substring(\n            0,\n            arbitraryPropertyClassName.indexOf(':'),\n        )\n\n        if (property) {\n            // I use two dots here because one dot is used as prefix for class groups in plugins\n            return 'arbitrary..' + property\n        }\n    }\n}\n\n/**\n * Exported for testing only\n */\nexport const createClassMap = (config: Config<AnyClassGroupIds, AnyThemeGroupIds>) => {\n    const { theme, prefix } = config\n    const classMap: ClassPartObject = {\n        nextPart: new Map<string, ClassPartObject>(),\n        validators: [],\n    }\n\n    const prefixedClassGroupEntries = getPrefixedClassGroupEntries(\n        Object.entries(config.classGroups),\n        prefix,\n    )\n\n    prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {\n        processClassesRecursively(classGroup, classMap, classGroupId, theme)\n    })\n\n    return classMap\n}\n\nconst processClassesRecursively = (\n    classGroup: ClassGroup<AnyThemeGroupIds>,\n    classPartObject: ClassPartObject,\n    classGroupId: AnyClassGroupIds,\n    theme: ThemeObject<AnyThemeGroupIds>,\n) => {\n    classGroup.forEach((classDefinition) => {\n        if (typeof classDefinition === 'string') {\n            const classPartObjectToEdit =\n                classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition)\n            classPartObjectToEdit.classGroupId = classGroupId\n            return\n        }\n\n        if (typeof classDefinition === 'function') {\n            if (isThemeGetter(classDefinition)) {\n                processClassesRecursively(\n                    classDefinition(theme),\n                    classPartObject,\n                    classGroupId,\n                    theme,\n                )\n                return\n            }\n\n            classPartObject.validators.push({\n                validator: classDefinition,\n                classGroupId,\n            })\n\n            return\n        }\n\n        Object.entries(classDefinition).forEach(([key, classGroup]) => {\n            processClassesRecursively(\n                classGroup,\n                getPart(classPartObject, key),\n                classGroupId,\n                theme,\n            )\n        })\n    })\n}\n\nconst getPart = (classPartObject: ClassPartObject, path: string) => {\n    let currentClassPartObject = classPartObject\n\n    path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {\n        if (!currentClassPartObject.nextPart.has(pathPart)) {\n            currentClassPartObject.nextPart.set(pathPart, {\n                nextPart: new Map(),\n                validators: [],\n            })\n        }\n\n        currentClassPartObject = currentClassPartObject.nextPart.get(pathPart)!\n    })\n\n    return currentClassPartObject\n}\n\nconst isThemeGetter = (func: ClassValidator | ThemeGetter): func is ThemeGetter =>\n    (func as ThemeGetter).isThemeGetter\n\nconst getPrefixedClassGroupEntries = (\n    classGroupEntries: Array<[classGroupId: string, classGroup: ClassGroup<AnyThemeGroupIds>]>,\n    prefix: string | undefined,\n): Array<[classGroupId: string, classGroup: ClassGroup<AnyThemeGroupIds>]> => {\n    if (!prefix) {\n        return classGroupEntries\n    }\n\n    return classGroupEntries.map(([classGroupId, classGroup]) => {\n        const prefixedClassGroup = classGroup.map((classDefinition) => {\n            if (typeof classDefinition === 'string') {\n                return prefix + classDefinition\n            }\n\n            if (typeof classDefinition === 'object') {\n                return Object.fromEntries(\n                    Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]),\n                )\n            }\n\n            return classDefinition\n        })\n\n        return [classGroupId, prefixedClassGroup]\n    })\n}\n","// Export is needed because TypeScript complains about an error otherwise:\n// Error: …/tailwind-merge/src/config-utils.ts(8,17): semantic error TS4058: Return type of exported function has or is using name 'LruCache' from external module \"…/tailwind-merge/src/lru-cache\" but cannot be named.\nexport interface LruCache<Key, Value> {\n    get(key: Key): Value | undefined\n    set(key: Key, value: Value): void\n}\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nexport const createLruCache = <Key, Value>(maxCacheSize: number): LruCache<Key, Value> => {\n    if (maxCacheSize < 1) {\n        return {\n            get: () => undefined,\n            set: () => {},\n        }\n    }\n\n    let cacheSize = 0\n    let cache = new Map<Key, Value>()\n    let previousCache = new Map<Key, Value>()\n\n    const update = (key: Key, value: Value) => {\n        cache.set(key, value)\n        cacheSize++\n\n        if (cacheSize > maxCacheSize) {\n            cacheSize = 0\n            previousCache = cache\n            cache = new Map()\n        }\n    }\n\n    return {\n        get(key) {\n            let value = cache.get(key)\n\n            if (value !== undefined) {\n                return value\n            }\n            if ((value = previousCache.get(key)) !== undefined) {\n                update(key, value)\n                return value\n            }\n        },\n        set(key, value) {\n            if (cache.has(key)) {\n                cache.set(key, value)\n            } else {\n                update(key, value)\n            }\n        },\n    }\n}\n","import { AnyConfig } from './types'\n\nexport const IMPORTANT_MODIFIER = '!'\n\nexport const createParseClassName = (config: AnyConfig) => {\n    const { separator, experimentalParseClassName } = config\n    const isSeparatorSingleCharacter = separator.length === 1\n    const firstSeparatorCharacter = separator[0]\n    const separatorLength = separator.length\n\n    // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n    const parseClassName = (className: string) => {\n        const modifiers = []\n\n        let bracketDepth = 0\n        let modifierStart = 0\n        let postfixModifierPosition: number | undefined\n\n        for (let index = 0; index < className.length; index++) {\n            let currentCharacter = className[index]\n\n            if (bracketDepth === 0) {\n                if (\n                    currentCharacter === firstSeparatorCharacter &&\n                    (isSeparatorSingleCharacter ||\n                        className.slice(index, index + separatorLength) === separator)\n                ) {\n                    modifiers.push(className.slice(modifierStart, index))\n                    modifierStart = index + separatorLength\n                    continue\n                }\n\n                if (currentCharacter === '/') {\n                    postfixModifierPosition = index\n                    continue\n                }\n            }\n\n            if (currentCharacter === '[') {\n                bracketDepth++\n            } else if (currentCharacter === ']') {\n                bracketDepth--\n            }\n        }\n\n        const baseClassNameWithImportantModifier =\n            modifiers.length === 0 ? className : className.substring(modifierStart)\n        const hasImportantModifier =\n            baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)\n        const baseClassName = hasImportantModifier\n            ? baseClassNameWithImportantModifier.substring(1)\n            : baseClassNameWithImportantModifier\n\n        const maybePostfixModifierPosition =\n            postfixModifierPosition && postfixModifierPosition > modifierStart\n                ? postfixModifierPosition - modifierStart\n                : undefined\n\n        return {\n            modifiers,\n            hasImportantModifier,\n            baseClassName,\n            maybePostfixModifierPosition,\n        }\n    }\n\n    if (experimentalParseClassName) {\n        return (className: string) => experimentalParseClassName({ className, parseClassName })\n    }\n\n    return parseClassName\n}\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nexport const sortModifiers = (modifiers: string[]) => {\n    if (modifiers.length <= 1) {\n        return modifiers\n    }\n\n    const sortedModifiers: string[] = []\n    let unsortedModifiers: string[] = []\n\n    modifiers.forEach((modifier) => {\n        const isArbitraryVariant = modifier[0] === '['\n\n        if (isArbitraryVariant) {\n            sortedModifiers.push(...unsortedModifiers.sort(), modifier)\n            unsortedModifiers = []\n        } else {\n            unsortedModifiers.push(modifier)\n        }\n    })\n\n    sortedModifiers.push(...unsortedModifiers.sort())\n\n    return sortedModifiers\n}\n","import { createClassGroupUtils } from './class-group-utils'\nimport { createLruCache } from './lru-cache'\nimport { createParseClassName } from './parse-class-name'\nimport { AnyConfig } from './types'\n\nexport type ConfigUtils = ReturnType<typeof createConfigUtils>\n\nexport const createConfigUtils = (config: AnyConfig) => ({\n    cache: createLruCache<string, string>(config.cacheSize),\n    parseClassName: createParseClassName(config),\n    ...createClassGroupUtils(config),\n})\n","import { ConfigUtils } from './config-utils'\nimport { IMPORTANT_MODIFIER, sortModifiers } from './parse-class-name'\n\nconst SPLIT_CLASSES_REGEX = /\\s+/\n\nexport const mergeClassList = (classList: string, configUtils: ConfigUtils) => {\n    const { parseClassName, getClassGroupId, getConflictingClassGroupIds } = configUtils\n\n    /**\n     * Set of classGroupIds in following format:\n     * `{importantModifier}{variantModifiers}{classGroupId}`\n     * @example 'float'\n     * @example 'hover:focus:bg-color'\n     * @example 'md:!pr'\n     */\n    const classGroupsInConflict: string[] = []\n    const classNames = classList.trim().split(SPLIT_CLASSES_REGEX)\n\n    let result = ''\n\n    for (let index = classNames.length - 1; index >= 0; index -= 1) {\n        const originalClassName = classNames[index]!\n\n        const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } =\n            parseClassName(originalClassName)\n\n        let hasPostfixModifier = Boolean(maybePostfixModifierPosition)\n        let classGroupId = getClassGroupId(\n            hasPostfixModifier\n                ? baseClassName.substring(0, maybePostfixModifierPosition)\n                : baseClassName,\n        )\n\n        if (!classGroupId) {\n            if (!hasPostfixModifier) {\n                // Not a Tailwind class\n                result = originalClassName + (result.length > 0 ? ' ' + result : result)\n                continue\n            }\n\n            classGroupId = getClassGroupId(baseClassName)\n\n            if (!classGroupId) {\n                // Not a Tailwind class\n                result = originalClassName + (result.length > 0 ? ' ' + result : result)\n                continue\n            }\n\n            hasPostfixModifier = false\n        }\n\n        const variantModifier = sortModifiers(modifiers).join(':')\n\n        const modifierId = hasImportantModifier\n            ? variantModifier + IMPORTANT_MODIFIER\n            : variantModifier\n\n        const classId = modifierId + classGroupId\n\n        if (classGroupsInConflict.includes(classId)) {\n            // Tailwind class omitted due to conflict\n            continue\n        }\n\n        classGroupsInConflict.push(classId)\n\n        const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier)\n        for (let i = 0; i < conflictGroups.length; ++i) {\n            const group = conflictGroups[i]!\n            classGroupsInConflict.push(modifierId + group)\n        }\n\n        // Tailwind class not in conflict\n        result = originalClassName + (result.length > 0 ? ' ' + result : result)\n    }\n\n    return result\n}\n","/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\n\nexport type ClassNameValue = ClassNameArray | string | null | undefined | 0 | 0n | false\ntype ClassNameArray = ClassNameValue[]\n\nexport function twJoin(...classLists: ClassNameValue[]): string\nexport function twJoin() {\n    let index = 0\n    let argument: ClassNameValue\n    let resolvedValue: string\n    let string = ''\n\n    while (index < arguments.length) {\n        if ((argument = arguments[index++])) {\n            if ((resolvedValue = toValue(argument))) {\n                string && (string += ' ')\n                string += resolvedValue\n            }\n        }\n    }\n    return string\n}\n\nconst toValue = (mix: ClassNameArray | string) => {\n    if (typeof mix === 'string') {\n        return mix\n    }\n\n    let resolvedValue: string\n    let string = ''\n\n    for (let k = 0; k < mix.length; k++) {\n        if (mix[k]) {\n            if ((resolvedValue = toValue(mix[k] as ClassNameArray | string))) {\n                string && (string += ' ')\n                string += resolvedValue\n            }\n        }\n    }\n\n    return string\n}\n","import { createConfigUtils } from './config-utils'\nimport { mergeClassList } from './merge-classlist'\nimport { ClassNameValue, twJoin } from './tw-join'\nimport { AnyConfig } from './types'\n\ntype CreateConfigFirst = () => AnyConfig\ntype CreateConfigSubsequent = (config: AnyConfig) => AnyConfig\ntype TailwindMerge = (...classLists: ClassNameValue[]) => string\ntype ConfigUtils = ReturnType<typeof createConfigUtils>\n\nexport function createTailwindMerge(\n    createConfigFirst: CreateConfigFirst,\n    ...createConfigRest: CreateConfigSubsequent[]\n): TailwindMerge {\n    let configUtils: ConfigUtils\n    let cacheGet: ConfigUtils['cache']['get']\n    let cacheSet: ConfigUtils['cache']['set']\n    let functionToCall = initTailwindMerge\n\n    function initTailwindMerge(classList: string) {\n        const config = createConfigRest.reduce(\n            (previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig),\n            createConfigFirst() as AnyConfig,\n        )\n\n        configUtils = createConfigUtils(config)\n        cacheGet = configUtils.cache.get\n        cacheSet = configUtils.cache.set\n        functionToCall = tailwindMerge\n\n        return tailwindMerge(classList)\n    }\n\n    function tailwindMerge(classList: string) {\n        const cachedResult = cacheGet(classList)\n\n        if (cachedResult) {\n            return cachedResult\n        }\n\n        const result = mergeClassList(classList, configUtils)\n        cacheSet(classList, result)\n\n        return result\n    }\n\n    return function callTailwindMerge() {\n        return functionToCall(twJoin.apply(null, arguments as any))\n    }\n}\n","import { DefaultThemeGroupIds, NoInfer, ThemeGetter, ThemeObject } from './types'\n\nexport const fromTheme = <\n    AdditionalThemeGroupIds extends string = never,\n    DefaultThemeGroupIdsInner extends string = DefaultThemeGroupIds,\n>(key: NoInfer<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>): ThemeGetter => {\n    const themeGetter = (theme: ThemeObject<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>) =>\n        theme[key] || []\n\n    themeGetter.isThemeGetter = true as const\n\n    return themeGetter\n}\n","const arbitraryValueRegex = /^\\[(?:([a-z-]+):)?(.+)\\]$/i\nconst fractionRegex = /^\\d+\\/\\d+$/\nconst stringLengths = new Set(['px', 'full', 'screen'])\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/\nconst lengthUnitRegex =\n    /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\\(.+\\)$/\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/\nconst imageRegex =\n    /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/\n\nexport const isLength = (value: string) =>\n    isNumber(value) || stringLengths.has(value) || fractionRegex.test(value)\n\nexport const isArbitraryLength = (value: string) =>\n    getIsArbitraryValue(value, 'length', isLengthOnly)\n\nexport const isNumber = (value: string) => Boolean(value) && !Number.isNaN(Number(value))\n\nexport const isArbitraryNumber = (value: string) => getIsArbitraryValue(value, 'number', isNumber)\n\nexport const isInteger = (value: string) => Boolean(value) && Number.isInteger(Number(value))\n\nexport const isPercent = (value: string) => value.endsWith('%') && isNumber(value.slice(0, -1))\n\nexport const isArbitraryValue = (value: string) => arbitraryValueRegex.test(value)\n\nexport const isTshirtSize = (value: string) => tshirtUnitRegex.test(value)\n\nconst sizeLabels = new Set(['length', 'size', 'percentage'])\n\nexport const isArbitrarySize = (value: string) => getIsArbitraryValue(value, sizeLabels, isNever)\n\nexport const isArbitraryPosition = (value: string) =>\n    getIsArbitraryValue(value, 'position', isNever)\n\nconst imageLabels = new Set(['image', 'url'])\n\nexport const isArbitraryImage = (value: string) => getIsArbitraryValue(value, imageLabels, isImage)\n\nexport const isArbitraryShadow = (value: string) => getIsArbitraryValue(value, '', isShadow)\n\nexport const isAny = () => true\n\nconst getIsArbitraryValue = (\n    value: string,\n    label: string | Set<string>,\n    testValue: (value: string) => boolean,\n) => {\n    const result = arbitraryValueRegex.exec(value)\n\n    if (result) {\n        if (result[1]) {\n            return typeof label === 'string' ? result[1] === label : label.has(result[1])\n        }\n\n        return testValue(result[2]!)\n    }\n\n    return false\n}\n\nconst isLengthOnly = (value: string) =>\n    // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n    // For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n    // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\n    lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)\n\nconst isNever = () => false\n\nconst isShadow = (value: string) => shadowRegex.test(value)\n\nconst isImage = (value: string) => imageRegex.test(value)\n","import { fromTheme } from './from-theme'\nimport { Config, DefaultClassGroupIds, DefaultThemeGroupIds } from './types'\nimport {\n    isAny,\n    isArbitraryImage,\n    isArbitraryLength,\n    isArbitraryNumber,\n    isArbitraryPosition,\n    isArbitraryShadow,\n    isArbitrarySize,\n    isArbitraryValue,\n    isInteger,\n    isLength,\n    isNumber,\n    isPercent,\n    isTshirtSize,\n} from './validators'\n\nexport const getDefaultConfig = () => {\n    const colors = fromTheme('colors')\n    const spacing = fromTheme('spacing')\n    const blur = fromTheme('blur')\n    const brightness = fromTheme('brightness')\n    const borderColor = fromTheme('borderColor')\n    const borderRadius = fromTheme('borderRadius')\n    const borderSpacing = fromTheme('borderSpacing')\n    const borderWidth = fromTheme('borderWidth')\n    const contrast = fromTheme('contrast')\n    const grayscale = fromTheme('grayscale')\n    const hueRotate = fromTheme('hueRotate')\n    const invert = fromTheme('invert')\n    const gap = fromTheme('gap')\n    const gradientColorStops = fromTheme('gradientColorStops')\n    const gradientColorStopPositions = fromTheme('gradientColorStopPositions')\n    const inset = fromTheme('inset')\n    const margin = fromTheme('margin')\n    const opacity = fromTheme('opacity')\n    const padding = fromTheme('padding')\n    const saturate = fromTheme('saturate')\n    const scale = fromTheme('scale')\n    const sepia = fromTheme('sepia')\n    const skew = fromTheme('skew')\n    const space = fromTheme('space')\n    const translate = fromTheme('translate')\n\n    const getOverscroll = () => ['auto', 'contain', 'none'] as const\n    const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'] as const\n    const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing] as const\n    const getSpacingWithArbitrary = () => [isArbitraryValue, spacing] as const\n    const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength] as const\n    const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue] as const\n    const getPositions = () =>\n        [\n            'bottom',\n            'center',\n            'left',\n            'left-bottom',\n            'left-top',\n            'right',\n            'right-bottom',\n            'right-top',\n            'top',\n        ] as const\n    const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'] as const\n    const getBlendModes = () =>\n        [\n            'normal',\n            'multiply',\n            'screen',\n            'overlay',\n            'darken',\n            'lighten',\n            'color-dodge',\n            'color-burn',\n            'hard-light',\n            'soft-light',\n            'difference',\n            'exclusion',\n            'hue',\n            'saturation',\n            'color',\n            'luminosity',\n        ] as const\n    const getAlign = () =>\n        ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'] as const\n    const getZeroAndEmpty = () => ['', '0', isArbitraryValue] as const\n    const getBreaks = () =>\n        ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'] as const\n    const getNumberAndArbitrary = () => [isNumber, isArbitraryValue]\n\n    return {\n        cacheSize: 500,\n        separator: ':',\n        theme: {\n            colors: [isAny],\n            spacing: [isLength, isArbitraryLength],\n            blur: ['none', '', isTshirtSize, isArbitraryValue],\n            brightness: getNumberAndArbitrary(),\n            borderColor: [colors],\n            borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],\n            borderSpacing: getSpacingWithArbitrary(),\n            borderWidth: getLengthWithEmptyAndArbitrary(),\n            contrast: getNumberAndArbitrary(),\n            grayscale: getZeroAndEmpty(),\n            hueRotate: getNumberAndArbitrary(),\n            invert: getZeroAndEmpty(),\n            gap: getSpacingWithArbitrary(),\n            gradientColorStops: [colors],\n            gradientColorStopPositions: [isPercent, isArbitraryLength],\n            inset: getSpacingWithAutoAndArbitrary(),\n            margin: getSpacingWithAutoAndArbitrary(),\n            opacity: getNumberAndArbitrary(),\n            padding: getSpacingWithArbitrary(),\n            saturate: getNumberAndArbitrary(),\n            scale: getNumberAndArbitrary(),\n            sepia: getZeroAndEmpty(),\n            skew: getNumberAndArbitrary(),\n            space: getSpacingWithArbitrary(),\n            translate: getSpacingWithArbitrary(),\n        },\n        classGroups: {\n            // Layout\n            /**\n             * Aspect Ratio\n             * @see https://tailwindcss.com/docs/aspect-ratio\n             */\n            aspect: [{ aspect: ['auto', 'square', 'video', isArbitraryValue] }],\n            /**\n             * Container\n             * @see https://tailwindcss.com/docs/container\n             */\n            container: ['container'],\n            /**\n             * Columns\n             * @see https://tailwindcss.com/docs/columns\n             */\n            columns: [{ columns: [isTshirtSize] }],\n            /**\n             * Break After\n             * @see https://tailwindcss.com/docs/break-after\n             */\n            'break-after': [{ 'break-after': getBreaks() }],\n            /**\n             * Break Before\n             * @see https://tailwindcss.com/docs/break-before\n             */\n            'break-before': [{ 'break-before': getBreaks() }],\n            /**\n             * Break Inside\n             * @see https://tailwindcss.com/docs/break-inside\n             */\n            'break-inside': [{ 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column'] }],\n            /**\n             * Box Decoration Break\n             * @see https://tailwindcss.com/docs/box-decoration-break\n             */\n            'box-decoration': [{ 'box-decoration': ['slice', 'clone'] }],\n            /**\n             * Box Sizing\n             * @see https://tailwindcss.com/docs/box-sizing\n             */\n            box: [{ box: ['border', 'content'] }],\n            /**\n             * Display\n             * @see https://tailwindcss.com/docs/display\n             */\n            display: [\n                'block',\n                'inline-block',\n                'inline',\n                'flex',\n                'inline-flex',\n                'table',\n                'inline-table',\n                'table-caption',\n                'table-cell',\n                'table-column',\n                'table-column-group',\n                'table-footer-group',\n                'table-header-group',\n                'table-row-group',\n                'table-row',\n                'flow-root',\n                'grid',\n                'inline-grid',\n                'contents',\n                'list-item',\n                'hidden',\n            ],\n            /**\n             * Floats\n             * @see https://tailwindcss.com/docs/float\n             */\n            float: [{ float: ['right', 'left', 'none', 'start', 'end'] }],\n            /**\n             * Clear\n             * @see https://tailwindcss.com/docs/clear\n             */\n            clear: [{ clear: ['left', 'right', 'both', 'none', 'start', 'end'] }],\n            /**\n             * Isolation\n             * @see https://tailwindcss.com/docs/isolation\n             */\n            isolation: ['isolate', 'isolation-auto'],\n            /**\n             * Object Fit\n             * @see https://tailwindcss.com/docs/object-fit\n             */\n            'object-fit': [{ object: ['contain', 'cover', 'fill', 'none', 'scale-down'] }],\n            /**\n             * Object Position\n             * @see https://tailwindcss.com/docs/object-position\n             */\n            'object-position': [{ object: [...getPositions(), isArbitraryValue] }],\n            /**\n             * Overflow\n             * @see https://tailwindcss.com/docs/overflow\n             */\n            overflow: [{ overflow: getOverflow() }],\n            /**\n             * Overflow X\n             * @see https://tailwindcss.com/docs/overflow\n             */\n            'overflow-x': [{ 'overflow-x': getOverflow() }],\n            /**\n             * Overflow Y\n             * @see https://tailwindcss.com/docs/overflow\n             */\n            'overflow-y': [{ 'overflow-y': getOverflow() }],\n            /**\n             * Overscroll Behavior\n             * @see https://tailwindcss.com/docs/overscroll-behavior\n             */\n            overscroll: [{ overscroll: getOverscroll() }],\n            /**\n             * Overscroll Behavior X\n             * @see https://tailwindcss.com/docs/overscroll-behavior\n             */\n            'overscroll-x': [{ 'overscroll-x': getOverscroll() }],\n            /**\n             * Overscroll Behavior Y\n             * @see https://tailwindcss.com/docs/overscroll-behavior\n             */\n            'overscroll-y': [{ 'overscroll-y': getOverscroll() }],\n            /**\n             * Position\n             * @see https://tailwindcss.com/docs/position\n             */\n            position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n            /**\n             * Top / Right / Bottom / Left\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            inset: [{ inset: [inset] }],\n            /**\n             * Right / Left\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            'inset-x': [{ 'inset-x': [inset] }],\n            /**\n             * Top / Bottom\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            'inset-y': [{ 'inset-y': [inset] }],\n            /**\n             * Start\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            start: [{ start: [inset] }],\n            /**\n             * End\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            end: [{ end: [inset] }],\n            /**\n             * Top\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            top: [{ top: [inset] }],\n            /**\n             * Right\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            right: [{ right: [inset] }],\n            /**\n             * Bottom\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            bottom: [{ bottom: [inset] }],\n            /**\n             * Left\n             * @see https://tailwindcss.com/docs/top-right-bottom-left\n             */\n            left: [{ left: [inset] }],\n            /**\n             * Visibility\n             * @see https://tailwindcss.com/docs/visibility\n             */\n            visibility: ['visible', 'invisible', 'collapse'],\n            /**\n             * Z-Index\n             * @see https://tailwindcss.com/docs/z-index\n             */\n            z: [{ z: ['auto', isInteger, isArbitraryValue] }],\n            // Flexbox and Grid\n            /**\n             * Flex Basis\n             * @see https://tailwindcss.com/docs/flex-basis\n             */\n            basis: [{ basis: getSpacingWithAutoAndArbitrary() }],\n            /**\n             * Flex Direction\n             * @see https://tailwindcss.com/docs/flex-direction\n             */\n            'flex-direction': [{ flex: ['row', 'row-reverse', 'col', 'col-reverse'] }],\n            /**\n             * Flex Wrap\n             * @see https://tailwindcss.com/docs/flex-wrap\n             */\n            'flex-wrap': [{ flex: ['wrap', 'wrap-reverse', 'nowrap'] }],\n            /**\n             * Flex\n             * @see https://tailwindcss.com/docs/flex\n             */\n            flex: [{ flex: ['1', 'auto', 'initial', 'none', isArbitraryValue] }],\n            /**\n             * Flex Grow\n             * @see https://tailwindcss.com/docs/flex-grow\n             */\n            grow: [{ grow: getZeroAndEmpty() }],\n            /**\n             * Flex Shrink\n             * @see https://tailwindcss.com/docs/flex-shrink\n             */\n            shrink: [{ shrink: getZeroAndEmpty() }],\n            /**\n             * Order\n             * @see https://tailwindcss.com/docs/order\n             */\n            order: [{ order: ['first', 'last', 'none', isInteger, isArbitraryValue] }],\n            /**\n             * Grid Template Columns\n             * @see https://tailwindcss.com/docs/grid-template-columns\n             */\n            'grid-cols': [{ 'grid-cols': [isAny] }],\n            /**\n             * Grid Column Start / End\n             * @see https://tailwindcss.com/docs/grid-column\n             */\n            'col-start-end': [\n                {\n                    col: [\n                        'auto',\n                        { span: ['full', isInteger, isArbitraryValue] },\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * Grid Column Start\n             * @see https://tailwindcss.com/docs/grid-column\n             */\n            'col-start': [{ 'col-start': getNumberWithAutoAndArbitrary() }],\n            /**\n             * Grid Column End\n             * @see https://tailwindcss.com/docs/grid-column\n             */\n            'col-end': [{ 'col-end': getNumberWithAutoAndArbitrary() }],\n            /**\n             * Grid Template Rows\n             * @see https://tailwindcss.com/docs/grid-template-rows\n             */\n            'grid-rows': [{ 'grid-rows': [isAny] }],\n            /**\n             * Grid Row Start / End\n             * @see https://tailwindcss.com/docs/grid-row\n             */\n            'row-start-end': [\n                { row: ['auto', { span: [isInteger, isArbitraryValue] }, isArbitraryValue] },\n            ],\n            /**\n             * Grid Row Start\n             * @see https://tailwindcss.com/docs/grid-row\n             */\n            'row-start': [{ 'row-start': getNumberWithAutoAndArbitrary() }],\n            /**\n             * Grid Row End\n             * @see https://tailwindcss.com/docs/grid-row\n             */\n            'row-end': [{ 'row-end': getNumberWithAutoAndArbitrary() }],\n            /**\n             * Grid Auto Flow\n             * @see https://tailwindcss.com/docs/grid-auto-flow\n             */\n            'grid-flow': [{ 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense'] }],\n            /**\n             * Grid Auto Columns\n             * @see https://tailwindcss.com/docs/grid-auto-columns\n             */\n            'auto-cols': [{ 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue] }],\n            /**\n             * Grid Auto Rows\n             * @see https://tailwindcss.com/docs/grid-auto-rows\n             */\n            'auto-rows': [{ 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue] }],\n            /**\n             * Gap\n             * @see https://tailwindcss.com/docs/gap\n             */\n            gap: [{ gap: [gap] }],\n            /**\n             * Gap X\n             * @see https://tailwindcss.com/docs/gap\n             */\n            'gap-x': [{ 'gap-x': [gap] }],\n            /**\n             * Gap Y\n             * @see https://tailwindcss.com/docs/gap\n             */\n            'gap-y': [{ 'gap-y': [gap] }],\n            /**\n             * Justify Content\n             * @see https://tailwindcss.com/docs/justify-content\n             */\n            'justify-content': [{ justify: ['normal', ...getAlign()] }],\n            /**\n             * Justify Items\n             * @see https://tailwindcss.com/docs/justify-items\n             */\n            'justify-items': [{ 'justify-items': ['start', 'end', 'center', 'stretch'] }],\n            /**\n             * Justify Self\n             * @see https://tailwindcss.com/docs/justify-self\n             */\n            'justify-self': [{ 'justify-self': ['auto', 'start', 'end', 'center', 'stretch'] }],\n            /**\n             * Align Content\n             * @see https://tailwindcss.com/docs/align-content\n             */\n            'align-content': [{ content: ['normal', ...getAlign(), 'baseline'] }],\n            /**\n             * Align Items\n             * @see https://tailwindcss.com/docs/align-items\n             */\n            'align-items': [{ items: ['start', 'end', 'center', 'baseline', 'stretch'] }],\n            /**\n             * Align Self\n             * @see https://tailwindcss.com/docs/align-self\n             */\n            'align-self': [{ self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline'] }],\n            /**\n             * Place Content\n             * @see https://tailwindcss.com/docs/place-content\n             */\n            'place-content': [{ 'place-content': [...getAlign(), 'baseline'] }],\n            /**\n             * Place Items\n             * @see https://tailwindcss.com/docs/place-items\n             */\n            'place-items': [{ 'place-items': ['start', 'end', 'center', 'baseline', 'stretch'] }],\n            /**\n             * Place Self\n             * @see https://tailwindcss.com/docs/place-self\n             */\n            'place-self': [{ 'place-self': ['auto', 'start', 'end', 'center', 'stretch'] }],\n            // Spacing\n            /**\n             * Padding\n             * @see https://tailwindcss.com/docs/padding\n             */\n            p: [{ p: [padding] }],\n            /**\n             * Padding X\n             * @see https://tailwindcss.com/docs/padding\n             */\n            px: [{ px: [padding] }],\n            /**\n             * Padding Y\n             * @see https://tailwindcss.com/docs/padding\n             */\n            py: [{ py: [padding] }],\n            /**\n             * Padding Start\n             * @see https://tailwindcss.com/docs/padding\n             */\n            ps: [{ ps: [padding] }],\n            /**\n             * Padding End\n             * @see https://tailwindcss.com/docs/padding\n             */\n            pe: [{ pe: [padding] }],\n            /**\n             * Padding Top\n             * @see https://tailwindcss.com/docs/padding\n             */\n            pt: [{ pt: [padding] }],\n            /**\n             * Padding Right\n             * @see https://tailwindcss.com/docs/padding\n             */\n            pr: [{ pr: [padding] }],\n            /**\n             * Padding Bottom\n             * @see https://tailwindcss.com/docs/padding\n             */\n            pb: [{ pb: [padding] }],\n            /**\n             * Padding Left\n             * @see https://tailwindcss.com/docs/padding\n             */\n            pl: [{ pl: [padding] }],\n            /**\n             * Margin\n             * @see https://tailwindcss.com/docs/margin\n             */\n            m: [{ m: [margin] }],\n            /**\n             * Margin X\n             * @see https://tailwindcss.com/docs/margin\n             */\n            mx: [{ mx: [margin] }],\n            /**\n             * Margin Y\n             * @see https://tailwindcss.com/docs/margin\n             */\n            my: [{ my: [margin] }],\n            /**\n             * Margin Start\n             * @see https://tailwindcss.com/docs/margin\n             */\n            ms: [{ ms: [margin] }],\n            /**\n             * Margin End\n             * @see https://tailwindcss.com/docs/margin\n             */\n            me: [{ me: [margin] }],\n            /**\n             * Margin Top\n             * @see https://tailwindcss.com/docs/margin\n             */\n            mt: [{ mt: [margin] }],\n            /**\n             * Margin Right\n             * @see https://tailwindcss.com/docs/margin\n             */\n            mr: [{ mr: [margin] }],\n            /**\n             * Margin Bottom\n             * @see https://tailwindcss.com/docs/margin\n             */\n            mb: [{ mb: [margin] }],\n            /**\n             * Margin Left\n             * @see https://tailwindcss.com/docs/margin\n             */\n            ml: [{ ml: [margin] }],\n            /**\n             * Space Between X\n             * @see https://tailwindcss.com/docs/space\n             */\n            'space-x': [{ 'space-x': [space] }],\n            /**\n             * Space Between X Reverse\n             * @see https://tailwindcss.com/docs/space\n             */\n            'space-x-reverse': ['space-x-reverse'],\n            /**\n             * Space Between Y\n             * @see https://tailwindcss.com/docs/space\n             */\n            'space-y': [{ 'space-y': [space] }],\n            /**\n             * Space Between Y Reverse\n             * @see https://tailwindcss.com/docs/space\n             */\n            'space-y-reverse': ['space-y-reverse'],\n            // Sizing\n            /**\n             * Width\n             * @see https://tailwindcss.com/docs/width\n             */\n            w: [\n                {\n                    w: [\n                        'auto',\n                        'min',\n                        'max',\n                        'fit',\n                        'svw',\n                        'lvw',\n                        'dvw',\n                        isArbitraryValue,\n                        spacing,\n                    ],\n                },\n            ],\n            /**\n             * Min-Width\n             * @see https://tailwindcss.com/docs/min-width\n             */\n            'min-w': [{ 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit'] }],\n            /**\n             * Max-Width\n             * @see https://tailwindcss.com/docs/max-width\n             */\n            'max-w': [\n                {\n                    'max-w': [\n                        isArbitraryValue,\n                        spacing,\n                        'none',\n                        'full',\n                        'min',\n                        'max',\n                        'fit',\n                        'prose',\n                        { screen: [isTshirtSize] },\n                        isTshirtSize,\n                    ],\n                },\n            ],\n            /**\n             * Height\n             * @see https://tailwindcss.com/docs/height\n             */\n            h: [\n                {\n                    h: [\n                        isArbitraryValue,\n                        spacing,\n                        'auto',\n                        'min',\n                        'max',\n                        'fit',\n                        'svh',\n                        'lvh',\n                        'dvh',\n                    ],\n                },\n            ],\n            /**\n             * Min-Height\n             * @see https://tailwindcss.com/docs/min-height\n             */\n            'min-h': [\n                { 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] },\n            ],\n            /**\n             * Max-Height\n             * @see https://tailwindcss.com/docs/max-height\n             */\n            'max-h': [\n                { 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] },\n            ],\n            /**\n             * Size\n             * @see https://tailwindcss.com/docs/size\n             */\n            size: [{ size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit'] }],\n            // Typography\n            /**\n             * Font Size\n             * @see https://tailwindcss.com/docs/font-size\n             */\n            'font-size': [{ text: ['base', isTshirtSize, isArbitraryLength] }],\n            /**\n             * Font Smoothing\n             * @see https://tailwindcss.com/docs/font-smoothing\n             */\n            'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n            /**\n             * Font Style\n             * @see https://tailwindcss.com/docs/font-style\n             */\n            'font-style': ['italic', 'not-italic'],\n            /**\n             * Font Weight\n             * @see https://tailwindcss.com/docs/font-weight\n             */\n            'font-weight': [\n                {\n                    font: [\n                        'thin',\n                        'extralight',\n                        'light',\n                        'normal',\n                        'medium',\n                        'semibold',\n                        'bold',\n                        'extrabold',\n                        'black',\n                        isArbitraryNumber,\n                    ],\n                },\n            ],\n            /**\n             * Font Family\n             * @see https://tailwindcss.com/docs/font-family\n             */\n            'font-family': [{ font: [isAny] }],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-normal': ['normal-nums'],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-ordinal': ['ordinal'],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-slashed-zero': ['slashed-zero'],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n            /**\n             * Font Variant Numeric\n             * @see https://tailwindcss.com/docs/font-variant-numeric\n             */\n            'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n            /**\n             * Letter Spacing\n             * @see https://tailwindcss.com/docs/letter-spacing\n             */\n            tracking: [\n                {\n                    tracking: [\n                        'tighter',\n                        'tight',\n                        'normal',\n                        'wide',\n                        'wider',\n                        'widest',\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * Line Clamp\n             * @see https://tailwindcss.com/docs/line-clamp\n             */\n            'line-clamp': [{ 'line-clamp': ['none', isNumber, isArbitraryNumber] }],\n            /**\n             * Line Height\n             * @see https://tailwindcss.com/docs/line-height\n             */\n            leading: [\n                {\n                    leading: [\n                        'none',\n                        'tight',\n                        'snug',\n                        'normal',\n                        'relaxed',\n                        'loose',\n                        isLength,\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * List Style Image\n             * @see https://tailwindcss.com/docs/list-style-image\n             */\n            'list-image': [{ 'list-image': ['none', isArbitraryValue] }],\n            /**\n             * List Style Type\n             * @see https://tailwindcss.com/docs/list-style-type\n             */\n            'list-style-type': [{ list: ['none', 'disc', 'decimal', isArbitraryValue] }],\n            /**\n             * List Style Position\n             * @see https://tailwindcss.com/docs/list-style-position\n             */\n            'list-style-position': [{ list: ['inside', 'outside'] }],\n            /**\n             * Placeholder Color\n             * @deprecated since Tailwind CSS v3.0.0\n             * @see https://tailwindcss.com/docs/placeholder-color\n             */\n            'placeholder-color': [{ placeholder: [colors] }],\n            /**\n             * Placeholder Opacity\n             * @see https://tailwindcss.com/docs/placeholder-opacity\n             */\n            'placeholder-opacity': [{ 'placeholder-opacity': [opacity] }],\n            /**\n             * Text Alignment\n             * @see https://tailwindcss.com/docs/text-align\n             */\n            'text-alignment': [{ text: ['left', 'center', 'right', 'justify', 'start', 'end'] }],\n            /**\n             * Text Color\n             * @see https://tailwindcss.com/docs/text-color\n             */\n            'text-color': [{ text: [colors] }],\n            /**\n             * Text Opacity\n             * @see https://tailwindcss.com/docs/text-opacity\n             */\n            'text-opacity': [{ 'text-opacity': [opacity] }],\n            /**\n             * Text Decoration\n             * @see https://tailwindcss.com/docs/text-decoration\n             */\n            'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n            /**\n             * Text Decoration Style\n             * @see https://tailwindcss.com/docs/text-decoration-style\n             */\n            'text-decoration-style': [{ decoration: [...getLineStyles(), 'wavy'] }],\n            /**\n             * Text Decoration Thickness\n             * @see https://tailwindcss.com/docs/text-decoration-thickness\n             */\n            'text-decoration-thickness': [\n                { decoration: ['auto', 'from-font', isLength, isArbitraryLength] },\n            ],\n            /**\n             * Text Underline Offset\n             * @see https://tailwindcss.com/docs/text-underline-offset\n             */\n            'underline-offset': [{ 'underline-offset': ['auto', isLength, isArbitraryValue] }],\n            /**\n             * Text Decoration Color\n             * @see https://tailwindcss.com/docs/text-decoration-color\n             */\n            'text-decoration-color': [{ decoration: [colors] }],\n            /**\n             * Text Transform\n             * @see https://tailwindcss.com/docs/text-transform\n             */\n            'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n            /**\n             * Text Overflow\n             * @see https://tailwindcss.com/docs/text-overflow\n             */\n            'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n            /**\n             * Text Wrap\n             * @see https://tailwindcss.com/docs/text-wrap\n             */\n            'text-wrap': [{ text: ['wrap', 'nowrap', 'balance', 'pretty'] }],\n            /**\n             * Text Indent\n             * @see https://tailwindcss.com/docs/text-indent\n             */\n            indent: [{ indent: getSpacingWithArbitrary() }],\n            /**\n             * Vertical Alignment\n             * @see https://tailwindcss.com/docs/vertical-align\n             */\n            'vertical-align': [\n                {\n                    align: [\n                        'baseline',\n                        'top',\n                        'middle',\n                        'bottom',\n                        'text-top',\n                        'text-bottom',\n                        'sub',\n                        'super',\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * Whitespace\n             * @see https://tailwindcss.com/docs/whitespace\n             */\n            whitespace: [\n                { whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'] },\n            ],\n            /**\n             * Word Break\n             * @see https://tailwindcss.com/docs/word-break\n             */\n            break: [{ break: ['normal', 'words', 'all', 'keep'] }],\n            /**\n             * Hyphens\n             * @see https://tailwindcss.com/docs/hyphens\n             */\n            hyphens: [{ hyphens: ['none', 'manual', 'auto'] }],\n            /**\n             * Content\n             * @see https://tailwindcss.com/docs/content\n             */\n            content: [{ content: ['none', isArbitraryValue] }],\n            // Backgrounds\n            /**\n             * Background Attachment\n             * @see https://tailwindcss.com/docs/background-attachment\n             */\n            'bg-attachment': [{ bg: ['fixed', 'local', 'scroll'] }],\n            /**\n             * Background Clip\n             * @see https://tailwindcss.com/docs/background-clip\n             */\n            'bg-clip': [{ 'bg-clip': ['border', 'padding', 'content', 'text'] }],\n            /**\n             * Background Opacity\n             * @deprecated since Tailwind CSS v3.0.0\n             * @see https://tailwindcss.com/docs/background-opacity\n             */\n            'bg-opacity': [{ 'bg-opacity': [opacity] }],\n            /**\n             * Background Origin\n             * @see https://tailwindcss.com/docs/background-origin\n             */\n            'bg-origin': [{ 'bg-origin': ['border', 'padding', 'content'] }],\n            /**\n             * Background Position\n             * @see https://tailwindcss.com/docs/background-position\n             */\n            'bg-position': [{ bg: [...getPositions(), isArbitraryPosition] }],\n            /**\n             * Background Repeat\n             * @see https://tailwindcss.com/docs/background-repeat\n             */\n            'bg-repeat': [{ bg: ['no-repeat', { repeat: ['', 'x', 'y', 'round', 'space'] }] }],\n            /**\n             * Background Size\n             * @see https://tailwindcss.com/docs/background-size\n             */\n            'bg-size': [{ bg: ['auto', 'cover', 'contain', isArbitrarySize] }],\n            /**\n             * Background Image\n             * @see https://tailwindcss.com/docs/background-image\n             */\n            'bg-image': [\n                {\n                    bg: [\n                        'none',\n                        { 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl'] },\n                        isArbitraryImage,\n                    ],\n                },\n            ],\n            /**\n             * Background Color\n             * @see https://tailwindcss.com/docs/background-color\n             */\n            'bg-color': [{ bg: [colors] }],\n            /**\n             * Gradient Color Stops From Position\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-from-pos': [{ from: [gradientColorStopPositions] }],\n            /**\n             * Gradient Color Stops Via Position\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-via-pos': [{ via: [gradientColorStopPositions] }],\n            /**\n             * Gradient Color Stops To Position\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-to-pos': [{ to: [gradientColorStopPositions] }],\n            /**\n             * Gradient Color Stops From\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-from': [{ from: [gradientColorStops] }],\n            /**\n             * Gradient Color Stops Via\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-via': [{ via: [gradientColorStops] }],\n            /**\n             * Gradient Color Stops To\n             * @see https://tailwindcss.com/docs/gradient-color-stops\n             */\n            'gradient-to': [{ to: [gradientColorStops] }],\n            // Borders\n            /**\n             * Border Radius\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            rounded: [{ rounded: [borderRadius] }],\n            /**\n             * Border Radius Start\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-s': [{ 'rounded-s': [borderRadius] }],\n            /**\n             * Border Radius End\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-e': [{ 'rounded-e': [borderRadius] }],\n            /**\n             * Border Radius Top\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-t': [{ 'rounded-t': [borderRadius] }],\n            /**\n             * Border Radius Right\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-r': [{ 'rounded-r': [borderRadius] }],\n            /**\n             * Border Radius Bottom\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-b': [{ 'rounded-b': [borderRadius] }],\n            /**\n             * Border Radius Left\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-l': [{ 'rounded-l': [borderRadius] }],\n            /**\n             * Border Radius Start Start\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-ss': [{ 'rounded-ss': [borderRadius] }],\n            /**\n             * Border Radius Start End\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-se': [{ 'rounded-se': [borderRadius] }],\n            /**\n             * Border Radius End End\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-ee': [{ 'rounded-ee': [borderRadius] }],\n            /**\n             * Border Radius End Start\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-es': [{ 'rounded-es': [borderRadius] }],\n            /**\n             * Border Radius Top Left\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-tl': [{ 'rounded-tl': [borderRadius] }],\n            /**\n             * Border Radius Top Right\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-tr': [{ 'rounded-tr': [borderRadius] }],\n            /**\n             * Border Radius Bottom Right\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-br': [{ 'rounded-br': [borderRadius] }],\n            /**\n             * Border Radius Bottom Left\n             * @see https://tailwindcss.com/docs/border-radius\n             */\n            'rounded-bl': [{ 'rounded-bl': [borderRadius] }],\n            /**\n             * Border Width\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w': [{ border: [borderWidth] }],\n            /**\n             * Border Width X\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-x': [{ 'border-x': [borderWidth] }],\n            /**\n             * Border Width Y\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-y': [{ 'border-y': [borderWidth] }],\n            /**\n             * Border Width Start\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-s': [{ 'border-s': [borderWidth] }],\n            /**\n             * Border Width End\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-e': [{ 'border-e': [borderWidth] }],\n            /**\n             * Border Width Top\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-t': [{ 'border-t': [borderWidth] }],\n            /**\n             * Border Width Right\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-r': [{ 'border-r': [borderWidth] }],\n            /**\n             * Border Width Bottom\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-b': [{ 'border-b': [borderWidth] }],\n            /**\n             * Border Width Left\n             * @see https://tailwindcss.com/docs/border-width\n             */\n            'border-w-l': [{ 'border-l': [borderWidth] }],\n            /**\n             * Border Opacity\n             * @see https://tailwindcss.com/docs/border-opacity\n             */\n            'border-opacity': [{ 'border-opacity': [opacity] }],\n            /**\n             * Border Style\n             * @see https://tailwindcss.com/docs/border-style\n             */\n            'border-style': [{ border: [...getLineStyles(), 'hidden'] }],\n            /**\n             * Divide Width X\n             * @see https://tailwindcss.com/docs/divide-width\n             */\n            'divide-x': [{ 'divide-x': [borderWidth] }],\n            /**\n             * Divide Width X Reverse\n             * @see https://tailwindcss.com/docs/divide-width\n             */\n            'divide-x-reverse': ['divide-x-reverse'],\n            /**\n             * Divide Width Y\n             * @see https://tailwindcss.com/docs/divide-width\n             */\n            'divide-y': [{ 'divide-y': [borderWidth] }],\n            /**\n             * Divide Width Y Reverse\n             * @see https://tailwindcss.com/docs/divide-width\n             */\n            'divide-y-reverse': ['divide-y-reverse'],\n            /**\n             * Divide Opacity\n             * @see https://tailwindcss.com/docs/divide-opacity\n             */\n            'divide-opacity': [{ 'divide-opacity': [opacity] }],\n            /**\n             * Divide Style\n             * @see https://tailwindcss.com/docs/divide-style\n             */\n            'divide-style': [{ divide: getLineStyles() }],\n            /**\n             * Border Color\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color': [{ border: [borderColor] }],\n            /**\n             * Border Color X\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-x': [{ 'border-x': [borderColor] }],\n            /**\n             * Border Color Y\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-y': [{ 'border-y': [borderColor] }],\n            /**\n             * Border Color S\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-s': [{ 'border-s': [borderColor] }],\n            /**\n             * Border Color E\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-e': [{ 'border-e': [borderColor] }],\n            /**\n             * Border Color Top\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-t': [{ 'border-t': [borderColor] }],\n            /**\n             * Border Color Right\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-r': [{ 'border-r': [borderColor] }],\n            /**\n             * Border Color Bottom\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-b': [{ 'border-b': [borderColor] }],\n            /**\n             * Border Color Left\n             * @see https://tailwindcss.com/docs/border-color\n             */\n            'border-color-l': [{ 'border-l': [borderColor] }],\n            /**\n             * Divide Color\n             * @see https://tailwindcss.com/docs/divide-color\n             */\n            'divide-color': [{ divide: [borderColor] }],\n            /**\n             * Outline Style\n             * @see https://tailwindcss.com/docs/outline-style\n             */\n            'outline-style': [{ outline: ['', ...getLineStyles()] }],\n            /**\n             * Outline Offset\n             * @see https://tailwindcss.com/docs/outline-offset\n             */\n            'outline-offset': [{ 'outline-offset': [isLength, isArbitraryValue] }],\n            /**\n             * Outline Width\n             * @see https://tailwindcss.com/docs/outline-width\n             */\n            'outline-w': [{ outline: [isLength, isArbitraryLength] }],\n            /**\n             * Outline Color\n             * @see https://tailwindcss.com/docs/outline-color\n             */\n            'outline-color': [{ outline: [colors] }],\n            /**\n             * Ring Width\n             * @see https://tailwindcss.com/docs/ring-width\n             */\n            'ring-w': [{ ring: getLengthWithEmptyAndArbitrary() }],\n            /**\n             * Ring Width Inset\n             * @see https://tailwindcss.com/docs/ring-width\n             */\n            'ring-w-inset': ['ring-inset'],\n            /**\n             * Ring Color\n             * @see https://tailwindcss.com/docs/ring-color\n             */\n            'ring-color': [{ ring: [colors] }],\n            /**\n             * Ring Opacity\n             * @see https://tailwindcss.com/docs/ring-opacity\n             */\n            'ring-opacity': [{ 'ring-opacity': [opacity] }],\n            /**\n             * Ring Offset Width\n             * @see https://tailwindcss.com/docs/ring-offset-width\n             */\n            'ring-offset-w': [{ 'ring-offset': [isLength, isArbitraryLength] }],\n            /**\n             * Ring Offset Color\n             * @see https://tailwindcss.com/docs/ring-offset-color\n             */\n            'ring-offset-color': [{ 'ring-offset': [colors] }],\n            // Effects\n            /**\n             * Box Shadow\n             * @see https://tailwindcss.com/docs/box-shadow\n             */\n            shadow: [{ shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow] }],\n            /**\n             * Box Shadow Color\n             * @see https://tailwindcss.com/docs/box-shadow-color\n             */\n            'shadow-color': [{ shadow: [isAny] }],\n            /**\n             * Opacity\n             * @see https://tailwindcss.com/docs/opacity\n             */\n            opacity: [{ opacity: [opacity] }],\n            /**\n             * Mix Blend Mode\n             * @see https://tailwindcss.com/docs/mix-blend-mode\n             */\n            'mix-blend': [{ 'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker'] }],\n            /**\n             * Background Blend Mode\n             * @see https://tailwindcss.com/docs/background-blend-mode\n             */\n            'bg-blend': [{ 'bg-blend': getBlendModes() }],\n            // Filters\n            /**\n             * Filter\n             * @deprecated since Tailwind CSS v3.0.0\n             * @see https://tailwindcss.com/docs/filter\n             */\n            filter: [{ filter: ['', 'none'] }],\n            /**\n             * Blur\n             * @see https://tailwindcss.com/docs/blur\n             */\n            blur: [{ blur: [blur] }],\n            /**\n             * Brightness\n             * @see https://tailwindcss.com/docs/brightness\n             */\n            brightness: [{ brightness: [brightness] }],\n            /**\n             * Contrast\n             * @see https://tailwindcss.com/docs/contrast\n             */\n            contrast: [{ contrast: [contrast] }],\n            /**\n             * Drop Shadow\n             * @see https://tailwindcss.com/docs/drop-shadow\n             */\n            'drop-shadow': [{ 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue] }],\n            /**\n             * Grayscale\n             * @see https://tailwindcss.com/docs/grayscale\n             */\n            grayscale: [{ grayscale: [grayscale] }],\n            /**\n             * Hue Rotate\n             * @see https://tailwindcss.com/docs/hue-rotate\n             */\n            'hue-rotate': [{ 'hue-rotate': [hueRotate] }],\n            /**\n             * Invert\n             * @see https://tailwindcss.com/docs/invert\n             */\n            invert: [{ invert: [invert] }],\n            /**\n             * Saturate\n             * @see https://tailwindcss.com/docs/saturate\n             */\n            saturate: [{ saturate: [saturate] }],\n            /**\n             * Sepia\n             * @see https://tailwindcss.com/docs/sepia\n             */\n            sepia: [{ sepia: [sepia] }],\n            /**\n             * Backdrop Filter\n             * @deprecated since Tailwind CSS v3.0.0\n             * @see https://tailwindcss.com/docs/backdrop-filter\n             */\n            'backdrop-filter': [{ 'backdrop-filter': ['', 'none'] }],\n            /**\n             * Backdrop Blur\n             * @see https://tailwindcss.com/docs/backdrop-blur\n             */\n            'backdrop-blur': [{ 'backdrop-blur': [blur] }],\n            /**\n             * Backdrop Brightness\n             * @see https://tailwindcss.com/docs/backdrop-brightness\n             */\n            'backdrop-brightness': [{ 'backdrop-brightness': [brightness] }],\n            /**\n             * Backdrop Contrast\n             * @see https://tailwindcss.com/docs/backdrop-contrast\n             */\n            'backdrop-contrast': [{ 'backdrop-contrast': [contrast] }],\n            /**\n             * Backdrop Grayscale\n             * @see https://tailwindcss.com/docs/backdrop-grayscale\n             */\n            'backdrop-grayscale': [{ 'backdrop-grayscale': [grayscale] }],\n            /**\n             * Backdrop Hue Rotate\n             * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n             */\n            'backdrop-hue-rotate': [{ 'backdrop-hue-rotate': [hueRotate] }],\n            /**\n             * Backdrop Invert\n             * @see https://tailwindcss.com/docs/backdrop-invert\n             */\n            'backdrop-invert': [{ 'backdrop-invert': [invert] }],\n            /**\n             * Backdrop Opacity\n             * @see https://tailwindcss.com/docs/backdrop-opacity\n             */\n            'backdrop-opacity': [{ 'backdrop-opacity': [opacity] }],\n            /**\n             * Backdrop Saturate\n             * @see https://tailwindcss.com/docs/backdrop-saturate\n             */\n            'backdrop-saturate': [{ 'backdrop-saturate': [saturate] }],\n            /**\n             * Backdrop Sepia\n             * @see https://tailwindcss.com/docs/backdrop-sepia\n             */\n            'backdrop-sepia': [{ 'backdrop-sepia': [sepia] }],\n            // Tables\n            /**\n             * Border Collapse\n             * @see https://tailwindcss.com/docs/border-collapse\n             */\n            'border-collapse': [{ border: ['collapse', 'separate'] }],\n            /**\n             * Border Spacing\n             * @see https://tailwindcss.com/docs/border-spacing\n             */\n            'border-spacing': [{ 'border-spacing': [borderSpacing] }],\n            /**\n             * Border Spacing X\n             * @see https://tailwindcss.com/docs/border-spacing\n             */\n            'border-spacing-x': [{ 'border-spacing-x': [borderSpacing] }],\n            /**\n             * Border Spacing Y\n             * @see https://tailwindcss.com/docs/border-spacing\n             */\n            'border-spacing-y': [{ 'border-spacing-y': [borderSpacing] }],\n            /**\n             * Table Layout\n             * @see https://tailwindcss.com/docs/table-layout\n             */\n            'table-layout': [{ table: ['auto', 'fixed'] }],\n            /**\n             * Caption Side\n             * @see https://tailwindcss.com/docs/caption-side\n             */\n            caption: [{ caption: ['top', 'bottom'] }],\n            // Transitions and Animation\n            /**\n             * Tranisition Property\n             * @see https://tailwindcss.com/docs/transition-property\n             */\n            transition: [\n                {\n                    transition: [\n                        'none',\n                        'all',\n                        '',\n                        'colors',\n                        'opacity',\n                        'shadow',\n                        'transform',\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * Transition Duration\n             * @see https://tailwindcss.com/docs/transition-duration\n             */\n            duration: [{ duration: getNumberAndArbitrary() }],\n            /**\n             * Transition Timing Function\n             * @see https://tailwindcss.com/docs/transition-timing-function\n             */\n            ease: [{ ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue] }],\n            /**\n             * Transition Delay\n             * @see https://tailwindcss.com/docs/transition-delay\n             */\n            delay: [{ delay: getNumberAndArbitrary() }],\n            /**\n             * Animation\n             * @see https://tailwindcss.com/docs/animation\n             */\n            animate: [{ animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue] }],\n            // Transforms\n            /**\n             * Transform\n             * @see https://tailwindcss.com/docs/transform\n             */\n            transform: [{ transform: ['', 'gpu', 'none'] }],\n            /**\n             * Scale\n             * @see https://tailwindcss.com/docs/scale\n             */\n            scale: [{ scale: [scale] }],\n            /**\n             * Scale X\n             * @see https://tailwindcss.com/docs/scale\n             */\n            'scale-x': [{ 'scale-x': [scale] }],\n            /**\n             * Scale Y\n             * @see https://tailwindcss.com/docs/scale\n             */\n            'scale-y': [{ 'scale-y': [scale] }],\n            /**\n             * Rotate\n             * @see https://tailwindcss.com/docs/rotate\n             */\n            rotate: [{ rotate: [isInteger, isArbitraryValue] }],\n            /**\n             * Translate X\n             * @see https://tailwindcss.com/docs/translate\n             */\n            'translate-x': [{ 'translate-x': [translate] }],\n            /**\n             * Translate Y\n             * @see https://tailwindcss.com/docs/translate\n             */\n            'translate-y': [{ 'translate-y': [translate] }],\n            /**\n             * Skew X\n             * @see https://tailwindcss.com/docs/skew\n             */\n            'skew-x': [{ 'skew-x': [skew] }],\n            /**\n             * Skew Y\n             * @see https://tailwindcss.com/docs/skew\n             */\n            'skew-y': [{ 'skew-y': [skew] }],\n            /**\n             * Transform Origin\n             * @see https://tailwindcss.com/docs/transform-origin\n             */\n            'transform-origin': [\n                {\n                    origin: [\n                        'center',\n                        'top',\n                        'top-right',\n                        'right',\n                        'bottom-right',\n                        'bottom',\n                        'bottom-left',\n                        'left',\n                        'top-left',\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            // Interactivity\n            /**\n             * Accent Color\n             * @see https://tailwindcss.com/docs/accent-color\n             */\n            accent: [{ accent: ['auto', colors] }],\n            /**\n             * Appearance\n             * @see https://tailwindcss.com/docs/appearance\n             */\n            appearance: [{ appearance: ['none', 'auto'] }],\n            /**\n             * Cursor\n             * @see https://tailwindcss.com/docs/cursor\n             */\n            cursor: [\n                {\n                    cursor: [\n                        'auto',\n                        'default',\n                        'pointer',\n                        'wait',\n                        'text',\n                        'move',\n                        'help',\n                        'not-allowed',\n                        'none',\n                        'context-menu',\n                        'progress',\n                        'cell',\n                        'crosshair',\n                        'vertical-text',\n                        'alias',\n                        'copy',\n                        'no-drop',\n                        'grab',\n                        'grabbing',\n                        'all-scroll',\n                        'col-resize',\n                        'row-resize',\n                        'n-resize',\n                        'e-resize',\n                        's-resize',\n                        'w-resize',\n                        'ne-resize',\n                        'nw-resize',\n                        'se-resize',\n                        'sw-resize',\n                        'ew-resize',\n                        'ns-resize',\n                        'nesw-resize',\n                        'nwse-resize',\n                        'zoom-in',\n                        'zoom-out',\n                        isArbitraryValue,\n                    ],\n                },\n            ],\n            /**\n             * Caret Color\n             * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n             */\n            'caret-color': [{ caret: [colors] }],\n            /**\n             * Pointer Events\n             * @see https://tailwindcss.com/docs/pointer-events\n             */\n            'pointer-events': [{ 'pointer-events': ['none', 'auto'] }],\n            /**\n             * Resize\n             * @see https://tailwindcss.com/docs/resize\n             */\n            resize: [{ resize: ['none', 'y', 'x', ''] }],\n            /**\n             * Scroll Behavior\n             * @see https://tailwindcss.com/docs/scroll-behavior\n             */\n            'scroll-behavior': [{ scroll: ['auto', 'smooth'] }],\n            /**\n             * Scroll Margin\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-m': [{ 'scroll-m': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin X\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-mx': [{ 'scroll-mx': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Y\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-my': [{ 'scroll-my': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Start\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-ms': [{ 'scroll-ms': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin End\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-me': [{ 'scroll-me': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Top\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-mt': [{ 'scroll-mt': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Right\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-mr': [{ 'scroll-mr': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Bottom\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-mb': [{ 'scroll-mb': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Margin Left\n             * @see https://tailwindcss.com/docs/scroll-margin\n             */\n            'scroll-ml': [{ 'scroll-ml': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-p': [{ 'scroll-p': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding X\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-px': [{ 'scroll-px': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Y\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-py': [{ 'scroll-py': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Start\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-ps': [{ 'scroll-ps': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding End\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-pe': [{ 'scroll-pe': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Top\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-pt': [{ 'scroll-pt': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Right\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-pr': [{ 'scroll-pr': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Bottom\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-pb': [{ 'scroll-pb': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Padding Left\n             * @see https://tailwindcss.com/docs/scroll-padding\n             */\n            'scroll-pl': [{ 'scroll-pl': getSpacingWithArbitrary() }],\n            /**\n             * Scroll Snap Align\n             * @see https://tailwindcss.com/docs/scroll-snap-align\n             */\n            'snap-align': [{ snap: ['start', 'end', 'center', 'align-none'] }],\n            /**\n             * Scroll Snap Stop\n             * @see https://tailwindcss.com/docs/scroll-snap-stop\n             */\n            'snap-stop': [{ snap: ['normal', 'always'] }],\n            /**\n             * Scroll Snap Type\n             * @see https://tailwindcss.com/docs/scroll-snap-type\n             */\n            'snap-type': [{ snap: ['none', 'x', 'y', 'both'] }],\n            /**\n             * Scroll Snap Type Strictness\n             * @see https://tailwindcss.com/docs/scroll-snap-type\n             */\n            'snap-strictness': [{ snap: ['mandatory', 'proximity'] }],\n            /**\n             * Touch Action\n             * @see https://tailwindcss.com/docs/touch-action\n             */\n            touch: [\n                {\n                    touch: ['auto', 'none', 'manipulation'],\n                },\n            ],\n            /**\n             * Touch Action X\n             * @see https://tailwindcss.com/docs/touch-action\n             */\n            'touch-x': [\n                {\n                    'touch-pan': ['x', 'left', 'right'],\n                },\n            ],\n            /**\n             * Touch Action Y\n             * @see https://tailwindcss.com/docs/touch-action\n             */\n            'touch-y': [\n                {\n                    'touch-pan': ['y', 'up', 'down'],\n                },\n            ],\n            /**\n             * Touch Action Pinch Zoom\n             * @see https://tailwindcss.com/docs/touch-action\n             */\n            'touch-pz': ['touch-pinch-zoom'],\n            /**\n             * User Select\n             * @see https://tailwindcss.com/docs/user-select\n             */\n            select: [{ select: ['none', 'text', 'all', 'auto'] }],\n            /**\n             * Will Change\n             * @see https://tailwindcss.com/docs/will-change\n             */\n            'will-change': [\n                { 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue] },\n            ],\n            // SVG\n            /**\n             * Fill\n             * @see https://tailwindcss.com/docs/fill\n             */\n            fill: [{ fill: [colors, 'none'] }],\n            /**\n             * Stroke Width\n             * @see https://tailwindcss.com/docs/stroke-width\n             */\n            'stroke-w': [{ stroke: [isLength, isArbitraryLength, isArbitraryNumber] }],\n            /**\n             * Stroke\n             * @see https://tailwindcss.com/docs/stroke\n             */\n            stroke: [{ stroke: [colors, 'none'] }],\n            // Accessibility\n            /**\n             * Screen Readers\n             * @see https://tailwindcss.com/docs/screen-readers\n             */\n            sr: ['sr-only', 'not-sr-only'],\n            /**\n             * Forced Color Adjust\n             * @see https://tailwindcss.com/docs/forced-color-adjust\n             */\n            'forced-color-adjust': [{ 'forced-color-adjust': ['auto', 'none'] }],\n        },\n        conflictingClassGroups: {\n            overflow: ['overflow-x', 'overflow-y'],\n            overscroll: ['overscroll-x', 'overscroll-y'],\n            inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n            'inset-x': ['right', 'left'],\n            'inset-y': ['top', 'bottom'],\n            flex: ['basis', 'grow', 'shrink'],\n            gap: ['gap-x', 'gap-y'],\n            p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n            px: ['pr', 'pl'],\n            py: ['pt', 'pb'],\n            m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n            mx: ['mr', 'ml'],\n            my: ['mt', 'mb'],\n            size: ['w', 'h'],\n            'font-size': ['leading'],\n            'fvn-normal': [\n                'fvn-ordinal',\n                'fvn-slashed-zero',\n                'fvn-figure',\n                'fvn-spacing',\n                'fvn-fraction',\n            ],\n            'fvn-ordinal': ['fvn-normal'],\n            'fvn-slashed-zero': ['fvn-normal'],\n            'fvn-figure': ['fvn-normal'],\n            'fvn-spacing': ['fvn-normal'],\n            'fvn-fraction': ['fvn-normal'],\n            'line-clamp': ['display', 'overflow'],\n            rounded: [\n                'rounded-s',\n                'rounded-e',\n                'rounded-t',\n                'rounded-r',\n                'rounded-b',\n                'rounded-l',\n                'rounded-ss',\n                'rounded-se',\n                'rounded-ee',\n                'rounded-es',\n                'rounded-tl',\n                'rounded-tr',\n                'rounded-br',\n                'rounded-bl',\n            ],\n            'rounded-s': ['rounded-ss', 'rounded-es'],\n            'rounded-e': ['rounded-se', 'rounded-ee'],\n            'rounded-t': ['rounded-tl', 'rounded-tr'],\n            'rounded-r': ['rounded-tr', 'rounded-br'],\n            'rounded-b': ['rounded-br', 'rounded-bl'],\n            'rounded-l': ['rounded-tl', 'rounded-bl'],\n            'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n            'border-w': [\n                'border-w-s',\n                'border-w-e',\n                'border-w-t',\n                'border-w-r',\n                'border-w-b',\n                'border-w-l',\n            ],\n            'border-w-x': ['border-w-r', 'border-w-l'],\n            'border-w-y': ['border-w-t', 'border-w-b'],\n            'border-color': [\n                'border-color-s',\n                'border-color-e',\n                'border-color-t',\n                'border-color-r',\n                'border-color-b',\n                'border-color-l',\n            ],\n            'border-color-x': ['border-color-r', 'border-color-l'],\n            'border-color-y': ['border-color-t', 'border-color-b'],\n            'scroll-m': [\n                'scroll-mx',\n                'scroll-my',\n                'scroll-ms',\n                'scroll-me',\n                'scroll-mt',\n                'scroll-mr',\n                'scroll-mb',\n                'scroll-ml',\n            ],\n            'scroll-mx': ['scroll-mr', 'scroll-ml'],\n            'scroll-my': ['scroll-mt', 'scroll-mb'],\n            'scroll-p': [\n                'scroll-px',\n                'scroll-py',\n                'scroll-ps',\n                'scroll-pe',\n                'scroll-pt',\n                'scroll-pr',\n                'scroll-pb',\n                'scroll-pl',\n            ],\n            'scroll-px': ['scroll-pr', 'scroll-pl'],\n            'scroll-py': ['scroll-pt', 'scroll-pb'],\n            touch: ['touch-x', 'touch-y', 'touch-pz'],\n            'touch-x': ['touch'],\n            'touch-y': ['touch'],\n            'touch-pz': ['touch'],\n        },\n        conflictingClassGroupModifiers: {\n            'font-size': ['leading'],\n        },\n    } as const satisfies Config<DefaultClassGroupIds, DefaultThemeGroupIds>\n}\n","import { AnyConfig, ConfigExtension } from './types'\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nexport const mergeConfigs = <ClassGroupIds extends string, ThemeGroupIds extends string = never>(\n    baseConfig: AnyConfig,\n    {\n        cacheSize,\n        prefix,\n        separator,\n        experimentalParseClassName,\n        extend = {},\n        override = {},\n    }: ConfigExtension<ClassGroupIds, ThemeGroupIds>,\n) => {\n    overrideProperty(baseConfig, 'cacheSize', cacheSize)\n    overrideProperty(baseConfig, 'prefix', prefix)\n    overrideProperty(baseConfig, 'separator', separator)\n    overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName)\n\n    for (const configKey in override) {\n        overrideConfigProperties(\n            baseConfig[configKey as keyof typeof override],\n            override[configKey as keyof typeof override],\n        )\n    }\n\n    for (const key in extend) {\n        mergeConfigProperties(\n            baseConfig[key as keyof typeof extend],\n            extend[key as keyof typeof extend],\n        )\n    }\n\n    return baseConfig\n}\n\nconst overrideProperty = <T extends object, K extends keyof T>(\n    baseObject: T,\n    overrideKey: K,\n    overrideValue: T[K] | undefined,\n) => {\n    if (overrideValue !== undefined) {\n        baseObject[overrideKey] = overrideValue\n    }\n}\n\nconst overrideConfigProperties = (\n    baseObject: Partial<Record<string, readonly unknown[]>>,\n    overrideObject: Partial<Record<string, readonly unknown[]>> | undefined,\n) => {\n    if (overrideObject) {\n        for (const key in overrideObject) {\n            overrideProperty(baseObject, key, overrideObject[key])\n        }\n    }\n}\n\nconst mergeConfigProperties = (\n    baseObject: Partial<Record<string, readonly unknown[]>>,\n    mergeObject: Partial<Record<string, readonly unknown[]>> | undefined,\n) => {\n    if (mergeObject) {\n        for (const key in mergeObject) {\n            const mergeValue = mergeObject[key]\n\n            if (mergeValue !== undefined) {\n                baseObject[key] = (baseObject[key] || []).concat(mergeValue)\n            }\n        }\n    }\n}\n","import { createTailwindMerge } from './create-tailwind-merge'\nimport { getDefaultConfig } from './default-config'\nimport { mergeConfigs } from './merge-configs'\nimport { AnyConfig, ConfigExtension, DefaultClassGroupIds, DefaultThemeGroupIds } from './types'\n\ntype CreateConfigSubsequent = (config: AnyConfig) => AnyConfig\n\nexport const extendTailwindMerge = <\n    AdditionalClassGroupIds extends string = never,\n    AdditionalThemeGroupIds extends string = never,\n>(\n    configExtension:\n        | ConfigExtension<\n              DefaultClassGroupIds | AdditionalClassGroupIds,\n              DefaultThemeGroupIds | AdditionalThemeGroupIds\n          >\n        | CreateConfigSubsequent,\n    ...createConfig: CreateConfigSubsequent[]\n) =>\n    typeof configExtension === 'function'\n        ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig)\n        : createTailwindMerge(\n              () => mergeConfigs(getDefaultConfig(), configExtension),\n              ...createConfig,\n          )\n","import { createTailwindMerge } from './create-tailwind-merge'\nimport { getDefaultConfig } from './default-config'\n\nexport const twMerge = createTailwindMerge(getDefaultConfig)\n","import { e, b, g, c, f, a, h } from './chunk-I2QGXAA3.js';\nimport { twMerge, extendTailwindMerge } from 'tailwind-merge';\n\nvar ie={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},x=s=>s||void 0,N=(...s)=>x(e(s).filter(Boolean).join(\" \")),R=null,v={},q=!1,M=(...s)=>b$1=>b$1.twMerge?((!R||q)&&(q=!1,R=b(v)?twMerge:extendTailwindMerge({...v,extend:{theme:v.theme,classGroups:v.classGroups,conflictingClassGroupModifiers:v.conflictingClassGroupModifiers,conflictingClassGroups:v.conflictingClassGroups,...v.extend}})),x(R(N(s)))):N(s),_=(s,b)=>{for(let e in b)s.hasOwnProperty(e)?s[e]=N(s[e],b[e]):s[e]=b[e];return s},ce=(s,b$1)=>{let{extend:e=null,slots:O={},variants:U={},compoundVariants:W=[],compoundSlots:C=[],defaultVariants:z={}}=s,m={...ie,...b$1},k=e!=null&&e.base?N(e.base,s==null?void 0:s.base):s==null?void 0:s.base,g$1=e!=null&&e.variants&&!b(e.variants)?g(U,e.variants):U,w=e!=null&&e.defaultVariants&&!b(e.defaultVariants)?{...e.defaultVariants,...z}:z;!b(m.twMergeConfig)&&!c(m.twMergeConfig,v)&&(q=!0,v=m.twMergeConfig);let S=b(e==null?void 0:e.slots),T=b(O)?{}:{base:N(s==null?void 0:s.base,S&&(e==null?void 0:e.base)),...O},j=S?T:_({...e==null?void 0:e.slots},b(T)?{base:s==null?void 0:s.base}:T),h$1=b(e==null?void 0:e.compoundVariants)?W:f(e==null?void 0:e.compoundVariants,W),V=l=>{if(b(g$1)&&b(O)&&S)return M(k,l==null?void 0:l.class,l==null?void 0:l.className)(m);if(h$1&&!Array.isArray(h$1))throw new TypeError(`The \"compoundVariants\" prop must be an array. Received: ${typeof h$1}`);if(C&&!Array.isArray(C))throw new TypeError(`The \"compoundSlots\" prop must be an array. Received: ${typeof C}`);let P=(a,n,t=[],i)=>{let r=t;if(typeof n==\"string\")r=r.concat(h(n).split(\" \").map(o=>`${a}:${o}`));else if(Array.isArray(n))r=r.concat(n.reduce((o,c)=>o.concat(`${a}:${c}`),[]));else if(typeof n==\"object\"&&typeof i==\"string\"){for(let o in n)if(n.hasOwnProperty(o)&&o===i){let c=n[o];if(c&&typeof c==\"string\"){let u=h(c);r[i]?r[i]=r[i].concat(u.split(\" \").map(f=>`${a}:${f}`)):r[i]=u.split(\" \").map(f=>`${a}:${f}`);}else Array.isArray(c)&&c.length>0&&(r[i]=c.reduce((u,f)=>u.concat(`${a}:${f}`),[]));}}return r},D=(a$1,n=g$1,t=null,i=null)=>{var L;let r=n[a$1];if(!r||b(r))return null;let o=(L=i==null?void 0:i[a$1])!=null?L:l==null?void 0:l[a$1];if(o===null)return null;let c=a(o),u=Array.isArray(m.responsiveVariants)&&m.responsiveVariants.length>0||m.responsiveVariants===!0,f=w==null?void 0:w[a$1],d=[];if(typeof c==\"object\"&&u)for(let[E,Q]of Object.entries(c)){let ne=r[Q];if(E===\"initial\"){f=Q;continue}Array.isArray(m.responsiveVariants)&&!m.responsiveVariants.includes(E)||(d=P(E,ne,d,t));}let $=c!=null&&typeof c!=\"object\"?c:a(f),A=r[$||\"false\"];return typeof d==\"object\"&&typeof t==\"string\"&&d[t]?_(d,A):d.length>0?(d.push(A),t===\"base\"?d.join(\" \"):d):A},p=()=>g$1?Object.keys(g$1).map(a=>D(a,g$1)):null,ee=(a,n)=>{if(!g$1||typeof g$1!=\"object\")return null;let t=new Array;for(let i in g$1){let r=D(i,g$1,a,n),o=a===\"base\"&&typeof r==\"string\"?r:r&&r[a];o&&(t[t.length]=o);}return t},H={};for(let a in l)l[a]!==void 0&&(H[a]=l[a]);let I=(a,n)=>{var i;let t=typeof(l==null?void 0:l[a])==\"object\"?{[a]:(i=l[a])==null?void 0:i.initial}:{};return {...w,...H,...t,...n}},J=(a=[],n)=>{let t=[];for(let{class:i,className:r,...o}of a){let c=!0;for(let[u,f]of Object.entries(o)){let d=I(u,n)[u];if(Array.isArray(f)){if(!f.includes(d)){c=!1;break}}else {let $=A=>A==null||A===!1;if($(f)&&$(d))continue;if(d!==f){c=!1;break}}}c&&(i&&t.push(i),r&&t.push(r));}return t},te=a=>{let n=J(h$1,a);if(!Array.isArray(n))return n;let t={};for(let i of n)if(typeof i==\"string\"&&(t.base=M(t.base,i)(m)),typeof i==\"object\")for(let[r,o]of Object.entries(i))t[r]=M(t[r],o)(m);return t},ae=a=>{if(C.length<1)return null;let n={};for(let{slots:t=[],class:i,className:r,...o}of C){if(!b(o)){let c=!0;for(let u of Object.keys(o)){let f=I(u,a)[u];if(f===void 0||(Array.isArray(o[u])?!o[u].includes(f):o[u]!==f)){c=!1;break}}if(!c)continue}for(let c of t)n[c]=n[c]||[],n[c].push([i,r]);}return n};if(!b(O)||!S){let a={};if(typeof j==\"object\"&&!b(j))for(let n of Object.keys(j))a[n]=t=>{var i,r;return M(j[n],ee(n,t),((i=te(t))!=null?i:[])[n],((r=ae(t))!=null?r:[])[n],t==null?void 0:t.class,t==null?void 0:t.className)(m)};return a}return M(k,p(),J(h$1),l==null?void 0:l.class,l==null?void 0:l.className)(m)},K=()=>{if(!(!g$1||typeof g$1!=\"object\"))return Object.keys(g$1)};return V.variantKeys=K(),V.extend=e,V.base=k,V.slots=j,V.variants=g$1,V.defaultVariants=w,V.compoundSlots=C,V.compoundVariants=h$1,V},fe=s=>(b,e)=>ce(b,e?g(s,e):s);\n\nexport { M as cn, N as cnBase, fe as createTV, ie as defaultConfig, ce as tv, x as voidEmpty };\n","import {\n  twMergeConfig\n} from \"./chunk-GIXI35A3.mjs\";\n\n// src/utils/tv.ts\nimport { tv as tvBase } from \"tailwind-variants\";\nvar tv = (options, config) => {\n  var _a, _b, _c;\n  return tvBase(options, {\n    ...config,\n    twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,\n    twMergeConfig: {\n      ...config == null ? void 0 : config.twMergeConfig,\n      theme: {\n        ...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,\n        ...twMergeConfig.theme\n      },\n      classGroups: {\n        ...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,\n        ...twMergeConfig.classGroups\n      }\n    }\n  });\n};\n\nexport {\n  tv\n};\n","import {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\n\n// src/components/spacer.ts\nvar spacer = tv({\n  base: \"w-px h-px inline-block\",\n  variants: {\n    isInline: {\n      true: \"inline-block\",\n      false: \"block\"\n    }\n  },\n  defaultVariants: {\n    isInline: false\n  }\n});\n\nexport {\n  spacer\n};\n","import {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\n\n// src/components/spinner.ts\nvar spinner = tv({\n  slots: {\n    base: \"relative inline-flex flex-col gap-2 items-center justify-center\",\n    wrapper: \"relative flex\",\n    label: \"text-foreground dark:text-foreground-dark font-regular\",\n    circle1: \"absolute w-full h-full rounded-full\",\n    circle2: \"absolute w-full h-full rounded-full\",\n    dots: \"relative rounded-full mx-auto\",\n    spinnerBars: [\n      \"absolute\",\n      \"animate-fade-out\",\n      \"rounded-full\",\n      \"w-[25%]\",\n      \"h-[8%]\",\n      \"left-[calc(37.5%)]\",\n      \"top-[calc(46%)]\",\n      \"spinner-bar-animation\"\n    ]\n  },\n  variants: {\n    size: {\n      sm: {\n        wrapper: \"w-5 h-5\",\n        circle1: \"border-2\",\n        circle2: \"border-2\",\n        dots: \"size-1\",\n        label: \"text-small\"\n      },\n      md: {\n        wrapper: \"w-8 h-8\",\n        circle1: \"border-3\",\n        circle2: \"border-3\",\n        dots: \"size-1.5\",\n        label: \"text-medium\"\n      },\n      lg: {\n        wrapper: \"w-10 h-10\",\n        circle1: \"border-3\",\n        circle2: \"border-3\",\n        dots: \"size-2\",\n        label: \"text-large\"\n      }\n    },\n    color: {\n      current: {\n        circle1: \"border-b-current\",\n        circle2: \"border-b-current\",\n        dots: \"bg-current\",\n        spinnerBars: \"bg-current\"\n      },\n      white: {\n        circle1: \"border-b-white\",\n        circle2: \"border-b-white\",\n        dots: \"bg-white\",\n        spinnerBars: \"bg-white\"\n      },\n      default: {\n        circle1: \"border-b-default\",\n        circle2: \"border-b-default\",\n        dots: \"bg-default\",\n        spinnerBars: \"bg-default\"\n      },\n      primary: {\n        circle1: \"border-b-primary\",\n        circle2: \"border-b-primary\",\n        dots: \"bg-primary\",\n        spinnerBars: \"bg-primary\"\n      },\n      secondary: {\n        circle1: \"border-b-secondary\",\n        circle2: \"border-b-secondary\",\n        dots: \"bg-secondary\",\n        spinnerBars: \"bg-secondary\"\n      },\n      success: {\n        circle1: \"border-b-success\",\n        circle2: \"border-b-success\",\n        dots: \"bg-success\",\n        spinnerBars: \"bg-success\"\n      },\n      warning: {\n        circle1: \"border-b-warning\",\n        circle2: \"border-b-warning\",\n        dots: \"bg-warning\",\n        spinnerBars: \"bg-warning\"\n      },\n      danger: {\n        circle1: \"border-b-danger\",\n        circle2: \"border-b-danger\",\n        dots: \"bg-danger\",\n        spinnerBars: \"bg-danger\"\n      }\n    },\n    labelColor: {\n      foreground: {\n        label: \"text-foreground\"\n      },\n      primary: {\n        label: \"text-primary\"\n      },\n      secondary: {\n        label: \"text-secondary\"\n      },\n      success: {\n        label: \"text-success\"\n      },\n      warning: {\n        label: \"text-warning\"\n      },\n      danger: {\n        label: \"text-danger\"\n      }\n    },\n    variant: {\n      default: {\n        circle1: [\n          \"animate-spinner-ease-spin\",\n          \"border-solid\",\n          \"border-t-transparent\",\n          \"border-l-transparent\",\n          \"border-r-transparent\"\n        ],\n        circle2: [\n          \"opacity-75\",\n          \"animate-spinner-linear-spin\",\n          \"border-dotted\",\n          \"border-t-transparent\",\n          \"border-l-transparent\",\n          \"border-r-transparent\"\n        ]\n      },\n      gradient: {\n        circle1: [\n          \"border-0\",\n          \"bg-gradient-to-b\",\n          \"from-transparent\",\n          \"via-transparent\",\n          \"to-primary\",\n          \"animate-spinner-linear-spin\",\n          \"[animation-duration:1s]\",\n          \"[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]\"\n        ],\n        circle2: [\"hidden\"]\n      },\n      wave: {\n        wrapper: \"translate-y-3/4\",\n        dots: [\"animate-sway\", \"spinner-dot-animation\"]\n      },\n      dots: {\n        wrapper: \"translate-y-2/4\",\n        dots: [\"animate-blink\", \"spinner-dot-blink-animation\"]\n      },\n      spinner: {},\n      simple: {\n        wrapper: \"text-foreground h-5 w-5 animate-spin\",\n        circle1: \"opacity-25\",\n        circle2: \"opacity-75\"\n      }\n    }\n  },\n  defaultVariants: {\n    size: \"md\",\n    color: \"primary\",\n    labelColor: \"foreground\",\n    variant: \"default\"\n  },\n  compoundVariants: [\n    { variant: \"gradient\", color: \"current\", class: { circle1: \"to-current\" } },\n    { variant: \"gradient\", color: \"white\", class: { circle1: \"to-white\" } },\n    { variant: \"gradient\", color: \"default\", class: { circle1: \"to-default\" } },\n    { variant: \"gradient\", color: \"primary\", class: { circle1: \"to-primary\" } },\n    { variant: \"gradient\", color: \"secondary\", class: { circle1: \"to-secondary\" } },\n    { variant: \"gradient\", color: \"success\", class: { circle1: \"to-success\" } },\n    { variant: \"gradient\", color: \"warning\", class: { circle1: \"to-warning\" } },\n    { variant: \"gradient\", color: \"danger\", class: { circle1: \"to-danger\" } },\n    {\n      variant: \"wave\",\n      size: \"sm\",\n      class: {\n        wrapper: \"w-5 h-5\"\n      }\n    },\n    {\n      variant: \"wave\",\n      size: \"md\",\n      class: {\n        wrapper: \"w-8 h-8\"\n      }\n    },\n    {\n      variant: \"wave\",\n      size: \"lg\",\n      class: {\n        wrapper: \"w-12 h-12\"\n      }\n    },\n    {\n      variant: \"dots\",\n      size: \"sm\",\n      class: {\n        wrapper: \"w-5 h-5\"\n      }\n    },\n    {\n      variant: \"dots\",\n      size: \"md\",\n      class: {\n        wrapper: \"w-8 h-8\"\n      }\n    },\n    {\n      variant: \"dots\",\n      size: \"lg\",\n      class: {\n        wrapper: \"w-12 h-12\"\n      }\n    },\n    // Simple variants\n    // Size\n    {\n      variant: \"simple\",\n      size: \"sm\",\n      class: {\n        wrapper: \"w-5 h-5\"\n      }\n    },\n    {\n      variant: \"simple\",\n      size: \"md\",\n      class: {\n        wrapper: \"w-8 h-8\"\n      }\n    },\n    {\n      variant: \"simple\",\n      size: \"lg\",\n      class: {\n        wrapper: \"w-12 h-12\"\n      }\n    },\n    // Color\n    {\n      variant: \"simple\",\n      color: \"current\",\n      class: {\n        wrapper: \"text-current\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"white\",\n      class: {\n        wrapper: \"text-white\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"default\",\n      class: {\n        wrapper: \"text-default\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"primary\",\n      class: {\n        wrapper: \"text-primary\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"secondary\",\n      class: {\n        wrapper: \"text-secondary\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"success\",\n      class: {\n        wrapper: \"text-success\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"warning\",\n      class: {\n        wrapper: \"text-warning\"\n      }\n    },\n    {\n      variant: \"simple\",\n      color: \"danger\",\n      class: {\n        wrapper: \"text-danger\"\n      }\n    }\n  ]\n});\n\nexport {\n  spinner\n};\n","// src/utils/classes.ts\nvar baseStyles = (prefix) => ({\n  color: `hsl(var(--${prefix}-foreground))`,\n  backgroundColor: `hsl(var(--${prefix}-background))`\n});\nvar focusVisibleClasses = [\n  \"focus-visible:z-10\",\n  \"focus-visible:outline-2\",\n  \"focus-visible:outline-focus\",\n  \"focus-visible:outline-offset-2\"\n];\nvar dataFocusVisibleClasses = [\n  \"outline-none\",\n  \"data-[focus-visible=true]:z-10\",\n  \"data-[focus-visible=true]:outline-2\",\n  \"data-[focus-visible=true]:outline-focus\",\n  \"data-[focus-visible=true]:outline-offset-2\"\n];\nvar groupDataFocusVisibleClasses = [\n  \"outline-none\",\n  \"group-data-[focus-visible=true]:z-10\",\n  \"group-data-[focus-visible=true]:ring-2\",\n  \"group-data-[focus-visible=true]:ring-focus\",\n  \"group-data-[focus-visible=true]:ring-offset-2\",\n  \"group-data-[focus-visible=true]:ring-offset-background\"\n];\nvar ringClasses = [\n  \"outline-none\",\n  \"ring-2\",\n  \"ring-focus\",\n  \"ring-offset-2\",\n  \"ring-offset-background\"\n];\nvar translateCenterClasses = [\n  \"absolute\",\n  \"top-1/2\",\n  \"left-1/2\",\n  \"-translate-x-1/2\",\n  \"-translate-y-1/2\"\n];\nvar absoluteFullClasses = [\"absolute\", \"inset-0\"];\nvar collapseAdjacentVariantBorders = {\n  default: [\"[&+.border-medium.border-default]:ms-[calc(theme(borderWidth.medium)*-1)]\"],\n  primary: [\"[&+.border-medium.border-primary]:ms-[calc(theme(borderWidth.medium)*-1)]\"],\n  secondary: [\"[&+.border-medium.border-secondary]:ms-[calc(theme(borderWidth.medium)*-1)]\"],\n  success: [\"[&+.border-medium.border-success]:ms-[calc(theme(borderWidth.medium)*-1)]\"],\n  warning: [\"[&+.border-medium.border-warning]:ms-[calc(theme(borderWidth.medium)*-1)]\"],\n  danger: [\"[&+.border-medium.border-danger]:ms-[calc(theme(borderWidth.medium)*-1)]\"]\n};\nvar hiddenInputClasses = [\n  // Font styles\n  \"font-inherit\",\n  \"text-[100%]\",\n  \"leading-[1.15]\",\n  // Reset margins and padding\n  \"m-0\",\n  \"p-0\",\n  // Overflow and box-sizing\n  \"overflow-visible\",\n  \"box-border\",\n  // Positioning & Hit area\n  \"absolute\",\n  \"top-0\",\n  \"w-full\",\n  \"h-full\",\n  // Opacity and z-index\n  \"opacity-[0.0001]\",\n  \"z-[1]\",\n  // Cursor\n  \"cursor-pointer\",\n  // Disabled state\n  \"disabled:cursor-default\"\n];\n\nexport {\n  baseStyles,\n  focusVisibleClasses,\n  dataFocusVisibleClasses,\n  groupDataFocusVisibleClasses,\n  ringClasses,\n  translateCenterClasses,\n  absoluteFullClasses,\n  collapseAdjacentVariantBorders,\n  hiddenInputClasses\n};\n","import {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\nimport {\n  dataFocusVisibleClasses\n} from \"./chunk-CNTMWM4F.mjs\";\n\n// src/components/table.ts\nvar table = tv({\n  slots: {\n    base: \"flex flex-col relative gap-4\",\n    wrapper: [\n      \"p-4\",\n      \"z-0\",\n      \"flex\",\n      \"flex-col\",\n      \"relative\",\n      \"justify-between\",\n      \"gap-4\",\n      \"shadow-small\",\n      \"bg-content1\",\n      \"overflow-auto\"\n    ],\n    table: \"min-w-full h-auto\",\n    thead: \"[&>tr]:first:rounded-lg\",\n    tbody: \"after:block\",\n    tr: [\"group/tr\", \"outline-none\", ...dataFocusVisibleClasses],\n    th: [\n      \"group/th\",\n      \"px-3\",\n      \"h-10\",\n      \"text-start\",\n      \"align-middle\",\n      \"bg-default-100\",\n      \"whitespace-nowrap\",\n      \"text-foreground-500\",\n      \"text-tiny\",\n      \"font-semibold\",\n      \"first:rounded-s-lg\",\n      \"last:rounded-e-lg\",\n      \"outline-none\",\n      \"data-[sortable=true]:cursor-pointer\",\n      \"data-[hover=true]:text-foreground-400\",\n      ...dataFocusVisibleClasses\n    ],\n    td: [\n      \"py-2\",\n      \"px-3\",\n      \"relative\",\n      \"align-middle\",\n      \"whitespace-normal\",\n      \"text-small\",\n      \"font-normal\",\n      \"outline-none\",\n      \"[&>*]:z-1\",\n      \"[&>*]:relative\",\n      ...dataFocusVisibleClasses,\n      // before content for selection\n      \"before:content-['']\",\n      \"before:absolute\",\n      \"before:z-0\",\n      \"before:inset-0\",\n      \"before:opacity-0\",\n      \"data-[selected=true]:before:opacity-100\",\n      // disabled\n      \"group-data-[disabled=true]/tr:text-foreground-300\",\n      \"group-data-[disabled=true]/tr:cursor-not-allowed\"\n    ],\n    tfoot: \"\",\n    sortIcon: [\n      \"ms-2\",\n      \"mb-px\",\n      \"opacity-0\",\n      \"text-inherit\",\n      \"inline-block\",\n      \"transition-transform-opacity\",\n      \"data-[visible=true]:opacity-100\",\n      \"group-data-[hover=true]/th:opacity-100\",\n      \"data-[direction=ascending]:rotate-180\"\n    ],\n    emptyWrapper: \"text-foreground-400 align-middle text-center h-40\",\n    loadingWrapper: \"absolute inset-0 flex items-center justify-center\"\n  },\n  variants: {\n    color: {\n      default: {\n        td: \"before:bg-default/60 data-[selected=true]:text-default-foreground\"\n      },\n      primary: {\n        td: \"before:bg-primary/20 data-[selected=true]:text-primary\"\n      },\n      secondary: {\n        td: \"before:bg-secondary/20 data-[selected=true]:text-secondary\"\n      },\n      success: {\n        td: \"before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success\"\n      },\n      warning: {\n        td: \"before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning\"\n      },\n      danger: {\n        td: \"before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500\"\n      }\n    },\n    layout: {\n      auto: {\n        table: \"table-auto\"\n      },\n      fixed: {\n        table: \"table-fixed\"\n      }\n    },\n    radius: {\n      none: {\n        wrapper: \"rounded-none\"\n      },\n      sm: {\n        wrapper: \"rounded-small\"\n      },\n      md: {\n        wrapper: \"rounded-medium\"\n      },\n      lg: {\n        wrapper: \"rounded-large\"\n      }\n    },\n    shadow: {\n      none: {\n        wrapper: \"shadow-none\"\n      },\n      sm: {\n        wrapper: \"shadow-small\"\n      },\n      md: {\n        wrapper: \"shadow-medium\"\n      },\n      lg: {\n        wrapper: \"shadow-large\"\n      }\n    },\n    hideHeader: {\n      true: {\n        thead: \"hidden\"\n      }\n    },\n    isStriped: {\n      true: {\n        td: [\n          \"group-data-[odd=true]/tr:before:bg-default-100\",\n          \"group-data-[odd=true]/tr:before:opacity-100\",\n          \"group-data-[odd=true]/tr:before:-z-10\"\n        ]\n      }\n    },\n    isCompact: {\n      true: {\n        td: \"py-1\"\n      },\n      false: {}\n    },\n    isHeaderSticky: {\n      true: {\n        thead: \"sticky top-0 z-20 [&>tr]:first:shadow-small\"\n      }\n    },\n    isSelectable: {\n      true: {\n        tr: \"cursor-default\",\n        td: [\n          \"group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100\",\n          \"group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70\"\n        ]\n      }\n    },\n    isMultiSelectable: {\n      true: {\n        td: [\n          // first\n          \"group-data-[first=true]/tr:first:before:rounded-ss-lg\",\n          \"group-data-[first=true]/tr:last:before:rounded-se-lg\",\n          // middle\n          \"group-data-[middle=true]/tr:before:rounded-none\",\n          // last\n          \"group-data-[last=true]/tr:first:before:rounded-es-lg\",\n          \"group-data-[last=true]/tr:last:before:rounded-ee-lg\"\n        ]\n      },\n      false: {\n        td: [\"first:before:rounded-s-lg\", \"last:before:rounded-e-lg\"]\n      }\n    },\n    fullWidth: {\n      true: {\n        base: \"w-full\",\n        wrapper: \"w-full\",\n        table: \"w-full\"\n      }\n    },\n    align: {\n      start: {\n        th: \"text-start\",\n        td: \"text-start\"\n      },\n      center: {\n        th: \"text-center\",\n        td: \"text-center\"\n      },\n      end: {\n        th: \"text-end\",\n        td: \"text-end\"\n      }\n    }\n  },\n  defaultVariants: {\n    layout: \"auto\",\n    shadow: \"sm\",\n    radius: \"lg\",\n    color: \"default\",\n    isCompact: false,\n    hideHeader: false,\n    isStriped: false,\n    fullWidth: true,\n    align: \"start\"\n  },\n  compoundVariants: [\n    {\n      isStriped: true,\n      color: \"default\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60\"\n      }\n    },\n    {\n      isStriped: true,\n      color: \"primary\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20\"\n      }\n    },\n    {\n      isStriped: true,\n      color: \"secondary\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20\"\n      }\n    },\n    {\n      isStriped: true,\n      color: \"success\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20\"\n      }\n    },\n    {\n      isStriped: true,\n      color: \"warning\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20\"\n      }\n    },\n    {\n      isStriped: true,\n      color: \"danger\",\n      class: {\n        td: \"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20\"\n      }\n    }\n  ]\n});\n\nexport {\n  table\n};\n","import {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\n\n// src/components/form.ts\nvar form = tv({\n  base: \"flex flex-col gap-2 items-start\"\n});\n\nexport {\n  form\n};\n","import {\n  colorVariants\n} from \"./chunk-GQT3YUX3.mjs\";\nimport {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\nimport {\n  collapseAdjacentVariantBorders,\n  dataFocusVisibleClasses\n} from \"./chunk-CNTMWM4F.mjs\";\n\n// src/components/button.ts\nvar button = tv({\n  base: [\n    \"z-0\",\n    \"group\",\n    \"relative\",\n    \"inline-flex\",\n    \"items-center\",\n    \"justify-center\",\n    \"box-border\",\n    \"appearance-none\",\n    \"outline-none\",\n    \"select-none\",\n    \"whitespace-nowrap\",\n    \"min-w-max\",\n    \"font-normal\",\n    \"subpixel-antialiased\",\n    \"overflow-hidden\",\n    \"tap-highlight-transparent\",\n    \"transform-gpu data-[pressed=true]:scale-[0.97]\",\n    // focus ring\n    ...dataFocusVisibleClasses\n  ],\n  variants: {\n    variant: {\n      solid: \"\",\n      bordered: \"border-medium bg-transparent\",\n      light: \"bg-transparent\",\n      flat: \"\",\n      faded: \"border-medium\",\n      shadow: \"\",\n      ghost: \"border-medium bg-transparent\"\n    },\n    size: {\n      sm: \"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small\",\n      md: \"px-4 min-w-20 h-10 text-small gap-2 rounded-medium\",\n      lg: \"px-6 min-w-24 h-12 text-medium gap-3 rounded-large\"\n    },\n    color: {\n      default: \"\",\n      primary: \"\",\n      secondary: \"\",\n      success: \"\",\n      warning: \"\",\n      danger: \"\"\n    },\n    radius: {\n      none: \"rounded-none\",\n      sm: \"rounded-small\",\n      md: \"rounded-medium\",\n      lg: \"rounded-large\",\n      full: \"rounded-full\"\n    },\n    fullWidth: {\n      true: \"w-full\"\n    },\n    isDisabled: {\n      true: \"opacity-disabled pointer-events-none\"\n    },\n    isInGroup: {\n      true: \"[&:not(:first-child):not(:last-child)]:rounded-none\"\n    },\n    isIconOnly: {\n      true: \"px-0 !gap-0\",\n      false: \"[&>svg]:max-w-[theme(spacing.8)]\"\n    },\n    disableAnimation: {\n      true: \"!transition-none data-[pressed=true]:scale-100\",\n      false: \"transition-transform-colors-opacity motion-reduce:transition-none\"\n    }\n  },\n  defaultVariants: {\n    size: \"md\",\n    variant: \"solid\",\n    color: \"default\",\n    fullWidth: false,\n    isDisabled: false,\n    isInGroup: false\n  },\n  compoundVariants: [\n    // solid / color\n    {\n      variant: \"solid\",\n      color: \"default\",\n      class: colorVariants.solid.default\n    },\n    {\n      variant: \"solid\",\n      color: \"primary\",\n      class: colorVariants.solid.primary\n    },\n    {\n      variant: \"solid\",\n      color: \"secondary\",\n      class: colorVariants.solid.secondary\n    },\n    {\n      variant: \"solid\",\n      color: \"success\",\n      class: colorVariants.solid.success\n    },\n    {\n      variant: \"solid\",\n      color: \"warning\",\n      class: colorVariants.solid.warning\n    },\n    {\n      variant: \"solid\",\n      color: \"danger\",\n      class: colorVariants.solid.danger\n    },\n    // shadow / color\n    {\n      variant: \"shadow\",\n      color: \"default\",\n      class: colorVariants.shadow.default\n    },\n    {\n      variant: \"shadow\",\n      color: \"primary\",\n      class: colorVariants.shadow.primary\n    },\n    {\n      variant: \"shadow\",\n      color: \"secondary\",\n      class: colorVariants.shadow.secondary\n    },\n    {\n      variant: \"shadow\",\n      color: \"success\",\n      class: colorVariants.shadow.success\n    },\n    {\n      variant: \"shadow\",\n      color: \"warning\",\n      class: colorVariants.shadow.warning\n    },\n    {\n      variant: \"shadow\",\n      color: \"danger\",\n      class: colorVariants.shadow.danger\n    },\n    // bordered / color\n    {\n      variant: \"bordered\",\n      color: \"default\",\n      class: colorVariants.bordered.default\n    },\n    {\n      variant: \"bordered\",\n      color: \"primary\",\n      class: colorVariants.bordered.primary\n    },\n    {\n      variant: \"bordered\",\n      color: \"secondary\",\n      class: colorVariants.bordered.secondary\n    },\n    {\n      variant: \"bordered\",\n      color: \"success\",\n      class: colorVariants.bordered.success\n    },\n    {\n      variant: \"bordered\",\n      color: \"warning\",\n      class: colorVariants.bordered.warning\n    },\n    {\n      variant: \"bordered\",\n      color: \"danger\",\n      class: colorVariants.bordered.danger\n    },\n    // flat / color\n    {\n      variant: \"flat\",\n      color: \"default\",\n      class: colorVariants.flat.default\n    },\n    {\n      variant: \"flat\",\n      color: \"primary\",\n      class: colorVariants.flat.primary\n    },\n    {\n      variant: \"flat\",\n      color: \"secondary\",\n      class: colorVariants.flat.secondary\n    },\n    {\n      variant: \"flat\",\n      color: \"success\",\n      class: colorVariants.flat.success\n    },\n    {\n      variant: \"flat\",\n      color: \"warning\",\n      class: colorVariants.flat.warning\n    },\n    {\n      variant: \"flat\",\n      color: \"danger\",\n      class: colorVariants.flat.danger\n    },\n    // faded / color\n    {\n      variant: \"faded\",\n      color: \"default\",\n      class: colorVariants.faded.default\n    },\n    {\n      variant: \"faded\",\n      color: \"primary\",\n      class: colorVariants.faded.primary\n    },\n    {\n      variant: \"faded\",\n      color: \"secondary\",\n      class: colorVariants.faded.secondary\n    },\n    {\n      variant: \"faded\",\n      color: \"success\",\n      class: colorVariants.faded.success\n    },\n    {\n      variant: \"faded\",\n      color: \"warning\",\n      class: colorVariants.faded.warning\n    },\n    {\n      variant: \"faded\",\n      color: \"danger\",\n      class: colorVariants.faded.danger\n    },\n    // light / color\n    {\n      variant: \"light\",\n      color: \"default\",\n      class: [colorVariants.light.default, \"data-[hover=true]:bg-default/40\"]\n    },\n    {\n      variant: \"light\",\n      color: \"primary\",\n      class: [colorVariants.light.primary, \"data-[hover=true]:bg-primary/20\"]\n    },\n    {\n      variant: \"light\",\n      color: \"secondary\",\n      class: [colorVariants.light.secondary, \"data-[hover=true]:bg-secondary/20\"]\n    },\n    {\n      variant: \"light\",\n      color: \"success\",\n      class: [colorVariants.light.success, \"data-[hover=true]:bg-success/20\"]\n    },\n    {\n      variant: \"light\",\n      color: \"warning\",\n      class: [colorVariants.light.warning, \"data-[hover=true]:bg-warning/20\"]\n    },\n    {\n      variant: \"light\",\n      color: \"danger\",\n      class: [colorVariants.light.danger, \"data-[hover=true]:bg-danger/20\"]\n    },\n    // ghost / color\n    {\n      variant: \"ghost\",\n      color: \"default\",\n      class: [colorVariants.ghost.default, \"data-[hover=true]:!bg-default\"]\n    },\n    {\n      variant: \"ghost\",\n      color: \"primary\",\n      class: [\n        colorVariants.ghost.primary,\n        \"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground\"\n      ]\n    },\n    {\n      variant: \"ghost\",\n      color: \"secondary\",\n      class: [\n        colorVariants.ghost.secondary,\n        \"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground\"\n      ]\n    },\n    {\n      variant: \"ghost\",\n      color: \"success\",\n      class: [\n        colorVariants.ghost.success,\n        \"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground\"\n      ]\n    },\n    {\n      variant: \"ghost\",\n      color: \"warning\",\n      class: [\n        colorVariants.ghost.warning,\n        \"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground\"\n      ]\n    },\n    {\n      variant: \"ghost\",\n      color: \"danger\",\n      class: [\n        colorVariants.ghost.danger,\n        \"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground\"\n      ]\n    },\n    // isInGroup / radius / size <-- radius not provided\n    {\n      isInGroup: true,\n      class: \"rounded-none first:rounded-s-medium last:rounded-e-medium\"\n    },\n    {\n      isInGroup: true,\n      size: \"sm\",\n      class: \"rounded-none first:rounded-s-small last:rounded-e-small\"\n    },\n    {\n      isInGroup: true,\n      size: \"md\",\n      class: \"rounded-none first:rounded-s-medium last:rounded-e-medium\"\n    },\n    {\n      isInGroup: true,\n      size: \"lg\",\n      class: \"rounded-none first:rounded-s-large last:rounded-e-large\"\n    },\n    {\n      isInGroup: true,\n      isRounded: true,\n      class: \"rounded-none first:rounded-s-full last:rounded-e-full\"\n    },\n    // isInGroup / radius <-- radius provided\n    {\n      isInGroup: true,\n      radius: \"none\",\n      class: \"rounded-none first:rounded-s-none last:rounded-e-none\"\n    },\n    {\n      isInGroup: true,\n      radius: \"sm\",\n      class: \"rounded-none first:rounded-s-small last:rounded-e-small\"\n    },\n    {\n      isInGroup: true,\n      radius: \"md\",\n      class: \"rounded-none first:rounded-s-medium last:rounded-e-medium\"\n    },\n    {\n      isInGroup: true,\n      radius: \"lg\",\n      class: \"rounded-none first:rounded-s-large last:rounded-e-large\"\n    },\n    {\n      isInGroup: true,\n      radius: \"full\",\n      class: \"rounded-none first:rounded-s-full last:rounded-e-full\"\n    },\n    // isInGroup / bordered / ghost\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"default\",\n      className: collapseAdjacentVariantBorders.default\n    },\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"primary\",\n      className: collapseAdjacentVariantBorders.primary\n    },\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"secondary\",\n      className: collapseAdjacentVariantBorders.secondary\n    },\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"success\",\n      className: collapseAdjacentVariantBorders.success\n    },\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"warning\",\n      className: collapseAdjacentVariantBorders.warning\n    },\n    {\n      isInGroup: true,\n      variant: [\"ghost\", \"bordered\"],\n      color: \"danger\",\n      className: collapseAdjacentVariantBorders.danger\n    },\n    {\n      isIconOnly: true,\n      size: \"sm\",\n      class: \"min-w-8 w-8 h-8\"\n    },\n    {\n      isIconOnly: true,\n      size: \"md\",\n      class: \"min-w-10 w-10 h-10\"\n    },\n    {\n      isIconOnly: true,\n      size: \"lg\",\n      class: \"min-w-12 w-12 h-12\"\n    },\n    // variant / hover\n    {\n      variant: [\"solid\", \"faded\", \"flat\", \"bordered\", \"shadow\"],\n      class: \"data-[hover=true]:opacity-hover\"\n    }\n  ]\n});\nvar buttonGroup = tv({\n  base: \"inline-flex items-center justify-center h-auto\",\n  variants: {\n    fullWidth: {\n      true: \"w-full\"\n    }\n  },\n  defaultVariants: {\n    fullWidth: false\n  }\n});\n\nexport {\n  button,\n  buttonGroup\n};\n","import {\n  tv\n} from \"./chunk-UWE6H66T.mjs\";\nimport {\n  groupDataFocusVisibleClasses,\n  hiddenInputClasses\n} from \"./chunk-CNTMWM4F.mjs\";\n\n// src/components/checkbox.ts\nvar checkbox = tv({\n  slots: {\n    base: \"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none\",\n    wrapper: [\n      \"relative\",\n      \"inline-flex\",\n      \"items-center\",\n      \"justify-center\",\n      \"flex-shrink-0\",\n      \"overflow-hidden\",\n      // before\n      \"before:content-['']\",\n      \"before:absolute\",\n      \"before:inset-0\",\n      \"before:border-solid\",\n      \"before:border-2\",\n      \"before:box-border\",\n      \"before:border-default\",\n      // after\n      \"after:content-['']\",\n      \"after:absolute\",\n      \"after:inset-0\",\n      \"after:scale-50\",\n      \"after:opacity-0\",\n      \"after:origin-center\",\n      \"group-data-[selected=true]:after:scale-100\",\n      \"group-data-[selected=true]:after:opacity-100\",\n      // hover\n      \"group-data-[hover=true]:before:bg-default-100\",\n      // focus ring\n      ...groupDataFocusVisibleClasses\n    ],\n    hiddenInput: hiddenInputClasses,\n    icon: \"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none\",\n    label: \"relative text-foreground select-none\"\n  },\n  variants: {\n    color: {\n      default: {\n        wrapper: \"after:bg-default after:text-default-foreground text-default-foreground\"\n      },\n      primary: {\n        wrapper: \"after:bg-primary after:text-primary-foreground text-primary-foreground\"\n      },\n      secondary: {\n        wrapper: \"after:bg-secondary after:text-secondary-foreground text-secondary-foreground\"\n      },\n      success: {\n        wrapper: \"after:bg-success after:text-success-foreground text-success-foreground\"\n      },\n      warning: {\n        wrapper: \"after:bg-warning after:text-warning-foreground text-warning-foreground\"\n      },\n      danger: {\n        wrapper: \"after:bg-danger after:text-danger-foreground text-danger-foreground\"\n      }\n    },\n    size: {\n      sm: {\n        wrapper: [\n          \"w-4 h-4 me-2\",\n          \"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\"\n        ],\n        label: \"text-small\",\n        icon: \"w-3 h-2\"\n      },\n      md: {\n        wrapper: [\n          \"w-5 h-5 me-2\",\n          \"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\"\n        ],\n        label: \"text-medium\",\n        icon: \"w-4 h-3\"\n      },\n      lg: {\n        wrapper: [\n          \"w-6 h-6 me-2\",\n          \"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\"\n        ],\n        label: \"text-large\",\n        icon: \"w-5 h-4\"\n      }\n    },\n    radius: {\n      none: {\n        wrapper: \"rounded-none before:rounded-none after:rounded-none\"\n      },\n      sm: {\n        wrapper: [\n          \"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\"\n        ]\n      },\n      md: {\n        wrapper: [\n          \"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\"\n        ]\n      },\n      lg: {\n        wrapper: [\n          \"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n          \"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n          \"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\"\n        ]\n      },\n      full: {\n        wrapper: \"rounded-full before:rounded-full after:rounded-full\"\n      }\n    },\n    lineThrough: {\n      true: {\n        label: [\n          \"inline-flex\",\n          \"items-center\",\n          \"justify-center\",\n          \"before:content-['']\",\n          \"before:absolute\",\n          \"before:bg-foreground\",\n          \"before:w-0\",\n          \"before:h-0.5\",\n          \"group-data-[selected=true]:opacity-60\",\n          \"group-data-[selected=true]:before:w-full\"\n        ]\n      }\n    },\n    isDisabled: {\n      true: {\n        base: \"opacity-disabled pointer-events-none\"\n      }\n    },\n    isInvalid: {\n      true: {\n        wrapper: \"before:border-danger\",\n        label: \"text-danger\"\n      }\n    },\n    disableAnimation: {\n      true: {\n        wrapper: \"transition-none\",\n        icon: \"transition-none\",\n        label: \"transition-none\"\n      },\n      false: {\n        wrapper: [\n          \"before:transition-colors\",\n          \"group-data-[pressed=true]:scale-95\",\n          \"transition-transform\",\n          \"after:transition-transform-opacity\",\n          \"after:!ease-linear\",\n          \"after:!duration-200\",\n          \"motion-reduce:transition-none\"\n        ],\n        icon: \"transition-opacity motion-reduce:transition-none\",\n        label: \"transition-colors-opacity before:transition-width motion-reduce:transition-none\"\n      }\n    }\n  },\n  defaultVariants: {\n    color: \"primary\",\n    size: \"md\",\n    isDisabled: false,\n    lineThrough: false\n  }\n});\nvar checkboxGroup = tv({\n  slots: {\n    base: \"relative flex flex-col gap-2\",\n    label: \"relative text-medium text-foreground-500\",\n    wrapper: \"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row\",\n    description: \"text-small text-foreground-400\",\n    errorMessage: \"text-small text-danger\"\n  },\n  variants: {\n    isRequired: {\n      true: {\n        label: \"after:content-['*'] after:text-danger after:ml-0.5\"\n      }\n    },\n    isInvalid: {\n      true: {\n        description: \"text-danger\"\n      }\n    },\n    disableAnimation: {\n      true: {},\n      false: {\n        description: \"transition-colors !duration-150 motion-reduce:transition-none\"\n      }\n    }\n  },\n  defaultVariants: {\n    isInvalid: false,\n    isRequired: false\n  }\n});\n\nexport {\n  checkbox,\n  checkboxGroup\n};\n","import {DOMAttributes} from '@react-types/shared';\nimport {isFocusVisible, useFocus, useFocusVisibleListener, useFocusWithin} from '@react-aria/interactions';\nimport {useCallback, useRef, useState} from 'react';\n\nexport interface AriaFocusRingProps {\n  /**\n   * Whether to show the focus ring when something\n   * inside the container element has focus (true), or\n   * only if the container itself has focus (false).\n   * @default 'false'\n   */\n  within?: boolean,\n\n  /** Whether the element is a text input. */\n  isTextInput?: boolean,\n\n  /** Whether the element will be auto focused. */\n  autoFocus?: boolean\n}\n\nexport interface FocusRingAria {\n  /** Whether the element is currently focused. */\n  isFocused: boolean,\n\n  /** Whether keyboard focus should be visible. */\n  isFocusVisible: boolean,\n\n  /** Props to apply to the container element with the focus ring. */\n  focusProps: DOMAttributes\n}\n\n/**\n * Determines whether a focus ring should be shown to indicate keyboard focus.\n * Focus rings are visible only when the user is interacting with a keyboard,\n * not with a mouse, touch, or other input methods.\n */\nexport function useFocusRing(props: AriaFocusRingProps = {}): FocusRingAria {\n  let {\n    autoFocus = false,\n    isTextInput,\n    within\n  } = props;\n  let state = useRef({\n    isFocused: false,\n    isFocusVisible: autoFocus || isFocusVisible()\n  });\n  let [isFocused, setFocused] = useState(false);\n  let [isFocusVisibleState, setFocusVisible] = useState(() => state.current.isFocused && state.current.isFocusVisible);\n\n  let updateState = useCallback(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);\n\n  let onFocusChange = useCallback(isFocused => {\n    state.current.isFocused = isFocused;\n    setFocused(isFocused);\n    updateState();\n  }, [updateState]);\n\n  useFocusVisibleListener((isFocusVisible) => {\n    state.current.isFocusVisible = isFocusVisible;\n    updateState();\n  }, [], {isTextInput});\n\n  let {focusProps} = useFocus({\n    isDisabled: within,\n    onFocusChange\n  });\n\n  let {focusWithinProps} = useFocusWithin({\n    isDisabled: !within,\n    onFocusWithinChange: onFocusChange\n  });\n\n  return {\n    isFocused,\n    isFocusVisible: isFocusVisibleState,\n    focusProps: within ? focusWithinProps : focusProps\n  };\n}\n","// src/chevron-down.tsx\nimport { jsx } from \"react/jsx-runtime\";\nvar ChevronDownIcon = ({ strokeWidth = 1.5, ...props }) => /* @__PURE__ */ jsx(\n  \"svg\",\n  {\n    \"aria-hidden\": \"true\",\n    fill: \"none\",\n    focusable: \"false\",\n    height: \"1em\",\n    role: \"presentation\",\n    stroke: \"currentColor\",\n    strokeLinecap: \"round\",\n    strokeLinejoin: \"round\",\n    strokeWidth,\n    viewBox: \"0 0 24 24\",\n    width: \"1em\",\n    ...props,\n    children: /* @__PURE__ */ jsx(\"path\", { d: \"m6 9 6 6 6-6\" })\n  }\n);\n\nexport {\n  ChevronDownIcon\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key} from '@react-types/shared';\n\n/**\n * A Selection is a special Set containing Keys, which also has an anchor\n * and current selected key for use when range selecting.\n */\nexport class Selection extends Set<Key> {\n  anchorKey: Key | null;\n  currentKey: Key | null;\n\n  constructor(keys?: Iterable<Key> | Selection, anchorKey?: Key | null, currentKey?: Key | null) {\n    super(keys);\n    if (keys instanceof Selection) {\n      this.anchorKey = anchorKey ?? keys.anchorKey;\n      this.currentKey = currentKey ?? keys.currentKey;\n    } else {\n      this.anchorKey = anchorKey ?? null;\n      this.currentKey = currentKey ?? null;\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DisabledBehavior, FocusStrategy, Key, MultipleSelection, SelectionBehavior, SelectionMode} from '@react-types/shared';\nimport {MultipleSelectionState} from './types';\nimport {Selection} from './Selection';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\n\nfunction equalSets(setA, setB) {\n  if (setA.size !== setB.size) {\n    return false;\n  }\n\n  for (let item of setA) {\n    if (!setB.has(item)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nexport interface MultipleSelectionStateProps extends MultipleSelection {\n  /** How multiple selection should behave in the collection. */\n  selectionBehavior?: SelectionBehavior,\n  /** Whether onSelectionChange should fire even if the new set of keys is the same as the last. */\n  allowDuplicateSelectionEvents?: boolean,\n  /** Whether `disabledKeys` applies to all interactions, or only selection. */\n  disabledBehavior?: DisabledBehavior\n}\n\n/**\n * Manages state for multiple selection and focus in a collection.\n */\nexport function useMultipleSelectionState(props: MultipleSelectionStateProps): MultipleSelectionState {\n  let {\n    selectionMode = 'none' as SelectionMode,\n    disallowEmptySelection = false,\n    allowDuplicateSelectionEvents,\n    selectionBehavior: selectionBehaviorProp = 'toggle',\n    disabledBehavior = 'all'\n  } = props;\n\n  // We want synchronous updates to `isFocused` and `focusedKey` after their setters are called.\n  // But we also need to trigger a react re-render. So, we have both a ref (sync) and state (async).\n  let isFocusedRef = useRef(false);\n  let [, setFocused] = useState(false);\n  let focusedKeyRef = useRef<Key | null>(null);\n  let childFocusStrategyRef = useRef<FocusStrategy | null>(null);\n  let [, setFocusedKey] = useState<Key | null>(null);\n  let selectedKeysProp = useMemo(() => convertSelection(props.selectedKeys), [props.selectedKeys]);\n  let defaultSelectedKeys = useMemo(() => convertSelection(props.defaultSelectedKeys, new Selection()), [props.defaultSelectedKeys]);\n  let [selectedKeys, setSelectedKeys] = useControlledState(\n    selectedKeysProp,\n    defaultSelectedKeys!,\n    props.onSelectionChange\n  );\n  let disabledKeysProp = useMemo(() =>\n    props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()\n  , [props.disabledKeys]);\n  let [selectionBehavior, setSelectionBehavior] = useState(selectionBehaviorProp);\n\n  // If the selectionBehavior prop is set to replace, but the current state is toggle (e.g. due to long press\n  // to enter selection mode on touch), and the selection becomes empty, reset the selection behavior.\n  if (selectionBehaviorProp === 'replace' && selectionBehavior === 'toggle' && typeof selectedKeys === 'object' && selectedKeys.size === 0) {\n    setSelectionBehavior('replace');\n  }\n\n  // If the selectionBehavior prop changes, update the state as well.\n  let lastSelectionBehavior = useRef(selectionBehaviorProp);\n  useEffect(() => {\n    if (selectionBehaviorProp !== lastSelectionBehavior.current) {\n      setSelectionBehavior(selectionBehaviorProp);\n      lastSelectionBehavior.current = selectionBehaviorProp;\n    }\n  }, [selectionBehaviorProp]);\n\n  return {\n    selectionMode,\n    disallowEmptySelection,\n    selectionBehavior,\n    setSelectionBehavior,\n    get isFocused() {\n      return isFocusedRef.current;\n    },\n    setFocused(f) {\n      isFocusedRef.current = f;\n      setFocused(f);\n    },\n    get focusedKey() {\n      return focusedKeyRef.current;\n    },\n    get childFocusStrategy() {\n      return childFocusStrategyRef.current;\n    },\n    setFocusedKey(k, childFocusStrategy = 'first') {\n      focusedKeyRef.current = k;\n      childFocusStrategyRef.current = childFocusStrategy;\n      setFocusedKey(k);\n    },\n    selectedKeys,\n    setSelectedKeys(keys) {\n      if (allowDuplicateSelectionEvents || !equalSets(keys, selectedKeys)) {\n        setSelectedKeys(keys);\n      }\n    },\n    disabledKeys: disabledKeysProp,\n    disabledBehavior\n  };\n}\n\nfunction convertSelection(selection: 'all' | Iterable<Key> | null | undefined, defaultValue?: Selection): 'all' | Set<Key> | undefined {\n  if (!selection) {\n    return defaultValue;\n  }\n\n  return selection === 'all'\n    ? 'all'\n    : new Selection(selection);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBase, CollectionElement, Key, Node} from '@react-types/shared';\nimport {PartialNode} from './types';\nimport React, {ReactElement} from 'react';\n\ninterface CollectionBuilderState {\n  renderer?: (value: any) => ReactElement | null\n}\n\ninterface CollectReactElement<T> extends ReactElement {\n  getCollectionNode(props: any, context: any): Generator<PartialNode<T>, void, Node<T>[]>\n}\n\nexport class CollectionBuilder<T extends object> {\n  private context?: unknown;\n  private cache: WeakMap<T, Node<T>> = new WeakMap();\n\n  build(props: Partial<CollectionBase<T>>, context?: unknown): Iterable<Node<T>> {\n    this.context = context;\n    return iterable(() => this.iterateCollection(props));\n  }\n\n  private *iterateCollection(props: Partial<CollectionBase<T>>): Generator<Node<T>> {\n    let {children, items} = props;\n\n    if (React.isValidElement<{children: CollectionElement<T>}>(children) && children.type === React.Fragment) {\n      yield* this.iterateCollection({\n        children: children.props.children,\n        items\n      });\n    } else if (typeof children === 'function') {\n      if (!items) {\n        throw new Error('props.children was a function but props.items is missing');\n      }\n\n      let index = 0;\n      for (let item of items) {\n        yield* this.getFullNode({\n          value: item,\n          index\n        }, {renderer: children});\n        index++;\n      }\n    } else {\n      let items: CollectionElement<T>[] = [];\n      React.Children.forEach(children, child => {\n        if (child) {\n          items.push(child);\n        }\n      });\n\n      let index = 0;\n      for (let item of items) {\n        let nodes = this.getFullNode({\n          element: item,\n          index: index\n        }, {});\n\n        for (let node of nodes) {\n          index++;\n          yield node;\n        }\n      }\n    }\n  }\n\n  private getKey(item: NonNullable<CollectionElement<T>>, partialNode: PartialNode<T>, state: CollectionBuilderState, parentKey?: Key | null): Key {\n    if (item.key != null) {\n      return item.key;\n    }\n\n    if (partialNode.type === 'cell' && partialNode.key != null) {\n      return `${parentKey}${partialNode.key}`;\n    }\n\n    let v = partialNode.value as any;\n    if (v != null) {\n      let key = v.key ?? v.id;\n      if (key == null) {\n        throw new Error('No key found for item');\n      }\n\n      return key;\n    }\n\n    return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;\n  }\n\n  private getChildState(state: CollectionBuilderState, partialNode: PartialNode<T>) {\n    return {\n      renderer: partialNode.renderer || state.renderer\n    };\n  }\n\n  private *getFullNode(partialNode: PartialNode<T> & {index: number}, state: CollectionBuilderState, parentKey?: Key | null, parentNode?: Node<T>): Generator<Node<T>> {\n    if (React.isValidElement<{children: CollectionElement<T>}>(partialNode.element) && partialNode.element.type === React.Fragment) {\n      let children: CollectionElement<T>[] = [];\n\n      React.Children.forEach(partialNode.element.props.children, child => {\n        children.push(child);\n      });\n\n      let index = partialNode.index ?? 0;\n\n      for (const child of children) {\n        yield* this.getFullNode({\n          element: child,\n          index: index++\n        }, state, parentKey, parentNode);\n      }\n\n      return;\n    }\n\n    // If there's a value instead of an element on the node, and a parent renderer function is available,\n    // use it to render an element for the value.\n    let element = partialNode.element;\n    if (!element && partialNode.value && state && state.renderer) {\n      let cached = this.cache.get(partialNode.value);\n      if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {\n        cached.index = partialNode.index;\n        cached.parentKey = parentNode ? parentNode.key : null;\n        yield cached;\n        return;\n      }\n\n      element = state.renderer(partialNode.value);\n    }\n\n    // If there's an element with a getCollectionNode function on its type, then it's a supported component.\n    // Call this function to get a partial node, and recursively build a full node from there.\n    if (React.isValidElement(element)) {\n      let type = element.type as unknown as CollectReactElement<T>;\n      if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {\n        let name = element.type;\n        throw new Error(`Unknown element <${name}> in collection.`);\n      }\n\n      let childNodes = type.getCollectionNode(element.props, this.context) as Generator<PartialNode<T>, void, Node<T>[]>;\n      let index = partialNode.index ?? 0;\n      let result = childNodes.next();\n      while (!result.done && result.value) {\n        let childNode = result.value;\n\n        partialNode.index = index;\n\n        let nodeKey = childNode.key ?? null;\n        if (nodeKey == null) {\n          nodeKey = childNode.element ? null : this.getKey(element as NonNullable<CollectionElement<T>>, partialNode, state, parentKey);\n        }\n\n        let nodes = this.getFullNode({\n          ...childNode,\n          key: nodeKey,\n          index,\n          wrapper: compose(partialNode.wrapper, childNode.wrapper)\n        }, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);\n\n        let children = [...nodes];\n        for (let node of children) {\n          // Cache the node based on its value\n          node.value = childNode.value ?? partialNode.value ?? null;\n          if (node.value) {\n            this.cache.set(node.value, node);\n          }\n\n          // The partial node may have specified a type for the child in order to specify a constraint.\n          // Verify that the full node that was built recursively matches this type.\n          if (partialNode.type && node.type !== partialNode.type) {\n            throw new Error(`Unsupported type <${capitalize(node.type)}> in <${capitalize(parentNode?.type ?? 'unknown parent type')}>. Only <${capitalize(partialNode.type)}> is supported.`);\n          }\n\n          index++;\n          yield node;\n        }\n\n        result = childNodes.next(children);\n      }\n\n      return;\n    }\n\n    // Ignore invalid elements\n    if (partialNode.key == null || partialNode.type == null) {\n      return;\n    }\n\n    // Create full node\n    let builder = this;\n    let node: Node<T> = {\n      type: partialNode.type,\n      props: partialNode.props,\n      key: partialNode.key,\n      parentKey: parentNode ? parentNode.key : null,\n      value: partialNode.value ?? null,\n      level: parentNode ? parentNode.level + 1 : 0,\n      index: partialNode.index,\n      rendered: partialNode.rendered,\n      textValue: partialNode.textValue ?? '',\n      'aria-label': partialNode['aria-label'],\n      wrapper: partialNode.wrapper,\n      shouldInvalidate: partialNode.shouldInvalidate,\n      hasChildNodes: partialNode.hasChildNodes || false,\n      childNodes: iterable(function *() {\n        if (!partialNode.hasChildNodes || !partialNode.childNodes) {\n          return;\n        }\n\n        let index = 0;\n        for (let child of partialNode.childNodes()) {\n          // Ensure child keys are globally unique by prepending the parent node's key\n          if (child.key != null) {\n            // TODO: Remove this line entirely and enforce that users always provide unique keys.\n            // Currently this line will have issues when a parent has a key `a` and a child with key `bc`\n            // but another parent has key `ab` and its child has a key `c`. The combined keys would result in both\n            // children having a key of `abc`.\n            child.key = `${node.key}${child.key}`;\n          }\n\n          let nodes = builder.getFullNode({...child, index}, builder.getChildState(state, child), node.key, node);\n          for (let node of nodes) {\n            index++;\n            yield node;\n          }\n        }\n      })\n    };\n\n    yield node;\n  }\n}\n\n// Wraps an iterator function as an iterable object, and caches the results.\nfunction iterable<T>(iterator: () => IterableIterator<Node<T>>): Iterable<Node<T>> {\n  let cache: Array<Node<T>> = [];\n  let iterable: null | IterableIterator<Node<T>> = null;\n  return {\n    *[Symbol.iterator]() {\n      for (let item of cache) {\n        yield item;\n      }\n\n      if (!iterable) {\n        iterable = iterator();\n      }\n\n      for (let item of iterable) {\n        cache.push(item);\n        yield item;\n      }\n    }\n  };\n}\n\ntype Wrapper = (element: ReactElement) => ReactElement;\nfunction compose(outer: Wrapper | void, inner: Wrapper | void): Wrapper | undefined {\n  if (outer && inner) {\n    return (element) => outer(inner(element));\n  }\n\n  if (outer) {\n    return outer;\n  }\n\n  if (inner) {\n    return inner;\n  }\n}\n\nfunction capitalize(str: string) {\n  return str[0].toUpperCase() + str.slice(1);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, CollectionStateBase, Node} from '@react-types/shared';\nimport {CollectionBuilder} from './CollectionBuilder';\nimport {ReactElement, useMemo} from 'react';\n\ninterface CollectionOptions<T, C extends Collection<Node<T>>> extends Omit<CollectionStateBase<T, C>, 'children'> {\n  children?: ReactElement<any> | null | (ReactElement<any> | null)[] | ((item: T) => ReactElement<any> | null)\n}\n\ntype CollectionFactory<T, C extends Collection<Node<T>>> = (node: Iterable<Node<T>>) => C;\n\nexport function useCollection<T extends object, C extends Collection<Node<T>> = Collection<Node<T>>>(props: CollectionOptions<T, C>, factory: CollectionFactory<T, C>, context?: unknown): C {\n  let builder = useMemo(() => new CollectionBuilder<T>(), []);\n  let {children, items, collection} = props;\n  let result = useMemo(() => {\n    if (collection) {\n      return collection;\n    }\n    let nodes = builder.build({children, items}, context);\n    return factory(nodes);\n  }, [builder, children, items, collection, context, factory]);\n  return result;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {Collection, Node} from '@react-types/shared';\n\nexport function getChildNodes<T>(node: Node<T>, collection: Collection<Node<T>>): Iterable<Node<T>> {\n  // New API: call collection.getChildren with the node key.\n  if (typeof collection.getChildren === 'function') {\n    return collection.getChildren(node.key);\n  }\n\n  // Old API: access childNodes directly.\n  return node.childNodes;\n}\n\nexport function getFirstItem<T>(iterable: Iterable<T>): T | undefined {\n  return getNthItem(iterable, 0);\n}\n\nexport function getNthItem<T>(iterable: Iterable<T>, index: number): T | undefined {\n  if (index < 0) {\n    return undefined;\n  }\n\n  let i = 0;\n  for (let item of iterable) {\n    if (i === index) {\n      return item;\n    }\n\n    i++;\n  }\n}\n\nexport function getLastItem<T>(iterable: Iterable<T>): T | undefined {\n  let lastItem: T | undefined = undefined;\n  for (let value of iterable) {\n    lastItem = value;\n  }\n\n  return lastItem;\n}\n\nexport function compareNodeOrder<T>(collection: Collection<Node<T>>, a: Node<T>, b: Node<T>): number {\n  // If the two nodes have the same parent, compare their indices.\n  if (a.parentKey === b.parentKey) {\n    return a.index - b.index;\n  }\n\n  // Otherwise, collect all of the ancestors from each node, and find the first one that doesn't match starting from the root.\n  // Include the base nodes in case we are comparing nodes of different levels so that we can compare the higher node to the lower level node's\n  // ancestor of the same level\n  let aAncestors = [...getAncestors(collection, a), a];\n  let bAncestors = [...getAncestors(collection, b), b];\n  let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a, i) => a !== bAncestors[i]);\n  if (firstNonMatchingAncestor !== -1) {\n    // Compare the indices of two children within the common ancestor.\n    a = aAncestors[firstNonMatchingAncestor];\n    b = bAncestors[firstNonMatchingAncestor];\n    return a.index - b.index;\n  }\n\n  // If there isn't a non matching ancestor, we might be in a case where one of the nodes is the ancestor of the other.\n  if (aAncestors.findIndex(node => node === b) >= 0) {\n    return 1;\n  } else if (bAncestors.findIndex(node => node === a) >= 0) {\n    return -1;\n  }\n\n  // 🤷\n  return -1;\n}\n\nfunction getAncestors<T>(collection: Collection<Node<T>>, node: Node<T>): Node<T>[] {\n  let parents: Node<T>[] = [];\n\n  let currNode: Node<T> | null = node;\n  while (currNode?.parentKey != null) {\n    currNode = collection.getItem(currNode.parentKey);\n    if (currNode) {\n      parents.unshift(currNode);\n    }\n  }\n\n  return parents;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n  Collection, DisabledBehavior,\n  FocusStrategy,\n  Selection as ISelection,\n  Key,\n  LayoutDelegate,\n  LongPressEvent,\n  Node,\n  PressEvent,\n  SelectionBehavior,\n  SelectionMode\n} from '@react-types/shared';\nimport {compareNodeOrder, getChildNodes, getFirstItem} from '@react-stately/collections';\nimport {MultipleSelectionManager, MultipleSelectionState} from './types';\nimport {Selection} from './Selection';\n\ninterface SelectionManagerOptions {\n  allowsCellSelection?: boolean,\n  layoutDelegate?: LayoutDelegate\n}\n\n/**\n * An interface for reading and updating multiple selection state.\n */\nexport class SelectionManager implements MultipleSelectionManager {\n  collection: Collection<Node<unknown>>;\n  private state: MultipleSelectionState;\n  private allowsCellSelection: boolean;\n  private _isSelectAll: boolean | null;\n  private layoutDelegate: LayoutDelegate | null;\n\n  constructor(collection: Collection<Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions) {\n    this.collection = collection;\n    this.state = state;\n    this.allowsCellSelection = options?.allowsCellSelection ?? false;\n    this._isSelectAll = null;\n    this.layoutDelegate = options?.layoutDelegate || null;\n  }\n\n  /**\n   * The type of selection that is allowed in the collection.\n   */\n  get selectionMode(): SelectionMode {\n    return this.state.selectionMode;\n  }\n\n  /**\n   * Whether the collection allows empty selection.\n   */\n  get disallowEmptySelection(): boolean {\n    return this.state.disallowEmptySelection;\n  }\n\n  /**\n   * The selection behavior for the collection.\n   */\n  get selectionBehavior(): SelectionBehavior {\n    return this.state.selectionBehavior;\n  }\n\n  /**\n   * Sets the selection behavior for the collection.\n   */\n  setSelectionBehavior(selectionBehavior: SelectionBehavior): void {\n    this.state.setSelectionBehavior(selectionBehavior);\n  }\n\n  /**\n   * Whether the collection is currently focused.\n   */\n  get isFocused(): boolean {\n    return this.state.isFocused;\n  }\n\n  /**\n   * Sets whether the collection is focused.\n   */\n  setFocused(isFocused: boolean): void {\n    this.state.setFocused(isFocused);\n  }\n\n  /**\n   * The current focused key in the collection.\n   */\n  get focusedKey(): Key | null {\n    return this.state.focusedKey;\n  }\n\n  /** Whether the first or last child of the focused key should receive focus. */\n  get childFocusStrategy(): FocusStrategy | null {\n    return this.state.childFocusStrategy;\n  }\n\n  /**\n   * Sets the focused key.\n   */\n  setFocusedKey(key: Key | null, childFocusStrategy?: FocusStrategy): void {\n    if (key == null || this.collection.getItem(key)) {\n      this.state.setFocusedKey(key, childFocusStrategy);\n    }\n  }\n\n  /**\n   * The currently selected keys in the collection.\n   */\n  get selectedKeys(): Set<Key> {\n    return this.state.selectedKeys === 'all'\n      ? new Set(this.getSelectAllKeys())\n      : this.state.selectedKeys;\n  }\n\n  /**\n   * The raw selection value for the collection.\n   * Either 'all' for select all, or a set of keys.\n   */\n  get rawSelection(): ISelection {\n    return this.state.selectedKeys;\n  }\n\n  /**\n   * Returns whether a key is selected.\n   */\n  isSelected(key: Key): boolean {\n    if (this.state.selectionMode === 'none') {\n      return false;\n    }\n\n    let mappedKey = this.getKey(key);\n    if (mappedKey == null) {\n      return false;\n    }\n    return this.state.selectedKeys === 'all'\n      ? this.canSelectItem(mappedKey)\n      : this.state.selectedKeys.has(mappedKey);\n  }\n\n  /**\n   * Whether the selection is empty.\n   */\n  get isEmpty(): boolean {\n    return this.state.selectedKeys !== 'all' && this.state.selectedKeys.size === 0;\n  }\n\n  /**\n   * Whether all items in the collection are selected.\n   */\n  get isSelectAll(): boolean {\n    if (this.isEmpty) {\n      return false;\n    }\n\n    if (this.state.selectedKeys === 'all') {\n      return true;\n    }\n\n    if (this._isSelectAll != null) {\n      return this._isSelectAll;\n    }\n\n    let allKeys = this.getSelectAllKeys();\n    let selectedKeys = this.state.selectedKeys;\n    this._isSelectAll = allKeys.every(k => selectedKeys.has(k));\n    return this._isSelectAll;\n  }\n\n  get firstSelectedKey(): Key | null {\n    let first: Node<unknown> | null = null;\n    for (let key of this.state.selectedKeys) {\n      let item = this.collection.getItem(key);\n      if (!first || (item && compareNodeOrder(this.collection, item, first) < 0)) {\n        first = item;\n      }\n    }\n\n    return first?.key ?? null;\n  }\n\n  get lastSelectedKey(): Key | null {\n    let last: Node<unknown> | null = null;\n    for (let key of this.state.selectedKeys) {\n      let item = this.collection.getItem(key);\n      if (!last || (item && compareNodeOrder(this.collection, item, last) > 0)) {\n        last = item;\n      }\n    }\n\n    return last?.key ?? null;\n  }\n\n  get disabledKeys(): Set<Key> {\n    return this.state.disabledKeys;\n  }\n\n  get disabledBehavior(): DisabledBehavior {\n    return this.state.disabledBehavior;\n  }\n\n  /**\n   * Extends the selection to the given key.\n   */\n  extendSelection(toKey: Key): void {\n    if (this.selectionMode === 'none') {\n      return;\n    }\n\n    if (this.selectionMode === 'single') {\n      this.replaceSelection(toKey);\n      return;\n    }\n\n    let mappedToKey = this.getKey(toKey);\n    if (mappedToKey == null) {\n      return;\n    }\n\n    let selection: Selection;\n\n    // Only select the one key if coming from a select all.\n    if (this.state.selectedKeys === 'all') {\n      selection = new Selection([mappedToKey], mappedToKey, mappedToKey);\n    } else {\n      let selectedKeys = this.state.selectedKeys as Selection;\n      let anchorKey = selectedKeys.anchorKey ?? mappedToKey;\n      selection = new Selection(selectedKeys, anchorKey, mappedToKey);\n      for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey ?? mappedToKey)) {\n        selection.delete(key);\n      }\n\n      for (let key of this.getKeyRange(mappedToKey, anchorKey)) {\n        if (this.canSelectItem(key)) {\n          selection.add(key);\n        }\n      }\n    }\n\n    this.state.setSelectedKeys(selection);\n  }\n\n  private getKeyRange(from: Key, to: Key) {\n    let fromItem = this.collection.getItem(from);\n    let toItem = this.collection.getItem(to);\n    if (fromItem && toItem) {\n      if (compareNodeOrder(this.collection, fromItem, toItem) <= 0) {\n        return this.getKeyRangeInternal(from, to);\n      }\n\n      return this.getKeyRangeInternal(to, from);\n    }\n\n    return [];\n  }\n\n  private getKeyRangeInternal(from: Key, to: Key) {\n    if (this.layoutDelegate?.getKeyRange) {\n      return this.layoutDelegate.getKeyRange(from, to);\n    }\n\n    let keys: Key[] = [];\n    let key: Key | null = from;\n    while (key != null) {\n      let item = this.collection.getItem(key);\n      if (item && (item.type === 'item' || (item.type === 'cell' && this.allowsCellSelection))) {\n        keys.push(key);\n      }\n\n      if (key === to) {\n        return keys;\n      }\n\n      key = this.collection.getKeyAfter(key);\n    }\n\n    return [];\n  }\n\n  private getKey(key: Key) {\n    let item = this.collection.getItem(key);\n    if (!item) {\n      // ¯\\_(ツ)_/¯\n      return key;\n    }\n\n    // If cell selection is allowed, just return the key.\n    if (item.type === 'cell' && this.allowsCellSelection) {\n      return key;\n    }\n\n    // Find a parent item to select\n    while (item && item.type !== 'item' && item.parentKey != null) {\n      item = this.collection.getItem(item.parentKey);\n    }\n\n    if (!item || item.type !== 'item') {\n      return null;\n    }\n\n    return item.key;\n  }\n\n  /**\n   * Toggles whether the given key is selected.\n   */\n  toggleSelection(key: Key): void {\n    if (this.selectionMode === 'none') {\n      return;\n    }\n\n    if (this.selectionMode === 'single' && !this.isSelected(key)) {\n      this.replaceSelection(key);\n      return;\n    }\n\n    let mappedKey = this.getKey(key);\n    if (mappedKey == null) {\n      return;\n    }\n\n    let keys = new Selection(this.state.selectedKeys === 'all' ? this.getSelectAllKeys() : this.state.selectedKeys);\n    if (keys.has(mappedKey)) {\n      keys.delete(mappedKey);\n      // TODO: move anchor to last selected key...\n      // Does `current` need to move here too?\n    } else if (this.canSelectItem(mappedKey)) {\n      keys.add(mappedKey);\n      keys.anchorKey = mappedKey;\n      keys.currentKey = mappedKey;\n    }\n\n    if (this.disallowEmptySelection && keys.size === 0) {\n      return;\n    }\n\n    this.state.setSelectedKeys(keys);\n  }\n\n  /**\n   * Replaces the selection with only the given key.\n   */\n  replaceSelection(key: Key): void {\n    if (this.selectionMode === 'none') {\n      return;\n    }\n\n    let mappedKey = this.getKey(key);\n    if (mappedKey == null) {\n      return;\n    }\n\n    let selection = this.canSelectItem(mappedKey)\n      ? new Selection([mappedKey], mappedKey, mappedKey)\n      : new Selection();\n\n    this.state.setSelectedKeys(selection);\n  }\n\n  /**\n   * Replaces the selection with the given keys.\n   */\n  setSelectedKeys(keys: Iterable<Key>): void {\n    if (this.selectionMode === 'none') {\n      return;\n    }\n\n    let selection = new Selection();\n    for (let key of keys) {\n      let mappedKey = this.getKey(key);\n      if (mappedKey != null) {\n        selection.add(mappedKey);\n        if (this.selectionMode === 'single') {\n          break;\n        }\n      }\n    }\n\n    this.state.setSelectedKeys(selection);\n  }\n\n  private getSelectAllKeys() {\n    let keys: Key[] = [];\n    let addKeys = (key: Key | null) => {\n      while (key != null) {\n        if (this.canSelectItem(key)) {\n          let item = this.collection.getItem(key);\n          if (item?.type === 'item') {\n            keys.push(key);\n          }\n\n          // Add child keys. If cell selection is allowed, then include item children too.\n          if (item?.hasChildNodes && (this.allowsCellSelection || item.type !== 'item')) {\n            addKeys(getFirstItem(getChildNodes(item, this.collection))?.key ?? null);\n          }\n        }\n\n        key = this.collection.getKeyAfter(key);\n      }\n    };\n\n    addKeys(this.collection.getFirstKey());\n    return keys;\n  }\n\n  /**\n   * Selects all items in the collection.\n   */\n  selectAll(): void {\n    if (!this.isSelectAll && this.selectionMode === 'multiple') {\n      this.state.setSelectedKeys('all');\n    }\n  }\n\n  /**\n   * Removes all keys from the selection.\n   */\n  clearSelection(): void {\n    if (!this.disallowEmptySelection && (this.state.selectedKeys === 'all' || this.state.selectedKeys.size > 0)) {\n      this.state.setSelectedKeys(new Selection());\n    }\n  }\n\n  /**\n   * Toggles between select all and an empty selection.\n   */\n  toggleSelectAll(): void {\n    if (this.isSelectAll) {\n      this.clearSelection();\n    } else {\n      this.selectAll();\n    }\n  }\n\n  select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void {\n    if (this.selectionMode === 'none') {\n      return;\n    }\n\n    if (this.selectionMode === 'single') {\n      if (this.isSelected(key) && !this.disallowEmptySelection) {\n        this.toggleSelection(key);\n      } else {\n        this.replaceSelection(key);\n      }\n    } else if (this.selectionBehavior === 'toggle' || (e && (e.pointerType === 'touch' || e.pointerType === 'virtual'))) {\n      // if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys\n      this.toggleSelection(key);\n    } else {\n      this.replaceSelection(key);\n    }\n  }\n\n  /**\n   * Returns whether the current selection is equal to the given selection.\n   */\n  isSelectionEqual(selection: Set<Key>): boolean {\n    if (selection === this.state.selectedKeys) {\n      return true;\n    }\n\n    // Check if the set of keys match.\n    let selectedKeys = this.selectedKeys;\n    if (selection.size !== selectedKeys.size) {\n      return false;\n    }\n\n    for (let key of selection) {\n      if (!selectedKeys.has(key)) {\n        return false;\n      }\n    }\n\n    for (let key of selectedKeys) {\n      if (!selection.has(key)) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  canSelectItem(key: Key): boolean {\n    if (this.state.selectionMode === 'none' || this.state.disabledKeys.has(key)) {\n      return false;\n    }\n\n    let item = this.collection.getItem(key);\n    if (!item || item?.props?.isDisabled || (item.type === 'cell' && !this.allowsCellSelection)) {\n      return false;\n    }\n\n    return true;\n  }\n\n  isDisabled(key: Key): boolean {\n    return this.state.disabledBehavior === 'all' && (this.state.disabledKeys.has(key) || !!this.collection.getItem(key)?.props?.isDisabled);\n  }\n\n  isLink(key: Key): boolean {\n    return !!this.collection.getItem(key)?.props?.href;\n  }\n\n  getItemProps(key: Key): any {\n    return this.collection.getItem(key)?.props;\n  }\n\n  withCollection(collection: Collection<Node<unknown>>): SelectionManager {\n    return new SelectionManager(collection, this.state, {\n      allowsCellSelection: this.allowsCellSelection,\n      layoutDelegate: this.layoutDelegate || undefined\n    });\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","// src/index.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? useLayoutEffect : useEffect;\nexport {\n  useSafeLayoutEffect\n};\n","\"use client\";\n\n// src/button-group-context.ts\nimport { createContext } from \"@heroui/react-utils\";\nvar [ButtonGroupProvider, useButtonGroupContext] = createContext({\n  name: \"ButtonGroupContext\",\n  strict: false\n});\n\nexport {\n  ButtonGroupProvider,\n  useButtonGroupContext\n};\n","\"use client\";\nimport {\n  useButtonGroupContext\n} from \"./chunk-3SAWKTTV.mjs\";\n\n// src/use-button.ts\nimport { useProviderContext } from \"@heroui/system\";\nimport { dataAttr } from \"@heroui/shared-utils\";\nimport { useCallback } from \"react\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { chain, mergeProps } from \"@react-aria/utils\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { button } from \"@heroui/theme\";\nimport { isValidElement, cloneElement, useMemo } from \"react\";\nimport { useAriaButton } from \"@heroui/use-aria-button\";\nimport { useHover } from \"@react-aria/interactions\";\nimport { useRipple } from \"@heroui/ripple\";\nfunction useButton(props) {\n  var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n  const groupContext = useButtonGroupContext();\n  const globalContext = useProviderContext();\n  const isInGroup = !!groupContext;\n  const {\n    ref,\n    as,\n    children,\n    startContent: startContentProp,\n    endContent: endContentProp,\n    autoFocus,\n    className,\n    spinner,\n    isLoading = false,\n    disableRipple: disableRippleProp = false,\n    fullWidth = (_a = groupContext == null ? void 0 : groupContext.fullWidth) != null ? _a : false,\n    radius = groupContext == null ? void 0 : groupContext.radius,\n    size = (_b = groupContext == null ? void 0 : groupContext.size) != null ? _b : \"md\",\n    color = (_c = groupContext == null ? void 0 : groupContext.color) != null ? _c : \"default\",\n    variant = (_d = groupContext == null ? void 0 : groupContext.variant) != null ? _d : \"solid\",\n    disableAnimation = (_f = (_e = groupContext == null ? void 0 : groupContext.disableAnimation) != null ? _e : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _f : false,\n    isDisabled: isDisabledProp = (_g = groupContext == null ? void 0 : groupContext.isDisabled) != null ? _g : false,\n    isIconOnly = (_h = groupContext == null ? void 0 : groupContext.isIconOnly) != null ? _h : false,\n    spinnerPlacement = \"start\",\n    onPress,\n    onClick,\n    ...otherProps\n  } = props;\n  const Component = as || \"button\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const disableRipple = (_i = disableRippleProp || (globalContext == null ? void 0 : globalContext.disableRipple)) != null ? _i : disableAnimation;\n  const { isFocusVisible, isFocused, focusProps } = useFocusRing({\n    autoFocus\n  });\n  const isDisabled = isDisabledProp || isLoading;\n  const styles = useMemo(\n    () => button({\n      size,\n      color,\n      variant,\n      radius,\n      fullWidth,\n      isDisabled,\n      isInGroup,\n      disableAnimation,\n      isIconOnly,\n      className\n    }),\n    [\n      size,\n      color,\n      variant,\n      radius,\n      fullWidth,\n      isDisabled,\n      isInGroup,\n      isIconOnly,\n      disableAnimation,\n      className\n    ]\n  );\n  const { onPress: onRipplePressHandler, onClear: onClearRipple, ripples } = useRipple();\n  const handlePress = useCallback(\n    (e) => {\n      if (disableRipple || isDisabled || disableAnimation) return;\n      domRef.current && onRipplePressHandler(e);\n    },\n    [disableRipple, isDisabled, disableAnimation, domRef, onRipplePressHandler]\n  );\n  const { buttonProps: ariaButtonProps, isPressed } = useAriaButton(\n    {\n      elementType: as,\n      isDisabled,\n      onPress: chain(onPress, handlePress),\n      onClick,\n      ...otherProps\n    },\n    domRef\n  );\n  const { isHovered, hoverProps } = useHover({ isDisabled });\n  const getButtonProps = useCallback(\n    (props2 = {}) => ({\n      \"data-disabled\": dataAttr(isDisabled),\n      \"data-focus\": dataAttr(isFocused),\n      \"data-pressed\": dataAttr(isPressed),\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-hover\": dataAttr(isHovered),\n      \"data-loading\": dataAttr(isLoading),\n      ...mergeProps(\n        ariaButtonProps,\n        focusProps,\n        hoverProps,\n        filterDOMProps(otherProps, {\n          enabled: shouldFilterDOMProps\n        }),\n        filterDOMProps(props2)\n      ),\n      className: styles\n    }),\n    [\n      isLoading,\n      isDisabled,\n      isFocused,\n      isPressed,\n      shouldFilterDOMProps,\n      isFocusVisible,\n      isHovered,\n      ariaButtonProps,\n      focusProps,\n      hoverProps,\n      otherProps,\n      styles\n    ]\n  );\n  const getIconClone = (icon) => isValidElement(icon) ? cloneElement(icon, {\n    // @ts-ignore\n    \"aria-hidden\": true,\n    focusable: false\n  }) : null;\n  const startContent = getIconClone(startContentProp);\n  const endContent = getIconClone(endContentProp);\n  const spinnerSize = useMemo(() => {\n    const buttonSpinnerSizeMap = {\n      sm: \"sm\",\n      md: \"sm\",\n      lg: \"md\"\n    };\n    return buttonSpinnerSizeMap[size];\n  }, [size]);\n  const getRippleProps = useCallback(\n    () => ({ ripples, onClear: onClearRipple }),\n    [ripples, onClearRipple]\n  );\n  return {\n    Component,\n    children,\n    domRef,\n    spinner,\n    styles,\n    startContent,\n    endContent,\n    isLoading,\n    spinnerPlacement,\n    spinnerSize,\n    disableRipple,\n    getButtonProps,\n    getRippleProps,\n    isIconOnly\n  };\n}\n\nexport {\n  useButton\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LinkDOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n  'id'\n]);\n\nconst labelablePropNames = new Set([\n  'aria-label',\n  'aria-labelledby',\n  'aria-describedby',\n  'aria-details'\n]);\n\n// See LinkDOMProps in dom.d.ts.\nconst linkPropNames = new Set([\n  'href',\n  'hrefLang',\n  'target',\n  'rel',\n  'download',\n  'ping',\n  'referrerPolicy'\n]);\n\ninterface Options {\n  /**\n   * If labelling associated aria properties should be included in the filter.\n   */\n  labelable?: boolean,\n  /** Whether the element is a link and should include DOM props for <a> elements. */\n  isLink?: boolean,\n  /**\n   * A Set of other property names that should be included in the filter.\n   */\n  propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n  let {labelable, isLink, propNames} = opts;\n  let filteredProps = {};\n\n  for (const prop in props) {\n    if (\n      Object.prototype.hasOwnProperty.call(props, prop) && (\n        DOMPropNames.has(prop) ||\n        (labelable && labelablePropNames.has(prop)) ||\n        (isLink && linkPropNames.has(prop)) ||\n        propNames?.has(prop) ||\n        propRe.test(prop)\n      )\n    ) {\n      filteredProps[prop] = props[prop];\n    }\n  }\n\n  return filteredProps;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof document !== 'undefined'\n  ? React.useLayoutEffect\n  : () => {};\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useRef} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport function useEffectEvent<T extends Function>(fn?: T): T {\n  const ref = useRef<T | null | undefined>(null);\n  useLayoutEffect(() => {\n    ref.current = fn;\n  }, [fn]);\n  // @ts-ignore\n  return useCallback<T>((...args) => {\n    const f = ref.current!;\n    return f?.(...args);\n  }, []);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n  return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n  el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n  if (el && 'window' in el && el.window === el) {\n    return el;\n  }\n\n  const doc = getOwnerDocument(el as Element | null | undefined);\n  return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n  return value !== null &&\n    typeof value === 'object' &&\n    'nodeType' in value &&\n    typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n  return isNode(node) &&\n    node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    'host' in node;\n}\n","// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n  node: Node | null | undefined,\n  otherNode: Node | null | undefined\n): boolean {\n  if (!shadowDOM()) {\n    return otherNode && node ? node.contains(otherNode) : false;\n  }\n\n  if (!node || !otherNode) {\n    return false;\n  }\n\n  let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n  while (currentNode !== null) {\n    if (currentNode === node) {\n      return true;\n    }\n\n    if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n      (currentNode as HTMLSlotElement).assignedSlot) {\n      // Element is slotted\n      currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n    } else if (isShadowRoot(currentNode)) {\n      // Element is in shadow root\n      currentNode = currentNode.host;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n  if (!shadowDOM()) {\n    return doc.activeElement;\n  }\n  let activeElement: Element | null = doc.activeElement;\n\n  while (activeElement && 'shadowRoot' in activeElement &&\n  activeElement.shadowRoot?.activeElement) {\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n\n  return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n  if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n    if (event.composedPath) {\n      return event.composedPath()[0] as Element;\n    }\n  }\n  return event.target as Element;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n  element: HTMLElement,\n  scrollTop: number,\n  scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement): void {\n  if (supportsPreventScroll()) {\n    element.focus({preventScroll: true});\n  } else {\n    let scrollableElements = getScrollableElements(element);\n    element.focus();\n    restoreScrollPosition(scrollableElements);\n  }\n}\n\nlet supportsPreventScrollCached: boolean | null = null;\nfunction supportsPreventScroll() {\n  if (supportsPreventScrollCached == null) {\n    supportsPreventScrollCached = false;\n    try {\n      let focusElem = document.createElement('div');\n      focusElem.focus({\n        get preventScroll() {\n          supportsPreventScrollCached = true;\n          return true;\n        }\n      });\n    } catch {\n      // Ignore\n    }\n  }\n\n  return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n  let parent = element.parentNode;\n  let scrollableElements: ScrollableElement[] = [];\n  let rootScrollingElement = document.scrollingElement || document.documentElement;\n\n  while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n    if (\n      parent.offsetHeight < parent.scrollHeight ||\n      parent.offsetWidth < parent.scrollWidth\n    ) {\n      scrollableElements.push({\n        element: parent,\n        scrollTop: parent.scrollTop,\n        scrollLeft: parent.scrollLeft\n      });\n    }\n    parent = parent.parentNode;\n  }\n\n  if (rootScrollingElement instanceof HTMLElement) {\n    scrollableElements.push({\n      element: rootScrollingElement,\n      scrollTop: rootScrollingElement.scrollTop,\n      scrollLeft: rootScrollingElement.scrollLeft\n    });\n  }\n\n  return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n  for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n    element.scrollTop = scrollTop;\n    element.scrollLeft = scrollLeft;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n  if (typeof window === 'undefined' || window.navigator == null) {\n    return false;\n  }\n  return (\n    window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n  ) ||\n  re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n  return typeof window !== 'undefined' && window.navigator != null\n    ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n    : false;\n}\n\nfunction cached(fn: () => boolean) {\n  if (process.env.NODE_ENV === 'test') {\n    return fn;\n  }\n  \n  let res: boolean | null = null;\n  return () => {\n    if (res == null) {\n      res = fn();\n    }\n    return res;\n  };\n}\n\nexport const isMac = cached(function () {\n  return testPlatform(/^Mac/i);\n});\n\nexport const isIPhone = cached(function () {\n  return testPlatform(/^iPhone/i);\n});\n\nexport const isIPad = cached(function () {\n  return testPlatform(/^iPad/i) ||\n    // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n    (isMac() && navigator.maxTouchPoints > 1);\n});\n\nexport const isIOS = cached(function () {\n  return isIPhone() || isIPad();\n});\n\nexport const isAppleDevice = cached(function () {\n  return isMac() || isIOS();\n});\n\nexport const isWebKit = cached(function () {\n  return testUserAgent(/AppleWebKit/i) && !isChrome();\n});\n\nexport const isChrome = cached(function () {\n  return testUserAgent(/Chrome/i);\n});\n\nexport const isAndroid = cached(function () {\n  return testUserAgent(/Android/i);\n});\n\nexport const isFirefox = cached(function () {\n  return testUserAgent(/Firefox/i);\n});\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n  if (typeof window === 'undefined') {\n    return;\n  }\n\n  function isTransitionEvent(event: Event): event is TransitionEvent {\n    return 'propertyName' in event;\n  }\n\n  let onTransitionStart = (e: Event) => {\n    if (!isTransitionEvent(e) || !e.target) {\n      return;\n    }\n    // Add the transitioning property to the list for this element.\n    let transitions = transitionsByElement.get(e.target);\n    if (!transitions) {\n      transitions = new Set();\n      transitionsByElement.set(e.target, transitions);\n\n      // The transitioncancel event must be registered on the element itself, rather than as a global\n      // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n      // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n      e.target.addEventListener('transitioncancel', onTransitionEnd, {\n        once: true\n      });\n    }\n\n    transitions.add(e.propertyName);\n  };\n\n  let onTransitionEnd = (e: Event) => {\n    if (!isTransitionEvent(e) || !e.target) {\n      return;\n    }\n    // Remove property from list of transitioning properties.\n    let properties = transitionsByElement.get(e.target);\n    if (!properties) {\n      return;\n    }\n\n    properties.delete(e.propertyName);\n\n    // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n    if (properties.size === 0) {\n      e.target.removeEventListener('transitioncancel', onTransitionEnd);\n      transitionsByElement.delete(e.target);\n    }\n\n    // If no transitioning elements, call all of the queued callbacks.\n    if (transitionsByElement.size === 0) {\n      for (let cb of transitionCallbacks) {\n        cb();\n      }\n\n      transitionCallbacks.clear();\n    }\n  };\n\n  document.body.addEventListener('transitionrun', onTransitionStart);\n  document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n  if (document.readyState !== 'loading') {\n    setupGlobalEvents();\n  } else {\n    document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n  }\n}\n\n/**\n * Cleans up any elements that are no longer in the document.\n * This is necessary because we can't rely on transitionend events to fire\n * for elements that are removed from the document while transitioning.\n */\nfunction cleanupDetachedElements() {\n  for (const [eventTarget] of transitionsByElement) {\n    // Similar to `eventTarget instanceof Element && !eventTarget.isConnected`, but avoids\n    // the explicit instanceof check, since it may be different in different contexts.\n    if ('isConnected' in eventTarget && !eventTarget.isConnected) {\n      transitionsByElement.delete(eventTarget);\n    }\n  }\n}\n\nexport function runAfterTransition(fn: () => void): void {\n  // Wait one frame to see if an animation starts, e.g. a transition on mount.\n  requestAnimationFrame(() => {\n    cleanupDetachedElements();\n    // If no transitions are running, call the function immediately.\n    // Otherwise, add it to a list of callbacks to run at the end of the animation.\n    if (transitionsByElement.size === 0) {\n      fn();\n    } else {\n      transitionCallbacks.add(fn);\n    }\n  });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof WindowEventMap>(el: Window, type: K, listener: (this: Document, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, fn, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n   \n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n  ref?: MutableRefObject<T | null>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>): void {\n  useLayoutEffect(() => {\n    if (context && context.ref && ref) {\n      context.ref.current = ref.current;\n      return () => {\n        if (context.ref) {\n          context.ref.current = null;\n        }\n      };\n    }\n  });\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n  // JAWS/NVDA with Firefox.\n  if ((event as any).mozInputSource === 0 && event.isTrusted) {\n    return true;\n  }\n\n  // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n  // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n  // to detect TalkBack virtual clicks.\n  if (isAndroid() && (event as PointerEvent).pointerType) {\n    return event.type === 'click' && event.buttons === 1;\n  }\n\n  return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent): boolean {\n  // If the pointer size is zero, then we assume it's from a screen reader.\n  // Android TalkBack double tap will sometimes return a event with width and height of 1\n  // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n  // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n  // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n  // Talkback double tap from Windows Firefox touch screen press\n  return (\n    (!isAndroid() && event.width === 0 && event.height === 0) ||\n    (event.width === 1 &&\n      event.height === 1 &&\n      event.pressure === 0 &&\n      event.detail === 0 &&\n      event.pointerType === 'mouse'\n    )\n  );\n}\n","const focusableElements = [\n  'input:not([disabled]):not([type=hidden])',\n  'select:not([disabled])',\n  'textarea:not([disabled])',\n  'button:not([disabled])',\n  'a[href]',\n  'area[href]',\n  'summary',\n  'iframe',\n  'object',\n  'embed',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable^=\"false\"])'\n];\n\nconst FOCUSABLE_ELEMENT_SELECTOR = focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';\n\nfocusableElements.push('[tabindex]:not([tabindex=\"-1\"]):not([disabled])');\nconst TABBABLE_ELEMENT_SELECTOR = focusableElements.join(':not([hidden]):not([tabindex=\"-1\"]),');\n\nexport function isFocusable(element: Element): boolean {\n  return element.matches(FOCUSABLE_ELEMENT_SELECTOR);\n}\n\nexport function isTabbable(element: Element): boolean {\n  return element.matches(TABBABLE_ELEMENT_SELECTOR);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {focusWithoutScrolling, getOwnerWindow, isFocusable, useEffectEvent, useLayoutEffect} from '@react-aria/utils';\nimport {FocusEvent as ReactFocusEvent, SyntheticEvent, useCallback, useRef} from 'react';\n\n// Turn a native event into a React synthetic event.\nexport function createSyntheticEvent<E extends SyntheticEvent>(nativeEvent: Event): E {\n  let event = nativeEvent as any as E;\n  event.nativeEvent = nativeEvent;\n  event.isDefaultPrevented = () => event.defaultPrevented;\n  // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n  event.isPropagationStopped = () => (event as any).cancelBubble;\n  event.persist = () => {};\n  return event;\n}\n\nexport function setEventTarget(event: Event, target: Element): void {\n  Object.defineProperty(event, 'target', {value: target});\n  Object.defineProperty(event, 'currentTarget', {value: target});\n}\n\nexport function useSyntheticBlurEvent<Target extends Element = Element>(onBlur: (e: ReactFocusEvent<Target>) => void): (e: ReactFocusEvent<Target>) => void {\n  let stateRef = useRef({\n    isFocused: false,\n    observer: null as MutationObserver | null\n  });\n\n  // Clean up MutationObserver on unmount. See below.\n\n  useLayoutEffect(() => {\n    const state = stateRef.current;\n    return () => {\n      if (state.observer) {\n        state.observer.disconnect();\n        state.observer = null;\n      }\n    };\n  }, []);\n\n  let dispatchBlur = useEffectEvent((e: ReactFocusEvent<Target>) => {\n    onBlur?.(e);\n  });\n\n  // This function is called during a React onFocus event.\n  return useCallback((e: ReactFocusEvent<Target>) => {\n    // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n    // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n    // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n    // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n    if (\n      e.target instanceof HTMLButtonElement ||\n      e.target instanceof HTMLInputElement ||\n      e.target instanceof HTMLTextAreaElement ||\n      e.target instanceof HTMLSelectElement\n    ) {\n      stateRef.current.isFocused = true;\n\n      let target = e.target;\n      let onBlurHandler: EventListenerOrEventListenerObject | null = (e) => {\n        stateRef.current.isFocused = false;\n\n        if (target.disabled) {\n          // For backward compatibility, dispatch a (fake) React synthetic event.\n          let event = createSyntheticEvent<ReactFocusEvent<Target>>(e);\n          dispatchBlur(event);\n        }\n\n        // We no longer need the MutationObserver once the target is blurred.\n        if (stateRef.current.observer) {\n          stateRef.current.observer.disconnect();\n          stateRef.current.observer = null;\n        }\n      };\n\n      target.addEventListener('focusout', onBlurHandler, {once: true});\n\n      stateRef.current.observer = new MutationObserver(() => {\n        if (stateRef.current.isFocused && target.disabled) {\n          stateRef.current.observer?.disconnect();\n          let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n          target.dispatchEvent(new FocusEvent('blur', {relatedTarget: relatedTargetEl}));\n          target.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: relatedTargetEl}));\n        }\n      });\n\n      stateRef.current.observer.observe(target, {attributes: true, attributeFilter: ['disabled']});\n    }\n  }, [dispatchBlur]);\n}\n\nexport let ignoreFocusEvent = false;\n\n/**\n * This function prevents the next focus event fired on `target`, without using `event.preventDefault()`.\n * It works by waiting for the series of focus events to occur, and reverts focus back to where it was before.\n * It also makes these events mostly non-observable by using a capturing listener on the window and stopping propagation.\n */\nexport function preventFocus(target: FocusableElement | null): (() => void) | undefined {\n  // The browser will focus the nearest focusable ancestor of our target.\n  while (target && !isFocusable(target)) {\n    target = target.parentElement;\n  }\n\n  let window = getOwnerWindow(target);\n  let activeElement = window.document.activeElement as FocusableElement | null;\n  if (!activeElement || activeElement === target) {\n    return;\n  }\n\n  ignoreFocusEvent = true;\n  let isRefocusing = false;\n  let onBlur = (e: FocusEvent) => {\n    if (e.target === activeElement || isRefocusing) {\n      e.stopImmediatePropagation();\n    }\n  };\n\n  let onFocusOut = (e: FocusEvent) => {\n    if (e.target === activeElement || isRefocusing) {\n      e.stopImmediatePropagation();\n\n      // If there was no focusable ancestor, we don't expect a focus event.\n      // Re-focus the original active element here.\n      if (!target && !isRefocusing) {\n        isRefocusing = true;\n        focusWithoutScrolling(activeElement);\n        cleanup();\n      }\n    }\n  };\n\n  let onFocus = (e: FocusEvent) => {\n    if (e.target === target || isRefocusing) {\n      e.stopImmediatePropagation();\n    }\n  };\n\n  let onFocusIn = (e: FocusEvent) => {\n    if (e.target === target || isRefocusing) {\n      e.stopImmediatePropagation();\n\n      if (!isRefocusing) {\n        isRefocusing = true;\n        focusWithoutScrolling(activeElement);\n        cleanup();\n      }\n    }\n  };\n\n  window.addEventListener('blur', onBlur, true);\n  window.addEventListener('focusout', onFocusOut, true);\n  window.addEventListener('focusin', onFocusIn, true);\n  window.addEventListener('focus', onFocus, true);\n\n  let cleanup = () => {\n    cancelAnimationFrame(raf);\n    window.removeEventListener('blur', onBlur, true);\n    window.removeEventListener('focusout', onFocusOut, true);\n    window.removeEventListener('focusin', onFocusIn, true);\n    window.removeEventListener('focus', onFocus, true);\n    ignoreFocusEvent = false;\n    isRefocusing = false;\n  };\n\n  let raf = requestAnimationFrame(cleanup);\n  return cleanup;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOwnerDocument, isIOS, runAfterTransition} from '@react-aria/utils';\n\n// Safari on iOS starts selecting text on long press. The only way to avoid this, it seems,\n// is to add user-select: none to the entire page. Adding it to the pressable element prevents\n// that element from being selected, but nearby elements may still receive selection. We add\n// user-select: none on touch start, and remove it again on touch end to prevent this.\n// This must be implemented using global state to avoid race conditions between multiple elements.\n\n// There are three possible states due to the delay before removing user-select: none after\n// pointer up. The 'default' state always transitions to the 'disabled' state, which transitions\n// to 'restoring'. The 'restoring' state can either transition back to 'disabled' or 'default'.\n\n// For non-iOS devices, we apply user-select: none to the pressed element instead to avoid possible\n// performance issues that arise from applying and removing user-select: none to the entire page\n// (see https://github.com/adobe/react-spectrum/issues/1609).\ntype State = 'default' | 'disabled' | 'restoring';\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet state: State = 'default';\nlet savedUserSelect = '';\nlet modifiedElementMap = new WeakMap<Element, string>();\n\nexport function disableTextSelection(target?: Element): void {\n  if (isIOS()) {\n    if (state === 'default') {\n\n      const documentObject = getOwnerDocument(target);\n      savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n      documentObject.documentElement.style.webkitUserSelect = 'none';\n    }\n\n    state = 'disabled';\n  } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n    // If not iOS, store the target's original user-select and change to user-select: none\n    // Ignore state since it doesn't apply for non iOS\n    let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n    modifiedElementMap.set(target, target.style[property]);\n    target.style[property] = 'none';\n  }\n}\n\nexport function restoreTextSelection(target?: Element): void {\n  if (isIOS()) {\n    // If the state is already default, there's nothing to do.\n    // If it is restoring, then there's no need to queue a second restore.\n    if (state !== 'disabled') {\n      return;\n    }\n\n    state = 'restoring';\n\n    // There appears to be a delay on iOS where selection still might occur\n    // after pointer up, so wait a bit before removing user-select.\n    setTimeout(() => {\n      // Wait for any CSS transitions to complete so we don't recompute style\n      // for the whole page in the middle of the animation and cause jank.\n      runAfterTransition(() => {\n        // Avoid race conditions\n        if (state === 'restoring') {\n\n          const documentObject = getOwnerDocument(target);\n          if (documentObject.documentElement.style.webkitUserSelect === 'none') {\n            documentObject.documentElement.style.webkitUserSelect = savedUserSelect || '';\n          }\n\n          savedUserSelect = '';\n          state = 'default';\n        }\n      });\n    }, 300);\n  } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n    // If not iOS, restore the target's original user-select if any\n    // Ignore state since it doesn't apply for non iOS\n    if (target && modifiedElementMap.has(target)) {\n      let targetOldUserSelect = modifiedElementMap.get(target) as string;\n      let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n\n      if (target.style[property] === 'none') {\n        target.style[property] = targetOldUserSelect;\n      }\n\n      if (target.getAttribute('style') === '') {\n        target.removeAttribute('style');\n      }\n      modifiedElementMap.delete(target);\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n  register(): void,\n  ref?: MutableRefObject<FocusableElement>\n}\n\nexport const PressResponderContext = React.createContext<IPressResponderContext>({register: () => {}});\nPressResponderContext.displayName = 'PressResponderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {\n  chain,\n  focusWithoutScrolling,\n  getEventTarget,\n  getOwnerDocument,\n  getOwnerWindow,\n  isMac,\n  isVirtualClick,\n  isVirtualPointerEvent,\n  mergeProps,\n  nodeContains,\n  openLink,\n  useEffectEvent,\n  useGlobalListeners,\n  useSyncRef\n} from '@react-aria/utils';\nimport {createSyntheticEvent, preventFocus, setEventTarget} from './utils';\nimport {disableTextSelection, restoreTextSelection} from './textSelection';\nimport {DOMAttributes, FocusableElement, PressEvent as IPressEvent, PointerType, PressEvents, RefObject} from '@react-types/shared';\nimport {flushSync} from 'react-dom';\nimport {PressResponderContext} from './context';\nimport {MouseEvent as RMouseEvent, TouchEvent as RTouchEvent, useContext, useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface PressProps extends PressEvents {\n  /** Whether the target is in a controlled press state (e.g. an overlay it triggers is open). */\n  isPressed?: boolean,\n  /** Whether the press events should be disabled. */\n  isDisabled?: boolean,\n  /** Whether the target should not receive focus on press. */\n  preventFocusOnPress?: boolean,\n  /**\n   * Whether press events should be canceled when the pointer leaves the target while pressed.\n   * By default, this is `false`, which means if the pointer returns back over the target while\n   * still pressed, onPressStart will be fired again. If set to `true`, the press is canceled\n   * when the pointer leaves the target and onPressStart will not be fired if the pointer returns.\n   */\n  shouldCancelOnPointerExit?: boolean,\n  /** Whether text selection should be enabled on the pressable element. */\n  allowTextSelectionOnPress?: boolean\n}\n\nexport interface PressHookProps extends PressProps {\n  /** A ref to the target element. */\n  ref?: RefObject<Element | null>\n}\n\ninterface PressState {\n  isPressed: boolean,\n  ignoreEmulatedMouseEvents: boolean,\n  didFirePressStart: boolean,\n  isTriggeringEvent: boolean,\n  activePointerId: any,\n  target: FocusableElement | null,\n  isOverTarget: boolean,\n  pointerType: PointerType | null,\n  userSelect?: string,\n  metaKeyEvents?: Map<string, KeyboardEvent>,\n  disposables: Array<() => void>\n}\n\ninterface EventBase {\n  currentTarget: EventTarget | null,\n  shiftKey: boolean,\n  ctrlKey: boolean,\n  metaKey: boolean,\n  altKey: boolean,\n  clientX?: number,\n  clientY?: number,\n  targetTouches?: Array<{clientX?: number, clientY?: number}>\n}\n\nexport interface PressResult {\n  /** Whether the target is currently pressed. */\n  isPressed: boolean,\n  /** Props to spread on the target element. */\n  pressProps: DOMAttributes\n}\n\nfunction usePressResponderContext(props: PressHookProps): PressHookProps {\n  // Consume context from <PressResponder> and merge with props.\n  let context = useContext(PressResponderContext);\n  if (context) {\n    let {register, ...contextProps} = context;\n    props = mergeProps(contextProps, props) as PressHookProps;\n    register();\n  }\n  useSyncRef(context, props.ref);\n\n  return props;\n}\n\nclass PressEvent implements IPressEvent {\n  type: IPressEvent['type'];\n  pointerType: PointerType;\n  target: Element;\n  shiftKey: boolean;\n  ctrlKey: boolean;\n  metaKey: boolean;\n  altKey: boolean;\n  x: number;\n  y: number;\n  #shouldStopPropagation = true;\n\n  constructor(type: IPressEvent['type'], pointerType: PointerType, originalEvent: EventBase, state?: PressState) {\n    let currentTarget = state?.target ?? originalEvent.currentTarget;\n    const rect: DOMRect | undefined = (currentTarget as Element)?.getBoundingClientRect();\n    let x, y = 0;\n    let clientX, clientY: number | null = null;\n    if (originalEvent.clientX != null && originalEvent.clientY != null) {\n      clientX = originalEvent.clientX;\n      clientY = originalEvent.clientY;\n    }\n    if (rect) {\n      if (clientX != null && clientY != null) {\n        x = clientX - rect.left;\n        y = clientY - rect.top;\n      } else {\n        x = rect.width / 2;\n        y = rect.height / 2;\n      }\n    }\n    this.type = type;\n    this.pointerType = pointerType;\n    this.target = originalEvent.currentTarget as Element;\n    this.shiftKey = originalEvent.shiftKey;\n    this.metaKey = originalEvent.metaKey;\n    this.ctrlKey = originalEvent.ctrlKey;\n    this.altKey = originalEvent.altKey;\n    this.x = x;\n    this.y = y;\n  }\n\n  continuePropagation() {\n    this.#shouldStopPropagation = false;\n  }\n\n  get shouldStopPropagation() {\n    return this.#shouldStopPropagation;\n  }\n}\n\nconst LINK_CLICKED = Symbol('linkClicked');\n\n/**\n * Handles press interactions across mouse, touch, keyboard, and screen readers.\n * It normalizes behavior across browsers and platforms, and handles many nuances\n * of dealing with pointer and keyboard events.\n */\nexport function usePress(props: PressHookProps): PressResult {\n  let {\n    onPress,\n    onPressChange,\n    onPressStart,\n    onPressEnd,\n    onPressUp,\n    onClick,\n    isDisabled,\n    isPressed: isPressedProp,\n    preventFocusOnPress,\n    shouldCancelOnPointerExit,\n    allowTextSelectionOnPress,\n    ref: domRef,\n    ...domProps\n  } = usePressResponderContext(props);\n\n  let [isPressed, setPressed] = useState(false);\n  let ref = useRef<PressState>({\n    isPressed: false,\n    ignoreEmulatedMouseEvents: false,\n    didFirePressStart: false,\n    isTriggeringEvent: false,\n    activePointerId: null,\n    target: null,\n    isOverTarget: false,\n    pointerType: null,\n    disposables: []\n  });\n\n  let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n  let triggerPressStart = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n    let state = ref.current;\n    if (isDisabled || state.didFirePressStart) {\n      return false;\n    }\n\n    let shouldStopPropagation = true;\n    state.isTriggeringEvent = true;\n    if (onPressStart) {\n      let event = new PressEvent('pressstart', pointerType, originalEvent);\n      onPressStart(event);\n      shouldStopPropagation = event.shouldStopPropagation;\n    }\n\n    if (onPressChange) {\n      onPressChange(true);\n    }\n\n    state.isTriggeringEvent = false;\n    state.didFirePressStart = true;\n    setPressed(true);\n    return shouldStopPropagation;\n  });\n\n  let triggerPressEnd = useEffectEvent((originalEvent: EventBase, pointerType: PointerType, wasPressed = true) => {\n    let state = ref.current;\n    if (!state.didFirePressStart) {\n      return false;\n    }\n\n    state.didFirePressStart = false;\n    state.isTriggeringEvent = true;\n\n    let shouldStopPropagation = true;\n    if (onPressEnd) {\n      let event = new PressEvent('pressend', pointerType, originalEvent);\n      onPressEnd(event);\n      shouldStopPropagation = event.shouldStopPropagation;\n    }\n\n    if (onPressChange) {\n      onPressChange(false);\n    }\n\n    setPressed(false);\n\n    if (onPress && wasPressed && !isDisabled) {\n      let event = new PressEvent('press', pointerType, originalEvent);\n      onPress(event);\n      shouldStopPropagation &&= event.shouldStopPropagation;\n    }\n\n    state.isTriggeringEvent = false;\n    return shouldStopPropagation;\n  });\n\n  let triggerPressUp = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n    let state = ref.current;\n    if (isDisabled) {\n      return false;\n    }\n\n    if (onPressUp) {\n      state.isTriggeringEvent = true;\n      let event = new PressEvent('pressup', pointerType, originalEvent);\n      onPressUp(event);\n      state.isTriggeringEvent = false;\n      return event.shouldStopPropagation;\n    }\n\n    return true;\n  });\n\n  let cancel = useEffectEvent((e: EventBase) => {\n    let state = ref.current;\n    if (state.isPressed && state.target) {\n      if (state.didFirePressStart && state.pointerType != null) {\n        triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n      }\n      state.isPressed = false;\n      state.isOverTarget = false;\n      state.activePointerId = null;\n      state.pointerType = null;\n      removeAllGlobalListeners();\n      if (!allowTextSelectionOnPress) {\n        restoreTextSelection(state.target);\n      }\n      for (let dispose of state.disposables) {\n        dispose();\n      }\n      state.disposables = [];\n    }\n  });\n\n  let cancelOnPointerExit = useEffectEvent((e: EventBase) => {\n    if (shouldCancelOnPointerExit) {\n      cancel(e);\n    }\n  });\n\n  let triggerClick = useEffectEvent((e: RMouseEvent<FocusableElement>) => {\n    onClick?.(e);\n  });\n\n  let triggerSyntheticClick = useEffectEvent((e: KeyboardEvent | TouchEvent, target: FocusableElement) => {\n    // Some third-party libraries pass in onClick instead of onPress.\n    // Create a fake mouse event and trigger onClick as well.\n    // This matches the browser's native activation behavior for certain elements (e.g. button).\n    // https://html.spec.whatwg.org/#activation\n    // https://html.spec.whatwg.org/#fire-a-synthetic-pointer-event\n    if (onClick) {\n      let event = new MouseEvent('click', e);\n      setEventTarget(event, target);\n      onClick(createSyntheticEvent(event));\n    }\n  });\n\n  let pressProps = useMemo(() => {\n    let state = ref.current;\n    let pressProps: DOMAttributes = {\n      onKeyDown(e) {\n        if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          if (shouldPreventDefaultKeyboard(getEventTarget(e.nativeEvent), e.key)) {\n            e.preventDefault();\n          }\n\n          // If the event is repeating, it may have started on a different element\n          // after which focus moved to the current element. Ignore these events and\n          // only handle the first key down event.\n          let shouldStopPropagation = true;\n          if (!state.isPressed && !e.repeat) {\n            state.target = e.currentTarget;\n            state.isPressed = true;\n            state.pointerType = 'keyboard';\n            shouldStopPropagation = triggerPressStart(e, 'keyboard');\n\n            // Focus may move before the key up event, so register the event on the document\n            // instead of the same element where the key down event occurred. Make it capturing so that it will trigger\n            // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.\n            let originalTarget = e.currentTarget;\n            let pressUp = (e) => {\n              if (isValidKeyboardEvent(e, originalTarget) && !e.repeat && nodeContains(originalTarget, getEventTarget(e)) && state.target) {\n                triggerPressUp(createEvent(state.target, e), 'keyboard');\n              }\n            };\n\n            addGlobalListener(getOwnerDocument(e.currentTarget), 'keyup', chain(pressUp, onKeyUp), true);\n          }\n\n          if (shouldStopPropagation) {\n            e.stopPropagation();\n          }\n\n          // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.\n          // macOS has a bug where keyup events are not fired while the Meta key is down.\n          // When the Meta key itself is released we will get an event for that, and we'll act as if\n          // all of these other keys were released as well.\n          // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524\n          // https://bugs.webkit.org/show_bug.cgi?id=55291\n          // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553\n          if (e.metaKey && isMac()) {\n            state.metaKeyEvents?.set(e.key, e.nativeEvent);\n          }\n        } else if (e.key === 'Meta') {\n          state.metaKeyEvents = new Map();\n        }\n      },\n      onClick(e) {\n        if (e && !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (e && e.button === 0 && !state.isTriggeringEvent && !(openLink as any).isOpening) {\n          let shouldStopPropagation = true;\n          if (isDisabled) {\n            e.preventDefault();\n          }\n          \n          // If triggered from a screen reader or by using element.click(),\n          // trigger as if it were a keyboard click.\n          if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || isVirtualClick(e.nativeEvent))) {\n            let stopPressStart = triggerPressStart(e, 'virtual');\n            let stopPressUp = triggerPressUp(e, 'virtual');\n            let stopPressEnd = triggerPressEnd(e, 'virtual');\n            triggerClick(e);\n            shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n          } else if (state.isPressed && state.pointerType !== 'keyboard') {\n            let pointerType = state.pointerType || (e.nativeEvent as PointerEvent).pointerType as PointerType || 'virtual';\n            shouldStopPropagation = triggerPressEnd(createEvent(e.currentTarget, e), pointerType, true);\n            state.isOverTarget = false;\n            triggerClick(e);\n            cancel(e);\n          }\n\n          state.ignoreEmulatedMouseEvents = false;\n          if (shouldStopPropagation) {\n            e.stopPropagation();\n          }\n        }\n      }\n    };\n\n    let onKeyUp = (e: KeyboardEvent) => {\n      if (state.isPressed && state.target && isValidKeyboardEvent(e, state.target)) {\n        if (shouldPreventDefaultKeyboard(getEventTarget(e), e.key)) {\n          e.preventDefault();\n        }\n\n        let target = getEventTarget(e);\n        let wasPressed = nodeContains(state.target, getEventTarget(e));\n        triggerPressEnd(createEvent(state.target, e), 'keyboard', wasPressed);\n        if (wasPressed) {\n          triggerSyntheticClick(e, state.target);\n        }\n        removeAllGlobalListeners();\n\n        // If a link was triggered with a key other than Enter, open the URL ourselves.\n        // This means the link has a role override, and the default browser behavior\n        // only applies when using the Enter key.\n        if (e.key !== 'Enter' && isHTMLAnchorLink(state.target) && nodeContains(state.target, target) && !e[LINK_CLICKED]) {\n          // Store a hidden property on the event so we only trigger link click once,\n          // even if there are multiple usePress instances attached to the element.\n          e[LINK_CLICKED] = true;\n          openLink(state.target, e, false);\n        }\n\n        state.isPressed = false;\n        state.metaKeyEvents?.delete(e.key);\n      } else if (e.key === 'Meta' && state.metaKeyEvents?.size) {\n        // If we recorded keydown events that occurred while the Meta key was pressed,\n        // and those haven't received keyup events already, fire keyup events ourselves.\n        // See comment above for more info about the macOS bug causing this.\n        let events = state.metaKeyEvents;\n        state.metaKeyEvents = undefined;\n        for (let event of events.values()) {\n          state.target?.dispatchEvent(new KeyboardEvent('keyup', event));\n        }\n      }\n    };\n\n    if (typeof PointerEvent !== 'undefined') {\n      pressProps.onPointerDown = (e) => {\n        // Only handle left clicks, and ignore events that bubbled through portals.\n        if (e.button !== 0 || !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n        // Ignore and let the onClick handler take care of it instead.\n        // https://bugs.webkit.org/show_bug.cgi?id=222627\n        // https://bugs.webkit.org/show_bug.cgi?id=223202\n        if (isVirtualPointerEvent(e.nativeEvent)) {\n          state.pointerType = 'virtual';\n          return;\n        }\n\n        state.pointerType = e.pointerType;\n\n        let shouldStopPropagation = true;\n        if (!state.isPressed) {\n          state.isPressed = true;\n          state.isOverTarget = true;\n          state.activePointerId = e.pointerId;\n          state.target = e.currentTarget as FocusableElement;\n\n          if (!allowTextSelectionOnPress) {\n            disableTextSelection(state.target);\n          }\n\n          shouldStopPropagation = triggerPressStart(e, state.pointerType);\n\n          // Release pointer capture so that touch interactions can leave the original target.\n          // This enables onPointerLeave and onPointerEnter to fire.\n          let target = getEventTarget(e.nativeEvent);\n          if ('releasePointerCapture' in target) {\n            target.releasePointerCapture(e.pointerId);\n          }\n\n          addGlobalListener(getOwnerDocument(e.currentTarget), 'pointerup', onPointerUp, false);\n          addGlobalListener(getOwnerDocument(e.currentTarget), 'pointercancel', onPointerCancel, false);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseDown = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (e.button === 0) {\n          if (preventFocusOnPress) {\n            let dispose = preventFocus(e.target as FocusableElement);\n            if (dispose) {\n              state.disposables.push(dispose);\n            }\n          }\n\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onPointerUp = (e) => {\n        // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent)) || state.pointerType === 'virtual') {\n          return;\n        }\n\n        // Only handle left clicks\n        if (e.button === 0) {\n          triggerPressUp(e, state.pointerType || e.pointerType);\n        }\n      };\n\n      pressProps.onPointerEnter = (e) => {\n        if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = true;\n          triggerPressStart(createEvent(state.target, e), state.pointerType);\n        }\n      };\n\n      pressProps.onPointerLeave = (e) => {\n        if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = false;\n          triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n          cancelOnPointerExit(e);\n        }\n      };\n\n      let onPointerUp = (e: PointerEvent) => {\n        if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {\n          if (nodeContains(state.target, getEventTarget(e)) && state.pointerType != null) {\n            // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n            // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.\n            // https://github.com/adobe/react-spectrum/issues/1513\n            // https://issues.chromium.org/issues/40732224\n            // However, iOS and Android do not focus or fire onClick after a long press.\n            // We work around this by triggering a click ourselves after a timeout.\n            // This timeout is canceled during the click event in case the real one fires first.\n            // The timeout must be at least 32ms, because Safari on iOS delays the click event on\n            // non-form elements without certain ARIA roles (for hover emulation).\n            // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892\n            let clicked = false;\n            let timeout = setTimeout(() => {\n              if (state.isPressed && state.target instanceof HTMLElement) {\n                if (clicked) {\n                  cancel(e);\n                } else {\n                  focusWithoutScrolling(state.target);\n                  state.target.click();\n                }\n              }\n            }, 80);\n            // Use a capturing listener to track if a click occurred.\n            // If stopPropagation is called it may never reach our handler.\n            addGlobalListener(e.currentTarget as Document, 'click', () => clicked = true, true);\n            state.disposables.push(() => clearTimeout(timeout));\n          } else {\n            cancel(e);\n          }\n\n          // Ignore subsequent onPointerLeave event before onClick on touch devices.\n          state.isOverTarget = false;\n        }\n      };\n\n      let onPointerCancel = (e: PointerEvent) => {\n        cancel(e);\n      };\n\n      pressProps.onDragStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n        cancel(e);\n      };\n    } else if (process.env.NODE_ENV === 'test') {\n      // NOTE: this fallback branch is entirely used by unit tests.\n      // All browsers now support pointer events, but JSDOM still does not.\n\n      pressProps.onMouseDown = (e) => {\n        // Only handle left clicks\n        if (e.button !== 0 || !nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (state.ignoreEmulatedMouseEvents) {\n          e.stopPropagation();\n          return;\n        }\n\n        state.isPressed = true;\n        state.isOverTarget = true;\n        state.target = e.currentTarget;\n        state.pointerType = isVirtualClick(e.nativeEvent) ? 'virtual' : 'mouse';\n\n        // Flush sync so that focus moved during react re-renders occurs before we yield back to the browser.\n        let shouldStopPropagation = flushSync(() => triggerPressStart(e, state.pointerType!));\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        if (preventFocusOnPress) {\n          let dispose = preventFocus(e.target as FocusableElement);\n          if (dispose) {\n            state.disposables.push(dispose);\n          }\n        }\n\n        addGlobalListener(getOwnerDocument(e.currentTarget), 'mouseup', onMouseUp, false);\n      };\n\n      pressProps.onMouseEnter = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let shouldStopPropagation = true;\n        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n          state.isOverTarget = true;\n          shouldStopPropagation = triggerPressStart(e, state.pointerType);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseLeave = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let shouldStopPropagation = true;\n        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n          state.isOverTarget = false;\n          shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n          cancelOnPointerExit(e);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onMouseUp = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.ignoreEmulatedMouseEvents && e.button === 0) {\n          triggerPressUp(e, state.pointerType || 'mouse');\n        }\n      };\n\n      let onMouseUp = (e: MouseEvent) => {\n        // Only handle left clicks\n        if (e.button !== 0) {\n          return;\n        }\n\n        if (state.ignoreEmulatedMouseEvents) {\n          state.ignoreEmulatedMouseEvents = false;\n          return;\n        }\n\n        if (state.target && state.target.contains(e.target as Element) && state.pointerType != null) {\n          // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n          // is mutated between onMouseUp and onClick, and is more compatible with third party libraries.\n        } else {\n          cancel(e);\n        }\n\n        state.isOverTarget = false;\n      };\n\n      pressProps.onTouchStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        let touch = getTouchFromEvent(e.nativeEvent);\n        if (!touch) {\n          return;\n        }\n        state.activePointerId = touch.identifier;\n        state.ignoreEmulatedMouseEvents = true;\n        state.isOverTarget = true;\n        state.isPressed = true;\n        state.target = e.currentTarget;\n        state.pointerType = 'touch';\n\n        if (!allowTextSelectionOnPress) {\n          disableTextSelection(state.target);\n        }\n\n        let shouldStopPropagation = triggerPressStart(createTouchEvent(state.target, e), state.pointerType);\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        addGlobalListener(getOwnerWindow(e.currentTarget), 'scroll', onScroll, true);\n      };\n\n      pressProps.onTouchMove = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.isPressed) {\n          e.stopPropagation();\n          return;\n        }\n\n        let touch = getTouchById(e.nativeEvent, state.activePointerId);\n        let shouldStopPropagation = true;\n        if (touch && isOverTarget(touch, e.currentTarget)) {\n          if (!state.isOverTarget && state.pointerType != null) {\n            state.isOverTarget = true;\n            shouldStopPropagation = triggerPressStart(createTouchEvent(state.target!, e), state.pointerType);\n          }\n        } else if (state.isOverTarget && state.pointerType != null) {\n          state.isOverTarget = false;\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType, false);\n          cancelOnPointerExit(createTouchEvent(state.target!, e));\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n      };\n\n      pressProps.onTouchEnd = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        if (!state.isPressed) {\n          e.stopPropagation();\n          return;\n        }\n\n        let touch = getTouchById(e.nativeEvent, state.activePointerId);\n        let shouldStopPropagation = true;\n        if (touch && isOverTarget(touch, e.currentTarget) && state.pointerType != null) {\n          triggerPressUp(createTouchEvent(state.target!, e), state.pointerType);\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType);\n          triggerSyntheticClick(e.nativeEvent, state.target!);\n        } else if (state.isOverTarget && state.pointerType != null) {\n          shouldStopPropagation = triggerPressEnd(createTouchEvent(state.target!, e), state.pointerType, false);\n        }\n\n        if (shouldStopPropagation) {\n          e.stopPropagation();\n        }\n\n        state.isPressed = false;\n        state.activePointerId = null;\n        state.isOverTarget = false;\n        state.ignoreEmulatedMouseEvents = true;\n        if (state.target && !allowTextSelectionOnPress) {\n          restoreTextSelection(state.target);\n        }\n        removeAllGlobalListeners();\n      };\n\n      pressProps.onTouchCancel = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        e.stopPropagation();\n        if (state.isPressed) {\n          cancel(createTouchEvent(state.target!, e));\n        }\n      };\n\n      let onScroll = (e: Event) => {\n        if (state.isPressed && nodeContains(getEventTarget(e), state.target)) {\n          cancel({\n            currentTarget: state.target,\n            shiftKey: false,\n            ctrlKey: false,\n            metaKey: false,\n            altKey: false\n          });\n        }\n      };\n\n      pressProps.onDragStart = (e) => {\n        if (!nodeContains(e.currentTarget, getEventTarget(e.nativeEvent))) {\n          return;\n        }\n\n        cancel(e);\n      };\n    }\n\n    return pressProps;\n  }, [\n    addGlobalListener,\n    isDisabled,\n    preventFocusOnPress,\n    removeAllGlobalListeners,\n    allowTextSelectionOnPress,\n    cancel,\n    cancelOnPointerExit,\n    triggerPressEnd,\n    triggerPressStart,\n    triggerPressUp,\n    triggerClick,\n    triggerSyntheticClick\n  ]);\n\n  // Avoid onClick delay for double tap to zoom by default.\n  useEffect(() => {\n    let element = domRef?.current;\n    if (element && (element instanceof getOwnerWindow(element).Element)) {\n      // Only apply touch-action if not already set by another CSS rule.\n      let style = getOwnerWindow(element).getComputedStyle(element);\n      if (style.touchAction === 'auto') {\n        // touchAction: 'manipulation' is supposed to be equivalent, but in \n        // Safari it causes onPointerCancel not to fire on scroll.\n        // https://bugs.webkit.org/show_bug.cgi?id=240917\n        (element as HTMLElement).style.touchAction = 'pan-x pan-y pinch-zoom';\n      }\n    }\n  }, [domRef]);\n\n  // Remove user-select: none in case component unmounts immediately after pressStart\n  useEffect(() => {\n    let state = ref.current;\n    return () => {\n      if (!allowTextSelectionOnPress) {\n        restoreTextSelection(state.target ?? undefined);\n      }\n      for (let dispose of state.disposables) {\n        dispose();\n      }\n      state.disposables = [];\n    };\n  }, [allowTextSelectionOnPress]);\n\n  return {\n    isPressed: isPressedProp || isPressed,\n    pressProps: mergeProps(domProps, pressProps)\n  };\n}\n\nfunction isHTMLAnchorLink(target: Element): target is HTMLAnchorElement {\n  return target.tagName === 'A' && target.hasAttribute('href');\n}\n\nfunction isValidKeyboardEvent(event: KeyboardEvent, currentTarget: Element): boolean {\n  const {key, code} = event;\n  const element = currentTarget as HTMLElement;\n  const role = element.getAttribute('role');\n  // Accessibility for keyboards. Space and Enter only.\n  // \"Spacebar\" is for IE 11\n  return (\n    (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') &&\n    !((element instanceof getOwnerWindow(element).HTMLInputElement && !isValidInputKey(element, key)) ||\n      element instanceof getOwnerWindow(element).HTMLTextAreaElement ||\n      element.isContentEditable) &&\n    // Links should only trigger with Enter key\n    !((role === 'link' || (!role && isHTMLAnchorLink(element))) && key !== 'Enter')\n  );\n}\n\nfunction getTouchFromEvent(event: TouchEvent): Touch | null {\n  const {targetTouches} = event;\n  if (targetTouches.length > 0) {\n    return targetTouches[0];\n  }\n  return null;\n}\n\nfunction getTouchById(\n  event: TouchEvent,\n  pointerId: null | number\n): null | Touch {\n  const changedTouches = event.changedTouches;\n  for (let i = 0; i < changedTouches.length; i++) {\n    const touch = changedTouches[i];\n    if (touch.identifier === pointerId) {\n      return touch;\n    }\n  }\n  return null;\n}\n\nfunction createTouchEvent(target: FocusableElement, e: RTouchEvent<FocusableElement>): EventBase {\n  let clientX = 0;\n  let clientY = 0;\n  if (e.targetTouches && e.targetTouches.length === 1) {\n    clientX = e.targetTouches[0].clientX;\n    clientY = e.targetTouches[0].clientY;\n  }\n  return {\n    currentTarget: target,\n    shiftKey: e.shiftKey,\n    ctrlKey: e.ctrlKey,\n    metaKey: e.metaKey,\n    altKey: e.altKey,\n    clientX,\n    clientY\n  };\n}\n\nfunction createEvent(target: FocusableElement, e: EventBase): EventBase {\n  let clientX = e.clientX;\n  let clientY = e.clientY;\n  return {\n    currentTarget: target,\n    shiftKey: e.shiftKey,\n    ctrlKey: e.ctrlKey,\n    metaKey: e.metaKey,\n    altKey: e.altKey,\n    clientX,\n    clientY\n  };\n}\n\ninterface Rect {\n  top: number,\n  right: number,\n  bottom: number,\n  left: number\n}\n\ninterface EventPoint {\n  clientX: number,\n  clientY: number,\n  width?: number,\n  height?: number,\n  radiusX?: number,\n  radiusY?: number\n}\n\nfunction getPointClientRect(point: EventPoint): Rect {\n  let offsetX = 0;\n  let offsetY = 0;\n  if (point.width !== undefined) {\n    offsetX = (point.width / 2);\n  } else if (point.radiusX !== undefined) {\n    offsetX = point.radiusX;\n  }\n  if (point.height !== undefined) {\n    offsetY = (point.height / 2);\n  } else if (point.radiusY !== undefined) {\n    offsetY = point.radiusY;\n  }\n\n  return {\n    top: point.clientY - offsetY,\n    right: point.clientX + offsetX,\n    bottom: point.clientY + offsetY,\n    left: point.clientX - offsetX\n  };\n}\n\nfunction areRectanglesOverlapping(a: Rect, b: Rect) {\n  // check if they cannot overlap on x axis\n  if (a.left > b.right || b.left > a.right) {\n    return false;\n  }\n  // check if they cannot overlap on y axis\n  if (a.top > b.bottom || b.top > a.bottom) {\n    return false;\n  }\n  return true;\n}\n\nfunction isOverTarget(point: EventPoint, target: Element) {\n  let rect = target.getBoundingClientRect();\n  let pointRect = getPointClientRect(point);\n  return areRectanglesOverlapping(rect, pointRect);\n}\n\nfunction shouldPreventDefaultUp(target: Element) {\n  if (target instanceof HTMLInputElement) {\n    return false;\n  }\n\n  if (target instanceof HTMLButtonElement) {\n    return target.type !== 'submit' && target.type !== 'reset';\n  }\n\n  if (isHTMLAnchorLink(target)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction shouldPreventDefaultKeyboard(target: Element, key: string) {\n  if (target instanceof HTMLInputElement) {\n    return !isValidInputKey(target, key);\n  }\n\n  return shouldPreventDefaultUp(target);\n}\n\nconst nonTextInputTypes = new Set([\n  'checkbox',\n  'radio',\n  'range',\n  'color',\n  'file',\n  'image',\n  'button',\n  'submit',\n  'reset'\n]);\n\nfunction isValidInputKey(target: HTMLInputElement, key: string) {\n  // Only space should toggle checkboxes and radios, not enter.\n  return target.type === 'checkbox' || target.type === 'radio'\n    ? key === ' '\n    : nonTextInputTypes.has(target.type);\n}\n","// src/index.ts\nimport { filterDOMProps, mergeProps } from \"@react-aria/utils\";\nimport { useFocusable } from \"@react-aria/focus\";\nimport { usePress } from \"@react-aria/interactions\";\nfunction useAriaButton(props, ref) {\n  let {\n    elementType = \"button\",\n    isDisabled,\n    onPress,\n    onPressStart,\n    onPressEnd,\n    onPressChange,\n    // @ts-ignore - undocumented\n    preventFocusOnPress,\n    // @ts-ignore - undocumented\n    allowFocusWhenDisabled,\n    onClick,\n    href,\n    target,\n    rel,\n    type = \"button\",\n    allowTextSelectionOnPress\n  } = props;\n  let additionalProps;\n  if (elementType === \"button\") {\n    additionalProps = {\n      type,\n      disabled: isDisabled\n    };\n  } else {\n    additionalProps = {\n      role: \"button\",\n      href: elementType === \"a\" && !isDisabled ? href : void 0,\n      target: elementType === \"a\" ? target : void 0,\n      type: elementType === \"input\" ? type : void 0,\n      disabled: elementType === \"input\" ? isDisabled : void 0,\n      \"aria-disabled\": !isDisabled || elementType === \"input\" ? void 0 : isDisabled,\n      rel: elementType === \"a\" ? rel : void 0\n    };\n  }\n  let { pressProps, isPressed } = usePress({\n    onClick,\n    onPressStart,\n    onPressEnd,\n    onPressChange,\n    onPress,\n    isDisabled,\n    preventFocusOnPress,\n    allowTextSelectionOnPress,\n    ref\n  });\n  let { focusableProps } = useFocusable(props, ref);\n  if (allowFocusWhenDisabled) {\n    focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n  }\n  let buttonProps = mergeProps(\n    focusableProps,\n    pressProps,\n    filterDOMProps(props, { labelable: true })\n  );\n  return {\n    isPressed,\n    // Used to indicate press state for visual\n    buttonProps: mergeProps(additionalProps, buttonProps, {\n      \"aria-haspopup\": props[\"aria-haspopup\"],\n      \"aria-expanded\": props[\"aria-expanded\"],\n      \"aria-controls\": props[\"aria-controls\"],\n      \"aria-pressed\": props[\"aria-pressed\"],\n      \"aria-current\": props[\"aria-current\"]\n    })\n  };\n}\nexport {\n  useAriaButton\n};\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n  return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n  el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n  if (el && 'window' in el && el.window === el) {\n    return el;\n  }\n\n  const doc = getOwnerDocument(el as Element | null | undefined);\n  return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n  return value !== null &&\n    typeof value === 'object' &&\n    'nodeType' in value &&\n    typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n  return isNode(node) &&\n    node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    'host' in node;\n}\n","// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n  node: Node | null | undefined,\n  otherNode: Node | null | undefined\n): boolean {\n  if (!shadowDOM()) {\n    return otherNode && node ? node.contains(otherNode) : false;\n  }\n\n  if (!node || !otherNode) {\n    return false;\n  }\n\n  let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n  while (currentNode !== null) {\n    if (currentNode === node) {\n      return true;\n    }\n\n    if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n      (currentNode as HTMLSlotElement).assignedSlot) {\n      // Element is slotted\n      currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n    } else if (isShadowRoot(currentNode)) {\n      // Element is in shadow root\n      currentNode = currentNode.host;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n  if (!shadowDOM()) {\n    return doc.activeElement;\n  }\n  let activeElement: Element | null = doc.activeElement;\n\n  while (activeElement && 'shadowRoot' in activeElement &&\n  activeElement.shadowRoot?.activeElement) {\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n\n  return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n  if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n    if (event.composedPath) {\n      return event.composedPath()[0] as Element;\n    }\n  }\n  return event.target as Element;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof WindowEventMap>(el: Window, type: K, listener: (this: Document, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, fn, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n   \n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {DOMAttributes, HoverEvents} from '@react-types/shared';\nimport {getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface HoverProps extends HoverEvents {\n  /** Whether the hover events should be disabled. */\n  isDisabled?: boolean\n}\n\nexport interface HoverResult {\n  /** Props to spread on the target element. */\n  hoverProps: DOMAttributes,\n  isHovered: boolean\n}\n\n// iOS fires onPointerEnter twice: once with pointerType=\"touch\" and again with pointerType=\"mouse\".\n// We want to ignore these emulated events so they do not trigger hover behavior.\n// See https://bugs.webkit.org/show_bug.cgi?id=214609.\nlet globalIgnoreEmulatedMouseEvents = false;\nlet hoverCount = 0;\n\nfunction setGlobalIgnoreEmulatedMouseEvents() {\n  globalIgnoreEmulatedMouseEvents = true;\n\n  // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n  // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n  // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n  // the distant future because a user previously touched the element.\n  setTimeout(() => {\n    globalIgnoreEmulatedMouseEvents = false;\n  }, 50);\n}\n\nfunction handleGlobalPointerEvent(e) {\n  if (e.pointerType === 'touch') {\n    setGlobalIgnoreEmulatedMouseEvents();\n  }\n}\n\nfunction setupGlobalTouchEvents() {\n  if (typeof document === 'undefined') {\n    return;\n  }\n\n  if (typeof PointerEvent !== 'undefined') {\n    document.addEventListener('pointerup', handleGlobalPointerEvent);\n  } else if (process.env.NODE_ENV === 'test') {\n    document.addEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n  }\n\n  hoverCount++;\n  return () => {\n    hoverCount--;\n    if (hoverCount > 0) {\n      return;\n    }\n\n    if (typeof PointerEvent !== 'undefined') {\n      document.removeEventListener('pointerup', handleGlobalPointerEvent);\n    } else if (process.env.NODE_ENV === 'test') {\n      document.removeEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n    }\n  };\n}\n\n/**\n * Handles pointer hover interactions for an element. Normalizes behavior\n * across browsers and platforms, and ignores emulated mouse events on touch devices.\n */\nexport function useHover(props: HoverProps): HoverResult {\n  let {\n    onHoverStart,\n    onHoverChange,\n    onHoverEnd,\n    isDisabled\n  } = props;\n\n  let [isHovered, setHovered] = useState(false);\n  let state = useRef({\n    isHovered: false,\n    ignoreEmulatedMouseEvents: false,\n    pointerType: '',\n    target: null\n  }).current;\n\n  useEffect(setupGlobalTouchEvents, []);\n  let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n  let {hoverProps, triggerHoverEnd} = useMemo(() => {\n    let triggerHoverStart = (event, pointerType) => {\n      state.pointerType = pointerType;\n      if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) {\n        return;\n      }\n\n      state.isHovered = true;\n      let target = event.currentTarget;\n      state.target = target;\n\n      // When an element that is hovered over is removed, no pointerleave event is fired by the browser,\n      // even though the originally hovered target may have shrunk in size so it is no longer hovered.\n      // However, a pointerover event will be fired on the new target the mouse is over.\n      // In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.\n      addGlobalListener(getOwnerDocument(event.target), 'pointerover', e => {\n        if (state.isHovered && state.target && !nodeContains(state.target, e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      }, {capture: true});\n\n      if (onHoverStart) {\n        onHoverStart({\n          type: 'hoverstart',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(true);\n      }\n\n      setHovered(true);\n    };\n\n    let triggerHoverEnd = (event, pointerType) => {\n      let target = state.target;\n      state.pointerType = '';\n      state.target = null;\n\n      if (pointerType === 'touch' || !state.isHovered || !target) {\n        return;\n      }\n\n      state.isHovered = false;\n      removeAllGlobalListeners();\n\n      if (onHoverEnd) {\n        onHoverEnd({\n          type: 'hoverend',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(false);\n      }\n\n      setHovered(false);\n    };\n\n    let hoverProps: DOMAttributes = {};\n\n    if (typeof PointerEvent !== 'undefined') {\n      hoverProps.onPointerEnter = (e) => {\n        if (globalIgnoreEmulatedMouseEvents && e.pointerType === 'mouse') {\n          return;\n        }\n\n        triggerHoverStart(e, e.pointerType);\n      };\n\n      hoverProps.onPointerLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      };\n    } else if (process.env.NODE_ENV === 'test') {\n      hoverProps.onTouchStart = () => {\n        state.ignoreEmulatedMouseEvents = true;\n      };\n\n      hoverProps.onMouseEnter = (e) => {\n        if (!state.ignoreEmulatedMouseEvents && !globalIgnoreEmulatedMouseEvents) {\n          triggerHoverStart(e, 'mouse');\n        }\n\n        state.ignoreEmulatedMouseEvents = false;\n      };\n\n      hoverProps.onMouseLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, 'mouse');\n        }\n      };\n    }\n    return {hoverProps, triggerHoverEnd};\n  }, [onHoverStart, onHoverChange, onHoverEnd, isDisabled, state, addGlobalListener, removeAllGlobalListeners]);\n\n  useEffect(() => {\n    // Call the triggerHoverEnd as soon as isDisabled changes to true\n    // Safe to call triggerHoverEnd, it will early return if we aren't currently hovering\n    if (isDisabled) {\n      triggerHoverEnd({currentTarget: state.target}, state.pointerType);\n    }\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isDisabled]);\n\n  return {\n    hoverProps,\n    isHovered\n  };\n}\n","\"use client\";\n\n// src/ripple.tsx\nimport { AnimatePresence, m, LazyMotion } from \"framer-motion\";\nimport { clamp } from \"@heroui/shared-utils\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar domAnimation = () => import(\"@heroui/dom-animation\").then((res) => res.default);\nvar Ripple = (props) => {\n  const { ripples = [], motionProps, color = \"currentColor\", style, onClear } = props;\n  return /* @__PURE__ */ jsx(Fragment, { children: ripples.map((ripple) => {\n    const duration = clamp(0.01 * ripple.size, 0.2, ripple.size > 100 ? 0.75 : 0.5);\n    return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: \"popLayout\", children: /* @__PURE__ */ jsx(\n      m.span,\n      {\n        animate: { transform: \"scale(2)\", opacity: 0 },\n        className: \"heroui-ripple\",\n        exit: { opacity: 0 },\n        initial: { transform: \"scale(0)\", opacity: 0.35 },\n        style: {\n          position: \"absolute\",\n          backgroundColor: color,\n          borderRadius: \"100%\",\n          transformOrigin: \"center\",\n          pointerEvents: \"none\",\n          overflow: \"hidden\",\n          inset: 0,\n          zIndex: 0,\n          top: ripple.y,\n          left: ripple.x,\n          width: `${ripple.size}px`,\n          height: `${ripple.size}px`,\n          ...style\n        },\n        transition: { duration },\n        onAnimationComplete: () => {\n          onClear(ripple.key);\n        },\n        ...motionProps\n      }\n    ) }) }, ripple.key);\n  }) });\n};\nRipple.displayName = \"HeroUI.Ripple\";\nvar ripple_default = Ripple;\n\nexport {\n  ripple_default\n};\n","\"use client\";\n\n// src/use-ripple.ts\nimport { getUniqueID } from \"@heroui/shared-utils\";\nimport { useCallback, useState } from \"react\";\nfunction useRipple(props = {}) {\n  const [ripples, setRipples] = useState([]);\n  const onPress = useCallback((event) => {\n    const trigger = event.target;\n    const size = Math.max(trigger.clientWidth, trigger.clientHeight);\n    setRipples((prevRipples) => [\n      ...prevRipples,\n      {\n        key: getUniqueID(prevRipples.length.toString()),\n        size,\n        x: event.x - size / 2,\n        y: event.y - size / 2\n      }\n    ]);\n  }, []);\n  const onClear = useCallback((key) => {\n    setRipples((prevState) => prevState.filter((ripple) => ripple.key !== key));\n  }, []);\n  return { ripples, onClear, onPress, ...props };\n}\n\nexport {\n  useRipple\n};\n","\"use client\";\n\n// src/use-spinner.ts\nimport { mapPropsVariants } from \"@heroui/system-rsc\";\nimport { spinner } from \"@heroui/theme\";\nimport { clsx, objectToDeps } from \"@heroui/shared-utils\";\nimport { useMemo, useCallback } from \"react\";\nimport { useProviderContext } from \"@heroui/system\";\nfunction useSpinner(originalProps) {\n  var _a, _b;\n  const [props, variantProps] = mapPropsVariants(originalProps, spinner.variantKeys);\n  const globalContext = useProviderContext();\n  const variant = (_b = (_a = originalProps == null ? void 0 : originalProps.variant) != null ? _a : globalContext == null ? void 0 : globalContext.spinnerVariant) != null ? _b : \"default\";\n  const { children, className, classNames, label: labelProp, ...otherProps } = props;\n  const slots = useMemo(() => spinner({ ...variantProps }), [objectToDeps(variantProps)]);\n  const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);\n  const label = labelProp || children;\n  const ariaLabel = useMemo(() => {\n    if (label && typeof label === \"string\") {\n      return label;\n    }\n    return !otherProps[\"aria-label\"] ? \"Loading\" : \"\";\n  }, [children, label, otherProps[\"aria-label\"]]);\n  const getSpinnerProps = useCallback(\n    () => ({\n      \"aria-label\": ariaLabel,\n      className: slots.base({\n        class: baseStyles\n      }),\n      ...otherProps\n    }),\n    [ariaLabel, slots, baseStyles, otherProps]\n  );\n  return { label, slots, classNames, variant, getSpinnerProps };\n}\n\nexport {\n  useSpinner\n};\n","\"use client\";\nimport {\n  useSpinner\n} from \"./chunk-IKKYW34A.mjs\";\n\n// src/spinner.tsx\nimport { forwardRef } from \"@heroui/system-rsc\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Spinner = forwardRef((props, ref) => {\n  const { slots, classNames, label, variant, getSpinnerProps } = useSpinner({ ...props });\n  if (variant === \"wave\" || variant === \"dots\") {\n    return /* @__PURE__ */ jsxs(\"div\", { ref, ...getSpinnerProps(), children: [\n      /* @__PURE__ */ jsx(\"div\", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [...new Array(3)].map((_, index) => /* @__PURE__ */ jsx(\n        \"i\",\n        {\n          className: slots.dots({ class: classNames == null ? void 0 : classNames.dots }),\n          style: {\n            \"--dot-index\": index\n          }\n        },\n        `dot-${index}`\n      )) }),\n      label && /* @__PURE__ */ jsx(\"span\", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })\n    ] });\n  }\n  if (variant === \"simple\") {\n    return /* @__PURE__ */ jsxs(\"div\", { ref, ...getSpinnerProps(), children: [\n      /* @__PURE__ */ jsxs(\n        \"svg\",\n        {\n          className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),\n          fill: \"none\",\n          viewBox: \"0 0 24 24\",\n          children: [\n            /* @__PURE__ */ jsx(\n              \"circle\",\n              {\n                className: slots.circle1({ class: classNames == null ? void 0 : classNames.circle1 }),\n                cx: \"12\",\n                cy: \"12\",\n                r: \"10\",\n                stroke: \"currentColor\",\n                strokeWidth: \"4\"\n              }\n            ),\n            /* @__PURE__ */ jsx(\n              \"path\",\n              {\n                className: slots.circle2({ class: classNames == null ? void 0 : classNames.circle2 }),\n                d: \"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\",\n                fill: \"currentColor\"\n              }\n            )\n          ]\n        }\n      ),\n      label && /* @__PURE__ */ jsx(\"span\", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })\n    ] });\n  }\n  if (variant === \"spinner\") {\n    return /* @__PURE__ */ jsxs(\"div\", { ref, ...getSpinnerProps(), children: [\n      /* @__PURE__ */ jsx(\"div\", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [...new Array(12)].map((_, index) => /* @__PURE__ */ jsx(\n        \"i\",\n        {\n          className: slots.spinnerBars({ class: classNames == null ? void 0 : classNames.spinnerBars }),\n          style: {\n            \"--bar-index\": index\n          }\n        },\n        `star-${index}`\n      )) }),\n      label && /* @__PURE__ */ jsx(\"span\", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })\n    ] });\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { ref, ...getSpinnerProps(), children: [\n    /* @__PURE__ */ jsxs(\"div\", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [\n      /* @__PURE__ */ jsx(\"i\", { className: slots.circle1({ class: classNames == null ? void 0 : classNames.circle1 }) }),\n      /* @__PURE__ */ jsx(\"i\", { className: slots.circle2({ class: classNames == null ? void 0 : classNames.circle2 }) })\n    ] }),\n    label && /* @__PURE__ */ jsx(\"span\", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })\n  ] });\n});\nSpinner.displayName = \"HeroUI.Spinner\";\nvar spinner_default = Spinner;\n\nexport {\n  spinner_default\n};\n","\"use client\";\nimport {\n  useButton\n} from \"./chunk-AJAU6WEQ.mjs\";\n\n// src/button.tsx\nimport { Spinner } from \"@heroui/spinner\";\nimport { Ripple } from \"@heroui/ripple\";\nimport { forwardRef } from \"@heroui/system\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Button = forwardRef((props, ref) => {\n  const {\n    Component,\n    domRef,\n    children,\n    spinnerSize,\n    spinner = /* @__PURE__ */ jsx(Spinner, { color: \"current\", size: spinnerSize }),\n    spinnerPlacement,\n    startContent,\n    endContent,\n    isLoading,\n    disableRipple,\n    getButtonProps,\n    getRippleProps,\n    isIconOnly\n  } = useButton({ ...props, ref });\n  return /* @__PURE__ */ jsxs(Component, { ref: domRef, ...getButtonProps(), children: [\n    startContent,\n    isLoading && spinnerPlacement === \"start\" && spinner,\n    isLoading && isIconOnly ? null : children,\n    isLoading && spinnerPlacement === \"end\" && spinner,\n    endContent,\n    !disableRipple && /* @__PURE__ */ jsx(Ripple, { ...getRippleProps() })\n  ] });\n});\nButton.displayName = \"HeroUI.Button\";\nvar button_default = Button;\n\nexport {\n  button_default\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createContext, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport {Validation, ValidationErrors, ValidationFunction, ValidationResult} from '@react-types/shared';\n\nexport const VALID_VALIDITY_STATE: ValidityState = {\n  badInput: false,\n  customError: false,\n  patternMismatch: false,\n  rangeOverflow: false,\n  rangeUnderflow: false,\n  stepMismatch: false,\n  tooLong: false,\n  tooShort: false,\n  typeMismatch: false,\n  valueMissing: false,\n  valid: true\n};\n\nconst CUSTOM_VALIDITY_STATE: ValidityState = {\n  ...VALID_VALIDITY_STATE,\n  customError: true,\n  valid: false\n};\n\nexport const DEFAULT_VALIDATION_RESULT: ValidationResult = {\n  isInvalid: false,\n  validationDetails: VALID_VALIDITY_STATE,\n  validationErrors: []\n};\n\nexport const FormValidationContext = createContext<ValidationErrors>({});\n\nexport const privateValidationStateProp = '__formValidationState' + Date.now();\n\ninterface FormValidationProps<T> extends Validation<T> {\n  builtinValidation?: ValidationResult,\n  name?: string | string[],\n  value: T | null\n}\n\nexport interface FormValidationState {\n  /** Realtime validation results, updated as the user edits the value. */\n  realtimeValidation: ValidationResult,\n  /** Currently displayed validation results, updated when the user commits their changes. */\n  displayValidation: ValidationResult,\n  /** Updates the current validation result. Not displayed to the user until `commitValidation` is called. */\n  updateValidation(result: ValidationResult): void,\n  /** Resets the displayed validation state to valid when the user resets the form. */\n  resetValidation(): void,\n  /** Commits the realtime validation so it is displayed to the user. */\n  commitValidation(): void\n}\n\nexport function useFormValidationState<T>(props: FormValidationProps<T>): FormValidationState {\n  // Private prop for parent components to pass state to children.\n  if (props[privateValidationStateProp]) {\n    let {realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation} = props[privateValidationStateProp] as FormValidationState;\n    return {realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation};\n  }\n\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useFormValidationStateImpl(props);\n}\n\nfunction useFormValidationStateImpl<T>(props: FormValidationProps<T>): FormValidationState {\n  let {isInvalid, validationState, name, value, builtinValidation, validate, validationBehavior = 'aria'} = props;\n\n  // backward compatibility.\n  if (validationState) {\n    isInvalid ||= validationState === 'invalid';\n  }\n\n  // If the isInvalid prop is controlled, update validation result in realtime.\n  let controlledError: ValidationResult | null = isInvalid !== undefined ? {\n    isInvalid,\n    validationErrors: [],\n    validationDetails: CUSTOM_VALIDITY_STATE\n  } : null;\n\n  // Perform custom client side validation.\n  let clientError: ValidationResult | null = useMemo(() => {\n    if (!validate || value == null) {\n      return null;\n    }\n    let validateErrors = runValidate(validate, value);\n    return getValidationResult(validateErrors);\n  }, [validate, value]);\n\n  if (builtinValidation?.validationDetails.valid) {\n    builtinValidation = undefined;\n  }\n\n  // Get relevant server errors from the form.\n  let serverErrors = useContext(FormValidationContext);\n  let serverErrorMessages = useMemo(() => {\n    if (name) {\n      return Array.isArray(name) ? name.flatMap(name => asArray(serverErrors[name])) : asArray(serverErrors[name]);\n    }\n    return [];\n  }, [serverErrors, name]);\n\n  // Show server errors when the form gets a new value, and clear when the user changes the value.\n  let [lastServerErrors, setLastServerErrors] = useState(serverErrors);\n  let [isServerErrorCleared, setServerErrorCleared] = useState(false);\n  if (serverErrors !== lastServerErrors) {\n    setLastServerErrors(serverErrors);\n    setServerErrorCleared(false);\n  }\n\n  let serverError: ValidationResult | null = useMemo(() =>\n    getValidationResult(isServerErrorCleared ? [] : serverErrorMessages),\n    [isServerErrorCleared, serverErrorMessages]\n  );\n\n  // Track the next validation state in a ref until commitValidation is called.\n  let nextValidation = useRef(DEFAULT_VALIDATION_RESULT);\n  let [currentValidity, setCurrentValidity] = useState(DEFAULT_VALIDATION_RESULT);\n\n  let lastError = useRef(DEFAULT_VALIDATION_RESULT);\n  let commitValidation = () => {\n    if (!commitQueued) {\n      return;\n    }\n\n    setCommitQueued(false);\n    let error = clientError || builtinValidation || nextValidation.current;\n    if (!isEqualValidation(error, lastError.current)) {\n      lastError.current = error;\n      setCurrentValidity(error);\n    }\n  };\n\n  let [commitQueued, setCommitQueued] = useState(false);\n  useEffect(commitValidation);\n\n  // realtimeValidation is used to update the native input element's state based on custom validation logic.\n  // displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).\n  // With validationBehavior=\"aria\", all errors are displayed in realtime rather than on submit.\n  let realtimeValidation = controlledError || serverError || clientError || builtinValidation || DEFAULT_VALIDATION_RESULT;\n  let displayValidation = validationBehavior === 'native'\n    ? controlledError || serverError || currentValidity\n    : controlledError || serverError || clientError || builtinValidation || currentValidity;\n\n  return {\n    realtimeValidation,\n    displayValidation,\n    updateValidation(value) {\n      // If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.\n      if (validationBehavior === 'aria' && !isEqualValidation(currentValidity, value)) {\n        setCurrentValidity(value);\n      } else {\n        nextValidation.current = value;\n      }\n    },\n    resetValidation() {\n      // Update the currently displayed validation state to valid on form reset,\n      // even if the native validity says it isn't. It'll show again on the next form submit.\n      let error = DEFAULT_VALIDATION_RESULT;\n      if (!isEqualValidation(error, lastError.current)) {\n        lastError.current = error;\n        setCurrentValidity(error);\n      }\n\n      // Do not commit validation after the next render. This avoids a condition where\n      // useSelect calls commitValidation inside an onReset handler.\n      if (validationBehavior === 'native') {\n        setCommitQueued(false);\n      }\n\n      setServerErrorCleared(true);\n    },\n    commitValidation() {\n      // Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.\n      // Wait until after the next render to commit so that the latest value has been validated.\n      if (validationBehavior === 'native') {\n        setCommitQueued(true);\n      }\n      setServerErrorCleared(true);\n    }\n  };\n}\n\nfunction asArray<T>(v: T | T[]): T[] {\n  if (!v) {\n    return [];\n  }\n\n  return Array.isArray(v) ? v : [v];\n}\n\nfunction runValidate<T>(validate: ValidationFunction<T>, value: T): string[] {\n  if (typeof validate === 'function') {\n    let e = validate(value);\n    if (e && typeof e !== 'boolean') {\n      return asArray(e);\n    }\n  }\n\n  return [];\n}\n\nfunction getValidationResult(errors: string[]): ValidationResult | null {\n  return errors.length ? {\n    isInvalid: true,\n    validationErrors: errors,\n    validationDetails: CUSTOM_VALIDITY_STATE\n  } : null;\n}\n\nfunction isEqualValidation(a: ValidationResult | null, b: ValidationResult | null): boolean {\n  if (a === b) {\n    return true;\n  }\n\n  return !!a && !!b\n    && a.isInvalid === b.isInvalid\n    && a.validationErrors.length === b.validationErrors.length\n    && a.validationErrors.every((a, i) => a === b.validationErrors[i])\n    && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);\n}\n\nexport function mergeValidation(...results: ValidationResult[]): ValidationResult {\n  let errors = new Set<string>();\n  let isInvalid = false;\n  let validationDetails = {\n    ...VALID_VALIDITY_STATE\n  };\n\n  for (let v of results) {\n    for (let e of v.validationErrors) {\n      errors.add(e);\n    }\n\n    // Only these properties apply for checkboxes.\n    isInvalid ||= v.isInvalid;\n    for (let key in validationDetails) {\n      validationDetails[key] ||= v.validationDetails[key];\n    }\n  }\n\n  validationDetails.valid = !isInvalid;\n  return {\n    isInvalid,\n    validationErrors: [...errors],\n    validationDetails\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToggleProps} from '@react-types/checkbox';\nimport {filterDOMProps, mergeProps, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface ToggleAria {\n  /** Props to be spread on the label element. */\n  labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n  /** Props to be spread on the input element. */\n  inputProps: InputHTMLAttributes<HTMLInputElement>,\n  /** Whether the toggle is selected. */\n  isSelected: boolean,\n  /** Whether the toggle is in a pressed state. */\n  isPressed: boolean,\n  /** Whether the toggle is disabled. */\n  isDisabled: boolean,\n  /** Whether the toggle is read only. */\n  isReadOnly: boolean,\n  /** Whether the toggle is invalid. */\n  isInvalid: boolean\n}\n\n/**\n * Handles interactions for toggle elements, e.g. Checkboxes and Switches.\n */\nexport function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria {\n  let {\n    isDisabled = false,\n    isReadOnly = false,\n    value,\n    name,\n    children,\n    'aria-label': ariaLabel,\n    'aria-labelledby': ariaLabelledby,\n    validationState = 'valid',\n    isInvalid\n  } = props;\n\n  let onChange = (e) => {\n    // since we spread props on label, onChange will end up there as well as in here.\n    // so we have to stop propagation at the lowest level that we care about\n    e.stopPropagation();\n    state.setSelected(e.target.checked);\n  };\n\n  let hasChildren = children != null;\n  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n  if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') {\n    console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n  }\n\n  // Handle press state for keyboard interactions and cases where labelProps is not used.\n  let {pressProps, isPressed} = usePress({\n    isDisabled\n  });\n\n  // Handle press state on the label.\n  let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({\n    onPress() {\n      state.toggle();\n      ref.current?.focus();\n    },\n    isDisabled: isDisabled || isReadOnly\n  });\n\n  let {focusableProps} = useFocusable(props, ref);\n  let interactions = mergeProps(pressProps, focusableProps);\n  let domProps = filterDOMProps(props, {labelable: true});\n\n  useFormReset(ref, state.isSelected, state.setSelected);\n\n  return {\n    labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),\n    inputProps: mergeProps(domProps, {\n      'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n      'aria-errormessage': props['aria-errormessage'],\n      'aria-controls': props['aria-controls'],\n      'aria-readonly': isReadOnly || undefined,\n      onChange,\n      disabled: isDisabled,\n      ...(value == null ? {} : {value}),\n      name,\n      type: 'checkbox',\n      ...interactions\n    }),\n    isSelected: state.isSelected,\n    isPressed: isPressed || isLabelPressed,\n    isDisabled,\n    isReadOnly,\n    isInvalid: isInvalid || validationState === 'invalid'\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CheckboxGroupState} from '@react-stately/checkbox';\n\ninterface CheckboxGroupData {\n  name?: string,\n  descriptionId?: string,\n  errorMessageId?: string,\n  validationBehavior: 'aria' | 'native'\n}\n\nexport const checkboxGroupData = new WeakMap<CheckboxGroupState, CheckboxGroupData>();\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ToggleStateOptions} from '@react-types/checkbox';\nimport {useControlledState} from '@react-stately/utils';\n\nexport type {ToggleStateOptions};\n\nexport interface ToggleState {\n  /** Whether the toggle is selected. */\n  readonly isSelected: boolean,\n\n  /** Updates selection state. */\n  setSelected(isSelected: boolean): void,\n\n  /** Toggle the selection state. */\n  toggle(): void\n}\n\n/**\n * Provides state management for toggle components like checkboxes and switches.\n */\nexport function useToggleState(props: ToggleStateOptions = {}): ToggleState {\n  let {isReadOnly} = props;\n\n  // have to provide an empty function so useControlledState doesn't throw a fit\n  // can't use useControlledState's prop calling because we need the event object from the change\n  let [isSelected, setSelected] = useControlledState(props.isSelected, props.defaultSelected || false, props.onChange);\n\n  function updateSelected(value) {\n    if (!isReadOnly) {\n      setSelected(value);\n    }\n  }\n\n  function toggleState() {\n    if (!isReadOnly) {\n      setSelected(!isSelected);\n    }\n  }\n\n  return {\n    isSelected,\n    setSelected: updateSelected,\n    toggle: toggleState\n  };\n}\n","\"use client\";\n\n// src/utils.ts\nimport { useContext, useMemo } from \"react\";\nimport { mergeProps, mergeRefs, useObjectRef } from \"@react-aria/utils\";\nvar DEFAULT_SLOT = Symbol(\"default\");\nfunction useSlottedContext(context, slot) {\n  let ctx = useContext(context);\n  if (slot === null) {\n    return null;\n  }\n  if (ctx && typeof ctx === \"object\" && \"slots\" in ctx && ctx.slots) {\n    let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `\"${p}\"`));\n    if (!slot && !ctx.slots[DEFAULT_SLOT]) {\n      throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);\n    }\n    let slotKey = slot || DEFAULT_SLOT;\n    if (!ctx.slots[slotKey]) {\n      throw new Error(`Invalid slot \"${slot}\". Valid slot names are ${availableSlots}.`);\n    }\n    return ctx.slots[slotKey];\n  }\n  return ctx;\n}\nfunction useContextProps(props, ref, context) {\n  let ctx = useSlottedContext(context, props.slot) || {};\n  let { ref: contextRef, ...contextProps } = ctx;\n  let mergedRef = useObjectRef(useMemo(() => mergeRefs(ref, contextRef), [ref, contextRef]));\n  let mergedProps = mergeProps(contextProps, props);\n  if (\"style\" in contextProps && contextProps.style && \"style\" in props && props.style) {\n    if (typeof contextProps.style === \"function\" || typeof props.style === \"function\") {\n      mergedProps.style = (renderProps) => {\n        let contextStyle = typeof contextProps.style === \"function\" ? contextProps.style(renderProps) : contextProps.style;\n        let defaultStyle = { ...renderProps.defaultStyle, ...contextStyle };\n        let style = typeof props.style === \"function\" ? props.style({ ...renderProps, defaultStyle }) : props.style;\n        return { ...defaultStyle, ...style };\n      };\n    } else {\n      mergedProps.style = { ...contextProps.style, ...props.style };\n    }\n  }\n  return [mergedProps, mergedRef];\n}\n\nexport {\n  DEFAULT_SLOT,\n  useSlottedContext,\n  useContextProps\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ForwardedRef, MutableRefObject} from 'react';\n\n/**\n * Merges multiple refs into one. Works with either callback or object refs.\n */\nexport function mergeRefs<T>(...refs: Array<ForwardedRef<T> | MutableRefObject<T> | null | undefined>): ForwardedRef<T> {\n  if (refs.length === 1 && refs[0]) {\n    return refs[0];\n  }\n\n  return (value: T | null) => {\n    for (let ref of refs) {\n      if (typeof ref === 'function') {\n        ref(value);\n      } else if (ref != null) {\n        ref.current = value;\n      }\n    }\n  };\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, useMemo, useRef} from 'react';\n\n/**\n * Offers an object ref for a given callback ref or an object ref. Especially\n * helfpul when passing forwarded refs (created using `React.forwardRef`) to\n * React Aria hooks.\n *\n * @param forwardedRef The original ref intended to be used.\n * @returns An object ref that updates the given ref.\n * @see https://reactjs.org/docs/forwarding-refs.html\n */\nexport function useObjectRef<T>(forwardedRef?: ((instance: T | null) => void) | MutableRefObject<T | null> | null): MutableRefObject<T | null> {\n  const objRef: MutableRefObject<T | null> = useRef<T>(null);\n  return useMemo(() => ({\n    get current() {\n      return objRef.current;\n    },\n    set current(value) {\n      objRef.current = value;\n      if (typeof forwardedRef === 'function') {\n        forwardedRef(value);\n      } else if (forwardedRef) {\n        forwardedRef.current = value;\n      }\n    }\n  }), [forwardedRef]);\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createContext, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport {Validation, ValidationErrors, ValidationFunction, ValidationResult} from '@react-types/shared';\n\nexport const VALID_VALIDITY_STATE: ValidityState = {\n  badInput: false,\n  customError: false,\n  patternMismatch: false,\n  rangeOverflow: false,\n  rangeUnderflow: false,\n  stepMismatch: false,\n  tooLong: false,\n  tooShort: false,\n  typeMismatch: false,\n  valueMissing: false,\n  valid: true\n};\n\nconst CUSTOM_VALIDITY_STATE: ValidityState = {\n  ...VALID_VALIDITY_STATE,\n  customError: true,\n  valid: false\n};\n\nexport const DEFAULT_VALIDATION_RESULT: ValidationResult = {\n  isInvalid: false,\n  validationDetails: VALID_VALIDITY_STATE,\n  validationErrors: []\n};\n\nexport const FormValidationContext = createContext<ValidationErrors>({});\n\nexport const privateValidationStateProp = '__formValidationState' + Date.now();\n\ninterface FormValidationProps<T> extends Validation<T> {\n  builtinValidation?: ValidationResult,\n  name?: string | string[],\n  value: T | null\n}\n\nexport interface FormValidationState {\n  /** Realtime validation results, updated as the user edits the value. */\n  realtimeValidation: ValidationResult,\n  /** Currently displayed validation results, updated when the user commits their changes. */\n  displayValidation: ValidationResult,\n  /** Updates the current validation result. Not displayed to the user until `commitValidation` is called. */\n  updateValidation(result: ValidationResult): void,\n  /** Resets the displayed validation state to valid when the user resets the form. */\n  resetValidation(): void,\n  /** Commits the realtime validation so it is displayed to the user. */\n  commitValidation(): void\n}\n\nexport function useFormValidationState<T>(props: FormValidationProps<T>): FormValidationState {\n  // Private prop for parent components to pass state to children.\n  if (props[privateValidationStateProp]) {\n    let {realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation} = props[privateValidationStateProp] as FormValidationState;\n    return {realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation};\n  }\n\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useFormValidationStateImpl(props);\n}\n\nfunction useFormValidationStateImpl<T>(props: FormValidationProps<T>): FormValidationState {\n  let {isInvalid, validationState, name, value, builtinValidation, validate, validationBehavior = 'aria'} = props;\n\n  // backward compatibility.\n  if (validationState) {\n    isInvalid ||= validationState === 'invalid';\n  }\n\n  // If the isInvalid prop is controlled, update validation result in realtime.\n  let controlledError: ValidationResult | null = isInvalid !== undefined ? {\n    isInvalid,\n    validationErrors: [],\n    validationDetails: CUSTOM_VALIDITY_STATE\n  } : null;\n\n  // Perform custom client side validation.\n  let clientError: ValidationResult | null = useMemo(() => {\n    if (!validate || value == null) {\n      return null;\n    }\n    let validateErrors = runValidate(validate, value);\n    return getValidationResult(validateErrors);\n  }, [validate, value]);\n\n  if (builtinValidation?.validationDetails.valid) {\n    builtinValidation = undefined;\n  }\n\n  // Get relevant server errors from the form.\n  let serverErrors = useContext(FormValidationContext);\n  let serverErrorMessages = useMemo(() => {\n    if (name) {\n      return Array.isArray(name) ? name.flatMap(name => asArray(serverErrors[name])) : asArray(serverErrors[name]);\n    }\n    return [];\n  }, [serverErrors, name]);\n\n  // Show server errors when the form gets a new value, and clear when the user changes the value.\n  let [lastServerErrors, setLastServerErrors] = useState(serverErrors);\n  let [isServerErrorCleared, setServerErrorCleared] = useState(false);\n  if (serverErrors !== lastServerErrors) {\n    setLastServerErrors(serverErrors);\n    setServerErrorCleared(false);\n  }\n\n  let serverError: ValidationResult | null = useMemo(() =>\n    getValidationResult(isServerErrorCleared ? [] : serverErrorMessages),\n    [isServerErrorCleared, serverErrorMessages]\n  );\n\n  // Track the next validation state in a ref until commitValidation is called.\n  let nextValidation = useRef(DEFAULT_VALIDATION_RESULT);\n  let [currentValidity, setCurrentValidity] = useState(DEFAULT_VALIDATION_RESULT);\n\n  let lastError = useRef(DEFAULT_VALIDATION_RESULT);\n  let commitValidation = () => {\n    if (!commitQueued) {\n      return;\n    }\n\n    setCommitQueued(false);\n    let error = clientError || builtinValidation || nextValidation.current;\n    if (!isEqualValidation(error, lastError.current)) {\n      lastError.current = error;\n      setCurrentValidity(error);\n    }\n  };\n\n  let [commitQueued, setCommitQueued] = useState(false);\n  useEffect(commitValidation);\n\n  // realtimeValidation is used to update the native input element's state based on custom validation logic.\n  // displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).\n  // With validationBehavior=\"aria\", all errors are displayed in realtime rather than on submit.\n  let realtimeValidation = controlledError || serverError || clientError || builtinValidation || DEFAULT_VALIDATION_RESULT;\n  let displayValidation = validationBehavior === 'native'\n    ? controlledError || serverError || currentValidity\n    : controlledError || serverError || clientError || builtinValidation || currentValidity;\n\n  return {\n    realtimeValidation,\n    displayValidation,\n    updateValidation(value) {\n      // If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.\n      if (validationBehavior === 'aria' && !isEqualValidation(currentValidity, value)) {\n        setCurrentValidity(value);\n      } else {\n        nextValidation.current = value;\n      }\n    },\n    resetValidation() {\n      // Update the currently displayed validation state to valid on form reset,\n      // even if the native validity says it isn't. It'll show again on the next form submit.\n      let error = DEFAULT_VALIDATION_RESULT;\n      if (!isEqualValidation(error, lastError.current)) {\n        lastError.current = error;\n        setCurrentValidity(error);\n      }\n\n      // Do not commit validation after the next render. This avoids a condition where\n      // useSelect calls commitValidation inside an onReset handler.\n      if (validationBehavior === 'native') {\n        setCommitQueued(false);\n      }\n\n      setServerErrorCleared(true);\n    },\n    commitValidation() {\n      // Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.\n      // Wait until after the next render to commit so that the latest value has been validated.\n      if (validationBehavior === 'native') {\n        setCommitQueued(true);\n      }\n      setServerErrorCleared(true);\n    }\n  };\n}\n\nfunction asArray<T>(v: T | T[]): T[] {\n  if (!v) {\n    return [];\n  }\n\n  return Array.isArray(v) ? v : [v];\n}\n\nfunction runValidate<T>(validate: ValidationFunction<T>, value: T): string[] {\n  if (typeof validate === 'function') {\n    let e = validate(value);\n    if (e && typeof e !== 'boolean') {\n      return asArray(e);\n    }\n  }\n\n  return [];\n}\n\nfunction getValidationResult(errors: string[]): ValidationResult | null {\n  return errors.length ? {\n    isInvalid: true,\n    validationErrors: errors,\n    validationDetails: CUSTOM_VALIDITY_STATE\n  } : null;\n}\n\nfunction isEqualValidation(a: ValidationResult | null, b: ValidationResult | null): boolean {\n  if (a === b) {\n    return true;\n  }\n\n  return !!a && !!b\n    && a.isInvalid === b.isInvalid\n    && a.validationErrors.length === b.validationErrors.length\n    && a.validationErrors.every((a, i) => a === b.validationErrors[i])\n    && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);\n}\n\nexport function mergeValidation(...results: ValidationResult[]): ValidationResult {\n  let errors = new Set<string>();\n  let isInvalid = false;\n  let validationDetails = {\n    ...VALID_VALIDITY_STATE\n  };\n\n  for (let v of results) {\n    for (let e of v.validationErrors) {\n      errors.add(e);\n    }\n\n    // Only these properties apply for checkboxes.\n    isInvalid ||= v.isInvalid;\n    for (let key in validationDetails) {\n      validationDetails[key] ||= v.validationDetails[key];\n    }\n  }\n\n  validationDetails.valid = !isInvalid;\n  return {\n    isInvalid,\n    validationErrors: [...errors],\n    validationDetails\n  };\n}\n","\"use client\";\nimport {\n  useContextProps\n} from \"./chunk-BSTJ7ZCN.mjs\";\n\n// src/base-form.tsx\nimport { FormValidationContext } from \"@react-stately/form\";\nimport { createContext, forwardRef, useMemo } from \"react\";\nimport { form } from \"@heroui/theme\";\nimport { jsx } from \"react/jsx-runtime\";\nvar FormContext = createContext(null);\nvar Form = forwardRef(function Form2(props, ref) {\n  [props, ref] = useContextProps(props, ref, FormContext);\n  let { validationErrors, validationBehavior = \"native\", children, className, ...domProps } = props;\n  const styles = useMemo(() => form({ className }), [className]);\n  return /* @__PURE__ */ jsx(\"form\", { noValidate: validationBehavior !== \"native\", ...domProps, ref, className: styles, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: { ...props, validationBehavior }, children: /* @__PURE__ */ jsx(FormValidationContext.Provider, { value: validationErrors != null ? validationErrors : {}, children }) }) });\n});\n\nexport {\n  FormContext,\n  Form\n};\n","\"use client\";\n\n// src/checkbox-group-context.ts\nimport { createContext } from \"@heroui/react-utils\";\nvar [CheckboxGroupProvider, useCheckboxGroupContext] = createContext({\n  name: \"CheckboxGroupContext\",\n  strict: false\n});\n\nexport {\n  CheckboxGroupProvider,\n  useCheckboxGroupContext\n};\n","\"use client\";\n\n// src/checkbox-icon.tsx\nimport { jsx } from \"react/jsx-runtime\";\nfunction CheckIcon(props) {\n  const { isSelected, disableAnimation, ...otherProps } = props;\n  return /* @__PURE__ */ jsx(\n    \"svg\",\n    {\n      \"aria-hidden\": \"true\",\n      fill: \"none\",\n      role: \"presentation\",\n      stroke: \"currentColor\",\n      strokeDasharray: 22,\n      strokeDashoffset: isSelected ? 44 : 66,\n      strokeLinecap: \"round\",\n      strokeLinejoin: \"round\",\n      strokeWidth: 2,\n      style: !disableAnimation && isSelected ? {\n        transition: \"stroke-dashoffset 250ms linear 0.2s\"\n      } : {},\n      viewBox: \"0 0 17 18\",\n      ...otherProps,\n      children: /* @__PURE__ */ jsx(\"polyline\", { points: \"1 9 7 14 15 4\" })\n    }\n  );\n}\nfunction IndeterminateIcon(props) {\n  const { isSelected, disableAnimation, ...otherProps } = props;\n  return /* @__PURE__ */ jsx(\"svg\", { stroke: \"currentColor\", strokeWidth: 3, viewBox: \"0 0 24 24\", ...otherProps, children: /* @__PURE__ */ jsx(\"line\", { x1: \"21\", x2: \"3\", y1: \"12\", y2: \"12\" }) });\n}\nfunction CheckboxIcon(props) {\n  const { isIndeterminate, ...otherProps } = props;\n  const BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;\n  return /* @__PURE__ */ jsx(BaseIcon, { ...otherProps });\n}\n\nexport {\n  CheckboxIcon\n};\n","\"use client\";\nimport {\n  useCheckboxGroupContext\n} from \"./chunk-LK575OWX.mjs\";\n\n// src/use-checkbox.ts\nimport { useProviderContext } from \"@heroui/system\";\nimport { useCallback, useId } from \"react\";\nimport { useMemo, useRef } from \"react\";\nimport { useToggleState } from \"@react-stately/toggle\";\nimport { checkbox } from \"@heroui/theme\";\nimport { useCallbackRef } from \"@heroui/use-callback-ref\";\nimport { useHover } from \"@react-aria/interactions\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { mergeProps, chain } from \"@react-aria/utils\";\nimport { __DEV__, warn, clsx, dataAttr, safeAriaLabel } from \"@heroui/shared-utils\";\nimport {\n  useCheckbox as useReactAriaCheckbox,\n  useCheckboxGroupItem as useReactAriaCheckboxGroupItem\n} from \"@react-aria/checkbox\";\nimport { useSafeLayoutEffect } from \"@heroui/use-safe-layout-effect\";\nimport { mergeRefs } from \"@heroui/react-utils\";\nimport { FormContext, useSlottedContext } from \"@heroui/form\";\nfunction useCheckbox(props = {}) {\n  var _a, _b, _c, _d, _e, _f, _g, _h;\n  const globalContext = useProviderContext();\n  const groupContext = useCheckboxGroupContext();\n  const { validationBehavior: formValidationBehavior } = useSlottedContext(FormContext) || {};\n  const isInGroup = !!groupContext;\n  const {\n    as,\n    ref,\n    value = \"\",\n    children,\n    icon,\n    name,\n    isRequired,\n    isReadOnly: isReadOnlyProp = false,\n    autoFocus = false,\n    isSelected: isSelectedProp,\n    size = (_a = groupContext == null ? void 0 : groupContext.size) != null ? _a : \"md\",\n    color = (_b = groupContext == null ? void 0 : groupContext.color) != null ? _b : \"primary\",\n    radius = groupContext == null ? void 0 : groupContext.radius,\n    lineThrough = (_c = groupContext == null ? void 0 : groupContext.lineThrough) != null ? _c : false,\n    isDisabled: isDisabledProp = (_d = groupContext == null ? void 0 : groupContext.isDisabled) != null ? _d : false,\n    disableAnimation = (_f = (_e = groupContext == null ? void 0 : groupContext.disableAnimation) != null ? _e : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _f : false,\n    validationState,\n    isInvalid: isInvalidProp = validationState ? validationState === \"invalid\" : (_g = groupContext == null ? void 0 : groupContext.isInvalid) != null ? _g : false,\n    isIndeterminate = false,\n    validationBehavior = isInGroup ? groupContext.validationBehavior : (_h = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _h : \"native\",\n    defaultSelected,\n    classNames,\n    className,\n    onValueChange,\n    validate,\n    ...otherProps\n  } = props;\n  if (groupContext && __DEV__) {\n    if (isSelectedProp) {\n      warn(\n        \"The Checkbox.Group is being used, `isSelected` will be ignored. Use the `value` of the Checkbox.Group instead.\",\n        \"Checkbox\"\n      );\n    }\n    if (defaultSelected) {\n      warn(\n        \"The Checkbox.Group is being used, `defaultSelected` will be ignored. Use the `defaultValue` of the Checkbox.Group instead.\",\n        \"Checkbox\"\n      );\n    }\n  }\n  const Component = as || \"label\";\n  const domRef = useRef(null);\n  const inputRef = useRef(null);\n  let onChange = props.onChange;\n  if (isInGroup) {\n    const dispatch = () => {\n      groupContext.groupState.resetValidation();\n    };\n    onChange = chain(dispatch, onChange);\n  }\n  const labelId = useId();\n  const ariaCheckboxProps = useMemo(\n    () => ({\n      name,\n      value,\n      children,\n      autoFocus,\n      defaultSelected,\n      isIndeterminate,\n      isRequired,\n      isInvalid: isInvalidProp,\n      isSelected: isSelectedProp,\n      isDisabled: isDisabledProp,\n      isReadOnly: isReadOnlyProp,\n      \"aria-label\": safeAriaLabel(otherProps[\"aria-label\"], children),\n      \"aria-labelledby\": otherProps[\"aria-labelledby\"] || labelId,\n      onChange: onValueChange\n    }),\n    [\n      name,\n      value,\n      children,\n      autoFocus,\n      defaultSelected,\n      isIndeterminate,\n      isRequired,\n      isInvalidProp,\n      isSelectedProp,\n      isDisabledProp,\n      isReadOnlyProp,\n      otherProps[\"aria-label\"],\n      otherProps[\"aria-labelledby\"],\n      labelId,\n      onValueChange\n    ]\n  );\n  const toggleState = useToggleState(ariaCheckboxProps);\n  const validationProps = {\n    isInvalid: isInvalidProp,\n    isRequired,\n    validate,\n    validationState,\n    validationBehavior\n  };\n  const {\n    inputProps,\n    isSelected,\n    isDisabled,\n    isReadOnly,\n    isPressed,\n    isInvalid: isAriaInvalid\n  } = isInGroup ? (\n    // eslint-disable-next-line\n    useReactAriaCheckboxGroupItem(\n      { ...ariaCheckboxProps, ...validationProps },\n      groupContext.groupState,\n      inputRef\n    )\n  ) : (\n    // eslint-disable-next-line\n    useReactAriaCheckbox({ ...ariaCheckboxProps, ...validationProps }, toggleState, inputRef)\n  );\n  const isInteractionDisabled = isDisabled || isReadOnly;\n  const isInvalid = validationState === \"invalid\" || isInvalidProp || isAriaInvalid;\n  const pressed = isInteractionDisabled ? false : isPressed;\n  const { hoverProps, isHovered } = useHover({\n    isDisabled: inputProps.disabled\n  });\n  const { focusProps, isFocused, isFocusVisible } = useFocusRing({\n    autoFocus: inputProps.autoFocus\n  });\n  const slots = useMemo(\n    () => checkbox({\n      color,\n      size,\n      radius,\n      isInvalid,\n      lineThrough,\n      isDisabled,\n      disableAnimation\n    }),\n    [color, size, radius, isInvalid, lineThrough, isDisabled, disableAnimation]\n  );\n  useSafeLayoutEffect(() => {\n    if (!inputRef.current) return;\n    const isInputRefChecked = !!inputRef.current.checked;\n    toggleState.setSelected(isInputRefChecked);\n  }, [inputRef.current]);\n  const onChangeProp = useCallbackRef(onChange);\n  const handleCheckboxChange = useCallback(\n    (event) => {\n      if (isReadOnly || isDisabled) {\n        event.preventDefault();\n        return;\n      }\n      onChangeProp == null ? void 0 : onChangeProp(event);\n    },\n    [isReadOnly, isDisabled, onChangeProp]\n  );\n  const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);\n  const getBaseProps = useCallback(() => {\n    return {\n      ref: domRef,\n      className: slots.base({ class: baseStyles }),\n      \"data-disabled\": dataAttr(isDisabled),\n      \"data-selected\": dataAttr(isSelected || isIndeterminate),\n      \"data-invalid\": dataAttr(isInvalid),\n      \"data-hover\": dataAttr(isHovered),\n      \"data-focus\": dataAttr(isFocused),\n      \"data-pressed\": dataAttr(pressed),\n      \"data-readonly\": dataAttr(inputProps.readOnly),\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-indeterminate\": dataAttr(isIndeterminate),\n      ...mergeProps(hoverProps, otherProps)\n    };\n  }, [\n    slots,\n    baseStyles,\n    isDisabled,\n    isSelected,\n    isIndeterminate,\n    isInvalid,\n    isHovered,\n    isFocused,\n    pressed,\n    inputProps.readOnly,\n    isFocusVisible,\n    hoverProps,\n    otherProps\n  ]);\n  const getWrapperProps = useCallback(\n    (props2 = {}) => {\n      return {\n        ...props2,\n        \"aria-hidden\": true,\n        className: clsx(slots.wrapper({ class: clsx(classNames == null ? void 0 : classNames.wrapper, props2 == null ? void 0 : props2.className) }))\n      };\n    },\n    [slots, classNames == null ? void 0 : classNames.wrapper]\n  );\n  const getInputProps = useCallback(() => {\n    return {\n      ref: mergeRefs(inputRef, ref),\n      ...mergeProps(inputProps, focusProps),\n      className: slots.hiddenInput({ class: classNames == null ? void 0 : classNames.hiddenInput }),\n      onChange: chain(inputProps.onChange, handleCheckboxChange)\n    };\n  }, [inputProps, focusProps, handleCheckboxChange, classNames == null ? void 0 : classNames.hiddenInput]);\n  const getLabelProps = useCallback(\n    () => ({\n      id: labelId,\n      className: slots.label({ class: classNames == null ? void 0 : classNames.label })\n    }),\n    [slots, classNames == null ? void 0 : classNames.label, isDisabled, isSelected, isInvalid]\n  );\n  const getIconProps = useCallback(\n    () => ({\n      isSelected,\n      isIndeterminate,\n      disableAnimation,\n      className: slots.icon({ class: classNames == null ? void 0 : classNames.icon })\n    }),\n    [slots, classNames == null ? void 0 : classNames.icon, isSelected, isIndeterminate, disableAnimation]\n  );\n  return {\n    Component,\n    icon,\n    children,\n    isSelected,\n    isDisabled,\n    isInvalid,\n    isFocused,\n    isHovered,\n    isFocusVisible,\n    getBaseProps,\n    getWrapperProps,\n    getInputProps,\n    getLabelProps,\n    getIconProps\n  };\n}\n\nexport {\n  useCheckbox\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ToggleStateOptions} from '@react-types/checkbox';\nimport {useControlledState} from '@react-stately/utils';\n\nexport type {ToggleStateOptions};\n\nexport interface ToggleState {\n  /** Whether the toggle is selected. */\n  readonly isSelected: boolean,\n\n  /** Updates selection state. */\n  setSelected(isSelected: boolean): void,\n\n  /** Toggle the selection state. */\n  toggle(): void\n}\n\n/**\n * Provides state management for toggle components like checkboxes and switches.\n */\nexport function useToggleState(props: ToggleStateOptions = {}): ToggleState {\n  let {isReadOnly} = props;\n\n  // have to provide an empty function so useControlledState doesn't throw a fit\n  // can't use useControlledState's prop calling because we need the event object from the change\n  let [isSelected, setSelected] = useControlledState(props.isSelected, props.defaultSelected || false, props.onChange);\n\n  function updateSelected(value) {\n    if (!isReadOnly) {\n      setSelected(value);\n    }\n  }\n\n  function toggleState() {\n    if (!isReadOnly) {\n      setSelected(!isSelected);\n    }\n  }\n\n  return {\n    isSelected,\n    setSelected: updateSelected,\n    toggle: toggleState\n  };\n}\n","// src/index.ts\nimport { useCallback, useRef } from \"react\";\nimport { useSafeLayoutEffect } from \"@heroui/use-safe-layout-effect\";\nfunction useCallbackRef(fn, deps = []) {\n  const ref = useRef(fn);\n  useSafeLayoutEffect(() => {\n    ref.current = fn;\n  });\n  return useCallback((...args) => {\n    var _a;\n    return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n  }, deps);\n}\nexport {\n  useCallbackRef\n};\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n  return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n  el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n  if (el && 'window' in el && el.window === el) {\n    return el;\n  }\n\n  const doc = getOwnerDocument(el as Element | null | undefined);\n  return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n  return value !== null &&\n    typeof value === 'object' &&\n    'nodeType' in value &&\n    typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n  return isNode(node) &&\n    node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    'host' in node;\n}\n","// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n  node: Node | null | undefined,\n  otherNode: Node | null | undefined\n): boolean {\n  if (!shadowDOM()) {\n    return otherNode && node ? node.contains(otherNode) : false;\n  }\n\n  if (!node || !otherNode) {\n    return false;\n  }\n\n  let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n  while (currentNode !== null) {\n    if (currentNode === node) {\n      return true;\n    }\n\n    if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n      (currentNode as HTMLSlotElement).assignedSlot) {\n      // Element is slotted\n      currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n    } else if (isShadowRoot(currentNode)) {\n      // Element is in shadow root\n      currentNode = currentNode.host;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n  if (!shadowDOM()) {\n    return doc.activeElement;\n  }\n  let activeElement: Element | null = doc.activeElement;\n\n  while (activeElement && 'shadowRoot' in activeElement &&\n  activeElement.shadowRoot?.activeElement) {\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n\n  return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n  if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n    if (event.composedPath) {\n      return event.composedPath()[0] as Element;\n    }\n  }\n  return event.target as Element;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof WindowEventMap>(el: Window, type: K, listener: (this: Document, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, fn, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n   \n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {DOMAttributes, HoverEvents} from '@react-types/shared';\nimport {getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface HoverProps extends HoverEvents {\n  /** Whether the hover events should be disabled. */\n  isDisabled?: boolean\n}\n\nexport interface HoverResult {\n  /** Props to spread on the target element. */\n  hoverProps: DOMAttributes,\n  isHovered: boolean\n}\n\n// iOS fires onPointerEnter twice: once with pointerType=\"touch\" and again with pointerType=\"mouse\".\n// We want to ignore these emulated events so they do not trigger hover behavior.\n// See https://bugs.webkit.org/show_bug.cgi?id=214609.\nlet globalIgnoreEmulatedMouseEvents = false;\nlet hoverCount = 0;\n\nfunction setGlobalIgnoreEmulatedMouseEvents() {\n  globalIgnoreEmulatedMouseEvents = true;\n\n  // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n  // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n  // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n  // the distant future because a user previously touched the element.\n  setTimeout(() => {\n    globalIgnoreEmulatedMouseEvents = false;\n  }, 50);\n}\n\nfunction handleGlobalPointerEvent(e) {\n  if (e.pointerType === 'touch') {\n    setGlobalIgnoreEmulatedMouseEvents();\n  }\n}\n\nfunction setupGlobalTouchEvents() {\n  if (typeof document === 'undefined') {\n    return;\n  }\n\n  if (typeof PointerEvent !== 'undefined') {\n    document.addEventListener('pointerup', handleGlobalPointerEvent);\n  } else if (process.env.NODE_ENV === 'test') {\n    document.addEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n  }\n\n  hoverCount++;\n  return () => {\n    hoverCount--;\n    if (hoverCount > 0) {\n      return;\n    }\n\n    if (typeof PointerEvent !== 'undefined') {\n      document.removeEventListener('pointerup', handleGlobalPointerEvent);\n    } else if (process.env.NODE_ENV === 'test') {\n      document.removeEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n    }\n  };\n}\n\n/**\n * Handles pointer hover interactions for an element. Normalizes behavior\n * across browsers and platforms, and ignores emulated mouse events on touch devices.\n */\nexport function useHover(props: HoverProps): HoverResult {\n  let {\n    onHoverStart,\n    onHoverChange,\n    onHoverEnd,\n    isDisabled\n  } = props;\n\n  let [isHovered, setHovered] = useState(false);\n  let state = useRef({\n    isHovered: false,\n    ignoreEmulatedMouseEvents: false,\n    pointerType: '',\n    target: null\n  }).current;\n\n  useEffect(setupGlobalTouchEvents, []);\n  let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n  let {hoverProps, triggerHoverEnd} = useMemo(() => {\n    let triggerHoverStart = (event, pointerType) => {\n      state.pointerType = pointerType;\n      if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) {\n        return;\n      }\n\n      state.isHovered = true;\n      let target = event.currentTarget;\n      state.target = target;\n\n      // When an element that is hovered over is removed, no pointerleave event is fired by the browser,\n      // even though the originally hovered target may have shrunk in size so it is no longer hovered.\n      // However, a pointerover event will be fired on the new target the mouse is over.\n      // In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.\n      addGlobalListener(getOwnerDocument(event.target), 'pointerover', e => {\n        if (state.isHovered && state.target && !nodeContains(state.target, e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      }, {capture: true});\n\n      if (onHoverStart) {\n        onHoverStart({\n          type: 'hoverstart',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(true);\n      }\n\n      setHovered(true);\n    };\n\n    let triggerHoverEnd = (event, pointerType) => {\n      let target = state.target;\n      state.pointerType = '';\n      state.target = null;\n\n      if (pointerType === 'touch' || !state.isHovered || !target) {\n        return;\n      }\n\n      state.isHovered = false;\n      removeAllGlobalListeners();\n\n      if (onHoverEnd) {\n        onHoverEnd({\n          type: 'hoverend',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(false);\n      }\n\n      setHovered(false);\n    };\n\n    let hoverProps: DOMAttributes = {};\n\n    if (typeof PointerEvent !== 'undefined') {\n      hoverProps.onPointerEnter = (e) => {\n        if (globalIgnoreEmulatedMouseEvents && e.pointerType === 'mouse') {\n          return;\n        }\n\n        triggerHoverStart(e, e.pointerType);\n      };\n\n      hoverProps.onPointerLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      };\n    } else if (process.env.NODE_ENV === 'test') {\n      hoverProps.onTouchStart = () => {\n        state.ignoreEmulatedMouseEvents = true;\n      };\n\n      hoverProps.onMouseEnter = (e) => {\n        if (!state.ignoreEmulatedMouseEvents && !globalIgnoreEmulatedMouseEvents) {\n          triggerHoverStart(e, 'mouse');\n        }\n\n        state.ignoreEmulatedMouseEvents = false;\n      };\n\n      hoverProps.onMouseLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, 'mouse');\n        }\n      };\n    }\n    return {hoverProps, triggerHoverEnd};\n  }, [onHoverStart, onHoverChange, onHoverEnd, isDisabled, state, addGlobalListener, removeAllGlobalListeners]);\n\n  useEffect(() => {\n    // Call the triggerHoverEnd as soon as isDisabled changes to true\n    // Safe to call triggerHoverEnd, it will early return if we aren't currently hovering\n    if (isDisabled) {\n      triggerHoverEnd({currentTarget: state.target}, state.pointerType);\n    }\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isDisabled]);\n\n  return {\n    hoverProps,\n    isHovered\n  };\n}\n","\"use client\";\nimport {\n  CheckboxIcon\n} from \"./chunk-FFVF7OUL.mjs\";\nimport {\n  useCheckbox\n} from \"./chunk-B4HPXQQT.mjs\";\n\n// src/checkbox.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { cloneElement } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Checkbox = forwardRef((props, ref) => {\n  const {\n    Component,\n    children,\n    icon = /* @__PURE__ */ jsx(CheckboxIcon, {}),\n    getBaseProps,\n    getWrapperProps,\n    getInputProps,\n    getIconProps,\n    getLabelProps\n  } = useCheckbox({ ...props, ref });\n  const clonedIcon = typeof icon === \"function\" ? icon(getIconProps()) : cloneElement(icon, getIconProps());\n  return /* @__PURE__ */ jsxs(Component, { ...getBaseProps(), children: [\n    /* @__PURE__ */ jsx(\"input\", { ...getInputProps() }),\n    /* @__PURE__ */ jsx(\"span\", { ...getWrapperProps(), children: clonedIcon }),\n    children && /* @__PURE__ */ jsx(\"span\", { ...getLabelProps(), children })\n  ] });\n});\nCheckbox.displayName = \"HeroUI.Checkbox\";\nvar checkbox_default = Checkbox;\n\nexport {\n  checkbox_default\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key} from '@react-types/shared';\nimport {isAppleDevice, useId} from '@react-aria/utils';\nimport {RefObject} from 'react';\n\ninterface Event {\n  altKey: boolean,\n  ctrlKey: boolean,\n  metaKey: boolean\n}\n\nexport function isNonContiguousSelectionModifier(e: Event): boolean {\n  // Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.\n  // On Windows and Ubuntu, Alt + Space has a system wide meaning.\n  return isAppleDevice() ? e.altKey : e.ctrlKey;\n}\n\nexport function getItemElement(collectionRef: RefObject<HTMLElement | null>, key: Key): Element | null | undefined {\n  let selector = `[data-key=\"${CSS.escape(String(key))}\"]`;\n  let collection = collectionRef.current?.dataset.collection;\n  if (collection) {\n    selector = `[data-collection=\"${CSS.escape(collection)}\"]${selector}`;\n  }\n  return collectionRef.current?.querySelector(selector);\n}\n\nconst collectionMap = new WeakMap<Collection<any>, string>();\nexport function useCollectionId(collection: Collection<any>): string {\n  let id = useId();\n  collectionMap.set(collection, id);\n  return id;\n}\n\nexport function getCollectionId(collection: Collection<any>): string {\n  return collectionMap.get(collection)!;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, Key, KeyboardDelegate} from '@react-types/shared';\nimport {KeyboardEvent, useRef} from 'react';\nimport {MultipleSelectionManager} from '@react-stately/selection';\n\n/**\n * Controls how long to wait before clearing the typeahead buffer.\n */\nconst TYPEAHEAD_DEBOUNCE_WAIT_MS = 1000; // 1 second\n\nexport interface AriaTypeSelectOptions {\n  /**\n   * A delegate that returns collection item keys with respect to visual layout.\n   */\n  keyboardDelegate: KeyboardDelegate,\n  /**\n   * An interface for reading and updating multiple selection state.\n   */\n  selectionManager: MultipleSelectionManager,\n  /**\n   * Called when an item is focused by typing.\n   */\n  onTypeSelect?: (key: Key) => void\n}\n\nexport interface TypeSelectAria {\n  /**\n   * Props to be spread on the owner of the options.\n   */\n  typeSelectProps: DOMAttributes\n}\n\n/**\n * Handles typeahead interactions with collections.\n */\nexport function useTypeSelect(options: AriaTypeSelectOptions): TypeSelectAria {\n  let {keyboardDelegate, selectionManager, onTypeSelect} = options;\n  let state = useRef<{search: string, timeout: ReturnType<typeof setTimeout> | undefined}>({\n    search: '',\n    timeout: undefined\n  }).current;\n\n  let onKeyDown = (e: KeyboardEvent) => {\n    let character = getStringForKey(e.key);\n    if (!character || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target as HTMLElement)) {\n      return;\n    }\n\n    // Do not propagate the Spacebar event if it's meant to be part of the search.\n    // When we time out, the search term becomes empty, hence the check on length.\n    // Trimming is to account for the case of pressing the Spacebar more than once,\n    // which should cycle through the selection/deselection of the focused item.\n    if (character === ' ' && state.search.trim().length > 0) {\n      e.preventDefault();\n      if (!('continuePropagation' in e)) {\n        e.stopPropagation();\n      }\n    }\n\n    state.search += character;\n\n    if (keyboardDelegate.getKeyForSearch != null) {\n      // Use the delegate to find a key to focus.\n      // Prioritize items after the currently focused item, falling back to searching the whole list.\n      let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);\n\n      // If no key found, search from the top.\n      if (key == null) {\n        key = keyboardDelegate.getKeyForSearch(state.search);\n      }\n\n      if (key != null) {\n        selectionManager.setFocusedKey(key);\n        if (onTypeSelect) {\n          onTypeSelect(key);\n        }\n      }\n    }\n\n    clearTimeout(state.timeout);\n    state.timeout = setTimeout(() => {\n      state.search = '';\n    }, TYPEAHEAD_DEBOUNCE_WAIT_MS);\n  };\n\n  return {\n    typeSelectProps: {\n      // Using a capturing listener to catch the keydown event before\n      // other hooks in order to handle the Spacebar event.\n      onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : undefined\n    }\n  };\n}\n\nfunction getStringForKey(key: string) {\n  // If the key is of length 1, it is an ASCII value.\n  // Otherwise, if there are no ASCII characters in the key name,\n  // it is a Unicode character.\n  // See https://www.w3.org/TR/uievents-key/\n  if (key.length === 1 || !/^[A-Z]/i.test(key)) {\n    return key;\n  }\n\n  return '';\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOwnerWindow} from '@react-aria/utils';\n\nfunction isStyleVisible(element: Element) {\n  const windowObject = getOwnerWindow(element);\n  if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) {\n    return false;\n  }\n\n  let {display, visibility} = element.style;\n\n  let isVisible = (\n    display !== 'none' &&\n    visibility !== 'hidden' &&\n    visibility !== 'collapse'\n  );\n\n  if (isVisible) {\n    const {getComputedStyle} = element.ownerDocument.defaultView as unknown as Window;\n    let {display: computedDisplay, visibility: computedVisibility} = getComputedStyle(element);\n\n    isVisible = (\n      computedDisplay !== 'none' &&\n      computedVisibility !== 'hidden' &&\n      computedVisibility !== 'collapse'\n    );\n  }\n\n  return isVisible;\n}\n\nfunction isAttributeVisible(element: Element, childElement?: Element) {\n  return (\n    !element.hasAttribute('hidden') &&\n    // Ignore HiddenSelect when tree walking.\n    !element.hasAttribute('data-react-aria-prevent-focus') &&\n    (element.nodeName === 'DETAILS' &&\n      childElement &&\n      childElement.nodeName !== 'SUMMARY'\n      ? element.hasAttribute('open')\n      : true)\n  );\n}\n\n/**\n * Adapted from https://github.com/testing-library/jest-dom and\n * https://github.com/vuejs/vue-test-utils-next/.\n * Licensed under the MIT License.\n * @param element - Element to evaluate for display or visibility.\n */\nexport function isElementVisible(element: Element, childElement?: Element): boolean {\n  return (\n    element.nodeName !== '#comment' &&\n    isStyleVisible(element) &&\n    isAttributeVisible(element, childElement) &&\n    (!element.parentElement || isElementVisible(element.parentElement, element))\n  );\n}\n","import {getActiveElement, getOwnerDocument} from '@react-aria/utils';\n\nexport function moveVirtualFocus(to: Element | null): void {\n  let from = getVirtuallyFocusedElement(getOwnerDocument(to));\n  if (from !== to) {\n    if (from) {\n      dispatchVirtualBlur(from, to);\n    }\n    if (to) {\n      dispatchVirtualFocus(to, from);\n    }\n  }\n}\n\nexport function dispatchVirtualBlur(from: Element, to: Element | null): void {\n  from.dispatchEvent(new FocusEvent('blur', {relatedTarget: to}));\n  from.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: to}));\n}\n\nexport function dispatchVirtualFocus(to: Element, from: Element | null): void {\n  to.dispatchEvent(new FocusEvent('focus', {relatedTarget: from}));\n  to.dispatchEvent(new FocusEvent('focusin', {bubbles: true, relatedTarget: from}));\n}\n\nexport function getVirtuallyFocusedElement(document: Document): Element | null {\n  let activeElement = getActiveElement(document);\n  let activeDescendant = activeElement?.getAttribute('aria-activedescendant');\n  if (activeDescendant) {\n    return document.getElementById(activeDescendant) || activeElement;\n  }\n\n  return activeElement;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string): boolean {\n  // If the Intl.Locale API is available, use it to get the locale's text direction.\n  if (Intl.Locale) {\n    let locale = new Intl.Locale(localeString).maximize();\n\n    // Use the text info object to get the direction if possible.\n    // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n    let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n    if (textInfo) {\n      return textInfo.direction === 'rtl';\n    }\n\n    // Fallback: guess using the script.\n    // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n    if (locale.script) {\n      return RTL_SCRIPTS.has(locale.script);\n    }\n  }\n\n  // If not, just guess by the language (first part of the locale)\n  let lang = localeString.split('-')[0];\n  return RTL_LANGS.has(lang);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {JSX, ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n  /** Contents that should have the locale applied. */\n  children: ReactNode,\n  /** The locale to apply to the children. */\n  locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): JSX.Element {\n  let {locale, children} = props;\n  let defaultLocale = useDefaultLocale();\n\n  let value: Locale = React.useMemo(() => {\n    if (!locale) {\n      return defaultLocale;\n    }\n\n    return {\n      locale,\n      direction: isRTL(locale) ? 'rtl' : 'ltr'\n    };\n  }, [defaultLocale, locale]);\n\n  return (\n    <I18nContext.Provider value={value}>\n      {children}\n    </I18nContext.Provider>\n  );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n  let defaultLocale = useDefaultLocale();\n  let context = useContext(I18nContext);\n  return context || defaultLocale;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps, FocusableElement, Key, LongPressEvent, PointerType, PressEvent, RefObject} from '@react-types/shared';\nimport {focusSafely, PressHookProps, useLongPress, usePress} from '@react-aria/interactions';\nimport {getCollectionId, isNonContiguousSelectionModifier} from './utils';\nimport {isCtrlKeyPressed, mergeProps, openLink, useId, useRouter} from '@react-aria/utils';\nimport {moveVirtualFocus} from '@react-aria/focus';\nimport {MultipleSelectionManager} from '@react-stately/selection';\nimport {useEffect, useRef} from 'react';\n\nexport interface SelectableItemOptions extends DOMProps {\n  /**\n   * An interface for reading and updating multiple selection state.\n   */\n  selectionManager: MultipleSelectionManager,\n  /**\n   * A unique key for the item.\n   */\n  key: Key,\n  /**\n   * Ref to the item.\n   */\n  ref: RefObject<FocusableElement | null>,\n  /**\n   * By default, selection occurs on pointer down. This can be strange if selecting an\n   * item causes the UI to disappear immediately (e.g. menus).\n   */\n  shouldSelectOnPressUp?: boolean,\n  /**\n   * Whether selection requires the pointer/mouse down and up events to occur on the same target or triggers selection on\n   * the target of the pointer/mouse up event.\n   */\n  allowsDifferentPressOrigin?: boolean,\n  /**\n   * Whether the option is contained in a virtual scroller.\n   */\n  isVirtualized?: boolean,\n  /**\n   * Function to focus the item.\n   */\n  focus?: () => void,\n  /**\n   * Whether the option should use virtual focus instead of being focused directly.\n   */\n  shouldUseVirtualFocus?: boolean,\n  /** Whether the item is disabled. */\n  isDisabled?: boolean,\n  /**\n   * Handler that is called when a user performs an action on the item. The exact user event depends on\n   * the collection's `selectionBehavior` prop and the interaction modality.\n   */\n  onAction?: () => void,\n  /**\n   * The behavior of links in the collection.\n   * - 'action': link behaves like onAction.\n   * - 'selection': link follows selection interactions (e.g. if URL drives selection).\n   * - 'override': links override all other interactions (link items are not selectable).\n   * - 'none': links are disabled for both selection and actions (e.g. handled elsewhere).\n   * @default 'action'\n   */\n  linkBehavior?: 'action' | 'selection' | 'override' | 'none'\n}\n\nexport interface SelectableItemStates {\n  /** Whether the item is currently in a pressed state. */\n  isPressed: boolean,\n  /** Whether the item is currently selected. */\n  isSelected: boolean,\n  /** Whether the item is currently focused. */\n  isFocused: boolean,\n  /**\n   * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may\n   * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.\n   */\n  isDisabled: boolean,\n  /**\n   * Whether the item may be selected, dependent on `selectionMode`, `disabledKeys`, and `disabledBehavior`.\n   */\n  allowsSelection: boolean,\n  /**\n   * Whether the item has an action, dependent on `onAction`, `disabledKeys`,\n   * and `disabledBehavior`. It may also change depending on the current selection state\n   * of the list (e.g. when selection is primary). This can be used to enable or disable hover\n   * styles or other visual indications of interactivity.\n   */\n  hasAction: boolean\n}\n\nexport interface SelectableItemAria extends SelectableItemStates {\n  /**\n   * Props to be spread on the item root node.\n   */\n  itemProps: DOMAttributes\n}\n\n/**\n * Handles interactions with an item in a selectable collection.\n */\nexport function useSelectableItem(options: SelectableItemOptions): SelectableItemAria {\n  let {\n    id,\n    selectionManager: manager,\n    key,\n    ref,\n    shouldSelectOnPressUp,\n    shouldUseVirtualFocus,\n    focus,\n    isDisabled,\n    onAction,\n    allowsDifferentPressOrigin,\n    linkBehavior = 'action'\n  } = options;\n  let router = useRouter();\n  id = useId(id);\n  let onSelect = (e: PressEvent | LongPressEvent | PointerEvent) => {\n    if (e.pointerType === 'keyboard' && isNonContiguousSelectionModifier(e)) {\n      manager.toggleSelection(key);\n    } else {\n      if (manager.selectionMode === 'none') {\n        return;\n      }\n\n      if (manager.isLink(key)) {\n        if (linkBehavior === 'selection' && ref.current) {\n          let itemProps = manager.getItemProps(key);\n          router.open(ref.current, e, itemProps.href, itemProps.routerOptions);\n          // Always set selected keys back to what they were so that select and combobox close.\n          manager.setSelectedKeys(manager.selectedKeys);\n          return;\n        } else if (linkBehavior === 'override' || linkBehavior === 'none') {\n          return;\n        }\n      }\n\n      if (manager.selectionMode === 'single') {\n        if (manager.isSelected(key) && !manager.disallowEmptySelection) {\n          manager.toggleSelection(key);\n        } else {\n          manager.replaceSelection(key);\n        }\n      } else if (e && e.shiftKey) {\n        manager.extendSelection(key);\n      } else if (manager.selectionBehavior === 'toggle' || (e && (isCtrlKeyPressed(e) || e.pointerType === 'touch' || e.pointerType === 'virtual'))) {\n        // if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys\n        manager.toggleSelection(key);\n      } else {\n        manager.replaceSelection(key);\n      }\n    }\n  };\n\n  // Focus the associated DOM node when this item becomes the focusedKey\n  // TODO: can't make this useLayoutEffect bacause it breaks menus inside dialogs\n  // However, if this is a useEffect, it runs twice and dispatches two blur events and immediately sets\n  // aria-activeDescendant in useAutocomplete... I've worked around this for now\n  useEffect(() => {\n    let isFocused = key === manager.focusedKey;\n    if (isFocused && manager.isFocused) {\n      if (!shouldUseVirtualFocus) {\n        if (focus) {\n          focus();\n        } else if (document.activeElement !== ref.current && ref.current) {\n          focusSafely(ref.current);\n        }\n      } else {\n        moveVirtualFocus(ref.current);\n      }\n    }\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [ref, key, manager.focusedKey, manager.childFocusStrategy, manager.isFocused, shouldUseVirtualFocus]);\n\n  isDisabled = isDisabled || manager.isDisabled(key);\n  // Set tabIndex to 0 if the element is focused, or -1 otherwise so that only the last focused\n  // item is tabbable.  If using virtual focus, don't set a tabIndex at all so that VoiceOver\n  // on iOS 14 doesn't try to move real DOM focus to the item anyway.\n  let itemProps: SelectableItemAria['itemProps'] = {};\n  if (!shouldUseVirtualFocus && !isDisabled) {\n    itemProps = {\n      tabIndex: key === manager.focusedKey ? 0 : -1,\n      onFocus(e) {\n        if (e.target === ref.current) {\n          manager.setFocusedKey(key);\n        }\n      }\n    };\n  } else if (isDisabled) {\n    itemProps.onMouseDown = (e) => {\n      // Prevent focus going to the body when clicking on a disabled item.\n      e.preventDefault();\n    };\n  }\n\n  // With checkbox selection, onAction (i.e. navigation) becomes primary, and occurs on a single click of the row.\n  // Clicking the checkbox enters selection mode, after which clicking anywhere on any row toggles selection for that row.\n  // With highlight selection, onAction is secondary, and occurs on double click. Single click selects the row.\n  // With touch, onAction occurs on single tap, and long press enters selection mode.\n  let isLinkOverride = manager.isLink(key) && linkBehavior === 'override';\n  let hasLinkAction = manager.isLink(key) && linkBehavior !== 'selection' && linkBehavior !== 'none';\n  let allowsSelection = !isDisabled && manager.canSelectItem(key) && !isLinkOverride;\n  let allowsActions = (onAction || hasLinkAction) && !isDisabled;\n  let hasPrimaryAction = allowsActions && (\n    manager.selectionBehavior === 'replace'\n      ? !allowsSelection\n      : !allowsSelection || manager.isEmpty\n  );\n  let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === 'replace';\n  let hasAction = hasPrimaryAction || hasSecondaryAction;\n  let modality = useRef<PointerType | null>(null);\n\n  let longPressEnabled = hasAction && allowsSelection;\n  let longPressEnabledOnPressStart = useRef(false);\n  let hadPrimaryActionOnPressStart = useRef(false);\n\n  let performAction = (e) => {\n    if (onAction) {\n      onAction();\n    }\n\n    if (hasLinkAction && ref.current) {\n      let itemProps = manager.getItemProps(key);\n      router.open(ref.current, e, itemProps.href, itemProps.routerOptions);\n    }\n  };\n\n  // By default, selection occurs on pointer down. This can be strange if selecting an\n  // item causes the UI to disappear immediately (e.g. menus).\n  // If shouldSelectOnPressUp is true, we use onPressUp instead of onPressStart.\n  // onPress requires a pointer down event on the same element as pointer up. For menus,\n  // we want to be able to have the pointer down on the trigger that opens the menu and\n  // the pointer up on the menu item rather than requiring a separate press.\n  // For keyboard events, selection still occurs on key down.\n  let itemPressProps: PressHookProps = {ref};\n  if (shouldSelectOnPressUp) {\n    itemPressProps.onPressStart = (e) => {\n      modality.current = e.pointerType;\n      longPressEnabledOnPressStart.current = longPressEnabled;\n      if (e.pointerType === 'keyboard' && (!hasAction || isSelectionKey())) {\n        onSelect(e);\n      }\n    };\n\n    // If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)\n    // Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)\n    if (!allowsDifferentPressOrigin) {\n      itemPressProps.onPress = (e) => {\n        if (hasPrimaryAction || (hasSecondaryAction && e.pointerType !== 'mouse')) {\n          if (e.pointerType === 'keyboard' && !isActionKey()) {\n            return;\n          }\n\n          performAction(e);\n        } else if (e.pointerType !== 'keyboard' && allowsSelection) {\n          onSelect(e);\n        }\n      };\n    } else {\n      itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e) => {\n        if (e.pointerType === 'mouse' && allowsSelection) {\n          onSelect(e);\n        }\n      };\n\n      itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {\n        if (e.pointerType !== 'keyboard' && e.pointerType !== 'mouse' && allowsSelection) {\n          onSelect(e);\n        }\n      };\n    }\n  } else {\n    itemPressProps.onPressStart = (e) => {\n      modality.current = e.pointerType;\n      longPressEnabledOnPressStart.current = longPressEnabled;\n      hadPrimaryActionOnPressStart.current = hasPrimaryAction;\n\n      // Select on mouse down unless there is a primary action which will occur on mouse up.\n      // For keyboard, select on key down. If there is an action, the Space key selects on key down,\n      // and the Enter key performs onAction on key up.\n      if (\n        allowsSelection && (\n          (e.pointerType === 'mouse' && !hasPrimaryAction) ||\n          (e.pointerType === 'keyboard' && (!allowsActions || isSelectionKey()))\n        )\n      ) {\n        onSelect(e);\n      }\n    };\n\n    itemPressProps.onPress = (e) => {\n      // Selection occurs on touch up. Primary actions always occur on pointer up.\n      // Both primary and secondary actions occur on Enter key up. The only exception\n      // is secondary actions, which occur on double click with a mouse.\n      if (\n        e.pointerType === 'touch' ||\n        e.pointerType === 'pen' ||\n        e.pointerType === 'virtual' ||\n        (e.pointerType === 'keyboard' && hasAction && isActionKey()) ||\n        (e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current)\n      ) {\n        if (hasAction) {\n          performAction(e);\n        } else if (allowsSelection) {\n          onSelect(e);\n        }\n      }\n    };\n  }\n\n  itemProps['data-collection'] = getCollectionId(manager.collection);\n  itemProps['data-key'] = key;\n  itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;\n\n  // When using virtual focus, make sure the focused key gets updated on press.\n  if (shouldUseVirtualFocus) {\n    itemPressProps = mergeProps(itemPressProps, {\n      onPressStart(e) {\n        if (e.pointerType !== 'touch') {\n          manager.setFocused(true);\n          manager.setFocusedKey(key);\n        }\n      },\n      onPress(e) {\n        if (e.pointerType === 'touch') {\n          manager.setFocused(true);\n          manager.setFocusedKey(key);\n        }\n      }\n    });\n  }\n\n  let {pressProps, isPressed} = usePress(itemPressProps);\n\n  // Double clicking with a mouse with selectionBehavior = 'replace' performs an action.\n  let onDoubleClick = hasSecondaryAction ? (e) => {\n    if (modality.current === 'mouse') {\n      e.stopPropagation();\n      e.preventDefault();\n      performAction(e);\n    }\n  } : undefined;\n\n  // Long pressing an item with touch when selectionBehavior = 'replace' switches the selection behavior\n  // to 'toggle'. This changes the single tap behavior from performing an action (i.e. navigating) to\n  // selecting, and may toggle the appearance of a UI affordance like checkboxes on each item.\n  let {longPressProps} = useLongPress({\n    isDisabled: !longPressEnabled,\n    onLongPress(e) {\n      if (e.pointerType === 'touch') {\n        onSelect(e);\n        manager.setSelectionBehavior('toggle');\n      }\n    }\n  });\n\n  // Prevent native drag and drop on long press if we also select on long press.\n  // Once the user is in selection mode, they can long press again to drag.\n  // Use a capturing listener to ensure this runs before useDrag, regardless of\n  // the order the props get merged.\n  let onDragStartCapture = e => {\n    if (modality.current === 'touch' && longPressEnabledOnPressStart.current) {\n      e.preventDefault();\n    }\n  };\n\n  // Prevent default on link clicks so that we control exactly\n  // when they open (to match selection behavior).\n  let onClick = manager.isLink(key) ? e => {\n    if (!(openLink as any).isOpening) {\n      e.preventDefault();\n    }\n  } : undefined;\n\n  return {\n    itemProps: mergeProps(\n      itemProps,\n      allowsSelection || hasPrimaryAction || (shouldUseVirtualFocus && !isDisabled) ? pressProps : {},\n      longPressEnabled ? longPressProps : {},\n      {onDoubleClick, onDragStartCapture, onClick, id},\n      // Prevent DOM focus from moving on mouse down when using virtual focus\n      shouldUseVirtualFocus ? {onMouseDown: e => e.preventDefault()} : undefined\n    ),\n    isPressed,\n    isSelected: manager.isSelected(key),\n    isFocused: manager.isFocused && manager.focusedKey === key,\n    isDisabled,\n    allowsSelection,\n    hasAction\n  };\n}\n\nfunction isActionKey() {\n  let event = window.event as KeyboardEvent;\n  return event?.key === 'Enter';\n}\n\nfunction isSelectionKey() {\n  let event = window.event as KeyboardEvent;\n  return event?.key === ' ' || event?.code === 'Space';\n}\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getItemElement} from './utils';\nimport {Key, LayoutDelegate, Rect, RefObject, Size} from '@react-types/shared';\n\nexport class DOMLayoutDelegate implements LayoutDelegate {\n  private ref: RefObject<HTMLElement | null>;\n\n  constructor(ref: RefObject<HTMLElement | null>) {\n    this.ref = ref;\n  }\n\n  getItemRect(key: Key): Rect | null {\n    let container = this.ref.current;\n    if (!container) {\n      return null;\n    }\n    let item = key != null ? getItemElement(this.ref, key) : null;\n    if (!item) {\n      return null;\n    }\n\n    let containerRect = container.getBoundingClientRect();\n    let itemRect = item.getBoundingClientRect();\n\n    return {\n      x: itemRect.left - containerRect.left + container.scrollLeft,\n      y: itemRect.top - containerRect.top + container.scrollTop,\n      width: itemRect.width,\n      height: itemRect.height\n    };\n  }\n\n  getContentSize(): Size {\n    let container = this.ref.current;\n    return {\n      width: container?.scrollWidth ?? 0,\n      height: container?.scrollHeight ?? 0\n    };\n  }\n\n  getVisibleRect(): Rect {\n    let container = this.ref.current;\n    return {\n      x: container?.scrollLeft ?? 0,\n      y: container?.scrollTop ?? 0,\n      width: container?.offsetWidth ?? 0,\n      height: container?.offsetHeight ?? 0\n    };\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key} from '@react-types/shared';\nimport {TableState} from '@react-stately/table';\n\nexport const gridIds = new WeakMap<TableState<unknown>, string>();\n\nfunction normalizeKey(key: Key): string {\n  if (typeof key === 'string') {\n    return key.replace(/\\s*/g, '');\n  }\n\n  return '' + key;\n}\n\nexport function getColumnHeaderId<T>(state: TableState<T>, columnKey: Key): string {\n  let gridId = gridIds.get(state);\n  if (!gridId) {\n    throw new Error('Unknown grid');\n  }\n\n  return `${gridId}-${normalizeKey(columnKey)}`;\n}\n\nexport function getCellId<T>(state: TableState<T>, rowKey: Key, columnKey: Key): string {\n  let gridId = gridIds.get(state);\n  if (!gridId) {\n    throw new Error('Unknown grid');\n  }\n\n  return `${gridId}-${normalizeKey(rowKey)}-${normalizeKey(columnKey)}`;\n}\n\nexport function getRowLabelledBy<T>(state: TableState<T>, rowKey: Key): string {\n  // A row is labelled by it's row headers.\n  return [...state.collection.rowHeaderColumnKeys].map(columnKey =>\n    getCellId(state, rowKey, columnKey)\n  ).join(' ');\n}\n","{\n  \"ascending\": \"تصاعدي\",\n  \"ascendingSort\": \"ترتيب حسب العمود {columnName} بترتيب تصاعدي\",\n  \"columnSize\": \"{value} بالبكسل\",\n  \"descending\": \"تنازلي\",\n  \"descendingSort\": \"ترتيب حسب العمود {columnName} بترتيب تنازلي\",\n  \"resizerDescription\": \"اضغط على مفتاح Enter لبدء تغيير الحجم\",\n  \"select\": \"تحديد\",\n  \"selectAll\": \"تحديد الكل\",\n  \"sortable\": \"عمود قابل للترتيب\"\n}\n","{\n  \"ascending\": \"възходящ\",\n  \"ascendingSort\": \"сортирано по колона {columnName} във възходящ ред\",\n  \"columnSize\": \"{value} пиксела\",\n  \"descending\": \"низходящ\",\n  \"descendingSort\": \"сортирано по колона {columnName} в низходящ ред\",\n  \"resizerDescription\": \"Натиснете „Enter“, за да започнете да преоразмерявате\",\n  \"select\": \"Изберете\",\n  \"selectAll\": \"Изберете всичко\",\n  \"sortable\": \"сортираща колона\"\n}\n","{\n  \"ascending\": \"vzestupně\",\n  \"ascendingSort\": \"řazeno vzestupně podle sloupce {columnName}\",\n  \"columnSize\": \"{value} pixelů\",\n  \"descending\": \"sestupně\",\n  \"descendingSort\": \"řazeno sestupně podle sloupce {columnName}\",\n  \"resizerDescription\": \"Stisknutím klávesy Enter začnete měnit velikost\",\n  \"select\": \"Vybrat\",\n  \"selectAll\": \"Vybrat vše\",\n  \"sortable\": \"sloupec s možností řazení\"\n}\n","{\n  \"ascending\": \"stigende\",\n  \"ascendingSort\": \"sorteret efter kolonne {columnName} i stigende rækkefølge\",\n  \"columnSize\": \"{value} pixels\",\n  \"descending\": \"faldende\",\n  \"descendingSort\": \"sorteret efter kolonne {columnName} i faldende rækkefølge\",\n  \"resizerDescription\": \"Tryk på Enter for at ændre størrelse\",\n  \"select\": \"Vælg\",\n  \"selectAll\": \"Vælg alle\",\n  \"sortable\": \"sorterbar kolonne\"\n}\n","{\n  \"ascending\": \"aufsteigend\",\n  \"ascendingSort\": \"sortiert nach Spalte {columnName} in aufsteigender Reihenfolge\",\n  \"columnSize\": \"{value} Pixel\",\n  \"descending\": \"absteigend\",\n  \"descendingSort\": \"sortiert nach Spalte {columnName} in absteigender Reihenfolge\",\n  \"resizerDescription\": \"Eingabetaste zum Starten der Größenänderung drücken\",\n  \"select\": \"Auswählen\",\n  \"selectAll\": \"Alles auswählen\",\n  \"sortable\": \"sortierbare Spalte\"\n}\n","{\n  \"ascending\": \"αύξουσα\",\n  \"ascendingSort\": \"διαλογή ανά στήλη {columnName} σε αύξουσα σειρά\",\n  \"columnSize\": \"{value} pixel\",\n  \"descending\": \"φθίνουσα\",\n  \"descendingSort\": \"διαλογή ανά στήλη {columnName} σε φθίνουσα σειρά\",\n  \"resizerDescription\": \"Πατήστε Enter για έναρξη της αλλαγής μεγέθους\",\n  \"select\": \"Επιλογή\",\n  \"selectAll\": \"Επιλογή όλων\",\n  \"sortable\": \"Στήλη διαλογής\"\n}\n","{\n  \"select\": \"Select\",\n  \"selectAll\": \"Select All\",\n  \"sortable\": \"sortable column\",\n  \"ascending\": \"ascending\",\n  \"descending\": \"descending\",\n  \"ascendingSort\": \"sorted by column {columnName} in ascending order\",\n  \"descendingSort\": \"sorted by column {columnName} in descending order\",\n  \"columnSize\": \"{value} pixels\",\n  \"resizerDescription\": \"Press Enter to start resizing\"\n}\n","{\n  \"ascending\": \"ascendente\",\n  \"ascendingSort\": \"ordenado por columna {columnName} en sentido ascendente\",\n  \"columnSize\": \"{value} píxeles\",\n  \"descending\": \"descendente\",\n  \"descendingSort\": \"ordenado por columna {columnName} en orden descendente\",\n  \"resizerDescription\": \"Pulse Intro para empezar a redimensionar\",\n  \"select\": \"Seleccionar\",\n  \"selectAll\": \"Seleccionar todos\",\n  \"sortable\": \"columna ordenable\"\n}\n","{\n  \"ascending\": \"tõusev järjestus\",\n  \"ascendingSort\": \"sorditud veeru järgi {columnName} tõusvas järjestuses\",\n  \"columnSize\": \"{value} pikslit\",\n  \"descending\": \"laskuv järjestus\",\n  \"descendingSort\": \"sorditud veeru järgi {columnName} laskuvas järjestuses\",\n  \"resizerDescription\": \"Suuruse muutmise alustamiseks vajutage klahvi Enter\",\n  \"select\": \"Vali\",\n  \"selectAll\": \"Vali kõik\",\n  \"sortable\": \"sorditav veerg\"\n}\n","{\n  \"ascending\": \"nouseva\",\n  \"ascendingSort\": \"lajiteltu sarakkeen {columnName} mukaan nousevassa järjestyksessä\",\n  \"columnSize\": \"{value} pikseliä\",\n  \"descending\": \"laskeva\",\n  \"descendingSort\": \"lajiteltu sarakkeen {columnName} mukaan laskevassa järjestyksessä\",\n  \"resizerDescription\": \"Aloita koon muutos painamalla Enter-näppäintä\",\n  \"select\": \"Valitse\",\n  \"selectAll\": \"Valitse kaikki\",\n  \"sortable\": \"lajiteltava sarake\"\n}\n","{\n  \"ascending\": \"croissant\",\n  \"ascendingSort\": \"trié en fonction de la colonne {columnName} par ordre croissant\",\n  \"columnSize\": \"{value} pixels\",\n  \"descending\": \"décroissant\",\n  \"descendingSort\": \"trié en fonction de la colonne {columnName} par ordre décroissant\",\n  \"resizerDescription\": \"Appuyez sur Entrée pour commencer le redimensionnement.\",\n  \"select\": \"Sélectionner\",\n  \"selectAll\": \"Sélectionner tout\",\n  \"sortable\": \"colonne triable\"\n}\n","{\n  \"ascending\": \"עולה\",\n  \"ascendingSort\": \"מוין לפי עמודה {columnName} בסדר עולה\",\n  \"columnSize\": \"{value} פיקסלים\",\n  \"descending\": \"יורד\",\n  \"descendingSort\": \"מוין לפי עמודה {columnName} בסדר יורד\",\n  \"resizerDescription\": \"הקש Enter כדי לשנות את הגודל\",\n  \"select\": \"בחר\",\n  \"selectAll\": \"בחר הכול\",\n  \"sortable\": \"עמודה שניתן למיין\"\n}\n","{\n  \"ascending\": \"rastući\",\n  \"ascendingSort\": \"razvrstano po stupcima {columnName} rastućem redoslijedom\",\n  \"columnSize\": \"{value} piksela\",\n  \"descending\": \"padajući\",\n  \"descendingSort\": \"razvrstano po stupcima {columnName} padajućim redoslijedom\",\n  \"resizerDescription\": \"Pritisnite Enter da biste započeli promenu veličine\",\n  \"select\": \"Odaberite\",\n  \"selectAll\": \"Odaberite sve\",\n  \"sortable\": \"stupac koji se može razvrstati\"\n}\n","{\n  \"ascending\": \"növekvő\",\n  \"ascendingSort\": \"rendezve a(z) {columnName} oszlop szerint, növekvő sorrendben\",\n  \"columnSize\": \"{value} képpont\",\n  \"descending\": \"csökkenő\",\n  \"descendingSort\": \"rendezve a(z) {columnName} oszlop szerint, csökkenő sorrendben\",\n  \"resizerDescription\": \"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez\",\n  \"select\": \"Kijelölés\",\n  \"selectAll\": \"Összes kijelölése\",\n  \"sortable\": \"rendezendő oszlop\"\n}\n","{\n  \"ascending\": \"crescente\",\n  \"ascendingSort\": \"in ordine crescente in base alla colonna {columnName}\",\n  \"columnSize\": \"{value} pixel\",\n  \"descending\": \"decrescente\",\n  \"descendingSort\": \"in ordine decrescente in base alla colonna {columnName}\",\n  \"resizerDescription\": \"Premi Invio per iniziare a ridimensionare\",\n  \"select\": \"Seleziona\",\n  \"selectAll\": \"Seleziona tutto\",\n  \"sortable\": \"colonna ordinabile\"\n}\n","{\n  \"ascending\": \"昇順\",\n  \"ascendingSort\": \"列 {columnName} を昇順で並べ替え\",\n  \"columnSize\": \"{value} ピクセル\",\n  \"descending\": \"降順\",\n  \"descendingSort\": \"列 {columnName} を降順で並べ替え\",\n  \"resizerDescription\": \"Enter キーを押してサイズ変更を開始\",\n  \"select\": \"選択\",\n  \"selectAll\": \"すべて選択\",\n  \"sortable\": \"並べ替え可能な列\"\n}\n","{\n  \"ascending\": \"오름차순\",\n  \"ascendingSort\": \"{columnName} 열을 기준으로 오름차순으로 정렬됨\",\n  \"columnSize\": \"{value} 픽셀\",\n  \"descending\": \"내림차순\",\n  \"descendingSort\": \"{columnName} 열을 기준으로 내림차순으로 정렬됨\",\n  \"resizerDescription\": \"크기 조정을 시작하려면 Enter를 누르세요.\",\n  \"select\": \"선택\",\n  \"selectAll\": \"모두 선택\",\n  \"sortable\": \"정렬 가능한 열\"\n}\n","{\n  \"ascending\": \"didėjančia tvarka\",\n  \"ascendingSort\": \"surikiuota pagal stulpelį {columnName} didėjančia tvarka\",\n  \"columnSize\": \"{value} piks.\",\n  \"descending\": \"mažėjančia tvarka\",\n  \"descendingSort\": \"surikiuota pagal stulpelį {columnName} mažėjančia tvarka\",\n  \"resizerDescription\": \"Paspauskite „Enter“, kad pradėtumėte keisti dydį\",\n  \"select\": \"Pasirinkti\",\n  \"selectAll\": \"Pasirinkti viską\",\n  \"sortable\": \"rikiuojamas stulpelis\"\n}\n","{\n  \"ascending\": \"augošā secībā\",\n  \"ascendingSort\": \"kārtots pēc kolonnas {columnName} augošā secībā\",\n  \"columnSize\": \"{value} pikseļi\",\n  \"descending\": \"dilstošā secībā\",\n  \"descendingSort\": \"kārtots pēc kolonnas {columnName} dilstošā secībā\",\n  \"resizerDescription\": \"Nospiediet Enter, lai sāktu izmēru mainīšanu\",\n  \"select\": \"Atlasīt\",\n  \"selectAll\": \"Atlasīt visu\",\n  \"sortable\": \"kārtojamā kolonna\"\n}\n","{\n  \"ascending\": \"stigende\",\n  \"ascendingSort\": \"sortert etter kolonne {columnName} i stigende rekkefølge\",\n  \"columnSize\": \"{value} piksler\",\n  \"descending\": \"synkende\",\n  \"descendingSort\": \"sortert etter kolonne {columnName} i synkende rekkefølge\",\n  \"resizerDescription\": \"Trykk på Enter for å starte størrelsesendring\",\n  \"select\": \"Velg\",\n  \"selectAll\": \"Velg alle\",\n  \"sortable\": \"kolonne som kan sorteres\"\n}\n","{\n  \"ascending\": \"oplopend\",\n  \"ascendingSort\": \"gesorteerd in oplopende volgorde in kolom {columnName}\",\n  \"columnSize\": \"{value} pixels\",\n  \"descending\": \"aflopend\",\n  \"descendingSort\": \"gesorteerd in aflopende volgorde in kolom {columnName}\",\n  \"resizerDescription\": \"Druk op Enter om het formaat te wijzigen\",\n  \"select\": \"Selecteren\",\n  \"selectAll\": \"Alles selecteren\",\n  \"sortable\": \"sorteerbare kolom\"\n}\n","{\n  \"ascending\": \"rosnąco\",\n  \"ascendingSort\": \"posortowano według kolumny {columnName} w porządku rosnącym\",\n  \"columnSize\": \"Liczba pikseli: {value}\",\n  \"descending\": \"malejąco\",\n  \"descendingSort\": \"posortowano według kolumny {columnName} w porządku malejącym\",\n  \"resizerDescription\": \"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru\",\n  \"select\": \"Zaznacz\",\n  \"selectAll\": \"Zaznacz wszystko\",\n  \"sortable\": \"kolumna z możliwością sortowania\"\n}\n","{\n  \"ascending\": \"crescente\",\n  \"ascendingSort\": \"classificado pela coluna {columnName} em ordem crescente\",\n  \"columnSize\": \"{value} pixels\",\n  \"descending\": \"decrescente\",\n  \"descendingSort\": \"classificado pela coluna {columnName} em ordem decrescente\",\n  \"resizerDescription\": \"Pressione Enter para começar a redimensionar\",\n  \"select\": \"Selecionar\",\n  \"selectAll\": \"Selecionar tudo\",\n  \"sortable\": \"coluna classificável\"\n}\n","{\n  \"ascending\": \"ascendente\",\n  \"ascendingSort\": \"Ordenar por coluna {columnName} em ordem ascendente\",\n  \"columnSize\": \"{value} pixels\",\n  \"descending\": \"descendente\",\n  \"descendingSort\": \"Ordenar por coluna {columnName} em ordem descendente\",\n  \"resizerDescription\": \"Prima Enter para iniciar o redimensionamento\",\n  \"select\": \"Selecionar\",\n  \"selectAll\": \"Selecionar tudo\",\n  \"sortable\": \"Coluna ordenável\"\n}\n","{\n  \"ascending\": \"crescătoare\",\n  \"ascendingSort\": \"sortate după coloana {columnName} în ordine crescătoare\",\n  \"columnSize\": \"{value} pixeli\",\n  \"descending\": \"descrescătoare\",\n  \"descendingSort\": \"sortate după coloana {columnName} în ordine descrescătoare\",\n  \"resizerDescription\": \"Apăsați pe Enter pentru a începe redimensionarea\",\n  \"select\": \"Selectare\",\n  \"selectAll\": \"Selectare totală\",\n  \"sortable\": \"coloană sortabilă\"\n}\n","{\n  \"ascending\": \"возрастание\",\n  \"ascendingSort\": \"сортировать столбец {columnName} в порядке возрастания\",\n  \"columnSize\": \"{value} пикс.\",\n  \"descending\": \"убывание\",\n  \"descendingSort\": \"сортировать столбец {columnName} в порядке убывания\",\n  \"resizerDescription\": \"Нажмите клавишу Enter для начала изменения размеров\",\n  \"select\": \"Выбрать\",\n  \"selectAll\": \"Выбрать все\",\n  \"sortable\": \"сортируемый столбец\"\n}\n","{\n  \"ascending\": \"vzostupne\",\n  \"ascendingSort\": \"zoradené zostupne podľa stĺpca {columnName}\",\n  \"columnSize\": \"Počet pixelov: {value}\",\n  \"descending\": \"zostupne\",\n  \"descendingSort\": \"zoradené zostupne podľa stĺpca {columnName}\",\n  \"resizerDescription\": \"Stlačením klávesu Enter začnete zmenu veľkosti\",\n  \"select\": \"Vybrať\",\n  \"selectAll\": \"Vybrať všetko\",\n  \"sortable\": \"zoraditeľný stĺpec\"\n}\n","{\n  \"ascending\": \"naraščajoče\",\n  \"ascendingSort\": \"razvrščeno po stolpcu {columnName} v naraščajočem vrstnem redu\",\n  \"columnSize\": \"{value} slikovnih pik\",\n  \"descending\": \"padajoče\",\n  \"descendingSort\": \"razvrščeno po stolpcu {columnName} v padajočem vrstnem redu\",\n  \"resizerDescription\": \"Pritisnite tipko Enter da začnete spreminjati velikost\",\n  \"select\": \"Izberite\",\n  \"selectAll\": \"Izberite vse\",\n  \"sortable\": \"razvrstljivi stolpec\"\n}\n","{\n  \"ascending\": \"rastući\",\n  \"ascendingSort\": \"sortirano po kolonama {columnName} rastućim redosledom\",\n  \"columnSize\": \"{value} piksela\",\n  \"descending\": \"padajući\",\n  \"descendingSort\": \"sortirano po kolonama {columnName} padajućim redosledom\",\n  \"resizerDescription\": \"Pritisnite Enter da biste započeli promenu veličine\",\n  \"select\": \"Izaberite\",\n  \"selectAll\": \"Izaberite sve\",\n  \"sortable\": \"kolona koja se može sortirati\"\n}\n","{\n  \"ascending\": \"stigande\",\n  \"ascendingSort\": \"sorterat på kolumn {columnName} i stigande ordning\",\n  \"columnSize\": \"{value} pixlar\",\n  \"descending\": \"fallande\",\n  \"descendingSort\": \"sorterat på kolumn {columnName} i fallande ordning\",\n  \"resizerDescription\": \"Tryck på Retur för att börja ändra storlek\",\n  \"select\": \"Markera\",\n  \"selectAll\": \"Markera allt\",\n  \"sortable\": \"sorterbar kolumn\"\n}\n","{\n  \"ascending\": \"artan sırada\",\n  \"ascendingSort\": \"{columnName} sütuna göre artan düzende sırala\",\n  \"columnSize\": \"{value} piksel\",\n  \"descending\": \"azalan sırada\",\n  \"descendingSort\": \"{columnName} sütuna göre azalan düzende sırala\",\n  \"resizerDescription\": \"Yeniden boyutlandırmak için Enter'a basın\",\n  \"select\": \"Seç\",\n  \"selectAll\": \"Tümünü Seç\",\n  \"sortable\": \"Sıralanabilir sütun\"\n}\n","{\n  \"ascending\": \"висхідний\",\n  \"ascendingSort\": \"відсортовано за стовпцем {columnName} у висхідному порядку\",\n  \"columnSize\": \"{value} пікс.\",\n  \"descending\": \"низхідний\",\n  \"descendingSort\": \"відсортовано за стовпцем {columnName} у низхідному порядку\",\n  \"resizerDescription\": \"Натисніть Enter, щоб почати зміну розміру\",\n  \"select\": \"Вибрати\",\n  \"selectAll\": \"Вибрати все\",\n  \"sortable\": \"сортувальний стовпець\"\n}\n","{\n  \"ascending\": \"升序\",\n  \"ascendingSort\": \"按列 {columnName} 升序排序\",\n  \"columnSize\": \"{value} 像素\",\n  \"descending\": \"降序\",\n  \"descendingSort\": \"按列 {columnName} 降序排序\",\n  \"resizerDescription\": \"按“输入”键开始调整大小。\",\n  \"select\": \"选择\",\n  \"selectAll\": \"全选\",\n  \"sortable\": \"可排序的列\"\n}\n","{\n  \"ascending\": \"遞增\",\n  \"ascendingSort\": \"已依據「{columnName}」欄遞增排序\",\n  \"columnSize\": \"{value} 像素\",\n  \"descending\": \"遞減\",\n  \"descendingSort\": \"已依據「{columnName}」欄遞減排序\",\n  \"resizerDescription\": \"按 Enter 鍵以開始調整大小\",\n  \"select\": \"選取\",\n  \"selectAll\": \"全選\",\n  \"sortable\": \"可排序的欄\"\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n  \"ar-AE\": _temp0,\n  \"bg-BG\": _temp1,\n  \"cs-CZ\": _temp2,\n  \"da-DK\": _temp3,\n  \"de-DE\": _temp4,\n  \"el-GR\": _temp5,\n  \"en-US\": _temp6,\n  \"es-ES\": _temp7,\n  \"et-EE\": _temp8,\n  \"fi-FI\": _temp9,\n  \"fr-FR\": _temp10,\n  \"he-IL\": _temp11,\n  \"hr-HR\": _temp12,\n  \"hu-HU\": _temp13,\n  \"it-IT\": _temp14,\n  \"ja-JP\": _temp15,\n  \"ko-KR\": _temp16,\n  \"lt-LT\": _temp17,\n  \"lv-LV\": _temp18,\n  \"nb-NO\": _temp19,\n  \"nl-NL\": _temp20,\n  \"pl-PL\": _temp21,\n  \"pt-BR\": _temp22,\n  \"pt-PT\": _temp23,\n  \"ro-RO\": _temp24,\n  \"ru-RU\": _temp25,\n  \"sk-SK\": _temp26,\n  \"sl-SI\": _temp27,\n  \"sr-SP\": _temp28,\n  \"sv-SE\": _temp29,\n  \"tr-TR\": _temp30,\n  \"uk-UA\": _temp31,\n  \"zh-CN\": _temp32,\n  \"zh-TW\": _temp33\n}","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Direction, DisabledBehavior, Key, KeyboardDelegate, LayoutDelegate, Node, Rect, RefObject, Size} from '@react-types/shared';\nimport {DOMLayoutDelegate} from '@react-aria/selection';\nimport {getChildNodes, getFirstItem, getLastItem, getNthItem} from '@react-stately/collections';\nimport {GridCollection, GridNode} from '@react-types/grid';\n\nexport interface GridKeyboardDelegateOptions<C> {\n  collection: C,\n  disabledKeys: Set<Key>,\n  disabledBehavior?: DisabledBehavior,\n  ref?: RefObject<HTMLElement | null>,\n  direction: Direction,\n  collator?: Intl.Collator,\n  layoutDelegate?: LayoutDelegate,\n  /** @deprecated - Use layoutDelegate instead. */\n  layout?: DeprecatedLayout,\n  focusMode?: 'row' | 'cell'\n}\n\nexport class GridKeyboardDelegate<T, C extends GridCollection<T>> implements KeyboardDelegate {\n  collection: C;\n  protected disabledKeys: Set<Key>;\n  protected disabledBehavior: DisabledBehavior;\n  protected direction: Direction;\n  protected collator: Intl.Collator | undefined;\n  protected layoutDelegate: LayoutDelegate;\n  protected focusMode;\n\n  constructor(options: GridKeyboardDelegateOptions<C>) {\n    this.collection = options.collection;\n    this.disabledKeys = options.disabledKeys;\n    this.disabledBehavior = options.disabledBehavior || 'all';\n    this.direction = options.direction;\n    this.collator = options.collator;\n    if (!options.layout && !options.ref) {\n      throw new Error('Either a layout or a ref must be specified.');\n    }\n    this.layoutDelegate = options.layoutDelegate || (options.layout ? new DeprecatedLayoutDelegate(options.layout) : new DOMLayoutDelegate(options.ref!));\n    this.focusMode = options.focusMode || 'row';\n  }\n\n  protected isCell(node: Node<T>): boolean {\n    return node.type === 'cell';\n  }\n\n  protected isRow(node: Node<T>): boolean {\n    return node.type === 'row' || node.type === 'item';\n  }\n\n  private isDisabled(item: Node<unknown>) {\n    return this.disabledBehavior === 'all' && (item.props?.isDisabled || this.disabledKeys.has(item.key));\n  }\n\n  protected findPreviousKey(fromKey?: Key, pred?: (item: Node<T>) => boolean): Key | null {\n    let key = fromKey != null\n      ? this.collection.getKeyBefore(fromKey)\n      : this.collection.getLastKey();\n\n    while (key != null) {\n      let item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n      if (!this.isDisabled(item) && (!pred || pred(item))) {\n        return key;\n      }\n\n      key = this.collection.getKeyBefore(key);\n    }\n    return null;\n  }\n\n  protected findNextKey(fromKey?: Key, pred?: (item: Node<T>) => boolean): Key | null {\n    let key = fromKey != null\n      ? this.collection.getKeyAfter(fromKey)\n      : this.collection.getFirstKey();\n\n    while (key != null) {\n      let item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n      if (!this.isDisabled(item) && (!pred || pred(item))) {\n        return key;\n      }\n\n      key = this.collection.getKeyAfter(key);\n      if (key == null) {\n        return null;\n      }\n    }\n    return null;\n  }\n\n  protected getKeyForItemInRowByIndex(key: Key, index: number = 0): Key | null {\n    if (index < 0) {\n      return null;\n    }\n\n    let item = this.collection.getItem(key);\n    if (!item) {\n      return null;\n    }\n\n    let i = 0;\n    for (let child of getChildNodes(item, this.collection) as Iterable<GridNode<T>>) {\n      if (child.colSpan && child.colSpan + i > index) {\n        return child.key ?? null;\n      }\n\n      if (child.colSpan) {\n        i = i + child.colSpan - 1;\n      }\n\n      if (i === index) {\n        return child.key ?? null;\n      }\n\n      i++;\n    }\n    return null;\n  }\n\n  getKeyBelow(fromKey: Key): Key | null {\n    let key: Key | null = fromKey;\n    let startItem = this.collection.getItem(key);\n    if (!startItem) {\n      return null;\n    }\n\n    // If focus was on a cell, start searching from the parent row\n    if (this.isCell(startItem)) {\n      key = startItem.parentKey ?? null;\n    }\n    if (key == null) {\n      return null;\n    }\n\n    // Find the next item\n    key = this.findNextKey(key, (item => item.type === 'item'));\n    if (key != null) {\n      // If focus was on a cell, focus the cell with the same index in the next row.\n      if (this.isCell(startItem)) {\n        let startIndex = startItem.colIndex ? startItem.colIndex : startItem.index;\n        return this.getKeyForItemInRowByIndex(key, startIndex);\n      }\n\n      // Otherwise, focus the next row\n      if (this.focusMode === 'row') {\n        return key;\n      }\n    }\n    return null;\n  }\n\n  getKeyAbove(fromKey: Key): Key | null {\n    let key: Key | null = fromKey;\n    let startItem = this.collection.getItem(key);\n    if (!startItem) {\n      return null;\n    }\n\n    // If focus is on a cell, start searching from the parent row\n    if (this.isCell(startItem)) {\n      key = startItem.parentKey ?? null;\n    }\n    if (key == null) {\n      return null;\n    }\n\n    // Find the previous item\n    key = this.findPreviousKey(key, item => item.type === 'item');\n    if (key != null) {\n      // If focus was on a cell, focus the cell with the same index in the previous row.\n      if (this.isCell(startItem)) {\n        let startIndex = startItem.colIndex ? startItem.colIndex : startItem.index;\n        return this.getKeyForItemInRowByIndex(key, startIndex);\n      }\n\n      // Otherwise, focus the previous row\n      if (this.focusMode === 'row') {\n        return key;\n      }\n    }\n    return null;\n  }\n\n  getKeyRightOf(key: Key): Key | null {\n    let item = this.collection.getItem(key);\n    if (!item) {\n      return null;\n    }\n\n    // If focus is on a row, focus the first child cell.\n    if (this.isRow(item)) {\n      let children = getChildNodes(item, this.collection);\n      return (this.direction === 'rtl'\n        ? getLastItem(children)?.key\n        : getFirstItem(children)?.key) ?? null;\n    }\n\n    // If focus is on a cell, focus the next cell if any,\n    // otherwise focus the parent row.\n    if (this.isCell(item) && item.parentKey != null) {\n      let parent = this.collection.getItem(item.parentKey);\n      if (!parent) {\n        return null;\n      }\n      let children = getChildNodes(parent, this.collection);\n      let next = (this.direction === 'rtl'\n        ? getNthItem(children, item.index - 1)\n        : getNthItem(children, item.index + 1)) ?? null;\n\n      if (next) {\n        return next.key ?? null;\n      }\n\n      // focus row only if focusMode is set to row\n      if (this.focusMode === 'row') {\n        return item.parentKey ?? null;\n      }\n\n      return (this.direction === 'rtl' ? this.getFirstKey(key) : this.getLastKey(key)) ?? null;\n    }\n    return null;\n  }\n\n  getKeyLeftOf(key: Key): Key | null {\n    let item = this.collection.getItem(key);\n    if (!item) {\n      return null;\n    }\n\n    // If focus is on a row, focus the last child cell.\n    if (this.isRow(item)) {\n      let children = getChildNodes(item, this.collection);\n      return (this.direction === 'rtl'\n        ? getFirstItem(children)?.key\n        : getLastItem(children)?.key) ?? null;\n    }\n\n    // If focus is on a cell, focus the previous cell if any,\n    // otherwise focus the parent row.\n    if (this.isCell(item) && item.parentKey != null) {\n      let parent = this.collection.getItem(item.parentKey);\n      if (!parent) {\n        return null;\n      }\n      let children = getChildNodes(parent, this.collection);\n      let prev = (this.direction === 'rtl'\n        ? getNthItem(children, item.index + 1)\n        : getNthItem(children, item.index - 1)) ?? null;\n\n      if (prev) {\n        return prev.key ?? null;\n      }\n\n      // focus row only if focusMode is set to row\n      if (this.focusMode === 'row') {\n        return item.parentKey ?? null;\n      }\n\n      return (this.direction === 'rtl' ? this.getLastKey(key) : this.getFirstKey(key)) ?? null;\n    }\n    return null;\n  }\n\n  getFirstKey(fromKey?: Key, global?: boolean): Key | null {\n    let key: Key | null = fromKey ?? null;\n    let item: Node<T> | undefined | null;\n    if (key != null) {\n      item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n\n      // If global flag is not set, and a cell is currently focused,\n      // move focus to the first cell in the parent row.\n      if (this.isCell(item) && !global && item.parentKey != null) {\n        let parent = this.collection.getItem(item.parentKey);\n        if (!parent) {\n          return null;\n        }\n        return getFirstItem(getChildNodes(parent, this.collection))?.key ?? null;\n      }\n    }\n\n    // Find the first row\n    key = this.findNextKey(undefined, item => item.type === 'item');\n\n    // If global flag is set (or if focus mode is cell), focus the first cell in the first row.\n    if (key != null && ((item && this.isCell(item) && global) || this.focusMode === 'cell')) {\n      let item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n      key = getFirstItem(getChildNodes(item, this.collection))?.key ?? null;\n    }\n\n    // Otherwise, focus the row itself.\n    return key;\n  }\n\n  getLastKey(fromKey?: Key, global?: boolean): Key | null {\n    let key: Key | null = fromKey ?? null;\n    let item: Node<T> | undefined | null;\n    if (key != null) {\n      item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n\n      // If global flag is not set, and a cell is currently focused,\n      // move focus to the last cell in the parent row.\n      if (this.isCell(item) && !global && item.parentKey != null) {\n        let parent = this.collection.getItem(item.parentKey);\n        if (!parent) {\n          return null;\n        }\n        let children = getChildNodes(parent, this.collection);\n        return getLastItem(children)?.key ?? null;\n      }\n    }\n\n    // Find the last row\n    key = this.findPreviousKey(undefined, item => item.type === 'item');\n\n    // If global flag is set (or if focus mode is cell), focus the last cell in the last row.\n    if (key != null && ((item && this.isCell(item) && global) || this.focusMode === 'cell')) {\n      let item = this.collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n      let children = getChildNodes(item, this.collection);\n      key = getLastItem(children)?.key ?? null;\n    }\n\n    // Otherwise, focus the row itself.\n    return key;\n  }\n\n  getKeyPageAbove(fromKey: Key): Key | null {\n    let key: Key | null = fromKey;\n    let itemRect = this.layoutDelegate.getItemRect(key);\n    if (!itemRect) {\n      return null;\n    }\n\n    let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);\n\n    while (itemRect && itemRect.y > pageY && key != null) {\n      key = this.getKeyAbove(key) ?? null;\n      if (key == null) {\n        break;\n      }\n      itemRect = this.layoutDelegate.getItemRect(key);\n    }\n\n    return key;\n  }\n\n  getKeyPageBelow(fromKey: Key): Key | null {\n    let key: Key | null = fromKey;\n    let itemRect = this.layoutDelegate.getItemRect(key);\n\n    if (!itemRect) {\n      return null;\n    }\n\n    let pageHeight = this.layoutDelegate.getVisibleRect().height;\n    let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y + pageHeight);\n\n    while (itemRect && (itemRect.y + itemRect.height) < pageY) {\n      let nextKey = this.getKeyBelow(key);\n      // If nextKey is undefined, we've reached the last row already\n      if (nextKey == null) {\n        break;\n      }\n\n      itemRect = this.layoutDelegate.getItemRect(nextKey);\n      key = nextKey;\n    }\n\n    return key;\n  }\n\n  getKeyForSearch(search: string, fromKey?: Key): Key | null {\n    let key: Key | null = fromKey ?? null;\n    if (!this.collator) {\n      return null;\n    }\n\n    let collection = this.collection;\n    key = fromKey ?? this.getFirstKey();\n    if (key == null) {\n      return null;\n    }\n\n    // If the starting key is a cell, search from its parent row.\n    let startItem = collection.getItem(key);\n    if (!startItem) {\n      return null;\n    }\n    if (startItem.type === 'cell') {\n      key = startItem.parentKey ?? null;\n    }\n\n    let hasWrapped = false;\n    while (key != null) {\n      let item = collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n\n      // check row text value for match\n      if (item.textValue) {\n        let substring = item.textValue.slice(0, search.length);\n        if (this.collator.compare(substring, search) === 0) {\n          if (this.isRow(item) && this.focusMode === 'cell') {\n            return getFirstItem(getChildNodes(item, this.collection))?.key ?? null;\n          }\n\n          return item.key;\n        }\n      }\n\n      key = this.findNextKey(key, item => item.type === 'item');\n\n      // Wrap around when reaching the end of the collection\n      if (key == null && !hasWrapped) {\n        key = this.getFirstKey();\n        hasWrapped = true;\n      }\n    }\n\n    return null;\n  }\n}\n\n/* Backward compatibility for old Virtualizer Layout interface. */\ninterface DeprecatedLayout {\n  getLayoutInfo(key: Key): DeprecatedLayoutInfo,\n  getContentSize(): Size,\n  virtualizer: DeprecatedVirtualizer\n}\n\ninterface DeprecatedLayoutInfo {\n  rect: Rect\n}\n\ninterface DeprecatedVirtualizer {\n  visibleRect: Rect\n}\n\nclass DeprecatedLayoutDelegate implements LayoutDelegate {\n  layout: DeprecatedLayout;\n\n  constructor(layout: DeprecatedLayout) {\n    this.layout = layout;\n  }\n\n  getContentSize(): Size {\n    return this.layout.getContentSize();\n  }\n\n  getItemRect(key: Key): Rect | null {\n    return this.layout.getLayoutInfo(key)?.rect || null;\n  }\n\n  getVisibleRect(): Rect {\n    return this.layout.virtualizer.visibleRect;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {GridCollection} from '@react-types/grid';\nimport type {GridState} from '@react-stately/grid';\nimport type {Key, KeyboardDelegate} from '@react-types/shared';\n\ninterface GridMapShared {\n  keyboardDelegate: KeyboardDelegate,\n  actions: {\n    onRowAction?: (key: Key) => void,\n    onCellAction?: (key: Key) => void\n  },\n  shouldSelectOnPressUp?: boolean\n}\n\n// Used to share:\n// keyboard delegate between useGrid and useGridCell\n// onRowAction/onCellAction across hooks\nexport const gridMap = new WeakMap<GridState<unknown, GridCollection<unknown>>, GridMapShared>();\n","{\n  \"deselectedItem\": \"{item} غير المحدد\",\n  \"longPressToSelect\": \"اضغط مطولًا للدخول إلى وضع التحديد.\",\n  \"select\": \"تحديد\",\n  \"selectedAll\": \"جميع العناصر المحددة.\",\n  \"selectedCount\": \"{count, plural, =0 {لم يتم تحديد عناصر} one {# عنصر محدد} other {# عنصر محدد}}.\",\n  \"selectedItem\": \"{item} المحدد\"\n}\n","{\n  \"deselectedItem\": \"{item} не е избран.\",\n  \"longPressToSelect\": \"Натиснете и задръжте за да влезете в избирателен режим.\",\n  \"select\": \"Изберете\",\n  \"selectedAll\": \"Всички елементи са избрани.\",\n  \"selectedCount\": \"{count, plural, =0 {Няма избрани елементи} one {# избран елемент} other {# избрани елементи}}.\",\n  \"selectedItem\": \"{item} избран.\"\n}\n","{\n  \"deselectedItem\": \"Položka {item} není vybrána.\",\n  \"longPressToSelect\": \"Dlouhým stisknutím přejdete do režimu výběru.\",\n  \"select\": \"Vybrat\",\n  \"selectedAll\": \"Vybrány všechny položky.\",\n  \"selectedCount\": \"{count, plural, =0 {Nevybrány žádné položky} one {Vybrána # položka} other {Vybráno # položek}}.\",\n  \"selectedItem\": \"Vybrána položka {item}.\"\n}\n","{\n  \"deselectedItem\": \"{item} ikke valgt.\",\n  \"longPressToSelect\": \"Lav et langt tryk for at aktivere valgtilstand.\",\n  \"select\": \"Vælg\",\n  \"selectedAll\": \"Alle elementer valgt.\",\n  \"selectedCount\": \"{count, plural, =0 {Ingen elementer valgt} one {# element valgt} other {# elementer valgt}}.\",\n  \"selectedItem\": \"{item} valgt.\"\n}\n","{\n  \"deselectedItem\": \"{item} nicht ausgewählt.\",\n  \"longPressToSelect\": \"Gedrückt halten, um Auswahlmodus zu öffnen.\",\n  \"select\": \"Auswählen\",\n  \"selectedAll\": \"Alle Elemente ausgewählt.\",\n  \"selectedCount\": \"{count, plural, =0 {Keine Elemente ausgewählt} one {# Element ausgewählt} other {# Elemente ausgewählt}}.\",\n  \"selectedItem\": \"{item} ausgewählt.\"\n}\n","{\n  \"deselectedItem\": \"Δεν επιλέχθηκε το στοιχείο {item}.\",\n  \"longPressToSelect\": \"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.\",\n  \"select\": \"Επιλογή\",\n  \"selectedAll\": \"Επιλέχθηκαν όλα τα στοιχεία.\",\n  \"selectedCount\": \"{count, plural, =0 {Δεν επιλέχθηκαν στοιχεία} one {Επιλέχθηκε # στοιχείο} other {Επιλέχθηκαν # στοιχεία}}.\",\n  \"selectedItem\": \"Επιλέχθηκε το στοιχείο {item}.\"\n}\n","{\n  \"deselectedItem\": \"{item} not selected.\",\n  \"select\": \"Select\",\n  \"selectedCount\": \"{count, plural, =0 {No items selected} one {# item selected} other {# items selected}}.\",\n  \"selectedAll\": \"All items selected.\",\n  \"selectedItem\": \"{item} selected.\",\n  \"longPressToSelect\": \"Long press to enter selection mode.\"\n}\n","{\n  \"deselectedItem\": \"{item} no seleccionado.\",\n  \"longPressToSelect\": \"Mantenga pulsado para abrir el modo de selección.\",\n  \"select\": \"Seleccionar\",\n  \"selectedAll\": \"Todos los elementos seleccionados.\",\n  \"selectedCount\": \"{count, plural, =0 {Ningún elemento seleccionado} one {# elemento seleccionado} other {# elementos seleccionados}}.\",\n  \"selectedItem\": \"{item} seleccionado.\"\n}\n","{\n  \"deselectedItem\": \"{item} pole valitud.\",\n  \"longPressToSelect\": \"Valikurežiimi sisenemiseks vajutage pikalt.\",\n  \"select\": \"Vali\",\n  \"selectedAll\": \"Kõik üksused valitud.\",\n  \"selectedCount\": \"{count, plural, =0 {Üksusi pole valitud} one {# üksus valitud} other {# üksust valitud}}.\",\n  \"selectedItem\": \"{item} valitud.\"\n}\n","{\n  \"deselectedItem\": \"Kohdetta {item} ei valittu.\",\n  \"longPressToSelect\": \"Siirry valintatilaan painamalla pitkään.\",\n  \"select\": \"Valitse\",\n  \"selectedAll\": \"Kaikki kohteet valittu.\",\n  \"selectedCount\": \"{count, plural, =0 {Ei yhtään kohdetta valittu} one {# kohde valittu} other {# kohdetta valittu}}.\",\n  \"selectedItem\": \"{item} valittu.\"\n}\n","{\n  \"deselectedItem\": \"{item} non sélectionné.\",\n  \"longPressToSelect\": \"Appuyez de manière prolongée pour passer en mode de sélection.\",\n  \"select\": \"Sélectionner\",\n  \"selectedAll\": \"Tous les éléments sélectionnés.\",\n  \"selectedCount\": \"{count, plural, =0 {Aucun élément sélectionné} one {# élément sélectionné} other {# éléments sélectionnés}}.\",\n  \"selectedItem\": \"{item} sélectionné.\"\n}\n","{\n  \"deselectedItem\": \"{item} לא נבחר.\",\n  \"longPressToSelect\": \"הקשה ארוכה לכניסה למצב בחירה.\",\n  \"select\": \"בחר\",\n  \"selectedAll\": \"כל הפריטים נבחרו.\",\n  \"selectedCount\": \"{count, plural, =0 {לא נבחרו פריטים} one {פריט # נבחר} other {# פריטים נבחרו}}.\",\n  \"selectedItem\": \"{item} נבחר.\"\n}\n","{\n  \"deselectedItem\": \"Stavka {item} nije odabrana.\",\n  \"longPressToSelect\": \"Dugo pritisnite za ulazak u način odabira.\",\n  \"select\": \"Odaberite\",\n  \"selectedAll\": \"Odabrane su sve stavke.\",\n  \"selectedCount\": \"{count, plural, =0 {Nije odabrana nijedna stavka} one {Odabrana je # stavka} other {Odabrano je # stavki}}.\",\n  \"selectedItem\": \"Stavka {item} je odabrana.\"\n}\n","{\n  \"deselectedItem\": \"{item} nincs kijelölve.\",\n  \"longPressToSelect\": \"Nyomja hosszan a kijelöléshez.\",\n  \"select\": \"Kijelölés\",\n  \"selectedAll\": \"Az összes elem kijelölve.\",\n  \"selectedCount\": \"{count, plural, =0 {Egy elem sincs kijelölve} one {# elem kijelölve} other {# elem kijelölve}}.\",\n  \"selectedItem\": \"{item} kijelölve.\"\n}\n","{\n  \"deselectedItem\": \"{item} non selezionato.\",\n  \"longPressToSelect\": \"Premi a lungo per passare alla modalità di selezione.\",\n  \"select\": \"Seleziona\",\n  \"selectedAll\": \"Tutti gli elementi selezionati.\",\n  \"selectedCount\": \"{count, plural, =0 {Nessun elemento selezionato} one {# elemento selezionato} other {# elementi selezionati}}.\",\n  \"selectedItem\": \"{item} selezionato.\"\n}\n","{\n  \"deselectedItem\": \"{item} が選択されていません。\",\n  \"longPressToSelect\": \"長押しして選択モードを開きます。\",\n  \"select\": \"選択\",\n  \"selectedAll\": \"すべての項目を選択しました。\",\n  \"selectedCount\": \"{count, plural, =0 {項目が選択されていません} one {# 項目を選択しました} other {# 項目を選択しました}}。\",\n  \"selectedItem\": \"{item} を選択しました。\"\n}\n","{\n  \"deselectedItem\": \"{item}이(가) 선택되지 않았습니다.\",\n  \"longPressToSelect\": \"선택 모드로 들어가려면 길게 누르십시오.\",\n  \"select\": \"선택\",\n  \"selectedAll\": \"모든 항목이 선택되었습니다.\",\n  \"selectedCount\": \"{count, plural, =0 {선택된 항목이 없습니다} one {#개 항목이 선택되었습니다} other {#개 항목이 선택되었습니다}}.\",\n  \"selectedItem\": \"{item}이(가) 선택되었습니다.\"\n}\n","{\n  \"deselectedItem\": \"{item} nepasirinkta.\",\n  \"longPressToSelect\": \"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.\",\n  \"select\": \"Pasirinkti\",\n  \"selectedAll\": \"Pasirinkti visi elementai.\",\n  \"selectedCount\": \"{count, plural, =0 {Nepasirinktas nė vienas elementas} one {Pasirinktas # elementas} other {Pasirinkta elementų: #}}.\",\n  \"selectedItem\": \"Pasirinkta: {item}.\"\n}\n","{\n  \"deselectedItem\": \"Vienums {item} nav atlasīts.\",\n  \"longPressToSelect\": \"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.\",\n  \"select\": \"Atlasīt\",\n  \"selectedAll\": \"Atlasīti visi vienumi.\",\n  \"selectedCount\": \"{count, plural, =0 {Nav atlasīts neviens vienums} one {Atlasīto vienumu skaits: #} other {Atlasīto vienumu skaits: #}}.\",\n  \"selectedItem\": \"Atlasīts vienums {item}.\"\n}\n","{\n  \"deselectedItem\": \"{item} er ikke valgt.\",\n  \"longPressToSelect\": \"Bruk et langt trykk for å gå inn i valgmodus.\",\n  \"select\": \"Velg\",\n  \"selectedAll\": \"Alle elementer er valgt.\",\n  \"selectedCount\": \"{count, plural, =0 {Ingen elementer er valgt} one {# element er valgt} other {# elementer er valgt}}.\",\n  \"selectedItem\": \"{item} er valgt.\"\n}\n","{\n  \"deselectedItem\": \"{item} niet geselecteerd.\",\n  \"longPressToSelect\": \"Druk lang om de selectiemodus te openen.\",\n  \"select\": \"Selecteren\",\n  \"selectedAll\": \"Alle items geselecteerd.\",\n  \"selectedCount\": \"{count, plural, =0 {Geen items geselecteerd} one {# item geselecteerd} other {# items geselecteerd}}.\",\n  \"selectedItem\": \"{item} geselecteerd.\"\n}\n","{\n  \"deselectedItem\": \"Nie zaznaczono {item}.\",\n  \"longPressToSelect\": \"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.\",\n  \"select\": \"Zaznacz\",\n  \"selectedAll\": \"Wszystkie zaznaczone elementy.\",\n  \"selectedCount\": \"{count, plural, =0 {Nie zaznaczono żadnych elementów} one {# zaznaczony element} other {# zaznaczonych elementów}}.\",\n  \"selectedItem\": \"Zaznaczono {item}.\"\n}\n","{\n  \"deselectedItem\": \"{item} não selecionado.\",\n  \"longPressToSelect\": \"Mantenha pressionado para entrar no modo de seleção.\",\n  \"select\": \"Selecionar\",\n  \"selectedAll\": \"Todos os itens selecionados.\",\n  \"selectedCount\": \"{count, plural, =0 {Nenhum item selecionado} one {# item selecionado} other {# itens selecionados}}.\",\n  \"selectedItem\": \"{item} selecionado.\"\n}\n","{\n  \"deselectedItem\": \"{item} não selecionado.\",\n  \"longPressToSelect\": \"Prima continuamente para entrar no modo de seleção.\",\n  \"select\": \"Selecionar\",\n  \"selectedAll\": \"Todos os itens selecionados.\",\n  \"selectedCount\": \"{count, plural, =0 {Nenhum item selecionado} one {# item selecionado} other {# itens selecionados}}.\",\n  \"selectedItem\": \"{item} selecionado.\"\n}\n","{\n  \"deselectedItem\": \"{item} neselectat.\",\n  \"longPressToSelect\": \"Apăsați lung pentru a intra în modul de selectare.\",\n  \"select\": \"Selectare\",\n  \"selectedAll\": \"Toate elementele selectate.\",\n  \"selectedCount\": \"{count, plural, =0 {Niciun element selectat} one {# element selectat} other {# elemente selectate}}.\",\n  \"selectedItem\": \"{item} selectat.\"\n}\n","{\n  \"deselectedItem\": \"{item} не выбрано.\",\n  \"longPressToSelect\": \"Нажмите и удерживайте для входа в режим выбора.\",\n  \"select\": \"Выбрать\",\n  \"selectedAll\": \"Выбраны все элементы.\",\n  \"selectedCount\": \"{count, plural, =0 {Нет выбранных элементов} one {# элемент выбран} other {# элементов выбрано}}.\",\n  \"selectedItem\": \"{item} выбрано.\"\n}\n","{\n  \"deselectedItem\": \"Nevybraté položky: {item}.\",\n  \"longPressToSelect\": \"Dlhším stlačením prejdite do režimu výberu.\",\n  \"select\": \"Vybrať\",\n  \"selectedAll\": \"Všetky vybraté položky.\",\n  \"selectedCount\": \"{count, plural, =0 {Žiadne vybraté položky} one {# vybratá položka} other {Počet vybratých položiek:#}}.\",\n  \"selectedItem\": \"Vybraté položky: {item}.\"\n}\n","{\n  \"deselectedItem\": \"Element {item} ni izbran.\",\n  \"longPressToSelect\": \"Za izbirni način pritisnite in dlje časa držite.\",\n  \"select\": \"Izberite\",\n  \"selectedAll\": \"Vsi elementi so izbrani.\",\n  \"selectedCount\": \"{count, plural, =0 {Noben element ni izbran} one {# element je izbran} other {# elementov je izbranih}}.\",\n  \"selectedItem\": \"Element {item} je izbran.\"\n}\n","{\n  \"deselectedItem\": \"{item} nije izabrano.\",\n  \"longPressToSelect\": \"Dugo pritisnite za ulazak u režim biranja.\",\n  \"select\": \"Izaberite\",\n  \"selectedAll\": \"Izabrane su sve stavke.\",\n  \"selectedCount\": \"{count, plural, =0 {Nije izabrana nijedna stavka} one {Izabrana je # stavka} other {Izabrano je # stavki}}.\",\n  \"selectedItem\": \"{item} je izabrano.\"\n}\n","{\n  \"deselectedItem\": \"{item} ej markerat.\",\n  \"longPressToSelect\": \"Tryck länge när du vill öppna väljarläge.\",\n  \"select\": \"Markera\",\n  \"selectedAll\": \"Alla markerade objekt.\",\n  \"selectedCount\": \"{count, plural, =0 {Inga markerade objekt} one {# markerat objekt} other {# markerade objekt}}.\",\n  \"selectedItem\": \"{item} markerat.\"\n}\n","{\n  \"deselectedItem\": \"{item} seçilmedi.\",\n  \"longPressToSelect\": \"Seçim moduna girmek için uzun basın.\",\n  \"select\": \"Seç\",\n  \"selectedAll\": \"Tüm ögeler seçildi.\",\n  \"selectedCount\": \"{count, plural, =0 {Hiçbir öge seçilmedi} one {# öge seçildi} other {# öge seçildi}}.\",\n  \"selectedItem\": \"{item} seçildi.\"\n}\n","{\n  \"deselectedItem\": \"{item} не вибрано.\",\n  \"longPressToSelect\": \"Виконайте довге натиснення, щоб перейти в режим вибору.\",\n  \"select\": \"Вибрати\",\n  \"selectedAll\": \"Усі елементи вибрано.\",\n  \"selectedCount\": \"{count, plural, =0 {Жодних елементів не вибрано} one {# елемент вибрано} other {Вибрано елементів: #}}.\",\n  \"selectedItem\": \"{item} вибрано.\"\n}\n","{\n  \"deselectedItem\": \"未选择 {item}。\",\n  \"longPressToSelect\": \"长按以进入选择模式。\",\n  \"select\": \"选择\",\n  \"selectedAll\": \"已选择所有项目。\",\n  \"selectedCount\": \"{count, plural, =0 {未选择项目} one {已选择 # 个项目} other {已选择 # 个项目}}。\",\n  \"selectedItem\": \"已选择 {item}。\"\n}\n","{\n  \"deselectedItem\": \"未選取「{item}」。\",\n  \"longPressToSelect\": \"長按以進入選擇模式。\",\n  \"select\": \"選取\",\n  \"selectedAll\": \"已選取所有項目。\",\n  \"selectedCount\": \"{count, plural, =0 {未選取任何項目} one {已選取 # 個項目} other {已選取 # 個項目}}。\",\n  \"selectedItem\": \"已選取「{item}」。\"\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n  \"ar-AE\": _temp0,\n  \"bg-BG\": _temp1,\n  \"cs-CZ\": _temp2,\n  \"da-DK\": _temp3,\n  \"de-DE\": _temp4,\n  \"el-GR\": _temp5,\n  \"en-US\": _temp6,\n  \"es-ES\": _temp7,\n  \"et-EE\": _temp8,\n  \"fi-FI\": _temp9,\n  \"fr-FR\": _temp10,\n  \"he-IL\": _temp11,\n  \"hr-HR\": _temp12,\n  \"hu-HU\": _temp13,\n  \"it-IT\": _temp14,\n  \"ja-JP\": _temp15,\n  \"ko-KR\": _temp16,\n  \"lt-LT\": _temp17,\n  \"lv-LV\": _temp18,\n  \"nb-NO\": _temp19,\n  \"nl-NL\": _temp20,\n  \"pl-PL\": _temp21,\n  \"pt-BR\": _temp22,\n  \"pt-PT\": _temp23,\n  \"ro-RO\": _temp24,\n  \"ru-RU\": _temp25,\n  \"sk-SK\": _temp26,\n  \"sl-SI\": _temp27,\n  \"sr-SP\": _temp28,\n  \"sv-SE\": _temp29,\n  \"tr-TR\": _temp30,\n  \"uk-UA\": _temp31,\n  \"zh-CN\": _temp32,\n  \"zh-TW\": _temp33\n}","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\ntype Assertiveness = 'assertive' | 'polite';\n\n/* Inspired by https://github.com/AlmeroSteyn/react-aria-live */\nconst LIVEREGION_TIMEOUT_DELAY = 7000;\n\nlet liveAnnouncer: LiveAnnouncer | null = null;\n\ntype Message = string | {'aria-labelledby': string};\n\n/**\n * Announces the message using screen reader technology.\n */\nexport function announce(\n  message: Message,\n  assertiveness: Assertiveness = 'assertive',\n  timeout = LIVEREGION_TIMEOUT_DELAY\n): void {\n  if (!liveAnnouncer) {\n    liveAnnouncer = new LiveAnnouncer();\n    // wait for the live announcer regions to be added to the dom, then announce\n    // otherwise Safari won't announce the message if it's added too quickly\n    // found most times less than 100ms were not consistent when announcing with Safari\n\n    // IS_REACT_ACT_ENVIRONMENT is used by React 18. Previous versions checked for the `jest` global.\n    // https://github.com/reactwg/react-18/discussions/102\n    // if we're in a test environment, announce without waiting\n    // @ts-ignore\n    if (!(typeof IS_REACT_ACT_ENVIRONMENT === 'boolean' ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== 'undefined')) {\n      setTimeout(() => {\n        if (liveAnnouncer?.isAttached()) {\n          liveAnnouncer?.announce(message, assertiveness, timeout);\n        }\n      }, 100);\n    } else {\n      liveAnnouncer.announce(message, assertiveness, timeout);\n    }\n  } else {\n    liveAnnouncer.announce(message, assertiveness, timeout);\n  }\n}\n\n/**\n * Stops all queued announcements.\n */\nexport function clearAnnouncer(assertiveness: Assertiveness): void {\n  if (liveAnnouncer) {\n    liveAnnouncer.clear(assertiveness);\n  }\n}\n\n/**\n * Removes the announcer from the DOM.\n */\nexport function destroyAnnouncer(): void {\n  if (liveAnnouncer) {\n    liveAnnouncer.destroy();\n    liveAnnouncer = null;\n  }\n}\n\n// LiveAnnouncer is implemented using vanilla DOM, not React. That's because as of React 18\n// ReactDOM.render is deprecated, and the replacement, ReactDOM.createRoot is moved into a\n// subpath import `react-dom/client`. That makes it hard for us to support multiple React versions.\n// As a global API, we can't use portals without introducing a breaking API change. LiveAnnouncer\n// is simple enough to implement without React, so that's what we do here.\n// See this discussion for more details: https://github.com/reactwg/react-18/discussions/125#discussioncomment-2382638\nclass LiveAnnouncer {\n  node: HTMLElement | null = null;\n  assertiveLog: HTMLElement | null = null;\n  politeLog: HTMLElement | null = null;\n\n  constructor() {\n    if (typeof document !== 'undefined') {\n      this.node = document.createElement('div');\n      this.node.dataset.liveAnnouncer = 'true';\n      // copied from VisuallyHidden\n      Object.assign(this.node.style, {\n        border: 0,\n        clip: 'rect(0 0 0 0)',\n        clipPath: 'inset(50%)',\n        height: '1px',\n        margin: '-1px',\n        overflow: 'hidden',\n        padding: 0,\n        position: 'absolute',\n        width: '1px',\n        whiteSpace: 'nowrap'\n      });\n\n      this.assertiveLog = this.createLog('assertive');\n      this.node.appendChild(this.assertiveLog);\n\n      this.politeLog = this.createLog('polite');\n      this.node.appendChild(this.politeLog);\n\n      document.body.prepend(this.node);\n    }\n  }\n\n  isAttached() {\n    return this.node?.isConnected;\n  }\n\n  createLog(ariaLive: string) {\n    let node = document.createElement('div');\n    node.setAttribute('role', 'log');\n    node.setAttribute('aria-live', ariaLive);\n    node.setAttribute('aria-relevant', 'additions');\n    return node;\n  }\n\n  destroy() {\n    if (!this.node) {\n      return;\n    }\n\n    document.body.removeChild(this.node);\n    this.node = null;\n  }\n\n  announce(message: Message, assertiveness = 'assertive', timeout = LIVEREGION_TIMEOUT_DELAY) {\n    if (!this.node) {\n      return;\n    }\n\n    let node = document.createElement('div');\n    if (typeof message === 'object') {\n      // To read an aria-labelledby, the element must have an appropriate role, such as img.\n      node.setAttribute('role', 'img');\n      node.setAttribute('aria-labelledby', message['aria-labelledby']);\n    } else {\n      node.textContent = message;\n    }\n\n    if (assertiveness === 'assertive') {\n      this.assertiveLog?.appendChild(node);\n    } else {\n      this.politeLog?.appendChild(node);\n    }\n\n    if (message !== '') {\n      setTimeout(() => {\n        node.remove();\n      }, timeout);\n    }\n  }\n\n  clear(assertiveness: Assertiveness) {\n    if (!this.node) {\n      return;\n    }\n\n    if ((!assertiveness || assertiveness === 'assertive') && this.assertiveLog) {\n      this.assertiveLog.innerHTML = '';\n    }\n\n    if ((!assertiveness || assertiveness === 'polite') && this.politeLog) {\n      this.politeLog.innerHTML = '';\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string): boolean {\n  // If the Intl.Locale API is available, use it to get the locale's text direction.\n  if (Intl.Locale) {\n    let locale = new Intl.Locale(localeString).maximize();\n\n    // Use the text info object to get the direction if possible.\n    // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n    let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n    if (textInfo) {\n      return textInfo.direction === 'rtl';\n    }\n\n    // Fallback: guess using the script.\n    // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n    if (locale.script) {\n      return RTL_SCRIPTS.has(locale.script);\n    }\n  }\n\n  // If not, just guess by the language (first part of the locale)\n  let lang = localeString.split('-')[0];\n  return RTL_LANGS.has(lang);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {JSX, ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n  /** Contents that should have the locale applied. */\n  children: ReactNode,\n  /** The locale to apply to the children. */\n  locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): JSX.Element {\n  let {locale, children} = props;\n  let defaultLocale = useDefaultLocale();\n\n  let value: Locale = React.useMemo(() => {\n    if (!locale) {\n      return defaultLocale;\n    }\n\n    return {\n      locale,\n      direction: isRTL(locale) ? 'rtl' : 'ltr'\n    };\n  }, [defaultLocale, locale]);\n\n  return (\n    <I18nContext.Provider value={value}>\n      {children}\n    </I18nContext.Provider>\n  );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n  let defaultLocale = useDefaultLocale();\n  let context = useContext(I18nContext);\n  return context || defaultLocale;\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedString, LocalizedStringDictionary, LocalizedStringFormatter, LocalizedStrings} from '@internationalized/string';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\nconst cache = new WeakMap();\nfunction getCachedDictionary<K extends string, T extends LocalizedString>(strings: LocalizedStrings<K, T>): LocalizedStringDictionary<K, T> {\n  let dictionary = cache.get(strings);\n  if (!dictionary) {\n    dictionary = new LocalizedStringDictionary(strings);\n    cache.set(strings, dictionary);\n  }\n\n  return dictionary;\n}\n\n/**\n * Returns a cached LocalizedStringDictionary for the given strings.\n */\nexport function useLocalizedStringDictionary<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringDictionary<K, T> {\n  return (packageName && LocalizedStringDictionary.getGlobalDictionaryForPackage(packageName)) || getCachedDictionary(strings);\n}\n\n/**\n * Provides localized string formatting for the current locale. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.\n * @param strings - A mapping of languages to localized strings by key.\n */\nexport function useLocalizedStringFormatter<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringFormatter<K, T> {\n  let {locale} = useLocale();\n  let dictionary = useLocalizedStringDictionary(strings, packageName);\n  return useMemo(() => new LocalizedStringFormatter(locale, dictionary), [locale, dictionary]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\n\nlet cache = new Map<string, Intl.Collator>();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n * @param options - Collator options.\n */\nexport function useCollator(options?: Intl.CollatorOptions): Intl.Collator {\n  let {locale} = useLocale();\n\n  let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : '');\n  if (cache.has(cacheKey)) {\n    return cache.get(cacheKey)!;\n  }\n\n  let formatter = new Intl.Collator(locale, options);\n  cache.set(cacheKey, formatter);\n  return formatter;\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '@react-aria/live-announcer';\nimport {Collection, Key, Node, Selection} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {SelectionManager} from '@react-stately/selection';\nimport {useEffectEvent, useUpdateEffect} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useRef} from 'react';\n\nexport interface GridSelectionAnnouncementProps {\n  /**\n   * A function that returns the text that should be announced by assistive technology when a row is added or removed from selection.\n   * @default (key) => state.collection.getItem(key)?.textValue\n   */\n  getRowText?: (key: Key) => string\n}\n\ninterface GridSelectionState<T> {\n  /** A collection of items in the grid. */\n  collection: Collection<Node<T>>,\n  /** A set of items that are disabled. */\n  disabledKeys: Set<Key>,\n  /** A selection manager to read and update multiple selection state. */\n  selectionManager: SelectionManager\n}\n\nexport function useGridSelectionAnnouncement<T>(props: GridSelectionAnnouncementProps, state: GridSelectionState<T>): void {\n  let {\n    getRowText = (key) => state.collection.getTextValue?.(key) ?? state.collection.getItem(key)?.textValue\n  } = props;\n  let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid');\n\n  // Many screen readers do not announce when items in a grid are selected/deselected.\n  // We do this using an ARIA live region.\n  let selection = state.selectionManager.rawSelection;\n  let lastSelection = useRef(selection);\n  let announceSelectionChange = useEffectEvent(() => {\n    if (!state.selectionManager.isFocused || selection === lastSelection.current) {\n      lastSelection.current = selection;\n\n      return;\n    }\n\n    let addedKeys = diffSelection(selection, lastSelection.current);\n    let removedKeys = diffSelection(lastSelection.current, selection);\n\n    // If adding or removing a single row from the selection, announce the name of that item.\n    let isReplace = state.selectionManager.selectionBehavior === 'replace';\n    let messages: string[] = [];\n\n    if ((state.selectionManager.selectedKeys.size === 1 && isReplace)) {\n      let firstKey = state.selectionManager.selectedKeys.keys().next().value;\n      if (firstKey != null && state.collection.getItem(firstKey)) {\n        let currentSelectionText = getRowText(firstKey);\n        if (currentSelectionText) {\n          messages.push(stringFormatter.format('selectedItem', {item: currentSelectionText}));\n        }\n      }\n    } else if (addedKeys.size === 1 && removedKeys.size === 0) {\n      let firstKey = addedKeys.keys().next().value;\n      if (firstKey != null) {\n        let addedText = getRowText(firstKey);\n        if (addedText) {\n          messages.push(stringFormatter.format('selectedItem', {item: addedText}));\n        }\n      }\n    } else if (removedKeys.size === 1 && addedKeys.size === 0) {\n      let firstKey = removedKeys.keys().next().value;\n      if (firstKey != null && state.collection.getItem(firstKey)) {\n        let removedText = getRowText(firstKey);\n        if (removedText) {\n          messages.push(stringFormatter.format('deselectedItem', {item: removedText}));\n        }\n      }\n    }\n\n    // Announce how many items are selected, except when selecting the first item.\n    if (state.selectionManager.selectionMode === 'multiple') {\n      if (messages.length === 0 || selection === 'all' || selection.size > 1 || lastSelection.current === 'all' || lastSelection.current?.size > 1) {\n        messages.push(selection === 'all'\n          ? stringFormatter.format('selectedAll')\n          : stringFormatter.format('selectedCount', {count: selection.size})\n        );\n      }\n    }\n\n    if (messages.length > 0) {\n      announce(messages.join(' '));\n    }\n\n    lastSelection.current = selection;\n  });\n\n  useUpdateEffect(() => {\n    if (state.selectionManager.isFocused) {\n      announceSelectionChange();\n    } else {\n      // Wait a frame in case the collection is about to become focused (e.g. on mouse down).\n      let raf = requestAnimationFrame(announceSelectionChange);\n      return () => cancelAnimationFrame(raf);\n    }\n  }, [selection, state.selectionManager.isFocused]);\n}\n\nfunction diffSelection(a: Selection, b: Selection): Set<Key> {\n  let res = new Set<Key>();\n  if (a === 'all' || b === 'all') {\n    return res;\n  }\n\n  for (let key of a.keys()) {\n    if (!b.has(key)) {\n      res.add(key);\n    }\n  }\n\n  return res;\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MultipleSelectionManager} from '@react-stately/selection';\nimport {useDescription} from '@react-aria/utils';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useMemo} from 'react';\n\nexport interface HighlightSelectionDescriptionProps {\n  selectionManager: MultipleSelectionManager,\n  hasItemActions?: boolean\n}\n\n/**\n * Computes the description for a grid selectable collection.\n * @param props\n */\nexport function useHighlightSelectionDescription(props: HighlightSelectionDescriptionProps): AriaLabelingProps {\n  let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid');\n  let modality = useInteractionModality();\n  // null is the default if the user hasn't interacted with the table at all yet or the rest of the page\n  let shouldLongPress = (modality === 'pointer' || modality === 'virtual' || modality == null)\n    && typeof window !== 'undefined' && 'ontouchstart' in window;\n\n  let interactionDescription = useMemo(() => {\n    let selectionMode = props.selectionManager.selectionMode;\n    let selectionBehavior = props.selectionManager.selectionBehavior;\n\n    let message: string | undefined;\n    if (shouldLongPress) {\n      message = stringFormatter.format('longPressToSelect');\n    }\n\n    return selectionBehavior === 'replace' && selectionMode !== 'none' && props.hasItemActions ? message : undefined;\n  }, [props.selectionManager.selectionMode, props.selectionManager.selectionBehavior, props.hasItemActions, stringFormatter, shouldLongPress]);\n\n  let descriptionProps = useDescription(interactionDescription);\n  return descriptionProps;\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOwnerWindow} from '@react-aria/utils';\n\nfunction isStyleVisible(element: Element) {\n  const windowObject = getOwnerWindow(element);\n  if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) {\n    return false;\n  }\n\n  let {display, visibility} = element.style;\n\n  let isVisible = (\n    display !== 'none' &&\n    visibility !== 'hidden' &&\n    visibility !== 'collapse'\n  );\n\n  if (isVisible) {\n    const {getComputedStyle} = element.ownerDocument.defaultView as unknown as Window;\n    let {display: computedDisplay, visibility: computedVisibility} = getComputedStyle(element);\n\n    isVisible = (\n      computedDisplay !== 'none' &&\n      computedVisibility !== 'hidden' &&\n      computedVisibility !== 'collapse'\n    );\n  }\n\n  return isVisible;\n}\n\nfunction isAttributeVisible(element: Element, childElement?: Element) {\n  return (\n    !element.hasAttribute('hidden') &&\n    // Ignore HiddenSelect when tree walking.\n    !element.hasAttribute('data-react-aria-prevent-focus') &&\n    (element.nodeName === 'DETAILS' &&\n      childElement &&\n      childElement.nodeName !== 'SUMMARY'\n      ? element.hasAttribute('open')\n      : true)\n  );\n}\n\n/**\n * Adapted from https://github.com/testing-library/jest-dom and\n * https://github.com/vuejs/vue-test-utils-next/.\n * Licensed under the MIT License.\n * @param element - Element to evaluate for display or visibility.\n */\nexport function isElementVisible(element: Element, childElement?: Element): boolean {\n  return (\n    element.nodeName !== '#comment' &&\n    isStyleVisible(element) &&\n    isAttributeVisible(element, childElement) &&\n    (!element.parentElement || isElementVisible(element.parentElement, element))\n  );\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getFocusableTreeWalker} from './FocusScope';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useState} from 'react';\n\ninterface AriaHasTabbableChildOptions {\n  isDisabled?: boolean\n}\n\n// This was created for a special empty case of a component that can have child or\n// be empty, like Collection/Virtualizer/Table/ListView/etc. When these components\n// are empty they can have a message with a tabbable element, which is like them\n// being not empty, when it comes to focus and tab order.\n\n/**\n * Returns whether an element has a tabbable child, and updates as children change.\n * @private\n */\nexport function useHasTabbableChild(ref: RefObject<Element | null>, options?: AriaHasTabbableChildOptions): boolean {\n  let isDisabled = options?.isDisabled;\n  let [hasTabbableChild, setHasTabbableChild] = useState(false);\n\n  useLayoutEffect(() => {\n    if (ref?.current && !isDisabled) {\n      let update = () => {\n        if (ref.current) {\n          let walker = getFocusableTreeWalker(ref.current, {tabbable: true});\n          setHasTabbableChild(!!walker.nextNode());\n        }\n      };\n\n      update();\n\n      // Update when new elements are inserted, or the tabIndex/disabled attribute updates.\n      let observer = new MutationObserver(update);\n      observer.observe(ref.current, {\n        subtree: true,\n        childList: true,\n        attributes: true,\n        attributeFilter: ['tabIndex', 'disabled']\n      });\n\n      return () => {\n        // Disconnect mutation observer when a React update occurs on the top-level component\n        // so we update synchronously after re-rendering. Otherwise React will emit act warnings\n        // in tests since mutation observers fire asynchronously. The mutation observer is necessary\n        // so we also update if a child component re-renders and adds/removes something tabbable.\n        observer.disconnect();\n      };\n    }\n  });\n\n  return isDisabled ? false : hasTabbableChild;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes} from '@react-types/shared';\n\nexport interface GridRowGroupAria {\n  /** Props for the row group element. */\n  rowGroupProps: DOMAttributes\n}\n\n/**\n * Provides the accessibility implementation for a row group in a grid.\n */\nexport function useGridRowGroup(): GridRowGroupAria {\n  return {\n    rowGroupProps: {\n      role: 'rowgroup'\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from '@react-aria/utils';\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {GridCollection, GridNode} from '@react-types/grid';\nimport {gridMap} from './utils';\nimport {GridState} from '@react-stately/grid';\nimport {SelectableItemStates, useSelectableItem} from '@react-aria/selection';\n\nexport interface GridRowProps<T> {\n  /** An object representing the grid row. Contains all the relevant information that makes up the grid row. */\n  node: GridNode<T>,\n  /** Whether the grid row is contained in a virtual scroller. */\n  isVirtualized?: boolean,\n  /** Whether selection should occur on press up instead of press down. */\n  shouldSelectOnPressUp?: boolean,\n  /**\n   * Handler that is called when a user performs an action on the row.\n   * Please use onCellAction at the collection level instead.\n   * @deprecated\n   **/\n  onAction?: () => void\n}\n\nexport interface GridRowAria extends SelectableItemStates {\n  /** Props for the grid row element. */\n  rowProps: DOMAttributes,\n  /** Whether the row is currently in a pressed state. */\n  isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a row in a grid.\n * @param props - Props for the row.\n * @param state - State of the parent grid, as returned by `useGridState`.\n */\nexport function useGridRow<T, C extends GridCollection<T>, S extends GridState<T, C>>(props: GridRowProps<T>, state: S, ref: RefObject<FocusableElement | null>): GridRowAria {\n  let {\n    node,\n    isVirtualized,\n    shouldSelectOnPressUp,\n    onAction\n  } = props;\n\n  let {actions, shouldSelectOnPressUp: gridShouldSelectOnPressUp} = gridMap.get(state)!;\n  let onRowAction = actions.onRowAction ? () => actions.onRowAction?.(node.key) : onAction;\n  let {itemProps, ...states} = useSelectableItem({\n    selectionManager: state.selectionManager,\n    key: node.key,\n    ref,\n    isVirtualized,\n    shouldSelectOnPressUp: gridShouldSelectOnPressUp || shouldSelectOnPressUp,\n    onAction: onRowAction || node?.props?.onAction ? chain(node?.props?.onAction, onRowAction) : undefined,\n    isDisabled: state.collection.size === 0\n  });\n\n  let isSelected = state.selectionManager.isSelected(node.key);\n\n  let rowProps: DOMAttributes = {\n    role: 'row',\n    'aria-selected': state.selectionManager.selectionMode !== 'none' ? isSelected : undefined,\n    'aria-disabled': states.isDisabled || undefined,\n    ...itemProps\n  };\n\n  if (isVirtualized) {\n    rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based\n  }\n\n  return {\n    rowProps,\n    ...states\n  };\n}\n","import {AriaCheckboxProps} from '@react-types/checkbox';\nimport {GridCollection} from '@react-types/grid';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Key} from '@react-types/shared';\nimport {useId} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaGridSelectionCheckboxProps {\n  /** A unique key for the checkbox. */\n  key: Key\n}\n\nexport interface GridSelectionCheckboxAria {\n  /** Props for the row selection checkbox element. */\n  checkboxProps: AriaCheckboxProps\n}\n\n\n/**\n * Provides the behavior and accessibility implementation for a selection checkbox in a grid.\n * @param props - Props for the selection checkbox.\n * @param state - State of the grid, as returned by `useGridState`.\n */\nexport function useGridSelectionCheckbox<T, C extends GridCollection<T>>(props: AriaGridSelectionCheckboxProps, state: GridState<T, C>): GridSelectionCheckboxAria {\n  let {key} = props;\n\n  let manager = state.selectionManager;\n  let checkboxId = useId();\n  let isDisabled = !state.selectionManager.canSelectItem(key);\n  let isSelected = state.selectionManager.isSelected(key);\n\n  // Checkbox should always toggle selection, regardless of selectionBehavior.\n  let onChange = () => manager.toggleSelection(key);\n\n  const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid');\n\n  return {\n    checkboxProps: {\n      id: checkboxId,\n      'aria-label': stringFormatter.format('select'),\n      isSelected,\n      isDisabled,\n      onChange\n    }\n  };\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getChildNodes, getFirstItem} from '@react-stately/collections';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key, Node} from '@react-types/shared';\nimport {TableCollection} from '@react-types/table';\n\nexport class TableKeyboardDelegate<T> extends GridKeyboardDelegate<T, TableCollection<T>> {\n\n  protected isCell(node: Node<T>): boolean {\n    return node.type === 'cell' || node.type === 'rowheader' || node.type === 'column';\n  }\n\n  getKeyBelow(key: Key): Key | null {\n    let startItem = this.collection.getItem(key);\n    if (!startItem) {\n      return null;\n    }\n\n    // If focus was on a column, then focus the first child column if any,\n    // or find the corresponding cell in the first row.\n    if (startItem.type === 'column') {\n      let child = getFirstItem(getChildNodes(startItem, this.collection));\n      if (child) {\n        return child.key;\n      }\n\n      let firstKey = this.getFirstKey();\n      if (firstKey == null) {\n        return null;\n      }\n\n      let firstItem = this.collection.getItem(firstKey);\n      if (!firstItem) {\n        return null;\n      }\n\n      return super.getKeyForItemInRowByIndex(firstKey, startItem.index);\n    }\n\n    return super.getKeyBelow(key);\n  }\n\n  getKeyAbove(key: Key): Key | null {\n    let startItem = this.collection.getItem(key);\n    if (!startItem) {\n      return null;\n    }\n\n    // If focus was on a column, focus the parent column if any\n    if (startItem.type === 'column') {\n      let parent = startItem.parentKey != null ? this.collection.getItem(startItem.parentKey) : null;\n      if (parent && parent.type === 'column') {\n        return parent.key;\n      }\n\n      return null;\n    }\n\n    // only return above row key if not header row\n    let superKey = super.getKeyAbove(key);\n    let superItem = superKey != null ? this.collection.getItem(superKey) : null;\n    if (superItem && superItem.type !== 'headerrow') {\n      return superKey;\n    }\n\n    // If no item was found, and focus was on a cell, then focus the\n    // corresponding column header.\n    if (this.isCell(startItem)) {\n      return this.collection.columns[startItem.index].key;\n    }\n\n    // If focus was on a row, then focus the first column header.\n    return this.collection.columns[0].key;\n  }\n\n  private findNextColumnKey(column: Node<T>): Key | null {\n    // Search following columns\n    let key = this.findNextKey(column.key, item => item.type === 'column');\n    if (key != null) {\n      return key;\n    }\n\n    // Wrap around to the first column\n    let row = this.collection.headerRows[column.level];\n    for (let item of getChildNodes(row, this.collection)) {\n      if (item.type === 'column') {\n        return item.key;\n      }\n    }\n\n    return null;\n  }\n\n  private findPreviousColumnKey(column: Node<T>): Key | null {\n    // Search previous columns\n    let key = this.findPreviousKey(column.key, item => item.type === 'column');\n    if (key != null) {\n      return key;\n    }\n\n    // Wrap around to the last column\n    let row = this.collection.headerRows[column.level];\n    let childNodes = [...getChildNodes(row, this.collection)];\n    for (let i = childNodes.length - 1; i >= 0; i--) {\n      let item = childNodes[i];\n      if (item.type === 'column') {\n        return item.key;\n      }\n    }\n\n    return null;\n  }\n\n  getKeyRightOf(key: Key): Key | null {\n    let item = this.collection.getItem(key);\n    if (!item) {\n      return null;\n    }\n\n    // If focus was on a column, then focus the next column\n    if (item.type === 'column') {\n      return this.direction === 'rtl'\n        ? this.findPreviousColumnKey(item)\n        : this.findNextColumnKey(item);\n    }\n\n    return super.getKeyRightOf(key);\n  }\n\n  getKeyLeftOf(key: Key): Key | null {\n    let item = this.collection.getItem(key);\n    if (!item) {\n      return null;\n    }\n\n    // If focus was on a column, then focus the previous column\n    if (item.type === 'column') {\n      return this.direction === 'rtl'\n        ? this.findNextColumnKey(item)\n        : this.findPreviousColumnKey(item);\n    }\n\n    return super.getKeyLeftOf(key);\n  }\n\n  getKeyForSearch(search: string, fromKey?: Key): Key | null {\n    if (!this.collator) {\n      return null;\n    }\n\n    let collection = this.collection;\n    let key = fromKey ?? this.getFirstKey();\n    if (key == null) {\n      return null;\n    }\n\n    // If the starting key is a cell, search from its parent row.\n    let startItem = collection.getItem(key);\n    if (startItem?.type === 'cell') {\n      key = startItem.parentKey ?? null;\n    }\n\n    let hasWrapped = false;\n    while (key != null) {\n      let item = collection.getItem(key);\n      if (!item) {\n        return null;\n      }\n\n      if (item.textValue) {\n        let substring = item.textValue.slice(0, search.length);\n        if (this.collator.compare(substring, search) === 0) {\n          return item.key;\n        }\n      }\n\n      // Check each of the row header cells in this row for a match\n      for (let cell of getChildNodes(item, this.collection)) {\n        let column = collection.columns[cell.index];\n        if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {\n          let substring = cell.textValue.slice(0, search.length);\n          if (this.collator.compare(substring, search) === 0) {\n            // If we started on a cell, end on the matching cell. Otherwise, end on the row.\n            let fromItem = fromKey != null ? collection.getItem(fromKey) : startItem;\n            return fromItem?.type === 'cell'\n              ? cell.key\n              : item.key;\n          }\n        }\n      }\n\n      key = this.getKeyBelow(key);\n\n      // Wrap around when reaching the end of the collection\n      if (key == null && !hasWrapped) {\n        key = this.getFirstKey();\n        hasWrapped = true;\n      }\n    }\n\n    return null;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '@react-aria/live-announcer';\nimport {GridAria, GridProps, useGrid} from '@react-aria/grid';\nimport {gridIds} from './utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Key, LayoutDelegate, Rect, RefObject, Size} from '@react-types/shared';\nimport {mergeProps, useDescription, useId, useUpdateEffect} from '@react-aria/utils';\nimport {TableKeyboardDelegate} from './TableKeyboardDelegate';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useCollator, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useMemo} from 'react';\n\nexport interface AriaTableProps extends GridProps {\n  /** The layout object for the table. Computes what content is visible and how to position and style them. */\n  layoutDelegate?: LayoutDelegate,\n  /** @deprecated - Use layoutDelegate instead. */\n  layout?: DeprecatedLayout\n}\n\ninterface DeprecatedLayout {\n  getLayoutInfo(key: Key): DeprecatedLayoutInfo,\n  getContentSize(): Size,\n  virtualizer: DeprecatedVirtualizer\n}\n\ninterface DeprecatedLayoutInfo {\n  rect: Rect\n}\n\ninterface DeprecatedVirtualizer {\n  visibleRect: Rect\n}\n\n/**\n * Provides the behavior and accessibility implementation for a table component.\n * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,\n * and optionally supports row selection and sorting.\n * @param props - Props for the table.\n * @param state - State for the table, as returned by `useTableState`.\n * @param ref - The ref attached to the table element.\n */\nexport function useTable<T>(props: AriaTableProps, state: TableState<T> | TreeGridState<T>, ref: RefObject<HTMLElement | null>): GridAria {\n  let {\n    keyboardDelegate,\n    isVirtualized,\n    layoutDelegate,\n    layout\n  } = props;\n\n  // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).\n  // When virtualized, the layout object will be passed in as a prop and override this.\n  let collator = useCollator({usage: 'search', sensitivity: 'base'});\n  let {direction} = useLocale();\n  let disabledBehavior = state.selectionManager.disabledBehavior;\n  let delegate = useMemo(() => keyboardDelegate || new TableKeyboardDelegate({\n    collection: state.collection,\n    disabledKeys: state.disabledKeys,\n    disabledBehavior,\n    ref,\n    direction,\n    collator,\n    layoutDelegate,\n    layout\n  }), [keyboardDelegate, state.collection, state.disabledKeys, disabledBehavior, ref, direction, collator, layoutDelegate, layout]);\n  let id = useId(props.id);\n  gridIds.set(state, id);\n\n  let {gridProps} = useGrid({\n    ...props,\n    id,\n    keyboardDelegate: delegate\n  }, state, ref);\n\n  // Override to include header rows\n  if (isVirtualized) {\n    gridProps['aria-rowcount'] = state.collection.size + state.collection.headerRows.length;\n  }\n\n  if (tableNestedRows() && 'expandedKeys' in state) {\n    gridProps.role = 'treegrid';\n  }\n\n  let {column, direction: sortDirection} = state.sortDescriptor || {};\n  let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/table');\n  let sortDescription = useMemo(() => {\n    let columnName = state.collection.columns.find(c => c.key === column)?.textValue ?? '';\n    return sortDirection && column ? stringFormatter.format(`${sortDirection}Sort`, {columnName}) : undefined;\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [sortDirection, column, state.collection.columns]);\n\n  let descriptionProps = useDescription(sortDescription);\n\n  // Only announce after initial render, tabbing to the table will tell you the initial sort info already\n  useUpdateEffect(() => {\n    if (sortDescription) {\n      announce(sortDescription, 'assertive', 500);\n    }\n  }, [sortDescription]);\n\n  return {\n    gridProps: mergeProps(\n      gridProps,\n      descriptionProps,\n      {\n        // merge sort description with long press information\n        'aria-describedby': [descriptionProps['aria-describedby'], gridProps['aria-describedby']].filter(Boolean).join(' ')\n      }\n    )\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement, RefObject} from '@react-types/shared';\nimport {getLastItem} from '@react-stately/collections';\nimport {getRowLabelledBy} from './utils';\nimport type {GridNode} from '@react-types/grid';\nimport {GridRowAria, GridRowProps, useGridRow} from '@react-aria/grid';\nimport {HTMLAttributes} from 'react';\nimport {mergeProps, useSyntheticLinkProps} from '@react-aria/utils';\nimport {TableCollection} from '@react-types/table';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState, TreeGridState} from '@react-stately/table';\nimport {useLocale} from '@react-aria/i18n';\n\nconst EXPANSION_KEYS = {\n  expand: {\n    ltr: 'ArrowRight',\n    rtl: 'ArrowLeft'\n  },\n  'collapse': {\n    ltr: 'ArrowLeft',\n    rtl: 'ArrowRight'\n  }\n};\n\n/**\n * Provides the behavior and accessibility implementation for a row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableRow<T>(props: GridRowProps<T>, state: TableState<T> | TreeGridState<T>, ref: RefObject<FocusableElement | null>): GridRowAria {\n  let {node, isVirtualized} = props;\n  let {rowProps, ...states} = useGridRow<T, TableCollection<T>, TableState<T>>(props, state, ref);\n  let {direction} = useLocale();\n\n  if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n    rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based\n  } else {\n    delete rowProps['aria-rowindex'];\n  }\n\n  let treeGridRowProps: HTMLAttributes<HTMLElement> = {};\n  if (tableNestedRows() && 'expandedKeys' in state) {\n    let treeNode = state.keyMap.get(node.key);\n    if (treeNode != null) {\n      let hasChildRows = treeNode.props?.UNSTABLE_childItems || treeNode.props?.children?.length > state.userColumnCount;\n      treeGridRowProps = {\n        onKeyDown: (e) => {\n          if ((e.key === EXPANSION_KEYS['expand'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {\n            state.toggleKey(treeNode.key);\n            e.stopPropagation();\n          } else if ((e.key === EXPANSION_KEYS['collapse'][direction]) && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {\n            state.toggleKey(treeNode.key);\n            e.stopPropagation();\n          }\n        },\n        'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,\n        'aria-level': treeNode.level,\n        'aria-posinset': (treeNode.indexOfType ?? 0) + 1,\n        'aria-setsize': treeNode.level > 1 ?\n          ((getLastItem(state.keyMap.get(treeNode.parentKey!)?.childNodes ?? []) as GridNode<T>)?.indexOfType ?? 0) + 1 :\n          ((getLastItem(state.collection.body.childNodes) as GridNode<T>)?.indexOfType ?? 0) + 1\n      };\n    }\n  }\n\n  let syntheticLinkProps = useSyntheticLinkProps(node.props);\n  let linkProps = states.hasAction ? syntheticLinkProps : {};\n  return {\n    rowProps: {\n      ...mergeProps(rowProps, treeGridRowProps, linkProps),\n      'aria-labelledby': getRowLabelledBy(state, node.key)\n    },\n    ...states\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {GridRowProps} from '@react-aria/grid';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState} from '@react-stately/table';\n\nexport interface TableHeaderRowAria {\n  /** Props for the grid row element. */\n  rowProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a header row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function useTableHeaderRow<T>(props: GridRowProps<T>, state: TableState<T>, ref: RefObject<Element | null>): TableHeaderRowAria {\n  let {node, isVirtualized} = props;\n  let rowProps = {\n    role: 'row'\n  };\n\n  if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n    rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based\n  }\n\n  return {\n    rowProps\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {getCellId} from './utils';\nimport {GridNode} from '@react-types/grid';\nimport {TableState} from '@react-stately/table';\nimport {useGridCell} from '@react-aria/grid';\n\nexport interface AriaTableCellProps {\n  /** An object representing the table cell. Contains all the relevant information that makes up the row header. */\n  node: GridNode<unknown>,\n  /** Whether the cell is contained in a virtual scroller. */\n  isVirtualized?: boolean,\n  /** Whether selection should occur on press up instead of press down. */\n  shouldSelectOnPressUp?: boolean,\n  /**\n   * Handler that is called when a user performs an action on the cell.\n   * Please use onCellAction at the collection level instead.\n   * @deprecated\n   **/\n  onAction?: () => void\n}\n\nexport interface TableCellAria {\n  /** Props for the table cell element. */\n  gridCellProps: DOMAttributes,\n  /** Whether the cell is currently in a pressed state. */\n  isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a cell in a table.\n * @param props - Props for the cell.\n * @param state - State of the table, as returned by `useTableState`.\n * @param ref - The ref attached to the cell element.\n */\nexport function useTableCell<T>(props: AriaTableCellProps, state: TableState<T>, ref: RefObject<FocusableElement | null>): TableCellAria {\n  let {gridCellProps, isPressed} = useGridCell(props, state, ref);\n  let columnKey = props.node.column?.key;\n  if (columnKey != null && state.collection.rowHeaderColumnKeys.has(columnKey)) {\n    gridCellProps.role = 'rowheader';\n    gridCellProps.id = getCellId(state, props.node.parentKey!, columnKey);\n  }\n\n  return {\n    gridCellProps,\n    isPressed\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCheckboxProps} from '@react-types/checkbox';\nimport {getRowLabelledBy} from './utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Key} from '@react-types/shared';\nimport {TableState} from '@react-stately/table';\nimport {useGridSelectionCheckbox} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface AriaTableSelectionCheckboxProps {\n  /** A unique key for the checkbox. */\n  key: Key\n}\n\nexport interface TableSelectionCheckboxAria {\n  /** Props for the row selection checkbox element. */\n  checkboxProps: AriaCheckboxProps\n}\n\nexport interface TableSelectAllCheckboxAria {\n  /** Props for the select all checkbox element. */\n  checkboxProps: AriaCheckboxProps\n}\n\n/**\n * Provides the behavior and accessibility implementation for a selection checkbox in a table.\n * @param props - Props for the selection checkbox.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableSelectionCheckbox<T>(props: AriaTableSelectionCheckboxProps, state: TableState<T>): TableSelectionCheckboxAria {\n  let {key} = props;\n  const {checkboxProps} = useGridSelectionCheckbox(props, state);\n\n  return {\n    checkboxProps: {\n      ...checkboxProps,\n      'aria-labelledby': `${checkboxProps.id} ${getRowLabelledBy(state, key)}`\n    }\n  };\n}\n\n/**\n * Provides the behavior and accessibility implementation for the select all checkbox in a table.\n * @param props - Props for the select all checkbox.\n * @param state - State of the table, as returned by `useTableState`.\n */\nexport function useTableSelectAllCheckbox<T>(state: TableState<T>): TableSelectAllCheckboxAria {\n  let {isEmpty, isSelectAll, selectionMode} = state.selectionManager;\n  const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/table');\n\n  return {\n    checkboxProps: {\n      'aria-label': stringFormatter.format(selectionMode === 'single' ? 'select' : 'selectAll'),\n      isSelected: isSelectAll,\n      isDisabled: selectionMode !== 'multiple' || state.collection.size === 0,\n      isIndeterminate: !isEmpty && !isSelectAll,\n      onChange: () => state.selectionManager.toggleSelectAll()\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTable} from './useTable';\nexport {useTableColumnHeader} from './useTableColumnHeader';\nexport {useTableRow} from './useTableRow';\nexport {useTableHeaderRow} from './useTableHeaderRow';\nexport {useTableCell} from './useTableCell';\nexport {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';\nexport {useTableColumnResize} from './useTableColumnResize';\n\n// Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...\n// export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';\nimport {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';\nexport function useTableRowGroup(): GridRowGroupAria {\n  return useGridRowGroup();\n}\n\nexport type {AriaTableProps} from './useTable';\nexport type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';\nexport type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';\nexport type {AriaTableCellProps, TableCellAria} from './useTableCell';\nexport type {TableHeaderRowAria} from './useTableHeaderRow';\nexport type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';\nexport type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","\"use client\";\n\n// src/table-select-all-checkbox.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableColumnHeader, useTableSelectAllCheckbox } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { Checkbox } from \"@heroui/checkbox\";\nimport { VisuallyHidden } from \"@react-aria/visually-hidden\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableSelectAllCheckbox = forwardRef((props, ref) => {\n  var _a, _b;\n  const {\n    as,\n    className,\n    node,\n    slots,\n    state,\n    selectionMode,\n    color,\n    checkboxesProps,\n    disableAnimation,\n    classNames,\n    ...otherProps\n  } = props;\n  const Component = as || \"th\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { columnHeaderProps } = useTableColumnHeader({ node }, state, domRef);\n  const { isFocusVisible, focusProps } = useFocusRing();\n  const { checkboxProps } = useTableSelectAllCheckbox(state);\n  const thStyles = clsx(classNames == null ? void 0 : classNames.th, className, (_a = node.props) == null ? void 0 : _a.className);\n  const isSingleSelectionMode = selectionMode === \"single\";\n  const { onChange, ...otherCheckboxProps } = checkboxProps;\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      ...mergeProps(\n        columnHeaderProps,\n        focusProps,\n        filterDOMProps(node.props, {\n          enabled: shouldFilterDOMProps\n        }),\n        filterDOMProps(otherProps, {\n          enabled: shouldFilterDOMProps\n        })\n      ),\n      className: (_b = slots.th) == null ? void 0 : _b.call(slots, { class: thStyles }),\n      children: isSingleSelectionMode ? /* @__PURE__ */ jsx(VisuallyHidden, { children: checkboxProps[\"aria-label\"] }) : /* @__PURE__ */ jsx(\n        Checkbox,\n        {\n          color,\n          disableAnimation,\n          onValueChange: onChange,\n          ...mergeProps(checkboxesProps, otherCheckboxProps)\n        }\n      )\n    }\n  );\n});\nTableSelectAllCheckbox.displayName = \"HeroUI.TableSelectAllCheckbox\";\nvar table_select_all_checkbox_default = TableSelectAllCheckbox;\n\nexport {\n  table_select_all_checkbox_default\n};\n","\"use client\";\n\n// src/use-table.ts\nimport { useCallback } from \"react\";\nimport { useTableState } from \"@react-stately/table\";\nimport { useTable as useReactAriaTable } from \"@react-aria/table\";\nimport { mapPropsVariants, useProviderContext } from \"@heroui/system\";\nimport { table } from \"@heroui/theme\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { clsx, objectToDeps } from \"@heroui/shared-utils\";\nimport { useMemo } from \"react\";\nfunction useTable(originalProps) {\n  var _a;\n  const globalContext = useProviderContext();\n  const [props, variantProps] = mapPropsVariants(originalProps, table.variantKeys);\n  const {\n    ref,\n    as,\n    baseRef,\n    children,\n    className,\n    classNames,\n    removeWrapper = false,\n    disableAnimation = (_a = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _a : false,\n    isKeyboardNavigationDisabled = false,\n    selectionMode = \"none\",\n    topContentPlacement = \"inside\",\n    bottomContentPlacement = \"inside\",\n    selectionBehavior = selectionMode === \"none\" ? null : \"toggle\",\n    disabledBehavior = \"selection\",\n    showSelectionCheckboxes = selectionMode === \"multiple\" && selectionBehavior !== \"replace\",\n    BaseComponent = \"div\",\n    checkboxesProps,\n    topContent,\n    bottomContent,\n    onRowAction,\n    onCellAction,\n    ...otherProps\n  } = props;\n  const Component = as || \"table\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const domBaseRef = useDOMRef(baseRef);\n  const state = useTableState({\n    ...originalProps,\n    children,\n    showSelectionCheckboxes\n  });\n  if (isKeyboardNavigationDisabled && !state.isKeyboardNavigationDisabled) {\n    state.setKeyboardNavigationDisabled(true);\n  }\n  const { collection } = state;\n  const { layout, ...otherOriginalProps } = originalProps;\n  const { gridProps } = useReactAriaTable({ ...otherOriginalProps }, state, domRef);\n  const isSelectable = selectionMode !== \"none\";\n  const isMultiSelectable = selectionMode === \"multiple\";\n  const slots = useMemo(\n    () => table({\n      ...variantProps,\n      isSelectable,\n      isMultiSelectable\n    }),\n    [objectToDeps(variantProps), isSelectable, isMultiSelectable]\n  );\n  const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);\n  const values = useMemo(\n    () => {\n      var _a2;\n      return {\n        state,\n        slots,\n        isSelectable,\n        collection,\n        classNames,\n        color: originalProps == null ? void 0 : originalProps.color,\n        disableAnimation,\n        checkboxesProps,\n        isHeaderSticky: (_a2 = originalProps == null ? void 0 : originalProps.isHeaderSticky) != null ? _a2 : false,\n        selectionMode,\n        selectionBehavior,\n        disabledBehavior,\n        showSelectionCheckboxes,\n        onRowAction,\n        onCellAction\n      };\n    },\n    [\n      slots,\n      state,\n      collection,\n      isSelectable,\n      classNames,\n      selectionMode,\n      selectionBehavior,\n      checkboxesProps,\n      disabledBehavior,\n      disableAnimation,\n      showSelectionCheckboxes,\n      originalProps == null ? void 0 : originalProps.color,\n      originalProps == null ? void 0 : originalProps.isHeaderSticky,\n      onRowAction,\n      onCellAction\n    ]\n  );\n  const getBaseProps = useCallback(\n    (props2) => ({\n      ...props2,\n      ref: domBaseRef,\n      className: slots.base({ class: clsx(baseStyles, props2 == null ? void 0 : props2.className) })\n    }),\n    [baseStyles, slots]\n  );\n  const getWrapperProps = useCallback(\n    (props2) => ({\n      ...props2,\n      ref: domBaseRef,\n      className: slots.wrapper({ class: clsx(classNames == null ? void 0 : classNames.wrapper, props2 == null ? void 0 : props2.className) })\n    }),\n    [classNames == null ? void 0 : classNames.wrapper, slots]\n  );\n  const getTableProps = useCallback(\n    (props2) => ({\n      ...mergeProps(\n        gridProps,\n        filterDOMProps(otherProps, {\n          enabled: shouldFilterDOMProps\n        }),\n        props2\n      ),\n      // avoid typeahead debounce wait for input / textarea\n      // so that typing with space won't be blocked\n      onKeyDownCapture: void 0,\n      ref: domRef,\n      className: slots.table({ class: clsx(classNames == null ? void 0 : classNames.table, props2 == null ? void 0 : props2.className) })\n    }),\n    [classNames == null ? void 0 : classNames.table, shouldFilterDOMProps, slots, gridProps, otherProps]\n  );\n  return {\n    BaseComponent,\n    Component,\n    children,\n    state,\n    collection,\n    values,\n    topContent,\n    bottomContent,\n    removeWrapper,\n    topContentPlacement,\n    bottomContentPlacement,\n    getBaseProps,\n    getWrapperProps,\n    getTableProps\n  };\n}\n\nexport {\n  useTable\n};\n","import {getChildNodes, getFirstItem, getLastItem} from '@react-stately/collections';\nimport {GridCollection, GridNode} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\nimport {MultipleSelectionState, MultipleSelectionStateProps, SelectionManager, useMultipleSelectionState} from '@react-stately/selection';\nimport {useEffect, useMemo, useRef} from 'react';\n\nexport interface GridState<T, C extends GridCollection<T>> {\n  collection: C,\n  /** A set of keys for rows that are disabled. */\n  disabledKeys: Set<Key>,\n  /** A selection manager to read and update row selection state. */\n  selectionManager: SelectionManager,\n  /** Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */\n  isKeyboardNavigationDisabled: boolean\n}\n\nexport interface GridStateOptions<T, C extends GridCollection<T>> extends MultipleSelectionStateProps {\n  collection: C,\n  disabledKeys?: Iterable<Key>,\n  focusMode?: 'row' | 'cell',\n  /** @private - do not use unless you know what you're doing. */\n  UNSAFE_selectionState?: MultipleSelectionState\n}\n\n/**\n * Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable.\n */\nexport function useGridState<T extends object, C extends GridCollection<T>>(props: GridStateOptions<T, C>): GridState<T, C> {\n  let {collection, focusMode} = props;\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  let selectionState = props.UNSAFE_selectionState || useMultipleSelectionState(props);\n  let disabledKeys = useMemo(() =>\n      props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()\n    , [props.disabledKeys]);\n\n  let setFocusedKey = selectionState.setFocusedKey;\n  selectionState.setFocusedKey = (key, child) => {\n    // If focusMode is cell and an item is focused, focus a child cell instead.\n    if (focusMode === 'cell' && key != null) {\n      let item = collection.getItem(key);\n      if (item?.type === 'item') {\n        let children = getChildNodes(item, collection);\n        if (child === 'last') {\n          key = getLastItem(children)?.key ?? null;\n        } else {\n          key = getFirstItem(children)?.key ?? null;\n        }\n      }\n    }\n\n    setFocusedKey(key, child);\n  };\n\n  let selectionManager = useMemo(() =>\n    new SelectionManager(collection, selectionState)\n    , [collection, selectionState]\n  );\n\n  // Reset focused key if that item is deleted from the collection.\n  const cachedCollection = useRef<C | null>(null);\n  useEffect(() => {\n    if (selectionState.focusedKey != null && cachedCollection.current && !collection.getItem(selectionState.focusedKey)) {\n      const node = cachedCollection.current.getItem(selectionState.focusedKey);\n      const parentNode =\n        node?.parentKey != null && (node.type === 'cell' || node.type === 'rowheader' || node.type === 'column') ?\n        cachedCollection.current.getItem(node.parentKey) :\n        node;\n      if (!parentNode) {\n        selectionState.setFocusedKey(null);\n        return;\n      }\n      const cachedRows = cachedCollection.current.rows;\n      const rows = collection.rows;\n      const diff = cachedRows.length - rows.length;\n      let index = Math.min(\n        (\n          diff > 1 ?\n          Math.max(parentNode.index - diff + 1, 0) :\n          parentNode.index\n        ),\n        rows.length - 1);\n      let newRow: GridNode<T> | null = null;\n      while (index >= 0) {\n        if (!selectionManager.isDisabled(rows[index].key) && rows[index].type !== 'headerrow') {\n          newRow = rows[index];\n          break;\n        }\n        // Find next, not disabled row.\n        if (index < rows.length - 1) {\n          index++;\n        // Otherwise, find previous, not disabled row.\n        } else {\n          if (index > parentNode.index) {\n            index = parentNode.index;\n          }\n          index--;\n        }\n      }\n      if (newRow) {\n        const childNodes = newRow.hasChildNodes ? [...getChildNodes(newRow, collection)] : [];\n        const keyToFocus =\n          newRow.hasChildNodes &&\n          parentNode !== node &&\n          node &&\n          node.index < childNodes.length ?\n          childNodes[node.index].key :\n          newRow.key;\n        selectionState.setFocusedKey(keyToFocus);\n      } else {\n        selectionState.setFocusedKey(null);\n      }\n    }\n    cachedCollection.current = collection;\n  }, [collection, selectionManager, selectionState, selectionState.focusedKey]);\n\n  return {\n    collection,\n    disabledKeys,\n    isKeyboardNavigationDisabled: false,\n    selectionManager\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getFirstItem, getLastItem} from '@react-stately/collections';\nimport {GridCollection} from '@react-stately/grid';\nimport {GridNode} from '@react-types/grid';\nimport {TableCollection as ITableCollection} from '@react-types/table';\nimport {Key} from '@react-types/shared';\n\ninterface GridCollectionOptions {\n  showSelectionCheckboxes?: boolean,\n  showDragButtons?: boolean\n}\n\nconst ROW_HEADER_COLUMN_KEY = 'row-header-column-' + Math.random().toString(36).slice(2);\nlet ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);\nwhile (ROW_HEADER_COLUMN_KEY === ROW_HEADER_COLUMN_KEY_DRAG) {\n  ROW_HEADER_COLUMN_KEY_DRAG = 'row-header-column-' + Math.random().toString(36).slice(2);\n}\n\n/** @private */\nexport function buildHeaderRows<T>(keyMap: Map<Key, GridNode<T>>, columnNodes: GridNode<T>[]): GridNode<T>[] {\n  if (columnNodes.length === 0) {\n    return [];\n  }\n\n  let columns: GridNode<T>[][] = [];\n  let seen = new Map();\n  for (let column of columnNodes) {\n    let parentKey = column.parentKey;\n    let col = [column];\n\n    while (parentKey) {\n      let parent: GridNode<T> | undefined = keyMap.get(parentKey);\n      if (!parent) {\n        break;\n      }\n\n      // If we've already seen this parent, than it is shared\n      // with a previous column. If the current column is taller\n      // than the previous column, than we need to shift the parent\n      // in the previous column so it's level with the current column.\n      if (seen.has(parent)) {\n        parent.colSpan ??= 0;\n        parent.colSpan++;\n        parent.colspan = parent.colSpan;\n\n        let {column, index} = seen.get(parent);\n        if (index > col.length) {\n          break;\n        }\n\n        for (let i = index; i < col.length; i++) {\n          column.splice(i, 0, null);\n        }\n\n        // Adjust shifted indices\n        for (let i = col.length; i < column.length; i++) {\n          // eslint-disable-next-line max-depth\n          if (column[i] && seen.has(column[i])) {\n            seen.get(column[i]).index = i;\n          }\n        }\n      } else {\n        parent.colSpan = 1;\n        parent.colspan = 1;\n        col.push(parent);\n        seen.set(parent, {column: col, index: col.length - 1});\n      }\n\n      parentKey = parent.parentKey;\n    }\n\n    columns.push(col);\n    column.index = columns.length - 1;\n  }\n\n  let maxLength = Math.max(...columns.map(c => c.length));\n  let headerRows: GridNode<T>[][] = Array(maxLength).fill(0).map(() => []);\n\n  // Convert columns into rows.\n  let colIndex = 0;\n  for (let column of columns) {\n    let i = maxLength - 1;\n    for (let item of column) {\n      if (item) {\n        // Fill the space up until the current column with a placeholder\n        let row = headerRows[i];\n        let rowLength = row.reduce((p, c) => p + (c.colSpan ?? 1), 0);\n        if (rowLength < colIndex) {\n          let placeholder: GridNode<T> = {\n            type: 'placeholder',\n            key: 'placeholder-' + item.key,\n            colspan: colIndex - rowLength,\n            colSpan: colIndex - rowLength,\n            index: rowLength,\n            value: null,\n            rendered: null,\n            level: i,\n            hasChildNodes: false,\n            childNodes: [],\n            textValue: ''\n          };\n\n          // eslint-disable-next-line max-depth\n          if (row.length > 0) {\n            row[row.length - 1].nextKey = placeholder.key;\n            placeholder.prevKey = row[row.length - 1].key;\n          }\n\n          row.push(placeholder);\n        }\n\n        if (row.length > 0) {\n          row[row.length - 1].nextKey = item.key;\n          item.prevKey = row[row.length - 1].key;\n        }\n\n        item.level = i;\n        item.colIndex = colIndex;\n        row.push(item);\n      }\n\n      i--;\n    }\n\n    colIndex++;\n  }\n\n  // Add placeholders at the end of each row that is shorter than the maximum\n  let i = 0;\n  for (let row of headerRows) {\n    let rowLength = row.reduce((p, c) => p + (c.colSpan ?? 1), 0);\n    if (rowLength < columnNodes.length) {\n      let placeholder: GridNode<T> = {\n        type: 'placeholder',\n        key: 'placeholder-' + row[row.length - 1].key,\n        colSpan: columnNodes.length - rowLength,\n        colspan: columnNodes.length - rowLength,\n        index: rowLength,\n        value: null,\n        rendered: null,\n        level: i,\n        hasChildNodes: false,\n        childNodes: [],\n        textValue: '',\n        prevKey: row[row.length - 1].key\n      };\n\n      row.push(placeholder);\n    }\n\n    i++;\n  }\n\n  return headerRows.map((childNodes, index) => {\n    let row: GridNode<T> = {\n      type: 'headerrow',\n      key: 'headerrow-' + index,\n      index,\n      value: null,\n      rendered: null,\n      level: 0,\n      hasChildNodes: true,\n      childNodes,\n      textValue: ''\n    };\n\n    return row;\n  });\n}\n\nexport class TableCollection<T> extends GridCollection<T> implements ITableCollection<T> {\n  headerRows: GridNode<T>[];\n  columns: GridNode<T>[];\n  rowHeaderColumnKeys: Set<Key>;\n  body: GridNode<T>;\n  _size: number = 0;\n\n  constructor(nodes: Iterable<GridNode<T>>, prev?: ITableCollection<T> | null, opts?: GridCollectionOptions) {\n    let rowHeaderColumnKeys: Set<Key> = new Set();\n    let body: GridNode<T> | null = null;\n    let columns: GridNode<T>[] = [];\n    // Add cell for selection checkboxes if needed.\n    if (opts?.showSelectionCheckboxes) {\n      let rowHeaderColumn: GridNode<T> = {\n        type: 'column',\n        key: ROW_HEADER_COLUMN_KEY,\n        value: null,\n        textValue: '',\n        level: 0,\n        index: opts?.showDragButtons ? 1 : 0,\n        hasChildNodes: false,\n        rendered: null,\n        childNodes: [],\n        props: {\n          isSelectionCell: true\n        }\n      };\n\n      columns.unshift(rowHeaderColumn);\n    }\n\n    // Add cell for drag buttons if needed.\n    if (opts?.showDragButtons) {\n      let rowHeaderColumn: GridNode<T> = {\n        type: 'column',\n        key: ROW_HEADER_COLUMN_KEY_DRAG,\n        value: null,\n        textValue: '',\n        level: 0,\n        index: 0,\n        hasChildNodes: false,\n        rendered: null,\n        childNodes: [],\n        props: {\n          isDragButtonCell: true\n        }\n      };\n\n      columns.unshift(rowHeaderColumn);\n    }\n\n    let rows: GridNode<T>[] = [];\n    let columnKeyMap = new Map();\n    let visit = (node: GridNode<T>) => {\n      switch (node.type) {\n        case 'body':\n          body = node;\n          break;\n        case 'column':\n          columnKeyMap.set(node.key, node);\n          if (!node.hasChildNodes) {\n            columns.push(node);\n\n            if (node.props.isRowHeader) {\n              rowHeaderColumnKeys.add(node.key);\n            }\n          }\n          break;\n        case 'item':\n          rows.push(node);\n          return; // do not go into childNodes\n      }\n      for (let child of node.childNodes) {\n        visit(child);\n      }\n    };\n\n    for (let node of nodes) {\n      visit(node);\n    }\n\n    let headerRows = buildHeaderRows(columnKeyMap, columns) as GridNode<T>[];\n    headerRows.forEach((row, i) => rows.splice(i, 0, row));\n\n    super({\n      columnCount: columns.length,\n      items: rows,\n      visitNode: node => {\n        node.column = columns[node.index];\n        return node;\n      }\n    });\n    this.columns = columns;\n    this.rowHeaderColumnKeys = rowHeaderColumnKeys;\n    this.body = body!;\n    this.headerRows = headerRows;\n    this._size = [...body!.childNodes].length;\n\n    // Default row header column to the first one.\n    if (this.rowHeaderColumnKeys.size === 0) {\n      let col = this.columns.find(column => !column.props?.isDragButtonCell && !column.props?.isSelectionCell);\n      if (col) {\n        this.rowHeaderColumnKeys.add(col.key);\n      }\n    }\n  }\n\n  *[Symbol.iterator](): IterableIterator<GridNode<T>> {\n    yield* this.body.childNodes;\n  }\n\n  get size(): number {\n    return this._size;\n  }\n\n  getKeys(): IterableIterator<Key> {\n    return this.keyMap.keys();\n  }\n\n  getKeyBefore(key: Key): Key | null {\n    let node = this.keyMap.get(key);\n    return node?.prevKey ?? null;\n  }\n\n  getKeyAfter(key: Key): Key | null {\n    let node = this.keyMap.get(key);\n    return node?.nextKey ?? null;\n  }\n\n  getFirstKey(): Key | null {\n    return getFirstItem(this.body.childNodes)?.key ?? null;\n  }\n\n  getLastKey(): Key | null {\n    return getLastItem(this.body.childNodes)?.key ?? null;\n  }\n\n  getItem(key: Key): GridNode<T> | null {\n    return this.keyMap.get(key) ?? null;\n  }\n\n  at(idx: number): GridNode<T> | null {\n    const keys = [...this.getKeys()];\n    return this.getItem(keys[idx]);\n  }\n\n  getChildren(key: Key): Iterable<GridNode<T>> {\n    if (key === this.body.key) {\n      return this.body.childNodes;\n    }\n\n    return super.getChildren(key);\n  }\n\n  getTextValue(key: Key): string {\n    let row = this.getItem(key);\n    if (!row) {\n      return '';\n    }\n\n    // If the row has a textValue, use that.\n    if (row.textValue) {\n      return row.textValue;\n    }\n\n    // Otherwise combine the text of each of the row header columns.\n    let rowHeaderColumnKeys = this.rowHeaderColumnKeys;\n    if (rowHeaderColumnKeys) {\n      let text: string[] = [];\n      for (let cell of row.childNodes) {\n        let column = this.columns[cell.index];\n        if (rowHeaderColumnKeys.has(column.key) && cell.textValue) {\n          text.push(cell.textValue);\n        }\n\n        if (text.length === rowHeaderColumnKeys.size) {\n          break;\n        }\n      }\n\n      return text.join(' ');\n    }\n\n    return '';\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridNode, GridRow, GridCollection as IGridCollection} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\n\ninterface GridCollectionOptions<T> {\n  columnCount: number,\n  items: GridRow<T>[],\n  visitNode?: (cell: GridNode<T>) => GridNode<T>\n}\n\nexport class GridCollection<T> implements IGridCollection<T> {\n  keyMap: Map<Key, GridNode<T>> = new Map();\n  columnCount: number;\n  rows: GridNode<T>[];\n\n  constructor(opts: GridCollectionOptions<T>) {\n    this.keyMap = new Map();\n    this.columnCount = opts?.columnCount;\n    this.rows = [];\n\n    let visit = (node: GridNode<T>) => {\n      // If the node is the same object as the previous node for the same key,\n      // we can skip this node and its children. We always visit columns though,\n      // because we depend on order to build the columns array.\n      let prevNode = this.keyMap.get(node.key);\n      if (opts.visitNode) {\n        node = opts.visitNode(node);\n      }\n\n      this.keyMap.set(node.key, node);\n\n      let childKeys = new Set();\n      let last: GridNode<T> | null = null;\n      let rowHasCellWithColSpan = false;\n\n      if (node.type === 'item') {\n        for (let child of node.childNodes) {\n          if (child.props?.colSpan !== undefined) {\n            rowHasCellWithColSpan = true;\n            break;\n          }\n        }\n      }\n\n      for (let child of node.childNodes as Iterable<GridNode<T>>) {\n        if (child.type === 'cell' && rowHasCellWithColSpan) {\n          child.colspan = child.props?.colSpan;\n          child.colSpan = child.props?.colSpan;\n          child.colIndex = !last ? child.index : (last.colIndex ?? last.index) + (last.colSpan ?? 1);\n        }\n\n        if (child.type === 'cell' && child.parentKey == null) {\n          // if child is a cell parent key isn't already established by the collection, match child node to parent row\n          child.parentKey = node.key;\n        }\n        childKeys.add(child.key);\n\n        if (last) {\n          last.nextKey = child.key;\n          child.prevKey = last.key;\n        } else {\n          child.prevKey = null;\n        }\n\n        visit(child);\n        last = child;\n      }\n\n      if (last) {\n        last.nextKey = null;\n      }\n\n      // Remove deleted nodes and their children from the key map\n      if (prevNode) {\n        for (let child of prevNode.childNodes) {\n          if (!childKeys.has(child.key)) {\n            remove(child);\n          }\n        }\n      }\n    };\n\n    let remove = (node: GridNode<T>) => {\n      this.keyMap.delete(node.key);\n      for (let child of node.childNodes) {\n        if (this.keyMap.get(child.key) === child) {\n          remove(child);\n        }\n      }\n    };\n\n    let last: GridNode<T> | null = null;\n    for (let [i, node] of opts.items.entries()) {\n      let rowNode: GridNode<T> = {\n        ...node,\n        level: node.level ?? 0,\n        key: node.key ?? 'row-' + i,\n        type: node.type ?? 'row',\n        value: node.value ?? null,\n        hasChildNodes: true,\n        childNodes: [...node.childNodes],\n        rendered: node.rendered,\n        textValue: node.textValue ?? '',\n        index: node.index ?? i\n      };\n\n      if (last) {\n        last.nextKey = rowNode.key;\n        rowNode.prevKey = last.key;\n      } else {\n        rowNode.prevKey = null;\n      }\n\n      this.rows.push(rowNode);\n      visit(rowNode);\n\n      last = rowNode;\n    }\n\n    if (last) {\n      last.nextKey = null;\n    }\n  }\n\n  *[Symbol.iterator](): IterableIterator<GridNode<T>> {\n    yield* [...this.rows];\n  }\n\n  get size(): number {\n    return [...this.rows].length;\n  }\n\n  getKeys(): IterableIterator<Key> {\n    return this.keyMap.keys();\n  }\n\n  getKeyBefore(key: Key): Key | null {\n    let node = this.keyMap.get(key);\n    return node ? node.prevKey ?? null : null;\n  }\n\n  getKeyAfter(key: Key): Key | null {\n    let node = this.keyMap.get(key);\n    return node ? node.nextKey ?? null : null;\n  }\n\n  getFirstKey(): Key | null {\n    return [...this.rows][0]?.key;\n  }\n\n  getLastKey(): Key | null {\n    let rows = [...this.rows];\n    return rows[rows.length - 1]?.key;\n  }\n\n  getItem(key: Key): GridNode<T> | null {\n    return this.keyMap.get(key) ?? null;\n  }\n\n  at(idx: number): GridNode<T> | null {\n    const keys = [...this.getKeys()];\n    return this.getItem(keys[idx]);\n  }\n\n  getChildren(key: Key): Iterable<GridNode<T>> {\n    let node = this.keyMap.get(key);\n    return node?.childNodes || [];\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBuilderContext} from './useTableState';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\nimport {TableHeaderProps} from '@react-types/table';\n\nfunction TableHeader<T>(props: TableHeaderProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n  return null;\n}\n\nTableHeader.getCollectionNode = function* getCollectionNode<T>(props: TableHeaderProps<T>, context: CollectionBuilderContext<T>): Generator<PartialNode<T>, void, any> {\n  let {children, columns} = props;\n\n  // Clear columns so they aren't double added in strict mode.\n  context.columns = [];\n\n  if (typeof children === 'function') {\n    if (!columns) {\n      throw new Error('props.children was a function but props.columns is missing');\n    }\n\n    for (let column of columns) {\n      yield {\n        type: 'column',\n        value: column,\n        renderer: children\n      };\n    }\n  } else {\n    let columns: PartialNode<T>[] = [];\n    React.Children.forEach(children, column => {\n      columns.push({\n        type: 'column',\n        element: column\n      });\n    });\n\n    yield* columns;\n  }\n};\n\n/**\n * A TableHeader is a container for the Column elements in a Table. Columns can be statically defined\n * as children, or generated dynamically using a function based on the data passed to the `columns` prop.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _TableHeader = TableHeader as <T>(props: TableHeaderProps<T>) => JSX.Element;\nexport {_TableHeader as TableHeader};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\nimport {TableBodyProps} from '@react-types/table';\n\nfunction TableBody<T>(props: TableBodyProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n  return null;\n}\n\nTableBody.getCollectionNode = function* getCollectionNode<T>(props: TableBodyProps<T>): Generator<PartialNode<T>> {\n  let {children, items} = props;\n  yield {\n    type: 'body',\n    hasChildNodes: true,\n    props,\n    *childNodes() {\n      if (typeof children === 'function') {\n        if (!items) {\n          throw new Error('props.children was a function but props.items is missing');\n        }\n\n        for (let item of items) {\n          yield {\n            type: 'item',\n            value: item,\n            renderer: children\n          };\n        }\n      } else {\n        let items: PartialNode<T>[] = [];\n        React.Children.forEach(children, item => {\n          items.push({\n            type: 'item',\n            element: item\n          });\n        });\n\n        yield* items;\n      }\n    }\n  };\n};\n\n/**\n * A TableBody is a container for the Row elements of a Table. Rows can be statically defined\n * as children, or generated dynamically using a function based on the data passed to the `items` prop.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _TableBody = TableBody as <T>(props: TableBodyProps<T>) => JSX.Element;\nexport {_TableBody as TableBody};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBuilderContext} from './useTableState';\nimport {ColumnProps} from '@react-types/table';\nimport {GridNode} from '@react-types/grid';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\n\nfunction Column<T>(props: ColumnProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n  return null;\n}\n\nColumn.getCollectionNode = function* getCollectionNode<T>(props: ColumnProps<T>, context: CollectionBuilderContext<T>): Generator<PartialNode<T>, void, GridNode<T>[]> {\n  let {title, children, childColumns} = props;\n\n  let rendered = title || children;\n  let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];\n\n  let fullNodes = yield {\n    type: 'column',\n    hasChildNodes: !!childColumns || (!!title && React.Children.count(children) > 0),\n    rendered,\n    textValue,\n    props,\n    *childNodes() {\n      if (childColumns) {\n        for (let child of childColumns) {\n          yield {\n            type: 'column',\n            value: child\n          };\n        }\n      } else if (title) {\n        let childColumns: PartialNode<T>[] = [];\n        React.Children.forEach(children, child => {\n          childColumns.push({\n            type: 'column',\n            element: child as ReactElement<ColumnProps<T>>\n          });\n        });\n\n        yield* childColumns;\n      }\n    },\n    shouldInvalidate(newContext: CollectionBuilderContext<T>) {\n      // This is a bit of a hack, but it works.\n      // If this method is called, then there's a cached version of this node available.\n      // But, we need to keep the list of columns in the new context up to date.\n      updateContext(newContext);\n      return false;\n    }\n  };\n\n  let updateContext = (context: CollectionBuilderContext<T>) => {\n    // register leaf columns on the context so that <Row> can access them\n    for (let node of fullNodes) {\n      if (!node.hasChildNodes) {\n        context.columns.push(node);\n      }\n    }\n  };\n\n  updateContext(context);\n};\n\n/**\n * A Column represents a field of each item within a Table. Columns may also contain nested\n * Column elements to represent column groups. Nested columns can be statically defined as\n * children, or dynamically generated using a function based on the `childColumns` prop.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Column = Column as <T>(props: ColumnProps<T>) => JSX.Element;\nexport {_Column as Column};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBuilderContext} from './useTableState';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\nimport {RowProps} from '@react-types/table';\n\nfunction Row<T>(props: RowProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n  return null;\n}\n\nRow.getCollectionNode = function* getCollectionNode<T>(props: RowProps<T>, context: CollectionBuilderContext<T>): Generator<PartialNode<T>> {\n  let {children, textValue, UNSTABLE_childItems} = props;\n\n  yield {\n    type: 'item',\n    props: props,\n    textValue,\n    'aria-label': props['aria-label'],\n    hasChildNodes: true,\n    *childNodes() {\n      // Process cells first\n      if (context.showDragButtons) {\n        yield {\n          type: 'cell',\n          key: 'header-drag', // this is combined with the row key by CollectionBuilder\n          props: {\n            isDragButtonCell: true\n          }\n        };\n      }\n\n      if (context.showSelectionCheckboxes && context.selectionMode !== 'none') {\n        yield {\n          type: 'cell',\n          key: 'header', // this is combined with the row key by CollectionBuilder\n          props: {\n            isSelectionCell: true\n          }\n        };\n      }\n\n      if (typeof children === 'function') {\n        for (let column of context.columns) {\n          yield {\n            type: 'cell',\n            element: children(column.key),\n            key: column.key // this is combined with the row key by CollectionBuilder\n          };\n        }\n\n        if (UNSTABLE_childItems) {\n          for (let child of UNSTABLE_childItems) {\n            // Note: in order to reuse the render function of TableBody for our child rows, we just need to yield a type and a value here. CollectionBuilder will then look up\n            // the parent renderer and use that to build the full node of this child row, using the value provided here to generate the cells\n            yield {\n              type: 'item',\n              value: child\n            };\n          }\n        }\n      } else {\n        let cells: PartialNode<T>[] = [];\n        let childRows: PartialNode<T>[] = [];\n        let columnCount = 0;\n        React.Children.forEach(children, node => {\n          if (node.type === Row) {\n            if (cells.length < context.columns.length) {\n              throw new Error('All of a Row\\'s child Cells must be positioned before any child Rows.');\n            }\n\n            childRows.push({\n              type: 'item',\n              element: node\n            });\n          } else {\n            cells.push({\n              type: 'cell',\n              element: node\n            });\n            columnCount += node.props.colSpan ?? 1;\n          }\n        });\n\n        if (columnCount !== context.columns.length) {\n          throw new Error(`Cell count must match column count. Found ${columnCount} cells and ${context.columns.length} columns.`);\n        }\n\n        yield* cells;\n        yield* childRows;\n      }\n    },\n    shouldInvalidate(newContext: CollectionBuilderContext<T>) {\n      // Invalidate all rows if the columns changed.\n      return newContext.columns.length !== context.columns.length ||\n        newContext.columns.some((c, i) => c.key !== context.columns[i].key) ||\n        newContext.showSelectionCheckboxes !== context.showSelectionCheckboxes ||\n        newContext.showDragButtons !== context.showDragButtons ||\n        newContext.selectionMode !== context.selectionMode;\n    }\n  };\n};\n\n/**\n * A Row represents a single item in a Table and contains Cell elements for each column.\n * Cells can be statically defined as children, or generated dynamically using a function\n * based on the columns defined in the TableHeader.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Row = Row as <T>(props: RowProps<T>) => JSX.Element;\nexport {_Row as Row};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CellProps} from '@react-types/table';\nimport {JSX, ReactElement} from 'react';\nimport {PartialNode} from '@react-stately/collections';\n\nfunction Cell(props: CellProps): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n  return null;\n}\n\nCell.getCollectionNode = function* getCollectionNode<T>(props: CellProps): Generator<PartialNode<T>> {\n  let {children} = props;\n\n  let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';\n  yield {\n    type: 'cell',\n    props: props,\n    rendered: children,\n    textValue,\n    'aria-label': props['aria-label'],\n    hasChildNodes: false\n  };\n};\n\n/**\n * A Cell represents the value of a single Column within a Table Row.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Cell = Cell as (props: CellProps) => JSX.Element;\nexport {_Cell as Cell};\n","\"use client\";\n\n// src/table-cell.tsx\nimport { useMemo } from \"react\";\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableCell } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableCell = forwardRef((props, ref) => {\n  var _a, _b, _c;\n  const { as, className, node, rowKey, slots, state, classNames, ...otherProps } = props;\n  const Component = as || \"td\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { gridCellProps } = useTableCell({ node }, state, domRef);\n  const tdStyles = clsx(classNames == null ? void 0 : classNames.td, className, (_a = node.props) == null ? void 0 : _a.className);\n  const { isFocusVisible, focusProps } = useFocusRing();\n  const isRowSelected = state.selectionManager.isSelected(rowKey);\n  const cell = useMemo(() => {\n    const cellType = typeof node.rendered;\n    return cellType !== \"object\" && cellType !== \"function\" ? /* @__PURE__ */ jsx(\"span\", { children: node.rendered }) : node.rendered;\n  }, [node.rendered]);\n  const columnProps = ((_b = node.column) == null ? void 0 : _b.props) || {};\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-selected\": dataAttr(isRowSelected),\n      ...mergeProps(\n        gridCellProps,\n        focusProps,\n        filterDOMProps(node.props, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_c = slots.td) == null ? void 0 : _c.call(slots, { align: columnProps.align, class: tdStyles }),\n      children: cell\n    }\n  );\n});\nTableCell.displayName = \"HeroUI.TableCell\";\nvar table_cell_default = TableCell;\n\nexport {\n  table_cell_default\n};\n","\"use client\";\n\n// src/table-checkbox-cell.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableCell, useTableSelectionCheckbox } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { Checkbox } from \"@heroui/checkbox\";\nimport { VisuallyHidden } from \"@react-aria/visually-hidden\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableCheckboxCell = forwardRef((props, ref) => {\n  var _a, _b;\n  const {\n    as,\n    className,\n    node,\n    rowKey,\n    slots,\n    state,\n    color,\n    disableAnimation,\n    checkboxesProps,\n    selectionMode,\n    classNames,\n    ...otherProps\n  } = props;\n  const Component = as || \"td\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { gridCellProps } = useTableCell({ node }, state, domRef);\n  const { isFocusVisible, focusProps } = useFocusRing();\n  const { checkboxProps } = useTableSelectionCheckbox({ key: (node == null ? void 0 : node.parentKey) || node.key }, state);\n  const tdStyles = clsx(classNames == null ? void 0 : classNames.td, className, (_a = node.props) == null ? void 0 : _a.className);\n  const isSingleSelectionMode = selectionMode === \"single\";\n  const { onChange, ...otherCheckboxProps } = checkboxProps;\n  const isRowSelected = state.selectionManager.isSelected(rowKey);\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-selected\": dataAttr(isRowSelected),\n      ...mergeProps(\n        gridCellProps,\n        focusProps,\n        filterDOMProps(node.props, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_b = slots.td) == null ? void 0 : _b.call(slots, { class: tdStyles }),\n      children: isSingleSelectionMode ? /* @__PURE__ */ jsx(VisuallyHidden, { children: checkboxProps[\"aria-label\"] }) : /* @__PURE__ */ jsx(\n        Checkbox,\n        {\n          color,\n          disableAnimation,\n          onValueChange: onChange,\n          ...mergeProps(checkboxesProps, otherCheckboxProps)\n        }\n      )\n    }\n  );\n});\nTableCheckboxCell.displayName = \"HeroUI.TableCheckboxCell\";\nvar table_checkbox_cell_default = TableCheckboxCell;\n\nexport {\n  table_checkbox_cell_default\n};\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n  return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n  el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n  if (el && 'window' in el && el.window === el) {\n    return el;\n  }\n\n  const doc = getOwnerDocument(el as Element | null | undefined);\n  return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n  return value !== null &&\n    typeof value === 'object' &&\n    'nodeType' in value &&\n    typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n  return isNode(node) &&\n    node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    'host' in node;\n}\n","// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n  node: Node | null | undefined,\n  otherNode: Node | null | undefined\n): boolean {\n  if (!shadowDOM()) {\n    return otherNode && node ? node.contains(otherNode) : false;\n  }\n\n  if (!node || !otherNode) {\n    return false;\n  }\n\n  let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n  while (currentNode !== null) {\n    if (currentNode === node) {\n      return true;\n    }\n\n    if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n      (currentNode as HTMLSlotElement).assignedSlot) {\n      // Element is slotted\n      currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n    } else if (isShadowRoot(currentNode)) {\n      // Element is in shadow root\n      currentNode = currentNode.host;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n  if (!shadowDOM()) {\n    return doc.activeElement;\n  }\n  let activeElement: Element | null = doc.activeElement;\n\n  while (activeElement && 'shadowRoot' in activeElement &&\n  activeElement.shadowRoot?.activeElement) {\n    activeElement = activeElement.shadowRoot.activeElement;\n  }\n\n  return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n  if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n    if (event.composedPath) {\n      return event.composedPath()[0] as Element;\n    }\n  }\n  return event.target as Element;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof WindowEventMap>(el: Window, type: K, listener: (this: Document, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, fn, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n   \n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {DOMAttributes, HoverEvents} from '@react-types/shared';\nimport {getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface HoverProps extends HoverEvents {\n  /** Whether the hover events should be disabled. */\n  isDisabled?: boolean\n}\n\nexport interface HoverResult {\n  /** Props to spread on the target element. */\n  hoverProps: DOMAttributes,\n  isHovered: boolean\n}\n\n// iOS fires onPointerEnter twice: once with pointerType=\"touch\" and again with pointerType=\"mouse\".\n// We want to ignore these emulated events so they do not trigger hover behavior.\n// See https://bugs.webkit.org/show_bug.cgi?id=214609.\nlet globalIgnoreEmulatedMouseEvents = false;\nlet hoverCount = 0;\n\nfunction setGlobalIgnoreEmulatedMouseEvents() {\n  globalIgnoreEmulatedMouseEvents = true;\n\n  // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n  // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n  // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n  // the distant future because a user previously touched the element.\n  setTimeout(() => {\n    globalIgnoreEmulatedMouseEvents = false;\n  }, 50);\n}\n\nfunction handleGlobalPointerEvent(e) {\n  if (e.pointerType === 'touch') {\n    setGlobalIgnoreEmulatedMouseEvents();\n  }\n}\n\nfunction setupGlobalTouchEvents() {\n  if (typeof document === 'undefined') {\n    return;\n  }\n\n  if (typeof PointerEvent !== 'undefined') {\n    document.addEventListener('pointerup', handleGlobalPointerEvent);\n  } else if (process.env.NODE_ENV === 'test') {\n    document.addEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n  }\n\n  hoverCount++;\n  return () => {\n    hoverCount--;\n    if (hoverCount > 0) {\n      return;\n    }\n\n    if (typeof PointerEvent !== 'undefined') {\n      document.removeEventListener('pointerup', handleGlobalPointerEvent);\n    } else if (process.env.NODE_ENV === 'test') {\n      document.removeEventListener('touchend', setGlobalIgnoreEmulatedMouseEvents);\n    }\n  };\n}\n\n/**\n * Handles pointer hover interactions for an element. Normalizes behavior\n * across browsers and platforms, and ignores emulated mouse events on touch devices.\n */\nexport function useHover(props: HoverProps): HoverResult {\n  let {\n    onHoverStart,\n    onHoverChange,\n    onHoverEnd,\n    isDisabled\n  } = props;\n\n  let [isHovered, setHovered] = useState(false);\n  let state = useRef({\n    isHovered: false,\n    ignoreEmulatedMouseEvents: false,\n    pointerType: '',\n    target: null\n  }).current;\n\n  useEffect(setupGlobalTouchEvents, []);\n  let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n  let {hoverProps, triggerHoverEnd} = useMemo(() => {\n    let triggerHoverStart = (event, pointerType) => {\n      state.pointerType = pointerType;\n      if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) {\n        return;\n      }\n\n      state.isHovered = true;\n      let target = event.currentTarget;\n      state.target = target;\n\n      // When an element that is hovered over is removed, no pointerleave event is fired by the browser,\n      // even though the originally hovered target may have shrunk in size so it is no longer hovered.\n      // However, a pointerover event will be fired on the new target the mouse is over.\n      // In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.\n      addGlobalListener(getOwnerDocument(event.target), 'pointerover', e => {\n        if (state.isHovered && state.target && !nodeContains(state.target, e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      }, {capture: true});\n\n      if (onHoverStart) {\n        onHoverStart({\n          type: 'hoverstart',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(true);\n      }\n\n      setHovered(true);\n    };\n\n    let triggerHoverEnd = (event, pointerType) => {\n      let target = state.target;\n      state.pointerType = '';\n      state.target = null;\n\n      if (pointerType === 'touch' || !state.isHovered || !target) {\n        return;\n      }\n\n      state.isHovered = false;\n      removeAllGlobalListeners();\n\n      if (onHoverEnd) {\n        onHoverEnd({\n          type: 'hoverend',\n          target,\n          pointerType\n        });\n      }\n\n      if (onHoverChange) {\n        onHoverChange(false);\n      }\n\n      setHovered(false);\n    };\n\n    let hoverProps: DOMAttributes = {};\n\n    if (typeof PointerEvent !== 'undefined') {\n      hoverProps.onPointerEnter = (e) => {\n        if (globalIgnoreEmulatedMouseEvents && e.pointerType === 'mouse') {\n          return;\n        }\n\n        triggerHoverStart(e, e.pointerType);\n      };\n\n      hoverProps.onPointerLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, e.pointerType);\n        }\n      };\n    } else if (process.env.NODE_ENV === 'test') {\n      hoverProps.onTouchStart = () => {\n        state.ignoreEmulatedMouseEvents = true;\n      };\n\n      hoverProps.onMouseEnter = (e) => {\n        if (!state.ignoreEmulatedMouseEvents && !globalIgnoreEmulatedMouseEvents) {\n          triggerHoverStart(e, 'mouse');\n        }\n\n        state.ignoreEmulatedMouseEvents = false;\n      };\n\n      hoverProps.onMouseLeave = (e) => {\n        if (!isDisabled && e.currentTarget.contains(e.target as Element)) {\n          triggerHoverEnd(e, 'mouse');\n        }\n      };\n    }\n    return {hoverProps, triggerHoverEnd};\n  }, [onHoverStart, onHoverChange, onHoverEnd, isDisabled, state, addGlobalListener, removeAllGlobalListeners]);\n\n  useEffect(() => {\n    // Call the triggerHoverEnd as soon as isDisabled changes to true\n    // Safe to call triggerHoverEnd, it will early return if we aren't currently hovering\n    if (isDisabled) {\n      triggerHoverEnd({currentTarget: state.target}, state.pointerType);\n    }\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isDisabled]);\n\n  return {\n    hoverProps,\n    isHovered\n  };\n}\n","\"use client\";\n\n// src/table-row.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableRow } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { useHover } from \"@react-aria/interactions\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableRow = forwardRef((props, ref) => {\n  var _a, _b;\n  const { as, className, children, node, slots, state, isSelectable, classNames, ...otherProps } = props;\n  const Component = as || ((props == null ? void 0 : props.href) ? \"a\" : \"tr\");\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { rowProps } = useTableRow({ node }, state, domRef);\n  const trStyles = clsx(classNames == null ? void 0 : classNames.tr, className, (_a = node.props) == null ? void 0 : _a.className);\n  const { isFocusVisible, focusProps } = useFocusRing();\n  const isDisabled = state.disabledKeys.has(node.key);\n  const isSelected = state.selectionManager.isSelected(node.key);\n  const { isHovered, hoverProps } = useHover({ isDisabled });\n  const { isFirst, isLast, isMiddle, isOdd } = useMemo(() => {\n    const isFirst2 = node.key === state.collection.getFirstKey();\n    const isLast2 = node.key === state.collection.getLastKey();\n    const isMiddle2 = !isFirst2 && !isLast2;\n    const isOdd2 = (node == null ? void 0 : node.index) ? (node.index + 1) % 2 === 0 : false;\n    return {\n      isFirst: isFirst2,\n      isLast: isLast2,\n      isMiddle: isMiddle2,\n      isOdd: isOdd2\n    };\n  }, [node, state.collection]);\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      \"data-disabled\": dataAttr(isDisabled),\n      \"data-first\": dataAttr(isFirst),\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-hover\": dataAttr(isHovered),\n      \"data-last\": dataAttr(isLast),\n      \"data-middle\": dataAttr(isMiddle),\n      \"data-odd\": dataAttr(isOdd),\n      \"data-selected\": dataAttr(isSelected),\n      ...mergeProps(\n        rowProps,\n        focusProps,\n        isSelectable ? hoverProps : {},\n        filterDOMProps(node.props, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_b = slots.tr) == null ? void 0 : _b.call(slots, { class: trStyles }),\n      children\n    }\n  );\n});\nTableRow.displayName = \"HeroUI.TableRow\";\nvar table_row_default = TableRow;\n\nexport {\n  table_row_default\n};\n","\"use client\";\nimport {\n  table_cell_default\n} from \"./chunk-S6V3WGEL.mjs\";\nimport {\n  table_checkbox_cell_default\n} from \"./chunk-UGS3DB5V.mjs\";\nimport {\n  table_row_default\n} from \"./chunk-N22KOF64.mjs\";\n\n// src/virtualized-table-body.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableRowGroup } from \"@react-aria/table\";\nimport { filterDOMProps } from \"@heroui/react-utils\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar VirtualizedTableBody = forwardRef((props, ref) => {\n  var _a;\n  const {\n    as,\n    className,\n    slots,\n    state,\n    collection,\n    isSelectable,\n    color,\n    disableAnimation,\n    checkboxesProps,\n    selectionMode,\n    classNames,\n    rowVirtualizer,\n    ...otherProps\n  } = props;\n  const Component = as || \"tbody\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { rowGroupProps } = useTableRowGroup();\n  const tbodyStyles = clsx(classNames == null ? void 0 : classNames.tbody, className);\n  const bodyProps = collection == null ? void 0 : collection.body.props;\n  const isLoading = (bodyProps == null ? void 0 : bodyProps.isLoading) || (bodyProps == null ? void 0 : bodyProps.loadingState) === \"loading\" || (bodyProps == null ? void 0 : bodyProps.loadingState) === \"loadingMore\";\n  const items = [...collection.body.childNodes];\n  const virtualItems = rowVirtualizer.getVirtualItems();\n  let emptyContent;\n  let loadingContent;\n  if (collection.size === 0 && bodyProps.emptyContent) {\n    emptyContent = /* @__PURE__ */ jsx(\"tr\", { role: \"row\", children: /* @__PURE__ */ jsx(\n      \"td\",\n      {\n        className: slots == null ? void 0 : slots.emptyWrapper({ class: classNames == null ? void 0 : classNames.emptyWrapper }),\n        colSpan: collection.columnCount,\n        role: \"gridcell\",\n        children: !isLoading && bodyProps.emptyContent\n      }\n    ) });\n  }\n  if (isLoading && bodyProps.loadingContent) {\n    loadingContent = /* @__PURE__ */ jsxs(\"tr\", { role: \"row\", children: [\n      /* @__PURE__ */ jsx(\n        \"td\",\n        {\n          className: slots == null ? void 0 : slots.loadingWrapper({ class: classNames == null ? void 0 : classNames.loadingWrapper }),\n          colSpan: collection.columnCount,\n          role: \"gridcell\",\n          children: bodyProps.loadingContent\n        }\n      ),\n      !emptyContent && collection.size === 0 ? /* @__PURE__ */ jsx(\"td\", { className: slots == null ? void 0 : slots.emptyWrapper({ class: classNames == null ? void 0 : classNames.emptyWrapper }) }) : null\n    ] });\n  }\n  return /* @__PURE__ */ jsxs(\n    Component,\n    {\n      ref: domRef,\n      ...mergeProps(\n        rowGroupProps,\n        filterDOMProps(bodyProps, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_a = slots.tbody) == null ? void 0 : _a.call(slots, { class: tbodyStyles }),\n      \"data-empty\": dataAttr(collection.size === 0),\n      \"data-loading\": dataAttr(isLoading),\n      children: [\n        virtualItems.map((virtualRow, index) => {\n          const row = items[virtualRow.index];\n          if (!row) {\n            return null;\n          }\n          return /* @__PURE__ */ jsx(\n            table_row_default,\n            {\n              classNames,\n              isSelectable,\n              node: row,\n              slots,\n              state,\n              style: {\n                transform: `translateY(${virtualRow.start - index * virtualRow.size}px)`,\n                height: `${virtualRow.size}px`\n              },\n              children: [...row.childNodes].map(\n                (cell) => cell.props.isSelectionCell ? /* @__PURE__ */ jsx(\n                  table_checkbox_cell_default,\n                  {\n                    checkboxesProps,\n                    classNames,\n                    color,\n                    disableAnimation,\n                    node: cell,\n                    rowKey: row.key,\n                    selectionMode,\n                    slots,\n                    state\n                  },\n                  String(cell.key)\n                ) : /* @__PURE__ */ jsx(\n                  table_cell_default,\n                  {\n                    classNames,\n                    node: cell,\n                    rowKey: row.key,\n                    slots,\n                    state\n                  },\n                  String(cell.key)\n                )\n              )\n            },\n            String(row.key)\n          );\n        }),\n        loadingContent,\n        emptyContent\n      ]\n    }\n  );\n});\nVirtualizedTableBody.displayName = \"HeroUI.VirtualizedTableBody\";\nvar virtualized_table_body_default = VirtualizedTableBody;\n\nexport {\n  virtualized_table_body_default\n};\n","\"use client\";\n\n// src/table-column-header.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableColumnHeader } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { ChevronDownIcon } from \"@heroui/shared-icons\";\nimport { useFocusRing } from \"@react-aria/focus\";\nimport { VisuallyHidden } from \"@react-aria/visually-hidden\";\nimport { useHover } from \"@react-aria/interactions\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar TableColumnHeader = forwardRef((props, ref) => {\n  var _a, _b, _c, _d, _e;\n  const { as, className, state, node, slots, classNames, ...otherProps } = props;\n  const Component = as || \"th\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { columnHeaderProps } = useTableColumnHeader({ node }, state, domRef);\n  const thStyles = clsx(classNames == null ? void 0 : classNames.th, className, (_a = node.props) == null ? void 0 : _a.className);\n  const { isFocusVisible, focusProps } = useFocusRing();\n  const { isHovered, hoverProps } = useHover({});\n  const { hideHeader, align, ...columnProps } = node.props;\n  const allowsSorting = columnProps.allowsSorting;\n  return /* @__PURE__ */ jsxs(\n    Component,\n    {\n      ref: domRef,\n      colSpan: node.colspan,\n      \"data-focus-visible\": dataAttr(isFocusVisible),\n      \"data-hover\": dataAttr(isHovered),\n      \"data-sortable\": dataAttr(allowsSorting),\n      ...mergeProps(\n        columnHeaderProps,\n        focusProps,\n        filterDOMProps(columnProps, {\n          enabled: shouldFilterDOMProps\n        }),\n        allowsSorting ? hoverProps : {},\n        otherProps\n      ),\n      className: (_b = slots.th) == null ? void 0 : _b.call(slots, { align, class: thStyles }),\n      children: [\n        hideHeader ? /* @__PURE__ */ jsx(VisuallyHidden, { children: node.rendered }) : node.rendered,\n        allowsSorting && /* @__PURE__ */ jsx(\n          ChevronDownIcon,\n          {\n            \"aria-hidden\": \"true\",\n            className: (_c = slots.sortIcon) == null ? void 0 : _c.call(slots, { class: classNames == null ? void 0 : classNames.sortIcon }),\n            \"data-direction\": (_d = state.sortDescriptor) == null ? void 0 : _d.direction,\n            \"data-visible\": dataAttr(((_e = state.sortDescriptor) == null ? void 0 : _e.column) === node.key),\n            strokeWidth: 3\n          }\n        )\n      ]\n    }\n  );\n});\nTableColumnHeader.displayName = \"HeroUI.TableColumnHeader\";\nvar table_column_header_default = TableColumnHeader;\n\nexport {\n  table_column_header_default\n};\n","\"use client\";\n\n// src/table-header-row.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef, filterDOMProps } from \"@heroui/react-utils\";\nimport { clsx } from \"@heroui/shared-utils\";\nimport { useTableHeaderRow } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableHeaderRow = forwardRef((props, ref) => {\n  var _a, _b;\n  const { as, className, children, node, slots, classNames, state, ...otherProps } = props;\n  const Component = as || \"tr\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { rowProps } = useTableHeaderRow({ node }, state, domRef);\n  const trStyles = clsx(classNames == null ? void 0 : classNames.tr, className, (_a = node.props) == null ? void 0 : _a.className);\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      ...mergeProps(\n        rowProps,\n        filterDOMProps(node.props, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_b = slots.tr) == null ? void 0 : _b.call(slots, { class: trStyles }),\n      children\n    }\n  );\n});\nTableHeaderRow.displayName = \"HeroUI.TableHeaderRow\";\nvar table_header_row_default = TableHeaderRow;\n\nexport {\n  table_header_row_default\n};\n","\"use client\";\n\n// src/table-row-group.tsx\nimport { forwardRef } from \"react\";\nimport { useDOMRef } from \"@heroui/react-utils\";\nimport { clsx } from \"@heroui/shared-utils\";\nimport { useTableRowGroup } from \"@react-aria/table\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TableRowGroup = forwardRef((props, ref) => {\n  var _a;\n  const { as, className, children, slots, classNames, ...otherProps } = props;\n  const Component = as || \"thead\";\n  const domRef = useDOMRef(ref);\n  const { rowGroupProps } = useTableRowGroup();\n  const theadStyles = clsx(classNames == null ? void 0 : classNames.thead, className);\n  return /* @__PURE__ */ jsx(\n    Component,\n    {\n      ref: domRef,\n      className: (_a = slots.thead) == null ? void 0 : _a.call(slots, { class: theadStyles }),\n      ...mergeProps(rowGroupProps, otherProps),\n      children\n    }\n  );\n});\nTableRowGroup.displayName = \"HeroUI.TableRowGroup\";\nvar table_row_group_default = TableRowGroup;\n\nexport {\n  table_row_group_default\n};\n","\"use client\";\nimport {\n  table_select_all_checkbox_default\n} from \"./chunk-PRBPVC6X.mjs\";\nimport {\n  useTable\n} from \"./chunk-6P56MRLR.mjs\";\nimport {\n  virtualized_table_body_default\n} from \"./chunk-RBALAGDS.mjs\";\nimport {\n  table_column_header_default\n} from \"./chunk-PZT4K2LB.mjs\";\nimport {\n  table_header_row_default\n} from \"./chunk-V2BF6S4T.mjs\";\nimport {\n  table_row_group_default\n} from \"./chunk-DVOW65RZ.mjs\";\n\n// src/virtualized-table.tsx\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\nimport { Spacer } from \"@heroui/spacer\";\nimport { forwardRef } from \"@heroui/system\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar VirtualizedTable = forwardRef((props, ref) => {\n  const {\n    BaseComponent,\n    Component,\n    collection,\n    values,\n    topContent,\n    topContentPlacement,\n    bottomContentPlacement,\n    bottomContent,\n    removeWrapper,\n    getBaseProps,\n    getWrapperProps,\n    getTableProps\n  } = useTable({\n    ...props,\n    ref\n  });\n  const { rowHeight = 40, maxTableHeight = 600 } = props;\n  const Wrapper = useCallback(\n    ({ children }) => {\n      if (removeWrapper) {\n        return children;\n      }\n      return /* @__PURE__ */ jsx(\n        BaseComponent,\n        {\n          ...getWrapperProps(),\n          ref: parentRef,\n          style: { height: maxTableHeight, display: \"block\" },\n          children\n        }\n      );\n    },\n    [removeWrapper, getWrapperProps, maxTableHeight]\n  );\n  const items = [...collection.body.childNodes];\n  const count = items.length;\n  const parentRef = useRef(null);\n  const [headerHeight, setHeaderHeight] = useState(0);\n  const headerRef = useRef(null);\n  useLayoutEffect(() => {\n    if (headerRef.current) {\n      setHeaderHeight(headerRef.current.getBoundingClientRect().height);\n    }\n  }, [headerRef]);\n  const rowVirtualizer = useVirtualizer({\n    count,\n    getScrollElement: () => parentRef.current,\n    estimateSize: () => rowHeight,\n    overscan: 5\n  });\n  const tableProps = getTableProps();\n  return /* @__PURE__ */ jsxs(\"div\", { ...getBaseProps(), children: [\n    topContentPlacement === \"outside\" && topContent,\n    /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsxs(Fragment, { children: [\n      topContentPlacement === \"inside\" && topContent,\n      /* @__PURE__ */ jsxs(\n        Component,\n        {\n          ...tableProps,\n          style: {\n            height: `calc(${rowVirtualizer.getTotalSize() + headerHeight}px)`,\n            ...tableProps.style\n          },\n          children: [\n            /* @__PURE__ */ jsxs(table_row_group_default, { ref: headerRef, classNames: values.classNames, slots: values.slots, children: [\n              collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx(\n                table_header_row_default,\n                {\n                  classNames: values.classNames,\n                  node: headerRow,\n                  slots: values.slots,\n                  state: values.state,\n                  children: [...headerRow.childNodes].map(\n                    (column) => {\n                      var _a;\n                      return ((_a = column == null ? void 0 : column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx(\n                        table_select_all_checkbox_default,\n                        {\n                          checkboxesProps: values.checkboxesProps,\n                          classNames: values.classNames,\n                          color: values.color,\n                          disableAnimation: values.disableAnimation,\n                          node: column,\n                          selectionMode: values.selectionMode,\n                          slots: values.slots,\n                          state: values.state\n                        },\n                        column == null ? void 0 : column.key\n                      ) : /* @__PURE__ */ jsx(\n                        table_column_header_default,\n                        {\n                          classNames: values.classNames,\n                          node: column,\n                          slots: values.slots,\n                          state: values.state\n                        },\n                        column == null ? void 0 : column.key\n                      );\n                    }\n                  )\n                },\n                headerRow == null ? void 0 : headerRow.key\n              )),\n              /* @__PURE__ */ jsx(Spacer, { as: \"tr\", tabIndex: -1, y: 1 })\n            ] }),\n            /* @__PURE__ */ jsx(\n              virtualized_table_body_default,\n              {\n                checkboxesProps: values.checkboxesProps,\n                classNames: values.classNames,\n                collection: values.collection,\n                color: values.color,\n                disableAnimation: values.disableAnimation,\n                isSelectable: values.isSelectable,\n                rowVirtualizer,\n                selectionMode: values.selectionMode,\n                slots: values.slots,\n                state: values.state\n              }\n            )\n          ]\n        }\n      ),\n      bottomContentPlacement === \"inside\" && bottomContent\n    ] }) }),\n    bottomContentPlacement === \"outside\" && bottomContent\n  ] });\n});\nVirtualizedTable.displayName = \"HeroUI.VirtualizedTable\";\nvar virtualized_table_default = VirtualizedTable;\n\nexport {\n  virtualized_table_default\n};\n","// src/utils.ts\nvar spacing = {\n  px: \"1px\",\n  0: \"0px\",\n  0.5: \"0.125rem\",\n  1: \"0.25rem\",\n  1.5: \"0.375rem\",\n  2: \"0.5rem\",\n  2.5: \"0.625rem\",\n  3: \"0.75rem\",\n  3.5: \"0.875rem\",\n  4: \"1rem\",\n  5: \"1.25rem\",\n  6: \"1.5rem\",\n  7: \"1.75rem\",\n  8: \"2rem\",\n  9: \"2.25rem\",\n  10: \"2.5rem\",\n  11: \"2.75rem\",\n  12: \"3rem\",\n  14: \"3.5rem\",\n  16: \"4rem\",\n  20: \"5rem\",\n  24: \"6rem\",\n  28: \"7rem\",\n  32: \"8rem\",\n  36: \"9rem\",\n  40: \"10rem\",\n  44: \"11rem\",\n  48: \"12rem\",\n  52: \"13rem\",\n  56: \"14rem\",\n  60: \"15rem\",\n  64: \"16rem\",\n  72: \"18rem\",\n  80: \"20rem\",\n  96: \"24rem\"\n};\n\nexport {\n  spacing\n};\n","import {\n  spacing\n} from \"./chunk-CH7FQ62Q.mjs\";\n\n// src/use-spacer.ts\nimport { mapPropsVariants } from \"@heroui/system-rsc\";\nimport { spacer } from \"@heroui/theme\";\nimport { clsx, dataAttr, objectToDeps } from \"@heroui/shared-utils\";\nimport { useMemo } from \"react\";\nvar getMargin = (value) => {\n  var _a;\n  return (_a = spacing[value]) != null ? _a : value;\n};\nfunction useSpacer(originalProps) {\n  const [props, variantProps] = mapPropsVariants(originalProps, spacer.variantKeys);\n  const { as, className, x = 1, y = 1, ...otherProps } = props;\n  const Component = as || \"span\";\n  const styles = useMemo(\n    () => spacer({\n      ...variantProps,\n      className\n    }),\n    [objectToDeps(variantProps), className]\n  );\n  const marginLeft = getMargin(x);\n  const marginTop = getMargin(y);\n  const getSpacerProps = (props2 = {}) => ({\n    ...props2,\n    ...otherProps,\n    \"aria-hidden\": dataAttr(true),\n    className: clsx(styles, props2.className),\n    style: {\n      ...props2.style,\n      ...otherProps.style,\n      marginLeft,\n      marginTop\n    }\n  });\n  return { Component, getSpacerProps };\n}\n\nexport {\n  getMargin,\n  useSpacer\n};\n","import {\n  useSpacer\n} from \"./chunk-BRFD4NXM.mjs\";\n\n// src/spacer.tsx\nimport { forwardRef } from \"@heroui/system-rsc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Spacer = forwardRef((props, ref) => {\n  const { Component, getSpacerProps } = useSpacer({ ...props });\n  return /* @__PURE__ */ jsx(Component, { ref, ...getSpacerProps() });\n});\nSpacer.displayName = \"HeroUI.Spacer\";\nvar spacer_default = Spacer;\n\nexport {\n  spacer_default\n};\n","export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n  getDeps: () => [...TDeps],\n  fn: (...args: NoInfer<[...TDeps]>) => TResult,\n  opts: {\n    key: false | string\n    debug?: () => boolean\n    onChange?: (result: TResult) => void\n    initialDeps?: TDeps\n  },\n) {\n  let deps = opts.initialDeps ?? []\n  let result: TResult | undefined\n\n  return (): TResult => {\n    let depTime: number\n    if (opts.key && opts.debug?.()) depTime = Date.now()\n\n    const newDeps = getDeps()\n\n    const depsChanged =\n      newDeps.length !== deps.length ||\n      newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n    if (!depsChanged) {\n      return result!\n    }\n\n    deps = newDeps\n\n    let resultTime: number\n    if (opts.key && opts.debug?.()) resultTime = Date.now()\n\n    result = fn(...newDeps)\n\n    if (opts.key && opts.debug?.()) {\n      const depEndTime = Math.round((Date.now() - depTime!) * 100) / 100\n      const resultEndTime = Math.round((Date.now() - resultTime!) * 100) / 100\n      const resultFpsPercentage = resultEndTime / 16\n\n      const pad = (str: number | string, num: number) => {\n        str = String(str)\n        while (str.length < num) {\n          str = ' ' + str\n        }\n        return str\n      }\n\n      console.info(\n        `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n        `\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(\n              0,\n              Math.min(120 - 120 * resultFpsPercentage, 120),\n            )}deg 100% 31%);`,\n        opts?.key,\n      )\n    }\n\n    opts?.onChange?.(result)\n\n    return result\n  }\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n  if (value === undefined) {\n    throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n  } else {\n    return value\n  }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1\n\nexport const debounce = (\n  targetWindow: Window & typeof globalThis,\n  fn: Function,\n  ms: number,\n) => {\n  let timeoutId: number\n  return function (this: any, ...args: Array<any>) {\n    targetWindow.clearTimeout(timeoutId)\n    timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n  }\n}\n","import { approxEqual, debounce, memo, notUndefined } from './utils'\n\nexport * from './utils'\n\n//\n\ntype ScrollDirection = 'forward' | 'backward'\n\ntype ScrollAlignment = 'start' | 'center' | 'end' | 'auto'\n\ntype ScrollBehavior = 'auto' | 'smooth'\n\nexport interface ScrollToOptions {\n  align?: ScrollAlignment\n  behavior?: ScrollBehavior\n}\n\ntype ScrollToOffsetOptions = ScrollToOptions\n\ntype ScrollToIndexOptions = ScrollToOptions\n\nexport interface Range {\n  startIndex: number\n  endIndex: number\n  overscan: number\n  count: number\n}\n\ntype Key = number | string | bigint\n\nexport interface VirtualItem {\n  key: Key\n  index: number\n  start: number\n  end: number\n  size: number\n  lane: number\n}\n\nexport interface Rect {\n  width: number\n  height: number\n}\n\n//\n\nexport const defaultKeyExtractor = (index: number) => index\n\nexport const defaultRangeExtractor = (range: Range) => {\n  const start = Math.max(range.startIndex - range.overscan, 0)\n  const end = Math.min(range.endIndex + range.overscan, range.count - 1)\n\n  const arr = []\n\n  for (let i = start; i <= end; i++) {\n    arr.push(i)\n  }\n\n  return arr\n}\n\nexport const observeElementRect = <T extends Element>(\n  instance: Virtualizer<T, any>,\n  cb: (rect: Rect) => void,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n  const targetWindow = instance.targetWindow\n  if (!targetWindow) {\n    return\n  }\n\n  const handler = (rect: Rect) => {\n    const { width, height } = rect\n    cb({ width: Math.round(width), height: Math.round(height) })\n  }\n\n  handler(element.getBoundingClientRect())\n\n  if (!targetWindow.ResizeObserver) {\n    return () => {}\n  }\n\n  const observer = new targetWindow.ResizeObserver((entries) => {\n    const entry = entries[0]\n    if (entry?.borderBoxSize) {\n      const box = entry.borderBoxSize[0]\n      if (box) {\n        handler({ width: box.inlineSize, height: box.blockSize })\n        return\n      }\n    }\n    handler(element.getBoundingClientRect())\n  })\n\n  observer.observe(element, { box: 'border-box' })\n\n  return () => {\n    observer.unobserve(element)\n  }\n}\n\nconst addEventListenerOptions = {\n  passive: true,\n}\n\nexport const observeWindowRect = (\n  instance: Virtualizer<Window, any>,\n  cb: (rect: Rect) => void,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n\n  const handler = () => {\n    cb({ width: element.innerWidth, height: element.innerHeight })\n  }\n  handler()\n\n  element.addEventListener('resize', handler, addEventListenerOptions)\n\n  return () => {\n    element.removeEventListener('resize', handler)\n  }\n}\n\nconst supportsScrollend =\n  typeof window == 'undefined' ? true : 'onscrollend' in window\n\ntype ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void\n\nexport const observeElementOffset = <T extends Element>(\n  instance: Virtualizer<T, any>,\n  cb: ObserveOffsetCallBack,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n  const targetWindow = instance.targetWindow\n  if (!targetWindow) {\n    return\n  }\n\n  let offset = 0\n  const fallback =\n    instance.options.useScrollendEvent && supportsScrollend\n      ? () => undefined\n      : debounce(\n          targetWindow,\n          () => {\n            cb(offset, false)\n          },\n          instance.options.isScrollingResetDelay,\n        )\n\n  const createHandler = (isScrolling: boolean) => () => {\n    const { horizontal, isRtl } = instance.options\n    offset = horizontal\n      ? element['scrollLeft'] * ((isRtl && -1) || 1)\n      : element['scrollTop']\n    fallback()\n    cb(offset, isScrolling)\n  }\n  const handler = createHandler(true)\n  const endHandler = createHandler(false)\n  endHandler()\n\n  element.addEventListener('scroll', handler, addEventListenerOptions)\n  element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n  return () => {\n    element.removeEventListener('scroll', handler)\n    element.removeEventListener('scrollend', endHandler)\n  }\n}\n\nexport const observeWindowOffset = (\n  instance: Virtualizer<Window, any>,\n  cb: ObserveOffsetCallBack,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n  const targetWindow = instance.targetWindow\n  if (!targetWindow) {\n    return\n  }\n\n  let offset = 0\n  const fallback =\n    instance.options.useScrollendEvent && supportsScrollend\n      ? () => undefined\n      : debounce(\n          targetWindow,\n          () => {\n            cb(offset, false)\n          },\n          instance.options.isScrollingResetDelay,\n        )\n\n  const createHandler = (isScrolling: boolean) => () => {\n    offset = element[instance.options.horizontal ? 'scrollX' : 'scrollY']\n    fallback()\n    cb(offset, isScrolling)\n  }\n  const handler = createHandler(true)\n  const endHandler = createHandler(false)\n  endHandler()\n\n  element.addEventListener('scroll', handler, addEventListenerOptions)\n  element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n  return () => {\n    element.removeEventListener('scroll', handler)\n    element.removeEventListener('scrollend', endHandler)\n  }\n}\n\nexport const measureElement = <TItemElement extends Element>(\n  element: TItemElement,\n  entry: ResizeObserverEntry | undefined,\n  instance: Virtualizer<any, TItemElement>,\n) => {\n  if (entry?.borderBoxSize) {\n    const box = entry.borderBoxSize[0]\n    if (box) {\n      const size = Math.round(\n        box[instance.options.horizontal ? 'inlineSize' : 'blockSize'],\n      )\n      return size\n    }\n  }\n  return Math.round(\n    element.getBoundingClientRect()[\n      instance.options.horizontal ? 'width' : 'height'\n    ],\n  )\n}\n\nexport const windowScroll = <T extends Window>(\n  offset: number,\n  {\n    adjustments = 0,\n    behavior,\n  }: { adjustments?: number; behavior?: ScrollBehavior },\n  instance: Virtualizer<T, any>,\n) => {\n  const toOffset = offset + adjustments\n\n  instance.scrollElement?.scrollTo?.({\n    [instance.options.horizontal ? 'left' : 'top']: toOffset,\n    behavior,\n  })\n}\n\nexport const elementScroll = <T extends Element>(\n  offset: number,\n  {\n    adjustments = 0,\n    behavior,\n  }: { adjustments?: number; behavior?: ScrollBehavior },\n  instance: Virtualizer<T, any>,\n) => {\n  const toOffset = offset + adjustments\n\n  instance.scrollElement?.scrollTo?.({\n    [instance.options.horizontal ? 'left' : 'top']: toOffset,\n    behavior,\n  })\n}\n\nexport interface VirtualizerOptions<\n  TScrollElement extends Element | Window,\n  TItemElement extends Element,\n> {\n  // Required from the user\n  count: number\n  getScrollElement: () => TScrollElement | null\n  estimateSize: (index: number) => number\n\n  // Required from the framework adapter (but can be overridden)\n  scrollToFn: (\n    offset: number,\n    options: { adjustments?: number; behavior?: ScrollBehavior },\n    instance: Virtualizer<TScrollElement, TItemElement>,\n  ) => void\n  observeElementRect: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    cb: (rect: Rect) => void,\n  ) => void | (() => void)\n  observeElementOffset: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    cb: ObserveOffsetCallBack,\n  ) => void | (() => void)\n  // Optional\n  debug?: boolean\n  initialRect?: Rect\n  onChange?: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    sync: boolean,\n  ) => void\n  measureElement?: (\n    element: TItemElement,\n    entry: ResizeObserverEntry | undefined,\n    instance: Virtualizer<TScrollElement, TItemElement>,\n  ) => number\n  overscan?: number\n  horizontal?: boolean\n  paddingStart?: number\n  paddingEnd?: number\n  scrollPaddingStart?: number\n  scrollPaddingEnd?: number\n  initialOffset?: number | (() => number)\n  getItemKey?: (index: number) => Key\n  rangeExtractor?: (range: Range) => Array<number>\n  scrollMargin?: number\n  gap?: number\n  indexAttribute?: string\n  initialMeasurementsCache?: Array<VirtualItem>\n  lanes?: number\n  isScrollingResetDelay?: number\n  useScrollendEvent?: boolean\n  enabled?: boolean\n  isRtl?: boolean\n}\n\nexport class Virtualizer<\n  TScrollElement extends Element | Window,\n  TItemElement extends Element,\n> {\n  private unsubs: Array<void | (() => void)> = []\n  options!: Required<VirtualizerOptions<TScrollElement, TItemElement>>\n  scrollElement: TScrollElement | null = null\n  targetWindow: (Window & typeof globalThis) | null = null\n  isScrolling = false\n  private scrollToIndexTimeoutId: number | null = null\n  measurementsCache: Array<VirtualItem> = []\n  private itemSizeCache = new Map<Key, number>()\n  private pendingMeasuredCacheIndexes: Array<number> = []\n  scrollRect: Rect | null = null\n  scrollOffset: number | null = null\n  scrollDirection: ScrollDirection | null = null\n  private scrollAdjustments = 0\n  shouldAdjustScrollPositionOnItemSizeChange:\n    | undefined\n    | ((\n        item: VirtualItem,\n        delta: number,\n        instance: Virtualizer<TScrollElement, TItemElement>,\n      ) => boolean)\n  elementsCache = new Map<Key, TItemElement>()\n  private observer = (() => {\n    let _ro: ResizeObserver | null = null\n\n    const get = () => {\n      if (_ro) {\n        return _ro\n      }\n\n      if (!this.targetWindow || !this.targetWindow.ResizeObserver) {\n        return null\n      }\n\n      return (_ro = new this.targetWindow.ResizeObserver((entries) => {\n        entries.forEach((entry) => {\n          this._measureElement(entry.target as TItemElement, entry)\n        })\n      }))\n    }\n\n    return {\n      disconnect: () => {\n        get()?.disconnect()\n        _ro = null\n      },\n      observe: (target: Element) =>\n        get()?.observe(target, { box: 'border-box' }),\n      unobserve: (target: Element) => get()?.unobserve(target),\n    }\n  })()\n  range: { startIndex: number; endIndex: number } | null = null\n\n  constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>) {\n    this.setOptions(opts)\n  }\n\n  setOptions = (opts: VirtualizerOptions<TScrollElement, TItemElement>) => {\n    Object.entries(opts).forEach(([key, value]) => {\n      if (typeof value === 'undefined') delete (opts as any)[key]\n    })\n\n    this.options = {\n      debug: false,\n      initialOffset: 0,\n      overscan: 1,\n      paddingStart: 0,\n      paddingEnd: 0,\n      scrollPaddingStart: 0,\n      scrollPaddingEnd: 0,\n      horizontal: false,\n      getItemKey: defaultKeyExtractor,\n      rangeExtractor: defaultRangeExtractor,\n      onChange: () => {},\n      measureElement,\n      initialRect: { width: 0, height: 0 },\n      scrollMargin: 0,\n      gap: 0,\n      indexAttribute: 'data-index',\n      initialMeasurementsCache: [],\n      lanes: 1,\n      isScrollingResetDelay: 150,\n      enabled: true,\n      isRtl: false,\n      useScrollendEvent: true,\n      ...opts,\n    }\n  }\n\n  private notify = (sync: boolean) => {\n    this.options.onChange?.(this, sync)\n  }\n\n  private maybeNotify = memo(\n    () => {\n      this.calculateRange()\n\n      return [\n        this.isScrolling,\n        this.range ? this.range.startIndex : null,\n        this.range ? this.range.endIndex : null,\n      ]\n    },\n    (isScrolling) => {\n      this.notify(isScrolling)\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'maybeNotify',\n      debug: () => this.options.debug,\n      initialDeps: [\n        this.isScrolling,\n        this.range ? this.range.startIndex : null,\n        this.range ? this.range.endIndex : null,\n      ] as [boolean, number | null, number | null],\n    },\n  )\n\n  private cleanup = () => {\n    this.unsubs.filter(Boolean).forEach((d) => d!())\n    this.unsubs = []\n    this.observer.disconnect()\n    this.scrollElement = null\n    this.targetWindow = null\n  }\n\n  _didMount = () => {\n    return () => {\n      this.cleanup()\n    }\n  }\n\n  _willUpdate = () => {\n    const scrollElement = this.options.enabled\n      ? this.options.getScrollElement()\n      : null\n\n    if (this.scrollElement !== scrollElement) {\n      this.cleanup()\n\n      if (!scrollElement) {\n        this.maybeNotify()\n        return\n      }\n\n      this.scrollElement = scrollElement\n\n      if (this.scrollElement && 'ownerDocument' in this.scrollElement) {\n        this.targetWindow = this.scrollElement.ownerDocument.defaultView\n      } else {\n        this.targetWindow = this.scrollElement?.window ?? null\n      }\n\n      this.elementsCache.forEach((cached) => {\n        this.observer.observe(cached)\n      })\n\n      this._scrollToOffset(this.getScrollOffset(), {\n        adjustments: undefined,\n        behavior: undefined,\n      })\n\n      this.unsubs.push(\n        this.options.observeElementRect(this, (rect) => {\n          this.scrollRect = rect\n          this.maybeNotify()\n        }),\n      )\n\n      this.unsubs.push(\n        this.options.observeElementOffset(this, (offset, isScrolling) => {\n          this.scrollAdjustments = 0\n          this.scrollDirection = isScrolling\n            ? this.getScrollOffset() < offset\n              ? 'forward'\n              : 'backward'\n            : null\n          this.scrollOffset = offset\n          this.isScrolling = isScrolling\n\n          this.maybeNotify()\n        }),\n      )\n    }\n  }\n\n  private getSize = () => {\n    if (!this.options.enabled) {\n      this.scrollRect = null\n      return 0\n    }\n\n    this.scrollRect = this.scrollRect ?? this.options.initialRect\n\n    return this.scrollRect[this.options.horizontal ? 'width' : 'height']\n  }\n\n  private getScrollOffset = () => {\n    if (!this.options.enabled) {\n      this.scrollOffset = null\n      return 0\n    }\n\n    this.scrollOffset =\n      this.scrollOffset ??\n      (typeof this.options.initialOffset === 'function'\n        ? this.options.initialOffset()\n        : this.options.initialOffset)\n\n    return this.scrollOffset\n  }\n\n  private getFurthestMeasurement = (\n    measurements: Array<VirtualItem>,\n    index: number,\n  ) => {\n    const furthestMeasurementsFound = new Map<number, true>()\n    const furthestMeasurements = new Map<number, VirtualItem>()\n    for (let m = index - 1; m >= 0; m--) {\n      const measurement = measurements[m]!\n\n      if (furthestMeasurementsFound.has(measurement.lane)) {\n        continue\n      }\n\n      const previousFurthestMeasurement = furthestMeasurements.get(\n        measurement.lane,\n      )\n      if (\n        previousFurthestMeasurement == null ||\n        measurement.end > previousFurthestMeasurement.end\n      ) {\n        furthestMeasurements.set(measurement.lane, measurement)\n      } else if (measurement.end < previousFurthestMeasurement.end) {\n        furthestMeasurementsFound.set(measurement.lane, true)\n      }\n\n      if (furthestMeasurementsFound.size === this.options.lanes) {\n        break\n      }\n    }\n\n    return furthestMeasurements.size === this.options.lanes\n      ? Array.from(furthestMeasurements.values()).sort((a, b) => {\n          if (a.end === b.end) {\n            return a.index - b.index\n          }\n\n          return a.end - b.end\n        })[0]\n      : undefined\n  }\n\n  private getMeasurementOptions = memo(\n    () => [\n      this.options.count,\n      this.options.paddingStart,\n      this.options.scrollMargin,\n      this.options.getItemKey,\n      this.options.enabled,\n    ],\n    (count, paddingStart, scrollMargin, getItemKey, enabled) => {\n      this.pendingMeasuredCacheIndexes = []\n      return {\n        count,\n        paddingStart,\n        scrollMargin,\n        getItemKey,\n        enabled,\n      }\n    },\n    {\n      key: false,\n    },\n  )\n\n  private getMeasurements = memo(\n    () => [this.getMeasurementOptions(), this.itemSizeCache],\n    (\n      { count, paddingStart, scrollMargin, getItemKey, enabled },\n      itemSizeCache,\n    ) => {\n      if (!enabled) {\n        this.measurementsCache = []\n        this.itemSizeCache.clear()\n        return []\n      }\n\n      if (this.measurementsCache.length === 0) {\n        this.measurementsCache = this.options.initialMeasurementsCache\n        this.measurementsCache.forEach((item) => {\n          this.itemSizeCache.set(item.key, item.size)\n        })\n      }\n\n      const min =\n        this.pendingMeasuredCacheIndexes.length > 0\n          ? Math.min(...this.pendingMeasuredCacheIndexes)\n          : 0\n      this.pendingMeasuredCacheIndexes = []\n\n      const measurements = this.measurementsCache.slice(0, min)\n\n      for (let i = min; i < count; i++) {\n        const key = getItemKey(i)\n\n        const furthestMeasurement =\n          this.options.lanes === 1\n            ? measurements[i - 1]\n            : this.getFurthestMeasurement(measurements, i)\n\n        const start = furthestMeasurement\n          ? furthestMeasurement.end + this.options.gap\n          : paddingStart + scrollMargin\n\n        const measuredSize = itemSizeCache.get(key)\n        const size =\n          typeof measuredSize === 'number'\n            ? measuredSize\n            : this.options.estimateSize(i)\n\n        const end = start + size\n\n        const lane = furthestMeasurement\n          ? furthestMeasurement.lane\n          : i % this.options.lanes\n\n        measurements[i] = {\n          index: i,\n          start,\n          size,\n          end,\n          key,\n          lane,\n        }\n      }\n\n      this.measurementsCache = measurements\n\n      return measurements\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getMeasurements',\n      debug: () => this.options.debug,\n    },\n  )\n\n  calculateRange = memo(\n    () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],\n    (measurements, outerSize, scrollOffset) => {\n      return (this.range =\n        measurements.length > 0 && outerSize > 0\n          ? calculateRange({\n              measurements,\n              outerSize,\n              scrollOffset,\n            })\n          : null)\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'calculateRange',\n      debug: () => this.options.debug,\n    },\n  )\n\n  private getIndexes = memo(\n    () => {\n      let startIndex: number | null = null\n      let endIndex: number | null = null\n      const range = this.calculateRange()\n      if (range) {\n        startIndex = range.startIndex\n        endIndex = range.endIndex\n      }\n      return [\n        this.options.rangeExtractor,\n        this.options.overscan,\n        this.options.count,\n        startIndex,\n        endIndex,\n      ]\n    },\n    (rangeExtractor, overscan, count, startIndex, endIndex) => {\n      return startIndex === null || endIndex === null\n        ? []\n        : rangeExtractor({\n            startIndex,\n            endIndex,\n            overscan,\n            count,\n          })\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getIndexes',\n      debug: () => this.options.debug,\n    },\n  )\n\n  indexFromElement = (node: TItemElement) => {\n    const attributeName = this.options.indexAttribute\n    const indexStr = node.getAttribute(attributeName)\n\n    if (!indexStr) {\n      console.warn(\n        `Missing attribute name '${attributeName}={index}' on measured element.`,\n      )\n      return -1\n    }\n\n    return parseInt(indexStr, 10)\n  }\n\n  private _measureElement = (\n    node: TItemElement,\n    entry: ResizeObserverEntry | undefined,\n  ) => {\n    const index = this.indexFromElement(node)\n    const item = this.measurementsCache[index]\n    if (!item) {\n      return\n    }\n    const key = item.key\n    const prevNode = this.elementsCache.get(key)\n\n    if (prevNode !== node) {\n      if (prevNode) {\n        this.observer.unobserve(prevNode)\n      }\n      this.observer.observe(node)\n      this.elementsCache.set(key, node)\n    }\n\n    if (node.isConnected) {\n      this.resizeItem(index, this.options.measureElement(node, entry, this))\n    }\n  }\n\n  resizeItem = (index: number, size: number) => {\n    const item = this.measurementsCache[index]\n    if (!item) {\n      return\n    }\n    const itemSize = this.itemSizeCache.get(item.key) ?? item.size\n    const delta = size - itemSize\n\n    if (delta !== 0) {\n      if (\n        this.shouldAdjustScrollPositionOnItemSizeChange !== undefined\n          ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this)\n          : item.start < this.getScrollOffset() + this.scrollAdjustments\n      ) {\n        if (process.env.NODE_ENV !== 'production' && this.options.debug) {\n          console.info('correction', delta)\n        }\n\n        this._scrollToOffset(this.getScrollOffset(), {\n          adjustments: (this.scrollAdjustments += delta),\n          behavior: undefined,\n        })\n      }\n\n      this.pendingMeasuredCacheIndexes.push(item.index)\n      this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size))\n\n      this.notify(false)\n    }\n  }\n\n  measureElement = (node: TItemElement | null | undefined) => {\n    if (!node) {\n      this.elementsCache.forEach((cached, key) => {\n        if (!cached.isConnected) {\n          this.observer.unobserve(cached)\n          this.elementsCache.delete(key)\n        }\n      })\n      return\n    }\n\n    this._measureElement(node, undefined)\n  }\n\n  getVirtualItems = memo(\n    () => [this.getIndexes(), this.getMeasurements()],\n    (indexes, measurements) => {\n      const virtualItems: Array<VirtualItem> = []\n\n      for (let k = 0, len = indexes.length; k < len; k++) {\n        const i = indexes[k]!\n        const measurement = measurements[i]!\n\n        virtualItems.push(measurement)\n      }\n\n      return virtualItems\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getVirtualItems',\n      debug: () => this.options.debug,\n    },\n  )\n\n  getVirtualItemForOffset = (offset: number) => {\n    const measurements = this.getMeasurements()\n    if (measurements.length === 0) {\n      return undefined\n    }\n    return notUndefined(\n      measurements[\n        findNearestBinarySearch(\n          0,\n          measurements.length - 1,\n          (index: number) => notUndefined(measurements[index]).start,\n          offset,\n        )\n      ],\n    )\n  }\n\n  getOffsetForAlignment = (toOffset: number, align: ScrollAlignment) => {\n    const size = this.getSize()\n    const scrollOffset = this.getScrollOffset()\n\n    if (align === 'auto') {\n      if (toOffset >= scrollOffset + size) {\n        align = 'end'\n      }\n    }\n\n    if (align === 'end') {\n      toOffset -= size\n    }\n\n    const scrollSizeProp = this.options.horizontal\n      ? 'scrollWidth'\n      : 'scrollHeight'\n    const scrollSize = this.scrollElement\n      ? 'document' in this.scrollElement\n        ? this.scrollElement.document.documentElement[scrollSizeProp]\n        : this.scrollElement[scrollSizeProp]\n      : 0\n\n    const maxOffset = scrollSize - size\n\n    return Math.max(Math.min(maxOffset, toOffset), 0)\n  }\n\n  getOffsetForIndex = (index: number, align: ScrollAlignment = 'auto') => {\n    index = Math.max(0, Math.min(index, this.options.count - 1))\n\n    const item = this.measurementsCache[index]\n    if (!item) {\n      return undefined\n    }\n\n    const size = this.getSize()\n    const scrollOffset = this.getScrollOffset()\n\n    if (align === 'auto') {\n      if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {\n        align = 'end'\n      } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {\n        align = 'start'\n      } else {\n        return [scrollOffset, align] as const\n      }\n    }\n\n    const centerOffset =\n      item.start - this.options.scrollPaddingStart + (item.size - size) / 2\n\n    switch (align) {\n      case 'center':\n        return [this.getOffsetForAlignment(centerOffset, align), align] as const\n      case 'end':\n        return [\n          this.getOffsetForAlignment(\n            item.end + this.options.scrollPaddingEnd,\n            align,\n          ),\n          align,\n        ] as const\n      default:\n        return [\n          this.getOffsetForAlignment(\n            item.start - this.options.scrollPaddingStart,\n            align,\n          ),\n          align,\n        ] as const\n    }\n  }\n\n  private isDynamicMode = () => this.elementsCache.size > 0\n\n  private cancelScrollToIndex = () => {\n    if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {\n      this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId)\n      this.scrollToIndexTimeoutId = null\n    }\n  }\n\n  scrollToOffset = (\n    toOffset: number,\n    { align = 'start', behavior }: ScrollToOffsetOptions = {},\n  ) => {\n    this.cancelScrollToIndex()\n\n    if (behavior === 'smooth' && this.isDynamicMode()) {\n      console.warn(\n        'The `smooth` scroll behavior is not fully supported with dynamic size.',\n      )\n    }\n\n    this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {\n      adjustments: undefined,\n      behavior,\n    })\n  }\n\n  scrollToIndex = (\n    index: number,\n    { align: initialAlign = 'auto', behavior }: ScrollToIndexOptions = {},\n  ) => {\n    index = Math.max(0, Math.min(index, this.options.count - 1))\n\n    this.cancelScrollToIndex()\n\n    if (behavior === 'smooth' && this.isDynamicMode()) {\n      console.warn(\n        'The `smooth` scroll behavior is not fully supported with dynamic size.',\n      )\n    }\n\n    const offsetAndAlign = this.getOffsetForIndex(index, initialAlign)\n    if (!offsetAndAlign) return\n\n    const [offset, align] = offsetAndAlign\n\n    this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n    if (behavior !== 'smooth' && this.isDynamicMode() && this.targetWindow) {\n      this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {\n        this.scrollToIndexTimeoutId = null\n\n        const elementInDOM = this.elementsCache.has(\n          this.options.getItemKey(index),\n        )\n\n        if (elementInDOM) {\n          const [latestOffset] = notUndefined(\n            this.getOffsetForIndex(index, align),\n          )\n\n          if (!approxEqual(latestOffset, this.getScrollOffset())) {\n            this.scrollToIndex(index, { align, behavior })\n          }\n        } else {\n          this.scrollToIndex(index, { align, behavior })\n        }\n      })\n    }\n  }\n\n  scrollBy = (delta: number, { behavior }: ScrollToOffsetOptions = {}) => {\n    this.cancelScrollToIndex()\n\n    if (behavior === 'smooth' && this.isDynamicMode()) {\n      console.warn(\n        'The `smooth` scroll behavior is not fully supported with dynamic size.',\n      )\n    }\n\n    this._scrollToOffset(this.getScrollOffset() + delta, {\n      adjustments: undefined,\n      behavior,\n    })\n  }\n\n  getTotalSize = () => {\n    const measurements = this.getMeasurements()\n\n    let end: number\n    // If there are no measurements, set the end to paddingStart\n    if (measurements.length === 0) {\n      end = this.options.paddingStart\n    } else {\n      // If lanes is 1, use the last measurement's end, otherwise find the maximum end value among all measurements\n      end =\n        this.options.lanes === 1\n          ? (measurements[measurements.length - 1]?.end ?? 0)\n          : Math.max(\n              ...measurements.slice(-this.options.lanes).map((m) => m.end),\n            )\n    }\n\n    return Math.max(\n      end - this.options.scrollMargin + this.options.paddingEnd,\n      0,\n    )\n  }\n\n  private _scrollToOffset = (\n    offset: number,\n    {\n      adjustments,\n      behavior,\n    }: {\n      adjustments: number | undefined\n      behavior: ScrollBehavior | undefined\n    },\n  ) => {\n    this.options.scrollToFn(offset, { behavior, adjustments }, this)\n  }\n\n  measure = () => {\n    this.itemSizeCache = new Map()\n    this.notify(false)\n  }\n}\n\nconst findNearestBinarySearch = (\n  low: number,\n  high: number,\n  getCurrentValue: (i: number) => number,\n  value: number,\n) => {\n  while (low <= high) {\n    const middle = ((low + high) / 2) | 0\n    const currentValue = getCurrentValue(middle)\n\n    if (currentValue < value) {\n      low = middle + 1\n    } else if (currentValue > value) {\n      high = middle - 1\n    } else {\n      return middle\n    }\n  }\n\n  if (low > 0) {\n    return low - 1\n  } else {\n    return 0\n  }\n}\n\nfunction calculateRange({\n  measurements,\n  outerSize,\n  scrollOffset,\n}: {\n  measurements: Array<VirtualItem>\n  outerSize: number\n  scrollOffset: number\n}) {\n  const count = measurements.length - 1\n  const getOffset = (index: number) => measurements[index]!.start\n\n  const startIndex = findNearestBinarySearch(0, count, getOffset, scrollOffset)\n  let endIndex = startIndex\n\n  while (\n    endIndex < count &&\n    measurements[endIndex]!.end < scrollOffset + outerSize\n  ) {\n    endIndex++\n  }\n\n  return { startIndex, endIndex }\n}\n","\"use client\";\nimport {\n  table_cell_default\n} from \"./chunk-S6V3WGEL.mjs\";\nimport {\n  table_checkbox_cell_default\n} from \"./chunk-UGS3DB5V.mjs\";\nimport {\n  table_row_default\n} from \"./chunk-N22KOF64.mjs\";\n\n// src/table-body.tsx\nimport { forwardRef } from \"@heroui/system\";\nimport { useDOMRef } from \"@heroui/react-utils\";\nimport { clsx, dataAttr } from \"@heroui/shared-utils\";\nimport { useTableRowGroup } from \"@react-aria/table\";\nimport { filterDOMProps } from \"@heroui/react-utils\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport { useMemo } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar TableBody = forwardRef((props, ref) => {\n  var _a;\n  const {\n    as,\n    className,\n    slots,\n    state,\n    collection,\n    isSelectable,\n    color,\n    disableAnimation,\n    checkboxesProps,\n    selectionMode,\n    classNames,\n    ...otherProps\n  } = props;\n  const Component = as || \"tbody\";\n  const shouldFilterDOMProps = typeof Component === \"string\";\n  const domRef = useDOMRef(ref);\n  const { rowGroupProps } = useTableRowGroup();\n  const tbodyStyles = clsx(classNames == null ? void 0 : classNames.tbody, className);\n  const bodyProps = collection == null ? void 0 : collection.body.props;\n  const isLoading = (bodyProps == null ? void 0 : bodyProps.isLoading) || (bodyProps == null ? void 0 : bodyProps.loadingState) === \"loading\" || (bodyProps == null ? void 0 : bodyProps.loadingState) === \"loadingMore\";\n  const renderRows = useMemo(() => {\n    return [...collection.body.childNodes].map((row) => /* @__PURE__ */ jsx(\n      table_row_default,\n      {\n        classNames,\n        isSelectable,\n        node: row,\n        slots,\n        state,\n        children: [...row.childNodes].map(\n          (cell) => cell.props.isSelectionCell ? /* @__PURE__ */ jsx(\n            table_checkbox_cell_default,\n            {\n              checkboxesProps,\n              classNames,\n              color,\n              disableAnimation,\n              node: cell,\n              rowKey: row.key,\n              selectionMode,\n              slots,\n              state\n            },\n            cell.key\n          ) : /* @__PURE__ */ jsx(\n            table_cell_default,\n            {\n              classNames,\n              node: cell,\n              rowKey: row.key,\n              slots,\n              state\n            },\n            cell.key\n          )\n        )\n      },\n      row.key\n    ));\n  }, [collection.body.childNodes, classNames, isSelectable, slots, state]);\n  let emptyContent;\n  let loadingContent;\n  if (collection.size === 0 && bodyProps.emptyContent) {\n    emptyContent = /* @__PURE__ */ jsx(\"tr\", { role: \"row\", children: /* @__PURE__ */ jsx(\n      \"td\",\n      {\n        className: slots == null ? void 0 : slots.emptyWrapper({ class: classNames == null ? void 0 : classNames.emptyWrapper }),\n        colSpan: collection.columnCount,\n        role: \"gridcell\",\n        children: !isLoading && bodyProps.emptyContent\n      }\n    ) });\n  }\n  if (isLoading && bodyProps.loadingContent) {\n    loadingContent = /* @__PURE__ */ jsxs(\"tr\", { role: \"row\", children: [\n      /* @__PURE__ */ jsx(\n        \"td\",\n        {\n          className: slots == null ? void 0 : slots.loadingWrapper({ class: classNames == null ? void 0 : classNames.loadingWrapper }),\n          colSpan: collection.columnCount,\n          role: \"gridcell\",\n          children: bodyProps.loadingContent\n        }\n      ),\n      !emptyContent && collection.size === 0 ? /* @__PURE__ */ jsx(\"td\", { className: slots == null ? void 0 : slots.emptyWrapper({ class: classNames == null ? void 0 : classNames.emptyWrapper }) }) : null\n    ] });\n  }\n  return /* @__PURE__ */ jsxs(\n    Component,\n    {\n      ref: domRef,\n      ...mergeProps(\n        rowGroupProps,\n        filterDOMProps(bodyProps, {\n          enabled: shouldFilterDOMProps\n        }),\n        otherProps\n      ),\n      className: (_a = slots.tbody) == null ? void 0 : _a.call(slots, { class: tbodyStyles }),\n      \"data-empty\": dataAttr(collection.size === 0),\n      \"data-loading\": dataAttr(isLoading),\n      children: [\n        renderRows,\n        loadingContent,\n        emptyContent\n      ]\n    }\n  );\n});\nTableBody.displayName = \"HeroUI.TableBody\";\nvar table_body_default = TableBody;\n\nexport {\n  table_body_default\n};\n","\"use client\";\nimport {\n  virtualized_table_default\n} from \"./chunk-O5IH762T.mjs\";\nimport {\n  table_select_all_checkbox_default\n} from \"./chunk-PRBPVC6X.mjs\";\nimport {\n  useTable\n} from \"./chunk-6P56MRLR.mjs\";\nimport {\n  table_body_default\n} from \"./chunk-HDDKCVLI.mjs\";\nimport {\n  table_column_header_default\n} from \"./chunk-PZT4K2LB.mjs\";\nimport {\n  table_header_row_default\n} from \"./chunk-V2BF6S4T.mjs\";\nimport {\n  table_row_group_default\n} from \"./chunk-DVOW65RZ.mjs\";\n\n// src/table.tsx\nimport { useCallback } from \"react\";\nimport { Spacer } from \"@heroui/spacer\";\nimport { forwardRef } from \"@heroui/system\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar Table = forwardRef((props, ref) => {\n  const {\n    BaseComponent,\n    Component,\n    collection,\n    values,\n    topContent,\n    topContentPlacement,\n    bottomContentPlacement,\n    bottomContent,\n    removeWrapper,\n    getBaseProps,\n    getWrapperProps,\n    getTableProps\n  } = useTable({\n    ...props,\n    ref\n  });\n  const { isVirtualized, rowHeight = 40, maxTableHeight = 600 } = props;\n  const shouldVirtualize = isVirtualized;\n  const Wrapper = useCallback(\n    ({ children }) => {\n      if (removeWrapper) {\n        return children;\n      }\n      return /* @__PURE__ */ jsx(BaseComponent, { ...getWrapperProps(), children });\n    },\n    [removeWrapper, getWrapperProps]\n  );\n  if (shouldVirtualize) {\n    return /* @__PURE__ */ jsx(\n      virtualized_table_default,\n      {\n        ...props,\n        ref,\n        maxTableHeight,\n        rowHeight\n      }\n    );\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { ...getBaseProps(), children: [\n    topContentPlacement === \"outside\" && topContent,\n    /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsxs(Fragment, { children: [\n      topContentPlacement === \"inside\" && topContent,\n      /* @__PURE__ */ jsxs(Component, { ...getTableProps(), children: [\n        /* @__PURE__ */ jsxs(table_row_group_default, { classNames: values.classNames, slots: values.slots, children: [\n          collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx(\n            table_header_row_default,\n            {\n              classNames: values.classNames,\n              node: headerRow,\n              slots: values.slots,\n              state: values.state,\n              children: [...headerRow.childNodes].map(\n                (column) => {\n                  var _a;\n                  return ((_a = column == null ? void 0 : column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx(\n                    table_select_all_checkbox_default,\n                    {\n                      checkboxesProps: values.checkboxesProps,\n                      classNames: values.classNames,\n                      color: values.color,\n                      disableAnimation: values.disableAnimation,\n                      node: column,\n                      selectionMode: values.selectionMode,\n                      slots: values.slots,\n                      state: values.state\n                    },\n                    column == null ? void 0 : column.key\n                  ) : /* @__PURE__ */ jsx(\n                    table_column_header_default,\n                    {\n                      classNames: values.classNames,\n                      node: column,\n                      slots: values.slots,\n                      state: values.state\n                    },\n                    column == null ? void 0 : column.key\n                  );\n                }\n              )\n            },\n            headerRow == null ? void 0 : headerRow.key\n          )),\n          /* @__PURE__ */ jsx(Spacer, { as: \"tr\", tabIndex: -1, y: 1 })\n        ] }),\n        /* @__PURE__ */ jsx(\n          table_body_default,\n          {\n            checkboxesProps: values.checkboxesProps,\n            classNames: values.classNames,\n            collection: values.collection,\n            color: values.color,\n            disableAnimation: values.disableAnimation,\n            isSelectable: values.isSelectable,\n            selectionMode: values.selectionMode,\n            slots: values.slots,\n            state: values.state\n          }\n        )\n      ] }),\n      bottomContentPlacement === \"inside\" && bottomContent\n    ] }) }),\n    bottomContentPlacement === \"outside\" && bottomContent\n  ] });\n});\nTable.displayName = \"HeroUI.Table\";\nvar table_default = Table;\n\nexport {\n  table_default\n};\n","\"use client\";\n\n// src/base/table-column.tsx\nimport { Column } from \"@react-stately/table\";\nvar TableColumn = Column;\nvar table_column_default = TableColumn;\n\nexport {\n  table_column_default\n};\n","\"use client\";\n\n// src/base/table-header.tsx\nimport { TableHeader as TableHeaderBase } from \"@react-stately/table\";\nvar TableHeader = TableHeaderBase;\nvar table_header_default = TableHeader;\n\nexport {\n  table_header_default\n};\n","\"use client\";\n\n// src/base/table-row.tsx\nimport { Row } from \"@react-stately/table\";\nvar TableRow = Row;\nvar table_row_default = TableRow;\n\nexport {\n  table_row_default\n};\n","\"use client\";\n\n// src/base/table-body.tsx\nimport { TableBody as TableBodyBase } from \"@react-stately/table\";\nvar TableBody = TableBodyBase;\nvar table_body_default = TableBody;\n\nexport {\n  table_body_default\n};\n","\"use client\";\n\n// src/base/table-cell.tsx\nimport { Cell } from \"@react-stately/table\";\nvar TableCell = Cell;\nvar table_cell_default = TableCell;\n\nexport {\n  table_cell_default\n};\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { useMemo, useRef, useState } from 'react';\nimport ReactEChartsCore from 'echarts-for-react';\nimport * as echarts from 'echarts/core';\nimport { BoxplotChart, ScatterChart } from 'echarts/charts';\nimport {\n  GridComponent,\n  ToolboxComponent,\n  TooltipComponent,\n  BrushComponent,\n  TitleComponent,\n  DataZoomComponent,\n  DataZoomInsideComponent,\n} from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { useBrushLink } from '@openassistant/hooks';\nimport {\n  BoxplotDataProps,\n  CreateBoxplotProps,\n  OnSelected,\n} from '@openassistant/plots';\n\nimport { getBoxPlotChartOption } from './boxplot-option';\nimport { ECHARTS_DARK_THEME } from '../echarts-theme';\nimport { onBrushSelected } from '../echarts-updater';\n\n// Register the required components\necharts.use([\n  TitleComponent,\n  TooltipComponent,\n  ToolboxComponent,\n  BrushComponent,\n  GridComponent,\n  DataZoomComponent,\n  DataZoomInsideComponent,\n  BoxplotChart,\n  ScatterChart,\n  CanvasRenderer,\n]);\necharts.registerTheme('dark', ECHARTS_DARK_THEME);\n\n/**\n * The data for the box plot\n *\n * @property id - The id of the box plot\n * @property datasetName - The name of the dataset\n * @property variables - The variables of the box plot\n * @property boxplotData - The data for the box plot\n * @property data - The raw data for rendering points in box plot, and used in brushing and linking. See {@link CreateBoxplotProps} for more details.\n * @property boundIQR - The multiplier for the IQR to determine the whisker lengths. See {@link CreateBoxplotProps} for more details.\n * @property theme (optional) - The theme of the box plot\n * @property isExpanded (optional) - Whether the box plot is expanded\n * @property isDraggable (optional) - Whether the box plot is draggable\n * @property setIsExpanded (optional) - The callback to toggle expanded state\n */\nexport type BoxplotOutputData = {\n  id: string;\n  datasetId?: string;\n  datasetName: string;\n  variables: string[];\n  boxplotData: BoxplotDataProps;\n  theme?: string;\n  showMore?: boolean;\n  isExpanded?: boolean;\n  isDraggable?: boolean;\n  setIsExpanded?: (isExpanded: boolean) => void;\n  height?: number;\n  width?: number;\n  onSelected?: OnSelected;\n} & CreateBoxplotProps;\n\n/**\n * The react component of a box plot using eCharts\n */\nexport const Boxplot = (props: BoxplotOutputData) => {\n  const {\n    id,\n    datasetId,\n    datasetName,\n    variables,\n    data: rawData,\n    theme,\n    boxplotData,\n    onSelected,\n  } = props;\n  const seriesIndex = variables.map((_, i) => i);\n\n  // get chart option by calling getChartOption only once\n  const option = useMemo(() => {\n    return getBoxPlotChartOption({\n      rawData,\n      boxplots: boxplotData.boxplots,\n      meanPoint: boxplotData.meanPoint,\n      theme: theme || 'dark',\n      isExpanded: props.isExpanded || false,\n    });\n  }, [boxplotData, props.isExpanded, rawData, theme]);\n\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  // track if the chart has been rendered, so we can update the chart later\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [rendered, setRendered] = useState(false);\n\n  const { brush, componentId } = useBrushLink({\n    defaultDataId: datasetId || datasetName,\n    componentId: id,\n    onLink: (highlightedRows, sourceDataId) => {\n      console.log(\n        `Chart One (${componentId}) received update for ${sourceDataId}:`,\n        highlightedRows\n      );\n      if (\n        rendered &&\n        eChartsRef.current &&\n        highlightedRows &&\n        componentId !== sourceDataId\n      ) {\n        const chartInstance = eChartsRef.current?.getEchartsInstance();\n        chartInstance?.dispatchAction({ type: 'downplay' });\n        if (highlightedRows.length < Object.values(rawData)[0].length) {\n          // chartInstance.dispatchAction({type: 'brush', command: 'clear', areas: []});\n          chartInstance?.dispatchAction({\n            type: 'highlight',\n            dataIndex: highlightedRows,\n            ...(seriesIndex ? { seriesIndex } : {}),\n          });\n        }\n      }\n    },\n  });\n\n  const bindEvents = useMemo(\n    () => ({\n      brushSelected: function (params) {\n        onBrushSelected(\n          params,\n          id,\n          datasetId || datasetName,\n          eChartsRef.current?.getEchartsInstance(),\n          brush,\n          onSelected\n        );\n      },\n      rendered: function () {\n        setRendered(true);\n      },\n    }),\n    [id, datasetId, datasetName, brush, onSelected]\n  );\n\n  return useMemo(\n    () => (\n      <div className=\"h-full w-full flex flex-col rounded-lg pt-6 text-gray-900 dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">{variables.join(',')}</p>\n          <small className=\"text-default-500\">{datasetName}</small>\n        </div>\n        <div style={{ height: '100%' }} className=\"py-2 flex-grow\">\n          <ReactEChartsCore\n            echarts={echarts}\n            option={option}\n            notMerge={true}\n            lazyUpdate={true}\n            theme={theme || 'dark'}\n            onEvents={bindEvents}\n            style={{ height: '100%', width: '100%' }}\n            ref={eChartsRef}\n          />\n        </div>\n      </div>\n    ),\n    [variables, datasetName, option, theme, bindEvents]\n  );\n};\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { BoxplotDataProps } from '@openassistant/plots';\nimport { numericFormatter } from '@openassistant/utils';\nimport { EChartsOption } from 'echarts';\nimport { YAXisOption, XAXisOption } from 'echarts/types/dist/shared';\nimport * as echarts from 'echarts';\n\nexport type BoxPlotChartOptionProps = {\n  rawData: { [key: string]: number[] };\n  theme: string;\n  isExpanded: boolean;\n} & BoxplotDataProps;\n\nexport function getBoxPlotChartOption({\n  rawData,\n  boxplots,\n  meanPoint,\n  theme,\n  isExpanded,\n}: BoxPlotChartOptionProps): EChartsOption {\n  // build box plot data using rawData in the form of [value, index]\n  const pointsData = Object.values(rawData)?.map(\n    (values, dataIndex) =>\n      values?.map((value: number) =>\n        isExpanded ? [dataIndex, value] : [value, dataIndex]\n      ) || []\n  );\n\n  // build mean point data for series\n  const meanPointData = meanPoint.map((mp, dataIndex) =>\n    isExpanded ? [dataIndex, mp[1]] : [mp[1], dataIndex]\n  );\n\n  // build scatter\n  const scatterSeries =\n    pointsData?.map((data) => ({\n      type: 'scatter' as const,\n      data,\n      symbolSize: data.length > 1000 ? 4 : 6,\n      symbol: data.length > 1000 ? 'rect' : 'circle',\n      itemStyle: {\n        color: 'lightblue',\n        borderColor: '#aaa',\n      },\n      // highlight\n      emphasis: {\n        focus: 'series' as const,\n        symbolSize: 6,\n        itemStyle: {\n          color: 'red',\n          borderWidth: 1,\n        },\n      },\n    })) || [];\n\n  const series = [\n    ...scatterSeries,\n    {\n      type: 'boxplot' as const,\n      data: boxplots.map((boxplot) => [\n        boxplot.low,\n        boxplot.q1,\n        boxplot.q2,\n        boxplot.q3,\n        boxplot.high,\n      ]),\n      itemStyle: {\n        borderColor: theme === 'dark' ? 'white' : 'black',\n        color: '#DB631C',\n        opacity: 1,\n      },\n      emphasis: {\n        focus: 'none' as const,\n        disabled: true,\n      },\n    },\n    {\n      type: 'scatter' as const,\n      data: meanPointData,\n      symbolSize: 8,\n      itemStyle: {\n        color: '#14C814',\n        borderColor: 'black',\n        opacity: 1,\n      },\n    },\n  ];\n\n  const yAxis = {\n    type: isExpanded ? ('value' as const) : ('category' as const),\n    boundaryGap: true,\n    splitArea: { show: false },\n    splitLine: {\n      show: false,\n      interval: 'auto',\n      lineStyle: { color: theme === 'dark' ? '#333' : '#f3f3f3' },\n    },\n    axisLine: {\n      show: isExpanded,\n      onZero: false,\n    },\n    axisTick: { show: isExpanded },\n    axisLabel: isExpanded\n      ? {\n          formatter: numericFormatter as unknown as\n            | string\n            | ((value: string) => string),\n        }\n      : {\n          formatter: function (d: string, i: number) {\n            return boxplots[i]?.name ?? '';\n          },\n        },\n  } as YAXisOption;\n\n  const xAxis = {\n    type: isExpanded ? ('category' as const) : ('value' as const),\n    axisLabel: isExpanded\n      ? {\n          formatter: function (d: string, i: number) {\n            return boxplots[i]?.name ?? '';\n          },\n        }\n      : {\n          formatter: numericFormatter,\n        },\n    splitLine: {\n      show: false,\n      interval: 'auto',\n      lineStyle: { color: theme === 'dark' ? '#333' : '#f3f3f3' },\n    },\n    splitArea: { show: false },\n    axisTick: { show: !isExpanded },\n    axisLine: { show: !isExpanded },\n  } as XAXisOption;\n\n  const tooltip = {\n    trigger: 'item',\n    formatter: (params: echarts.DefaultLabelFormatterCallbackParams) => {\n      if (params && params.componentSubType === 'scatter' && params.value) {\n        return `${numericFormatter(params.value[0])}`;\n      }\n    },\n  };\n\n  // build option for echarts\n  const option: EChartsOption = {\n    yAxis,\n    xAxis,\n    series,\n    brush: {\n      toolbox: ['rect', 'keep', 'clear'],\n      xAxisIndex: 0,\n      throttleType: 'debounce',\n      brushLink: scatterSeries.map((_, index) => index),\n      seriesIndex: scatterSeries.map((_, index) => index),\n    },\n    grid: [\n      {\n        left: '3%',\n        right: '5%',\n        top: isExpanded ? '20%' : '20%',\n        bottom: '0%',\n        containLabel: true,\n        height: isExpanded ? '90%' : 'auto',\n      },\n    ],\n    tooltip: tooltip as echarts.TooltipComponentOption,\n    // avoid flickering when brushing\n    progressive: 0,\n    animation: false,\n  };\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\n/**\n * @internal\n */\nexport const ECHARTS_DARK_THEME = {\n  color: [\n    '#dd6b66',\n    '#759aa0',\n    '#e69d87',\n    '#8dc1a9',\n    '#ea7e53',\n    '#eedd78',\n    '#73a373',\n    '#73b9bc',\n    '#7289ab',\n    '#91ca8c',\n    '#f49f42',\n  ],\n  backgroundColor: 'rgba(14,14,14,0)',\n  textStyle: {},\n  title: {\n    textStyle: {\n      color: '#eeeeee',\n    },\n    subtextStyle: {\n      color: '#aaaaaa',\n    },\n  },\n  line: {\n    itemStyle: {\n      borderWidth: 1,\n    },\n    lineStyle: {\n      width: 2,\n    },\n    symbolSize: 4,\n    symbol: 'circle',\n    smooth: false,\n  },\n  radar: {\n    itemStyle: {\n      borderWidth: 1,\n    },\n    lineStyle: {\n      width: 2,\n    },\n    symbolSize: 4,\n    symbol: 'circle',\n    smooth: false,\n  },\n  bar: {\n    itemStyle: {\n      barBorderWidth: 0,\n      barBorderColor: '#ccc',\n    },\n  },\n  pie: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  scatter: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  boxplot: {\n    itemStyle: {\n      borderColor: '#ccc',\n      color: '#CCC',\n      opacity: 1,\n    },\n  },\n  parallel: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  sankey: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  funnel: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  gauge: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n  },\n  candlestick: {\n    itemStyle: {\n      color: '#fd1050',\n      color0: '#0cf49b',\n      borderColor: '#fd1050',\n      borderColor0: '#0cf49b',\n      borderWidth: 1,\n    },\n  },\n  graph: {\n    itemStyle: {\n      borderWidth: 0,\n      borderColor: '#ccc',\n    },\n    lineStyle: {\n      width: 1,\n      color: '#aaaaaa',\n    },\n    symbolSize: 4,\n    symbol: 'circle',\n    smooth: false,\n    color: [\n      '#dd6b66',\n      '#759aa0',\n      '#e69d87',\n      '#8dc1a9',\n      '#ea7e53',\n      '#eedd78',\n      '#73a373',\n      '#73b9bc',\n      '#7289ab',\n      '#91ca8c',\n      '#f49f42',\n    ],\n    label: {\n      color: '#eeeeee',\n    },\n  },\n  map: {\n    itemStyle: {\n      areaColor: '#eee',\n      borderColor: '#444',\n      borderWidth: 0.5,\n    },\n    label: {\n      color: '#000',\n    },\n    emphasis: {\n      itemStyle: {\n        areaColor: 'rgba(255,215,0,0.8)',\n        borderColor: '#444',\n        borderWidth: 1,\n      },\n      label: {\n        color: 'rgb(100,0,0)',\n      },\n    },\n  },\n  geo: {\n    itemStyle: {\n      areaColor: '#eee',\n      borderColor: '#444',\n      borderWidth: 0.5,\n    },\n    label: {\n      color: '#000',\n    },\n    emphasis: {\n      itemStyle: {\n        areaColor: 'rgba(255,215,0,0.8)',\n        borderColor: '#444',\n        borderWidth: 1,\n      },\n      label: {\n        color: 'rgb(100,0,0)',\n      },\n    },\n  },\n  categoryAxis: {\n    axisLine: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisTick: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisLabel: {\n      show: true,\n      color: '#eeeeee',\n    },\n    splitLine: {\n      show: true,\n      lineStyle: {\n        color: ['#333'],\n      },\n    },\n    splitArea: {\n      show: false,\n      areaStyle: {\n        color: ['#eeeeee'],\n      },\n    },\n  },\n  valueAxis: {\n    axisLine: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisTick: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisLabel: {\n      show: true,\n      color: '#eeeeee',\n    },\n    splitLine: {\n      show: true,\n      lineStyle: {\n        color: ['#333'],\n      },\n    },\n    splitArea: {\n      show: false,\n      areaStyle: {\n        color: ['#eeeeee'],\n      },\n    },\n  },\n  logAxis: {\n    axisLine: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisTick: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisLabel: {\n      show: true,\n      color: '#eeeeee',\n    },\n    splitLine: {\n      show: true,\n      lineStyle: {\n        color: ['#aaaaaa'],\n      },\n    },\n    splitArea: {\n      show: false,\n      areaStyle: {\n        color: ['#eeeeee'],\n      },\n    },\n  },\n  timeAxis: {\n    axisLine: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisTick: {\n      show: true,\n      lineStyle: {\n        color: '#eeeeee',\n      },\n    },\n    axisLabel: {\n      show: true,\n      color: '#eeeeee',\n    },\n    splitLine: {\n      show: true,\n      lineStyle: {\n        color: ['#aaaaaa'],\n      },\n    },\n    splitArea: {\n      show: false,\n      areaStyle: {\n        color: ['#eeeeee'],\n      },\n    },\n  },\n  toolbox: {\n    iconStyle: {\n      borderColor: '#999999',\n    },\n    emphasis: {\n      iconStyle: {\n        borderColor: '#666666',\n      },\n    },\n  },\n  legend: {\n    textStyle: {\n      color: '#eeeeee',\n    },\n  },\n  tooltip: {\n    axisPointer: {\n      label: {\n        color: '#333333',\n      },\n      lineStyle: {\n        color: '#cccccc',\n        width: '1',\n      },\n      crossStyle: {\n        color: '#cccccc',\n        width: '1',\n      },\n    },\n  },\n  timeline: {\n    lineStyle: {\n      color: '#eeeeee',\n      width: 1,\n    },\n    itemStyle: {\n      color: '#dd6b66',\n      borderWidth: 1,\n    },\n    controlStyle: {\n      color: '#eeeeee',\n      borderColor: '#eeeeee',\n      borderWidth: 0.5,\n    },\n    checkpointStyle: {\n      color: '#e43c59',\n      borderColor: '#c23531',\n    },\n    label: {\n      color: '#eeeeee',\n    },\n    emphasis: {\n      itemStyle: {\n        color: '#a9334c',\n      },\n      controlStyle: {\n        color: '#eeeeee',\n        borderColor: '#eeeeee',\n        borderWidth: 0.5,\n      },\n      label: {\n        color: '#eeeeee',\n      },\n    },\n  },\n  visualMap: {\n    color: ['#bf444c', '#d88273', '#f6efa6'],\n  },\n  dataZoom: {\n    backgroundColor: 'rgba(47,69,84,0)',\n    dataBackgroundColor: 'rgba(255,255,255,0.3)',\n    fillerColor: 'rgba(167,183,204,0.4)',\n    handleColor: '#a7b7cc',\n    handleSize: '100%',\n    textStyle: {\n      color: '#eeeeee',\n    },\n  },\n  markPoint: {\n    label: {\n      color: '#eeeeee',\n    },\n    emphasis: {\n      label: {\n        color: '#eeeeee',\n      },\n    },\n  },\n};\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { EChartsType } from 'echarts';\nimport debounce from 'lodash/debounce';\nimport { OnBrushedCallback } from '@openassistant/hooks';\nimport { OnSelected } from '@openassistant/plots';\n\n/**\n * Debounced version of the onSelected callback to prevent too frequent updates\n * when brushing data points.\n *\n * @param params - Object containing dataset name and filtered indices\n * @param params.datasetName - Name of the dataset being brushed\n * @param params.filteredIndex - Array of indices that are currently brushed\n * @param callback - Optional callback function to handle brush selection\n */\nconst debouncedOnBrush = debounce(\n  (\n    params: { datasetName: string; filteredIndex: number[] },\n    callback?: OnBrushedCallback\n  ) => {\n    callback?.(params.filteredIndex, params.datasetName);\n  },\n  500\n);\n\nconst debouncedOnSelected = debounce(\n  (\n    params: { datasetName: string; filteredIndex: number[] },\n    callback?: OnSelected\n  ) => {\n    callback?.(params.datasetName, params.filteredIndex);\n  },\n  500\n);\n\n/**\n * Handles brush selection events from ECharts components.\n * Manages highlighting and callback execution for brushed data points.\n *\n * @param eChart - ECharts instance\n * @param brushed - Array of indices that are currently brushed\n * @param datasetName - Name of the dataset being brushed\n * @param onBrushed - Optional callback function to handle brush selection\n * @param onSelected - Optional callback function to handle brush selection\n */\nexport function handleBrushSelection(\n  eChart: EChartsType | undefined,\n  brushed: number[],\n  datasetName: string,\n  onBrushed?: OnBrushedCallback,\n  onSelected?: OnSelected\n) {\n  // check if brushed.length is 0 after 100ms, since brushSelected may return empty array for some reason?!\n  setTimeout(() => {\n    if (eChart && brushed.length === 0) {\n      // clear any highlighted if no data is brushed\n      eChart.dispatchAction({ type: 'downplay' });\n    }\n  }, 100);\n\n  // Debounce the onSelected callback\n  debouncedOnBrush({ datasetName, filteredIndex: brushed }, onBrushed);\n  if (onSelected && brushed.length > 0) {\n    debouncedOnSelected({ datasetName, filteredIndex: brushed }, onSelected);\n  }\n}\n\n/**\n * Handles the brush selection event from ECharts and processes the selected data indices.\n *\n * @param params - The brush selection event parameters from ECharts\n * @param params.batch - Array of batch selection data containing selected data indices\n * @param id - The identifier for the chart instance\n * @param datasetName - Name of the dataset being visualized\n * @param eChart - Optional ECharts instance reference\n * @param onSelected - Optional callback function to handle brush selection\n */\nexport function onBrushSelected(\n  params: {\n    batch: {\n      selected: {\n        dataIndex: number[];\n      }[];\n    }[];\n  },\n  id: string,\n  datasetName: string,\n  eChart?: EChartsType,\n  onBrushed?: OnBrushedCallback,\n  onSelected?: OnSelected\n) {\n  if (!id || !params.batch || params.batch.length === 0) {\n    return;\n  }\n\n  const brushed: number[] = [];\n  const brushComponent = params.batch[0];\n  for (let sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n    const rawIndices = brushComponent.selected[sIdx].dataIndex;\n    // merge rawIndices to brushed\n    brushed.push(...rawIndices);\n  }\n\n  handleBrushSelection(eChart, brushed, datasetName, onBrushed);\n  if (onSelected) {\n    onSelected(datasetName, brushed);\n  }\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport {\n  Table,\n  TableHeader,\n  TableBody,\n  TableColumn,\n  TableRow,\n  TableCell,\n} from '@heroui/react';\nimport { BoxplotDataProps } from '@openassistant/plots';\n\nimport { Boxplot, BoxplotOutputData } from './box-plot';\n\nexport function BoxplotToolComponent(\n  props: BoxplotOutputData\n): JSX.Element | null {\n  return <BoxplotComponent {...props} />;\n}\n\n// /**\n//  * BoxplotComponentContainer for rendering box plot visualizations with expandable container.\n//  * With expandable container, the box plot can be:\n//  * - expanded to a modal dialog with box plots rendered in vertical direction and with detailed statistics table.\n//  * - dragged and dropped to other places.\n//  * - resized.\n//  * - have a tooltip with detailed statistics.\n//  *\n//  * @param props {@link BoxplotOutputData} Configuration and data for the box plot\n//  * @returns Box plot visualization with optional detailed statistics table\n//  */\n// export function BoxplotComponentContainer(\n//   props: BoxplotOutputData\n// ): JSX.Element | null {\n//   const [isExpanded, setIsExpanded] = useState(props.isExpanded);\n\n//   const onDragStart = useDraggable({\n//     id: props.id,\n//     type: 'boxplot',\n//     data: props,\n//   });\n\n//   const onExpanded = (flag: boolean) => {\n//     setIsExpanded(flag);\n//   };\n\n//   return (\n//     <ExpandableContainer\n//       defaultWidth={isExpanded ? 600 : undefined}\n//       defaultHeight={isExpanded ? 600 : props.variables.length * 100 + 120}\n//       draggable={props.isDraggable || false}\n//       onDragStart={onDragStart}\n//       onExpanded={onExpanded}\n//     >\n//       <BoxplotComponent {...props} />\n//     </ExpandableContainer>\n//   );\n// }\n\n/**\n * Component that renders a box plot visualization with optional expanded statistics table.\n * See {@link BoxplotComponentContainer} for detailed usage and features.\n *\n * @param props {@link BoxplotOutputData} Configuration and data for the box plot\n * @returns Box plot visualization with optional detailed statistics table\n */\nexport function BoxplotComponent(props: BoxplotOutputData): JSX.Element | null {\n  /**\n   * Creates table cells for a given metric and boxplot data\n   *\n   * @param metric - Statistical metric to display (e.g. 'low', 'q1', 'mean')\n   * @param boxplotData - Data containing boxplot statistics\n   * @returns Array of table cells with formatted metric values\n   */\n  const createTableCells = (metric: string, boxplotData: BoxplotDataProps) => {\n    const tableCells: JSX.Element[] = [];\n    tableCells.push(<TableCell key=\"metric-label\">{metric}</TableCell>);\n    boxplotData.boxplots.forEach((boxplot) => {\n      tableCells.push(\n        <TableCell key={boxplot.name}>{boxplot[metric].toFixed(4)}</TableCell>\n      );\n    });\n    return tableCells;\n  };\n\n  /**\n   * Generates table rows for all boxplot statistics\n   *\n   * @param boxplotData - Data containing boxplot statistics\n   * @returns Array of table rows with statistical metrics\n   */\n  const generateStatsRows = (boxplotData: BoxplotDataProps) => {\n    const metrics = ['low', 'q1', 'q2', 'q3', 'high', 'mean', 'std', 'iqr'];\n\n    return metrics.map((metric, index) => (\n      <TableRow key={`${metric.toLowerCase()}-stats-${index}`}>\n        {createTableCells(metric, boxplotData)}\n      </TableRow>\n    ));\n  };\n\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[300px]\">\n      <div className=\"relative h-full w-full flex flex-col rounded-lg gap-2 shadow-secondary-1 dark:text-gray-100\">\n        <div className=\"relative h-full py-2 flex-grow\">\n          <div className=\"h-full w-full\">\n            <Boxplot {...props} />\n          </div>\n        </div>\n        <div className=\"footer text-xs\">\n          {props.isExpanded && (\n            <div className=\"w-full text-tiny\">\n              <Table\n                aria-label=\"Box Plot Statistics\"\n                classNames={{\n                  base: 'overflow-scroll p-0 m-0 text-tiny',\n                  table: 'p-0 m-0 text-tiny',\n                  wrapper: 'p-0 pr-2',\n                  th: 'text-tiny',\n                  td: 'text-tiny text-default-500',\n                }}\n                isCompact={true}\n                removeWrapper={true}\n              >\n                <TableHeader>\n                  <>\n                    <TableColumn key=\"metric\"> </TableColumn>\n                    {props.variables.map((variable) => (\n                      <TableColumn key={variable}>{variable}</TableColumn>\n                    ))}\n                  </>\n                </TableHeader>\n                <TableBody>{generateStatsRows(props.boxplotData)}</TableBody>\n              </Table>\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { useMemo, useRef, useState } from 'react';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { ScatterChart } from 'echarts/charts';\nimport {\n  TooltipComponent,\n  GridComponent,\n  BrushComponent,\n  ToolboxComponent,\n} from 'echarts/components';\nimport * as echarts from 'echarts/core';\nimport ReactEChartsCore from 'echarts-for-react';\nimport { OnSelected } from '@openassistant/plots';\nimport { useBrushLink } from '@openassistant/hooks';\n\nimport { ECHARTS_DARK_THEME } from '../echarts-theme';\nimport { handleBrushSelection } from '../echarts-updater';\nimport { createBubbleChartOption } from './bubble-chart-option';\n\n// Register the required components\necharts.use([\n  TooltipComponent,\n  GridComponent,\n  ScatterChart,\n  CanvasRenderer,\n  BrushComponent,\n  ToolboxComponent,\n]);\necharts.registerTheme('dark', ECHARTS_DARK_THEME);\n\nexport type BubbleChartOutputData = {\n  id?: string;\n  datasetName: string;\n  data: {\n    variableX: {\n      name: string;\n      values: number[];\n    };\n    variableY: {\n      name: string;\n      values: number[];\n    };\n    variableSize: {\n      name: string;\n      values: number[];\n    };\n    variableColor?: {\n      name: string;\n      values: (number | string)[];\n    };\n  };\n  theme?: string;\n  isExpanded?: boolean;\n  isDraggable?: boolean;\n  onSelected?: OnSelected;\n};\n\nexport function BubbleChart(props: BubbleChartOutputData): JSX.Element | null {\n  const { id, datasetName, data, theme, onSelected } = props;\n\n  const option = useMemo(() => {\n    return createBubbleChartOption(data);\n  }, [data]);\n\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  // track if the chart has been rendered, so we can update the chart later\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [rendered, setRendered] = useState(false);\n\n  // link when other components update\n  const { brush, componentId } = useBrushLink({\n    defaultDataId: datasetName,\n    componentId: id,\n    onLink: (highlightedRows, sourceDataId) => {\n      console.log(\n        `Chart One (${componentId}) received update for ${sourceDataId}:`,\n        highlightedRows\n      );\n      if (\n        rendered &&\n        eChartsRef.current &&\n        highlightedRows &&\n        componentId !== sourceDataId\n      ) {\n        const chartInstance = eChartsRef.current?.getEchartsInstance();\n        // cancel current highlight\n        chartInstance?.dispatchAction({ type: 'downplay' });\n        // highlight the new rows\n        if (highlightedRows.length < data.variableX.values.length) {\n          chartInstance?.dispatchAction({\n            type: 'highlight',\n            dataIndex: highlightedRows,\n          });\n        }\n      }\n    },\n  });\n\n  // brush to trigger other components to update\n  const bindEvents = useMemo(\n    () => ({\n      brushSelected: function (params) {\n        if (eChartsRef.current) {\n          const eChart = eChartsRef.current?.getEchartsInstance();\n          const brushed: number[] = [];\n          const brushComponent = params.batch[0];\n          for (let sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n            const rawIndices = brushComponent.selected[sIdx].dataIndex;\n            // merge rawIndices to brushed\n            brushed.push(...rawIndices);\n          }\n          // check if brushed.length is 0 after 100ms, since brushSelected may return empty array for some reason?!\n          setTimeout(() => {\n            if (eChart && brushed.length === 0) {\n              // clear any highlighted if no data is brushed\n              eChart.dispatchAction({ type: 'downplay' });\n            }\n          }, 100);\n\n          handleBrushSelection(eChart, brushed, datasetName, brush, onSelected);\n          // Dispatch action to highlight selected in other components\n        }\n      },\n      rendered: function () {\n        setRendered(true);\n      },\n    }),\n    [brush, datasetName, onSelected]\n  );\n\n  return useMemo(\n    () => (\n      <div className=\"h-full w-full flex flex-col rounded-lg pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">\n            {`x: ${data.variableX.name}, y: ${data.variableY.name}, size: ${data.variableSize.name}`}\n            {data.variableColor && `, color: ${data.variableColor.name}`}\n          </p>\n          <small className=\"text-default-500\">{datasetName}</small>\n        </div>\n        <div style={{ height: '100%' }} className=\"py-2 flex-grow\">\n          <ReactEChartsCore\n            echarts={echarts}\n            option={option}\n            notMerge={true}\n            lazyUpdate={true}\n            theme={theme || 'dark'}\n            onEvents={bindEvents}\n            style={{ height: '100%', width: '100%' }}\n            ref={eChartsRef}\n          />\n        </div>\n      </div>\n    ),\n    [\n      data.variableX.name,\n      data.variableY.name,\n      data.variableSize.name,\n      data.variableColor,\n      datasetName,\n      option,\n      theme,\n      bindEvents,\n    ]\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { EChartsOption } from 'echarts';\nimport {\n  CallbackDataParams,\n  TopLevelFormatterParams,\n} from 'echarts/types/dist/shared';\n\nimport { BubbleChartOutputData } from './bubble-chart';\n\n/**\n * Creates an ECharts option configuration for rendering a bubble chart.\n *\n * @param props - The input data for the bubble chart\n * @param props.data - The data object containing the following variables:\n *   - variableX: The X-axis variable containing name and values\n *   - variableY: The Y-axis variable containing name and values\n *   - variableSize: The variable controlling bubble sizes, containing name and values\n *   - variableColor: Optional variable controlling bubble colors, containing name and values\n *\n * @returns An ECharts option configuration object that defines:\n * - Scatter plot with variable-sized bubbles\n * - Customizable bubble colors\n * - Interactive tooltips showing data points' details\n * - Brush selection tools\n * - Responsive grid layout\n * - Optimized animation settings for performance\n *\n * @example\n * const data = {\n *   variableX: { name: 'GDP', values: [1000, 2000, 3000] },\n *   variableY: { name: 'Life Expectancy', values: [70, 75, 80] },\n *   variableSize: { name: 'Population', values: [1000000, 2000000, 3000000] },\n *   variableColor: { name: 'Region', values: ['A', 'B', 'C'] }\n * };\n * const option = createBubbleChartOption({ data });\n */\nexport function createBubbleChartOption(data: BubbleChartOutputData['data']) {\n  const xData = data.variableX.values;\n  const yData = data.variableY.values;\n  const sizeData = data.variableSize.values;\n  const colorData = data.variableColor?.values;\n\n  const variableX = data.variableX.name;\n  const variableY = data.variableY.name;\n\n  // standardize sizeData in the range [0, 1]\n  const sizeDataMin = Math.min(...sizeData);\n  const sizeDataMax = Math.max(...sizeData);\n  const sizeDataRange = sizeDataMax - sizeDataMin;\n  const sizeDataStandardized = sizeData.map(\n    (d) => (50 * (d - sizeDataMin)) / sizeDataRange\n  );\n\n  const seriesData = xData.map((x, i) => [\n    x,\n    yData[i],\n    sizeDataStandardized[i],\n    colorData?.[i] || 0,\n  ]);\n\n  const option: EChartsOption = {\n    xAxis: {\n      type: 'value',\n      splitLine: { show: false },\n    },\n    yAxis: {\n      type: 'value',\n      splitLine: { show: false },\n    },\n    series: [\n      {\n        data: seriesData,\n        type: 'scatter',\n        symbolSize: function (params: CallbackDataParams) {\n          return params[2]; // the third element in the data array for size adjustments\n        },\n        itemStyle: {\n          color: function (params: CallbackDataParams) {\n            return params[3] || 'lightblue'; // fourth element for color\n          },\n          borderColor: '#555',\n          opacity: 0.5,\n        },\n        emphasis: {\n          focus: 'series',\n          itemStyle: {\n            borderColor: 'red',\n          },\n        },\n        animationDelay: 0,\n      },\n    ],\n    tooltip: {\n      trigger: 'item' as const,\n      formatter: (params: TopLevelFormatterParams) => {\n        const { dataIndex, value } = params as CallbackDataParams;\n        const sizeValue = sizeDataStandardized[dataIndex].toFixed(2);\n        return value\n          ? `${variableX}: ${value[0]}<br/>${variableY}: ${value[1]}<br/>Size: ${sizeValue}` +\n              (value[3] ? `<br/>Color: ${value[3]}` : '')\n          : '';\n      },\n      axisPointer: {\n        type: 'cross',\n      },\n    },\n    brush: {\n      toolbox: ['rect', 'polygon', 'clear'],\n      xAxisIndex: 0,\n      yAxisIndex: 0,\n    },\n    grid: {\n      left: '3%',\n      right: '5%',\n      bottom: '3%',\n      containLabel: true,\n    },\n    animation: false,\n    progressive: 0,\n  };\n\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { BubbleChartOutputData, BubbleChart } from './bubble-chart';\n\n/**\n * A React component that renders an interactive bubble chart visualization.\n *\n * @param props BubbleChartOutputData - The configuration and data for the bubble chart:\n *   - datasetName: string - The name of the dataset being visualized\n *   - data: object - The chart data containing:\n *     - variableX: number[] - X-axis values for each bubble\n *     - variableY: number[] - Y-axis values for each bubble\n *     - variableSize: number[] - Size values for each bubble\n *     - variableColor?: (number | string)[] - Optional color values for each bubble\n *   - theme?: string - Optional theme setting for the chart\n *   - isExpanded?: boolean - Optional flag to control chart expansion state\n *   - isDraggable?: boolean - Optional flag to enable/disable drag functionality\n *\n * @returns A responsive bubble chart wrapped in an auto-sizing container\n *\n * @example\n * <BubbleChartComponent\n *   datasetName=\"Sample Dataset\"\n *   data={{\n *     variableX: [1, 2, 3],\n *     variableY: [4, 5, 6],\n *     variableSize: [10, 20, 30],\n *     variableColor: ['#ff0000', '#00ff00', '#0000ff']\n *   }}\n * />\n */\nexport function BubbleChartComponent(\n  props: BubbleChartOutputData\n): JSX.Element | null {\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[300px]\">\n      <div className=\"relative h-full w-full flex flex-col rounded-lg gap-2 pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"relative h-full py-2 flex-grow \">\n          <div className=\"absolute left-0 top-0 h-full w-full\">\n            <BubbleChart {...props} />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\n// export function BubbleChartComponentContainer(\n//   props: BubbleChartOutputData\n// ): JSX.Element | null {\n//   const [isExpanded, setIsExpanded] = useState(props.isExpanded);\n\n//   const onDragStart = useDraggable({\n//     id: props.id || generateId(),\n//     type: 'bubble',\n//     data: props,\n//   });\n\n//   const onExpanded = (flag: boolean) => {\n//     setIsExpanded(flag);\n//   };\n\n//   return (\n//     <ExpandableContainer\n//       defaultWidth={isExpanded ? 600 : undefined}\n//       defaultHeight={isExpanded ? 600 : 380}\n//       draggable={props.isDraggable || false}\n//       onDragStart={onDragStart}\n//       onExpanded={onExpanded}\n//     >\n//       <BubbleChartComponent {...props} />\n//     </ExpandableContainer>\n//   );\n// }\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { HistogramOutputData } from './histogram-plot';\n\n// type guard for histogram output data\nexport function isHistogramOutputData(\n  data: unknown\n): data is HistogramOutputData {\n  return (\n    typeof data === 'object' &&\n    data !== null &&\n    'datasetName' in data &&\n    'variableName' in data &&\n    'histogramData' in data &&\n    'barDataIndexes' in data\n  );\n}\n\n// export function HistogramComponentContainer(\n//   props: HistogramOutputData\n// ): JSX.Element | null {\n//   const [isExpanded, setIsExpanded] = useState(props.isExpanded);\n\n//   const onDragStart = useDraggable({\n//     id: props.id || generateId(),\n//     type: 'histogram',\n//     data: props,\n//   });\n\n//   const onExpanded = (flag: boolean) => {\n//     setIsExpanded(flag);\n//   };\n\n//   return (\n//     <ExpandableContainer\n//       defaultWidth={isExpanded ? 600 : undefined}\n//       defaultHeight={isExpanded ? 600 : 380}\n//       draggable={props.isDraggable || false}\n//       onDragStart={onDragStart}\n//       onExpanded={onExpanded}\n//     >\n//       <HistogramPlotComponent {...props} />\n//     </ExpandableContainer>\n//   );\n// }\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { useMemo, useRef, useState } from 'react';\nimport ReactEChartsCore from 'echarts-for-react';\n\nimport {\n  use as echartsUse,\n  registerTheme as echartsRegisterTheme,\n} from 'echarts/core';\nimport { BarChart } from 'echarts/charts';\nimport {\n  GridComponent,\n  TooltipComponent,\n  BrushComponent,\n  ToolboxComponent,\n} from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { HistogramDataProps } from '@openassistant/plots';\n\nimport { ECHARTS_DARK_THEME } from '../echarts-theme';\nimport { getHistogramChartOption } from './histogram-option';\n\nechartsUse([\n  BarChart,\n  GridComponent,\n  TooltipComponent,\n  BrushComponent,\n  ToolboxComponent,\n  CanvasRenderer,\n]);\n\nechartsRegisterTheme('dark', ECHARTS_DARK_THEME);\n\nexport type HistogramOutputData = {\n  id?: string;\n  datasetName: string;\n  variableName: string;\n  histogramData: HistogramDataProps[];\n  barDataIndexes: number[][];\n  onSelected?: (datasetName: string, selectedIndices: number[]) => void;\n  theme?: string;\n  isExpanded?: boolean;\n  isDraggable?: boolean;\n};\n\nexport function HistogramPlotComponent({\n  datasetName,\n  histogramData,\n  barDataIndexes,\n  variableName,\n  onSelected,\n  theme,\n}: HistogramOutputData): JSX.Element | null {\n  // get chart option by calling getChartOption only once\n  const option = useMemo(() => {\n    try {\n      return getHistogramChartOption(null, histogramData, barDataIndexes);\n    } catch {\n      return {};\n    }\n  }, [histogramData, barDataIndexes]);\n\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  // track if the chart has been rendered, so we can update the chart later\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [rendered, setRendered] = useState(false);\n\n  // bind events for brush selection in eCharts Histogram\n  const bindEvents = useMemo(() => {\n    return {\n      brushSelected: function (params: {\n        batch: Array<{\n          selected: Array<{\n            dataIndex: number[];\n          }>;\n        }>;\n      }) {\n        const brushed: number[] = [];\n        const brushComponent = params.batch[0];\n\n        for (let sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n          const rawIndices = brushComponent.selected[sIdx]\n            .dataIndex as number[];\n          brushed.push(...rawIndices);\n        }\n\n        // get selected ids from brushed bars\n        const filteredIndex =\n          brushed.length > 0\n            ? brushed.map((idx: number) => barDataIndexes[idx]).flat()\n            : [];\n\n        // check if this plot is in state.plots\n        if (brushed.length === 0) {\n          // reset options\n          const chart = eChartsRef.current;\n          if (chart) {\n            const chartInstance = chart.getEchartsInstance();\n            const updatedOption = getHistogramChartOption(\n              null,\n              histogramData ?? [],\n              barDataIndexes ?? []\n            );\n            chartInstance.setOption(updatedOption);\n          }\n        }\n        // Dispatch action to highlight selected in other components\n        onSelected?.(datasetName ?? '', filteredIndex);\n      },\n    };\n  }, [datasetName, onSelected, histogramData, barDataIndexes]);\n\n  if (!variableName || !histogramData || !barDataIndexes) {\n    return null;\n  }\n\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[300px]\">\n      <div className=\"h-full w-full flex flex-col rounded-lg pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">{variableName}</p>\n          <small className=\"truncate text-default-500\">{variableName}</small>\n        </div>\n        <div style={{ height: '100%' }} className=\"py-2 flex-grow\">\n          <ReactEChartsCore\n            option={option}\n            notMerge={true}\n            lazyUpdate={true}\n            style={{ height: '100%', width: '100%' }}\n            ref={eChartsRef}\n            theme={theme || 'dark'}\n            onEvents={bindEvents}\n            onChartReady={() => {\n              setRendered(true);\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { EChartsOption } from 'echarts';\nimport {\n  TopLevelFormatterParams,\n  CallbackDataParams,\n} from 'echarts/types/dist/shared';\nimport {\n  HistogramDataProps,\n  NumericHistogramDataProps,\n} from '@openassistant/plots';\nimport { numericFormatter } from '@openassistant/utils';\n\nconst defaultBarColors = [\n  '#FF6B6B',\n  '#48BB78',\n  '#4299E1',\n  '#ED64A6',\n  '#F6E05E',\n];\n\nexport function getHistogramChartOption(\n  filteredIndex: number[] | null,\n  histogramData: HistogramDataProps[],\n  barDataIndexes: number[][]\n): EChartsOption {\n  const hasHighlighted = filteredIndex && filteredIndex.length > 0;\n\n  // create a dictionary to store the indexes of data items that have been filtered\n  const filteredIndexDict: { [key: number]: boolean } = {};\n  if (hasHighlighted) {\n    filteredIndex.forEach((d: number) => {\n      filteredIndexDict[d] = true;\n    });\n  }\n\n  // build highlighted bars from filteredIndex and filteredIndexDict\n  const highlightedBars = histogramData.map(\n    (d: HistogramDataProps, i: number) => {\n      // get highlighted ids for each bar\n      const highlightedIds = barDataIndexes[i].filter(\n        (d: number) => filteredIndexDict[d] === true\n      );\n\n      return {\n        value: hasHighlighted ? highlightedIds?.length : 0,\n        itemStyle: {\n          color: defaultBarColors[i % defaultBarColors.length],\n          opacity: 1,\n        },\n        name:\n          'binStart' in d && typeof d.binStart === 'string'\n            ? d.binStart\n            : `[${numericFormatter((d as NumericHistogramDataProps).binStart)} - ${numericFormatter((d as NumericHistogramDataProps).binEnd)}]`,\n        // ids that associated with the bar and been filtered\n        ids: hasHighlighted ? highlightedIds : [],\n      };\n    }\n  );\n\n  // use binStart values as the x axis tick values\n  // const xTickValues = plotData.map((d: HistogramDataProps) => d.binStart.toFixed(1));\n\n  // get min value from plotData\n  const isNumeric =\n    'binStart' in histogramData[0] &&\n    typeof histogramData[0].binStart === 'number';\n  const minValue = isNumeric\n    ? (histogramData[0] as NumericHistogramDataProps).binStart\n    : 0;\n  const maxValue = isNumeric\n    ? (histogramData[histogramData.length - 1] as NumericHistogramDataProps)\n        .binEnd\n    : 0;\n  const numBins = histogramData.length;\n  const interval = isNumeric ? (maxValue - minValue) / numBins : 1;\n\n  // get bar data from plotData\n  const barData = histogramData.map((d: HistogramDataProps, i: number) => {\n    return {\n      value: hasHighlighted\n        ? barDataIndexes[i].length - highlightedBars[i].value\n        : barDataIndexes[i].length,\n      itemStyle: {\n        color: defaultBarColors[i % defaultBarColors.length],\n        opacity: hasHighlighted ? 0.5 : 1,\n        shadowBlur: 10,\n        shadowColor: 'rgba(0,0,0,0.3)',\n      },\n      name:\n        'binStart' in d && typeof d.binStart === 'string'\n          ? d.binStart\n          : `[${numericFormatter((d as NumericHistogramDataProps).binStart)} - ${numericFormatter((d as NumericHistogramDataProps).binEnd)}]`,\n      // ids that associated with the bar and been filtered\n      ids: barDataIndexes[i],\n    };\n  });\n\n  const series = [\n    {\n      data: highlightedBars,\n      type: 'bar' as const,\n      barWidth: '90%',\n      stack: 'total',\n      xAxisIndex: 0,\n    },\n    {\n      data: barData,\n      type: 'bar' as const,\n      barWidth: '90%',\n      stack: 'total',\n      xAxisIndex: 0,\n      label: {\n        show: false,\n        position: [0, -15],\n        formatter: function (params: CallbackDataParams): string {\n          return (params.value as number) + '';\n        },\n      },\n    },\n  ];\n\n  // build option for echarts\n  const option: EChartsOption = {\n    xAxis: [\n      {\n        type: 'category',\n        data: isNumeric\n          ? undefined\n          : histogramData.map((d) => d.binStart as string),\n        axisTick: { show: false },\n        axisLabel: {\n          show: !isNumeric,\n          interval: 0,\n          hideOverlap: true,\n          rotate: 35,\n          overflow: 'truncate',\n        },\n        axisLine: { show: false },\n        position: 'bottom',\n        splitLine: {\n          show: false,\n        },\n      },\n      {\n        scale: true,\n        type: 'value',\n        min: minValue,\n        max: maxValue,\n        interval: interval,\n        axisLabel: {\n          hideOverlap: true,\n          rotate: 35,\n          overflow: 'truncate',\n          formatter: numericFormatter,\n        },\n        splitLine: {\n          show: false,\n        },\n        position: 'bottom',\n      },\n    ],\n    yAxis: {\n      type: 'value',\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n      splitLine: {\n        show: false,\n      },\n      axisTick: { show: false },\n      axisLine: { show: false },\n    },\n    series,\n    tooltip: {\n      trigger: 'axis',\n      axisPointer: {\n        type: 'shadow',\n      },\n      formatter: function (\n        params: TopLevelFormatterParams | TopLevelFormatterParams[]\n      ) {\n        const paramsArray = Array.isArray(params) ? params : [params];\n        // ids that associated with the bar\n        const range = (paramsArray[1] as { data: { name: string } }).data.name;\n        const count = (paramsArray[1] as { value: number }).value;\n\n        // If the range is a string value (not in bracket format), just show the value\n        if (!range.startsWith('[')) {\n          return `${range}<br/> Count: ${count}`;\n        }\n\n        return `Range: ${range}<br/> Count: ${count}`;\n      },\n    },\n    brush: {\n      toolbox: ['rect', 'keep', 'clear'],\n      xAxisIndex: 0,\n    },\n    grid: [\n      {\n        left: '3%',\n        right: '5%',\n        top: '20%',\n        bottom: '0%',\n        containLabel: true,\n        height: 'auto',\n      },\n    ],\n  };\n\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { ParallelChart } from 'echarts/charts';\nimport * as echarts from 'echarts/core';\nimport ReactEChartsCore from 'echarts-for-react';\nimport { useMemo, useRef, useState } from 'react';\nimport { ParallelCoordinateDataProps, OnSelected } from '@openassistant/plots';\nimport { useBrushLink } from '@openassistant/hooks';\n\nimport { createParallelCoordinateOption } from './pcp-option';\nimport { handleBrushSelection } from '../echarts-updater';\nimport { ECHARTS_DARK_THEME } from '../echarts-theme';\n\n// Register the required components\necharts.use([CanvasRenderer, ParallelChart]);\necharts.registerTheme('dark', ECHARTS_DARK_THEME);\n\n/**\n * Props for the Parallel Coordinate Plot component\n * @interface ParallelCoordinateOutputData\n * @property {string} id - Unique identifier for the component\n * @property {string} datasetName - Name of the dataset being visualized\n * @property {string[]} variables - Array of variable names to display\n * @property {ParallelCoordinateDataProps} pcp - Configuration for parallel coordinate plot\n * @property {Record<string, number[]>} rawData - Raw data for the plot, mapping variable names to arrays of values\n * @property {string} [theme] - Optional theme name for the chart ('dark' by default)\n * @property {boolean} [isDraggable] - Optional flag to enable dragging\n * @property {boolean} [isExpanded] - Optional flag for expanded state\n * @property {(isExpanded: boolean) => void} [setIsExpanded] - Optional callback to handle expansion state changes\n */\nexport type ParallelCoordinateOutputData = {\n  id: string;\n  datasetName: string;\n  variables: string[];\n  pcp: ParallelCoordinateDataProps;\n  rawData: Record<string, number[]>;\n  theme?: string;\n  isDraggable?: boolean;\n  isExpanded?: boolean;\n  setIsExpanded?: (isExpanded: boolean) => void;\n  onSelected?: OnSelected;\n};\n\n/**\n * A React component that renders a Parallel Coordinate Plot using ECharts\n *\n * This component visualizes multivariate data using parallel coordinates, where each vertical\n * axis represents a variable and each line represents an observation. It supports interactive\n * brushing and linking with other components through the useBrushLink hook.\n *\n * @component\n * @param {ParallelCoordinateOutputData} props - Component props\n * @returns {JSX.Element} Rendered parallel coordinate plot\n *\n * @example\n * ```tsx\n * <ParallelCoordinatePlot\n *   id=\"pcp1\"\n *   datasetName=\"dataset1\"\n *   variables={['var1', 'var2', 'var3']}\n *   pcp={pcpData}\n *   rawData={data}\n *   theme=\"dark\"\n * />\n * ```\n */\nexport function ParallelCoordinatePlot(props: ParallelCoordinateOutputData) {\n  const {\n    id,\n    datasetName,\n    variables,\n    pcp,\n    rawData,\n    theme,\n    isExpanded,\n    onSelected,\n  } = props;\n\n  const option = useMemo(() => {\n    return createParallelCoordinateOption({\n      pcp,\n      rawData,\n      theme: theme || 'dark',\n      isExpanded: isExpanded || false,\n    });\n  }, [pcp, rawData, theme, isExpanded]);\n\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  // track if the chart has been rendered, so we can update the chart later\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [rendered, setRendered] = useState(false);\n\n  // link when other components update\n  const { brush, componentId } = useBrushLink({\n    defaultDataId: datasetName,\n    componentId: id,\n    onLink: (highlightedRows, sourceDataId) => {\n      console.log(\n        `Chart One (${componentId}) received update for ${sourceDataId}:`,\n        highlightedRows\n      );\n      if (\n        rendered &&\n        eChartsRef.current &&\n        highlightedRows &&\n        componentId !== sourceDataId\n      ) {\n        const chartInstance = eChartsRef.current?.getEchartsInstance();\n        // cancel current highlight\n        chartInstance?.dispatchAction({ type: 'downplay' });\n        // highlight the new rows\n        if (highlightedRows.length < Object.values(rawData)[0].length) {\n          chartInstance?.dispatchAction({\n            type: 'highlight',\n            dataIndex: highlightedRows,\n          });\n        }\n      }\n    },\n  });\n\n  // brush to trigger other components to update\n  const bindEvents = useMemo(\n    () => ({\n      brushSelected: function (params) {\n        if (eChartsRef.current) {\n          console.log('brushSelected: params = ', params);\n          const chartInstance = eChartsRef.current.getEchartsInstance();\n          // @ts-expect-error todo: will fix later getModel() is private\n          const series = chartInstance.getModel().getSeries()[0];\n          const brushed: number[] = series.getRawIndicesByActiveState('active');\n\n          // clear any highlighted if no data is brushed\n          if (chartInstance && brushed.length === 0) {\n            chartInstance.dispatchAction({ type: 'downplay' });\n            // clear the selection area on axis by just re-rendering the chart\n            chartInstance.setOption(option);\n          }\n          handleBrushSelection(\n            chartInstance,\n            brushed,\n            datasetName,\n            brush,\n            onSelected\n          );\n        }\n      },\n      rendered: function () {\n        setRendered(true);\n      },\n    }),\n    [datasetName, brush, option, onSelected]\n  );\n\n  return useMemo(\n    () => (\n      <div className=\"h-full w-full flex flex-col rounded-lg  pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">{variables.join(',')}</p>\n          <small className=\"text-default-500\">{datasetName}</small>\n        </div>\n        <div style={{ height: '100%' }} className=\"py-2 flex-grow\">\n          <ReactEChartsCore\n            echarts={echarts}\n            option={option}\n            notMerge={true}\n            lazyUpdate={true}\n            theme={theme || 'dark'}\n            onEvents={bindEvents}\n            style={{ height: '100%', width: '100%' }}\n            ref={eChartsRef}\n          />\n        </div>\n      </div>\n    ),\n    [variables, datasetName, option, theme, bindEvents]\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { EChartsOption } from 'echarts';\nimport * as echarts from 'echarts';\nimport { ParallelCoordinateDataProps } from '@openassistant/plots';\nimport { numericFormatter } from '@openassistant/utils';\n\n/**\n * Configuration properties for the Parallel Coordinates Plot (PCP) chart.\n *\n * @param pcp - Parallel coordinate data properties containing configuration for the visualization\n * @param rawData - Raw data object with variable names as keys and their corresponding numeric values as arrays\n * @param theme - Theme name to be applied to the chart\n * @param isExpanded - Boolean flag indicating if the chart is in expanded state\n *\n * @example\n * ```ts\n * const pcpProps: PcpChartOptionProps = {\n *   pcp: { ... },\n *   rawData: {\n *     'population': [100, 200, 300],\n *     'income': [50000, 60000, 70000]\n *   },\n *   theme: 'light',\n *   isExpanded: false\n * };\n * ```\n */\nexport type PcpChartOptionProps = {\n  pcp: ParallelCoordinateDataProps;\n  rawData: Record<string, number[]>;\n  theme: string;\n  isExpanded: boolean;\n};\n\n/**\n * Creates a parallel coordinate option configuration for the PCP (Parallel Coordinates Plot) chart.\n *\n * @param props - Configuration properties for the parallel coordinate chart\n * @param props.pcp - Parallel coordinate data properties\n * @param props.rawData - Raw data object containing variable names as keys and number arrays as values\n * @param props.theme - Theme name for the chart\n * @param props.isExpanded - Flag indicating if the chart is in expanded state\n * @returns An ECharts option configuration object for parallel coordinates visualization with:\n *          - Parallel axis configuration\n *          - Brushing interaction setup\n *          - Series styling and data mapping\n *          - Layout and grid settings\n *\n * @example\n * ```ts\n * const option = createParallelCoordinateOption({\n *   pcp: parallelCoordProps,\n *   rawData: {\n *     'population': [100, 200, 300],\n *     'income': [50000, 60000, 70000]\n *   },\n *   theme: 'light',\n *   isExpanded: false\n * });\n * ```\n */\nexport function createParallelCoordinateOption(\n  props: PcpChartOptionProps\n): EChartsOption {\n  // create label for each variable\n  const parallelAxis = props.pcp.map((pcp, index) => ({\n    dim: index,\n    // each label is composed as variableName\\n[min, max]\\nmean: mean\\nstd: std\n    name: `${pcp.name}\n[${numericFormatter(pcp.min)}, ${numericFormatter(pcp.max)}]\nmean: ${numericFormatter(pcp.mean)}\nstd: ${numericFormatter(pcp.std)}`,\n  }));\n\n  // get the longest label length of variableNames\n  const maxLabelLength = Math.max(\n    ...parallelAxis.map(\n      (label) =>\n        // Use echarts.format.getTextRect to get accurate text dimensions\n        echarts.format.getTextRect(label.name).width\n    )\n  );\n\n  // Add some padding (e.g., 20px) to ensure text doesn't get cut off\n  const maxLabelPixel = maxLabelLength + 20;\n\n  // transpose the raw data so eCharts can render it\n  let dataRowWise: number[][] = [];\n  if (props.rawData) {\n    // Get arrays directly from rawData\n    const columns = Object.values(props.rawData);\n    const rowCount = columns[0].length;\n    // Pre-allocate the result array for better performance\n    dataRowWise = new Array(rowCount);\n    for (let i = 0; i < rowCount; i++) {\n      dataRowWise[i] = new Array(columns.length);\n      for (let j = 0; j < columns.length; j++) {\n        dataRowWise[i][j] = columns[j][i];\n      }\n    }\n  }\n\n  // build option for echarts\n  const option: EChartsOption = {\n    parallel: {\n      right: '5%',\n      left: `${maxLabelPixel}px`,\n      top: '40px',\n      bottom: '30px',\n      layout: 'vertical',\n      parallelAxisDefault: {\n        axisLabel: {\n          formatter: numericFormatter,\n        },\n        nameLocation: 'start' as const,\n      },\n    },\n    brush: {\n      toolbox: ['clear'],\n      brushLink: 'all',\n    },\n    parallelAxis,\n    series: {\n      type: 'parallel',\n      lineStyle: {\n        opacity: 0.8,\n        color: 'lightblue',\n      },\n      data: dataRowWise,\n      // highlight\n      emphasis: {\n        focus: 'series',\n        lineStyle: {\n          color: 'red',\n          opacity: 1,\n        },\n      },\n      // When perform brush selection, the unselected lines will be set as this transparency rate (which could darken those lines).\n      inactiveOpacity: 0.4,\n      activeOpacity: 1.0,\n    },\n    grid: [\n      {\n        left: '3%',\n        right: '5%',\n        top: '20%',\n        bottom: '0%',\n        containLabel: true,\n        height: 'auto',\n      },\n    ],\n    // avoid flickering when brushing\n    progressive: 0,\n    animation: false,\n    // draggable element\n    // graphic: {\n    //   elements: [\n    //     {\n    //       type: 'group',\n    //       left: maxLabelPixel,\n    //       draggable: 'vertical',\n    //       ondrag: function (params) {\n    //         const pointInPixel = [params.offsetX, params.offsetY];\n    //         // const pointInGrid = echarts.convertFromPixel('grid', pointInPixel);\n\n    //         console.log('pointInGrid', pointInPixel);\n    //         // const d = document.getElementById('value2');\n    //         // d.style.left = params.offsetX + 'px';\n    //         // d.innerHTML = point[1];\n    //       },\n    //       children: [\n    //         {\n    //           type: 'circle',\n    //           top: '10px',\n    //           shape: {\n    //             r: 4,\n    //           },\n    //           style: {\n    //             stroke: 'none',\n    //           },\n    //         },\n    //       ],\n    //     },\n    //   ],\n    // },\n  };\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { ParallelCoordinateOutputData, ParallelCoordinatePlot } from './pcp';\n\n/**\n * Props for the ParallelCoordinateComponent, extending ParallelCoordinateOutputData\n * which contains the data and configuration for the parallel coordinate plot\n *\n * This component is used with the callback-component which is part of the LLM function\n * tool to visualize the parallel coordinate plot and its statistics. See definition of\n * callback-component in the LLM function tool documentation for more details.\n *\n */\nexport function ParallelCoordinateComponent(\n  props: ParallelCoordinateOutputData\n): JSX.Element | null {\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[300px]\">\n      <div className=\"relative h-full w-full flex flex-col rounded-lg gap-2 pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"relative h-full py-2 flex-grow \">\n          <div className=\"absolute left-0 top-0 h-full w-full\">\n            <ParallelCoordinatePlot {...props} />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\n// export function ParallelCoordinateComponentContainer(\n//   props: ParallelCoordinateOutputData\n// ): JSX.Element | null {\n//   const [isExpanded, setIsExpanded] = useState(props.isExpanded);\n\n//   const onDragStart = useDraggable({\n//     id: props.id || generateId(),\n//     type: 'pcp',\n//     data: props,\n//   });\n\n//   const onExpanded = (flag: boolean) => {\n//     setIsExpanded(flag);\n//   };\n\n//   return (\n//     <ExpandableContainer\n//       defaultWidth={isExpanded ? 600 : undefined}\n//       defaultHeight={isExpanded ? 600 : 380}\n//       draggable={props.isDraggable || false}\n//       onDragStart={onDragStart}\n//       onExpanded={onExpanded}\n//     >\n//       <ParallelCoordinatePlot {...props} />\n//     </ExpandableContainer>\n//   );\n// }\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { LoessResult, RegressionResults } from '@openassistant/plots';\nimport { numericFormatter } from '@openassistant/utils';\n\n/**\n * @internal\n *\n * Get the regression line used in echarts scatterplot.\n *\n * @param allRegressionResults - The regression results.\n * @param dataMinX - The minimum x value.\n * @param dataMaxX - The maximum x value.\n * @param dataMinY - The minimum y value.\n * @param dataMaxY - The maximum y value.\n * @returns The regression line.\n */\nexport function getRegressionLine(\n  allRegressionResults: RegressionResults,\n  dataMinX: number,\n  dataMaxX: number,\n  dataMinY: number,\n  dataMaxY: number\n): [number, number][] {\n  const regression = allRegressionResults;\n  const slope = regression.slope.estimate;\n  const intercept = regression.intercept.estimate;\n\n  // Calculate Y values for min and max X\n  const y1 = slope * dataMinX + intercept;\n  const y2 = slope * dataMaxX + intercept;\n\n  // Find X values where the line intersects Y bounds\n  const xAtMinY = (dataMinY - intercept) / slope;\n  const xAtMaxY = (dataMaxY - intercept) / slope;\n\n  // Initialize points array\n  const points: [number, number][] = [];\n\n  // Add points based on which bounds they intersect\n  if (y1 < dataMinY) {\n    points.push([xAtMinY, dataMinY]);\n  } else if (y1 > dataMaxY) {\n    points.push([xAtMaxY, dataMaxY]);\n  } else {\n    points.push([dataMinX, y1]);\n  }\n\n  if (y2 < dataMinY) {\n    points.push([xAtMinY, dataMinY]);\n  } else if (y2 > dataMaxY) {\n    points.push([xAtMaxY, dataMaxY]);\n  } else {\n    points.push([dataMaxX, y2]);\n  }\n\n  // if there is Infinity or NaN return []\n  if (points.some((point) => !isFinite(point[0]) || !isFinite(point[1]))) {\n    return [];\n  }\n  return points;\n}\n\n/**\n * @internal\n * The properties of the scatterplot chart option.\n *\n * @param xVariableName - The name of the x variable.\n * @param xData - The x data.\n * @param yVariableName - The name of the y variable.\n * @param yData - The y data.\n * @param showRegressionLine - Whether to show the regression line.\n * @param showLoess - Whether to show the loess line.\n * @param allRegressionResults - The regression results.\n * @param selectedRegressionResults - The regression results for the selected points.\n * @param unselectedRegressionResults - The regression results for the unselected points.\n * @param loessResult - The loess result.\n */\nexport type ScatterplotChartOptionProps = {\n  xData: number[];\n  yData: number[];\n  showRegressionLine: boolean;\n  showLoess: boolean;\n  allRegressionResults: RegressionResults;\n  selectedRegressionResults?: RegressionResults;\n  unselectedRegressionResults?: RegressionResults;\n  loessResult?: LoessResult;\n};\n\n/**\n * Get the scatterplot chart option.\n *\n * @param props - The properties of the scatterplot chart option. See {@link ScatterplotChartOptionProps} for more details.\n * @returns The scatterplot eChart option.\n */\nexport function getScatterplotChartOption({\n  xData,\n  yData,\n  showRegressionLine,\n  showLoess = false,\n  allRegressionResults,\n  selectedRegressionResults,\n  unselectedRegressionResults,\n  loessResult,\n}: ScatterplotChartOptionProps) {\n  // Calculate bounds once\n  const bounds = {\n    minX: Math.min(...xData),\n    maxX: Math.max(...xData),\n    minY: Math.min(...yData),\n    maxY: Math.max(...yData),\n  };\n\n  // Create regression lines using a helper function\n  const createRegressionLine = (results: RegressionResults) =>\n    getRegressionLine(\n      results,\n      bounds.minX,\n      bounds.maxX,\n      bounds.minY,\n      bounds.maxY\n    );\n\n  // Calculate regression lines conditionally\n  const regressionLines =\n    showRegressionLine && allRegressionResults\n      ? {\n          main: createRegressionLine(allRegressionResults),\n          selected:\n            selectedRegressionResults &&\n            createRegressionLine(selectedRegressionResults),\n          unselected:\n            unselectedRegressionResults &&\n            createRegressionLine(unselectedRegressionResults),\n        }\n      : null;\n\n  // Extract series creation logic\n  const createRegressionSeries = () => [\n    ...(regressionLines?.selected?.length\n      ? [\n          {\n            type: 'line',\n            data: regressionLines.selected,\n            showSymbol: false,\n            itemStyle: { color: '#ff0000' },\n          },\n        ]\n      : []),\n    ...(regressionLines?.unselected?.length\n      ? [\n          {\n            type: 'line',\n            showSymbol: false,\n            data: regressionLines.unselected,\n            itemStyle: { color: '#00ff00' },\n          },\n        ]\n      : []),\n    ...(regressionLines?.main?.length\n      ? [\n          {\n            type: 'line',\n            data: regressionLines.main,\n            showSymbol: false,\n            itemStyle: { color: '#0096ff' },\n            lineStyle: { width: 2 },\n          },\n        ]\n      : []),\n  ];\n\n  // Extract LOESS series creation logic\n  const createLoessSeries = () =>\n    showLoess && loessResult\n      ? [\n          {\n            type: 'line',\n            data: loessResult.fitted,\n            showSymbol: false,\n            itemStyle: { color: '#800080' },\n            lineStyle: { width: 2, type: 'solid' },\n          },\n          ...(['lower', 'upper'] as const).map((bound: 'lower' | 'upper') => ({\n            type: 'line',\n            data: loessResult[bound].map((value, index) => [\n              loessResult.fitted[index][0],\n              value[1],\n            ]),\n            showSymbol: false,\n            lineStyle: { opacity: 0.5, type: 'dotted', width: 1 },\n            itemStyle: { color: '#ffffff' },\n          })),\n        ]\n      : [];\n\n  const seriesData = xData.map((x, i) => [x, yData[i]]);\n\n  const option = {\n    xAxis: {\n      type: 'value',\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n      splitLine: { show: false },\n    },\n    yAxis: {\n      type: 'value',\n      splitLine: { show: false },\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n    },\n    series: [\n      {\n        data: seriesData,\n        type: 'scatter',\n        symbolSize: 3,\n        symbol: seriesData.length > 1000 ? 'rect' : 'circle',\n        itemStyle: {\n          color: 'lightblue',\n          borderColor: '#555',\n          opacity: 0.9,\n          borderWidth: 0,\n        },\n        // highlight\n        emphasis: {\n          // focus: 'series',\n          symbolSize: 6,\n          itemStyle: {\n            color: 'red',\n            borderWidth: 1,\n          },\n        },\n        animationDelay: 0,\n      },\n      ...createRegressionSeries(),\n      ...createLoessSeries(),\n    ],\n    grid: {\n      left: '3%',\n      right: '5%',\n      bottom: '3%',\n      containLabel: true,\n    },\n    // avoid flickering when brushing\n    animation: false,\n    // to disable progressive rendering permanently\n    progressive: 0,\n  };\n\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n  Button,\n  Table,\n  TableHeader,\n  TableBody,\n  TableColumn,\n  TableRow,\n  TableCell,\n} from '@heroui/react';\nimport { Icon } from '@iconify/react';\nimport {\n  RegressionResults,\n  computeRegression,\n  ComputeRegressionResult,\n  OnSelected,\n} from '@openassistant/plots';\n\nimport { ScatterRegressionPlot } from './scatter-regression-plot';\nimport { SimpleScatterPlot } from './simple-scatter-plots';\n\n/**\n * The data of the scatterplot function.\n *\n * @param id - The id of the scatterplot.\n * @param datasetName - The name of the dataset.\n * @param xVariableName - The name of the x variable.\n * @param yVariableName - The name of the y variable.\n * @param xData - The x data.\n * @param yData - The y data.\n * @param regressionResults - The regression results.\n * @param filteredIndex - The indices of the selected points.\n * @param onSelected - The callback function can be used to sync the selections of the scatterplot with the original dataset.\n * @param theme - The theme of the scatterplot.\n * @param showLoess - Whether to show the loess regression.\n * @param showRegressionLine - Whether to show the regression line.\n */\nexport type ScatterplotOutputData = {\n  id?: string;\n  datasetName: string;\n  xVariableName: string;\n  yVariableName: string;\n  xData: number[];\n  yData: number[];\n  regressionResults: ComputeRegressionResult;\n  filteredIndex?: number[];\n  onSelected?: OnSelected;\n  theme?: string;\n  showLoess?: boolean;\n  showRegressionLine?: boolean;\n  isExpanded?: boolean;\n  setIsExpanded?: (isExpanded: boolean) => void;\n  isDraggable?: boolean;\n};\n\n/**\n * @internal\n */\nexport function ScatterplotComponent({\n  id,\n  datasetName,\n  filteredIndex,\n  regressionResults: regression,\n  xData,\n  yData,\n  xVariableName,\n  yVariableName,\n  onSelected,\n  theme,\n  isExpanded = false,\n  setIsExpanded,\n}: ScatterplotOutputData): JSX.Element | null {\n  const [showMore, setShowMore] = useState(isExpanded);\n\n  // state for the filtered indexes: simple scatter plot will set this state and the regression plot will rerender based on this state\n  const [filteredIndexes, setFilteredIndexes] = useState<number[]>(\n    filteredIndex ?? []\n  );\n\n  // state for regression results\n  const [regressionResults, setRegressionResults] = useState<\n    ComputeRegressionResult | undefined\n  >(regression);\n\n  // update regression results when filtered indexes change\n  useEffect(() => {\n    const newRegressionResults = computeRegression({\n      xData: xData ?? [],\n      yData: yData ?? [],\n      filteredIndex: filteredIndexes,\n    });\n    setRegressionResults(newRegressionResults);\n  }, [xData, yData, filteredIndexes]);\n\n  // slope title\n  const slopeTitle = useMemo(() => {\n    if (!regression) return undefined;\n    const slope = regression.regression.slope.estimate;\n    const pValue = regression.regression.slope.pValue;\n    return `- Slope: ${slope.toFixed(3)}${pValue < 0.01 ? '**' : pValue < 0.05 ? '*' : ''}`;\n  }, [regression]);\n\n  const handleMorePress = useCallback(() => {\n    setShowMore(!showMore);\n    setIsExpanded?.(!isExpanded);\n  }, [showMore, isExpanded, setIsExpanded]);\n\n  const generateRegressionRows = (\n    type: string,\n    regressionData?: RegressionResults\n  ) => [\n    <TableRow key={`${type.toLowerCase()}-intercept`}>\n      <TableCell>{type}: Intercept</TableCell>\n      <TableCell>\n        {regressionData ? regressionData.intercept.estimate.toFixed(4) : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData ? regressionData.intercept.pValue.toFixed(4) : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData\n          ? regressionData.intercept.standardError.toFixed(4)\n          : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData\n          ? regressionData.intercept.tStatistic.toFixed(4)\n          : 'N/A'}\n      </TableCell>\n    </TableRow>,\n    <TableRow key={`${type.toLowerCase()}-slope`}>\n      <TableCell>{type}: Slope</TableCell>\n      <TableCell>\n        {regressionData ? regressionData.slope.estimate.toFixed(4) : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData ? regressionData.slope.pValue.toFixed(4) : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData ? regressionData.slope.standardError.toFixed(4) : 'N/A'}\n      </TableCell>\n      <TableCell>\n        {regressionData ? regressionData.slope.tStatistic.toFixed(4) : 'N/A'}\n      </TableCell>\n    </TableRow>,\n  ];\n\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[400px]\">\n      <div className=\"relative h-full w-full flex flex-col rounded-lg pt-6 text-gray-900 shadow-secondary-1  dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">Scatterplot</p>\n          <small className=\"truncate text-default-500\">\n            {xVariableName} vs {yVariableName} {slopeTitle}\n          </small>\n        </div>\n        <div className=\"relative h-full py-2 flex-grow \">\n          <div className=\"absolute left-0 top-0 h-full w-full\">\n            <ScatterRegressionPlot\n              filteredIndex={filteredIndex}\n              regressionResults={regressionResults}\n              xData={xData}\n              yData={yData}\n              showLoess={false}\n              showRegressionLine={true}\n              theme={theme}\n              filteredIndexes={filteredIndexes}\n            />\n          </div>\n          <div className=\"absolute left-0 top-0 h-full w-full\">\n            <SimpleScatterPlot\n              id={id}\n              datasetName={datasetName}\n              variableX={xVariableName}\n              xData={xData}\n              variableY={yVariableName}\n              yData={yData}\n              theme={theme}\n              onSelected={onSelected}\n              setFilteredIndexes={setFilteredIndexes}\n            />\n          </div>\n        </div>\n        <div className=\"footer text-xs\">\n          {!isExpanded && (\n            <div className=\"flex w-full justify-end\">\n              <Button\n                size=\"sm\"\n                variant=\"light\"\n                startContent={\n                  <Icon\n                    icon=\"material-symbols-light:query-stats\"\n                    width=\"18\"\n                    height=\"18\"\n                  />\n                }\n                endContent={\n                  showMore && (\n                    <Icon\n                      icon=\"solar:alt-arrow-up-line-duotone\"\n                      width=\"18\"\n                      height=\"18\"\n                    />\n                  )\n                }\n                onPress={handleMorePress}\n              >\n                More\n              </Button>\n            </div>\n          )}\n          {showMore && regression && (\n            <div className=\"w-full text-tiny\">\n              <div className=\"mb-2\">\n                <small className=\"text-tiny text-default-500\">\n                  R² (All) = {regression.regression.rSquared.toFixed(4)}\n                  {regressionResults?.regressionSelected &&\n                    ` | R² (Selected) = ${regressionResults.regressionSelected.rSquared.toFixed(4)}`}\n                  {regressionResults?.regressionUnselected &&\n                    ` | R² (Unselected) = ${regressionResults.regressionUnselected.rSquared.toFixed(4)}`}\n                </small>\n              </div>\n              <Table\n                aria-label=\"Regression Results\"\n                classNames={{\n                  base: 'overflow-scroll p-0 m-0 text-tiny',\n                  table: 'p-0 m-0 text-tiny',\n                  wrapper: 'p-0 pr-2',\n                  th: 'text-tiny',\n                  td: 'text-tiny text-default-500',\n                }}\n                isCompact={true}\n                removeWrapper={true}\n              >\n                <TableHeader>\n                  <TableColumn>Parameter</TableColumn>\n                  <TableColumn>Estimate</TableColumn>\n                  <TableColumn>p-Value</TableColumn>\n                  <TableColumn>Std. Error</TableColumn>\n                  <TableColumn>t-Statistic</TableColumn>\n                </TableHeader>\n                <TableBody>\n                  {[\n                    // All Data Results\n                    ...generateRegressionRows('All', regression.regression),\n                    // Selected Data Results\n                    ...generateRegressionRows(\n                      'Selected',\n                      regressionResults?.regressionSelected\n                    ),\n                    // Unselected Data Results\n                    ...generateRegressionRows(\n                      'Unselected',\n                      regressionResults?.regressionUnselected\n                    ),\n                  ]}\n                </TableBody>\n              </Table>\n\n              <div className=\"mt-2\">\n                <small className=\"text-tiny text-default-500\">\n                  Chow test for sel/unsel regression subsets: distrib=F(2,{' '}\n                  {yData.length - 4}\n                  ), ratio=\n                  {regressionResults?.chowResults?.fStat.toFixed(4) || 'N/A'},\n                  p-val=\n                  {regressionResults?.chowResults?.pValue.toFixed(4) || 'N/A'}\n                </small>\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n\n// /**\n//  * @internal\n//  */\n// export function ScatterplotComponentContainer(\n//   props: ScatterplotOutputData\n// ): JSX.Element | null {\n//   const [isExpanded, setIsExpanded] = useState(props.isExpanded);\n\n//   const onDragStart = useDraggable({\n//     id: props.id || generateId(),\n//     type: 'scatterplot',\n//     data: props,\n//   });\n\n//   const onExpanded = (flag: boolean) => {\n//     setIsExpanded(flag);\n//   };\n\n//   return (\n//     <ExpandableContainer\n//       defaultWidth={isExpanded ? 600 : undefined}\n//       defaultHeight={isExpanded ? 600 : 400}\n//       draggable={props.isDraggable || false}\n//       onDragStart={onDragStart}\n//       onExpanded={onExpanded}\n//     >\n//       <ScatterplotComponent {...props} />\n//     </ExpandableContainer>\n//   );\n// }\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport * as echarts from 'echarts/core';\nimport {\n  TooltipComponent,\n  GridComponent,\n  BrushComponent,\n  ToolboxComponent,\n} from 'echarts/components';\nimport { LineChart, ScatterChart } from 'echarts/charts';\nimport ReactEChartsCore from 'echarts-for-react';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n  calculateLoessRegression,\n  computeRegression,\n  ComputeRegressionResult,\n} from '@openassistant/plots';\nimport { getScatterplotChartOption } from './scatter-option';\n\n// Register the required ECharts components\necharts.use([\n  TooltipComponent,\n  GridComponent,\n  ScatterChart,\n  CanvasRenderer,\n  BrushComponent,\n  ToolboxComponent,\n  LineChart,\n]);\n\ntype ScatterRegressionPlotProps = {\n  filteredIndex?: number[];\n  regressionResults?: ComputeRegressionResult;\n  xData: number[];\n  yData: number[];\n  showLoess: boolean;\n  showRegressionLine: boolean;\n  theme?: string;\n  filteredIndexes: number[];\n};\n\n/**\n * @internal\n */\nexport function ScatterRegressionPlot({\n  filteredIndex,\n  regressionResults,\n  xData,\n  yData,\n  showLoess = false,\n  showRegressionLine = true,\n  theme,\n  filteredIndexes,\n}: ScatterRegressionPlotProps) {\n  // ref for the echarts instance\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n\n  // track if the chart has been rendered, so we can update the chart later\n  const [rendered, setRendered] = useState(false);\n\n  const loessResult = useMemo(() => {\n    if (!showLoess) return null;\n    return calculateLoessRegression(xData, yData);\n  }, [xData, yData, showLoess]);\n\n  // get chart option by calling getChartOption only once\n  const option = useMemo(() => {\n    try {\n      // if regressionResults is not provided, compute it\n      const updatedRegressionResults =\n        regressionResults ?? computeRegression({ xData, yData, filteredIndex });\n      return getScatterplotChartOption({\n        xData,\n        yData,\n        showRegressionLine: showRegressionLine ?? false,\n        showLoess: showLoess ?? false,\n        allRegressionResults: updatedRegressionResults.regression,\n        selectedRegressionResults: updatedRegressionResults.regressionSelected,\n        unselectedRegressionResults:\n          updatedRegressionResults.regressionUnselected,\n        ...(loessResult ? { loessResult } : {}),\n      });\n    } catch {\n      return {};\n    }\n  }, [\n    regressionResults,\n    xData,\n    yData,\n    filteredIndex,\n    showRegressionLine,\n    showLoess,\n    loessResult,\n  ]);\n\n  // when filteredIndexTrigger changes, update the chart option using setOption\n  useEffect(() => {\n    const chart = eChartsRef.current;\n    if (rendered && filteredIndexes && chart) {\n      const updatedRegressionResults = computeRegression({\n        xData,\n        yData,\n        filteredIndex: filteredIndexes,\n      });\n      const updatedOption = getScatterplotChartOption({\n        xData,\n        yData,\n        showRegressionLine: showRegressionLine ?? false,\n        showLoess: showLoess ?? false,\n        allRegressionResults: updatedRegressionResults.regression,\n        selectedRegressionResults: updatedRegressionResults.regressionSelected,\n        unselectedRegressionResults:\n          updatedRegressionResults.regressionUnselected,\n      });\n      if (chart && updatedOption) {\n        const chartInstance = chart.getEchartsInstance();\n        chartInstance.setOption(updatedOption, true);\n      }\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [filteredIndexes, rendered]);\n\n  return (\n    <div className=\"h-full w-full\">\n      <ReactEChartsCore\n        echarts={echarts}\n        option={option}\n        notMerge={true}\n        lazyUpdate={false}\n        theme={theme || 'dark'}\n        style={{ height: '100%', width: '100%', opacity: '0.5' }}\n        ref={eChartsRef}\n        onChartReady={() => {\n          setRendered(true);\n        }}\n      />\n    </div>\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport * as echarts from 'echarts/core';\nimport {\n  TooltipComponent,\n  GridComponent,\n  BrushComponent,\n  ToolboxComponent,\n} from 'echarts/components';\nimport { LineChart, ScatterChart } from 'echarts/charts';\nimport ReactEChartsCore from 'echarts-for-react';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { useMemo, useRef, useState } from 'react';\nimport { OnSelected } from '@openassistant/plots';\nimport { useBrushLink } from '@openassistant/hooks';\n\nimport { getSimpleScatterChartOption } from './simple-chart-option';\nimport { handleBrushSelection } from '../echarts-updater';\n\n// Register the required ECharts components\necharts.use([\n  TooltipComponent,\n  GridComponent,\n  ScatterChart,\n  CanvasRenderer,\n  BrushComponent,\n  ToolboxComponent,\n  LineChart,\n]);\n\ntype SimpleScatterPlotProps = {\n  id?: string;\n  datasetName: string;\n  variableX: string;\n  xData: number[];\n  variableY: string;\n  yData: number[];\n  theme?: string;\n  onSelected?: OnSelected;\n  setFilteredIndexes?: (filteredIndex: number[]) => void;\n};\n\n/**\n * @internal\n */\nexport function SimpleScatterPlot({\n  id,\n  datasetName,\n  variableX,\n  xData,\n  variableY,\n  yData,\n  theme = 'dark',\n  setFilteredIndexes,\n  onSelected,\n}: SimpleScatterPlotProps) {\n  // ref for the echarts instance\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  const [rendered, setRendered] = useState(false);\n\n  // link when other components update\n  const { brush, componentId } = useBrushLink({\n    defaultDataId: datasetName,\n    componentId: id,\n    onLink: (highlightedRows, sourceDataId) => {\n      console.log(\n        `Chart One (${componentId}) received update for ${sourceDataId}:`,\n        highlightedRows\n      );\n      if (\n        rendered &&\n        eChartsRef.current &&\n        highlightedRows &&\n        componentId !== sourceDataId\n      ) {\n        const chartInstance = eChartsRef.current?.getEchartsInstance();\n        // cancel current highlight\n        chartInstance?.dispatchAction({ type: 'downplay' });\n        // highlight the new rows\n        if (highlightedRows.length < xData.length) {\n          chartInstance?.dispatchAction({\n            type: 'highlight',\n            dataIndex: highlightedRows,\n          });\n        }\n      }\n    },\n  });\n\n  // get chart option by calling getChartOption only once\n  const option = useMemo(() => {\n    return getSimpleScatterChartOption(variableX, xData, variableY, yData);\n  }, [variableX, variableY, xData, yData]);\n\n  // bind events for echarts\n  const bindEvents = useMemo(\n    () => ({\n      brushSelected: function (params: {\n        batch: Array<{\n          selected: Array<{\n            dataIndex: number[];\n          }>;\n        }>;\n      }) {\n        // onBrushSelected(params, dispatch, datasetId, id, eChartsRef.current?.getEchartsInstance());\n        const eChart = eChartsRef.current?.getEchartsInstance();\n        const brushed: number[] = [];\n        const brushComponent = params.batch[0];\n        for (let sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n          const rawIndices = brushComponent.selected[sIdx].dataIndex;\n          // merge rawIndices to brushed\n          brushed.push(...rawIndices);\n        }\n\n        // check if brushed.length is 0 after 100ms, since brushSelected may return empty array for some reason?!\n        setTimeout(() => {\n          if (eChart && brushed.length === 0) {\n            // clear any highlighted if no data is brushed\n            eChart.dispatchAction({ type: 'downplay' });\n          }\n        }, 100);\n\n        handleBrushSelection(eChart, brushed, datasetName, brush, onSelected);\n        // update the filtered indexes\n        if (setFilteredIndexes) {\n          setFilteredIndexes(brushed);\n        }\n      },\n      rendered: function () {\n        setRendered(true);\n      },\n    }),\n    [brush, datasetName, setFilteredIndexes, onSelected]\n  );\n\n  return (\n    <div className=\"h-full w-full\">\n      <ReactEChartsCore\n        echarts={echarts}\n        option={option}\n        notMerge={true}\n        lazyUpdate={false}\n        theme={theme}\n        onEvents={bindEvents}\n        style={{ height: '100%', width: '100%', opacity: '0.8' }}\n        ref={eChartsRef}\n      />\n    </div>\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { numericFormatter } from '@openassistant/utils';\n\n/**\n * @internal\n */\nexport type SimpleScatPlotDataProps = {\n  variableX: string;\n  variableY: string;\n};\n\n/**\n * @internal\n */\nexport function getSimpleScatterChartOption(\n  xVariableName: string,\n  xData: number[],\n  yVariableName: string,\n  yData: number[]\n) {\n  const seriesData = xData.map((x, i) => [x, yData[i]]);\n\n  const option = {\n    title: {\n      text: ``,\n      left: 'center',\n      top: 10,\n      textStyle: {\n        fontSize: 10,\n      },\n    },\n    xAxis: {\n      type: 'value',\n      splitLine: { show: false },\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n    },\n    yAxis: {\n      type: 'value',\n      splitLine: { show: false },\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n    },\n    backgroundColor: 'transparent',\n    series: [\n      {\n        data: seriesData,\n        type: 'scatter',\n        symbolSize: 3,\n        symbol: seriesData.length > 1000 ? 'rect' : 'circle',\n        itemStyle: {\n          color: 'none',\n          borderColor: '#aaa',\n          opacity: 1.0,\n          borderWidth: 1,\n        },\n        // blendMode: 'source-over',\n        // highlight\n        emphasis: {\n          // focus: 'series',\n          symbolSize: 8,\n          itemStyle: {\n            color: 'red',\n            borderWidth: 2,\n          },\n        },\n        animationDelay: 0,\n      },\n    ],\n    tooltip: {\n      trigger: 'item',\n      zlevel: 1000000,\n      formatter: (params: { value: number[] }) => {\n        return `${xVariableName}: ${numericFormatter(params.value[0])}<br/>${yVariableName}: ${numericFormatter(params.value[1])}`;\n      },\n      axisPointer: {\n        type: 'cross',\n      },\n    },\n    brush: {\n      toolbox: ['rect', 'polygon', 'clear'],\n      xAxisIndex: 0,\n      yAxisIndex: 0,\n      inBrush: {\n        opacity: 1.0,\n        color: 'red',\n      },\n      outOfBrush: {\n        opacity: 0.4,\n      },\n    },\n    grid: {\n      left: '3%',\n      right: '5%',\n      bottom: '3%',\n      containLabel: true,\n    },\n    // avoid flickering when brushing\n    animation: false,\n    progressive: 0,\n  };\n\n  return option;\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { useMemo, useRef, useState } from 'react';\nimport ReactEChartsCore from 'echarts-for-react';\nimport {\n  TooltipComponent,\n  GridComponent,\n  BrushComponent,\n  ToolboxComponent,\n} from 'echarts/components';\nimport * as echarts from 'echarts/core';\nimport { ScatterChart, LineChart } from 'echarts/charts';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { SimpleLinearRegressionResult } from '@openassistant/plots';\nimport { useBrushLink } from '@openassistant/hooks';\n\nimport { handleBrushSelection } from '../echarts-updater';\nimport { getMoranScatterChartOption } from './moran-scatter-option';\n\n// Register the required ECharts components\necharts.use([\n  TooltipComponent,\n  GridComponent,\n  ScatterChart,\n  CanvasRenderer,\n  BrushComponent,\n  ToolboxComponent,\n  LineChart,\n]);\n\nexport type MoranScatterOutputData = {\n  id?: string;\n  datasetName: string;\n  variableName: string;\n  values: number[];\n  lagValues: number[];\n  regression: SimpleLinearRegressionResult;\n  theme?: string;\n  isDraggable?: boolean;\n  isExpanded?: boolean;\n};\n\nexport function isMoranScatterOutputData(\n  data: unknown\n): data is MoranScatterOutputData {\n  return (\n    typeof data === 'object' &&\n    data !== null &&\n    'datasetName' in data &&\n    'variableName' in data &&\n    'weights' in data &&\n    'weightsMeta' in data\n  );\n}\n\nexport function MoranScatterComponent(props: MoranScatterOutputData) {\n  // get chart option for eCharts\n  const option = useMemo(() => {\n    return getMoranScatterChartOption({\n      xVariableName: props.variableName,\n      xData: props.values,\n      yVariableName: 'Spatial Lag',\n      yData: props.lagValues,\n      regression: props.regression,\n    });\n  }, [props.variableName, props.values, props.lagValues, props.regression]);\n\n  const eChartsRef = useRef<ReactEChartsCore>(null);\n  // track if the chart has been rendered, so we can update the chart later\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [rendered, setRendered] = useState(false);\n\n  // link when other components update\n  const { brush, componentId } = useBrushLink({\n    defaultDataId: props.datasetName,\n    componentId: props.id,\n    onLink: (highlightedRows, sourceDataId) => {\n      console.log(\n        `Chart One (${componentId}) received update for ${sourceDataId}:`,\n        highlightedRows\n      );\n      if (\n        rendered &&\n        eChartsRef.current &&\n        highlightedRows &&\n        componentId !== sourceDataId\n      ) {\n        const chartInstance = eChartsRef.current?.getEchartsInstance();\n        // cancel current highlight\n        chartInstance?.dispatchAction({ type: 'downplay' });\n        // highlight the new rows\n        if (highlightedRows.length < props.values.length) {\n          chartInstance?.dispatchAction({\n            type: 'highlight',\n            dataIndex: highlightedRows,\n          });\n        }\n      }\n    },\n  });\n\n  // bind events for echarts\n  const bindEvents = useMemo(\n    () => ({\n      brushSelected: function (params: {\n        batch: Array<{\n          selected: Array<{\n            dataIndex: number[];\n          }>;\n        }>;\n      }) {\n        // onBrushSelected(params, dispatch, datasetId, id, eChartsRef.current?.getEchartsInstance());\n        const eChart = eChartsRef.current?.getEchartsInstance();\n        const brushed: number[] = [];\n        const brushComponent = params.batch[0];\n        for (let sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n          const rawIndices = brushComponent.selected[sIdx].dataIndex;\n          // merge rawIndices to brushed\n          brushed.push(...rawIndices);\n        }\n\n        // check if brushed.length is 0 after 100ms, since brushSelected may return empty array for some reason?!\n        setTimeout(() => {\n          if (eChart && brushed.length === 0) {\n            // clear any highlighted if no data is brushed\n            eChart.dispatchAction({ type: 'downplay' });\n          }\n        }, 100);\n\n        handleBrushSelection(eChart, brushed, props.datasetName, brush);\n      },\n      rendered: function () {\n        setRendered(true);\n      },\n    }),\n    [brush, props.datasetName]\n  );\n\n  return (\n    <div className=\"overflow-auto resize pb-3 w-full h-[300px]\">\n      <div className=\"h-full w-full flex flex-col rounded-lg  text-gray-900 shadow-secondary-1 dark:bg-gray-950 dark:text-gray-100\">\n        <div className=\"flex-col items-start p-2\">\n          <p className=\"text-tiny font-bold uppercase\">{props.variableName}</p>\n          <small className=\"truncate text-default-500\">\n            {props.variableName}\n          </small>\n        </div>\n        <div style={{ height: '100%' }} className=\"py-2 flex-grow\">\n          <ReactEChartsCore\n            option={option}\n            notMerge={true}\n            lazyUpdate={true}\n            style={{ height: '100%', width: '100%' }}\n            ref={eChartsRef}\n            theme={props.theme || 'dark'}\n            onEvents={bindEvents}\n            onChartReady={() => {\n              setRendered(true);\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n","// SPDX-License-Identifier: MIT\n// Copyright contributors to the openassistant project\n\nimport { EChartsOption } from 'echarts';\nimport { SimpleLinearRegressionResult } from '@openassistant/plots';\nimport { numericFormatter } from '@openassistant/utils';\n\nexport type MoranScatterChartOptionProps = {\n  xVariableName: string;\n  xData: number[];\n  yVariableName: string;\n  yData: number[];\n  regression: SimpleLinearRegressionResult;\n  theme?: string;\n};\n\nexport function getMoranScatterChartOption(\n  props: MoranScatterChartOptionProps\n): EChartsOption {\n  const { xVariableName, xData, yVariableName, yData, regression, theme } =\n    props;\n  const slope = regression.slope;\n  const intercept = regression.intercept;\n  const seriesData = xData.map((x, i) => [x, yData[i]]);\n\n  const padding = (Math.max(...xData) - Math.min(...xData)) * 0.2;\n  const extendedMinX = Math.min(...xData) - padding;\n  const extendedMaxX = Math.max(...xData) + padding;\n  const regressionLineData = [\n    [extendedMinX, slope * extendedMinX + intercept],\n    [extendedMaxX, slope * extendedMaxX + intercept],\n  ];\n\n  const option: EChartsOption = {\n    title: {\n      text: `Moran's I ${slope.toFixed(3)}`,\n      left: 'center',\n      top: 10,\n      textStyle: {\n        fontSize: 10,\n        color: theme === 'dark' ? '#fff' : '#555',\n      },\n    },\n    xAxis: {\n      type: 'value' as const,\n      splitLine: { show: false },\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n    },\n    yAxis: {\n      type: 'value' as const,\n      splitLine: { show: false },\n      axisLabel: {\n        formatter: numericFormatter,\n      },\n    },\n    series: [\n      {\n        data: seriesData,\n        type: 'scatter',\n        symbolSize: 6,\n        itemStyle: {\n          color: 'lightblue',\n          borderColor: '#555',\n          opacity: 0.8,\n          borderWidth: 1,\n        },\n        // highlight\n        emphasis: {\n          focus: 'series',\n          scale: 1.1,\n          itemStyle: {\n            color: 'red',\n            borderWidth: 1,\n          },\n        },\n        animationDelay: 0,\n      },\n      {\n        type: 'line',\n        data: regressionLineData,\n        showSymbol: false,\n        itemStyle: {\n          color: '#ff6666',\n        },\n        lineStyle: {\n          width: 2,\n          type: 'dashed',\n        },\n      },\n    ],\n    tooltip: {\n      trigger: 'item',\n      zlevel: 1000000,\n      formatter: (params) =>\n        `${xVariableName}: ${numericFormatter(params.value[0])}<br/>${yVariableName}: ${numericFormatter(params.value[1])}`,\n      axisPointer: {\n        type: 'cross',\n      },\n    },\n    brush: {\n      toolbox: ['rect', 'polygon', 'clear'],\n      xAxisIndex: 0,\n      yAxisIndex: 0,\n    },\n    grid: {\n      left: '3%',\n      right: '5%',\n      bottom: '3%',\n      containLabel: true,\n    },\n    // avoid flickering when brushing\n    animation: false,\n    progressive: 0,\n  };\n\n  return option;\n}\n"]}