Fix File
•
/
home
/
sportsfe...
/
httpdocs
/
clone
/
wp-inclu...
/
js
/
dist
•
File:
components.js
•
Content:
/** * WordPress dependencies */ /** * Internal dependencies */ function UnforwardedTreeGridRow({ children, level, positionInSet, setSize, isExpanded, ...props }, ref) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { ...props, ref: ref, role: "row", "aria-level": level, "aria-posinset": positionInSet, "aria-setsize": setSize, "aria-expanded": isExpanded, children: children }); } /** * `TreeGridRow` is used to create a tree hierarchy. * It is not a visually styled component, but instead helps with adding * keyboard navigation and roving tab index behaviors to tree grid structures. * * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html} */ const TreeGridRow = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTreeGridRow); /* harmony default export */ const tree_grid_row = (TreeGridRow); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tree-grid/roving-tab-index-item.js /** * WordPress dependencies */ /** * Internal dependencies */ const RovingTabIndexItem = (0,external_wp_element_namespaceObject.forwardRef)(function UnforwardedRovingTabIndexItem({ children, as: Component, ...props }, forwardedRef) { const localRef = (0,external_wp_element_namespaceObject.useRef)(); const ref = forwardedRef || localRef; // @ts-expect-error - We actually want to throw an error if this is undefined. const { lastFocusedElement, setLastFocusedElement } = useRovingTabIndexContext(); let tabIndex; if (lastFocusedElement) { tabIndex = lastFocusedElement === ( // TODO: The original implementation simply used `ref.current` here, assuming // that a forwarded ref would always be an object, which is not necessarily true. // This workaround maintains the original runtime behavior in a type-safe way, // but should be revisited. 'current' in ref ? ref.current : undefined) ? 0 : -1; } const onFocus = event => setLastFocusedElement?.(event.target); const allProps = { ref, tabIndex, onFocus, ...props }; if (typeof children === 'function') { return children(allProps); } if (!Component) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...allProps, children: children }); }); /* harmony default export */ const roving_tab_index_item = (RovingTabIndexItem); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tree-grid/item.js /** * WordPress dependencies */ /** * Internal dependencies */ function UnforwardedTreeGridItem({ children, ...props }, ref) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(roving_tab_index_item, { ref: ref, ...props, children: children }); } /** * `TreeGridItem` is used to create a tree hierarchy. * It is not a visually styled component, but instead helps with adding * keyboard navigation and roving tab index behaviors to tree grid structures. * * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html} */ const TreeGridItem = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTreeGridItem); /* harmony default export */ const tree_grid_item = (TreeGridItem); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tree-grid/cell.js /** * WordPress dependencies */ /** * Internal dependencies */ function UnforwardedTreeGridCell({ children, withoutGridItem = false, ...props }, ref) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("td", { ...props, role: "gridcell", children: withoutGridItem ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: children }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tree_grid_item, { ref: ref, children: children }) }); } /** * `TreeGridCell` is used to create a tree hierarchy. * It is not a visually styled component, but instead helps with adding * keyboard navigation and roving tab index behaviors to tree grid structures. * * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html} */ const TreeGridCell = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTreeGridCell); /* harmony default export */ const cell = (TreeGridCell); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/isolated-event-container/index.js /** * External dependencies */ /** * WordPress dependencies */ function stopPropagation(event) { event.stopPropagation(); } const IsolatedEventContainer = (0,external_wp_element_namespaceObject.forwardRef)((props, ref) => { external_wp_deprecated_default()('wp.components.IsolatedEventContainer', { since: '5.7' }); // Disable reason: this stops certain events from propagating outside of the component. // - onMouseDown is disabled as this can cause interactions with other DOM elements. /* eslint-disable jsx-a11y/no-static-element-interactions */ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props, ref: ref, onMouseDown: stopPropagation }); /* eslint-enable jsx-a11y/no-static-element-interactions */ }); /* harmony default export */ const isolated_event_container = (IsolatedEventContainer); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/use-slot-fills.js /** * WordPress dependencies */ /** * Internal dependencies */ function useSlotFills(name) { const registry = (0,external_wp_element_namespaceObject.useContext)(slot_fill_context); return (0,external_wp_compose_namespaceObject.useObservableValue)(registry.fills, name); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/z-stack/styles.js function z_stack_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /** * External dependencies */ const ZStackChildView = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "ebn2ljm1" } : 0)("&:not( :first-of-type ){", ({ offsetAmount }) => /*#__PURE__*/emotion_react_browser_esm_css({ marginInlineStart: offsetAmount }, true ? "" : 0, true ? "" : 0), ";}", ({ zIndex }) => /*#__PURE__*/emotion_react_browser_esm_css({ zIndex }, true ? "" : 0, true ? "" : 0), ";" + ( true ? "" : 0)); var z_stack_styles_ref = true ? { name: "rs0gp6", styles: "grid-row-start:1;grid-column-start:1" } : 0; const ZStackView = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "ebn2ljm0" } : 0)("display:inline-grid;grid-auto-flow:column;position:relative;&>", ZStackChildView, "{position:relative;justify-self:start;", ({ isLayered }) => isLayered ? // When `isLayered` is true, all items overlap in the same grid cell z_stack_styles_ref : undefined, ";}" + ( true ? "" : 0)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/z-stack/component.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function UnconnectedZStack(props, forwardedRef) { const { children, className, isLayered = true, isReversed = false, offset = 0, ...otherProps } = useContextSystem(props, 'ZStack'); const validChildren = getValidChildren(children); const childrenLastIndex = validChildren.length - 1; const clonedChildren = validChildren.map((child, index) => { const zIndex = isReversed ? childrenLastIndex - index : index; // Only when the component is layered, the offset needs to be multiplied by // the item's index, so that items can correctly stack at the right distance const offsetAmount = isLayered ? offset * index : offset; const key = (0,external_wp_element_namespaceObject.isValidElement)(child) ? child.key : index; return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ZStackChildView, { offsetAmount: offsetAmount, zIndex: zIndex, children: child }, key); }); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ZStackView, { ...otherProps, className: className, isLayered: isLayered, ref: forwardedRef, children: clonedChildren }); } /** * `ZStack` allows you to stack things along the Z-axis. * * ```jsx * import { __experimentalZStack as ZStack } from '@wordpress/components'; * * function Example() { * return ( * <ZStack offset={ 20 } isLayered> * <ExampleImage /> * <ExampleImage /> * <ExampleImage /> * </ZStack> * ); * } * ``` */ const ZStack = contextConnect(UnconnectedZStack, 'ZStack'); /* harmony default export */ const z_stack_component = (ZStack); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/navigate-regions/index.js /** * WordPress dependencies */ const defaultShortcuts = { previous: [{ modifier: 'ctrlShift', character: '`' }, { modifier: 'ctrlShift', character: '~' }, { modifier: 'access', character: 'p' }], next: [{ modifier: 'ctrl', character: '`' }, { modifier: 'access', character: 'n' }] }; function useNavigateRegions(shortcuts = defaultShortcuts) { const ref = (0,external_wp_element_namespaceObject.useRef)(null); const [isFocusingRegions, setIsFocusingRegions] = (0,external_wp_element_namespaceObject.useState)(false); function focusRegion(offset) { var _ref$current$querySel; const regions = Array.from((_ref$current$querySel = ref.current?.querySelectorAll('[role="region"][tabindex="-1"]')) !== null && _ref$current$querySel !== void 0 ? _ref$current$querySel : []); if (!regions.length) { return; } let nextRegion = regions[0]; // Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want. const wrappingRegion = ref.current?.ownerDocument?.activeElement?.closest('[role="region"][tabindex="-1"]'); const selectedIndex = wrappingRegion ? regions.indexOf(wrappingRegion) : -1; if (selectedIndex !== -1) { let nextIndex = selectedIndex + offset; nextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex; nextIndex = nextIndex === regions.length ? 0 : nextIndex; nextRegion = regions[nextIndex]; } nextRegion.focus(); setIsFocusingRegions(true); } const clickRef = (0,external_wp_compose_namespaceObject.useRefEffect)(element => { function onClick() { setIsFocusingRegions(false); } element.addEventListener('click', onClick); return () => { element.removeEventListener('click', onClick); }; }, [setIsFocusingRegions]); return { ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, clickRef]), className: isFocusingRegions ? 'is-focusing-regions' : '', onKeyDown(event) { if (shortcuts.previous.some(({ modifier, character }) => { return external_wp_keycodes_namespaceObject.isKeyboardEvent[modifier](event, character); })) { focusRegion(-1); } else if (shortcuts.next.some(({ modifier, character }) => { return external_wp_keycodes_namespaceObject.isKeyboardEvent[modifier](event, character); })) { focusRegion(1); } } }; } /** * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html) * adding keyboard navigation to switch between the different DOM elements marked as "regions" (role="region"). * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility, * these elements must be properly labelled to briefly describe the purpose of the content in the region. * For more details, see "Landmark Roles" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/) * and "Landmark Regions" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/). * * ```jsx * import { navigateRegions } from '@wordpress/components'; * * const MyComponentWithNavigateRegions = navigateRegions( () => ( * <div> * <div role="region" tabIndex="-1" aria-label="Header"> * Header * </div> * <div role="region" tabIndex="-1" aria-label="Content"> * Content * </div> * <div role="region" tabIndex="-1" aria-label="Sidebar"> * Sidebar * </div> * </div> * ) ); * ``` */ /* harmony default export */ const navigate_regions = ((0,external_wp_compose_namespaceObject.createHigherOrderComponent)(Component => ({ shortcuts, ...props }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...useNavigateRegions(shortcuts), children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...props }) }), 'navigateRegions')); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-constrained-tabbing/index.js /** * WordPress dependencies */ /** * `withConstrainedTabbing` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html) * adding the ability to constrain keyboard navigation with the Tab key within a component. * For accessibility reasons, some UI components need to constrain Tab navigation, for example * modal dialogs or similar UI. Use of this component is recommended only in cases where a way to * navigate away from the wrapped component is implemented by other means, usually by pressing * the Escape key or using a specific UI control, e.g. a "Close" button. */ const withConstrainedTabbing = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => function ComponentWithConstrainedTabbing(props) { const ref = (0,external_wp_compose_namespaceObject.useConstrainedTabbing)(); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ref: ref, tabIndex: -1, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, { ...props }) }); }, 'withConstrainedTabbing'); /* harmony default export */ const with_constrained_tabbing = (withConstrainedTabbing); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-fallback-styles/index.js /** * External dependencies */ /** * WordPress dependencies */ /* harmony default export */ const with_fallback_styles = (mapNodeToProps => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => { return class extends external_wp_element_namespaceObject.Component { constructor(props) { super(props); this.nodeRef = this.props.node; this.state = { fallbackStyles: undefined, grabStylesCompleted: false }; this.bindRef = this.bindRef.bind(this); } bindRef(node) { if (!node) { return; } this.nodeRef = node; } componentDidMount() { this.grabFallbackStyles(); } componentDidUpdate() { this.grabFallbackStyles(); } grabFallbackStyles() { const { grabStylesCompleted, fallbackStyles } = this.state; if (this.nodeRef && !grabStylesCompleted) { const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props); if (!es6_default()(newFallbackStyles, fallbackStyles)) { this.setState({ fallbackStyles: newFallbackStyles, grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean) }); } } } render() { const wrappedComponent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, { ...this.props, ...this.state.fallbackStyles }); return this.props.node ? wrappedComponent : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ref: this.bindRef, children: [" ", wrappedComponent, " "] }); } }; }, 'withFallbackStyles')); ;// CONCATENATED MODULE: external ["wp","hooks"] const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-filters/index.js /** * WordPress dependencies */ const ANIMATION_FRAME_PERIOD = 16; /** * Creates a higher-order component which adds filtering capability to the * wrapped component. Filters get applied when the original component is about * to be mounted. When a filter is added or removed that matches the hook name, * the wrapped component re-renders. * * @param hookName Hook name exposed to be used by filters. * * @return Higher-order component factory. * * ```jsx * import { withFilters } from '@wordpress/components'; * import { addFilter } from '@wordpress/hooks'; * * const MyComponent = ( { title } ) => <h1>{ title }</h1>; * * const ComponentToAppend = () => <div>Appended component</div>; * * function withComponentAppended( FilteredComponent ) { * return ( props ) => ( * <> * <FilteredComponent { ...props } /> * <ComponentToAppend /> * </> * ); * } * * addFilter( * 'MyHookName', * 'my-plugin/with-component-appended', * withComponentAppended * ); * * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent ); * ``` */ function withFilters(hookName) { return (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(OriginalComponent => { const namespace = 'core/with-filters/' + hookName; /** * The component definition with current filters applied. Each instance * reuse this shared reference as an optimization to avoid excessive * calls to `applyFilters` when many instances exist. */ let FilteredComponent; /** * Initializes the FilteredComponent variable once, if not already * assigned. Subsequent calls are effectively a noop. */ function ensureFilteredComponent() { if (FilteredComponent === undefined) { FilteredComponent = (0,external_wp_hooks_namespaceObject.applyFilters)(hookName, OriginalComponent); } } class FilteredComponentRenderer extends external_wp_element_namespaceObject.Component { constructor(props) { super(props); ensureFilteredComponent(); } componentDidMount() { FilteredComponentRenderer.instances.push(this); // If there were previously no mounted instances for components // filtered on this hook, add the hook handler. if (FilteredComponentRenderer.instances.length === 1) { (0,external_wp_hooks_namespaceObject.addAction)('hookRemoved', namespace, onHooksUpdated); (0,external_wp_hooks_namespaceObject.addAction)('hookAdded', namespace, onHooksUpdated); } } componentWillUnmount() { FilteredComponentRenderer.instances = FilteredComponentRenderer.instances.filter(instance => instance !== this); // If this was the last of the mounted components filtered on // this hook, remove the hook handler. if (FilteredComponentRenderer.instances.length === 0) { (0,external_wp_hooks_namespaceObject.removeAction)('hookRemoved', namespace); (0,external_wp_hooks_namespaceObject.removeAction)('hookAdded', namespace); } } render() { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FilteredComponent, { ...this.props }); } } FilteredComponentRenderer.instances = []; /** * Updates the FilteredComponent definition, forcing a render for each * mounted instance. This occurs a maximum of once per animation frame. */ const throttledForceUpdate = (0,external_wp_compose_namespaceObject.debounce)(() => { // Recreate the filtered component, only after delay so that it's // computed once, even if many filters added. FilteredComponent = (0,external_wp_hooks_namespaceObject.applyFilters)(hookName, OriginalComponent); // Force each instance to render. FilteredComponentRenderer.instances.forEach(instance => { instance.forceUpdate(); }); }, ANIMATION_FRAME_PERIOD); /** * When a filter is added or removed for the matching hook name, each * mounted instance should re-render with the new filters having been * applied to the original component. * * @param updatedHookName Name of the hook that was updated. */ function onHooksUpdated(updatedHookName) { if (updatedHookName === hookName) { throttledForceUpdate(); } } return FilteredComponentRenderer; }, 'withFilters'); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-return/index.js /** * WordPress dependencies */ /** * Returns true if the given object is component-like. An object is component- * like if it is an instance of wp.element.Component, or is a function. * * @param object Object to test. * * @return Whether object is component-like. */ function isComponentLike(object) { return object instanceof external_wp_element_namespaceObject.Component || typeof object === 'function'; } /** * Higher Order Component used to be used to wrap disposable elements like * sidebars, modals, dropdowns. When mounting the wrapped component, we track a * reference to the current active element so we know where to restore focus * when the component is unmounted. * * @param options The component to be enhanced with * focus return behavior, or an object * describing the component and the * focus return characteristics. * * @return Higher Order Component with the focus restauration behaviour. */ /* harmony default export */ const with_focus_return = ((0,external_wp_compose_namespaceObject.createHigherOrderComponent)( // @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types options => { const HoC = ({ onFocusReturn } = {}) => WrappedComponent => { const WithFocusReturn = props => { const ref = (0,external_wp_compose_namespaceObject.useFocusReturn)(onFocusReturn); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ref: ref, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, { ...props }) }); }; return WithFocusReturn; }; if (isComponentLike(options)) { const WrappedComponent = options; return HoC()(WrappedComponent); } return HoC(options); }, 'withFocusReturn')); const with_focus_return_Provider = ({ children }) => { external_wp_deprecated_default()('wp.components.FocusReturnProvider component', { since: '5.7', hint: 'This provider is not used anymore. You can just remove it from your codebase' }); return children; }; ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-notices/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Override the default edit UI to include notices if supported. * * Wrapping the original component with `withNotices` encapsulates the component * with the additional props `noticeOperations` and `noticeUI`. * * ```jsx * import { withNotices, Button } from '@wordpress/components'; * * const MyComponentWithNotices = withNotices( * ( { noticeOperations, noticeUI } ) => { * const addError = () => * noticeOperations.createErrorNotice( 'Error message' ); * return ( * <div> * { noticeUI } * <Button variant="secondary" onClick={ addError }> * Add error * </Button> * </div> * ); * } * ); * ``` * * @param OriginalComponent Original component. * * @return Wrapped component. */ /* harmony default export */ const with_notices = ((0,external_wp_compose_namespaceObject.createHigherOrderComponent)(OriginalComponent => { function Component(props, ref) { const [noticeList, setNoticeList] = (0,external_wp_element_namespaceObject.useState)([]); const noticeOperations = (0,external_wp_element_namespaceObject.useMemo)(() => { const createNotice = notice => { const noticeToAdd = notice.id ? notice : { ...notice, id: esm_browser_v4() }; setNoticeList(current => [...current, noticeToAdd]); }; return { createNotice, createErrorNotice: msg => { // @ts-expect-error TODO: Missing `id`, potentially a bug createNotice({ status: 'error', content: msg }); }, removeNotice: id => { setNoticeList(current => current.filter(notice => notice.id !== id)); }, removeAllNotices: () => { setNoticeList([]); } }; }, []); const propsOut = { ...props, noticeList, noticeOperations, noticeUI: noticeList.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(list, { className: "components-with-notices-ui", notices: noticeList, onRemove: noticeOperations.removeNotice }) }; return isForwardRef ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OriginalComponent, { ...propsOut, ref: ref }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OriginalComponent, { ...propsOut }); } let isForwardRef; // @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef(). const { render } = OriginalComponent; // Returns a forwardRef if OriginalComponent appears to be a forwardRef. if (typeof render === 'function') { isForwardRef = true; return (0,external_wp_element_namespaceObject.forwardRef)(Component); } return Component; }, 'withNotices')); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/YGMEBI3A.js "use client"; // src/menu/menu-context.ts var YGMEBI3A_menu = createStoreContext( [CompositeContextProvider, HovercardContextProvider], [CompositeScopedContextProvider, HovercardScopedContextProvider] ); var useMenuContext = YGMEBI3A_menu.useContext; var useMenuScopedContext = YGMEBI3A_menu.useScopedContext; var useMenuProviderContext = YGMEBI3A_menu.useProviderContext; var MenuContextProvider = YGMEBI3A_menu.ContextProvider; var MenuScopedContextProvider = YGMEBI3A_menu.ScopedContextProvider; var useMenuBarContext = (/* unused pure expression or super */ null && (useMenubarContext)); var useMenuBarScopedContext = (/* unused pure expression or super */ null && (useMenubarScopedContext)); var useMenuBarProviderContext = (/* unused pure expression or super */ null && (useMenubarProviderContext)); var MenuBarContextProvider = (/* unused pure expression or super */ null && (MenubarContextProvider)); var MenuBarScopedContextProvider = (/* unused pure expression or super */ null && (MenubarScopedContextProvider)); var MenuItemCheckedContext = (0,external_React_.createContext)( void 0 ); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6XBVQI3K.js "use client"; // src/checkbox/checkbox-checked-context.ts var CheckboxCheckedContext = (0,external_React_.createContext)(false); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MW2F7SEA.js "use client"; // src/checkbox/checkbox-check.tsx var checkmark = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "svg", { display: "block", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5pt", viewBox: "0 0 16 16", height: "1em", width: "1em", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("polyline", { points: "4,8 7,12 12,4" }) } ); function getChildren(props) { if (props.checked) { return props.children || checkmark; } if (typeof props.children === "function") { return props.children; } return null; } var useCheckboxCheck = createHook( (_a) => { var _b = _a, { store, checked } = _b, props = __objRest(_b, ["store", "checked"]); const context = (0,external_React_.useContext)(CheckboxCheckedContext); checked = checked != null ? checked : context; const children = getChildren({ checked, children: props.children }); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ "aria-hidden": true }, props), { children, style: _4R3V3JGP_spreadValues({ width: "1em", height: "1em", pointerEvents: "none" }, props.style) }); return props; } ); var CheckboxCheck = createComponent((props) => { const htmlProps = useCheckboxCheck(props); return _3ORBWXWF_createElement("span", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-item-check.js "use client"; // src/menu/menu-item-check.ts var useMenuItemCheck = createHook( (_a) => { var _b = _a, { store, checked } = _b, props = __objRest(_b, ["store", "checked"]); const context = (0,external_React_.useContext)(MenuItemCheckedContext); checked = checked != null ? checked : context; props = useCheckboxCheck(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { checked })); return props; } ); var MenuItemCheck = createComponent((props) => { const htmlProps = useMenuItemCheck(props); return _3ORBWXWF_createElement("span", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/KA4GX64Z.js "use client"; // src/menubar/menubar-context.ts var menubar = createStoreContext( [CompositeContextProvider], [CompositeScopedContextProvider] ); var KA4GX64Z_useMenubarContext = menubar.useContext; var KA4GX64Z_useMenubarScopedContext = menubar.useScopedContext; var KA4GX64Z_useMenubarProviderContext = menubar.useProviderContext; var KA4GX64Z_MenubarContextProvider = menubar.ContextProvider; var KA4GX64Z_MenubarScopedContextProvider = menubar.ScopedContextProvider; var KA4GX64Z_MenuItemCheckedContext = (0,external_React_.createContext)( void 0 ); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/W76OTZCC.js "use client"; // src/combobox/combobox-context.tsx var W76OTZCC_ctx = createStoreContext( [PopoverContextProvider, CompositeContextProvider], [PopoverScopedContextProvider, CompositeScopedContextProvider] ); var useComboboxContext = W76OTZCC_ctx.useContext; var useComboboxScopedContext = W76OTZCC_ctx.useScopedContext; var useComboboxProviderContext = W76OTZCC_ctx.useProviderContext; var ComboboxContextProvider = W76OTZCC_ctx.ContextProvider; var ComboboxScopedContextProvider = W76OTZCC_ctx.ScopedContextProvider; var ComboboxItemValueContext = (0,external_React_.createContext)( void 0 ); var ComboboxItemCheckedContext = (0,external_React_.createContext)(false); ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/menu/menu-store.js "use client"; // src/menu/menu-store.ts function createMenuStore(_a = {}) { var _b = _a, { combobox, parent, menubar } = _b, props = _4R3V3JGP_objRest(_b, [ "combobox", "parent", "menubar" ]); const parentIsMenubar = !!menubar && !parent; const store = mergeStore( props.store, pick2(parent, ["values"]), omit2(combobox, [ "arrowElement", "anchorElement", "contentElement", "popoverElement", "disclosureElement" ]) ); throwOnConflictingProps(props, store); const syncState = store.getState(); const composite = createCompositeStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { store, orientation: defaultValue( props.orientation, syncState.orientation, "vertical" ) })); const hovercard = createHovercardStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { store, placement: defaultValue( props.placement, syncState.placement, "bottom-start" ), timeout: defaultValue( props.timeout, syncState.timeout, parentIsMenubar ? 0 : 150 ), hideTimeout: defaultValue(props.hideTimeout, syncState.hideTimeout, 0) })); const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, composite.getState()), hovercard.getState()), { initialFocus: defaultValue(syncState.initialFocus, "container"), values: defaultValue( props.values, syncState.values, props.defaultValues, {} ) }); const menu = createStore(initialState, composite, hovercard, store); setup( menu, () => sync(menu, ["mounted"], (state) => { if (state.mounted) return; menu.setState("activeId", null); }) ); setup( menu, () => sync(parent, ["orientation"], (state) => { menu.setState( "placement", state.orientation === "vertical" ? "right-start" : "bottom-start" ); }) ); return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, composite), hovercard), menu), { combobox, parent, menubar, hideAll: () => { hovercard.hide(); parent == null ? void 0 : parent.hideAll(); }, setInitialFocus: (value) => menu.setState("initialFocus", value), setValues: (values) => menu.setState("values", values), setValue: (name, value) => { if (name === "__proto__") return; if (name === "constructor") return; if (Array.isArray(name)) return; menu.setState("values", (values) => { const prevValue = values[name]; const nextValue = Y3OOHFCN_applyState(value, prevValue); if (nextValue === prevValue) return values; return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, values), { [name]: nextValue !== void 0 && nextValue }); }); } }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/XJXP7ZSQ.js "use client"; // src/menu/menu-store.ts function useMenuStoreProps(store, update, props) { useUpdateEffect(update, [props.combobox, props.parent, props.menubar]); store = useCompositeStoreProps(store, update, props); store = useHovercardStoreProps(store, update, props); useStoreProps(store, props, "values", "setValues"); return Object.assign(store, { combobox: props.combobox, parent: props.parent, menubar: props.menubar }); } function useMenuStore(props = {}) { const parent = useMenuContext(); const menubar = KA4GX64Z_useMenubarContext(); const combobox = useComboboxProviderContext(); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { parent: props.parent !== void 0 ? props.parent : parent, menubar: props.menubar !== void 0 ? props.menubar : menubar, combobox: props.combobox !== void 0 ? props.combobox : combobox }); const [store, update] = EKQEJRUF_useStore(createMenuStore, props); return useMenuStoreProps(store, update, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/VDNZBO4W.js "use client"; // src/button/button.ts var useButton = createHook((props) => { const ref = (0,external_React_.useRef)(null); const tagName = useTagName(ref, props.as || "button"); const [isNativeButton, setIsNativeButton] = (0,external_React_.useState)( () => !!tagName && isButton({ tagName, type: props.type }) ); (0,external_React_.useEffect)(() => { if (!ref.current) return; setIsNativeButton(isButton(ref.current)); }, []); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ role: !isNativeButton && tagName !== "a" ? "button" : void 0 }, props), { ref: useMergeRefs(ref, props.ref) }); props = useCommand(props); return props; }); var VDNZBO4W_Button = createComponent((props) => { const htmlProps = useButton(props); return _3ORBWXWF_createElement("button", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/BHEJ6NUH.js "use client"; // src/disclosure/disclosure.ts var BHEJ6NUH_symbol = Symbol("disclosure"); var useDisclosure = createHook( (_a) => { var _b = _a, { store, toggleOnClick = true } = _b, props = __objRest(_b, ["store", "toggleOnClick"]); const context = useDisclosureProviderContext(); store = store || context; invariant( store, false && 0 ); const ref = (0,external_React_.useRef)(null); const [expanded, setExpanded] = (0,external_React_.useState)(false); const disclosureElement = store.useState("disclosureElement"); const open = store.useState("open"); (0,external_React_.useEffect)(() => { let isCurrentDisclosure = disclosureElement === ref.current; if (!(disclosureElement == null ? void 0 : disclosureElement.isConnected)) { store == null ? void 0 : store.setDisclosureElement(ref.current); isCurrentDisclosure = true; } setExpanded(open && isCurrentDisclosure); }, [disclosureElement, store, open]); const onClickProp = props.onClick; const toggleOnClickProp = useBooleanEvent(toggleOnClick); const [isDuplicate, metadataProps] = useMetadataProps(props, BHEJ6NUH_symbol, true); const onClick = useEvent((event) => { onClickProp == null ? void 0 : onClickProp(event); if (event.defaultPrevented) return; if (isDuplicate) return; if (!toggleOnClickProp(event)) return; store == null ? void 0 : store.setDisclosureElement(event.currentTarget); store == null ? void 0 : store.toggle(); }); const contentElement = store.useState("contentElement"); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({ "aria-expanded": expanded, "aria-controls": contentElement == null ? void 0 : contentElement.id }, metadataProps), props), { ref: useMergeRefs(ref, props.ref), onClick }); props = useButton(props); return props; } ); var Disclosure = createComponent((props) => { const htmlProps = useDisclosure(props); return _3ORBWXWF_createElement("button", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/H3TG2CZP.js "use client"; // src/dialog/dialog-disclosure.ts var useDialogDisclosure = createHook( (_a) => { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const context = useDialogProviderContext(); store = store || context; invariant( store, false && 0 ); const contentElement = store.useState("contentElement"); props = _4R3V3JGP_spreadValues({ "aria-haspopup": getPopupRole(contentElement, "dialog") }, props); props = useDisclosure(_4R3V3JGP_spreadValues({ store }, props)); return props; } ); var DialogDisclosure = createComponent( (props) => { const htmlProps = useDialogDisclosure(props); return _3ORBWXWF_createElement("button", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/JCH6MLL2.js "use client"; // src/popover/popover-anchor.ts var usePopoverAnchor = createHook( (_a) => { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const context = usePopoverProviderContext(); store = store || context; props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref) }); return props; } ); var PopoverAnchor = createComponent((props) => { const htmlProps = usePopoverAnchor(props); return _3ORBWXWF_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4ZEZYKUR.js "use client"; // src/popover/popover-disclosure.tsx var usePopoverDisclosure = createHook( (_a) => { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const context = usePopoverProviderContext(); store = store || context; invariant( store, false && 0 ); const onClickProp = props.onClick; const onClick = useEvent((event) => { store == null ? void 0 : store.setAnchorElement(event.currentTarget); onClickProp == null ? void 0 : onClickProp(event); }); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PopoverScopedContextProvider, { value: store, children: element }), [store] ); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { onClick }); props = usePopoverAnchor(_4R3V3JGP_spreadValues({ store }, props)); props = useDialogDisclosure(_4R3V3JGP_spreadValues({ store }, props)); return props; } ); var PopoverDisclosure = createComponent( (props) => { const htmlProps = usePopoverDisclosure(props); return _3ORBWXWF_createElement("button", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/346FK57L.js "use client"; // src/composite/composite-typeahead.ts var chars = ""; function clearChars() { chars = ""; } function isValidTypeaheadEvent(event) { const target = event.target; if (target && DLOEKDPY_isTextField(target)) return false; if (event.key === " " && chars.length) return true; return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\p{Letter}\p{Number}]$/u.test(event.key); } function isSelfTargetOrItem(event, items) { if (isSelfTarget(event)) return true; const target = event.target; if (!target) return false; const isItem = items.some((item) => item.element === target); return isItem; } function _346FK57L_getEnabledItems(items) { return items.filter((item) => !item.disabled); } function itemTextStartsWith(item, text) { var _a; const itemText = ((_a = item.element) == null ? void 0 : _a.textContent) || item.children; if (!itemText) return false; return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase()); } function getSameInitialItems(items, char, activeId) { if (!activeId) return items; const activeItem = items.find((item) => item.id === activeId); if (!activeItem) return items; if (!itemTextStartsWith(activeItem, char)) return items; if (chars !== char && itemTextStartsWith(activeItem, chars)) return items; chars = char; return flipItems( items.filter((item) => itemTextStartsWith(item, chars)), activeId ).filter((item) => item.id !== activeId); } var useCompositeTypeahead = createHook( (_a) => { var _b = _a, { store, typeahead = true } = _b, props = __objRest(_b, ["store", "typeahead"]); const context = useCompositeContext(); store = store || context; invariant( store, false && 0 ); const onKeyDownCaptureProp = props.onKeyDownCapture; const cleanupTimeoutRef = (0,external_React_.useRef)(0); const onKeyDownCapture = useEvent( (event) => { onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event); if (event.defaultPrevented) return; if (!typeahead) return; if (!store) return; const { items, activeId } = store.getState(); if (!isValidTypeaheadEvent(event)) return clearChars(); let enabledItems = _346FK57L_getEnabledItems(items); if (!isSelfTargetOrItem(event, enabledItems)) return clearChars(); event.preventDefault(); window.clearTimeout(cleanupTimeoutRef.current); cleanupTimeoutRef.current = window.setTimeout(() => { chars = ""; }, 500); const char = event.key.toLowerCase(); chars += char; enabledItems = getSameInitialItems(enabledItems, char, activeId); const item = enabledItems.find( (item2) => itemTextStartsWith(item2, chars) ); if (item) { store.move(item.id); } else { clearChars(); } } ); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { onKeyDownCapture }); return props; } ); var CompositeTypeahead = createComponent( (props) => { const htmlProps = useCompositeTypeahead(props); return _3ORBWXWF_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-button.js "use client"; // src/menu/menu-button.tsx function getInitialFocus(event, dir) { const keyMap = { ArrowDown: dir === "bottom" || dir === "top" ? "first" : false, ArrowUp: dir === "bottom" || dir === "top" ? "last" : false, ArrowRight: dir === "right" ? "first" : false, ArrowLeft: dir === "left" ? "first" : false }; return keyMap[event.key]; } function hasActiveItem(items, excludeElement) { return !!(items == null ? void 0 : items.some((item) => { if (!item.element) return false; if (item.element === excludeElement) return false; return item.element.getAttribute("aria-expanded") === "true"; })); } var useMenuButton = createHook( (_a) => { var _b = _a, { store, focusable, accessibleWhenDisabled, showOnHover } = _b, props = __objRest(_b, ["store", "focusable", "accessibleWhenDisabled", "showOnHover"]); const context = useMenuProviderContext(); store = store || context; invariant( store, false && 0 ); const ref = (0,external_React_.useRef)(null); const parentMenu = store.parent; const parentMenubar = store.menubar; const hasParentMenu = !!parentMenu; const parentIsMenubar = !!parentMenubar && !hasParentMenu; const disabled = disabledFromProps(props); const showMenu = () => { const trigger = ref.current; if (!trigger) return; store == null ? void 0 : store.setDisclosureElement(trigger); store == null ? void 0 : store.setAnchorElement(trigger); store == null ? void 0 : store.show(); }; const onFocusProp = props.onFocus; const onFocus = useEvent((event) => { onFocusProp == null ? void 0 : onFocusProp(event); if (disabled) return; if (event.defaultPrevented) return; store == null ? void 0 : store.setAutoFocusOnShow(false); store == null ? void 0 : store.setActiveId(null); if (!parentMenubar) return; if (!parentIsMenubar) return; const { items } = parentMenubar.getState(); if (hasActiveItem(items, event.currentTarget)) { showMenu(); } }); const dir = store.useState( (state) => state.placement.split("-")[0] ); const onKeyDownProp = props.onKeyDown; const onKeyDown = useEvent((event) => { onKeyDownProp == null ? void 0 : onKeyDownProp(event); if (disabled) return; if (event.defaultPrevented) return; const initialFocus = getInitialFocus(event, dir); if (initialFocus) { event.preventDefault(); showMenu(); store == null ? void 0 : store.setAutoFocusOnShow(true); store == null ? void 0 : store.setInitialFocus(initialFocus); } }); const onClickProp = props.onClick; const onClick = useEvent((event) => { onClickProp == null ? void 0 : onClickProp(event); if (event.defaultPrevented) return; if (!store) return; const isKeyboardClick = !event.detail; const { open } = store.getState(); if (!open || isKeyboardClick) { if (!hasParentMenu || isKeyboardClick) { store.setAutoFocusOnShow(true); } store.setInitialFocus(isKeyboardClick ? "first" : "container"); } if (hasParentMenu) { showMenu(); } }); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuContextProvider, { value: store, children: element }), [store] ); if (hasParentMenu) { props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { render: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Role.div, { render: props.render }) }); } const id = useId(props.id); const parentContentElement = useStoreState( (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu, "contentElement" ); const role = hasParentMenu || parentIsMenubar ? getPopupItemRole(parentContentElement, "menuitem") : void 0; const contentElement = store.useState("contentElement"); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ id, role, "aria-haspopup": getPopupRole(contentElement, "menu") }, props), { ref: useMergeRefs(ref, props.ref), onFocus, onKeyDown, onClick }); props = useHovercardAnchor(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ store, focusable, accessibleWhenDisabled }, props), { showOnHover: (event) => { const getShowOnHover = () => { if (typeof showOnHover === "function") return showOnHover(event); if (showOnHover != null) return showOnHover; if (hasParentMenu) return true; if (!parentMenubar) return false; const { items } = parentMenubar.getState(); return parentIsMenubar && hasActiveItem(items); }; const canShowOnHover = getShowOnHover(); if (!canShowOnHover) return false; const parent = parentIsMenubar ? parentMenubar : parentMenu; if (!parent) return true; parent.setActiveId(event.currentTarget.id); return true; } })); props = usePopoverDisclosure(_4R3V3JGP_spreadValues({ store, toggleOnClick: !hasParentMenu, focusable, accessibleWhenDisabled }, props)); props = useCompositeTypeahead(_4R3V3JGP_spreadValues({ store, typeahead: parentIsMenubar }, props)); return props; } ); var MenuButton = createComponent((props) => { const htmlProps = useMenuButton(props); return _3ORBWXWF_createElement("button", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js /** * WordPress dependencies */ const chevronRightSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) }); /* harmony default export */ const chevron_right_small = (chevronRightSmall); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/HHNFDKU2.js "use client"; // src/menu/menu-list.tsx function useAriaLabelledBy(_a) { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const [id, setId] = (0,external_React_.useState)(void 0); const label = props["aria-label"]; const disclosureElement = useStoreState(store, "disclosureElement"); const contentElement = useStoreState(store, "contentElement"); (0,external_React_.useEffect)(() => { const disclosure = disclosureElement; if (!disclosure) return; const menu = contentElement; if (!menu) return; const menuLabel = label || menu.hasAttribute("aria-label"); if (menuLabel) { setId(void 0); } else if (disclosure.id) { setId(disclosure.id); } }, [label, disclosureElement, contentElement]); return id; } var useMenuList = createHook( (_a) => { var _b = _a, { store, alwaysVisible, composite } = _b, props = __objRest(_b, ["store", "alwaysVisible", "composite"]); const context = useMenuProviderContext(); store = store || context; invariant( store, false && 0 ); const parentMenu = store.parent; const parentMenubar = store.menubar; const hasParentMenu = !!parentMenu; const id = useId(props.id); const onKeyDownProp = props.onKeyDown; const dir = store.useState( (state) => state.placement.split("-")[0] ); const orientation = store.useState( (state) => state.orientation === "both" ? void 0 : state.orientation ); const isHorizontal = orientation !== "vertical"; const isMenubarHorizontal = useStoreState( parentMenubar, (state) => !!state && state.orientation !== "vertical" ); const onKeyDown = useEvent((event) => { onKeyDownProp == null ? void 0 : onKeyDownProp(event); if (event.defaultPrevented) return; if (hasParentMenu || parentMenubar && !isHorizontal) { const hideMap = { ArrowRight: () => dir === "left" && !isHorizontal, ArrowLeft: () => dir === "right" && !isHorizontal, ArrowUp: () => dir === "bottom" && isHorizontal, ArrowDown: () => dir === "top" && isHorizontal }; const action = hideMap[event.key]; if (action == null ? void 0 : action()) { event.stopPropagation(); event.preventDefault(); return store == null ? void 0 : store.hide(); } } if (parentMenubar) { const keyMap = { ArrowRight: () => { if (!isMenubarHorizontal) return; return parentMenubar.next(); }, ArrowLeft: () => { if (!isMenubarHorizontal) return; return parentMenubar.previous(); }, ArrowDown: () => { if (isMenubarHorizontal) return; return parentMenubar.next(); }, ArrowUp: () => { if (isMenubarHorizontal) return; return parentMenubar.previous(); } }; const action = keyMap[event.key]; const id2 = action == null ? void 0 : action(); if (id2 !== void 0) { event.stopPropagation(); event.preventDefault(); parentMenubar.move(id2); } } }); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuScopedContextProvider, { value: store, children: element }), [store] ); const ariaLabelledBy = useAriaLabelledBy(_4R3V3JGP_spreadValues({ store }, props)); const mounted = store.useState("mounted"); const hidden = isHidden(mounted, props.hidden, alwaysVisible); const style = hidden ? _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props.style), { display: "none" }) : props.style; props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ id, "aria-labelledby": ariaLabelledBy, hidden }, props), { ref: useMergeRefs(id ? store.setContentElement : null, props.ref), style, onKeyDown }); const hasCombobox = !!store.combobox; composite = composite != null ? composite : !hasCombobox; if (composite) { props = _4R3V3JGP_spreadValues({ role: "menu", "aria-orientation": orientation }, props); } props = useComposite(_4R3V3JGP_spreadValues({ store, composite }, props)); props = useCompositeTypeahead(_4R3V3JGP_spreadValues({ store, typeahead: !hasCombobox }, props)); return props; } ); var MenuList = createComponent((props) => { const htmlProps = useMenuList(props); return _3ORBWXWF_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu.js "use client"; // src/menu/menu.tsx var useMenu = createHook( (_a) => { var _b = _a, { store, modal: modalProp = false, portal = !!modalProp, hideOnEscape = true, autoFocusOnShow = true, hideOnHoverOutside, alwaysVisible } = _b, props = __objRest(_b, [ "store", "modal", "portal", "hideOnEscape", "autoFocusOnShow", "hideOnHoverOutside", "alwaysVisible" ]); const context = useMenuProviderContext(); store = store || context; invariant( store, false && 0 ); const ref = (0,external_React_.useRef)(null); const parentMenu = store.parent; const parentMenubar = store.menubar; const hasParentMenu = !!parentMenu; const parentIsMenubar = !!parentMenubar && !hasParentMenu; props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { ref: useMergeRefs(ref, props.ref) }); const _a2 = useMenuList( _4R3V3JGP_spreadValues({ store, alwaysVisible }, props) ), { "aria-labelledby": ariaLabelledBy } = _a2, menuListProps = __objRest(_a2, ["aria-labelledby"]); props = menuListProps; const [initialFocusRef, setInitialFocusRef] = (0,external_React_.useState)(); const autoFocusOnShowState = store.useState("autoFocusOnShow"); const initialFocus = store.useState("initialFocus"); const baseElement = store.useState("baseElement"); const items = store.useState("renderedItems"); (0,external_React_.useEffect)(() => { let cleaning = false; setInitialFocusRef((prevInitialFocusRef) => { var _a3, _b2, _c; if (cleaning) return; if (!autoFocusOnShowState) return; if ((_a3 = prevInitialFocusRef == null ? void 0 : prevInitialFocusRef.current) == null ? void 0 : _a3.isConnected) return prevInitialFocusRef; const ref2 = (0,external_React_.createRef)(); switch (initialFocus) { case "first": ref2.current = ((_b2 = items.find((item) => !item.disabled && item.element)) == null ? void 0 : _b2.element) || null; break; case "last": ref2.current = ((_c = [...items].reverse().find((item) => !item.disabled && item.element)) == null ? void 0 : _c.element) || null; break; default: ref2.current = baseElement; } return ref2; }); return () => { cleaning = true; }; }, [store, autoFocusOnShowState, initialFocus, items, baseElement]); const modal = hasParentMenu ? false : modalProp; const mayAutoFocusOnShow = !!autoFocusOnShow; const canAutoFocusOnShow = !!initialFocusRef || !!props.initialFocus || !!modal; const contentElement = useStoreState( store.combobox || store, "contentElement" ); const parentContentElement = useStoreState( (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu, "contentElement" ); const preserveTabOrderAnchor = (0,external_React_.useMemo)(() => { if (!parentContentElement) return; if (!contentElement) return; const role = contentElement.getAttribute("role"); const parentRole = parentContentElement.getAttribute("role"); const parentIsMenuOrMenubar = parentRole === "menu" || parentRole === "menubar"; if (parentIsMenuOrMenubar && role === "menu") return; return parentContentElement; }, [contentElement, parentContentElement]); if (preserveTabOrderAnchor !== void 0) { props = _4R3V3JGP_spreadValues({ preserveTabOrderAnchor }, props); } props = useHovercard(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ store, alwaysVisible, initialFocus: initialFocusRef, autoFocusOnShow: mayAutoFocusOnShow ? canAutoFocusOnShow && autoFocusOnShow : autoFocusOnShowState || !!modal }, props), { hideOnEscape: (event) => { if (isFalsyBooleanCallback(hideOnEscape, event)) return false; store == null ? void 0 : store.hideAll(); return true; }, hideOnHoverOutside: (event) => { const disclosureElement = store == null ? void 0 : store.getState().disclosureElement; const getHideOnHoverOutside = () => { if (typeof hideOnHoverOutside === "function") { return hideOnHoverOutside(event); } if (hideOnHoverOutside != null) return hideOnHoverOutside; if (hasParentMenu) return true; if (!parentIsMenubar) return false; if (!disclosureElement) return true; if (hasFocusWithin(disclosureElement)) return false; return true; }; if (!getHideOnHoverOutside()) return false; if (event.defaultPrevented) return true; if (!hasParentMenu) return true; if (!disclosureElement) return true; fireEvent(disclosureElement, "mouseout", event); if (!hasFocusWithin(disclosureElement)) return true; requestAnimationFrame(() => { if (hasFocusWithin(disclosureElement)) return; store == null ? void 0 : store.hide(); }); return false; }, modal, portal, backdrop: hasParentMenu ? false : props.backdrop })); props = _4R3V3JGP_spreadValues({ "aria-labelledby": ariaLabelledBy }, props); return props; } ); var Menu = createDialogComponent( createComponent((props) => { const htmlProps = useMenu(props); return _3ORBWXWF_createElement("div", htmlProps); }), useMenuProviderContext ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/G6ONQ5EH.js "use client"; // src/composite/composite-hover.ts function getMouseDestination(event) { const relatedTarget = event.relatedTarget; if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) { return relatedTarget; } return null; } function hoveringInside(event) { const nextElement = getMouseDestination(event); if (!nextElement) return false; return contains(event.currentTarget, nextElement); } var G6ONQ5EH_symbol = Symbol("composite-hover"); function movingToAnotherItem(event) { let dest = getMouseDestination(event); if (!dest) return false; do { if (Y3OOHFCN_hasOwnProperty(dest, G6ONQ5EH_symbol) && dest[G6ONQ5EH_symbol]) return true; dest = dest.parentElement; } while (dest); return false; } var useCompositeHover = createHook( (_a) => { var _b = _a, { store, focusOnHover = true, blurOnHoverEnd = !!focusOnHover } = _b, props = __objRest(_b, [ "store", "focusOnHover", "blurOnHoverEnd" ]); const context = useCompositeContext(); store = store || context; invariant( store, false && 0 ); const isMouseMoving = useIsMouseMoving(); const onMouseMoveProp = props.onMouseMove; const focusOnHoverProp = useBooleanEvent(focusOnHover); const onMouseMove = useEvent((event) => { onMouseMoveProp == null ? void 0 : onMouseMoveProp(event); if (event.defaultPrevented) return; if (!isMouseMoving()) return; if (!focusOnHoverProp(event)) return; if (!hasFocusWithin(event.currentTarget)) { const baseElement = store == null ? void 0 : store.getState().baseElement; if (baseElement && !hasFocus(baseElement)) { baseElement.focus(); } } store == null ? void 0 : store.setActiveId(event.currentTarget.id); }); const onMouseLeaveProp = props.onMouseLeave; const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd); const onMouseLeave = useEvent((event) => { var _a2; onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event); if (event.defaultPrevented) return; if (!isMouseMoving()) return; if (hoveringInside(event)) return; if (movingToAnotherItem(event)) return; if (!focusOnHoverProp(event)) return; if (!blurOnHoverEndProp(event)) return; store == null ? void 0 : store.setActiveId(null); (_a2 = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a2.focus(); }); const ref = (0,external_React_.useCallback)((element) => { if (!element) return; element[G6ONQ5EH_symbol] = true; }, []); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { ref: useMergeRefs(ref, props.ref), onMouseMove, onMouseLeave }); return props; } ); var CompositeHover = createMemoComponent( (props) => { const htmlProps = useCompositeHover(props); return _3ORBWXWF_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/Y6467XPW.js "use client"; // src/menu/menu-item.ts function menuHasFocus(baseElement, items, currentTarget) { var _a; if (!baseElement) return false; if (hasFocusWithin(baseElement)) return true; const expandedItem = items == null ? void 0 : items.find((item) => { var _a2; if (item.element === currentTarget) return false; return ((_a2 = item.element) == null ? void 0 : _a2.getAttribute("aria-expanded")) === "true"; }); const expandedMenuId = (_a = expandedItem == null ? void 0 : expandedItem.element) == null ? void 0 : _a.getAttribute("aria-controls"); if (!expandedMenuId) return false; const doc = DLOEKDPY_getDocument(baseElement); const expandedMenu = doc.getElementById(expandedMenuId); if (!expandedMenu) return false; if (hasFocusWithin(expandedMenu)) return true; return !!expandedMenu.querySelector("[role=menuitem][aria-expanded=true]"); } var useMenuItem = createHook( (_a) => { var _b = _a, { store, hideOnClick = true, preventScrollOnKeyDown = true, focusOnHover, blurOnHoverEnd } = _b, props = __objRest(_b, [ "store", "hideOnClick", "preventScrollOnKeyDown", "focusOnHover", "blurOnHoverEnd" ]); const menuContext = useMenuScopedContext(true); const menubarContext = KA4GX64Z_useMenubarScopedContext(); store = store || menuContext || menubarContext; invariant( store, false && 0 ); const onClickProp = props.onClick; const hideOnClickProp = useBooleanEvent(hideOnClick); const hideMenu = "hideAll" in store ? store.hideAll : void 0; const isWithinMenu = !!hideMenu; const onClick = useEvent((event) => { onClickProp == null ? void 0 : onClickProp(event); if (event.defaultPrevented) return; if (isDownloading(event)) return; if (isOpeningInNewTab(event)) return; if (!hideMenu) return; const popupType = event.currentTarget.getAttribute("aria-haspopup"); if (popupType === "menu") return; if (!hideOnClickProp(event)) return; hideMenu(); }); const contentElement = useStoreState( store, (state) => "contentElement" in state ? state.contentElement : null ); const role = getPopupItemRole(contentElement, "menuitem"); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ role }, props), { onClick }); props = useCompositeItem(_4R3V3JGP_spreadValues({ store, preventScrollOnKeyDown }, props)); props = useCompositeHover(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ store }, props), { focusOnHover(event) { const getFocusOnHover = () => { if (typeof focusOnHover === "function") return focusOnHover(event); if (focusOnHover != null) return focusOnHover; return true; }; if (!store) return false; if (!getFocusOnHover()) return false; const { baseElement, items } = store.getState(); if (isWithinMenu) { if (event.currentTarget.hasAttribute("aria-expanded")) { event.currentTarget.focus(); } return true; } if (menuHasFocus(baseElement, items, event.currentTarget)) { event.currentTarget.focus(); return true; } return false; }, blurOnHoverEnd(event) { if (typeof blurOnHoverEnd === "function") return blurOnHoverEnd(event); if (blurOnHoverEnd != null) return blurOnHoverEnd; return isWithinMenu; } })); return props; } ); var Y6467XPW_MenuItem = createMemoComponent((props) => { const htmlProps = useMenuItem(props); return _3ORBWXWF_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/checkbox/checkbox-store.js "use client"; // src/checkbox/checkbox-store.ts function createCheckboxStore(props = {}) { var _a; throwOnConflictingProps(props, props.store); const syncState = (_a = props.store) == null ? void 0 : _a.getState(); const initialState = { value: defaultValue( props.value, syncState == null ? void 0 : syncState.value, props.defaultValue, false ) }; const checkbox = createStore(initialState, props.store); return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, checkbox), { setValue: (value) => checkbox.setState("value", value) }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/JIZ5C2JK.js "use client"; // src/checkbox/checkbox-store.ts function useCheckboxStoreProps(store, update, props) { useUpdateEffect(update, [props.store]); useStoreProps(store, props, "value", "setValue"); return store; } function useCheckboxStore(props = {}) { const [store, update] = EKQEJRUF_useStore(createCheckboxStore, props); return useCheckboxStoreProps(store, update, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/VPR2WHQV.js "use client"; // src/checkbox/checkbox-context.tsx var VPR2WHQV_ctx = createStoreContext(); var useCheckboxContext = VPR2WHQV_ctx.useContext; var useCheckboxScopedContext = VPR2WHQV_ctx.useScopedContext; var useCheckboxProviderContext = VPR2WHQV_ctx.useProviderContext; var CheckboxContextProvider = VPR2WHQV_ctx.ContextProvider; var CheckboxScopedContextProvider = VPR2WHQV_ctx.ScopedContextProvider; ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3AHQ6JCP.js "use client"; // src/checkbox/checkbox.tsx function setMixed(element, mixed) { if (mixed) { element.indeterminate = true; } else if (element.indeterminate) { element.indeterminate = false; } } function isNativeCheckbox(tagName, type) { return tagName === "input" && (!type || type === "checkbox"); } function getPrimitiveValue(value) { if (Array.isArray(value)) { return value.toString(); } return value; } var useCheckbox = createHook( (_a) => { var _b = _a, { store, name, value: valueProp, checked: checkedProp, defaultChecked } = _b, props = __objRest(_b, [ "store", "name", "value", "checked", "defaultChecked" ]); const context = useCheckboxContext(); store = store || context; const [_checked, setChecked] = (0,external_React_.useState)(defaultChecked != null ? defaultChecked : false); const checked = useStoreState(store, (state) => { if (checkedProp !== void 0) return checkedProp; if ((state == null ? void 0 : state.value) === void 0) return _checked; if (valueProp != null) { if (Array.isArray(state.value)) { const primitiveValue = getPrimitiveValue(valueProp); return state.value.includes(primitiveValue); } return state.value === valueProp; } if (Array.isArray(state.value)) return false; if (typeof state.value === "boolean") return state.value; return false; }); const ref = (0,external_React_.useRef)(null); const tagName = useTagName(ref, props.as || "input"); const nativeCheckbox = isNativeCheckbox(tagName, props.type); const mixed = checked ? checked === "mixed" : void 0; const isChecked = checked === "mixed" ? false : checked; const disabled = disabledFromProps(props); const [propertyUpdated, schedulePropertyUpdate] = useForceUpdate(); (0,external_React_.useEffect)(() => { const element = ref.current; if (!element) return; setMixed(element, mixed); if (nativeCheckbox) return; element.checked = isChecked; if (name !== void 0) { element.name = name; } if (valueProp !== void 0) { element.value = `${valueProp}`; } }, [propertyUpdated, mixed, nativeCheckbox, isChecked, name, valueProp]); const onChangeProp = props.onChange; const onChange = useEvent((event) => { if (disabled) { event.stopPropagation(); event.preventDefault(); return; } setMixed(event.currentTarget, mixed); if (!nativeCheckbox) { event.currentTarget.checked = !event.currentTarget.checked; schedulePropertyUpdate(); } onChangeProp == null ? void 0 : onChangeProp(event); if (event.defaultPrevented) return; const elementChecked = event.currentTarget.checked; setChecked(elementChecked); store == null ? void 0 : store.setValue((prevValue) => { if (valueProp == null) return elementChecked; const primitiveValue = getPrimitiveValue(valueProp); if (!Array.isArray(prevValue)) { return prevValue === primitiveValue ? false : primitiveValue; } if (elementChecked) { if (prevValue.includes(primitiveValue)) { return prevValue; } return [...prevValue, primitiveValue]; } return prevValue.filter((v) => v !== primitiveValue); }); }); const onClickProp = props.onClick; const onClick = useEvent((event) => { onClickProp == null ? void 0 : onClickProp(event); if (event.defaultPrevented) return; if (nativeCheckbox) return; onChange(event); }); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CheckboxCheckedContext.Provider, { value: isChecked, children: element }), [isChecked] ); props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ role: !nativeCheckbox ? "checkbox" : void 0, type: nativeCheckbox ? "checkbox" : void 0, "aria-checked": checked }, props), { ref: useMergeRefs(ref, props.ref), onChange, onClick }); props = useCommand(_4R3V3JGP_spreadValues({ clickOnEnter: !nativeCheckbox }, props)); return _4R3V3JGP_spreadValues({ name: nativeCheckbox ? name : void 0, value: nativeCheckbox ? valueProp : void 0, checked: isChecked }, props); } ); var Checkbox = createComponent((props) => { const htmlProps = useCheckbox(props); return _3ORBWXWF_createElement("input", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-item-checkbox.js "use client"; // src/menu/menu-item-checkbox.ts function menu_item_checkbox_getPrimitiveValue(value) { if (Array.isArray(value)) { return value.toString(); } return value; } function getValue(storeValue, value, checked) { if (value === void 0) { if (Array.isArray(storeValue)) return storeValue; return !!checked; } const primitiveValue = menu_item_checkbox_getPrimitiveValue(value); if (!Array.isArray(storeValue)) { if (checked) { return primitiveValue; } return storeValue === primitiveValue ? false : storeValue; } if (checked) { if (storeValue.includes(primitiveValue)) { return storeValue; } return [...storeValue, primitiveValue]; } return storeValue.filter((v) => v !== primitiveValue); } var useMenuItemCheckbox = createHook( (_a) => { var _b = _a, { store, name, value, checked, defaultChecked: defaultCheckedProp, hideOnClick = false } = _b, props = __objRest(_b, [ "store", "name", "value", "checked", "defaultChecked", "hideOnClick" ]); const context = useMenuScopedContext(); store = store || context; invariant( store, false && 0 ); const defaultChecked = useInitialValue(defaultCheckedProp); (0,external_React_.useEffect)(() => { store == null ? void 0 : store.setValue(name, (prevValue = []) => { if (!defaultChecked) return prevValue; return getValue(prevValue, value, true); }); }, [store, name, value, defaultChecked]); (0,external_React_.useEffect)(() => { if (checked === void 0) return; store == null ? void 0 : store.setValue(name, (prevValue) => { return getValue(prevValue, value, checked); }); }, [store, name, value, checked]); const checkboxStore = useCheckboxStore({ value: store.useState((state) => state.values[name]), setValue(internalValue) { store == null ? void 0 : store.setValue(name, () => { if (checked === void 0) return internalValue; const nextValue = getValue(internalValue, value, checked); if (!Array.isArray(nextValue)) return nextValue; if (!Array.isArray(internalValue)) return nextValue; if (shallowEqual(internalValue, nextValue)) return internalValue; return nextValue; }); } }); props = _4R3V3JGP_spreadValues({ role: "menuitemcheckbox" }, props); props = useCheckbox(_4R3V3JGP_spreadValues({ store: checkboxStore, name, value, checked }, props)); props = useMenuItem(_4R3V3JGP_spreadValues({ store, hideOnClick }, props)); return props; } ); var MenuItemCheckbox = createMemoComponent( (props) => { const htmlProps = useMenuItemCheckbox(props); return _3ORBWXWF_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-item-radio.js "use client"; // src/menu/menu-item-radio.tsx function menu_item_radio_getValue(prevValue, value, checked) { if (checked === void 0) return prevValue; if (checked) return value; return prevValue; } var useMenuItemRadio = createHook( (_a) => { var _b = _a, { store, name, value, checked, onChange: onChangeProp, hideOnClick = false } = _b, props = __objRest(_b, [ "store", "name", "value", "checked", "onChange", "hideOnClick" ]); const context = useMenuScopedContext(); store = store || context; invariant( store, false && 0 ); const defaultChecked = useInitialValue(props.defaultChecked); (0,external_React_.useEffect)(() => { store == null ? void 0 : store.setValue(name, (prevValue = false) => { return menu_item_radio_getValue(prevValue, value, defaultChecked); }); }, [store, name, value, defaultChecked]); (0,external_React_.useEffect)(() => { if (checked === void 0) return; store == null ? void 0 : store.setValue(name, (prevValue) => { return menu_item_radio_getValue(prevValue, value, checked); }); }, [store, name, value, checked]); const isChecked = store.useState((state) => state.values[name] === value); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuItemCheckedContext.Provider, { value: !!isChecked, children: element }), [isChecked] ); props = _4R3V3JGP_spreadValues({ role: "menuitemradio" }, props); props = useRadio(_4R3V3JGP_spreadValues({ name, value, checked: isChecked, onChange: (event) => { onChangeProp == null ? void 0 : onChangeProp(event); if (event.defaultPrevented) return; const element = event.currentTarget; store == null ? void 0 : store.setValue(name, (prevValue) => { return menu_item_radio_getValue(prevValue, value, checked != null ? checked : element.checked); }); } }, props)); props = useMenuItem(_4R3V3JGP_spreadValues({ store, hideOnClick }, props)); return props; } ); var MenuItemRadio = createMemoComponent( (props) => { const htmlProps = useMenuItemRadio(props); return _3ORBWXWF_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-group.js "use client"; // src/menu/menu-group.ts var useMenuGroup = createHook((props) => { props = useCompositeGroup(props); return props; }); var menu_group_MenuGroup = createComponent((props) => { const htmlProps = useMenuGroup(props); return _3ORBWXWF_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ENRQQ6LK.js "use client"; // src/composite/composite-separator.ts var useCompositeSeparator = createHook( (_a) => { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const context = useCompositeContext(); store = store || context; invariant( store, false && 0 ); const orientation = store.useState( (state) => state.orientation === "horizontal" ? "vertical" : "horizontal" ); props = useSeparator(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { orientation })); return props; } ); var CompositeSeparator = createComponent( (props) => { const htmlProps = useCompositeSeparator(props); return _3ORBWXWF_createElement("hr", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/menu/menu-separator.js "use client"; // src/menu/menu-separator.ts var useMenuSeparator = createHook( (_a) => { var _b = _a, { store } = _b, props = __objRest(_b, ["store"]); const context = useMenuContext(); store = store || context; props = useCompositeSeparator(_4R3V3JGP_spreadValues({ store }, props)); return props; } ); var MenuSeparator = createComponent((props) => { const htmlProps = useMenuSeparator(props); return _3ORBWXWF_createElement("hr", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dropdown-menu-v2/styles.js function dropdown_menu_v2_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * Internal dependencies */ const ANIMATION_PARAMS = { SLIDE_AMOUNT: '2px', DURATION: '400ms', EASING: 'cubic-bezier( 0.16, 1, 0.3, 1 )' }; const CONTENT_WRAPPER_PADDING = space(1); const ITEM_PADDING_BLOCK = space(2); const ITEM_PADDING_INLINE = space(3); // TODO: // - those values are different from saved variables? // - should bring this into the config, and make themeable // - border color and divider color are different? const DEFAULT_BORDER_COLOR = COLORS.gray[300]; const DIVIDER_COLOR = COLORS.gray[200]; const TOOLBAR_VARIANT_BORDER_COLOR = COLORS.gray['900']; const DEFAULT_BOX_SHADOW = `0 0 0 ${config_values.borderWidth} ${DEFAULT_BORDER_COLOR}, ${config_values.popoverShadow}`; const TOOLBAR_VARIANT_BOX_SHADOW = `0 0 0 ${config_values.borderWidth} ${TOOLBAR_VARIANT_BORDER_COLOR}`; const GRID_TEMPLATE_COLS = 'minmax( 0, max-content ) 1fr'; const slideUpAndFade = emotion_react_browser_esm_keyframes({ '0%': { opacity: 0, transform: `translateY(${ANIMATION_PARAMS.SLIDE_AMOUNT})` }, '100%': { opacity: 1, transform: 'translateY(0)' } }); const slideRightAndFade = emotion_react_browser_esm_keyframes({ '0%': { opacity: 0, transform: `translateX(-${ANIMATION_PARAMS.SLIDE_AMOUNT})` }, '100%': { opacity: 1, transform: 'translateX(0)' } }); const slideDownAndFade = emotion_react_browser_esm_keyframes({ '0%': { opacity: 0, transform: `translateY(-${ANIMATION_PARAMS.SLIDE_AMOUNT})` }, '100%': { opacity: 1, transform: 'translateY(0)' } }); const slideLeftAndFade = emotion_react_browser_esm_keyframes({ '0%': { opacity: 0, transform: `translateX(${ANIMATION_PARAMS.SLIDE_AMOUNT})` }, '100%': { opacity: 1, transform: 'translateX(0)' } }); const dropdown_menu_v2_styles_DropdownMenu = /*#__PURE__*/emotion_styled_base_browser_esm(Menu, true ? { target: "e1kdzosf12" } : 0)("position:relative;z-index:1000000;display:grid;grid-template-columns:", GRID_TEMPLATE_COLS, ";grid-template-rows:auto;box-sizing:border-box;min-width:160px;max-width:320px;max-height:var( --popover-available-height );padding:", CONTENT_WRAPPER_PADDING, ";background-color:", COLORS.ui.background, ";border-radius:4px;", props => /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:", props.variant === 'toolbar' ? TOOLBAR_VARIANT_BOX_SHADOW : DEFAULT_BOX_SHADOW, ";" + ( true ? "" : 0), true ? "" : 0), " overscroll-behavior:contain;overflow:auto;outline:2px solid transparent!important;animation-duration:", ANIMATION_PARAMS.DURATION, ";animation-timing-function:", ANIMATION_PARAMS.EASING, ";will-change:transform,opacity;animation-name:", slideDownAndFade, ";&[data-side='right']{animation-name:", slideLeftAndFade, ";}&[data-side='bottom']{animation-name:", slideUpAndFade, ";}&[data-side='left']{animation-name:", slideRightAndFade, ";}@media ( prefers-reduced-motion ){animation-duration:0s;}" + ( true ? "" : 0)); const baseItem = /*#__PURE__*/emotion_react_browser_esm_css("all:unset;position:relative;min-height:", space(10), ";box-sizing:border-box;grid-column:1/-1;display:grid;grid-template-columns:", GRID_TEMPLATE_COLS, ";align-items:center;@supports ( grid-template-columns: subgrid ){grid-template-columns:subgrid;}font-size:", font('default.fontSize'), ";font-family:inherit;font-weight:normal;line-height:20px;color:", COLORS.gray[900], ";border-radius:", config_values.radiusBlockUi, ";padding-block:", ITEM_PADDING_BLOCK, ";padding-inline:", ITEM_PADDING_INLINE, ";scroll-margin:", CONTENT_WRAPPER_PADDING, ";user-select:none;outline:none;&[aria-disabled='true']{color:", COLORS.ui.textDisabled, ";cursor:not-allowed;}&[data-active-item]:not( [data-focus-visible] ):not(\n\t\t\t[aria-disabled='true']\n\t\t){background-color:", COLORS.theme.accent, ";color:", COLORS.white, ";}&[data-focus-visible]{box-shadow:0 0 0 1.5px ", COLORS.theme.accent, ";outline:2px solid transparent;}&:active,&[data-active]{}", dropdown_menu_v2_styles_DropdownMenu, ":not(:focus) &:not(:focus)[aria-expanded=\"true\"]{background-color:", COLORS.gray[100], ";color:", COLORS.gray[900], ";}svg{fill:currentColor;}" + ( true ? "" : 0), true ? "" : 0); const styles_DropdownMenuItem = /*#__PURE__*/emotion_styled_base_browser_esm(Y6467XPW_MenuItem, true ? { target: "e1kdzosf11" } : 0)(baseItem, ";" + ( true ? "" : 0)); const styles_DropdownMenuCheckboxItem = /*#__PURE__*/emotion_styled_base_browser_esm(MenuItemCheckbox, true ? { target: "e1kdzosf10" } : 0)(baseItem, ";" + ( true ? "" : 0)); const styles_DropdownMenuRadioItem = /*#__PURE__*/emotion_styled_base_browser_esm(MenuItemRadio, true ? { target: "e1kdzosf9" } : 0)(baseItem, ";" + ( true ? "" : 0)); const ItemPrefixWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? { target: "e1kdzosf8" } : 0)("grid-column:1;", styles_DropdownMenuCheckboxItem, ">&,", styles_DropdownMenuRadioItem, ">&{min-width:", space(6), ";}", styles_DropdownMenuCheckboxItem, ">&,", styles_DropdownMenuRadioItem, ">&,&:not( :empty ){margin-inline-end:", space(2), ";}display:flex;align-items:center;justify-content:center;color:", COLORS.gray['700'], ";[data-active-item]:not( [data-focus-visible] )>&,[aria-disabled='true']>&{color:inherit;}" + ( true ? "" : 0)); const DropdownMenuItemContentWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "e1kdzosf7" } : 0)("grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:", space(3), ";pointer-events:none;" + ( true ? "" : 0)); const DropdownMenuItemChildrenWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "e1kdzosf6" } : 0)("flex:1;display:inline-flex;flex-direction:column;gap:", space(1), ";" + ( true ? "" : 0)); const ItemSuffixWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? { target: "e1kdzosf5" } : 0)("flex:0 1 fit-content;min-width:0;width:fit-content;display:flex;align-items:center;justify-content:center;gap:", space(3), ";color:", COLORS.gray['700'], ";[data-active-item]:not( [data-focus-visible] ) *:not(", dropdown_menu_v2_styles_DropdownMenu, ") &,[aria-disabled='true'] *:not(", dropdown_menu_v2_styles_DropdownMenu, ") &{color:inherit;}" + ( true ? "" : 0)); const styles_DropdownMenuGroup = /*#__PURE__*/emotion_styled_base_browser_esm(menu_group_MenuGroup, true ? { target: "e1kdzosf4" } : 0)( true ? { name: "49aokf", styles: "display:contents" } : 0); const styles_DropdownMenuSeparator = /*#__PURE__*/emotion_styled_base_browser_esm(MenuSeparator, true ? { target: "e1kdzosf3" } : 0)("grid-column:1/-1;border:none;height:", config_values.borderWidth, ";background-color:", props => props.variant === 'toolbar' ? TOOLBAR_VARIANT_BORDER_COLOR : DIVIDER_COLOR, ";margin-block:", space(2), ";margin-inline:", ITEM_PADDING_INLINE, ";outline:2px solid transparent;" + ( true ? "" : 0)); const SubmenuChevronIcon = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_icon, true ? { target: "e1kdzosf2" } : 0)("width:", space(1.5), ";", rtl({ transform: `scaleX(1)` }, { transform: `scaleX(-1)` }), ";" + ( true ? "" : 0)); const styles_DropdownMenuItemLabel = /*#__PURE__*/emotion_styled_base_browser_esm(truncate_component, true ? { target: "e1kdzosf1" } : 0)("font-size:", font('default.fontSize'), ";line-height:20px;color:inherit;" + ( true ? "" : 0)); const styles_DropdownMenuItemHelpText = /*#__PURE__*/emotion_styled_base_browser_esm(truncate_component, true ? { target: "e1kdzosf0" } : 0)("font-size:", font('helpText.fontSize'), ";line-height:16px;color:", COLORS.gray['700'], ";[data-active-item]:not( [data-focus-visible] ) *:not( ", dropdown_menu_v2_styles_DropdownMenu, " ) &,[aria-disabled='true'] *:not( ", dropdown_menu_v2_styles_DropdownMenu, " ) &{color:inherit;}" + ( true ? "" : 0)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dropdown-menu-v2/index.js /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * WordPress dependencies */ /** * Internal dependencies */ const DropdownMenuContext = (0,external_wp_element_namespaceObject.createContext)(undefined); const DropdownMenuItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItem({ prefix, suffix, children, hideOnClick = true, ...props }, ref) { const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuItem, { ref: ref, ...props, accessibleWhenDisabled: true, hideOnClick: hideOnClick, store: dropdownMenuContext?.store, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, { children: prefix }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, { children: children }), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, { children: suffix })] })] }); }); const DropdownMenuCheckboxItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuCheckboxItem({ suffix, children, hideOnClick = false, ...props }, ref) { const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuCheckboxItem, { ref: ref, ...props, accessibleWhenDisabled: true, hideOnClick: hideOnClick, store: dropdownMenuContext?.store, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuItemCheck, { store: dropdownMenuContext?.store, render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, {}) // Override some ariakit inline styles , style: { width: 'auto', height: 'auto' }, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, { icon: library_check, size: 24 }) }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, { children: children }), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, { children: suffix })] })] }); }); const radioCheck = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Circle, { cx: 12, cy: 12, r: 3 }) }); const DropdownMenuRadioItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuRadioItem({ suffix, children, hideOnClick = false, ...props }, ref) { const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuRadioItem, { ref: ref, ...props, accessibleWhenDisabled: true, hideOnClick: hideOnClick, store: dropdownMenuContext?.store, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuItemCheck, { store: dropdownMenuContext?.store, render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, {}) // Override some ariakit inline styles , style: { width: 'auto', height: 'auto' }, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, { icon: radioCheck, size: 24 }) }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, { children: children }), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, { children: suffix })] })] }); }); const DropdownMenuGroup = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuGroup(props, ref) { const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuGroup, { ref: ref, ...props, store: dropdownMenuContext?.store }); }); const dropdown_menu_v2_UnconnectedDropdownMenu = (props, ref) => { var _props$placement; const { // Store props open, defaultOpen = false, onOpenChange, placement, // Menu trigger props trigger, // Menu props gutter, children, shift, modal = true, // From internal components context variant, // Rest ...otherProps } = useContextSystem(props, 'DropdownMenu'); const parentContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); const computedDirection = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'rtl' : 'ltr'; // If an explicit value for the `placement` prop is not passed, // apply a default placement of `bottom-start` for the root dropdown, // and of `right-start` for nested dropdowns. let computedPlacement = (_props$placement = props.placement) !== null && _props$placement !== void 0 ? _props$placement : parentContext?.store ? 'right-start' : 'bottom-start'; // Swap left/right in case of RTL direction if (computedDirection === 'rtl') { if (/right/.test(computedPlacement)) { computedPlacement = computedPlacement.replace('right', 'left'); } else if (/left/.test(computedPlacement)) { computedPlacement = computedPlacement.replace('left', 'right'); } } const dropdownMenuStore = useMenuStore({ parent: parentContext?.store, open, defaultOpen, placement: computedPlacement, focusLoop: true, setOpen(willBeOpen) { onOpenChange?.(willBeOpen); }, rtl: computedDirection === 'rtl' }); const contextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({ store: dropdownMenuStore, variant }), [dropdownMenuStore, variant]); // Extract the side from the applied placement — useful for animations. const appliedPlacementSide = dropdownMenuStore.useState('placement').split('-')[0]; if (dropdownMenuStore.parent && !((0,external_wp_element_namespaceObject.isValidElement)(trigger) && DropdownMenuItem === trigger.type)) { // eslint-disable-next-line no-console console.warn('For nested DropdownMenus, the `trigger` should always be a `DropdownMenuItem`.'); } const hideOnEscape = (0,external_wp_element_namespaceObject.useCallback)(event => { // Pressing Escape can cause unexpected consequences (ie. exiting // full screen mode on MacOs, close parent modals...). event.preventDefault(); // Returning `true` causes the menu to hide. return true; }, []); const wrapperProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({ dir: computedDirection, style: { direction: computedDirection } }), [computedDirection]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuButton, { ref: ref, store: dropdownMenuStore, render: dropdownMenuStore.parent ? (0,external_wp_element_namespaceObject.cloneElement)(trigger, { // Add submenu arrow, unless a `suffix` is explicitly specified suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [trigger.props.suffix, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SubmenuChevronIcon, { "aria-hidden": "true", icon: chevron_right_small, size: 24, preserveAspectRatio: "xMidYMid slice" })] }) }) : trigger }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dropdown_menu_v2_styles_DropdownMenu, { ...otherProps, modal: modal, store: dropdownMenuStore // Root menu has an 8px distance from its trigger, // otherwise 0 (which causes the submenu to slightly overlap) , gutter: gutter !== null && gutter !== void 0 ? gutter : dropdownMenuStore.parent ? 0 : 8 // Align nested menu by the same (but opposite) amount // as the menu container's padding. , shift: shift !== null && shift !== void 0 ? shift : dropdownMenuStore.parent ? -4 : 0, hideOnHoverOutside: false, "data-side": appliedPlacementSide, variant: variant, wrapperProps: wrapperProps, hideOnEscape: hideOnEscape, unmountOnHide: true, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuContext.Provider, { value: contextValue, children: children }) })] }); }; const dropdown_menu_v2_DropdownMenu = contextConnect(dropdown_menu_v2_UnconnectedDropdownMenu, 'DropdownMenu'); const DropdownMenuSeparator = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuSeparator(props, ref) { const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuSeparator, { ref: ref, ...props, store: dropdownMenuContext?.store, variant: dropdownMenuContext?.variant }); }); const DropdownMenuItemLabel = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItemLabel(props, ref) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuItemLabel, { numberOfLines: 1, ref: ref, ...props }); }); const DropdownMenuItemHelpText = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItemHelpText(props, ref) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuItemHelpText, { numberOfLines: 2, ref: ref, ...props }); }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/styles.js function theme_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /** * External dependencies */ /** * Internal dependencies */ const colorVariables = ({ colors }) => { const shades = Object.entries(colors.gray || {}).map(([k, v]) => `--wp-components-color-gray-${k}: ${v};`).join(''); return [/*#__PURE__*/emotion_react_browser_esm_css("--wp-components-color-accent:", colors.accent, ";--wp-components-color-accent-darker-10:", colors.accentDarker10, ";--wp-components-color-accent-darker-20:", colors.accentDarker20, ";--wp-components-color-accent-inverted:", colors.accentInverted, ";--wp-components-color-background:", colors.background, ";--wp-components-color-foreground:", colors.foreground, ";--wp-components-color-foreground-inverted:", colors.foregroundInverted, ";", shades, ";" + ( true ? "" : 0), true ? "" : 0)]; }; const theme_styles_Wrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "e1krjpvb0" } : 0)( true ? { name: "1a3idx0", styles: "color:var( --wp-components-color-foreground, currentColor )" } : 0); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/color-algorithms.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ k([names, a11y]); function generateThemeVariables(inputs) { validateInputs(inputs); const generatedColors = { ...generateAccentDependentColors(inputs.accent), ...generateBackgroundDependentColors(inputs.background) }; warnContrastIssues(checkContrasts(inputs, generatedColors)); return { colors: generatedColors }; } function validateInputs(inputs) { for (const [key, value] of Object.entries(inputs)) { if (typeof value !== 'undefined' && !w(value).isValid()) { true ? external_wp_warning_default()(`wp.components.Theme: "${value}" is not a valid color value for the '${key}' prop.`) : 0; } } } function checkContrasts(inputs, outputs) { const background = inputs.background || COLORS.white; const accent = inputs.accent || '#3858e9'; const foreground = outputs.foreground || COLORS.gray[900]; const gray = outputs.gray || COLORS.gray; return { accent: w(background).isReadable(accent) ? undefined : `The background color ("${background}") does not have sufficient contrast against the accent color ("${accent}").`, foreground: w(background).isReadable(foreground) ? undefined : `The background color provided ("${background}") does not have sufficient contrast against the standard foreground colors.`, grays: w(background).contrast(gray[600]) >= 3 && w(background).contrast(gray[700]) >= 4.5 ? undefined : `The background color provided ("${background}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.` }; } function warnContrastIssues(issues) { for (const error of Object.values(issues)) { if (error) { true ? external_wp_warning_default()('wp.components.Theme: ' + error) : 0; } } } function generateAccentDependentColors(accent) { if (!accent) { return {}; } return { accent, accentDarker10: w(accent).darken(0.1).toHex(), accentDarker20: w(accent).darken(0.2).toHex(), accentInverted: getForegroundForColor(accent) }; } function generateBackgroundDependentColors(background) { if (!background) { return {}; } const foreground = getForegroundForColor(background); return { background, foreground, foregroundInverted: getForegroundForColor(foreground), gray: generateShades(background, foreground) }; } function getForegroundForColor(color) { return w(color).isDark() ? COLORS.white : COLORS.gray[900]; } function generateShades(background, foreground) { // How much darkness you need to add to #fff to get the COLORS.gray[n] color const SHADES = { 100: 0.06, 200: 0.121, 300: 0.132, 400: 0.2, 600: 0.42, 700: 0.543, 800: 0.821 }; // Darkness of COLORS.gray[ 900 ], relative to #fff const limit = 0.884; const direction = w(background).isDark() ? 'lighten' : 'darken'; // Lightness delta between the background and foreground colors const range = Math.abs(w(background).toHsl().l - w(foreground).toHsl().l) / 100; const result = {}; Object.entries(SHADES).forEach(([key, value]) => { result[parseInt(key)] = w(background)[direction](value / limit * range).toHex(); }); return result; } ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * `Theme` allows defining theme variables for components in the `@wordpress/components` package. * * Multiple `Theme` components can be nested in order to override specific theme variables. * * * ```jsx * const Example = () => { * return ( * <Theme accent="red"> * <Button variant="primary">I'm red</Button> * <Theme accent="blue"> * <Button variant="primary">I'm blue</Button> * </Theme> * </Theme> * ); * }; * ``` */ function Theme({ accent, background, className, ...props }) { const cx = useCx(); const classes = (0,external_wp_element_namespaceObject.useMemo)(() => cx(...colorVariables(generateThemeVariables({ accent, background })), className), [accent, background, className, cx]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(theme_styles_Wrapper, { className: classes, ...props }); } /* harmony default export */ const theme = (Theme); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/context.js /** * WordPress dependencies */ /** * Internal dependencies */ const TabsContext = (0,external_wp_element_namespaceObject.createContext)(undefined); const useTabsContext = () => (0,external_wp_element_namespaceObject.useContext)(TabsContext); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/styles.js /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * Internal dependencies */ const TabListWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? { target: "enfox0g2" } : 0)("position:relative;display:flex;align-items:stretch;flex-direction:row;&[aria-orientation='vertical']{flex-direction:column;}@media not ( prefers-reduced-motion: reduce ){&.is-animation-enabled::after{transition-property:left,top,width,height;transition-duration:0.2s;transition-timing-function:ease-out;}}&::after{content:'';position:absolute;pointer-events:none;outline:2px solid transparent;outline-offset:-1px;}&:not( [aria-orientation='vertical'] )::after{left:var( --indicator-left );bottom:0;width:var( --indicator-width );height:0;border-bottom:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";}&[aria-orientation='vertical']::after{opacity:0;right:0;top:var( --indicator-top );height:var( --indicator-height );border-right:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";}" + ( true ? "" : 0)); const styles_Tab = /*#__PURE__*/emotion_styled_base_browser_esm(Tab, true ? { target: "enfox0g1" } : 0)("&{display:inline-flex;align-items:center;position:relative;border-radius:0;height:", space(12), ";background:transparent;border:none;box-shadow:none;cursor:pointer;padding:3px ", space(4), ";margin-left:0;font-weight:500;&[aria-disabled='true']{cursor:default;opacity:0.3;}&:hover{color:", COLORS.theme.accent, ";}&:focus:not( :disabled ){position:relative;box-shadow:none;outline:none;}&::before{content:'';position:absolute;top:", space(3), ";right:", space(3), ";bottom:", space(3), ";left:", space(3), ";pointer-events:none;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";border-radius:2px;opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&:focus-visible::before{opacity:1;outline:2px solid transparent;}}" + ( true ? "" : 0)); const styles_TabPanel = /*#__PURE__*/emotion_styled_base_browser_esm(TabPanel, true ? { target: "enfox0g0" } : 0)("&:focus{box-shadow:none;outline:none;}&:focus-visible{border-radius:2px;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";outline:2px solid transparent;outline-offset:0;}" + ( true ? "" : 0)); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/tab.js /** * WordPress dependencies */ /** * Internal dependencies */ const tab_Tab = (0,external_wp_element_namespaceObject.forwardRef)(function Tab({ children, tabId, disabled, render, ...otherProps }, ref) { const context = useTabsContext(); if (!context) { true ? external_wp_warning_default()('`Tabs.Tab` must be wrapped in a `Tabs` component.') : 0; return null; } const { store, instanceId } = context; const instancedTabId = `${instanceId}-${tabId}`; return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_Tab, { ref: ref, store: store, id: instancedTabId, disabled: disabled, render: render, ...otherProps, children: children }); }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/tablist.js /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * WordPress dependencies */ /** * Internal dependencies */ function useTrackElementOffset(targetElement, onUpdate) { const [indicatorPosition, setIndicatorPosition] = (0,external_wp_element_namespaceObject.useState)({ left: 0, top: 0, width: 0, height: 0 }); // TODO: replace with useEventCallback or similar when officially available. const updateCallbackRef = (0,external_wp_element_namespaceObject.useRef)(onUpdate); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { updateCallbackRef.current = onUpdate; }); const observedElementRef = (0,external_wp_element_namespaceObject.useRef)(); const resizeObserverRef = (0,external_wp_element_namespaceObject.useRef)(); (0,external_wp_element_namespaceObject.useEffect)(() => { if (targetElement === observedElementRef.current) { return; } observedElementRef.current = targetElement !== null && targetElement !== void 0 ? targetElement : undefined; function updateIndicator(element) { setIndicatorPosition({ // Workaround to prevent unwanted scrollbars, see: // https://github.com/WordPress/gutenberg/pull/61979 left: Math.max(element.offsetLeft - 1, 0), top: Math.max(element.offsetTop - 1, 0), width: parseFloat(getComputedStyle(element).width), height: parseFloat(getComputedStyle(element).height) }); updateCallbackRef.current?.(); } // Set up a ResizeObserver. if (!resizeObserverRef.current) { resizeObserverRef.current = new ResizeObserver(() => { if (observedElementRef.current) { updateIndicator(observedElementRef.current); } }); } const { current: resizeObserver } = resizeObserverRef; // Observe new element. if (targetElement) { updateIndicator(targetElement); resizeObserver.observe(targetElement); } return () => { // Unobserve previous element. if (observedElementRef.current) { resizeObserver.unobserve(observedElementRef.current); } }; }, [targetElement]); return indicatorPosition; } function useOnValueUpdate(value, onUpdate) { const previousValueRef = (0,external_wp_element_namespaceObject.useRef)(value); // TODO: replace with useEventCallback or similar when officially available. const updateCallbackRef = (0,external_wp_element_namespaceObject.useRef)(onUpdate); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { updateCallbackRef.current = onUpdate; }); (0,external_wp_element_namespaceObject.useEffect)(() => { if (previousValueRef.current !== value) { updateCallbackRef.current({ previousValue: previousValueRef.current }); previousValueRef.current = value; } }, [value]); } const TabList = (0,external_wp_element_namespaceObject.forwardRef)(function TabList({ children, ...otherProps }, ref) { const context = useTabsContext(); const selectedId = context?.store.useState('selectedId'); const indicatorPosition = useTrackElementOffset(context?.store.item(selectedId)?.element); const [animationEnabled, setAnimationEnabled] = (0,external_wp_element_namespaceObject.useState)(false); useOnValueUpdate(selectedId, ({ previousValue }) => previousValue && setAnimationEnabled(true)); if (!context) { true ? external_wp_warning_default()('`Tabs.TabList` must be wrapped in a `Tabs` component.') : 0; return null; } const { store } = context; const { activeId, selectOnMove } = store.useState(); const { setActiveId } = store; const onBlur = () => { if (!selectOnMove) { return; } // When automatic tab selection is on, make sure that the active tab is up // to date with the selected tab when leaving the tablist. This makes sure // that the selected tab will receive keyboard focus when tabbing back into // the tablist. if (selectedId !== activeId) { setActiveId(selectedId); } }; return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tab_list_TabList, { ref: ref, store: store, render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TabListWrapper, { onTransitionEnd: event => { if (event.pseudoElement === '::after') { setAnimationEnabled(false); } } }), onBlur: onBlur, ...otherProps, style: { '--indicator-left': `${indicatorPosition.left}px`, '--indicator-top': `${indicatorPosition.top}px`, '--indicator-width': `${indicatorPosition.width}px`, '--indicator-height': `${indicatorPosition.height}px`, ...otherProps.style }, className: dist_clsx(animationEnabled ? 'is-animation-enabled' : '', otherProps.className), children: children }); }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/tabpanel.js /** * WordPress dependencies */ /** * Internal dependencies */ const tabpanel_TabPanel = (0,external_wp_element_namespaceObject.forwardRef)(function TabPanel({ children, tabId, focusable = true, ...otherProps }, ref) { const context = useTabsContext(); if (!context) { true ? external_wp_warning_default()('`Tabs.TabPanel` must be wrapped in a `Tabs` component.') : 0; return null; } const { store, instanceId } = context; const instancedTabId = `${instanceId}-${tabId}`; const selectedId = store.useState(state => state.selectedId); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_TabPanel, { ref: ref, store: store // For TabPanel, the id passed here is the id attribute of the DOM // element. // `tabId` is the id of the tab that controls this panel. , id: `${instancedTabId}-view`, tabId: instancedTabId, focusable: focusable, ...otherProps, children: selectedId === instancedTabId && children }); }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/index.js /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * WordPress dependencies */ /** * Internal dependencies */ function Tabs({ selectOnMove = true, defaultTabId, orientation = 'horizontal', onSelect, children, selectedTabId }) { const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(Tabs, 'tabs'); const store = useTabStore({ selectOnMove, orientation, defaultSelectedId: defaultTabId && `${instanceId}-${defaultTabId}`, setSelectedId: selectedId => { const strippedDownId = typeof selectedId === 'string' ? selectedId.replace(`${instanceId}-`, '') : selectedId; onSelect?.(strippedDownId); }, selectedId: selectedTabId && `${instanceId}-${selectedTabId}` }); const isControlled = selectedTabId !== undefined; const { items, selectedId, activeId } = store.useState(); const { setSelectedId, setActiveId } = store; // Keep track of whether tabs have been populated. This is used to prevent // certain effects from firing too early while tab data and relevant // variables are undefined during the initial render. const tabsHavePopulated = (0,external_wp_element_namespaceObject.useRef)(false); if (items.length > 0) { tabsHavePopulated.current = true; } const selectedTab = items.find(item => item.id === selectedId); const firstEnabledTab = items.find(item => { // Ariakit internally refers to disabled tabs as `dimmed`. return !item.dimmed; }); const initialTab = items.find(item => item.id === `${instanceId}-${defaultTabId}`); // Handle selecting the initial tab. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (isControlled) { return; } // Wait for the denoted initial tab to be declared before making a // selection. This ensures that if a tab is declared lazily it can // still receive initial selection, as well as ensuring no tab is // selected if an invalid `defaultTabId` is provided. if (defaultTabId && !initialTab) { return; } // If the currently selected tab is missing (i.e. removed from the DOM), // fall back to the initial tab or the first enabled tab if there is // one. Otherwise, no tab should be selected. if (!items.find(item => item.id === selectedId)) { if (initialTab && !initialTab.dimmed) { setSelectedId(initialTab?.id); return; } if (firstEnabledTab) { setSelectedId(firstEnabledTab.id); } else if (tabsHavePopulated.current) { setSelectedId(null); } } }, [firstEnabledTab, initialTab, defaultTabId, isControlled, items, selectedId, setSelectedId]); // Handle the currently selected tab becoming disabled. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (!selectedTab?.dimmed) { return; } // In controlled mode, we trust that disabling tabs is done // intentionally, and don't select a new tab automatically. if (isControlled) { setSelectedId(null); return; } // If the currently selected tab becomes disabled, fall back to the // `defaultTabId` if possible. Otherwise select the first // enabled tab (if there is one). if (initialTab && !initialTab.dimmed) { setSelectedId(initialTab.id); return; } if (firstEnabledTab) { setSelectedId(firstEnabledTab.id); } }, [firstEnabledTab, initialTab, isControlled, selectedTab?.dimmed, setSelectedId]); // Clear `selectedId` if the active tab is removed from the DOM in controlled mode. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (!isControlled) { return; } // Once the tabs have populated, if the `selectedTabId` still can't be // found, clear the selection. if (tabsHavePopulated.current && !!selectedTabId && !selectedTab) { setSelectedId(null); } }, [isControlled, selectedTab, selectedTabId, setSelectedId]); (0,external_wp_element_namespaceObject.useEffect)(() => { // If there is no active tab, fallback to place focus on the first enabled tab // so there is always an active element if (selectedTabId === null && !activeId && firstEnabledTab?.id) { setActiveId(firstEnabledTab.id); } }, [selectedTabId, activeId, firstEnabledTab?.id, setActiveId]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isControlled) { return; } requestAnimationFrame(() => { const focusedElement = items?.[0]?.element?.ownerDocument.activeElement; if (!focusedElement || !items.some(item => focusedElement === item.element)) { return; // Return early if no tabs are focused. } // If, after ariakit re-computes the active tab, that tab doesn't match // the currently focused tab, then we force an update to ariakit to avoid // any mismatches, especially when navigating to previous/next tab with // arrow keys. if (activeId !== focusedElement.id) { setActiveId(focusedElement.id); } }); }, [activeId, isControlled, items, setActiveId]); const contextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({ store, instanceId }), [store, instanceId]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TabsContext.Provider, { value: contextValue, children: children }); } Tabs.TabList = TabList; Tabs.Tab = tab_Tab; Tabs.TabPanel = tabpanel_TabPanel; Tabs.Context = TabsContext; /* harmony default export */ const tabs = (Tabs); ;// CONCATENATED MODULE: external ["wp","privateApis"] const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/lock-unlock.js /** * WordPress dependencies */ const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/components'); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/private-apis.js /** * WordPress dependencies */ /** * Internal dependencies */ const privateApis = {}; lock(privateApis, { CompositeV2: Composite, CompositeGroupV2: CompositeGroup, CompositeItemV2: CompositeItem, CompositeRowV2: CompositeRow, useCompositeStoreV2: useCompositeStore, CustomSelectControl: CustomSelectControl, __experimentalPopoverLegacyPositionToPlacement: positionToPlacement, createPrivateSlotFill: createPrivateSlotFill, ComponentsContext: ComponentsContext, Tabs: tabs, Theme: theme, DropdownMenuV2: dropdown_menu_v2_DropdownMenu, DropdownMenuGroupV2: DropdownMenuGroup, DropdownMenuItemV2: DropdownMenuItem, DropdownMenuCheckboxItemV2: DropdownMenuCheckboxItem, DropdownMenuRadioItemV2: DropdownMenuRadioItem, DropdownMenuSeparatorV2: DropdownMenuSeparator, DropdownMenuItemLabelV2: DropdownMenuItemLabel, DropdownMenuItemHelpTextV2: DropdownMenuItemHelpText, kebabCase: kebabCase }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/index.js // Primitives. // Components. // Higher-Order Components. // Private APIs. })(); (window.wp = window.wp || {}).components = __webpack_exports__; /******/ })() ;
•
Search:
•
Replace:
1
...
3
4
5
6
7
8
Function
Edit by line
Download
Information
Rename
Copy
Move
Delete
Chmod
List