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G,qBAkFHkR,GA3E6ChT,EAAA6B,WAAiC4O,GAAM,SAAAnR,EAAAwC,GACpF,MAAAmP,oBAAUA,KAAAgC,GAA0C3T,EACpD8R,EAAAP,GAAAI,GACA,OAAyB,EAAA5P,EAAAC,KAAIgP,GAAwB,IAAIc,KAAA6B,EAAAhR,IAAAH,GACzD,EAAC,2BAwEDoR,GAvE4ClT,EAAA6B,WAAiC4O,GAAM,SAAAnR,EAAAwC,GACnF,MAAAmP,oBAAUA,KAAA/D,GAAyC5N,EACnD8R,EAAAP,GAAAI,GACA,OAAyB,EAAA5P,EAAAC,KAAIiP,GAAuB,IAAIa,KAAAlE,EAAAjL,IAAAH,GACxD,EAAC","sources":["webpack://@logos/commerceweb-frontend/javascript/node_modules/@radix-ui/react-menu/dist/index.mjs","webpack://@logos/commerceweb-frontend/javascript/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n  ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n  rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n  ltr: [\"ArrowLeft\"],\n  rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n  createCollectionScope,\n  createPopperScope,\n  createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = /* @__PURE__ */ __name((props) => {\n  const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n  const popperScope = usePopperScope(__scopeMenu);\n  const [content, setContent] = React.useState(null);\n  const isUsingKeyboardRef = React.useRef(false);\n  const handleOpenChange = useCallbackRef(onOpenChange);\n  const direction = useDirection(dir);\n  React.useEffect(() => {\n    const handleKeyDown = /* @__PURE__ */ __name(() => {\n      isUsingKeyboardRef.current = true;\n      document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n      document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n    }, \"handleKeyDown\");\n    const handlePointer = /* @__PURE__ */ __name(() => isUsingKeyboardRef.current = false, \"handlePointer\");\n    document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n    return () => {\n      document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n      document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n      document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n    };\n  }, []);\n  React.useEffect(() => {\n    if (!open) {\n      return;\n    }\n    const handleBlur = /* @__PURE__ */ __name(() => handleOpenChange(false), \"handleBlur\");\n    window.addEventListener(\"blur\", handleBlur);\n    return () => window.removeEventListener(\"blur\", handleBlur);\n  }, [open, handleOpenChange]);\n  return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n    MenuProvider,\n    {\n      scope: __scopeMenu,\n      open,\n      onOpenChange: handleOpenChange,\n      content,\n      onContentChange: setContent,\n      children: /* @__PURE__ */ jsx(\n        MenuRootProvider,\n        {\n          scope: __scopeMenu,\n          onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n          isUsingKeyboardRef,\n          dir: direction,\n          modal,\n          children\n        }\n      )\n    }\n  ) });\n}, \"Menu\");\nvar MenuAnchor = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuAnchor2(props, forwardedRef) {\n    const { __scopeMenu, ...anchorProps } = props;\n    const popperScope = usePopperScope(__scopeMenu);\n    return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n  }, \"MenuAnchor\")\n);\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n  forceMount: void 0\n});\nvar MenuPortal = /* @__PURE__ */ __name((props) => {\n  const { __scopeMenu, forceMount, children, container } = props;\n  const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n  return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n}, \"MenuPortal\");\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuContent2(props, forwardedRef) {\n    const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n    const { forceMount = portalContext.forceMount, ...contentProps } = props;\n    const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n    const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n    return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n  }, \"MenuContent\")\n);\nvar MenuRootContentModal = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function MenuRootContentModal2(props, forwardedRef) {\n    const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n    const ref = React.useRef(null);\n    const composedRefs = useComposedRefs(forwardedRef, ref);\n    React.useEffect(() => {\n      const content = ref.current;\n      if (content) return hideOthers(content);\n    }, []);\n    return /* @__PURE__ */ jsx(\n      MenuContentImpl,\n      {\n        ...props,\n        ref: composedRefs,\n        trapFocus: context.open,\n        disableOutsidePointerEvents: context.open,\n        disableOutsideScroll: true,\n        onFocusOutside: composeEventHandlers(\n          props.onFocusOutside,\n          (event) => event.preventDefault(),\n          { checkForDefaultPrevented: false }\n        ),\n        onDismiss: () => context.onOpenChange(false)\n      }\n    );\n  }, \"MenuRootContentModal\")\n);\nvar MenuRootContentNonModal = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function MenuRootContentNonModal2(props, forwardedRef) {\n  const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n  return /* @__PURE__ */ jsx(\n    MenuContentImpl,\n    {\n      ...props,\n      ref: forwardedRef,\n      trapFocus: false,\n      disableOutsidePointerEvents: false,\n      disableOutsideScroll: false,\n      onDismiss: () => context.onOpenChange(false)\n    }\n  );\n}, \"MenuRootContentNonModal\"));\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function MenuContentImpl2(props, forwardedRef) {\n    const {\n      __scopeMenu,\n      loop = false,\n      trapFocus,\n      onOpenAutoFocus,\n      onCloseAutoFocus,\n      disableOutsidePointerEvents,\n      onEntryFocus,\n      onEscapeKeyDown,\n      onPointerDownOutside,\n      onFocusOutside,\n      onInteractOutside,\n      onDismiss,\n      disableOutsideScroll,\n      ...contentProps\n    } = props;\n    const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n    const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n    const popperScope = usePopperScope(__scopeMenu);\n    const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n    const getItems = useCollection(__scopeMenu);\n    const [currentItemId, setCurrentItemId] = React.useState(null);\n    const contentRef = React.useRef(null);\n    const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n    const timerRef = React.useRef(0);\n    const searchRef = React.useRef(\"\");\n    const pointerGraceTimerRef = React.useRef(0);\n    const pointerGraceIntentRef = React.useRef(null);\n    const pointerDirRef = React.useRef(\"right\");\n    const lastPointerXRef = React.useRef(0);\n    const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n    const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n    const handleTypeaheadSearch = /* @__PURE__ */ __name((key) => {\n      const search = searchRef.current + key;\n      const items = getItems().filter((item) => !item.disabled);\n      const currentItem = document.activeElement;\n      const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n      const values = items.map((item) => item.textValue);\n      const nextMatch = getNextMatch(values, search, currentMatch);\n      const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n      (/* @__PURE__ */ __name((function updateSearch(value) {\n        searchRef.current = value;\n        window.clearTimeout(timerRef.current);\n        if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n      }), \"updateSearch\"))(search);\n      if (newItem) {\n        setTimeout(() => newItem.focus());\n      }\n    }, \"handleTypeaheadSearch\");\n    React.useEffect(() => {\n      return () => window.clearTimeout(timerRef.current);\n    }, []);\n    useFocusGuards();\n    const isPointerMovingToSubmenu = React.useCallback((event) => {\n      const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n      return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n    }, []);\n    return /* @__PURE__ */ jsx(\n      MenuContentProvider,\n      {\n        scope: __scopeMenu,\n        searchRef,\n        onItemEnter: React.useCallback(\n          (event) => {\n            if (isPointerMovingToSubmenu(event)) event.preventDefault();\n          },\n          [isPointerMovingToSubmenu]\n        ),\n        onItemLeave: React.useCallback(\n          (event) => {\n            if (isPointerMovingToSubmenu(event)) return;\n            contentRef.current?.focus();\n            setCurrentItemId(null);\n          },\n          [isPointerMovingToSubmenu]\n        ),\n        onTriggerLeave: React.useCallback(\n          (event) => {\n            if (isPointerMovingToSubmenu(event)) event.preventDefault();\n          },\n          [isPointerMovingToSubmenu]\n        ),\n        pointerGraceTimerRef,\n        onPointerGraceIntentChange: React.useCallback((intent) => {\n          pointerGraceIntentRef.current = intent;\n        }, []),\n        children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n          FocusScope,\n          {\n            asChild: true,\n            trapped: trapFocus,\n            onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n              event.preventDefault();\n              contentRef.current?.focus({ preventScroll: true });\n            }),\n            onUnmountAutoFocus: onCloseAutoFocus,\n            children: /* @__PURE__ */ jsx(\n              DismissableLayer,\n              {\n                asChild: true,\n                disableOutsidePointerEvents,\n                onEscapeKeyDown,\n                onPointerDownOutside,\n                onFocusOutside,\n                onInteractOutside,\n                onDismiss,\n                children: /* @__PURE__ */ jsx(\n                  RovingFocusGroup.Root,\n                  {\n                    asChild: true,\n                    ...rovingFocusGroupScope,\n                    dir: rootContext.dir,\n                    orientation: \"vertical\",\n                    loop,\n                    currentTabStopId: currentItemId,\n                    onCurrentTabStopIdChange: setCurrentItemId,\n                    onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n                      if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n                    }),\n                    preventScrollOnEntryFocus: true,\n                    children: /* @__PURE__ */ jsx(\n                      PopperPrimitive.Content,\n                      {\n                        role: \"menu\",\n                        \"aria-orientation\": \"vertical\",\n                        \"data-state\": getOpenState(context.open),\n                        \"data-radix-menu-content\": \"\",\n                        dir: rootContext.dir,\n                        ...popperScope,\n                        ...contentProps,\n                        ref: composedRefs,\n                        style: { outline: \"none\", ...contentProps.style },\n                        onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n                          const target = event.target;\n                          const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n                          const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n                          const isCharacterKey = event.key.length === 1;\n                          if (isKeyDownInside) {\n                            if (event.key === \"Tab\") event.preventDefault();\n                            if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n                          }\n                          const content = contentRef.current;\n                          if (event.target !== content) return;\n                          if (!FIRST_LAST_KEYS.includes(event.key)) return;\n                          event.preventDefault();\n                          const items = getItems().filter((item) => !item.disabled);\n                          const candidateNodes = items.map((item) => item.ref.current);\n                          if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n                          focusFirst(candidateNodes);\n                        }),\n                        onBlur: composeEventHandlers(props.onBlur, (event) => {\n                          if (!event.currentTarget.contains(event.target)) {\n                            window.clearTimeout(timerRef.current);\n                            searchRef.current = \"\";\n                          }\n                        }),\n                        onPointerMove: composeEventHandlers(\n                          props.onPointerMove,\n                          whenMouse((event) => {\n                            const target = event.target;\n                            const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n                            if (event.currentTarget.contains(target) && pointerXHasChanged) {\n                              const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n                              pointerDirRef.current = newDir;\n                              lastPointerXRef.current = event.clientX;\n                            }\n                          })\n                        )\n                      }\n                    )\n                  }\n                )\n              }\n            )\n          }\n        ) })\n      }\n    );\n  }, \"MenuContentImpl\")\n);\nvar MenuGroup = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuGroup2(props, forwardedRef) {\n    const { __scopeMenu, ...groupProps } = props;\n    return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n  }, \"MenuGroup\")\n);\nvar MenuLabel = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuLabel2(props, forwardedRef) {\n    const { __scopeMenu, ...labelProps } = props;\n    return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n  }, \"MenuLabel\")\n);\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function MenuItem2(props, forwardedRef) {\n    const { disabled = false, onSelect, ...itemProps } = props;\n    const ref = React.useRef(null);\n    const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n    const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n    const composedRefs = useComposedRefs(forwardedRef, ref);\n    const isPointerDownRef = React.useRef(false);\n    const handleSelect = /* @__PURE__ */ __name(() => {\n      const menuItem = ref.current;\n      if (!disabled && menuItem) {\n        const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n        menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n        dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n        if (itemSelectEvent.defaultPrevented) {\n          isPointerDownRef.current = false;\n        } else {\n          rootContext.onClose();\n        }\n      }\n    }, \"handleSelect\");\n    return /* @__PURE__ */ jsx(\n      MenuItemImpl,\n      {\n        ...itemProps,\n        ref: composedRefs,\n        disabled,\n        onClick: composeEventHandlers(props.onClick, handleSelect),\n        onPointerDown: (event) => {\n          props.onPointerDown?.(event);\n          isPointerDownRef.current = true;\n        },\n        onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n          if (!isPointerDownRef.current) event.currentTarget?.click();\n        }),\n        onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n          if (disabled || event.target !== event.currentTarget) {\n            return;\n          }\n          const isTypingAhead = contentContext.searchRef.current !== \"\";\n          if (isTypingAhead && event.key === \" \") {\n            return;\n          }\n          if (SELECTION_KEYS.includes(event.key)) {\n            event.currentTarget.click();\n            event.preventDefault();\n          }\n        })\n      }\n    );\n  }, \"MenuItem\")\n);\nvar MenuItemImpl = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuItemImpl2(props, forwardedRef) {\n    const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n    const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n    const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n    const ref = React.useRef(null);\n    const composedRefs = useComposedRefs(forwardedRef, ref);\n    const [isFocused, setIsFocused] = React.useState(false);\n    const [textContent, setTextContent] = React.useState(\"\");\n    React.useEffect(() => {\n      const menuItem = ref.current;\n      if (menuItem) {\n        setTextContent((menuItem.textContent ?? \"\").trim());\n      }\n    }, [itemProps.children]);\n    return /* @__PURE__ */ jsx(\n      Collection.ItemSlot,\n      {\n        scope: __scopeMenu,\n        disabled,\n        textValue: textValue ?? textContent,\n        children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n          Primitive.div,\n          {\n            role: \"menuitem\",\n            \"data-highlighted\": isFocused ? \"\" : void 0,\n            \"aria-disabled\": disabled || void 0,\n            \"data-disabled\": disabled ? \"\" : void 0,\n            ...itemProps,\n            ref: composedRefs,\n            onPointerMove: composeEventHandlers(\n              props.onPointerMove,\n              whenMouse((event) => {\n                if (disabled) {\n                  contentContext.onItemLeave(event);\n                } else {\n                  contentContext.onItemEnter(event);\n                  if (!event.defaultPrevented) {\n                    const item = event.currentTarget;\n                    item.focus({ preventScroll: true });\n                  }\n                }\n              })\n            ),\n            onPointerLeave: composeEventHandlers(\n              props.onPointerLeave,\n              whenMouse((event) => contentContext.onItemLeave(event))\n            ),\n            onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n            onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n          }\n        ) })\n      }\n    );\n  }, \"MenuItemImpl\")\n);\nvar MenuCheckboxItem = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function MenuCheckboxItem2(props, forwardedRef) {\n    const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n    return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n      MenuItem,\n      {\n        role: \"menuitemcheckbox\",\n        \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n        ...checkboxItemProps,\n        ref: forwardedRef,\n        \"data-state\": getCheckedState(checked),\n        onSelect: composeEventHandlers(\n          checkboxItemProps.onSelect,\n          () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n          { checkForDefaultPrevented: false }\n        )\n      }\n    ) });\n  }, \"MenuCheckboxItem\")\n);\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n  RADIO_GROUP_NAME,\n  { value: void 0, onValueChange: /* @__PURE__ */ __name(() => {\n  }, \"onValueChange\") }\n);\nvar MenuRadioGroup = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuRadioGroup2(props, forwardedRef) {\n    const { value, onValueChange, ...groupProps } = props;\n    const handleValueChange = useCallbackRef(onValueChange);\n    return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n  }, \"MenuRadioGroup\")\n);\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuRadioItem2(props, forwardedRef) {\n    const { value, ...radioItemProps } = props;\n    const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n    const checked = value === context.value;\n    return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n      MenuItem,\n      {\n        role: \"menuitemradio\",\n        \"aria-checked\": checked,\n        ...radioItemProps,\n        ref: forwardedRef,\n        \"data-state\": getCheckedState(checked),\n        onSelect: composeEventHandlers(\n          radioItemProps.onSelect,\n          () => context.onValueChange?.(value),\n          { checkForDefaultPrevented: false }\n        )\n      }\n    ) });\n  }, \"MenuRadioItem\")\n);\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n  ITEM_INDICATOR_NAME,\n  { checked: false }\n);\nvar MenuItemIndicator = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function MenuItemIndicator2(props, forwardedRef) {\n    const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n    const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n    return /* @__PURE__ */ jsx(\n      Presence,\n      {\n        present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n        children: /* @__PURE__ */ jsx(\n          Primitive.span,\n          {\n            ...itemIndicatorProps,\n            ref: forwardedRef,\n            \"data-state\": getCheckedState(indicatorContext.checked)\n          }\n        )\n      }\n    );\n  }, \"MenuItemIndicator\")\n);\nvar MenuSeparator = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuSeparator2(props, forwardedRef) {\n    const { __scopeMenu, ...separatorProps } = props;\n    return /* @__PURE__ */ jsx(\n      Primitive.div,\n      {\n        role: \"separator\",\n        \"aria-orientation\": \"horizontal\",\n        ...separatorProps,\n        ref: forwardedRef\n      }\n    );\n  }, \"MenuSeparator\")\n);\nvar MenuArrow = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuArrow2(props, forwardedRef) {\n    const { __scopeMenu, ...arrowProps } = props;\n    const popperScope = usePopperScope(__scopeMenu);\n    return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n  }, \"MenuArrow\")\n);\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = /* @__PURE__ */ __name((props) => {\n  const { __scopeMenu, children, open = false, onOpenChange } = props;\n  const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n  const popperScope = usePopperScope(__scopeMenu);\n  const [trigger, setTrigger] = React.useState(null);\n  const [content, setContent] = React.useState(null);\n  const handleOpenChange = useCallbackRef(onOpenChange);\n  React.useEffect(() => {\n    if (parentMenuContext.open === false) handleOpenChange(false);\n    return () => handleOpenChange(false);\n  }, [parentMenuContext.open, handleOpenChange]);\n  return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n    MenuProvider,\n    {\n      scope: __scopeMenu,\n      open,\n      onOpenChange: handleOpenChange,\n      content,\n      onContentChange: setContent,\n      children: /* @__PURE__ */ jsx(\n        MenuSubProvider,\n        {\n          scope: __scopeMenu,\n          contentId: useId(),\n          triggerId: useId(),\n          trigger,\n          onTriggerChange: setTrigger,\n          children\n        }\n      )\n    }\n  ) });\n}, \"MenuSub\");\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuSubTrigger2(props, forwardedRef) {\n    const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n    const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n    const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n    const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n    const openTimerRef = React.useRef(null);\n    const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n    const scope = { __scopeMenu: props.__scopeMenu };\n    const clearOpenTimer = React.useCallback(() => {\n      if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n      openTimerRef.current = null;\n    }, []);\n    React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n    React.useEffect(() => {\n      const pointerGraceTimer = pointerGraceTimerRef.current;\n      return () => {\n        window.clearTimeout(pointerGraceTimer);\n        onPointerGraceIntentChange(null);\n      };\n    }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n    const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);\n    return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n      MenuItemImpl,\n      {\n        id: subContext.triggerId,\n        \"aria-haspopup\": \"menu\",\n        \"aria-expanded\": context.open,\n        \"aria-controls\": context.open ? subContext.contentId : void 0,\n        \"data-state\": getOpenState(context.open),\n        ...props,\n        ref: composedRefs,\n        onClick: (event) => {\n          props.onClick?.(event);\n          if (props.disabled || event.defaultPrevented) return;\n          event.currentTarget.focus();\n          if (!context.open) context.onOpenChange(true);\n        },\n        onPointerMove: composeEventHandlers(\n          props.onPointerMove,\n          whenMouse((event) => {\n            contentContext.onItemEnter(event);\n            if (event.defaultPrevented) return;\n            if (!props.disabled && !context.open && !openTimerRef.current) {\n              contentContext.onPointerGraceIntentChange(null);\n              openTimerRef.current = window.setTimeout(() => {\n                context.onOpenChange(true);\n                clearOpenTimer();\n              }, 100);\n            }\n          })\n        ),\n        onPointerLeave: composeEventHandlers(\n          props.onPointerLeave,\n          whenMouse((event) => {\n            clearOpenTimer();\n            const contentRect = context.content?.getBoundingClientRect();\n            if (contentRect) {\n              const side = context.content?.dataset.side;\n              const rightSide = side === \"right\";\n              const bleed = rightSide ? -5 : 5;\n              const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n              const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n              contentContext.onPointerGraceIntentChange({\n                area: [\n                  // Apply a bleed on clientX to ensure that our exit point is\n                  // consistently within polygon bounds\n                  { x: event.clientX + bleed, y: event.clientY },\n                  { x: contentNearEdge, y: contentRect.top },\n                  { x: contentFarEdge, y: contentRect.top },\n                  { x: contentFarEdge, y: contentRect.bottom },\n                  { x: contentNearEdge, y: contentRect.bottom }\n                ],\n                side\n              });\n              window.clearTimeout(pointerGraceTimerRef.current);\n              pointerGraceTimerRef.current = window.setTimeout(\n                () => contentContext.onPointerGraceIntentChange(null),\n                300\n              );\n            } else {\n              contentContext.onTriggerLeave(event);\n              if (event.defaultPrevented) return;\n              contentContext.onPointerGraceIntentChange(null);\n            }\n          })\n        ),\n        onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n          if (props.disabled || event.target !== event.currentTarget) {\n            return;\n          }\n          const isTypingAhead = contentContext.searchRef.current !== \"\";\n          if (isTypingAhead && event.key === \" \") {\n            return;\n          }\n          if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n            context.onOpenChange(true);\n            context.content?.focus();\n            event.preventDefault();\n          }\n        })\n      }\n    ) });\n  }, \"MenuSubTrigger\")\n);\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function MenuSubContent2(props, forwardedRef) {\n    const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n    const { forceMount = portalContext.forceMount, align = \"start\", ...subContentProps } = props;\n    const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n    const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n    const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n    const ref = React.useRef(null);\n    const composedRefs = useComposedRefs(forwardedRef, ref);\n    return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n      MenuContentImpl,\n      {\n        id: subContext.contentId,\n        \"aria-labelledby\": subContext.triggerId,\n        ...subContentProps,\n        ref: composedRefs,\n        align,\n        side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n        disableOutsidePointerEvents: false,\n        disableOutsideScroll: false,\n        trapFocus: false,\n        onOpenAutoFocus: (event) => {\n          if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n          event.preventDefault();\n        },\n        onCloseAutoFocus: (event) => event.preventDefault(),\n        onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n          if (event.target !== subContext.trigger) context.onOpenChange(false);\n        }),\n        onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n          rootContext.onClose();\n          event.preventDefault();\n        }),\n        onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n          const isKeyDownInside = event.currentTarget.contains(event.target);\n          const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n          if (isKeyDownInside && isCloseKey) {\n            context.onOpenChange(false);\n            subContext.trigger?.focus();\n            event.preventDefault();\n          }\n        })\n      }\n    ) }) }) });\n  }, \"MenuSubContent\")\n);\nfunction getOpenState(open) {\n  return open ? \"open\" : \"closed\";\n}\n__name(getOpenState, \"getOpenState\");\nfunction isIndeterminate(checked) {\n  return checked === \"indeterminate\";\n}\n__name(isIndeterminate, \"isIndeterminate\");\nfunction getCheckedState(checked) {\n  return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\n__name(getCheckedState, \"getCheckedState\");\nfunction focusFirst(candidates) {\n  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n  for (const candidate of candidates) {\n    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n    candidate.focus();\n    if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n  }\n}\n__name(focusFirst, \"focusFirst\");\nfunction wrapArray(array, startIndex) {\n  return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n__name(wrapArray, \"wrapArray\");\nfunction getNextMatch(values, search, currentMatch) {\n  const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n  const normalizedSearch = isRepeated ? search[0] : search;\n  const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n  let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n  const excludeCurrentMatch = normalizedSearch.length === 1;\n  if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n  const nextMatch = wrappedValues.find(\n    (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n  );\n  return nextMatch !== currentMatch ? nextMatch : void 0;\n}\n__name(getNextMatch, \"getNextMatch\");\nfunction isPointInPolygon(point, polygon) {\n  const { x, y } = point;\n  let inside = false;\n  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n    const ii = polygon[i];\n    const jj = polygon[j];\n    const xi = ii.x;\n    const yi = ii.y;\n    const xj = jj.x;\n    const yj = jj.y;\n    const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n    if (intersect) inside = !inside;\n  }\n  return inside;\n}\n__name(isPointInPolygon, \"isPointInPolygon\");\nfunction isPointerInGraceArea(event, area) {\n  if (!area) return false;\n  const cursorPos = { x: event.clientX, y: event.clientY };\n  return isPointInPolygon(cursorPos, area);\n}\n__name(isPointerInGraceArea, \"isPointerInGraceArea\");\nfunction whenMouse(handler) {\n  return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\n__name(whenMouse, \"whenMouse\");\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n  Anchor2 as Anchor,\n  Arrow2 as Arrow,\n  CheckboxItem,\n  Content2 as Content,\n  Group,\n  Item2 as Item,\n  ItemIndicator,\n  Label,\n  Menu,\n  MenuAnchor,\n  MenuArrow,\n  MenuCheckboxItem,\n  MenuContent,\n  MenuGroup,\n  MenuItem,\n  MenuItemIndicator,\n  MenuLabel,\n  MenuPortal,\n  MenuRadioGroup,\n  MenuRadioItem,\n  MenuSeparator,\n  MenuSub,\n  MenuSubContent,\n  MenuSubTrigger,\n  Portal,\n  RadioGroup,\n  RadioItem,\n  Root3 as Root,\n  Separator,\n  Sub,\n  SubContent,\n  SubTrigger,\n  createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n  DROPDOWN_MENU_NAME,\n  [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = /* @__PURE__ */ __name((props) => {\n  const {\n    __scopeDropdownMenu,\n    children,\n    dir,\n    open: openProp,\n    defaultOpen,\n    onOpenChange,\n    modal = true\n  } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  const triggerRef = React.useRef(null);\n  const [open, setOpen] = useControllableState({\n    prop: openProp,\n    defaultProp: defaultOpen ?? false,\n    onChange: onOpenChange,\n    caller: DROPDOWN_MENU_NAME\n  });\n  return /* @__PURE__ */ jsx(\n    DropdownMenuProvider,\n    {\n      scope: __scopeDropdownMenu,\n      triggerId: useId(),\n      triggerRef,\n      contentId: useId(),\n      open,\n      onOpenChange: setOpen,\n      onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n      modal,\n      children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n    }\n  );\n}, \"DropdownMenu\");\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuTrigger2(props, forwardedRef) {\n    const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n    const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    const composedRefs = useComposedRefs(forwardedRef, context.triggerRef);\n    return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n      Primitive.button,\n      {\n        type: \"button\",\n        id: context.triggerId,\n        \"aria-haspopup\": \"menu\",\n        \"aria-expanded\": context.open,\n        \"aria-controls\": context.open ? context.contentId : void 0,\n        \"data-state\": context.open ? \"open\" : \"closed\",\n        \"data-disabled\": disabled ? \"\" : void 0,\n        disabled,\n        ...triggerProps,\n        ref: composedRefs,\n        onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n          if (!disabled && event.button === 0 && event.ctrlKey === false) {\n            context.onOpenToggle();\n            if (!context.open) event.preventDefault();\n          }\n        }),\n        onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n          if (disabled) return;\n          if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n          if (event.key === \"ArrowDown\") context.onOpenChange(true);\n          if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n        })\n      }\n    ) });\n  }, \"DropdownMenuTrigger\")\n);\nvar DropdownMenuPortal = /* @__PURE__ */ __name((props) => {\n  const { __scopeDropdownMenu, ...portalProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n}, \"DropdownMenuPortal\");\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuContent2(props, forwardedRef) {\n    const { __scopeDropdownMenu, ...contentProps } = props;\n    const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    const hasInteractedOutsideRef = React.useRef(false);\n    return /* @__PURE__ */ jsx(\n      MenuPrimitive.Content,\n      {\n        id: context.contentId,\n        \"aria-labelledby\": context.triggerId,\n        ...menuScope,\n        ...contentProps,\n        ref: forwardedRef,\n        onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n          if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n          hasInteractedOutsideRef.current = false;\n          event.preventDefault();\n        }),\n        onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n          const originalEvent = event.detail.originalEvent;\n          const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n          const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n          if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n        }),\n        style: {\n          ...props.style,\n          // re-namespace exposed content custom properties\n          ...{\n            \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n            \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n            \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n            \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n            \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n          }\n        }\n      }\n    );\n  }, \"DropdownMenuContent\")\n);\nvar DropdownMenuGroup = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuGroup2(props, forwardedRef) {\n    const { __scopeDropdownMenu, ...groupProps } = props;\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n  }, \"DropdownMenuGroup\")\n);\nvar DropdownMenuLabel = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuLabel2(props, forwardedRef) {\n    const { __scopeDropdownMenu, ...labelProps } = props;\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n  }, \"DropdownMenuLabel\")\n);\nvar DropdownMenuItem = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuItem2(props, forwardedRef) {\n    const { __scopeDropdownMenu, ...itemProps } = props;\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n  }, \"DropdownMenuItem\")\n);\nvar DropdownMenuCheckboxItem = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuCheckboxItem2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n}, \"DropdownMenuCheckboxItem\"));\nvar DropdownMenuRadioGroup = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuRadioGroup2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...radioGroupProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n}, \"DropdownMenuRadioGroup\"));\nvar DropdownMenuRadioItem = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuRadioItem2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...radioItemProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n}, \"DropdownMenuRadioItem\"));\nvar DropdownMenuItemIndicator = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuItemIndicator2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n}, \"DropdownMenuItemIndicator\"));\nvar DropdownMenuSeparator = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuSeparator2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...separatorProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n}, \"DropdownMenuSeparator\"));\nvar DropdownMenuArrow = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function DropdownMenuArrow2(props, forwardedRef) {\n    const { __scopeDropdownMenu, ...arrowProps } = props;\n    const menuScope = useMenuScope(__scopeDropdownMenu);\n    return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n  }, \"DropdownMenuArrow\")\n);\nvar DropdownMenuSub = /* @__PURE__ */ __name((props) => {\n  const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  const [open, setOpen] = useControllableState({\n    prop: openProp,\n    defaultProp: defaultOpen ?? false,\n    onChange: onOpenChange,\n    caller: \"DropdownMenuSub\"\n  });\n  return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n}, \"DropdownMenuSub\");\nvar DropdownMenuSubTrigger = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuSubTrigger2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...subTriggerProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n}, \"DropdownMenuSubTrigger\"));\nvar DropdownMenuSubContent = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function DropdownMenuSubContent2(props, forwardedRef) {\n  const { __scopeDropdownMenu, ...subContentProps } = props;\n  const menuScope = useMenuScope(__scopeDropdownMenu);\n  return /* @__PURE__ */ jsx(\n    MenuPrimitive.SubContent,\n    {\n      ...menuScope,\n      ...subContentProps,\n      ref: forwardedRef,\n      style: {\n        ...props.style,\n        // re-namespace exposed content custom properties\n        ...{\n          \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n          \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n          \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n          \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n          \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n        }\n      }\n    }\n  );\n}, \"DropdownMenuSubContent\"));\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n  Arrow2 as Arrow,\n  CheckboxItem2 as CheckboxItem,\n  Content2 as Content,\n  DropdownMenu,\n  DropdownMenuArrow,\n  DropdownMenuCheckboxItem,\n  DropdownMenuContent,\n  DropdownMenuGroup,\n  DropdownMenuItem,\n  DropdownMenuItemIndicator,\n  DropdownMenuLabel,\n  DropdownMenuPortal,\n  DropdownMenuRadioGroup,\n  DropdownMenuRadioItem,\n  DropdownMenuSeparator,\n  DropdownMenuSub,\n  DropdownMenuSubContent,\n  DropdownMenuSubTrigger,\n  DropdownMenuTrigger,\n  Group2 as Group,\n  Item2 as Item,\n  ItemIndicator2 as ItemIndicator,\n  Label2 as Label,\n  Portal2 as Portal,\n  RadioGroup2 as RadioGroup,\n  RadioItem2 as RadioItem,\n  Root2 as Root,\n  Separator2 as Separator,\n  Sub2 as Sub,\n  SubContent2 as SubContent,\n  SubTrigger2 as SubTrigger,\n  Trigger,\n  createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","Object","defineProperty","__name","target","value","configurable","SELECTION_KEYS","LAST_KEYS","FIRST_LAST_KEYS","MENU_NAME","Collection","useCollection","createCollectionScope","react_collection_dist","N","createMenuContext","createMenuScope","react_context_dist","A","react_popper_dist","Bk","react_roving_focus_dist","RG","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","props","__scopeMenu","open","children","dir","onOpenChange","modal","popperScope","content","setContent","react","useState","isUsingKeyboardRef","useRef","handleOpenChange","react_use_callback_ref_dist","c","direction","react_direction_dist","jH","useEffect","handleKeyDown","current","document","addEventListener","handlePointer","capture","once","removeEventListener","handleBlur","window","jsx_runtime","jsx","bL","scope","onContentChange","onClose","useCallback","MenuAnchor","forwardRef","forwardedRef","anchorProps","Mz","ref","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","MenuPortal","container","context","react_presence_dist","C","present","react_portal_dist","Z","asChild","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","Provider","Slot","MenuRootContentModal","MenuRootContentNonModal","composedRefs","react_compose_refs_dist","s","es2015","Eq","MenuContentImpl","trapFocus","disableOutsidePointerEvents","disableOutsideScroll","onFocusOutside","dist","mK","event","preventDefault","checkForDefaultPrevented","onDismiss","react_slot_dist","TL","loop","onOpenAutoFocus","onCloseAutoFocus","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside","rovingFocusGroupScope","getItems","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","Combination","Fragment","scrollLockWrapperProps","as","allowPinchZoom","handleTypeaheadSearch","key","search","items","filter","item","disabled","currentItem","activeElement","currentMatch","find","textValue","nextMatch","getNextMatch","map","newItem","updateSearch","clearTimeout","setTimeout","focus","react_focus_guards_dist","Oh","isPointerMovingToSubmenu","side","isPointerInGraceArea","area","onItemEnter","onItemLeave","onTriggerLeave","onPointerGraceIntentChange","intent","react_focus_scope_dist","n","trapped","onMountAutoFocus","preventScroll","onUnmountAutoFocus","react_dismissable_layer_dist","qW","orientation","currentTabStopId","onCurrentTabStopIdChange","preventScrollOnEntryFocus","UC","role","getOpenState","style","outline","onKeyDown","isKeyDownInside","closest","currentTarget","isModifierKey","ctrlKey","altKey","metaKey","isCharacterKey","length","includes","candidateNodes","reverse","focusFirst","onBlur","contains","onPointerMove","whenMouse","pointerXHasChanged","clientX","newDir","MenuGroup","groupProps","react_primitive_dist","sG","div","ITEM_NAME","ITEM_SELECT","MenuItem","onSelect","itemProps","contentContext","isPointerDownRef","handleSelect","menuItem","itemSelectEvent","CustomEvent","bubbles","cancelable","hO","defaultPrevented","MenuItemImpl","onClick","onPointerDown","onPointerUp","click","isFocused","setIsFocused","textContent","setTextContent","trim","ItemSlot","q7","focusable","onPointerLeave","onFocus","RadioGroupProvider","useRadioGroupContext","onValueChange","MenuRadioGroup","handleValueChange","MenuRadioItem","radioItemProps","checked","ItemIndicatorProvider","getCheckedState","useItemIndicatorContext","MenuSubProvider","useMenuSubContext","isIndeterminate","candidates","PREVIOUSLY_FOCUSED_ELEMENT","candidate","wrapArray","array","startIndex","_","index","values","normalizedSearch","Array","from","every","char","currentMatchIndex","indexOf","wrappedValues","Math","max","v","toLowerCase","startsWith","isPointInPolygon","point","polygon","x","y","inside","i","j","ii","jj","xi","yi","xj","yj","clientY","handler","pointerType","Root3","Anchor2","Portal","Content2","Item2","RadioGroup","RadioItem","dist_defProp","dist_name","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","Root2","__scopeDropdownMenu","openProp","defaultOpen","menuScope","triggerRef","setOpen","react_use_controllable_state_dist","prop","defaultProp","onChange","caller","triggerId","react_id_dist","B","contentId","onOpenToggle","prevOpen","Trigger","triggerProps","button","type","id","Portal2","portalProps","dist_Content2","hasInteractedOutsideRef","originalEvent","detail","ctrlLeftClick","isRightClick","dist_Item2","RadioGroup2","radioGroupProps","RadioItem2"],"sourceRoot":""}