[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/script-modules/boot/ -> index.js (source)

   1  var __create = Object.create;
   2  var __defProp = Object.defineProperty;
   3  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
   4  var __getOwnPropNames = Object.getOwnPropertyNames;
   5  var __getProtoOf = Object.getPrototypeOf;
   6  var __hasOwnProp = Object.prototype.hasOwnProperty;
   7  var __commonJS = (cb, mod) => function __require() {
   8    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
   9  };
  10  var __export = (target, all) => {
  11    for (var name in all)
  12      __defProp(target, name, { get: all[name], enumerable: true });
  13  };
  14  var __copyProps = (to, from, except, desc) => {
  15    if (from && typeof from === "object" || typeof from === "function") {
  16      for (let key of __getOwnPropNames(from))
  17        if (!__hasOwnProp.call(to, key) && key !== except)
  18          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  19    }
  20    return to;
  21  };
  22  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  23    // If the importer is in node compatibility mode or this is not an ESM
  24    // file that has been converted to a CommonJS file using a Babel-
  25    // compatible transform (i.e. "__esModule" has not been set), then set
  26    // "default" to the CommonJS "module.exports" for node compatibility.
  27    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  28    mod
  29  ));
  30  
  31  // package-external:@wordpress/element
  32  var require_element = __commonJS({
  33    "package-external:@wordpress/element"(exports, module) {
  34      module.exports = window.wp.element;
  35    }
  36  });
  37  
  38  // package-external:@wordpress/data
  39  var require_data = __commonJS({
  40    "package-external:@wordpress/data"(exports, module) {
  41      module.exports = window.wp.data;
  42    }
  43  });
  44  
  45  // package-external:@wordpress/i18n
  46  var require_i18n = __commonJS({
  47    "package-external:@wordpress/i18n"(exports, module) {
  48      module.exports = window.wp.i18n;
  49    }
  50  });
  51  
  52  // vendor-external:react
  53  var require_react = __commonJS({
  54    "vendor-external:react"(exports, module) {
  55      module.exports = window.React;
  56    }
  57  });
  58  
  59  // vendor-external:react/jsx-runtime
  60  var require_jsx_runtime = __commonJS({
  61    "vendor-external:react/jsx-runtime"(exports, module) {
  62      module.exports = window.ReactJSXRuntime;
  63    }
  64  });
  65  
  66  // vendor-external:react-dom
  67  var require_react_dom = __commonJS({
  68    "vendor-external:react-dom"(exports, module) {
  69      module.exports = window.ReactDOM;
  70    }
  71  });
  72  
  73  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  74  var require_use_sync_external_store_shim_development = __commonJS({
  75    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  76      "use strict";
  77      (function() {
  78        function is(x, y) {
  79          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  80        }
  81        function useSyncExternalStore$2(subscribe, getSnapshot) {
  82          didWarnOld18Alpha || void 0 === React47.startTransition || (didWarnOld18Alpha = true, console.error(
  83            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
  84          ));
  85          var value = getSnapshot();
  86          if (!didWarnUncachedGetSnapshot) {
  87            var cachedValue = getSnapshot();
  88            objectIs(value, cachedValue) || (console.error(
  89              "The result of getSnapshot should be cached to avoid an infinite loop"
  90            ), didWarnUncachedGetSnapshot = true);
  91          }
  92          cachedValue = useState19({
  93            inst: { value, getSnapshot }
  94          });
  95          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  96          useLayoutEffect3(
  97            function() {
  98              inst.value = value;
  99              inst.getSnapshot = getSnapshot;
 100              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 101            },
 102            [subscribe, value, getSnapshot]
 103          );
 104          useEffect18(
 105            function() {
 106              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 107              return subscribe(function() {
 108                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 109              });
 110            },
 111            [subscribe]
 112          );
 113          useDebugValue2(value);
 114          return value;
 115        }
 116        function checkIfSnapshotChanged(inst) {
 117          var latestGetSnapshot = inst.getSnapshot;
 118          inst = inst.value;
 119          try {
 120            var nextValue = latestGetSnapshot();
 121            return !objectIs(inst, nextValue);
 122          } catch (error) {
 123            return true;
 124          }
 125        }
 126        function useSyncExternalStore$1(subscribe, getSnapshot) {
 127          return getSnapshot();
 128        }
 129        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 130        var React47 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState19 = React47.useState, useEffect18 = React47.useEffect, useLayoutEffect3 = React47.useLayoutEffect, useDebugValue2 = React47.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 131        exports.useSyncExternalStore = void 0 !== React47.useSyncExternalStore ? React47.useSyncExternalStore : shim;
 132        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 133      })();
 134    }
 135  });
 136  
 137  // node_modules/use-sync-external-store/shim/index.js
 138  var require_shim = __commonJS({
 139    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 140      "use strict";
 141      if (false) {
 142        module.exports = null;
 143      } else {
 144        module.exports = require_use_sync_external_store_shim_development();
 145      }
 146    }
 147  });
 148  
 149  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 150  var require_with_selector_development = __commonJS({
 151    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 152      "use strict";
 153      (function() {
 154        function is(x, y) {
 155          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 156        }
 157        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 158        var React47 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore2 = shim.useSyncExternalStore, useRef21 = React47.useRef, useEffect18 = React47.useEffect, useMemo19 = React47.useMemo, useDebugValue2 = React47.useDebugValue;
 159        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 160          var instRef = useRef21(null);
 161          if (null === instRef.current) {
 162            var inst = { hasValue: false, value: null };
 163            instRef.current = inst;
 164          } else inst = instRef.current;
 165          instRef = useMemo19(
 166            function() {
 167              function memoizedSelector(nextSnapshot) {
 168                if (!hasMemo) {
 169                  hasMemo = true;
 170                  memoizedSnapshot = nextSnapshot;
 171                  nextSnapshot = selector(nextSnapshot);
 172                  if (void 0 !== isEqual && inst.hasValue) {
 173                    var currentSelection = inst.value;
 174                    if (isEqual(currentSelection, nextSnapshot))
 175                      return memoizedSelection = currentSelection;
 176                  }
 177                  return memoizedSelection = nextSnapshot;
 178                }
 179                currentSelection = memoizedSelection;
 180                if (objectIs(memoizedSnapshot, nextSnapshot))
 181                  return currentSelection;
 182                var nextSelection = selector(nextSnapshot);
 183                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 184                  return memoizedSnapshot = nextSnapshot, currentSelection;
 185                memoizedSnapshot = nextSnapshot;
 186                return memoizedSelection = nextSelection;
 187              }
 188              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 189              return [
 190                function() {
 191                  return memoizedSelector(getSnapshot());
 192                },
 193                null === maybeGetServerSnapshot ? void 0 : function() {
 194                  return memoizedSelector(maybeGetServerSnapshot());
 195                }
 196              ];
 197            },
 198            [getSnapshot, getServerSnapshot, selector, isEqual]
 199          );
 200          var value = useSyncExternalStore2(subscribe, instRef[0], instRef[1]);
 201          useEffect18(
 202            function() {
 203              inst.hasValue = true;
 204              inst.value = value;
 205            },
 206            [value]
 207          );
 208          useDebugValue2(value);
 209          return value;
 210        };
 211        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 212      })();
 213    }
 214  });
 215  
 216  // node_modules/use-sync-external-store/shim/with-selector.js
 217  var require_with_selector = __commonJS({
 218    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 219      "use strict";
 220      if (false) {
 221        module.exports = null;
 222      } else {
 223        module.exports = require_with_selector_development();
 224      }
 225    }
 226  });
 227  
 228  // package-external:@wordpress/primitives
 229  var require_primitives = __commonJS({
 230    "package-external:@wordpress/primitives"(exports, module) {
 231      module.exports = window.wp.primitives;
 232    }
 233  });
 234  
 235  // package-external:@wordpress/compose
 236  var require_compose = __commonJS({
 237    "package-external:@wordpress/compose"(exports, module) {
 238      module.exports = window.wp.compose;
 239    }
 240  });
 241  
 242  // package-external:@wordpress/theme
 243  var require_theme = __commonJS({
 244    "package-external:@wordpress/theme"(exports, module) {
 245      module.exports = window.wp.theme;
 246    }
 247  });
 248  
 249  // package-external:@wordpress/private-apis
 250  var require_private_apis = __commonJS({
 251    "package-external:@wordpress/private-apis"(exports, module) {
 252      module.exports = window.wp.privateApis;
 253    }
 254  });
 255  
 256  // package-external:@wordpress/components
 257  var require_components = __commonJS({
 258    "package-external:@wordpress/components"(exports, module) {
 259      module.exports = window.wp.components;
 260    }
 261  });
 262  
 263  // package-external:@wordpress/core-data
 264  var require_core_data = __commonJS({
 265    "package-external:@wordpress/core-data"(exports, module) {
 266      module.exports = window.wp.coreData;
 267    }
 268  });
 269  
 270  // package-external:@wordpress/notices
 271  var require_notices = __commonJS({
 272    "package-external:@wordpress/notices"(exports, module) {
 273      module.exports = window.wp.notices;
 274    }
 275  });
 276  
 277  // package-external:@wordpress/html-entities
 278  var require_html_entities = __commonJS({
 279    "package-external:@wordpress/html-entities"(exports, module) {
 280      module.exports = window.wp.htmlEntities;
 281    }
 282  });
 283  
 284  // package-external:@wordpress/keycodes
 285  var require_keycodes = __commonJS({
 286    "package-external:@wordpress/keycodes"(exports, module) {
 287      module.exports = window.wp.keycodes;
 288    }
 289  });
 290  
 291  // package-external:@wordpress/commands
 292  var require_commands = __commonJS({
 293    "package-external:@wordpress/commands"(exports, module) {
 294      module.exports = window.wp.commands;
 295    }
 296  });
 297  
 298  // package-external:@wordpress/url
 299  var require_url = __commonJS({
 300    "package-external:@wordpress/url"(exports, module) {
 301      module.exports = window.wp.url;
 302    }
 303  });
 304  
 305  // package-external:@wordpress/editor
 306  var require_editor = __commonJS({
 307    "package-external:@wordpress/editor"(exports, module) {
 308      module.exports = window.wp.editor;
 309    }
 310  });
 311  
 312  // package-external:@wordpress/keyboard-shortcuts
 313  var require_keyboard_shortcuts = __commonJS({
 314    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
 315      module.exports = window.wp.keyboardShortcuts;
 316    }
 317  });
 318  
 319  // packages/boot/build-module/components/app/index.mjs
 320  var import_element32 = __toESM(require_element(), 1);
 321  var import_data12 = __toESM(require_data(), 1);
 322  
 323  // packages/boot/build-module/components/app/router.mjs
 324  var import_i18n12 = __toESM(require_i18n(), 1);
 325  var import_element30 = __toESM(require_element(), 1);
 326  
 327  // node_modules/clsx/dist/clsx.mjs
 328  function r(e) {
 329    var t, f, n = "";
 330    if ("string" == typeof e || "number" == typeof e) n += e;
 331    else if ("object" == typeof e) if (Array.isArray(e)) {
 332      var o = e.length;
 333      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 334    } else for (f in e) e[f] && (n && (n += " "), n += f);
 335    return n;
 336  }
 337  function clsx() {
 338    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 339    return n;
 340  }
 341  var clsx_default = clsx;
 342  
 343  // node_modules/@base-ui/utils/esm/safeReact.js
 344  var React = __toESM(require_react(), 1);
 345  var SafeReact = {
 346    ...React
 347  };
 348  
 349  // node_modules/@base-ui/utils/esm/useRefWithInit.js
 350  var React2 = __toESM(require_react(), 1);
 351  var UNINITIALIZED = {};
 352  function useRefWithInit(init2, initArg) {
 353    const ref = React2.useRef(UNINITIALIZED);
 354    if (ref.current === UNINITIALIZED) {
 355      ref.current = init2(initArg);
 356    }
 357    return ref;
 358  }
 359  
 360  // node_modules/@base-ui/utils/esm/useStableCallback.js
 361  var useInsertionEffect = SafeReact.useInsertionEffect;
 362  var useSafeInsertionEffect = (
 363    // React 17 doesn't have useInsertionEffect.
 364    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 365    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 366  );
 367  function useStableCallback(callback) {
 368    const stable = useRefWithInit(createStableCallback).current;
 369    stable.next = callback;
 370    useSafeInsertionEffect(stable.effect);
 371    return stable.trampoline;
 372  }
 373  function createStableCallback() {
 374    const stable = {
 375      next: void 0,
 376      callback: assertNotCalled,
 377      trampoline: (...args) => stable.callback?.(...args),
 378      effect: () => {
 379        stable.callback = stable.next;
 380      }
 381    };
 382    return stable;
 383  }
 384  function assertNotCalled() {
 385    if (true) {
 386      throw (
 387        /* minify-error-disabled */
 388        new Error("Base UI: Cannot call an event handler while rendering.")
 389      );
 390    }
 391  }
 392  
 393  // node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js
 394  var React3 = __toESM(require_react(), 1);
 395  var noop = () => {
 396  };
 397  var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
 398  
 399  // node_modules/@base-ui/utils/esm/warn.js
 400  var set;
 401  if (true) {
 402    set = /* @__PURE__ */ new Set();
 403  }
 404  function warn(...messages) {
 405    if (true) {
 406      const messageKey = messages.join(" ");
 407      if (!set.has(messageKey)) {
 408        set.add(messageKey);
 409        console.warn(`Base UI: $messageKey}`);
 410      }
 411    }
 412  }
 413  
 414  // node_modules/@base-ui/react/esm/internals/direction-context/DirectionContext.js
 415  var React4 = __toESM(require_react(), 1);
 416  var DirectionContext = /* @__PURE__ */ React4.createContext(void 0);
 417  if (true) DirectionContext.displayName = "DirectionContext";
 418  function useDirection() {
 419    const context = React4.useContext(DirectionContext);
 420    return context?.direction ?? "ltr";
 421  }
 422  
 423  // node_modules/@base-ui/react/esm/internals/useRenderElement.js
 424  var React7 = __toESM(require_react(), 1);
 425  
 426  // node_modules/@base-ui/utils/esm/useMergedRefs.js
 427  function useMergedRefs(a, b, c, d) {
 428    const forkRef = useRefWithInit(createForkRef).current;
 429    if (didChange(forkRef, a, b, c, d)) {
 430      update(forkRef, [a, b, c, d]);
 431    }
 432    return forkRef.callback;
 433  }
 434  function useMergedRefsN(refs) {
 435    const forkRef = useRefWithInit(createForkRef).current;
 436    if (didChangeN(forkRef, refs)) {
 437      update(forkRef, refs);
 438    }
 439    return forkRef.callback;
 440  }
 441  function createForkRef() {
 442    return {
 443      callback: null,
 444      cleanup: null,
 445      refs: []
 446    };
 447  }
 448  function didChange(forkRef, a, b, c, d) {
 449    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 450  }
 451  function didChangeN(forkRef, newRefs) {
 452    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 453  }
 454  function update(forkRef, refs) {
 455    forkRef.refs = refs;
 456    if (refs.every((ref) => ref == null)) {
 457      forkRef.callback = null;
 458      return;
 459    }
 460    forkRef.callback = (instance) => {
 461      if (forkRef.cleanup) {
 462        forkRef.cleanup();
 463        forkRef.cleanup = null;
 464      }
 465      if (instance != null) {
 466        const cleanupCallbacks = Array(refs.length).fill(null);
 467        for (let i = 0; i < refs.length; i += 1) {
 468          const ref = refs[i];
 469          if (ref == null) {
 470            continue;
 471          }
 472          switch (typeof ref) {
 473            case "function": {
 474              const refCleanup = ref(instance);
 475              if (typeof refCleanup === "function") {
 476                cleanupCallbacks[i] = refCleanup;
 477              }
 478              break;
 479            }
 480            case "object": {
 481              ref.current = instance;
 482              break;
 483            }
 484            default:
 485          }
 486        }
 487        forkRef.cleanup = () => {
 488          for (let i = 0; i < refs.length; i += 1) {
 489            const ref = refs[i];
 490            if (ref == null) {
 491              continue;
 492            }
 493            switch (typeof ref) {
 494              case "function": {
 495                const cleanupCallback = cleanupCallbacks[i];
 496                if (typeof cleanupCallback === "function") {
 497                  cleanupCallback();
 498                } else {
 499                  ref(null);
 500                }
 501                break;
 502              }
 503              case "object": {
 504                ref.current = null;
 505                break;
 506              }
 507              default:
 508            }
 509          }
 510        };
 511      }
 512    };
 513  }
 514  
 515  // node_modules/@base-ui/utils/esm/getReactElementRef.js
 516  var React6 = __toESM(require_react(), 1);
 517  
 518  // node_modules/@base-ui/utils/esm/reactVersion.js
 519  var React5 = __toESM(require_react(), 1);
 520  var majorVersion = parseInt(React5.version, 10);
 521  function isReactVersionAtLeast(reactVersionToCheck) {
 522    return majorVersion >= reactVersionToCheck;
 523  }
 524  
 525  // node_modules/@base-ui/utils/esm/getReactElementRef.js
 526  function getReactElementRef(element) {
 527    if (!/* @__PURE__ */ React6.isValidElement(element)) {
 528      return null;
 529    }
 530    const reactElement = element;
 531    const propsWithRef = reactElement.props;
 532    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 533  }
 534  
 535  // node_modules/@base-ui/utils/esm/mergeObjects.js
 536  function mergeObjects(a, b) {
 537    if (a && !b) {
 538      return a;
 539    }
 540    if (!a && b) {
 541      return b;
 542    }
 543    if (a || b) {
 544      return {
 545        ...a,
 546        ...b
 547      };
 548    }
 549    return void 0;
 550  }
 551  
 552  // node_modules/@base-ui/utils/esm/empty.js
 553  function NOOP() {
 554  }
 555  var EMPTY_ARRAY = Object.freeze([]);
 556  var EMPTY_OBJECT = Object.freeze({});
 557  
 558  // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
 559  function getStateAttributesProps(state, customMapping) {
 560    const props = {};
 561    for (const key in state) {
 562      const value = state[key];
 563      if (customMapping?.hasOwnProperty(key)) {
 564        const customProps = customMapping[key](value);
 565        if (customProps != null) {
 566          Object.assign(props, customProps);
 567        }
 568        continue;
 569      }
 570      if (value === true) {
 571        props[`data-$key.toLowerCase()}`] = "";
 572      } else if (value) {
 573        props[`data-$key.toLowerCase()}`] = value.toString();
 574      }
 575    }
 576    return props;
 577  }
 578  
 579  // node_modules/@base-ui/react/esm/utils/resolveClassName.js
 580  function resolveClassName(className, state) {
 581    return typeof className === "function" ? className(state) : className;
 582  }
 583  
 584  // node_modules/@base-ui/react/esm/utils/resolveStyle.js
 585  function resolveStyle(style, state) {
 586    return typeof style === "function" ? style(state) : style;
 587  }
 588  
 589  // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
 590  var EMPTY_PROPS = {};
 591  function mergeProps(a, b, c, d, e) {
 592    if (!c && !d && !e && !a) {
 593      return createInitialMergedProps(b);
 594    }
 595    let merged = createInitialMergedProps(a);
 596    if (b) {
 597      merged = mergeInto(merged, b);
 598    }
 599    if (c) {
 600      merged = mergeInto(merged, c);
 601    }
 602    if (d) {
 603      merged = mergeInto(merged, d);
 604    }
 605    if (e) {
 606      merged = mergeInto(merged, e);
 607    }
 608    return merged;
 609  }
 610  function mergePropsN(props) {
 611    if (props.length === 0) {
 612      return EMPTY_PROPS;
 613    }
 614    if (props.length === 1) {
 615      return createInitialMergedProps(props[0]);
 616    }
 617    let merged = createInitialMergedProps(props[0]);
 618    for (let i = 1; i < props.length; i += 1) {
 619      merged = mergeInto(merged, props[i]);
 620    }
 621    return merged;
 622  }
 623  function createInitialMergedProps(inputProps) {
 624    if (isPropsGetter(inputProps)) {
 625      return {
 626        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 627      };
 628    }
 629    return copyInitialProps(inputProps);
 630  }
 631  function mergeInto(merged, inputProps) {
 632    if (isPropsGetter(inputProps)) {
 633      return resolvePropsGetter(inputProps, merged);
 634    }
 635    return mutablyMergeInto(merged, inputProps);
 636  }
 637  function copyInitialProps(inputProps) {
 638    const copiedProps = {
 639      ...inputProps
 640    };
 641    for (const propName in copiedProps) {
 642      const propValue = copiedProps[propName];
 643      if (isEventHandler(propName, propValue)) {
 644        copiedProps[propName] = wrapEventHandler(propValue);
 645      }
 646    }
 647    return copiedProps;
 648  }
 649  function mutablyMergeInto(mergedProps, externalProps) {
 650    if (!externalProps) {
 651      return mergedProps;
 652    }
 653    for (const propName in externalProps) {
 654      const externalPropValue = externalProps[propName];
 655      switch (propName) {
 656        case "style": {
 657          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 658          break;
 659        }
 660        case "className": {
 661          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 662          break;
 663        }
 664        default: {
 665          if (isEventHandler(propName, externalPropValue)) {
 666            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 667          } else {
 668            mergedProps[propName] = externalPropValue;
 669          }
 670        }
 671      }
 672    }
 673    return mergedProps;
 674  }
 675  function isEventHandler(key, value) {
 676    const code0 = key.charCodeAt(0);
 677    const code1 = key.charCodeAt(1);
 678    const code2 = key.charCodeAt(2);
 679    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 680  }
 681  function isPropsGetter(inputProps) {
 682    return typeof inputProps === "function";
 683  }
 684  function resolvePropsGetter(inputProps, previousProps) {
 685    if (isPropsGetter(inputProps)) {
 686      return inputProps(previousProps);
 687    }
 688    return inputProps ?? EMPTY_PROPS;
 689  }
 690  function mergeEventHandlers(ourHandler, theirHandler) {
 691    if (!theirHandler) {
 692      return ourHandler;
 693    }
 694    if (!ourHandler) {
 695      return wrapEventHandler(theirHandler);
 696    }
 697    return (...args) => {
 698      const event = args[0];
 699      if (isSyntheticEvent(event)) {
 700        const baseUIEvent = event;
 701        makeEventPreventable(baseUIEvent);
 702        const result2 = theirHandler(...args);
 703        if (!baseUIEvent.baseUIHandlerPrevented) {
 704          ourHandler?.(...args);
 705        }
 706        return result2;
 707      }
 708      const result = theirHandler(...args);
 709      ourHandler?.(...args);
 710      return result;
 711    };
 712  }
 713  function wrapEventHandler(handler) {
 714    if (!handler) {
 715      return handler;
 716    }
 717    return (...args) => {
 718      const event = args[0];
 719      if (isSyntheticEvent(event)) {
 720        makeEventPreventable(event);
 721      }
 722      return handler(...args);
 723    };
 724  }
 725  function makeEventPreventable(event) {
 726    event.preventBaseUIHandler = () => {
 727      event.baseUIHandlerPrevented = true;
 728    };
 729    return event;
 730  }
 731  function mergeClassNames(ourClassName, theirClassName) {
 732    if (theirClassName) {
 733      if (ourClassName) {
 734        return theirClassName + " " + ourClassName;
 735      }
 736      return theirClassName;
 737    }
 738    return ourClassName;
 739  }
 740  function isSyntheticEvent(event) {
 741    return event != null && typeof event === "object" && "nativeEvent" in event;
 742  }
 743  
 744  // node_modules/@base-ui/react/esm/internals/useRenderElement.js
 745  var import_react = __toESM(require_react(), 1);
 746  function useRenderElement(element, componentProps, params = {}) {
 747    const renderProp = componentProps.render;
 748    const outProps = useRenderElementProps(componentProps, params);
 749    if (params.enabled === false) {
 750      return null;
 751    }
 752    const state = params.state ?? EMPTY_OBJECT;
 753    return evaluateRenderProp(element, renderProp, outProps, state);
 754  }
 755  function useRenderElementProps(componentProps, params = {}) {
 756    const {
 757      className: classNameProp,
 758      style: styleProp,
 759      render: renderProp
 760    } = componentProps;
 761    const {
 762      state = EMPTY_OBJECT,
 763      ref,
 764      props,
 765      stateAttributesMapping: stateAttributesMapping3,
 766      enabled = true
 767    } = params;
 768    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 769    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 770    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping3) : EMPTY_OBJECT;
 771    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 772    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 773    if (typeof document !== "undefined") {
 774      if (!enabled) {
 775        useMergedRefs(null, null);
 776      } else if (Array.isArray(ref)) {
 777        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 778      } else {
 779        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 780      }
 781    }
 782    if (!enabled) {
 783      return EMPTY_OBJECT;
 784    }
 785    if (className !== void 0) {
 786      outProps.className = mergeClassNames(outProps.className, className);
 787    }
 788    if (style !== void 0) {
 789      outProps.style = mergeObjects(outProps.style, style);
 790    }
 791    return outProps;
 792  }
 793  function resolveRenderFunctionProps(props) {
 794    if (Array.isArray(props)) {
 795      return mergePropsN(props);
 796    }
 797    return mergeProps(void 0, props);
 798  }
 799  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 800  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 801  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 802  function evaluateRenderProp(element, render, props, state) {
 803    if (render) {
 804      if (typeof render === "function") {
 805        if (true) {
 806          warnIfRenderPropLooksLikeComponent(render);
 807        }
 808        return render(props, state);
 809      }
 810      const mergedProps = mergeProps(props, render.props);
 811      mergedProps.ref = props.ref;
 812      let newElement = render;
 813      if (newElement?.$$typeof === REACT_LAZY_TYPE) {
 814        const children = React7.Children.toArray(render);
 815        newElement = children[0];
 816      }
 817      if (true) {
 818        if (!/* @__PURE__ */ React7.isValidElement(newElement)) {
 819          throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
 820        }
 821      }
 822      return /* @__PURE__ */ React7.cloneElement(newElement, mergedProps);
 823    }
 824    if (element) {
 825      if (typeof element === "string") {
 826        return renderTag(element, props);
 827      }
 828    }
 829    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 830  }
 831  function warnIfRenderPropLooksLikeComponent(renderFn) {
 832    const functionName = renderFn.name;
 833    if (functionName.length === 0) {
 834      return;
 835    }
 836    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 837      return;
 838    }
 839    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 840      return;
 841    }
 842    warn(`The \`render\` prop received a function named \`$functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
 843  }
 844  function renderTag(Tag, props) {
 845    if (Tag === "button") {
 846      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 847        type: "button",
 848        ...props,
 849        key: props.key
 850      });
 851    }
 852    if (Tag === "img") {
 853      return /* @__PURE__ */ (0, import_react.createElement)("img", {
 854        alt: "",
 855        ...props,
 856        key: props.key
 857      });
 858    }
 859    return /* @__PURE__ */ React7.createElement(Tag, props);
 860  }
 861  
 862  // node_modules/@base-ui/react/esm/internals/reason-parts.js
 863  var reason_parts_exports = {};
 864  __export(reason_parts_exports, {
 865    cancelOpen: () => cancelOpen,
 866    chipRemovePress: () => chipRemovePress,
 867    clearPress: () => clearPress,
 868    closePress: () => closePress,
 869    closeWatcher: () => closeWatcher,
 870    decrementPress: () => decrementPress,
 871    disabled: () => disabled,
 872    drag: () => drag,
 873    escapeKey: () => escapeKey,
 874    focusOut: () => focusOut,
 875    imperativeAction: () => imperativeAction,
 876    incrementPress: () => incrementPress,
 877    initial: () => initial,
 878    inputBlur: () => inputBlur,
 879    inputChange: () => inputChange,
 880    inputClear: () => inputClear,
 881    inputPaste: () => inputPaste,
 882    inputPress: () => inputPress,
 883    itemPress: () => itemPress,
 884    keyboard: () => keyboard,
 885    linkPress: () => linkPress,
 886    listNavigation: () => listNavigation,
 887    missing: () => missing,
 888    none: () => none,
 889    outsidePress: () => outsidePress,
 890    pointer: () => pointer,
 891    scrub: () => scrub,
 892    siblingOpen: () => siblingOpen,
 893    swipe: () => swipe,
 894    trackPress: () => trackPress,
 895    triggerFocus: () => triggerFocus,
 896    triggerHover: () => triggerHover,
 897    triggerPress: () => triggerPress,
 898    wheel: () => wheel,
 899    windowResize: () => windowResize
 900  });
 901  var none = "none";
 902  var triggerPress = "trigger-press";
 903  var triggerHover = "trigger-hover";
 904  var triggerFocus = "trigger-focus";
 905  var outsidePress = "outside-press";
 906  var itemPress = "item-press";
 907  var closePress = "close-press";
 908  var linkPress = "link-press";
 909  var clearPress = "clear-press";
 910  var chipRemovePress = "chip-remove-press";
 911  var trackPress = "track-press";
 912  var incrementPress = "increment-press";
 913  var decrementPress = "decrement-press";
 914  var inputChange = "input-change";
 915  var inputClear = "input-clear";
 916  var inputBlur = "input-blur";
 917  var inputPaste = "input-paste";
 918  var inputPress = "input-press";
 919  var focusOut = "focus-out";
 920  var escapeKey = "escape-key";
 921  var closeWatcher = "close-watcher";
 922  var listNavigation = "list-navigation";
 923  var keyboard = "keyboard";
 924  var pointer = "pointer";
 925  var drag = "drag";
 926  var wheel = "wheel";
 927  var scrub = "scrub";
 928  var cancelOpen = "cancel-open";
 929  var siblingOpen = "sibling-open";
 930  var disabled = "disabled";
 931  var missing = "missing";
 932  var initial = "initial";
 933  var imperativeAction = "imperative-action";
 934  var swipe = "swipe";
 935  var windowResize = "window-resize";
 936  
 937  // node_modules/@base-ui/react/esm/internals/createBaseUIEventDetails.js
 938  function createChangeEventDetails(reason, event, trigger, customProperties) {
 939    let canceled = false;
 940    let allowPropagation = false;
 941    const custom = customProperties ?? EMPTY_OBJECT;
 942    const details = {
 943      reason,
 944      event: event ?? new Event("base-ui"),
 945      cancel() {
 946        canceled = true;
 947      },
 948      allowPropagation() {
 949        allowPropagation = true;
 950      },
 951      get isCanceled() {
 952        return canceled;
 953      },
 954      get isPropagationAllowed() {
 955        return allowPropagation;
 956      },
 957      trigger,
 958      ...custom
 959    };
 960    return details;
 961  }
 962  
 963  // node_modules/@base-ui/utils/esm/useId.js
 964  var React8 = __toESM(require_react(), 1);
 965  var globalId = 0;
 966  function useGlobalId(idOverride, prefix = "mui") {
 967    const [defaultId, setDefaultId] = React8.useState(idOverride);
 968    const id = idOverride || defaultId;
 969    React8.useEffect(() => {
 970      if (defaultId == null) {
 971        globalId += 1;
 972        setDefaultId(`$prefix}-$globalId}`);
 973      }
 974    }, [defaultId, prefix]);
 975    return id;
 976  }
 977  var maybeReactUseId = SafeReact.useId;
 978  function useId(idOverride, prefix) {
 979    if (maybeReactUseId !== void 0) {
 980      const reactId = maybeReactUseId();
 981      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
 982    }
 983    return useGlobalId(idOverride, prefix);
 984  }
 985  
 986  // node_modules/@base-ui/react/esm/internals/useBaseUiId.js
 987  function useBaseUiId(idOverride) {
 988    return useId(idOverride, "base-ui");
 989  }
 990  
 991  // node_modules/@base-ui/react/esm/internals/useTransitionStatus.js
 992  var React10 = __toESM(require_react(), 1);
 993  
 994  // node_modules/@base-ui/utils/esm/useOnMount.js
 995  var React9 = __toESM(require_react(), 1);
 996  var EMPTY = [];
 997  function useOnMount(fn) {
 998    React9.useEffect(fn, EMPTY);
 999  }
1000  
1001  // node_modules/@base-ui/utils/esm/useAnimationFrame.js
1002  var EMPTY2 = null;
1003  var LAST_RAF = globalThis.requestAnimationFrame;
1004  var Scheduler = class {
1005    /* This implementation uses an array as a backing data-structure for frame callbacks.
1006     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1007     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1008     * be much more efficient if there is a call pattern that alterns as
1009     * "request-cancel-request-cancel-…".
1010     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1011     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1012    callbacks = [];
1013    callbacksCount = 0;
1014    nextId = 1;
1015    startId = 1;
1016    isScheduled = false;
1017    tick = (timestamp) => {
1018      this.isScheduled = false;
1019      const currentCallbacks = this.callbacks;
1020      const currentCallbacksCount = this.callbacksCount;
1021      this.callbacks = [];
1022      this.callbacksCount = 0;
1023      this.startId = this.nextId;
1024      if (currentCallbacksCount > 0) {
1025        for (let i = 0; i < currentCallbacks.length; i += 1) {
1026          currentCallbacks[i]?.(timestamp);
1027        }
1028      }
1029    };
1030    request(fn) {
1031      const id = this.nextId;
1032      this.nextId += 1;
1033      this.callbacks.push(fn);
1034      this.callbacksCount += 1;
1035      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1036      if (!this.isScheduled || didRAFChange) {
1037        requestAnimationFrame(this.tick);
1038        this.isScheduled = true;
1039      }
1040      return id;
1041    }
1042    cancel(id) {
1043      const index2 = id - this.startId;
1044      if (index2 < 0 || index2 >= this.callbacks.length) {
1045        return;
1046      }
1047      this.callbacks[index2] = null;
1048      this.callbacksCount -= 1;
1049    }
1050  };
1051  var scheduler = new Scheduler();
1052  var AnimationFrame = class _AnimationFrame {
1053    static create() {
1054      return new _AnimationFrame();
1055    }
1056    static request(fn) {
1057      return scheduler.request(fn);
1058    }
1059    static cancel(id) {
1060      return scheduler.cancel(id);
1061    }
1062    currentId = EMPTY2;
1063    /**
1064     * Executes `fn` after `delay`, clearing any previously scheduled call.
1065     */
1066    request(fn) {
1067      this.cancel();
1068      this.currentId = scheduler.request(() => {
1069        this.currentId = EMPTY2;
1070        fn();
1071      });
1072    }
1073    cancel = () => {
1074      if (this.currentId !== EMPTY2) {
1075        scheduler.cancel(this.currentId);
1076        this.currentId = EMPTY2;
1077      }
1078    };
1079    disposeEffect = () => {
1080      return this.cancel;
1081    };
1082  };
1083  function useAnimationFrame() {
1084    const timeout = useRefWithInit(AnimationFrame.create).current;
1085    useOnMount(timeout.disposeEffect);
1086    return timeout;
1087  }
1088  
1089  // node_modules/@base-ui/react/esm/internals/useTransitionStatus.js
1090  function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1091    const [transitionStatus, setTransitionStatus] = React10.useState(open && enableIdleState ? "idle" : void 0);
1092    const [mounted, setMounted] = React10.useState(open);
1093    if (open && !mounted) {
1094      setMounted(true);
1095      setTransitionStatus("starting");
1096    }
1097    if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1098      setTransitionStatus("ending");
1099    }
1100    if (!open && !mounted && transitionStatus === "ending") {
1101      setTransitionStatus(void 0);
1102    }
1103    useIsoLayoutEffect(() => {
1104      if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1105        const frame = AnimationFrame.request(() => {
1106          setTransitionStatus("ending");
1107        });
1108        return () => {
1109          AnimationFrame.cancel(frame);
1110        };
1111      }
1112      return void 0;
1113    }, [open, mounted, transitionStatus, deferEndingState]);
1114    useIsoLayoutEffect(() => {
1115      if (!open || enableIdleState) {
1116        return void 0;
1117      }
1118      const frame = AnimationFrame.request(() => {
1119        setTransitionStatus(void 0);
1120      });
1121      return () => {
1122        AnimationFrame.cancel(frame);
1123      };
1124    }, [enableIdleState, open]);
1125    useIsoLayoutEffect(() => {
1126      if (!open || !enableIdleState) {
1127        return void 0;
1128      }
1129      if (open && mounted && transitionStatus !== "idle") {
1130        setTransitionStatus("starting");
1131      }
1132      const frame = AnimationFrame.request(() => {
1133        setTransitionStatus("idle");
1134      });
1135      return () => {
1136        AnimationFrame.cancel(frame);
1137      };
1138    }, [enableIdleState, open, mounted, transitionStatus]);
1139    return {
1140      mounted,
1141      setMounted,
1142      transitionStatus
1143    };
1144  }
1145  
1146  // node_modules/@base-ui/react/esm/internals/stateAttributesMapping.js
1147  var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1148    TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1149    TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1150    return TransitionStatusDataAttributes2;
1151  })({});
1152  var STARTING_HOOK = {
1153    [TransitionStatusDataAttributes.startingStyle]: ""
1154  };
1155  var ENDING_HOOK = {
1156    [TransitionStatusDataAttributes.endingStyle]: ""
1157  };
1158  var transitionStatusMapping = {
1159    transitionStatus(value) {
1160      if (value === "starting") {
1161        return STARTING_HOOK;
1162      }
1163      if (value === "ending") {
1164        return ENDING_HOOK;
1165      }
1166      return null;
1167    }
1168  };
1169  
1170  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1171  function hasWindow() {
1172    return typeof window !== "undefined";
1173  }
1174  function getNodeName(node) {
1175    if (isNode(node)) {
1176      return (node.nodeName || "").toLowerCase();
1177    }
1178    return "#document";
1179  }
1180  function getWindow(node) {
1181    var _node$ownerDocument;
1182    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1183  }
1184  function getDocumentElement(node) {
1185    var _ref;
1186    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1187  }
1188  function isNode(value) {
1189    if (!hasWindow()) {
1190      return false;
1191    }
1192    return value instanceof Node || value instanceof getWindow(value).Node;
1193  }
1194  function isElement(value) {
1195    if (!hasWindow()) {
1196      return false;
1197    }
1198    return value instanceof Element || value instanceof getWindow(value).Element;
1199  }
1200  function isHTMLElement(value) {
1201    if (!hasWindow()) {
1202      return false;
1203    }
1204    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1205  }
1206  function isShadowRoot(value) {
1207    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1208      return false;
1209    }
1210    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1211  }
1212  function isOverflowElement(element) {
1213    const {
1214      overflow,
1215      overflowX,
1216      overflowY,
1217      display
1218    } = getComputedStyle2(element);
1219    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1220  }
1221  function isTableElement(element) {
1222    return /^(table|td|th)$/.test(getNodeName(element));
1223  }
1224  function isTopLayer(element) {
1225    try {
1226      if (element.matches(":popover-open")) {
1227        return true;
1228      }
1229    } catch (_e) {
1230    }
1231    try {
1232      return element.matches(":modal");
1233    } catch (_e) {
1234      return false;
1235    }
1236  }
1237  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1238  var containRe = /paint|layout|strict|content/;
1239  var isNotNone = (value) => !!value && value !== "none";
1240  var isWebKitValue;
1241  function isContainingBlock(elementOrCss) {
1242    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1243    return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
1244  }
1245  function getContainingBlock(element) {
1246    let currentNode = getParentNode(element);
1247    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1248      if (isContainingBlock(currentNode)) {
1249        return currentNode;
1250      } else if (isTopLayer(currentNode)) {
1251        return null;
1252      }
1253      currentNode = getParentNode(currentNode);
1254    }
1255    return null;
1256  }
1257  function isWebKit() {
1258    if (isWebKitValue == null) {
1259      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1260    }
1261    return isWebKitValue;
1262  }
1263  function isLastTraversableNode(node) {
1264    return /^(html|body|#document)$/.test(getNodeName(node));
1265  }
1266  function getComputedStyle2(element) {
1267    return getWindow(element).getComputedStyle(element);
1268  }
1269  function getNodeScroll(element) {
1270    if (isElement(element)) {
1271      return {
1272        scrollLeft: element.scrollLeft,
1273        scrollTop: element.scrollTop
1274      };
1275    }
1276    return {
1277      scrollLeft: element.scrollX,
1278      scrollTop: element.scrollY
1279    };
1280  }
1281  function getParentNode(node) {
1282    if (getNodeName(node) === "html") {
1283      return node;
1284    }
1285    const result = (
1286      // Step into the shadow DOM of the parent of a slotted node.
1287      node.assignedSlot || // DOM Element detected.
1288      node.parentNode || // ShadowRoot detected.
1289      isShadowRoot(node) && node.host || // Fallback.
1290      getDocumentElement(node)
1291    );
1292    return isShadowRoot(result) ? result.host : result;
1293  }
1294  function getNearestOverflowAncestor(node) {
1295    const parentNode = getParentNode(node);
1296    if (isLastTraversableNode(parentNode)) {
1297      return node.ownerDocument ? node.ownerDocument.body : node.body;
1298    }
1299    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1300      return parentNode;
1301    }
1302    return getNearestOverflowAncestor(parentNode);
1303  }
1304  function getOverflowAncestors(node, list, traverseIframes) {
1305    var _node$ownerDocument2;
1306    if (list === void 0) {
1307      list = [];
1308    }
1309    if (traverseIframes === void 0) {
1310      traverseIframes = true;
1311    }
1312    const scrollableAncestor = getNearestOverflowAncestor(node);
1313    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1314    const win = getWindow(scrollableAncestor);
1315    if (isBody) {
1316      const frameElement = getFrameElement(win);
1317      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1318    } else {
1319      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1320    }
1321  }
1322  function getFrameElement(win) {
1323    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1324  }
1325  
1326  // node_modules/@base-ui/utils/esm/detectBrowser.js
1327  var hasNavigator = typeof navigator !== "undefined";
1328  var nav = getNavigatorData();
1329  var platform = getPlatform();
1330  var userAgent = getUserAgent();
1331  var isWebKit2 = typeof CSS === "undefined" || !CSS.supports ? false : CSS.supports("-webkit-backdrop-filter:none");
1332  var isIOS = (
1333    // iPads can claim to be MacIntel
1334    nav.platform === "MacIntel" && nav.maxTouchPoints > 1 ? true : /iP(hone|ad|od)|iOS/.test(nav.platform)
1335  );
1336  var isFirefox = hasNavigator && /firefox/i.test(userAgent);
1337  var isSafari = hasNavigator && /apple/i.test(navigator.vendor);
1338  var isEdge = hasNavigator && /Edg/i.test(userAgent);
1339  var isAndroid = hasNavigator && /android/i.test(platform) || /android/i.test(userAgent);
1340  var isMac = hasNavigator && platform.toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
1341  var isJSDOM = userAgent.includes("jsdom/");
1342  function getNavigatorData() {
1343    if (!hasNavigator) {
1344      return {
1345        platform: "",
1346        maxTouchPoints: -1
1347      };
1348    }
1349    const uaData = navigator.userAgentData;
1350    if (uaData?.platform) {
1351      return {
1352        platform: uaData.platform,
1353        maxTouchPoints: navigator.maxTouchPoints
1354      };
1355    }
1356    return {
1357      platform: navigator.platform ?? "",
1358      maxTouchPoints: navigator.maxTouchPoints ?? -1
1359    };
1360  }
1361  function getUserAgent() {
1362    if (!hasNavigator) {
1363      return "";
1364    }
1365    const uaData = navigator.userAgentData;
1366    if (uaData && Array.isArray(uaData.brands)) {
1367      return uaData.brands.map(({
1368        brand,
1369        version: version2
1370      }) => `$brand}/$version2}`).join(" ");
1371    }
1372    return navigator.userAgent;
1373  }
1374  function getPlatform() {
1375    if (!hasNavigator) {
1376      return "";
1377    }
1378    const uaData = navigator.userAgentData;
1379    if (uaData?.platform) {
1380      return uaData.platform;
1381    }
1382    return navigator.platform ?? "";
1383  }
1384  
1385  // node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js
1386  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1387  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1388  
1389  // node_modules/@base-ui/react/esm/internals/shadowDom.js
1390  function activeElement(doc) {
1391    let element = doc.activeElement;
1392    while (element?.shadowRoot?.activeElement != null) {
1393      element = element.shadowRoot.activeElement;
1394    }
1395    return element;
1396  }
1397  function contains(parent, child) {
1398    if (!parent || !child) {
1399      return false;
1400    }
1401    const rootNode = child.getRootNode?.();
1402    if (parent.contains(child)) {
1403      return true;
1404    }
1405    if (rootNode && isShadowRoot(rootNode)) {
1406      let next = child;
1407      while (next) {
1408        if (parent === next) {
1409          return true;
1410        }
1411        next = next.parentNode || next.host;
1412      }
1413    }
1414    return false;
1415  }
1416  function getTarget(event) {
1417    if ("composedPath" in event) {
1418      return event.composedPath()[0];
1419    }
1420    return event.target;
1421  }
1422  
1423  // node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js
1424  function isTargetInsideEnabledTrigger(target, triggerElements) {
1425    if (!isElement(target)) {
1426      return false;
1427    }
1428    const targetElement = target;
1429    if (triggerElements.hasElement(targetElement)) {
1430      return !targetElement.hasAttribute("data-trigger-disabled");
1431    }
1432    for (const [, trigger] of triggerElements.entries()) {
1433      if (contains(trigger, targetElement)) {
1434        return !trigger.hasAttribute("data-trigger-disabled");
1435      }
1436    }
1437    return false;
1438  }
1439  function isEventTargetWithin(event, node) {
1440    if (node == null) {
1441      return false;
1442    }
1443    if ("composedPath" in event) {
1444      return event.composedPath().includes(node);
1445    }
1446    const eventAgain = event;
1447    return eventAgain.target != null && node.contains(eventAgain.target);
1448  }
1449  function isRootElement(element) {
1450    return element.matches("html,body");
1451  }
1452  function isTypeableElement(element) {
1453    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1454  }
1455  function isInteractiveElement(element) {
1456    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1457  }
1458  function matchesFocusVisible(element) {
1459    if (!element || isJSDOM) {
1460      return true;
1461    }
1462    try {
1463      return element.matches(":focus-visible");
1464    } catch (_e) {
1465      return true;
1466    }
1467  }
1468  
1469  // node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes.js
1470  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
1471    const directChildren = nodes.filter((node) => node.parentId === id);
1472    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
1473  }
1474  
1475  // node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
1476  function isReactEvent(event) {
1477    return "nativeEvent" in event;
1478  }
1479  function isMouseLikePointerType(pointerType, strict) {
1480    const values = ["mouse", "pen"];
1481    if (!strict) {
1482      values.push("", void 0);
1483    }
1484    return values.includes(pointerType);
1485  }
1486  function isClickLikeEvent(event) {
1487    const type = event.type;
1488    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1489  }
1490  
1491  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
1492  var sides = ["top", "right", "bottom", "left"];
1493  var min = Math.min;
1494  var max = Math.max;
1495  var round = Math.round;
1496  var floor = Math.floor;
1497  var createCoords = (v) => ({
1498    x: v,
1499    y: v
1500  });
1501  var oppositeSideMap = {
1502    left: "right",
1503    right: "left",
1504    bottom: "top",
1505    top: "bottom"
1506  };
1507  function clamp(start, value, end) {
1508    return max(start, min(value, end));
1509  }
1510  function evaluate(value, param) {
1511    return typeof value === "function" ? value(param) : value;
1512  }
1513  function getSide(placement) {
1514    return placement.split("-")[0];
1515  }
1516  function getAlignment(placement) {
1517    return placement.split("-")[1];
1518  }
1519  function getOppositeAxis(axis) {
1520    return axis === "x" ? "y" : "x";
1521  }
1522  function getAxisLength(axis) {
1523    return axis === "y" ? "height" : "width";
1524  }
1525  function getSideAxis(placement) {
1526    const firstChar = placement[0];
1527    return firstChar === "t" || firstChar === "b" ? "y" : "x";
1528  }
1529  function getAlignmentAxis(placement) {
1530    return getOppositeAxis(getSideAxis(placement));
1531  }
1532  function getAlignmentSides(placement, rects, rtl) {
1533    if (rtl === void 0) {
1534      rtl = false;
1535    }
1536    const alignment = getAlignment(placement);
1537    const alignmentAxis = getAlignmentAxis(placement);
1538    const length = getAxisLength(alignmentAxis);
1539    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
1540    if (rects.reference[length] > rects.floating[length]) {
1541      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
1542    }
1543    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
1544  }
1545  function getExpandedPlacements(placement) {
1546    const oppositePlacement = getOppositePlacement(placement);
1547    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
1548  }
1549  function getOppositeAlignmentPlacement(placement) {
1550    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
1551  }
1552  var lrPlacement = ["left", "right"];
1553  var rlPlacement = ["right", "left"];
1554  var tbPlacement = ["top", "bottom"];
1555  var btPlacement = ["bottom", "top"];
1556  function getSideList(side, isStart, rtl) {
1557    switch (side) {
1558      case "top":
1559      case "bottom":
1560        if (rtl) return isStart ? rlPlacement : lrPlacement;
1561        return isStart ? lrPlacement : rlPlacement;
1562      case "left":
1563      case "right":
1564        return isStart ? tbPlacement : btPlacement;
1565      default:
1566        return [];
1567    }
1568  }
1569  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
1570    const alignment = getAlignment(placement);
1571    let list = getSideList(getSide(placement), direction === "start", rtl);
1572    if (alignment) {
1573      list = list.map((side) => side + "-" + alignment);
1574      if (flipAlignment) {
1575        list = list.concat(list.map(getOppositeAlignmentPlacement));
1576      }
1577    }
1578    return list;
1579  }
1580  function getOppositePlacement(placement) {
1581    const side = getSide(placement);
1582    return oppositeSideMap[side] + placement.slice(side.length);
1583  }
1584  function expandPaddingObject(padding) {
1585    return {
1586      top: 0,
1587      right: 0,
1588      bottom: 0,
1589      left: 0,
1590      ...padding
1591    };
1592  }
1593  function getPaddingObject(padding) {
1594    return typeof padding !== "number" ? expandPaddingObject(padding) : {
1595      top: padding,
1596      right: padding,
1597      bottom: padding,
1598      left: padding
1599    };
1600  }
1601  function rectToClientRect(rect) {
1602    const {
1603      x,
1604      y,
1605      width,
1606      height
1607    } = rect;
1608    return {
1609      width,
1610      height,
1611      top: y,
1612      left: x,
1613      right: x + width,
1614      bottom: y + height,
1615      x,
1616      y
1617    };
1618  }
1619  
1620  // node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js
1621  function isHiddenByStyles(styles) {
1622    return styles.visibility === "hidden" || styles.visibility === "collapse";
1623  }
1624  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
1625    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
1626      return false;
1627    }
1628    if (typeof element.checkVisibility === "function") {
1629      return element.checkVisibility();
1630    }
1631    return styles.display !== "none" && styles.display !== "contents";
1632  }
1633  
1634  // node_modules/@base-ui/utils/esm/owner.js
1635  function ownerDocument(node) {
1636    return node?.ownerDocument || document;
1637  }
1638  
1639  // node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js
1640  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
1641  function getParentElement(element) {
1642    const assignedSlot = element.assignedSlot;
1643    if (assignedSlot) {
1644      return assignedSlot;
1645    }
1646    if (element.parentElement) {
1647      return element.parentElement;
1648    }
1649    const rootNode = element.getRootNode();
1650    return isShadowRoot(rootNode) ? rootNode.host : null;
1651  }
1652  function getDetailsSummary(details) {
1653    for (const child of Array.from(details.children)) {
1654      if (getNodeName(child) === "summary") {
1655        return child;
1656      }
1657    }
1658    return null;
1659  }
1660  function isWithinOpenDetailsSummary(element, details) {
1661    const summary = getDetailsSummary(details);
1662    return !!summary && (element === summary || contains(summary, element));
1663  }
1664  function isFocusableCandidate(element) {
1665    const nodeName = element ? getNodeName(element) : "";
1666    return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden");
1667  }
1668  function isFocusableElement(element) {
1669    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
1670      return false;
1671    }
1672    for (let current = element; current; current = getParentElement(current)) {
1673      const isAncestor = current !== element;
1674      const isSlot = getNodeName(current) === "slot";
1675      if (current.hasAttribute("inert")) {
1676        return false;
1677      }
1678      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
1679        return false;
1680      }
1681    }
1682    return true;
1683  }
1684  function isVisibleInTabbableTree(element, isAncestor) {
1685    const styles = getComputedStyle2(element);
1686    if (!isAncestor) {
1687      return isElementVisible(element, styles);
1688    }
1689    return styles.display !== "none";
1690  }
1691  function getTabIndex(element) {
1692    const tabIndex = element.tabIndex;
1693    if (tabIndex < 0) {
1694      const nodeName = getNodeName(element);
1695      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
1696        return 0;
1697      }
1698    }
1699    return tabIndex;
1700  }
1701  function getNamedRadioInput(element) {
1702    if (getNodeName(element) !== "input") {
1703      return null;
1704    }
1705    const input = element;
1706    return input.type === "radio" && input.name !== "" ? input : null;
1707  }
1708  function isTabbableRadio(element, candidates) {
1709    const input = getNamedRadioInput(element);
1710    if (!input) {
1711      return true;
1712    }
1713    const checkedRadio = candidates.find((candidate) => {
1714      const radio = getNamedRadioInput(candidate);
1715      return radio?.name === input.name && radio.form === input.form && radio.checked;
1716    });
1717    if (checkedRadio) {
1718      return checkedRadio === input;
1719    }
1720    return candidates.find((candidate) => {
1721      const radio = getNamedRadioInput(candidate);
1722      return radio?.name === input.name && radio.form === input.form;
1723    }) === input;
1724  }
1725  function getComposedChildren(container) {
1726    if (isHTMLElement(container) && getNodeName(container) === "slot") {
1727      const assignedElements = container.assignedElements({
1728        flatten: true
1729      });
1730      if (assignedElements.length > 0) {
1731        return assignedElements;
1732      }
1733    }
1734    if (isHTMLElement(container) && container.shadowRoot) {
1735      return Array.from(container.shadowRoot.children);
1736    }
1737    return Array.from(container.children);
1738  }
1739  function appendCandidates(container, list) {
1740    getComposedChildren(container).forEach((child) => {
1741      if (isFocusableCandidate(child)) {
1742        list.push(child);
1743      }
1744      appendCandidates(child, list);
1745    });
1746  }
1747  function appendMatchingElements(container, selector, list) {
1748    getComposedChildren(container).forEach((child) => {
1749      if (isHTMLElement(child) && child.matches(selector)) {
1750        list.push(child);
1751      }
1752      appendMatchingElements(child, selector, list);
1753    });
1754  }
1755  function focusable(container) {
1756    const candidates = [];
1757    appendCandidates(container, candidates);
1758    return candidates.filter(isFocusableElement);
1759  }
1760  function tabbable(container) {
1761    const candidates = focusable(container);
1762    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
1763  }
1764  function getTabbableIn(container, dir) {
1765    const list = tabbable(container);
1766    const len = list.length;
1767    if (len === 0) {
1768      return void 0;
1769    }
1770    const active = activeElement(ownerDocument(container));
1771    const index2 = list.indexOf(active);
1772    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
1773    return list[nextIndex];
1774  }
1775  function getNextTabbable(referenceElement) {
1776    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
1777  }
1778  function getPreviousTabbable(referenceElement) {
1779    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
1780  }
1781  function isOutsideEvent(event, container) {
1782    const containerElement = container || event.currentTarget;
1783    const relatedTarget = event.relatedTarget;
1784    return !relatedTarget || !contains(containerElement, relatedTarget);
1785  }
1786  function disableFocusInside(container) {
1787    const tabbableElements = tabbable(container);
1788    tabbableElements.forEach((element) => {
1789      element.dataset.tabindex = element.getAttribute("tabindex") || "";
1790      element.setAttribute("tabindex", "-1");
1791    });
1792  }
1793  function enableFocusInside(container) {
1794    const elements = [];
1795    appendMatchingElements(container, "[data-tabindex]", elements);
1796    elements.forEach((element) => {
1797      const tabindex = element.dataset.tabindex;
1798      delete element.dataset.tabindex;
1799      if (tabindex) {
1800        element.setAttribute("tabindex", tabindex);
1801      } else {
1802        element.removeAttribute("tabindex");
1803      }
1804    });
1805  }
1806  
1807  // node_modules/@base-ui/utils/esm/addEventListener.js
1808  function addEventListener(target, type, listener, options) {
1809    target.addEventListener(type, listener, options);
1810    return () => {
1811      target.removeEventListener(type, listener, options);
1812    };
1813  }
1814  
1815  // node_modules/@base-ui/utils/esm/useValueAsRef.js
1816  function useValueAsRef(value) {
1817    const latest = useRefWithInit(createLatestRef, value).current;
1818    latest.next = value;
1819    useIsoLayoutEffect(latest.effect);
1820    return latest;
1821  }
1822  function createLatestRef(value) {
1823    const latest = {
1824      current: value,
1825      next: value,
1826      effect: () => {
1827        latest.current = latest.next;
1828      }
1829    };
1830    return latest;
1831  }
1832  
1833  // node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js
1834  var React11 = __toESM(require_react(), 1);
1835  
1836  // node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js
1837  var ReactDOM = __toESM(require_react_dom(), 1);
1838  
1839  // node_modules/@base-ui/react/esm/utils/resolveRef.js
1840  function resolveRef(maybeRef) {
1841    if (maybeRef == null) {
1842      return maybeRef;
1843    }
1844    return "current" in maybeRef ? maybeRef.current : maybeRef;
1845  }
1846  
1847  // node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js
1848  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {
1849    const frame = useAnimationFrame();
1850    return useStableCallback((fnToExecute, signal = null) => {
1851      frame.cancel();
1852      const element = resolveRef(elementOrRef);
1853      if (element == null) {
1854        return;
1855      }
1856      const resolvedElement = element;
1857      const done = () => {
1858        ReactDOM.flushSync(fnToExecute);
1859      };
1860      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1861        fnToExecute();
1862        return;
1863      }
1864      function exec() {
1865        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1866          if (!signal?.aborted) {
1867            done();
1868          }
1869        }).catch(() => {
1870          if (treatAbortedAsFinished) {
1871            if (!signal?.aborted) {
1872              done();
1873            }
1874            return;
1875          }
1876          const currentAnimations = resolvedElement.getAnimations();
1877          if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1878            exec();
1879          }
1880        });
1881      }
1882      if (waitForStartingStyleRemoved) {
1883        const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;
1884        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1885          frame.request(exec);
1886          return;
1887        }
1888        const attributeObserver = new MutationObserver(() => {
1889          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1890            attributeObserver.disconnect();
1891            exec();
1892          }
1893        });
1894        attributeObserver.observe(resolvedElement, {
1895          attributes: true,
1896          attributeFilter: [startingStyleAttribute]
1897        });
1898        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1899          once: true
1900        });
1901        return;
1902      }
1903      frame.request(exec);
1904    });
1905  }
1906  
1907  // node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js
1908  function useOpenChangeComplete(parameters) {
1909    const {
1910      enabled = true,
1911      open,
1912      ref,
1913      onComplete: onCompleteParam
1914    } = parameters;
1915    const onComplete = useStableCallback(onCompleteParam);
1916    const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);
1917    React11.useEffect(() => {
1918      if (!enabled) {
1919        return void 0;
1920      }
1921      const abortController = new AbortController();
1922      runOnceAnimationsFinish(onComplete, abortController.signal);
1923      return () => {
1924        abortController.abort();
1925      };
1926    }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1927  }
1928  
1929  // node_modules/@base-ui/utils/esm/useOnFirstRender.js
1930  var React12 = __toESM(require_react(), 1);
1931  function useOnFirstRender(fn) {
1932    const ref = React12.useRef(true);
1933    if (ref.current) {
1934      ref.current = false;
1935      fn();
1936    }
1937  }
1938  
1939  // node_modules/@base-ui/utils/esm/useTimeout.js
1940  var EMPTY3 = 0;
1941  var Timeout = class _Timeout {
1942    static create() {
1943      return new _Timeout();
1944    }
1945    currentId = EMPTY3;
1946    /**
1947     * Executes `fn` after `delay`, clearing any previously scheduled call.
1948     */
1949    start(delay, fn) {
1950      this.clear();
1951      this.currentId = setTimeout(() => {
1952        this.currentId = EMPTY3;
1953        fn();
1954      }, delay);
1955    }
1956    isStarted() {
1957      return this.currentId !== EMPTY3;
1958    }
1959    clear = () => {
1960      if (this.currentId !== EMPTY3) {
1961        clearTimeout(this.currentId);
1962        this.currentId = EMPTY3;
1963      }
1964    };
1965    disposeEffect = () => {
1966      return this.clear;
1967    };
1968  };
1969  function useTimeout() {
1970    const timeout = useRefWithInit(Timeout.create).current;
1971    useOnMount(timeout.disposeEffect);
1972    return timeout;
1973  }
1974  
1975  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingDelayGroup.js
1976  var React13 = __toESM(require_react(), 1);
1977  
1978  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverShared.js
1979  function resolveValue(value, pointerType) {
1980    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1981      return 0;
1982    }
1983    if (typeof value === "function") {
1984      return value();
1985    }
1986    return value;
1987  }
1988  function getDelay(value, prop, pointerType) {
1989    const result = resolveValue(value, pointerType);
1990    if (typeof result === "number") {
1991      return result;
1992    }
1993    return result?.[prop];
1994  }
1995  function getRestMs(value) {
1996    if (typeof value === "function") {
1997      return value();
1998    }
1999    return value;
2000  }
2001  function isClickLikeOpenEvent(openEventType, interactedInside) {
2002    return interactedInside || openEventType === "click" || openEventType === "mousedown";
2003  }
2004  function isHoverOpenEvent(openEventType) {
2005    return openEventType?.includes("mouse") && openEventType !== "mousedown";
2006  }
2007  
2008  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingDelayGroup.js
2009  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
2010  var FloatingDelayGroupContext = /* @__PURE__ */ React13.createContext({
2011    hasProvider: false,
2012    timeoutMs: 0,
2013    delayRef: {
2014      current: 0
2015    },
2016    initialDelayRef: {
2017      current: 0
2018    },
2019    timeout: new Timeout(),
2020    currentIdRef: {
2021      current: null
2022    },
2023    currentContextRef: {
2024      current: null
2025    }
2026  });
2027  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
2028  function FloatingDelayGroup(props) {
2029    const {
2030      children,
2031      delay,
2032      timeoutMs = 0
2033    } = props;
2034    const delayRef = React13.useRef(delay);
2035    const initialDelayRef = React13.useRef(delay);
2036    const currentIdRef = React13.useRef(null);
2037    const currentContextRef = React13.useRef(null);
2038    const timeout = useTimeout();
2039    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
2040      value: React13.useMemo(() => ({
2041        hasProvider: true,
2042        delayRef,
2043        initialDelayRef,
2044        currentIdRef,
2045        timeoutMs,
2046        currentContextRef,
2047        timeout
2048      }), [timeoutMs, timeout]),
2049      children
2050    });
2051  }
2052  function useDelayGroup(context, options = {
2053    open: false
2054  }) {
2055    const {
2056      open
2057    } = options;
2058    const store2 = "rootStore" in context ? context.rootStore : context;
2059    const floatingId = store2.useState("floatingId");
2060    const groupContext = React13.useContext(FloatingDelayGroupContext);
2061    const {
2062      currentIdRef,
2063      delayRef,
2064      timeoutMs,
2065      initialDelayRef,
2066      currentContextRef,
2067      hasProvider,
2068      timeout
2069    } = groupContext;
2070    const [isInstantPhase, setIsInstantPhase] = React13.useState(false);
2071    useIsoLayoutEffect(() => {
2072      function unset() {
2073        setIsInstantPhase(false);
2074        currentContextRef.current?.setIsInstantPhase(false);
2075        currentIdRef.current = null;
2076        currentContextRef.current = null;
2077        delayRef.current = initialDelayRef.current;
2078      }
2079      if (!currentIdRef.current) {
2080        return void 0;
2081      }
2082      if (!open && currentIdRef.current === floatingId) {
2083        setIsInstantPhase(false);
2084        if (timeoutMs) {
2085          const closingId = floatingId;
2086          timeout.start(timeoutMs, () => {
2087            if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2088              return;
2089            }
2090            unset();
2091          });
2092          return () => {
2093            timeout.clear();
2094          };
2095        }
2096        unset();
2097      }
2098      return void 0;
2099    }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
2100    useIsoLayoutEffect(() => {
2101      if (!open) {
2102        return;
2103      }
2104      const prevContext = currentContextRef.current;
2105      const prevId = currentIdRef.current;
2106      timeout.clear();
2107      currentContextRef.current = {
2108        onOpenChange: store2.setOpen,
2109        setIsInstantPhase
2110      };
2111      currentIdRef.current = floatingId;
2112      delayRef.current = {
2113        open: 0,
2114        close: getDelay(initialDelayRef.current, "close")
2115      };
2116      if (prevId !== null && prevId !== floatingId) {
2117        setIsInstantPhase(true);
2118        prevContext?.setIsInstantPhase(true);
2119        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2120      } else {
2121        setIsInstantPhase(false);
2122        prevContext?.setIsInstantPhase(false);
2123      }
2124    }, [open, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2125    useIsoLayoutEffect(() => {
2126      return () => {
2127        currentContextRef.current = null;
2128      };
2129    }, [currentContextRef]);
2130    return React13.useMemo(() => ({
2131      hasProvider,
2132      delayRef,
2133      isInstantPhase
2134    }), [hasProvider, delayRef, isInstantPhase]);
2135  }
2136  
2137  // node_modules/@base-ui/utils/esm/mergeCleanups.js
2138  function mergeCleanups(...cleanups) {
2139    return () => {
2140      for (let i = 0; i < cleanups.length; i += 1) {
2141        const cleanup = cleanups[i];
2142        if (cleanup) {
2143          cleanup();
2144        }
2145      }
2146    };
2147  }
2148  
2149  // node_modules/@base-ui/react/esm/utils/FocusGuard.js
2150  var React14 = __toESM(require_react(), 1);
2151  
2152  // node_modules/@base-ui/utils/esm/visuallyHidden.js
2153  var visuallyHiddenBase = {
2154    clipPath: "inset(50%)",
2155    overflow: "hidden",
2156    whiteSpace: "nowrap",
2157    border: 0,
2158    padding: 0,
2159    width: 1,
2160    height: 1,
2161    margin: -1
2162  };
2163  var visuallyHidden = {
2164    ...visuallyHiddenBase,
2165    position: "fixed",
2166    top: 0,
2167    left: 0
2168  };
2169  var visuallyHiddenInput = {
2170    ...visuallyHiddenBase,
2171    position: "absolute"
2172  };
2173  
2174  // node_modules/@base-ui/react/esm/utils/FocusGuard.js
2175  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2176  var FocusGuard = /* @__PURE__ */ React14.forwardRef(function FocusGuard2(props, ref) {
2177    const [role, setRole] = React14.useState();
2178    useIsoLayoutEffect(() => {
2179      if (isSafari) {
2180        setRole("button");
2181      }
2182    }, []);
2183    const restProps = {
2184      tabIndex: 0,
2185      // Role is only for VoiceOver
2186      role
2187    };
2188    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2189      ...props,
2190      ref,
2191      style: visuallyHidden,
2192      "aria-hidden": role ? void 0 : true,
2193      ...restProps,
2194      "data-base-ui-focus-guard": ""
2195    });
2196  });
2197  if (true) FocusGuard.displayName = "FocusGuard";
2198  
2199  // node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js
2200  function createAttribute(name) {
2201    return `data-base-ui-$name}`;
2202  }
2203  
2204  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js
2205  var React15 = __toESM(require_react(), 1);
2206  var ReactDOM2 = __toESM(require_react_dom(), 1);
2207  
2208  // node_modules/@base-ui/react/esm/internals/constants.js
2209  var DISABLED_TRANSITIONS_STYLE = {
2210    style: {
2211      transition: "none"
2212    }
2213  };
2214  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2215  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2216  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2217  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2218  var POPUP_COLLISION_AVOIDANCE = {
2219    fallbackAxisSide: "end"
2220  };
2221  var ownerVisuallyHidden = {
2222    clipPath: "inset(50%)",
2223    position: "fixed",
2224    top: 0,
2225    left: 0
2226  };
2227  
2228  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js
2229  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2230  var PortalContext = /* @__PURE__ */ React15.createContext(null);
2231  if (true) PortalContext.displayName = "PortalContext";
2232  var usePortalContext = () => React15.useContext(PortalContext);
2233  var attr = createAttribute("portal");
2234  function useFloatingPortalNode(props = {}) {
2235    const {
2236      ref,
2237      container: containerProp,
2238      componentProps = EMPTY_OBJECT,
2239      elementProps
2240    } = props;
2241    const uniqueId = useId();
2242    const portalContext = usePortalContext();
2243    const parentPortalNode = portalContext?.portalNode;
2244    const [containerElement, setContainerElement] = React15.useState(null);
2245    const [portalNode, setPortalNode] = React15.useState(null);
2246    const setPortalNodeRef = useStableCallback((node) => {
2247      if (node !== null) {
2248        setPortalNode(node);
2249      }
2250    });
2251    const containerRef = React15.useRef(null);
2252    useIsoLayoutEffect(() => {
2253      if (containerProp === null) {
2254        if (containerRef.current) {
2255          containerRef.current = null;
2256          setPortalNode(null);
2257          setContainerElement(null);
2258        }
2259        return;
2260      }
2261      if (uniqueId == null) {
2262        return;
2263      }
2264      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2265      if (resolvedContainer == null) {
2266        if (containerRef.current) {
2267          containerRef.current = null;
2268          setPortalNode(null);
2269          setContainerElement(null);
2270        }
2271        return;
2272      }
2273      if (containerRef.current !== resolvedContainer) {
2274        containerRef.current = resolvedContainer;
2275        setPortalNode(null);
2276        setContainerElement(resolvedContainer);
2277      }
2278    }, [containerProp, parentPortalNode, uniqueId]);
2279    const portalElement = useRenderElement("div", componentProps, {
2280      ref: [ref, setPortalNodeRef],
2281      props: [{
2282        id: uniqueId,
2283        [attr]: ""
2284      }, elementProps]
2285    });
2286    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2287    return {
2288      portalNode,
2289      portalSubtree
2290    };
2291  }
2292  var FloatingPortal = /* @__PURE__ */ React15.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2293    const {
2294      render,
2295      className,
2296      style,
2297      children,
2298      container,
2299      renderGuards,
2300      ...elementProps
2301    } = componentProps;
2302    const {
2303      portalNode,
2304      portalSubtree
2305    } = useFloatingPortalNode({
2306      container,
2307      ref: forwardedRef,
2308      componentProps,
2309      elementProps
2310    });
2311    const beforeOutsideRef = React15.useRef(null);
2312    const afterOutsideRef = React15.useRef(null);
2313    const beforeInsideRef = React15.useRef(null);
2314    const afterInsideRef = React15.useRef(null);
2315    const [focusManagerState, setFocusManagerState] = React15.useState(null);
2316    const focusInsideDisabledRef = React15.useRef(false);
2317    const modal = focusManagerState?.modal;
2318    const open = focusManagerState?.open;
2319    const shouldRenderGuards = typeof renderGuards === "boolean" ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2320    React15.useEffect(() => {
2321      if (!portalNode || modal) {
2322        return void 0;
2323      }
2324      function onFocus(event) {
2325        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2326          if (event.type === "focusin") {
2327            if (focusInsideDisabledRef.current) {
2328              enableFocusInside(portalNode);
2329              focusInsideDisabledRef.current = false;
2330            }
2331          } else {
2332            disableFocusInside(portalNode);
2333            focusInsideDisabledRef.current = true;
2334          }
2335        }
2336      }
2337      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2338    }, [portalNode, modal]);
2339    React15.useEffect(() => {
2340      if (!portalNode || open !== false) {
2341        return;
2342      }
2343      enableFocusInside(portalNode);
2344      focusInsideDisabledRef.current = false;
2345    }, [open, portalNode]);
2346    const portalContextValue = React15.useMemo(() => ({
2347      beforeOutsideRef,
2348      afterOutsideRef,
2349      beforeInsideRef,
2350      afterInsideRef,
2351      portalNode,
2352      setFocusManagerState
2353    }), [portalNode]);
2354    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React15.Fragment, {
2355      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2356        value: portalContextValue,
2357        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2358          "data-type": "outside",
2359          ref: beforeOutsideRef,
2360          onFocus: (event) => {
2361            if (isOutsideEvent(event, portalNode)) {
2362              beforeInsideRef.current?.focus();
2363            } else {
2364              const domReference = focusManagerState ? focusManagerState.domReference : null;
2365              const prevTabbable = getPreviousTabbable(domReference);
2366              prevTabbable?.focus();
2367            }
2368          }
2369        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2370          "aria-owns": portalNode.id,
2371          style: ownerVisuallyHidden
2372        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2373          "data-type": "outside",
2374          ref: afterOutsideRef,
2375          onFocus: (event) => {
2376            if (isOutsideEvent(event, portalNode)) {
2377              afterInsideRef.current?.focus();
2378            } else {
2379              const domReference = focusManagerState ? focusManagerState.domReference : null;
2380              const nextTabbable = getNextTabbable(domReference);
2381              nextTabbable?.focus();
2382              if (focusManagerState?.closeOnFocusOut) {
2383                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2384              }
2385            }
2386          }
2387        })]
2388      })]
2389    });
2390  });
2391  if (true) FloatingPortal.displayName = "FloatingPortal";
2392  
2393  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree.js
2394  var React16 = __toESM(require_react(), 1);
2395  
2396  // node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter.js
2397  function createEventEmitter() {
2398    const map = /* @__PURE__ */ new Map();
2399    return {
2400      emit(event, data) {
2401        map.get(event)?.forEach((listener) => listener(data));
2402      },
2403      on(event, listener) {
2404        if (!map.has(event)) {
2405          map.set(event, /* @__PURE__ */ new Set());
2406        }
2407        map.get(event).add(listener);
2408      },
2409      off(event, listener) {
2410        map.get(event)?.delete(listener);
2411      }
2412    };
2413  }
2414  
2415  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree.js
2416  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2417  var FloatingNodeContext = /* @__PURE__ */ React16.createContext(null);
2418  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2419  var FloatingTreeContext = /* @__PURE__ */ React16.createContext(null);
2420  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2421  var useFloatingParentNodeId = () => React16.useContext(FloatingNodeContext)?.id || null;
2422  var useFloatingTree = (externalTree) => {
2423    const contextTree = React16.useContext(FloatingTreeContext);
2424    return externalTree ?? contextTree;
2425  };
2426  
2427  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClientPoint.js
2428  var React17 = __toESM(require_react(), 1);
2429  function createVirtualElement(domElement, data) {
2430    let offsetX = null;
2431    let offsetY = null;
2432    let isAutoUpdateEvent = false;
2433    return {
2434      contextElement: domElement || void 0,
2435      getBoundingClientRect() {
2436        const domRect = domElement?.getBoundingClientRect() || {
2437          width: 0,
2438          height: 0,
2439          x: 0,
2440          y: 0
2441        };
2442        const isXAxis = data.axis === "x" || data.axis === "both";
2443        const isYAxis = data.axis === "y" || data.axis === "both";
2444        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2445        let width = domRect.width;
2446        let height = domRect.height;
2447        let x = domRect.x;
2448        let y = domRect.y;
2449        if (offsetX == null && data.x && isXAxis) {
2450          offsetX = domRect.x - data.x;
2451        }
2452        if (offsetY == null && data.y && isYAxis) {
2453          offsetY = domRect.y - data.y;
2454        }
2455        x -= offsetX || 0;
2456        y -= offsetY || 0;
2457        width = 0;
2458        height = 0;
2459        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2460          width = data.axis === "y" ? domRect.width : 0;
2461          height = data.axis === "x" ? domRect.height : 0;
2462          x = isXAxis && data.x != null ? data.x : x;
2463          y = isYAxis && data.y != null ? data.y : y;
2464        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2465          height = data.axis === "x" ? domRect.height : height;
2466          width = data.axis === "y" ? domRect.width : width;
2467        }
2468        isAutoUpdateEvent = true;
2469        return {
2470          width,
2471          height,
2472          x,
2473          y,
2474          top: y,
2475          right: x + width,
2476          bottom: y + height,
2477          left: x
2478        };
2479      }
2480    };
2481  }
2482  function isMouseBasedEvent(event) {
2483    return event != null && event.clientX != null;
2484  }
2485  function useClientPoint(context, props = {}) {
2486    const {
2487      enabled = true,
2488      axis = "both"
2489    } = props;
2490    const store2 = "rootStore" in context ? context.rootStore : context;
2491    const open = store2.useState("open");
2492    const floating = store2.useState("floatingElement");
2493    const domReference = store2.useState("domReferenceElement");
2494    const dataRef = store2.context.dataRef;
2495    const initialRef = React17.useRef(false);
2496    const cleanupListenerRef = React17.useRef(null);
2497    const [pointerType, setPointerType] = React17.useState();
2498    const [reactive, setReactive] = React17.useState([]);
2499    const resetReference = useStableCallback((reference2) => {
2500      store2.set("positionReference", reference2);
2501    });
2502    const setReference = useStableCallback((newX, newY, referenceElement) => {
2503      if (initialRef.current) {
2504        return;
2505      }
2506      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2507        return;
2508      }
2509      store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2510        x: newX,
2511        y: newY,
2512        axis,
2513        dataRef,
2514        pointerType
2515      }));
2516    });
2517    const handleReferenceEnterOrMove = useStableCallback((event) => {
2518      if (!open) {
2519        setReference(event.clientX, event.clientY, event.currentTarget);
2520      } else if (!cleanupListenerRef.current) {
2521        setReference(event.clientX, event.clientY, event.currentTarget);
2522        setReactive([]);
2523      }
2524    });
2525    const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
2526    React17.useEffect(() => {
2527      if (!enabled) {
2528        resetReference(domReference);
2529        return void 0;
2530      }
2531      if (!openCheck) {
2532        return void 0;
2533      }
2534      function cleanupListener() {
2535        cleanupListenerRef.current?.();
2536        cleanupListenerRef.current = null;
2537      }
2538      const win = getWindow(floating);
2539      function handleMouseMove(event) {
2540        const target = getTarget(event);
2541        if (!contains(floating, target)) {
2542          setReference(event.clientX, event.clientY);
2543        } else {
2544          cleanupListener();
2545        }
2546      }
2547      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2548        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2549      } else {
2550        resetReference(domReference);
2551      }
2552      return cleanupListener;
2553    }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
2554    React17.useEffect(() => () => {
2555      store2.set("positionReference", null);
2556    }, [store2]);
2557    React17.useEffect(() => {
2558      if (enabled && !floating) {
2559        initialRef.current = false;
2560      }
2561    }, [enabled, floating]);
2562    React17.useEffect(() => {
2563      if (!enabled && open) {
2564        initialRef.current = true;
2565      }
2566    }, [enabled, open]);
2567    const reference = React17.useMemo(() => {
2568      function setPointerTypeRef(event) {
2569        setPointerType(event.pointerType);
2570      }
2571      return {
2572        onPointerDown: setPointerTypeRef,
2573        onPointerEnter: setPointerTypeRef,
2574        onMouseMove: handleReferenceEnterOrMove,
2575        onMouseEnter: handleReferenceEnterOrMove
2576      };
2577    }, [handleReferenceEnterOrMove]);
2578    return React17.useMemo(() => enabled ? {
2579      reference,
2580      trigger: reference
2581    } : {}, [enabled, reference]);
2582  }
2583  
2584  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js
2585  var React18 = __toESM(require_react(), 1);
2586  var bubbleHandlerKeys = {
2587    intentional: "onClick",
2588    sloppy: "onPointerDown"
2589  };
2590  function alwaysFalse() {
2591    return false;
2592  }
2593  function normalizeProp(normalizable) {
2594    return {
2595      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2596      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2597    };
2598  }
2599  function useDismiss(context, props = {}) {
2600    const {
2601      enabled = true,
2602      escapeKey: escapeKey2 = true,
2603      outsidePress: outsidePressProp = true,
2604      outsidePressEvent = "sloppy",
2605      referencePress = alwaysFalse,
2606      referencePressEvent = "sloppy",
2607      bubbles,
2608      externalTree
2609    } = props;
2610    const store2 = "rootStore" in context ? context.rootStore : context;
2611    const open = store2.useState("open");
2612    const floatingElement = store2.useState("floatingElement");
2613    const {
2614      dataRef
2615    } = store2.context;
2616    const tree = useFloatingTree(externalTree);
2617    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2618    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2619    const outsidePressEnabled = outsidePress2 !== false;
2620    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2621    const {
2622      escapeKey: escapeKeyBubbles,
2623      outsidePress: outsidePressBubbles
2624    } = normalizeProp(bubbles);
2625    const pressStartedInsideRef = React18.useRef(false);
2626    const pressStartPreventedRef = React18.useRef(false);
2627    const suppressNextOutsideClickRef = React18.useRef(false);
2628    const isComposingRef = React18.useRef(false);
2629    const currentPointerTypeRef = React18.useRef("");
2630    const touchStateRef = React18.useRef(null);
2631    const cancelDismissOnEndTimeout = useTimeout();
2632    const clearInsideReactTreeTimeout = useTimeout();
2633    const clearInsideReactTree = useStableCallback(() => {
2634      clearInsideReactTreeTimeout.clear();
2635      dataRef.current.insideReactTree = false;
2636    });
2637    const hasBlockingChild = useStableCallback((bubbleKey) => {
2638      const nodeId = dataRef.current.floatingContext?.nodeId;
2639      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2640      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2641    });
2642    const isEventWithinOwnElements = useStableCallback((event) => {
2643      return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
2644    });
2645    const closeOnReferencePress = useStableCallback((event) => {
2646      if (!referencePress()) {
2647        return;
2648      }
2649      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2650    });
2651    const closeOnEscapeKeyDown = useStableCallback((event) => {
2652      if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
2653        return;
2654      }
2655      if (isComposingRef.current) {
2656        return;
2657      }
2658      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2659        return;
2660      }
2661      const native = isReactEvent(event) ? event.nativeEvent : event;
2662      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2663      store2.setOpen(false, eventDetails);
2664      if (!eventDetails.isCanceled) {
2665        event.preventDefault();
2666      }
2667      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2668        event.stopPropagation();
2669      }
2670    });
2671    const markInsideReactTree = useStableCallback(() => {
2672      dataRef.current.insideReactTree = true;
2673      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2674    });
2675    const markPressStartedInsideReactTree = useStableCallback((event) => {
2676      if (!open || !enabled || event.button !== 0) {
2677        return;
2678      }
2679      const target = getTarget(event.nativeEvent);
2680      if (!contains(store2.select("floatingElement"), target)) {
2681        return;
2682      }
2683      if (!pressStartedInsideRef.current) {
2684        pressStartedInsideRef.current = true;
2685        pressStartPreventedRef.current = false;
2686      }
2687    });
2688    const markInsidePressStartPrevented = useStableCallback((event) => {
2689      if (!open || !enabled) {
2690        return;
2691      }
2692      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2693        return;
2694      }
2695      if (pressStartedInsideRef.current) {
2696        pressStartPreventedRef.current = true;
2697      }
2698    });
2699    React18.useEffect(() => {
2700      if (!open || !enabled) {
2701        return void 0;
2702      }
2703      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2704      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2705      const compositionTimeout = new Timeout();
2706      const preventedPressSuppressionTimeout = new Timeout();
2707      function handleCompositionStart() {
2708        compositionTimeout.clear();
2709        isComposingRef.current = true;
2710      }
2711      function handleCompositionEnd() {
2712        compositionTimeout.start(
2713          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2714          // Only apply to WebKit for the test to remain 0ms.
2715          isWebKit() ? 5 : 0,
2716          () => {
2717            isComposingRef.current = false;
2718          }
2719        );
2720      }
2721      function suppressImmediateOutsideClickAfterPreventedStart() {
2722        suppressNextOutsideClickRef.current = true;
2723        preventedPressSuppressionTimeout.start(0, () => {
2724          suppressNextOutsideClickRef.current = false;
2725        });
2726      }
2727      function resetPressStartState() {
2728        pressStartedInsideRef.current = false;
2729        pressStartPreventedRef.current = false;
2730      }
2731      function getOutsidePressEvent() {
2732        const type = currentPointerTypeRef.current;
2733        const computedType = type === "pen" || !type ? "mouse" : type;
2734        const outsidePressEventValue = getOutsidePressEventProp();
2735        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2736        if (typeof resolved === "string") {
2737          return resolved;
2738        }
2739        return resolved[computedType];
2740      }
2741      function shouldIgnoreEvent(event) {
2742        const computedOutsidePressEvent = getOutsidePressEvent();
2743        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2744      }
2745      function isEventWithinFloatingTree(event) {
2746        const nodeId = dataRef.current.floatingContext?.nodeId;
2747        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2748        return isEventWithinOwnElements(event) || targetIsInsideChildren;
2749      }
2750      function closeOnPressOutside(event) {
2751        if (shouldIgnoreEvent(event)) {
2752          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2753            preventedPressSuppressionTimeout.clear();
2754            suppressNextOutsideClickRef.current = false;
2755          }
2756          clearInsideReactTree();
2757          return;
2758        }
2759        if (dataRef.current.insideReactTree) {
2760          clearInsideReactTree();
2761          return;
2762        }
2763        const target = getTarget(event);
2764        const inertSelector = `[$createAttribute("inert")}]`;
2765        const targetRoot = isElement(target) ? target.getRootNode() : null;
2766        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
2767        const triggers = store2.context.triggerElements;
2768        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
2769          return;
2770        }
2771        let targetRootAncestor = isElement(target) ? target : null;
2772        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
2773          const nextParent = getParentNode(targetRootAncestor);
2774          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
2775            break;
2776          }
2777          targetRootAncestor = nextParent;
2778        }
2779        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2780        !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
2781        // element was injected after the floating element rendered.
2782        markers.every((marker) => !contains(targetRootAncestor, marker))) {
2783          return;
2784        }
2785        if (isHTMLElement(target) && !("touches" in event)) {
2786          const lastTraversableNode = isLastTraversableNode(target);
2787          const style = getComputedStyle2(target);
2788          const scrollRe = /auto|scroll/;
2789          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
2790          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
2791          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
2792          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
2793          const isRTL6 = style.direction === "rtl";
2794          const pressedVerticalScrollbar = canScrollY && (isRTL6 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
2795          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
2796          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
2797            return;
2798          }
2799        }
2800        if (isEventWithinFloatingTree(event)) {
2801          return;
2802        }
2803        if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
2804          preventedPressSuppressionTimeout.clear();
2805          suppressNextOutsideClickRef.current = false;
2806          return;
2807        }
2808        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
2809          return;
2810        }
2811        if (hasBlockingChild("__outsidePressBubbles")) {
2812          return;
2813        }
2814        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
2815        clearInsideReactTree();
2816      }
2817      function handlePointerDown(event) {
2818        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
2819          return;
2820        }
2821        closeOnPressOutside(event);
2822      }
2823      function handleTouchStart(event) {
2824        if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
2825          return;
2826        }
2827        const touch = event.touches[0];
2828        if (touch) {
2829          touchStateRef.current = {
2830            startTime: Date.now(),
2831            startX: touch.clientX,
2832            startY: touch.clientY,
2833            dismissOnTouchEnd: false,
2834            dismissOnMouseDown: true
2835          };
2836          cancelDismissOnEndTimeout.start(1e3, () => {
2837            if (touchStateRef.current) {
2838              touchStateRef.current.dismissOnTouchEnd = false;
2839              touchStateRef.current.dismissOnMouseDown = false;
2840            }
2841          });
2842        }
2843      }
2844      function addTargetEventListenerOnce(event, listener) {
2845        const target = getTarget(event);
2846        if (!target) {
2847          return;
2848        }
2849        const unsubscribe2 = addEventListener(target, event.type, () => {
2850          listener(event);
2851          unsubscribe2();
2852        });
2853      }
2854      function handleTouchStartCapture(event) {
2855        currentPointerTypeRef.current = "touch";
2856        addTargetEventListenerOnce(event, handleTouchStart);
2857      }
2858      function closeOnPressOutsideCapture(event) {
2859        cancelDismissOnEndTimeout.clear();
2860        if (event.type === "pointerdown") {
2861          currentPointerTypeRef.current = event.pointerType;
2862        }
2863        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
2864          return;
2865        }
2866        addTargetEventListenerOnce(event, (targetEvent) => {
2867          if (targetEvent.type === "pointerdown") {
2868            handlePointerDown(targetEvent);
2869          } else {
2870            closeOnPressOutside(targetEvent);
2871          }
2872        });
2873      }
2874      function handlePressEndCapture(event) {
2875        if (!pressStartedInsideRef.current) {
2876          return;
2877        }
2878        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
2879        resetPressStartState();
2880        if (getOutsidePressEvent() !== "intentional") {
2881          return;
2882        }
2883        if (event.type === "pointercancel") {
2884          if (pressStartedInsideDefaultPrevented) {
2885            suppressImmediateOutsideClickAfterPreventedStart();
2886          }
2887          return;
2888        }
2889        if (isEventWithinFloatingTree(event)) {
2890          return;
2891        }
2892        if (pressStartedInsideDefaultPrevented) {
2893          suppressImmediateOutsideClickAfterPreventedStart();
2894          return;
2895        }
2896        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
2897          return;
2898        }
2899        preventedPressSuppressionTimeout.clear();
2900        suppressNextOutsideClickRef.current = true;
2901        clearInsideReactTree();
2902      }
2903      function handleTouchMove(event) {
2904        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
2905          return;
2906        }
2907        const touch = event.touches[0];
2908        if (!touch) {
2909          return;
2910        }
2911        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
2912        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
2913        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
2914        if (distance > 5) {
2915          touchStateRef.current.dismissOnTouchEnd = true;
2916        }
2917        if (distance > 10) {
2918          closeOnPressOutside(event);
2919          cancelDismissOnEndTimeout.clear();
2920          touchStateRef.current = null;
2921        }
2922      }
2923      function handleTouchMoveCapture(event) {
2924        addTargetEventListenerOnce(event, handleTouchMove);
2925      }
2926      function handleTouchEnd(event) {
2927        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
2928          return;
2929        }
2930        if (touchStateRef.current.dismissOnTouchEnd) {
2931          closeOnPressOutside(event);
2932        }
2933        cancelDismissOnEndTimeout.clear();
2934        touchStateRef.current = null;
2935      }
2936      function handleTouchEndCapture(event) {
2937        addTargetEventListenerOnce(event, handleTouchEnd);
2938      }
2939      const doc = ownerDocument(floatingElement);
2940      const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, true), addEventListener(doc, "touchmove", handleTouchMoveCapture, true), addEventListener(doc, "touchend", handleTouchEndCapture, true)));
2941      return () => {
2942        unsubscribe();
2943        compositionTimeout.clear();
2944        preventedPressSuppressionTimeout.clear();
2945        resetPressStartState();
2946        suppressNextOutsideClickRef.current = false;
2947      };
2948    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
2949    React18.useEffect(clearInsideReactTree, [outsidePress2, clearInsideReactTree]);
2950    const reference = React18.useMemo(() => ({
2951      onKeyDown: closeOnEscapeKeyDown,
2952      [bubbleHandlerKeys[referencePressEvent]]: closeOnReferencePress,
2953      ...referencePressEvent !== "intentional" && {
2954        onClick: closeOnReferencePress
2955      }
2956    }), [closeOnEscapeKeyDown, closeOnReferencePress, referencePressEvent]);
2957    const floating = React18.useMemo(() => ({
2958      onKeyDown: closeOnEscapeKeyDown,
2959      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
2960      // `onPointerDown`, such as with <NumberField.ScrubArea>.
2961      // See https://github.com/mui/base-ui/pull/3379
2962      onPointerDown: markInsidePressStartPrevented,
2963      onMouseDown: markInsidePressStartPrevented,
2964      onClickCapture: markInsideReactTree,
2965      onMouseDownCapture(event) {
2966        markInsideReactTree();
2967        markPressStartedInsideReactTree(event);
2968      },
2969      onPointerDownCapture(event) {
2970        markInsideReactTree();
2971        markPressStartedInsideReactTree(event);
2972      },
2973      onMouseUpCapture: markInsideReactTree,
2974      onTouchEndCapture: markInsideReactTree,
2975      onTouchMoveCapture: markInsideReactTree
2976    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
2977    return React18.useMemo(() => enabled ? {
2978      reference,
2979      floating,
2980      trigger: reference
2981    } : {}, [enabled, reference, floating]);
2982  }
2983  
2984  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloating.js
2985  var React25 = __toESM(require_react(), 1);
2986  
2987  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
2988  function computeCoordsFromPlacement(_ref, placement, rtl) {
2989    let {
2990      reference,
2991      floating
2992    } = _ref;
2993    const sideAxis = getSideAxis(placement);
2994    const alignmentAxis = getAlignmentAxis(placement);
2995    const alignLength = getAxisLength(alignmentAxis);
2996    const side = getSide(placement);
2997    const isVertical = sideAxis === "y";
2998    const commonX = reference.x + reference.width / 2 - floating.width / 2;
2999    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3000    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3001    let coords;
3002    switch (side) {
3003      case "top":
3004        coords = {
3005          x: commonX,
3006          y: reference.y - floating.height
3007        };
3008        break;
3009      case "bottom":
3010        coords = {
3011          x: commonX,
3012          y: reference.y + reference.height
3013        };
3014        break;
3015      case "right":
3016        coords = {
3017          x: reference.x + reference.width,
3018          y: commonY
3019        };
3020        break;
3021      case "left":
3022        coords = {
3023          x: reference.x - floating.width,
3024          y: commonY
3025        };
3026        break;
3027      default:
3028        coords = {
3029          x: reference.x,
3030          y: reference.y
3031        };
3032    }
3033    switch (getAlignment(placement)) {
3034      case "start":
3035        coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
3036        break;
3037      case "end":
3038        coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
3039        break;
3040    }
3041    return coords;
3042  }
3043  async function detectOverflow(state, options) {
3044    var _await$platform$isEle;
3045    if (options === void 0) {
3046      options = {};
3047    }
3048    const {
3049      x,
3050      y,
3051      platform: platform3,
3052      rects,
3053      elements,
3054      strategy
3055    } = state;
3056    const {
3057      boundary = "clippingAncestors",
3058      rootBoundary = "viewport",
3059      elementContext = "floating",
3060      altBoundary = false,
3061      padding = 0
3062    } = evaluate(options, state);
3063    const paddingObject = getPaddingObject(padding);
3064    const altContext = elementContext === "floating" ? "reference" : "floating";
3065    const element = elements[altBoundary ? altContext : elementContext];
3066    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3067      element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements.floating)),
3068      boundary,
3069      rootBoundary,
3070      strategy
3071    }));
3072    const rect = elementContext === "floating" ? {
3073      x,
3074      y,
3075      width: rects.floating.width,
3076      height: rects.floating.height
3077    } : rects.reference;
3078    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3079    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) ? await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3080      x: 1,
3081      y: 1
3082    } : {
3083      x: 1,
3084      y: 1
3085    };
3086    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3087      elements,
3088      rect,
3089      offsetParent,
3090      strategy
3091    }) : rect);
3092    return {
3093      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3094      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3095      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3096      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3097    };
3098  }
3099  var MAX_RESET_COUNT = 50;
3100  var computePosition = async (reference, floating, config) => {
3101    const {
3102      placement = "bottom",
3103      strategy = "absolute",
3104      middleware = [],
3105      platform: platform3
3106    } = config;
3107    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3108      ...platform3,
3109      detectOverflow
3110    };
3111    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3112    let rects = await platform3.getElementRects({
3113      reference,
3114      floating,
3115      strategy
3116    });
3117    let {
3118      x,
3119      y
3120    } = computeCoordsFromPlacement(rects, placement, rtl);
3121    let statefulPlacement = placement;
3122    let resetCount = 0;
3123    const middlewareData = {};
3124    for (let i = 0; i < middleware.length; i++) {
3125      const currentMiddleware = middleware[i];
3126      if (!currentMiddleware) {
3127        continue;
3128      }
3129      const {
3130        name,
3131        fn
3132      } = currentMiddleware;
3133      const {
3134        x: nextX,
3135        y: nextY,
3136        data,
3137        reset
3138      } = await fn({
3139        x,
3140        y,
3141        initialPlacement: placement,
3142        placement: statefulPlacement,
3143        strategy,
3144        middlewareData,
3145        rects,
3146        platform: platformWithDetectOverflow,
3147        elements: {
3148          reference,
3149          floating
3150        }
3151      });
3152      x = nextX != null ? nextX : x;
3153      y = nextY != null ? nextY : y;
3154      middlewareData[name] = {
3155        ...middlewareData[name],
3156        ...data
3157      };
3158      if (reset && resetCount < MAX_RESET_COUNT) {
3159        resetCount++;
3160        if (typeof reset === "object") {
3161          if (reset.placement) {
3162            statefulPlacement = reset.placement;
3163          }
3164          if (reset.rects) {
3165            rects = reset.rects === true ? await platform3.getElementRects({
3166              reference,
3167              floating,
3168              strategy
3169            }) : reset.rects;
3170          }
3171          ({
3172            x,
3173            y
3174          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3175        }
3176        i = -1;
3177      }
3178    }
3179    return {
3180      x,
3181      y,
3182      placement: statefulPlacement,
3183      strategy,
3184      middlewareData
3185    };
3186  };
3187  var flip = function(options) {
3188    if (options === void 0) {
3189      options = {};
3190    }
3191    return {
3192      name: "flip",
3193      options,
3194      async fn(state) {
3195        var _middlewareData$arrow, _middlewareData$flip;
3196        const {
3197          placement,
3198          middlewareData,
3199          rects,
3200          initialPlacement,
3201          platform: platform3,
3202          elements
3203        } = state;
3204        const {
3205          mainAxis: checkMainAxis = true,
3206          crossAxis: checkCrossAxis = true,
3207          fallbackPlacements: specifiedFallbackPlacements,
3208          fallbackStrategy = "bestFit",
3209          fallbackAxisSideDirection = "none",
3210          flipAlignment = true,
3211          ...detectOverflowOptions
3212        } = evaluate(options, state);
3213        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3214          return {};
3215        }
3216        const side = getSide(placement);
3217        const initialSideAxis = getSideAxis(initialPlacement);
3218        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3219        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3220        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3221        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3222        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3223          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3224        }
3225        const placements2 = [initialPlacement, ...fallbackPlacements];
3226        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3227        const overflows = [];
3228        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3229        if (checkMainAxis) {
3230          overflows.push(overflow[side]);
3231        }
3232        if (checkCrossAxis) {
3233          const sides2 = getAlignmentSides(placement, rects, rtl);
3234          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3235        }
3236        overflowsData = [...overflowsData, {
3237          placement,
3238          overflows
3239        }];
3240        if (!overflows.every((side2) => side2 <= 0)) {
3241          var _middlewareData$flip2, _overflowsData$filter;
3242          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3243          const nextPlacement = placements2[nextIndex];
3244          if (nextPlacement) {
3245            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3246            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3247            // overflows the main axis.
3248            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3249              return {
3250                data: {
3251                  index: nextIndex,
3252                  overflows: overflowsData
3253                },
3254                reset: {
3255                  placement: nextPlacement
3256                }
3257              };
3258            }
3259          }
3260          let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3261          if (!resetPlacement) {
3262            switch (fallbackStrategy) {
3263              case "bestFit": {
3264                var _overflowsData$filter2;
3265                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3266                  if (hasFallbackAxisSideDirection) {
3267                    const currentSideAxis = getSideAxis(d.placement);
3268                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3269                    // reading directions favoring greater width.
3270                    currentSideAxis === "y";
3271                  }
3272                  return true;
3273                }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
3274                if (placement2) {
3275                  resetPlacement = placement2;
3276                }
3277                break;
3278              }
3279              case "initialPlacement":
3280                resetPlacement = initialPlacement;
3281                break;
3282            }
3283          }
3284          if (placement !== resetPlacement) {
3285            return {
3286              reset: {
3287                placement: resetPlacement
3288              }
3289            };
3290          }
3291        }
3292        return {};
3293      }
3294    };
3295  };
3296  function getSideOffsets(overflow, rect) {
3297    return {
3298      top: overflow.top - rect.height,
3299      right: overflow.right - rect.width,
3300      bottom: overflow.bottom - rect.height,
3301      left: overflow.left - rect.width
3302    };
3303  }
3304  function isAnySideFullyClipped(overflow) {
3305    return sides.some((side) => overflow[side] >= 0);
3306  }
3307  var hide = function(options) {
3308    if (options === void 0) {
3309      options = {};
3310    }
3311    return {
3312      name: "hide",
3313      options,
3314      async fn(state) {
3315        const {
3316          rects,
3317          platform: platform3
3318        } = state;
3319        const {
3320          strategy = "referenceHidden",
3321          ...detectOverflowOptions
3322        } = evaluate(options, state);
3323        switch (strategy) {
3324          case "referenceHidden": {
3325            const overflow = await platform3.detectOverflow(state, {
3326              ...detectOverflowOptions,
3327              elementContext: "reference"
3328            });
3329            const offsets = getSideOffsets(overflow, rects.reference);
3330            return {
3331              data: {
3332                referenceHiddenOffsets: offsets,
3333                referenceHidden: isAnySideFullyClipped(offsets)
3334              }
3335            };
3336          }
3337          case "escaped": {
3338            const overflow = await platform3.detectOverflow(state, {
3339              ...detectOverflowOptions,
3340              altBoundary: true
3341            });
3342            const offsets = getSideOffsets(overflow, rects.floating);
3343            return {
3344              data: {
3345                escapedOffsets: offsets,
3346                escaped: isAnySideFullyClipped(offsets)
3347              }
3348            };
3349          }
3350          default: {
3351            return {};
3352          }
3353        }
3354      }
3355    };
3356  };
3357  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3358  async function convertValueToCoords(state, options) {
3359    const {
3360      placement,
3361      platform: platform3,
3362      elements
3363    } = state;
3364    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3365    const side = getSide(placement);
3366    const alignment = getAlignment(placement);
3367    const isVertical = getSideAxis(placement) === "y";
3368    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3369    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3370    const rawValue = evaluate(options, state);
3371    let {
3372      mainAxis,
3373      crossAxis,
3374      alignmentAxis
3375    } = typeof rawValue === "number" ? {
3376      mainAxis: rawValue,
3377      crossAxis: 0,
3378      alignmentAxis: null
3379    } : {
3380      mainAxis: rawValue.mainAxis || 0,
3381      crossAxis: rawValue.crossAxis || 0,
3382      alignmentAxis: rawValue.alignmentAxis
3383    };
3384    if (alignment && typeof alignmentAxis === "number") {
3385      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3386    }
3387    return isVertical ? {
3388      x: crossAxis * crossAxisMulti,
3389      y: mainAxis * mainAxisMulti
3390    } : {
3391      x: mainAxis * mainAxisMulti,
3392      y: crossAxis * crossAxisMulti
3393    };
3394  }
3395  var offset = function(options) {
3396    if (options === void 0) {
3397      options = 0;
3398    }
3399    return {
3400      name: "offset",
3401      options,
3402      async fn(state) {
3403        var _middlewareData$offse, _middlewareData$arrow;
3404        const {
3405          x,
3406          y,
3407          placement,
3408          middlewareData
3409        } = state;
3410        const diffCoords = await convertValueToCoords(state, options);
3411        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3412          return {};
3413        }
3414        return {
3415          x: x + diffCoords.x,
3416          y: y + diffCoords.y,
3417          data: {
3418            ...diffCoords,
3419            placement
3420          }
3421        };
3422      }
3423    };
3424  };
3425  var shift = function(options) {
3426    if (options === void 0) {
3427      options = {};
3428    }
3429    return {
3430      name: "shift",
3431      options,
3432      async fn(state) {
3433        const {
3434          x,
3435          y,
3436          placement,
3437          platform: platform3
3438        } = state;
3439        const {
3440          mainAxis: checkMainAxis = true,
3441          crossAxis: checkCrossAxis = false,
3442          limiter = {
3443            fn: (_ref) => {
3444              let {
3445                x: x2,
3446                y: y2
3447              } = _ref;
3448              return {
3449                x: x2,
3450                y: y2
3451              };
3452            }
3453          },
3454          ...detectOverflowOptions
3455        } = evaluate(options, state);
3456        const coords = {
3457          x,
3458          y
3459        };
3460        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3461        const crossAxis = getSideAxis(getSide(placement));
3462        const mainAxis = getOppositeAxis(crossAxis);
3463        let mainAxisCoord = coords[mainAxis];
3464        let crossAxisCoord = coords[crossAxis];
3465        if (checkMainAxis) {
3466          const minSide = mainAxis === "y" ? "top" : "left";
3467          const maxSide = mainAxis === "y" ? "bottom" : "right";
3468          const min2 = mainAxisCoord + overflow[minSide];
3469          const max2 = mainAxisCoord - overflow[maxSide];
3470          mainAxisCoord = clamp(min2, mainAxisCoord, max2);
3471        }
3472        if (checkCrossAxis) {
3473          const minSide = crossAxis === "y" ? "top" : "left";
3474          const maxSide = crossAxis === "y" ? "bottom" : "right";
3475          const min2 = crossAxisCoord + overflow[minSide];
3476          const max2 = crossAxisCoord - overflow[maxSide];
3477          crossAxisCoord = clamp(min2, crossAxisCoord, max2);
3478        }
3479        const limitedCoords = limiter.fn({
3480          ...state,
3481          [mainAxis]: mainAxisCoord,
3482          [crossAxis]: crossAxisCoord
3483        });
3484        return {
3485          ...limitedCoords,
3486          data: {
3487            x: limitedCoords.x - x,
3488            y: limitedCoords.y - y,
3489            enabled: {
3490              [mainAxis]: checkMainAxis,
3491              [crossAxis]: checkCrossAxis
3492            }
3493          }
3494        };
3495      }
3496    };
3497  };
3498  var limitShift = function(options) {
3499    if (options === void 0) {
3500      options = {};
3501    }
3502    return {
3503      options,
3504      fn(state) {
3505        const {
3506          x,
3507          y,
3508          placement,
3509          rects,
3510          middlewareData
3511        } = state;
3512        const {
3513          offset: offset4 = 0,
3514          mainAxis: checkMainAxis = true,
3515          crossAxis: checkCrossAxis = true
3516        } = evaluate(options, state);
3517        const coords = {
3518          x,
3519          y
3520        };
3521        const crossAxis = getSideAxis(placement);
3522        const mainAxis = getOppositeAxis(crossAxis);
3523        let mainAxisCoord = coords[mainAxis];
3524        let crossAxisCoord = coords[crossAxis];
3525        const rawOffset = evaluate(offset4, state);
3526        const computedOffset = typeof rawOffset === "number" ? {
3527          mainAxis: rawOffset,
3528          crossAxis: 0
3529        } : {
3530          mainAxis: 0,
3531          crossAxis: 0,
3532          ...rawOffset
3533        };
3534        if (checkMainAxis) {
3535          const len = mainAxis === "y" ? "height" : "width";
3536          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3537          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3538          if (mainAxisCoord < limitMin) {
3539            mainAxisCoord = limitMin;
3540          } else if (mainAxisCoord > limitMax) {
3541            mainAxisCoord = limitMax;
3542          }
3543        }
3544        if (checkCrossAxis) {
3545          var _middlewareData$offse, _middlewareData$offse2;
3546          const len = mainAxis === "y" ? "width" : "height";
3547          const isOriginSide = originSides.has(getSide(placement));
3548          const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
3549          const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
3550          if (crossAxisCoord < limitMin) {
3551            crossAxisCoord = limitMin;
3552          } else if (crossAxisCoord > limitMax) {
3553            crossAxisCoord = limitMax;
3554          }
3555        }
3556        return {
3557          [mainAxis]: mainAxisCoord,
3558          [crossAxis]: crossAxisCoord
3559        };
3560      }
3561    };
3562  };
3563  var size = function(options) {
3564    if (options === void 0) {
3565      options = {};
3566    }
3567    return {
3568      name: "size",
3569      options,
3570      async fn(state) {
3571        var _state$middlewareData, _state$middlewareData2;
3572        const {
3573          placement,
3574          rects,
3575          platform: platform3,
3576          elements
3577        } = state;
3578        const {
3579          apply = () => {
3580          },
3581          ...detectOverflowOptions
3582        } = evaluate(options, state);
3583        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3584        const side = getSide(placement);
3585        const alignment = getAlignment(placement);
3586        const isYAxis = getSideAxis(placement) === "y";
3587        const {
3588          width,
3589          height
3590        } = rects.floating;
3591        let heightSide;
3592        let widthSide;
3593        if (side === "top" || side === "bottom") {
3594          heightSide = side;
3595          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3596        } else {
3597          widthSide = side;
3598          heightSide = alignment === "end" ? "top" : "bottom";
3599        }
3600        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3601        const maximumClippingWidth = width - overflow.left - overflow.right;
3602        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3603        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3604        const noShift = !state.middlewareData.shift;
3605        let availableHeight = overflowAvailableHeight;
3606        let availableWidth = overflowAvailableWidth;
3607        if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
3608          availableWidth = maximumClippingWidth;
3609        }
3610        if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
3611          availableHeight = maximumClippingHeight;
3612        }
3613        if (noShift && !alignment) {
3614          const xMin = max(overflow.left, 0);
3615          const xMax = max(overflow.right, 0);
3616          const yMin = max(overflow.top, 0);
3617          const yMax = max(overflow.bottom, 0);
3618          if (isYAxis) {
3619            availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
3620          } else {
3621            availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
3622          }
3623        }
3624        await apply({
3625          ...state,
3626          availableWidth,
3627          availableHeight
3628        });
3629        const nextDimensions = await platform3.getDimensions(elements.floating);
3630        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3631          return {
3632            reset: {
3633              rects: true
3634            }
3635          };
3636        }
3637        return {};
3638      }
3639    };
3640  };
3641  
3642  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3643  function getCssDimensions(element) {
3644    const css = getComputedStyle2(element);
3645    let width = parseFloat(css.width) || 0;
3646    let height = parseFloat(css.height) || 0;
3647    const hasOffset = isHTMLElement(element);
3648    const offsetWidth = hasOffset ? element.offsetWidth : width;
3649    const offsetHeight = hasOffset ? element.offsetHeight : height;
3650    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3651    if (shouldFallback) {
3652      width = offsetWidth;
3653      height = offsetHeight;
3654    }
3655    return {
3656      width,
3657      height,
3658      $: shouldFallback
3659    };
3660  }
3661  function unwrapElement(element) {
3662    return !isElement(element) ? element.contextElement : element;
3663  }
3664  function getScale(element) {
3665    const domElement = unwrapElement(element);
3666    if (!isHTMLElement(domElement)) {
3667      return createCoords(1);
3668    }
3669    const rect = domElement.getBoundingClientRect();
3670    const {
3671      width,
3672      height,
3673      $
3674    } = getCssDimensions(domElement);
3675    let x = ($ ? round(rect.width) : rect.width) / width;
3676    let y = ($ ? round(rect.height) : rect.height) / height;
3677    if (!x || !Number.isFinite(x)) {
3678      x = 1;
3679    }
3680    if (!y || !Number.isFinite(y)) {
3681      y = 1;
3682    }
3683    return {
3684      x,
3685      y
3686    };
3687  }
3688  var noOffsets = /* @__PURE__ */ createCoords(0);
3689  function getVisualOffsets(element) {
3690    const win = getWindow(element);
3691    if (!isWebKit() || !win.visualViewport) {
3692      return noOffsets;
3693    }
3694    return {
3695      x: win.visualViewport.offsetLeft,
3696      y: win.visualViewport.offsetTop
3697    };
3698  }
3699  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3700    if (isFixed === void 0) {
3701      isFixed = false;
3702    }
3703    if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
3704      return false;
3705    }
3706    return isFixed;
3707  }
3708  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3709    if (includeScale === void 0) {
3710      includeScale = false;
3711    }
3712    if (isFixedStrategy === void 0) {
3713      isFixedStrategy = false;
3714    }
3715    const clientRect = element.getBoundingClientRect();
3716    const domElement = unwrapElement(element);
3717    let scale = createCoords(1);
3718    if (includeScale) {
3719      if (offsetParent) {
3720        if (isElement(offsetParent)) {
3721          scale = getScale(offsetParent);
3722        }
3723      } else {
3724        scale = getScale(element);
3725      }
3726    }
3727    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3728    let x = (clientRect.left + visualOffsets.x) / scale.x;
3729    let y = (clientRect.top + visualOffsets.y) / scale.y;
3730    let width = clientRect.width / scale.x;
3731    let height = clientRect.height / scale.y;
3732    if (domElement) {
3733      const win = getWindow(domElement);
3734      const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
3735      let currentWin = win;
3736      let currentIFrame = getFrameElement(currentWin);
3737      while (currentIFrame && offsetParent && offsetWin !== currentWin) {
3738        const iframeScale = getScale(currentIFrame);
3739        const iframeRect = currentIFrame.getBoundingClientRect();
3740        const css = getComputedStyle2(currentIFrame);
3741        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
3742        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
3743        x *= iframeScale.x;
3744        y *= iframeScale.y;
3745        width *= iframeScale.x;
3746        height *= iframeScale.y;
3747        x += left;
3748        y += top;
3749        currentWin = getWindow(currentIFrame);
3750        currentIFrame = getFrameElement(currentWin);
3751      }
3752    }
3753    return rectToClientRect({
3754      width,
3755      height,
3756      x,
3757      y
3758    });
3759  }
3760  function getWindowScrollBarX(element, rect) {
3761    const leftScroll = getNodeScroll(element).scrollLeft;
3762    if (!rect) {
3763      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
3764    }
3765    return rect.left + leftScroll;
3766  }
3767  function getHTMLOffset(documentElement, scroll) {
3768    const htmlRect = documentElement.getBoundingClientRect();
3769    const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
3770    const y = htmlRect.top + scroll.scrollTop;
3771    return {
3772      x,
3773      y
3774    };
3775  }
3776  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3777    let {
3778      elements,
3779      rect,
3780      offsetParent,
3781      strategy
3782    } = _ref;
3783    const isFixed = strategy === "fixed";
3784    const documentElement = getDocumentElement(offsetParent);
3785    const topLayer = elements ? isTopLayer(elements.floating) : false;
3786    if (offsetParent === documentElement || topLayer && isFixed) {
3787      return rect;
3788    }
3789    let scroll = {
3790      scrollLeft: 0,
3791      scrollTop: 0
3792    };
3793    let scale = createCoords(1);
3794    const offsets = createCoords(0);
3795    const isOffsetParentAnElement = isHTMLElement(offsetParent);
3796    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
3797      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3798        scroll = getNodeScroll(offsetParent);
3799      }
3800      if (isOffsetParentAnElement) {
3801        const offsetRect = getBoundingClientRect(offsetParent);
3802        scale = getScale(offsetParent);
3803        offsets.x = offsetRect.x + offsetParent.clientLeft;
3804        offsets.y = offsetRect.y + offsetParent.clientTop;
3805      }
3806    }
3807    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3808    return {
3809      width: rect.width * scale.x,
3810      height: rect.height * scale.y,
3811      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
3812      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
3813    };
3814  }
3815  function getClientRects(element) {
3816    return Array.from(element.getClientRects());
3817  }
3818  function getDocumentRect(element) {
3819    const html = getDocumentElement(element);
3820    const scroll = getNodeScroll(element);
3821    const body = element.ownerDocument.body;
3822    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
3823    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
3824    let x = -scroll.scrollLeft + getWindowScrollBarX(element);
3825    const y = -scroll.scrollTop;
3826    if (getComputedStyle2(body).direction === "rtl") {
3827      x += max(html.clientWidth, body.clientWidth) - width;
3828    }
3829    return {
3830      width,
3831      height,
3832      x,
3833      y
3834    };
3835  }
3836  var SCROLLBAR_MAX = 25;
3837  function getViewportRect(element, strategy) {
3838    const win = getWindow(element);
3839    const html = getDocumentElement(element);
3840    const visualViewport = win.visualViewport;
3841    let width = html.clientWidth;
3842    let height = html.clientHeight;
3843    let x = 0;
3844    let y = 0;
3845    if (visualViewport) {
3846      width = visualViewport.width;
3847      height = visualViewport.height;
3848      const visualViewportBased = isWebKit();
3849      if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
3850        x = visualViewport.offsetLeft;
3851        y = visualViewport.offsetTop;
3852      }
3853    }
3854    const windowScrollbarX = getWindowScrollBarX(html);
3855    if (windowScrollbarX <= 0) {
3856      const doc = html.ownerDocument;
3857      const body = doc.body;
3858      const bodyStyles = getComputedStyle(body);
3859      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
3860      const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
3861      if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
3862        width -= clippingStableScrollbarWidth;
3863      }
3864    } else if (windowScrollbarX <= SCROLLBAR_MAX) {
3865      width += windowScrollbarX;
3866    }
3867    return {
3868      width,
3869      height,
3870      x,
3871      y
3872    };
3873  }
3874  function getInnerBoundingClientRect(element, strategy) {
3875    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
3876    const top = clientRect.top + element.clientTop;
3877    const left = clientRect.left + element.clientLeft;
3878    const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
3879    const width = element.clientWidth * scale.x;
3880    const height = element.clientHeight * scale.y;
3881    const x = left * scale.x;
3882    const y = top * scale.y;
3883    return {
3884      width,
3885      height,
3886      x,
3887      y
3888    };
3889  }
3890  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
3891    let rect;
3892    if (clippingAncestor === "viewport") {
3893      rect = getViewportRect(element, strategy);
3894    } else if (clippingAncestor === "document") {
3895      rect = getDocumentRect(getDocumentElement(element));
3896    } else if (isElement(clippingAncestor)) {
3897      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
3898    } else {
3899      const visualOffsets = getVisualOffsets(element);
3900      rect = {
3901        x: clippingAncestor.x - visualOffsets.x,
3902        y: clippingAncestor.y - visualOffsets.y,
3903        width: clippingAncestor.width,
3904        height: clippingAncestor.height
3905      };
3906    }
3907    return rectToClientRect(rect);
3908  }
3909  function hasFixedPositionAncestor(element, stopNode) {
3910    const parentNode = getParentNode(element);
3911    if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
3912      return false;
3913    }
3914    return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
3915  }
3916  function getClippingElementAncestors(element, cache) {
3917    const cachedResult = cache.get(element);
3918    if (cachedResult) {
3919      return cachedResult;
3920    }
3921    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
3922    let currentContainingBlockComputedStyle = null;
3923    const elementIsFixed = getComputedStyle2(element).position === "fixed";
3924    let currentNode = elementIsFixed ? getParentNode(element) : element;
3925    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
3926      const computedStyle = getComputedStyle2(currentNode);
3927      const currentNodeIsContaining = isContainingBlock(currentNode);
3928      if (!currentNodeIsContaining && computedStyle.position === "fixed") {
3929        currentContainingBlockComputedStyle = null;
3930      }
3931      const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
3932      if (shouldDropCurrentNode) {
3933        result = result.filter((ancestor) => ancestor !== currentNode);
3934      } else {
3935        currentContainingBlockComputedStyle = computedStyle;
3936      }
3937      currentNode = getParentNode(currentNode);
3938    }
3939    cache.set(element, result);
3940    return result;
3941  }
3942  function getClippingRect(_ref) {
3943    let {
3944      element,
3945      boundary,
3946      rootBoundary,
3947      strategy
3948    } = _ref;
3949    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
3950    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
3951    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
3952    let top = firstRect.top;
3953    let right = firstRect.right;
3954    let bottom = firstRect.bottom;
3955    let left = firstRect.left;
3956    for (let i = 1; i < clippingAncestors.length; i++) {
3957      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
3958      top = max(rect.top, top);
3959      right = min(rect.right, right);
3960      bottom = min(rect.bottom, bottom);
3961      left = max(rect.left, left);
3962    }
3963    return {
3964      width: right - left,
3965      height: bottom - top,
3966      x: left,
3967      y: top
3968    };
3969  }
3970  function getDimensions(element) {
3971    const {
3972      width,
3973      height
3974    } = getCssDimensions(element);
3975    return {
3976      width,
3977      height
3978    };
3979  }
3980  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
3981    const isOffsetParentAnElement = isHTMLElement(offsetParent);
3982    const documentElement = getDocumentElement(offsetParent);
3983    const isFixed = strategy === "fixed";
3984    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
3985    let scroll = {
3986      scrollLeft: 0,
3987      scrollTop: 0
3988    };
3989    const offsets = createCoords(0);
3990    function setLeftRTLScrollbarOffset() {
3991      offsets.x = getWindowScrollBarX(documentElement);
3992    }
3993    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
3994      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3995        scroll = getNodeScroll(offsetParent);
3996      }
3997      if (isOffsetParentAnElement) {
3998        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
3999        offsets.x = offsetRect.x + offsetParent.clientLeft;
4000        offsets.y = offsetRect.y + offsetParent.clientTop;
4001      } else if (documentElement) {
4002        setLeftRTLScrollbarOffset();
4003      }
4004    }
4005    if (isFixed && !isOffsetParentAnElement && documentElement) {
4006      setLeftRTLScrollbarOffset();
4007    }
4008    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4009    const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4010    const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4011    return {
4012      x,
4013      y,
4014      width: rect.width,
4015      height: rect.height
4016    };
4017  }
4018  function isStaticPositioned(element) {
4019    return getComputedStyle2(element).position === "static";
4020  }
4021  function getTrueOffsetParent(element, polyfill) {
4022    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4023      return null;
4024    }
4025    if (polyfill) {
4026      return polyfill(element);
4027    }
4028    let rawOffsetParent = element.offsetParent;
4029    if (getDocumentElement(element) === rawOffsetParent) {
4030      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4031    }
4032    return rawOffsetParent;
4033  }
4034  function getOffsetParent(element, polyfill) {
4035    const win = getWindow(element);
4036    if (isTopLayer(element)) {
4037      return win;
4038    }
4039    if (!isHTMLElement(element)) {
4040      let svgOffsetParent = getParentNode(element);
4041      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4042        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4043          return svgOffsetParent;
4044        }
4045        svgOffsetParent = getParentNode(svgOffsetParent);
4046      }
4047      return win;
4048    }
4049    let offsetParent = getTrueOffsetParent(element, polyfill);
4050    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4051      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4052    }
4053    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4054      return win;
4055    }
4056    return offsetParent || getContainingBlock(element) || win;
4057  }
4058  var getElementRects = async function(data) {
4059    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4060    const getDimensionsFn = this.getDimensions;
4061    const floatingDimensions = await getDimensionsFn(data.floating);
4062    return {
4063      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4064      floating: {
4065        x: 0,
4066        y: 0,
4067        width: floatingDimensions.width,
4068        height: floatingDimensions.height
4069      }
4070    };
4071  };
4072  function isRTL(element) {
4073    return getComputedStyle2(element).direction === "rtl";
4074  }
4075  var platform2 = {
4076    convertOffsetParentRelativeRectToViewportRelativeRect,
4077    getDocumentElement,
4078    getClippingRect,
4079    getOffsetParent,
4080    getElementRects,
4081    getClientRects,
4082    getDimensions,
4083    getScale,
4084    isElement,
4085    isRTL
4086  };
4087  function rectsAreEqual(a, b) {
4088    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4089  }
4090  function observeMove(element, onMove) {
4091    let io = null;
4092    let timeoutId;
4093    const root = getDocumentElement(element);
4094    function cleanup() {
4095      var _io;
4096      clearTimeout(timeoutId);
4097      (_io = io) == null || _io.disconnect();
4098      io = null;
4099    }
4100    function refresh(skip, threshold) {
4101      if (skip === void 0) {
4102        skip = false;
4103      }
4104      if (threshold === void 0) {
4105        threshold = 1;
4106      }
4107      cleanup();
4108      const elementRectForRootMargin = element.getBoundingClientRect();
4109      const {
4110        left,
4111        top,
4112        width,
4113        height
4114      } = elementRectForRootMargin;
4115      if (!skip) {
4116        onMove();
4117      }
4118      if (!width || !height) {
4119        return;
4120      }
4121      const insetTop = floor(top);
4122      const insetRight = floor(root.clientWidth - (left + width));
4123      const insetBottom = floor(root.clientHeight - (top + height));
4124      const insetLeft = floor(left);
4125      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4126      const options = {
4127        rootMargin,
4128        threshold: max(0, min(1, threshold)) || 1
4129      };
4130      let isFirstUpdate = true;
4131      function handleObserve(entries) {
4132        const ratio = entries[0].intersectionRatio;
4133        if (ratio !== threshold) {
4134          if (!isFirstUpdate) {
4135            return refresh();
4136          }
4137          if (!ratio) {
4138            timeoutId = setTimeout(() => {
4139              refresh(false, 1e-7);
4140            }, 1e3);
4141          } else {
4142            refresh(false, ratio);
4143          }
4144        }
4145        if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4146          refresh();
4147        }
4148        isFirstUpdate = false;
4149      }
4150      try {
4151        io = new IntersectionObserver(handleObserve, {
4152          ...options,
4153          // Handle <iframe>s
4154          root: root.ownerDocument
4155        });
4156      } catch (_e) {
4157        io = new IntersectionObserver(handleObserve, options);
4158      }
4159      io.observe(element);
4160    }
4161    refresh(true);
4162    return cleanup;
4163  }
4164  function autoUpdate(reference, floating, update2, options) {
4165    if (options === void 0) {
4166      options = {};
4167    }
4168    const {
4169      ancestorScroll = true,
4170      ancestorResize = true,
4171      elementResize = typeof ResizeObserver === "function",
4172      layoutShift = typeof IntersectionObserver === "function",
4173      animationFrame = false
4174    } = options;
4175    const referenceEl = unwrapElement(reference);
4176    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4177    ancestors.forEach((ancestor) => {
4178      ancestorScroll && ancestor.addEventListener("scroll", update2, {
4179        passive: true
4180      });
4181      ancestorResize && ancestor.addEventListener("resize", update2);
4182    });
4183    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null;
4184    let reobserveFrame = -1;
4185    let resizeObserver = null;
4186    if (elementResize) {
4187      resizeObserver = new ResizeObserver((_ref) => {
4188        let [firstEntry] = _ref;
4189        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4190          resizeObserver.unobserve(floating);
4191          cancelAnimationFrame(reobserveFrame);
4192          reobserveFrame = requestAnimationFrame(() => {
4193            var _resizeObserver;
4194            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4195          });
4196        }
4197        update2();
4198      });
4199      if (referenceEl && !animationFrame) {
4200        resizeObserver.observe(referenceEl);
4201      }
4202      if (floating) {
4203        resizeObserver.observe(floating);
4204      }
4205    }
4206    let frameId;
4207    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4208    if (animationFrame) {
4209      frameLoop();
4210    }
4211    function frameLoop() {
4212      const nextRefRect = getBoundingClientRect(reference);
4213      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4214        update2();
4215      }
4216      prevRefRect = nextRefRect;
4217      frameId = requestAnimationFrame(frameLoop);
4218    }
4219    update2();
4220    return () => {
4221      var _resizeObserver2;
4222      ancestors.forEach((ancestor) => {
4223        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4224        ancestorResize && ancestor.removeEventListener("resize", update2);
4225      });
4226      cleanupIo == null || cleanupIo();
4227      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4228      resizeObserver = null;
4229      if (animationFrame) {
4230        cancelAnimationFrame(frameId);
4231      }
4232    };
4233  }
4234  var offset2 = offset;
4235  var shift2 = shift;
4236  var flip2 = flip;
4237  var size2 = size;
4238  var hide2 = hide;
4239  var limitShift2 = limitShift;
4240  var computePosition2 = (reference, floating, options) => {
4241    const cache = /* @__PURE__ */ new Map();
4242    const mergedOptions = {
4243      platform: platform2,
4244      ...options
4245    };
4246    const platformWithCache = {
4247      ...mergedOptions.platform,
4248      _c: cache
4249    };
4250    return computePosition(reference, floating, {
4251      ...mergedOptions,
4252      platform: platformWithCache
4253    });
4254  };
4255  
4256  // node_modules/@base-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4257  var React19 = __toESM(require_react(), 1);
4258  var import_react2 = __toESM(require_react(), 1);
4259  var ReactDOM3 = __toESM(require_react_dom(), 1);
4260  var isClient = typeof document !== "undefined";
4261  var noop2 = function noop3() {
4262  };
4263  var index = isClient ? import_react2.useLayoutEffect : noop2;
4264  function deepEqual(a, b) {
4265    if (a === b) {
4266      return true;
4267    }
4268    if (typeof a !== typeof b) {
4269      return false;
4270    }
4271    if (typeof a === "function" && a.toString() === b.toString()) {
4272      return true;
4273    }
4274    let length;
4275    let i;
4276    let keys;
4277    if (a && b && typeof a === "object") {
4278      if (Array.isArray(a)) {
4279        length = a.length;
4280        if (length !== b.length) return false;
4281        for (i = length; i-- !== 0; ) {
4282          if (!deepEqual(a[i], b[i])) {
4283            return false;
4284          }
4285        }
4286        return true;
4287      }
4288      keys = Object.keys(a);
4289      length = keys.length;
4290      if (length !== Object.keys(b).length) {
4291        return false;
4292      }
4293      for (i = length; i-- !== 0; ) {
4294        if (!{}.hasOwnProperty.call(b, keys[i])) {
4295          return false;
4296        }
4297      }
4298      for (i = length; i-- !== 0; ) {
4299        const key = keys[i];
4300        if (key === "_owner" && a.$$typeof) {
4301          continue;
4302        }
4303        if (!deepEqual(a[key], b[key])) {
4304          return false;
4305        }
4306      }
4307      return true;
4308    }
4309    return a !== a && b !== b;
4310  }
4311  function getDPR(element) {
4312    if (typeof window === "undefined") {
4313      return 1;
4314    }
4315    const win = element.ownerDocument.defaultView || window;
4316    return win.devicePixelRatio || 1;
4317  }
4318  function roundByDPR(element, value) {
4319    const dpr = getDPR(element);
4320    return Math.round(value * dpr) / dpr;
4321  }
4322  function useLatestRef(value) {
4323    const ref = React19.useRef(value);
4324    index(() => {
4325      ref.current = value;
4326    });
4327    return ref;
4328  }
4329  function useFloating(options) {
4330    if (options === void 0) {
4331      options = {};
4332    }
4333    const {
4334      placement = "bottom",
4335      strategy = "absolute",
4336      middleware = [],
4337      platform: platform3,
4338      elements: {
4339        reference: externalReference,
4340        floating: externalFloating
4341      } = {},
4342      transform = true,
4343      whileElementsMounted,
4344      open
4345    } = options;
4346    const [data, setData] = React19.useState({
4347      x: 0,
4348      y: 0,
4349      strategy,
4350      placement,
4351      middlewareData: {},
4352      isPositioned: false
4353    });
4354    const [latestMiddleware, setLatestMiddleware] = React19.useState(middleware);
4355    if (!deepEqual(latestMiddleware, middleware)) {
4356      setLatestMiddleware(middleware);
4357    }
4358    const [_reference, _setReference] = React19.useState(null);
4359    const [_floating, _setFloating] = React19.useState(null);
4360    const setReference = React19.useCallback((node) => {
4361      if (node !== referenceRef.current) {
4362        referenceRef.current = node;
4363        _setReference(node);
4364      }
4365    }, []);
4366    const setFloating = React19.useCallback((node) => {
4367      if (node !== floatingRef.current) {
4368        floatingRef.current = node;
4369        _setFloating(node);
4370      }
4371    }, []);
4372    const referenceEl = externalReference || _reference;
4373    const floatingEl = externalFloating || _floating;
4374    const referenceRef = React19.useRef(null);
4375    const floatingRef = React19.useRef(null);
4376    const dataRef = React19.useRef(data);
4377    const hasWhileElementsMounted = whileElementsMounted != null;
4378    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4379    const platformRef = useLatestRef(platform3);
4380    const openRef = useLatestRef(open);
4381    const update2 = React19.useCallback(() => {
4382      if (!referenceRef.current || !floatingRef.current) {
4383        return;
4384      }
4385      const config = {
4386        placement,
4387        strategy,
4388        middleware: latestMiddleware
4389      };
4390      if (platformRef.current) {
4391        config.platform = platformRef.current;
4392      }
4393      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4394        const fullData = {
4395          ...data2,
4396          // The floating element's position may be recomputed while it's closed
4397          // but still mounted (such as when transitioning out). To ensure
4398          // `isPositioned` will be `false` initially on the next open, avoid
4399          // setting it to `true` when `open === false` (must be specified).
4400          isPositioned: openRef.current !== false
4401        };
4402        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4403          dataRef.current = fullData;
4404          ReactDOM3.flushSync(() => {
4405            setData(fullData);
4406          });
4407        }
4408      });
4409    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4410    index(() => {
4411      if (open === false && dataRef.current.isPositioned) {
4412        dataRef.current.isPositioned = false;
4413        setData((data2) => ({
4414          ...data2,
4415          isPositioned: false
4416        }));
4417      }
4418    }, [open]);
4419    const isMountedRef = React19.useRef(false);
4420    index(() => {
4421      isMountedRef.current = true;
4422      return () => {
4423        isMountedRef.current = false;
4424      };
4425    }, []);
4426    index(() => {
4427      if (referenceEl) referenceRef.current = referenceEl;
4428      if (floatingEl) floatingRef.current = floatingEl;
4429      if (referenceEl && floatingEl) {
4430        if (whileElementsMountedRef.current) {
4431          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4432        }
4433        update2();
4434      }
4435    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4436    const refs = React19.useMemo(() => ({
4437      reference: referenceRef,
4438      floating: floatingRef,
4439      setReference,
4440      setFloating
4441    }), [setReference, setFloating]);
4442    const elements = React19.useMemo(() => ({
4443      reference: referenceEl,
4444      floating: floatingEl
4445    }), [referenceEl, floatingEl]);
4446    const floatingStyles = React19.useMemo(() => {
4447      const initialStyles = {
4448        position: strategy,
4449        left: 0,
4450        top: 0
4451      };
4452      if (!elements.floating) {
4453        return initialStyles;
4454      }
4455      const x = roundByDPR(elements.floating, data.x);
4456      const y = roundByDPR(elements.floating, data.y);
4457      if (transform) {
4458        return {
4459          ...initialStyles,
4460          transform: "translate(" + x + "px, " + y + "px)",
4461          ...getDPR(elements.floating) >= 1.5 && {
4462            willChange: "transform"
4463          }
4464        };
4465      }
4466      return {
4467        position: strategy,
4468        left: x,
4469        top: y
4470      };
4471    }, [strategy, transform, elements.floating, data.x, data.y]);
4472    return React19.useMemo(() => ({
4473      ...data,
4474      update: update2,
4475      refs,
4476      elements,
4477      floatingStyles
4478    }), [data, update2, refs, elements, floatingStyles]);
4479  }
4480  var offset3 = (options, deps) => {
4481    const result = offset2(options);
4482    return {
4483      name: result.name,
4484      fn: result.fn,
4485      options: [options, deps]
4486    };
4487  };
4488  var shift3 = (options, deps) => {
4489    const result = shift2(options);
4490    return {
4491      name: result.name,
4492      fn: result.fn,
4493      options: [options, deps]
4494    };
4495  };
4496  var limitShift3 = (options, deps) => {
4497    const result = limitShift2(options);
4498    return {
4499      fn: result.fn,
4500      options: [options, deps]
4501    };
4502  };
4503  var flip3 = (options, deps) => {
4504    const result = flip2(options);
4505    return {
4506      name: result.name,
4507      fn: result.fn,
4508      options: [options, deps]
4509    };
4510  };
4511  var size3 = (options, deps) => {
4512    const result = size2(options);
4513    return {
4514      name: result.name,
4515      fn: result.fn,
4516      options: [options, deps]
4517    };
4518  };
4519  var hide3 = (options, deps) => {
4520    const result = hide2(options);
4521    return {
4522      name: result.name,
4523      fn: result.fn,
4524      options: [options, deps]
4525    };
4526  };
4527  
4528  // node_modules/@base-ui/react/esm/utils/popups/popupStoreUtils.js
4529  var React24 = __toESM(require_react(), 1);
4530  
4531  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js
4532  var React23 = __toESM(require_react(), 1);
4533  
4534  // node_modules/@base-ui/utils/esm/store/createSelector.js
4535  var createSelector = (a, b, c, d, e, f, ...other) => {
4536    if (other.length > 0) {
4537      throw new Error(true ? "Unsupported number of selectors" : formatErrorMessage_default(1));
4538    }
4539    let selector;
4540    if (a && b && c && d && e && f) {
4541      selector = (state, a1, a2, a3) => {
4542        const va = a(state, a1, a2, a3);
4543        const vb = b(state, a1, a2, a3);
4544        const vc = c(state, a1, a2, a3);
4545        const vd = d(state, a1, a2, a3);
4546        const ve = e(state, a1, a2, a3);
4547        return f(va, vb, vc, vd, ve, a1, a2, a3);
4548      };
4549    } else if (a && b && c && d && e) {
4550      selector = (state, a1, a2, a3) => {
4551        const va = a(state, a1, a2, a3);
4552        const vb = b(state, a1, a2, a3);
4553        const vc = c(state, a1, a2, a3);
4554        const vd = d(state, a1, a2, a3);
4555        return e(va, vb, vc, vd, a1, a2, a3);
4556      };
4557    } else if (a && b && c && d) {
4558      selector = (state, a1, a2, a3) => {
4559        const va = a(state, a1, a2, a3);
4560        const vb = b(state, a1, a2, a3);
4561        const vc = c(state, a1, a2, a3);
4562        return d(va, vb, vc, a1, a2, a3);
4563      };
4564    } else if (a && b && c) {
4565      selector = (state, a1, a2, a3) => {
4566        const va = a(state, a1, a2, a3);
4567        const vb = b(state, a1, a2, a3);
4568        return c(va, vb, a1, a2, a3);
4569      };
4570    } else if (a && b) {
4571      selector = (state, a1, a2, a3) => {
4572        const va = a(state, a1, a2, a3);
4573        return b(va, a1, a2, a3);
4574      };
4575    } else if (a) {
4576      selector = a;
4577    } else {
4578      throw (
4579        /* minify-error-disabled */
4580        new Error("Missing arguments")
4581      );
4582    }
4583    return selector;
4584  };
4585  
4586  // node_modules/@base-ui/utils/esm/store/useStore.js
4587  var React21 = __toESM(require_react(), 1);
4588  var import_shim = __toESM(require_shim(), 1);
4589  var import_with_selector = __toESM(require_with_selector(), 1);
4590  
4591  // node_modules/@base-ui/utils/esm/fastHooks.js
4592  var React20 = __toESM(require_react(), 1);
4593  var hooks = [];
4594  var currentInstance = void 0;
4595  function getInstance() {
4596    return currentInstance;
4597  }
4598  function register(hook) {
4599    hooks.push(hook);
4600  }
4601  function fastComponent(fn) {
4602    const FastComponent = (props, forwardedRef) => {
4603      const instance = useRefWithInit(createInstance).current;
4604      let result;
4605      try {
4606        currentInstance = instance;
4607        for (const hook of hooks) {
4608          hook.before(instance);
4609        }
4610        result = fn(props, forwardedRef);
4611        for (const hook of hooks) {
4612          hook.after(instance);
4613        }
4614        instance.didInitialize = true;
4615      } finally {
4616        currentInstance = void 0;
4617      }
4618      return result;
4619    };
4620    FastComponent.displayName = fn.displayName || fn.name;
4621    return FastComponent;
4622  }
4623  function fastComponentRef(fn) {
4624    return /* @__PURE__ */ React20.forwardRef(fastComponent(fn));
4625  }
4626  function createInstance() {
4627    return {
4628      didInitialize: false
4629    };
4630  }
4631  
4632  // node_modules/@base-ui/utils/esm/store/useStore.js
4633  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4634  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4635  function useStore(store2, selector, a1, a2, a3) {
4636    return useStoreImplementation(store2, selector, a1, a2, a3);
4637  }
4638  function useStoreR19(store2, selector, a1, a2, a3) {
4639    const getSelection = React21.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
4640    return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
4641  }
4642  register({
4643    before(instance) {
4644      instance.syncIndex = 0;
4645      if (!instance.didInitialize) {
4646        instance.syncTick = 1;
4647        instance.syncHooks = [];
4648        instance.didChangeStore = true;
4649        instance.getSnapshot = () => {
4650          let didChange2 = false;
4651          for (let i = 0; i < instance.syncHooks.length; i += 1) {
4652            const hook = instance.syncHooks[i];
4653            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
4654            if (hook.didChange || !Object.is(hook.value, value)) {
4655              didChange2 = true;
4656              hook.value = value;
4657              hook.didChange = false;
4658            }
4659          }
4660          if (didChange2) {
4661            instance.syncTick += 1;
4662          }
4663          return instance.syncTick;
4664        };
4665      }
4666    },
4667    after(instance) {
4668      if (instance.syncHooks.length > 0) {
4669        if (instance.didChangeStore) {
4670          instance.didChangeStore = false;
4671          instance.subscribe = (onStoreChange) => {
4672            const stores = /* @__PURE__ */ new Set();
4673            for (const hook of instance.syncHooks) {
4674              stores.add(hook.store);
4675            }
4676            const unsubscribes = [];
4677            for (const store2 of stores) {
4678              unsubscribes.push(store2.subscribe(onStoreChange));
4679            }
4680            return () => {
4681              for (const unsubscribe of unsubscribes) {
4682                unsubscribe();
4683              }
4684            };
4685          };
4686        }
4687        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
4688      }
4689    }
4690  });
4691  function useStoreFast(store2, selector, a1, a2, a3) {
4692    const instance = getInstance();
4693    if (!instance) {
4694      return useStoreR19(store2, selector, a1, a2, a3);
4695    }
4696    const index2 = instance.syncIndex;
4697    instance.syncIndex += 1;
4698    let hook;
4699    if (!instance.didInitialize) {
4700      hook = {
4701        store: store2,
4702        selector,
4703        a1,
4704        a2,
4705        a3,
4706        value: selector(store2.getSnapshot(), a1, a2, a3),
4707        didChange: false
4708      };
4709      instance.syncHooks.push(hook);
4710    } else {
4711      hook = instance.syncHooks[index2];
4712      if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
4713        if (hook.store !== store2) {
4714          instance.didChangeStore = true;
4715        }
4716        hook.store = store2;
4717        hook.selector = selector;
4718        hook.a1 = a1;
4719        hook.a2 = a2;
4720        hook.a3 = a3;
4721        hook.didChange = true;
4722      }
4723    }
4724    return hook.value;
4725  }
4726  function useStoreLegacy(store2, selector, a1, a2, a3) {
4727    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
4728  }
4729  
4730  // node_modules/@base-ui/utils/esm/store/Store.js
4731  var Store = class {
4732    /**
4733     * The current state of the store.
4734     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
4735     * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
4736     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
4737     *
4738     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
4739     */
4740    // Internal state to handle recursive `setState()` calls
4741    constructor(state) {
4742      this.state = state;
4743      this.listeners = /* @__PURE__ */ new Set();
4744      this.updateTick = 0;
4745    }
4746    /**
4747     * Registers a listener that will be called whenever the store's state changes.
4748     *
4749     * @param fn The listener function to be called on state changes.
4750     * @returns A function to unsubscribe the listener.
4751     */
4752    subscribe = (fn) => {
4753      this.listeners.add(fn);
4754      return () => {
4755        this.listeners.delete(fn);
4756      };
4757    };
4758    /**
4759     * Returns the current state of the store.
4760     */
4761    getSnapshot = () => {
4762      return this.state;
4763    };
4764    /**
4765     * Updates the entire store's state and notifies all registered listeners.
4766     *
4767     * @param newState The new state to set for the store.
4768     */
4769    setState(newState) {
4770      if (this.state === newState) {
4771        return;
4772      }
4773      this.state = newState;
4774      this.updateTick += 1;
4775      const currentTick = this.updateTick;
4776      for (const listener of this.listeners) {
4777        if (currentTick !== this.updateTick) {
4778          return;
4779        }
4780        listener(newState);
4781      }
4782    }
4783    /**
4784     * Merges the provided changes into the current state and notifies listeners if there are changes.
4785     *
4786     * @param changes An object containing the changes to apply to the current state.
4787     */
4788    update(changes) {
4789      for (const key in changes) {
4790        if (!Object.is(this.state[key], changes[key])) {
4791          this.setState({
4792            ...this.state,
4793            ...changes
4794          });
4795          return;
4796        }
4797      }
4798    }
4799    /**
4800     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
4801     *
4802     * @param key The key in the store's state to update.
4803     * @param value The new value to set for the specified key.
4804     */
4805    set(key, value) {
4806      if (!Object.is(this.state[key], value)) {
4807        this.setState({
4808          ...this.state,
4809          [key]: value
4810        });
4811      }
4812    }
4813    /**
4814     * Gives the state a new reference and updates all registered listeners.
4815     */
4816    notifyAll() {
4817      const newState = {
4818        ...this.state
4819      };
4820      this.setState(newState);
4821    }
4822    use(selector, a1, a2, a3) {
4823      return useStore(this, selector, a1, a2, a3);
4824    }
4825  };
4826  
4827  // node_modules/@base-ui/utils/esm/store/ReactStore.js
4828  var React22 = __toESM(require_react(), 1);
4829  var ReactStore = class extends Store {
4830    /**
4831     * Creates a new ReactStore instance.
4832     *
4833     * @param state Initial state of the store.
4834     * @param context Non-reactive context values.
4835     * @param selectors Optional selectors for use with `useState`.
4836     */
4837    constructor(state, context = {}, selectors3) {
4838      super(state);
4839      this.context = context;
4840      this.selectors = selectors3;
4841    }
4842    /**
4843     * Non-reactive values such as refs, callbacks, etc.
4844     */
4845    /**
4846     * Synchronizes a single external value into the store.
4847     *
4848     * Note that the while the value in `state` is updated immediately, the value returned
4849     * by `useState` is updated before the next render (similarly to React's `useState`).
4850     */
4851    useSyncedValue(key, value) {
4852      React22.useDebugValue(key);
4853      const store2 = this;
4854      useIsoLayoutEffect(() => {
4855        if (store2.state[key] !== value) {
4856          store2.set(key, value);
4857        }
4858      }, [store2, key, value]);
4859    }
4860    /**
4861     * Synchronizes a single external value into the store and
4862     * cleans it up (sets to `undefined`) on unmount.
4863     *
4864     * Note that the while the value in `state` is updated immediately, the value returned
4865     * by `useState` is updated before the next render (similarly to React's `useState`).
4866     */
4867    useSyncedValueWithCleanup(key, value) {
4868      const store2 = this;
4869      useIsoLayoutEffect(() => {
4870        if (store2.state[key] !== value) {
4871          store2.set(key, value);
4872        }
4873        return () => {
4874          store2.set(key, void 0);
4875        };
4876      }, [store2, key, value]);
4877    }
4878    /**
4879     * Synchronizes multiple external values into the store.
4880     *
4881     * Note that the while the values in `state` are updated immediately, the values returned
4882     * by `useState` are updated before the next render (similarly to React's `useState`).
4883     */
4884    useSyncedValues(statePart) {
4885      const store2 = this;
4886      if (true) {
4887        React22.useDebugValue(statePart, (p) => Object.keys(p));
4888        const keys = React22.useRef(Object.keys(statePart)).current;
4889        const nextKeys = Object.keys(statePart);
4890        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
4891          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
4892        }
4893      }
4894      const dependencies = Object.values(statePart);
4895      useIsoLayoutEffect(() => {
4896        store2.update(statePart);
4897      }, [store2, ...dependencies]);
4898    }
4899    /**
4900     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
4901     * is non-undefined, the store's state at `key` is updated to match `controlled`.
4902     */
4903    useControlledProp(key, controlled) {
4904      React22.useDebugValue(key);
4905      const store2 = this;
4906      const isControlled = controlled !== void 0;
4907      useIsoLayoutEffect(() => {
4908        if (isControlled && !Object.is(store2.state[key], controlled)) {
4909          store2.setState({
4910            ...store2.state,
4911            [key]: controlled
4912          });
4913        }
4914      }, [store2, key, controlled, isControlled]);
4915      if (true) {
4916        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
4917        if (!cache.has(key)) {
4918          cache.set(key, isControlled);
4919        }
4920        const previouslyControlled = cache.get(key);
4921        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
4922          console.error(`A component is changing the $isControlled ? "" : "un"}controlled state of $key.toString()} to be $isControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
4923        }
4924      }
4925    }
4926    /** Gets the current value from the store using a selector with the provided key.
4927     *
4928     * @param key Key of the selector to use.
4929     */
4930    select(key, a1, a2, a3) {
4931      const selector = this.selectors[key];
4932      return selector(this.state, a1, a2, a3);
4933    }
4934    /**
4935     * Returns a value from the store's state using a selector function.
4936     * Used to subscribe to specific parts of the state.
4937     * This methods causes a rerender whenever the selected state changes.
4938     *
4939     * @param key Key of the selector to use.
4940     */
4941    useState(key, a1, a2, a3) {
4942      React22.useDebugValue(key);
4943      return useStore(this, this.selectors[key], a1, a2, a3);
4944    }
4945    /**
4946     * Wraps a function with `useStableCallback` to ensure it has a stable reference
4947     * and assigns it to the context.
4948     *
4949     * @param key Key of the event callback. Must be a function in the context.
4950     * @param fn Function to assign.
4951     */
4952    useContextCallback(key, fn) {
4953      React22.useDebugValue(key);
4954      const stableFunction = useStableCallback(fn ?? NOOP);
4955      this.context[key] = stableFunction;
4956    }
4957    /**
4958     * Returns a stable setter function for a specific key in the store's state.
4959     * It's commonly used to pass as a ref callback to React elements.
4960     *
4961     * @param key Key of the state to set.
4962     */
4963    useStateSetter(key) {
4964      const ref = React22.useRef(void 0);
4965      if (ref.current === void 0) {
4966        ref.current = (value) => {
4967          this.set(key, value);
4968        };
4969      }
4970      return ref.current;
4971    }
4972    /**
4973     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
4974     *
4975     * @param key Key of the selector to observe.
4976     * @param listener Listener function called when the selector result changes.
4977     */
4978    observe(selector, listener) {
4979      let selectFn;
4980      if (typeof selector === "function") {
4981        selectFn = selector;
4982      } else {
4983        selectFn = this.selectors[selector];
4984      }
4985      let prevValue = selectFn(this.state);
4986      listener(prevValue, prevValue, this);
4987      return this.subscribe((nextState) => {
4988        const nextValue = selectFn(nextState);
4989        if (!Object.is(prevValue, nextValue)) {
4990          const oldValue = prevValue;
4991          prevValue = nextValue;
4992          listener(nextValue, oldValue, this);
4993        }
4994      });
4995    }
4996  };
4997  
4998  // node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingRootStore.js
4999  var selectors = {
5000    open: createSelector((state) => state.open),
5001    transitionStatus: createSelector((state) => state.transitionStatus),
5002    domReferenceElement: createSelector((state) => state.domReferenceElement),
5003    referenceElement: createSelector((state) => state.positionReference ?? state.referenceElement),
5004    floatingElement: createSelector((state) => state.floatingElement),
5005    floatingId: createSelector((state) => state.floatingId)
5006  };
5007  var FloatingRootStore = class extends ReactStore {
5008    constructor(options) {
5009      const {
5010        syncOnly,
5011        nested,
5012        onOpenChange,
5013        triggerElements,
5014        ...initialState2
5015      } = options;
5016      super({
5017        ...initialState2,
5018        positionReference: initialState2.referenceElement,
5019        domReferenceElement: initialState2.referenceElement
5020      }, {
5021        onOpenChange,
5022        dataRef: {
5023          current: {}
5024        },
5025        events: createEventEmitter(),
5026        nested,
5027        triggerElements
5028      }, selectors);
5029      this.syncOnly = syncOnly;
5030    }
5031    /**
5032     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5033     */
5034    syncOpenEvent = (newOpen, event) => {
5035      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5036      // click events to upgrade a hover-open.
5037      event != null && isClickLikeEvent(event)) {
5038        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5039      }
5040    };
5041    /**
5042     * Runs the root-owned side effects for an open state change.
5043     */
5044    dispatchOpenChange = (newOpen, eventDetails) => {
5045      this.syncOpenEvent(newOpen, eventDetails.event);
5046      const details = {
5047        open: newOpen,
5048        reason: eventDetails.reason,
5049        nativeEvent: eventDetails.event,
5050        nested: this.context.nested,
5051        triggerElement: eventDetails.trigger
5052      };
5053      this.context.events.emit("openchange", details);
5054    };
5055    /**
5056     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5057     *
5058     * @param newOpen The new open state.
5059     * @param eventDetails Details about the event that triggered the open state change.
5060     */
5061    setOpen = (newOpen, eventDetails) => {
5062      if (this.syncOnly) {
5063        this.context.onOpenChange?.(newOpen, eventDetails);
5064        return;
5065      }
5066      this.dispatchOpenChange(newOpen, eventDetails);
5067      this.context.onOpenChange?.(newOpen, eventDetails);
5068    };
5069  };
5070  
5071  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js
5072  function useSyncedFloatingRootContext(options) {
5073    const {
5074      popupStore,
5075      treatPopupAsFloatingElement = false,
5076      floatingRootContext: floatingRootContextProp,
5077      floatingId,
5078      nested,
5079      onOpenChange
5080    } = options;
5081    const open = popupStore.useState("open");
5082    const referenceElement = popupStore.useState("activeTriggerElement");
5083    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5084    const triggerElements = popupStore.context.triggerElements;
5085    const handleOpenChange = onOpenChange;
5086    const internalStoreRef = React23.useRef(null);
5087    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5088      internalStoreRef.current = new FloatingRootStore({
5089        open,
5090        transitionStatus: void 0,
5091        referenceElement,
5092        floatingElement,
5093        triggerElements,
5094        onOpenChange: handleOpenChange,
5095        floatingId,
5096        syncOnly: true,
5097        nested
5098      });
5099    }
5100    const store2 = floatingRootContextProp ?? internalStoreRef.current;
5101    popupStore.useSyncedValue("floatingId", floatingId);
5102    useIsoLayoutEffect(() => {
5103      const valuesToSync = {
5104        open,
5105        floatingId,
5106        referenceElement,
5107        floatingElement
5108      };
5109      if (isElement(referenceElement)) {
5110        valuesToSync.domReferenceElement = referenceElement;
5111      }
5112      if (store2.state.positionReference === store2.state.referenceElement) {
5113        valuesToSync.positionReference = referenceElement;
5114      }
5115      store2.update(valuesToSync);
5116    }, [open, floatingId, referenceElement, floatingElement, store2]);
5117    store2.context.onOpenChange = handleOpenChange;
5118    store2.context.nested = nested;
5119    return store2;
5120  }
5121  
5122  // node_modules/@base-ui/react/esm/utils/popups/popupStoreUtils.js
5123  var FOCUSABLE_POPUP_PROPS = {
5124    tabIndex: -1,
5125    [FOCUSABLE_ATTRIBUTE]: ""
5126  };
5127  function usePopupStore(externalStore, createStore, treatPopupAsFloatingElement = false) {
5128    const floatingId = useId();
5129    const nested = useFloatingParentNodeId() != null;
5130    const internalStoreRef = React24.useRef(null);
5131    if (externalStore === void 0 && internalStoreRef.current === null) {
5132      internalStoreRef.current = createStore(floatingId, nested);
5133    }
5134    const store2 = externalStore ?? internalStoreRef.current;
5135    useSyncedFloatingRootContext({
5136      popupStore: store2,
5137      treatPopupAsFloatingElement,
5138      floatingRootContext: store2.state.floatingRootContext,
5139      floatingId,
5140      nested,
5141      onOpenChange: store2.setOpen
5142    });
5143    return {
5144      store: store2,
5145      internalStore: internalStoreRef.current
5146    };
5147  }
5148  function useTriggerRegistration(id, store2) {
5149    const registeredElementIdRef = React24.useRef(null);
5150    const registeredElementRef = React24.useRef(null);
5151    return React24.useCallback((element) => {
5152      if (id === void 0) {
5153        return;
5154      }
5155      let shouldSyncTriggerCount = false;
5156      if (registeredElementIdRef.current !== null) {
5157        const registeredId = registeredElementIdRef.current;
5158        const registeredElement = registeredElementRef.current;
5159        const currentElement = store2.context.triggerElements.getById(registeredId);
5160        if (registeredElement && currentElement === registeredElement) {
5161          store2.context.triggerElements.delete(registeredId);
5162          shouldSyncTriggerCount = true;
5163        }
5164        registeredElementIdRef.current = null;
5165        registeredElementRef.current = null;
5166      }
5167      if (element !== null) {
5168        registeredElementIdRef.current = id;
5169        registeredElementRef.current = element;
5170        store2.context.triggerElements.add(id, element);
5171        shouldSyncTriggerCount = true;
5172      }
5173      if (shouldSyncTriggerCount) {
5174        const triggerCount = store2.context.triggerElements.size;
5175        if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
5176          store2.set("triggerCount", triggerCount);
5177        }
5178      }
5179    }, [store2, id]);
5180  }
5181  function setOpenTriggerState(state, open, trigger) {
5182    const triggerId = trigger?.id ?? null;
5183    if (triggerId || open) {
5184      state.activeTriggerId = triggerId;
5185      state.activeTriggerElement = trigger ?? null;
5186    }
5187  }
5188  function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
5189    const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
5190    const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
5191    const registerTrigger = useStableCallback((element) => {
5192      baseRegisterTrigger(element);
5193      if (!element) {
5194        return;
5195      }
5196      const open = store2.select("open");
5197      const activeTriggerId = store2.select("activeTriggerId");
5198      if (activeTriggerId === triggerId) {
5199        store2.update({
5200          activeTriggerElement: element,
5201          ...open ? stateUpdates : null
5202        });
5203        return;
5204      }
5205      if (activeTriggerId == null && open) {
5206        store2.update({
5207          activeTriggerId: triggerId,
5208          activeTriggerElement: element,
5209          ...stateUpdates
5210        });
5211      }
5212    });
5213    useIsoLayoutEffect(() => {
5214      if (isMountedByThisTrigger) {
5215        store2.update({
5216          activeTriggerElement: triggerElementRef.current,
5217          ...stateUpdates
5218        });
5219      }
5220    }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
5221    return {
5222      registerTrigger,
5223      isMountedByThisTrigger
5224    };
5225  }
5226  function useImplicitActiveTrigger(store2) {
5227    const open = store2.useState("open");
5228    const reactiveTriggerCount = store2.useState("triggerCount");
5229    useIsoLayoutEffect(() => {
5230      if (!open) {
5231        if (store2.state.triggerCount !== 0) {
5232          store2.set("triggerCount", 0);
5233        }
5234        return;
5235      }
5236      const triggerCount = store2.context.triggerElements.size;
5237      const stateUpdates = {};
5238      if (store2.state.triggerCount !== triggerCount) {
5239        stateUpdates.triggerCount = triggerCount;
5240      }
5241      if (!store2.select("activeTriggerId") && triggerCount === 1) {
5242        const iteratorResult = store2.context.triggerElements.entries().next();
5243        if (!iteratorResult.done) {
5244          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5245          stateUpdates.activeTriggerId = implicitTriggerId;
5246          stateUpdates.activeTriggerElement = implicitTriggerElement;
5247        }
5248      }
5249      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0) {
5250        store2.update(stateUpdates);
5251      }
5252    }, [open, store2, reactiveTriggerCount]);
5253  }
5254  function useOpenStateTransitions(open, store2, onUnmount) {
5255    const {
5256      mounted,
5257      setMounted,
5258      transitionStatus
5259    } = useTransitionStatus(open);
5260    store2.useSyncedValues({
5261      mounted,
5262      transitionStatus
5263    });
5264    const forceUnmount = useStableCallback(() => {
5265      setMounted(false);
5266      store2.update({
5267        activeTriggerId: null,
5268        activeTriggerElement: null,
5269        mounted: false,
5270        preventUnmountingOnClose: false
5271      });
5272      onUnmount?.();
5273      store2.context.onOpenChangeComplete?.(false);
5274    });
5275    const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
5276    useOpenChangeComplete({
5277      enabled: mounted && !open && !preventUnmountingOnClose,
5278      open,
5279      ref: store2.context.popupRef,
5280      onComplete() {
5281        if (!open) {
5282          forceUnmount();
5283        }
5284      }
5285    });
5286    return {
5287      forceUnmount,
5288      transitionStatus
5289    };
5290  }
5291  function usePopupInteractionProps(store2, statePart) {
5292    store2.useSyncedValues(statePart);
5293    useIsoLayoutEffect(() => () => {
5294      store2.update({
5295        activeTriggerProps: EMPTY_OBJECT,
5296        inactiveTriggerProps: EMPTY_OBJECT,
5297        popupProps: EMPTY_OBJECT
5298      });
5299    }, [store2]);
5300  }
5301  
5302  // node_modules/@base-ui/react/esm/utils/popups/popupTriggerMap.js
5303  var PopupTriggerMap = class {
5304    constructor() {
5305      this.elementsSet = /* @__PURE__ */ new Set();
5306      this.idMap = /* @__PURE__ */ new Map();
5307    }
5308    /**
5309     * Adds a trigger element with the given ID.
5310     *
5311     * Note: The provided element is assumed to not be registered under multiple IDs.
5312     */
5313    add(id, element) {
5314      const existingElement = this.idMap.get(id);
5315      if (existingElement === element) {
5316        return;
5317      }
5318      if (existingElement !== void 0) {
5319        this.elementsSet.delete(existingElement);
5320      }
5321      this.elementsSet.add(element);
5322      this.idMap.set(id, element);
5323      if (true) {
5324        if (this.elementsSet.size !== this.idMap.size) {
5325          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5326        }
5327      }
5328    }
5329    /**
5330     * Removes the trigger element with the given ID.
5331     */
5332    delete(id) {
5333      const element = this.idMap.get(id);
5334      if (element) {
5335        this.elementsSet.delete(element);
5336        this.idMap.delete(id);
5337      }
5338    }
5339    /**
5340     * Whether the given element is registered as a trigger.
5341     */
5342    hasElement(element) {
5343      return this.elementsSet.has(element);
5344    }
5345    /**
5346     * Whether there is a registered trigger element matching the given predicate.
5347     */
5348    hasMatchingElement(predicate) {
5349      for (const element of this.elementsSet) {
5350        if (predicate(element)) {
5351          return true;
5352        }
5353      }
5354      return false;
5355    }
5356    /**
5357     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5358     */
5359    getById(id) {
5360      return this.idMap.get(id);
5361    }
5362    /**
5363     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5364     */
5365    entries() {
5366      return this.idMap.entries();
5367    }
5368    /**
5369     * Returns an iterable of all registered trigger elements.
5370     */
5371    elements() {
5372      return this.elementsSet.values();
5373    }
5374    /**
5375     * Returns the number of registered trigger elements.
5376     */
5377    get size() {
5378      return this.idMap.size;
5379    }
5380  };
5381  
5382  // node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js
5383  function getEmptyRootContext() {
5384    return new FloatingRootStore({
5385      open: false,
5386      transitionStatus: void 0,
5387      floatingElement: null,
5388      referenceElement: null,
5389      triggerElements: new PopupTriggerMap(),
5390      floatingId: void 0,
5391      syncOnly: false,
5392      nested: false,
5393      onOpenChange: void 0
5394    });
5395  }
5396  
5397  // node_modules/@base-ui/react/esm/utils/popups/store.js
5398  function createInitialPopupStoreState() {
5399    return {
5400      open: false,
5401      openProp: void 0,
5402      mounted: false,
5403      transitionStatus: void 0,
5404      floatingRootContext: getEmptyRootContext(),
5405      floatingId: void 0,
5406      triggerCount: 0,
5407      preventUnmountingOnClose: false,
5408      payload: void 0,
5409      activeTriggerId: null,
5410      activeTriggerElement: null,
5411      triggerIdProp: void 0,
5412      popupElement: null,
5413      positionerElement: null,
5414      activeTriggerProps: EMPTY_OBJECT,
5415      inactiveTriggerProps: EMPTY_OBJECT,
5416      popupProps: EMPTY_OBJECT
5417    };
5418  }
5419  function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
5420    return new FloatingRootStore({
5421      open: false,
5422      transitionStatus: void 0,
5423      floatingElement: null,
5424      referenceElement: null,
5425      triggerElements,
5426      floatingId,
5427      syncOnly: true,
5428      nested,
5429      onOpenChange: void 0
5430    });
5431  }
5432  var activeTriggerIdSelector = createSelector((state) => state.triggerIdProp ?? state.activeTriggerId);
5433  var openSelector = createSelector((state) => state.openProp ?? state.open);
5434  var popupIdSelector = createSelector((state) => {
5435    const popupId = state.popupElement?.id ?? state.floatingId;
5436    return popupId || void 0;
5437  });
5438  function triggerOwnsOpenPopup(state, triggerId) {
5439    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5440  }
5441  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5442    if (triggerOwnsOpenPopup(state, triggerId)) {
5443      return true;
5444    }
5445    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5446  }
5447  var popupStoreSelectors = {
5448    open: openSelector,
5449    mounted: createSelector((state) => state.mounted),
5450    transitionStatus: createSelector((state) => state.transitionStatus),
5451    floatingRootContext: createSelector((state) => state.floatingRootContext),
5452    triggerCount: createSelector((state) => state.triggerCount),
5453    preventUnmountingOnClose: createSelector((state) => state.preventUnmountingOnClose),
5454    payload: createSelector((state) => state.payload),
5455    activeTriggerId: activeTriggerIdSelector,
5456    activeTriggerElement: createSelector((state) => state.mounted ? state.activeTriggerElement : null),
5457    popupId: popupIdSelector,
5458    /**
5459     * Whether the trigger with the given ID was used to open the popup.
5460     */
5461    isTriggerActive: createSelector((state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId),
5462    /**
5463     * Whether the popup is open and was activated by a trigger with the given ID.
5464     */
5465    isOpenedByTrigger: createSelector((state, triggerId) => triggerOwnsOpenPopup(state, triggerId)),
5466    /**
5467     * Whether the popup is mounted and was activated by a trigger with the given ID.
5468     */
5469    isMountedByTrigger: createSelector((state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted),
5470    triggerProps: createSelector((state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps),
5471    /**
5472     * Popup id for the trigger that currently owns the open popup.
5473     */
5474    triggerPopupId: createSelector((state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0),
5475    popupProps: createSelector((state) => state.popupProps),
5476    popupElement: createSelector((state) => state.popupElement),
5477    positionerElement: createSelector((state) => state.positionerElement)
5478  };
5479  
5480  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
5481  function useFloatingRootContext(options) {
5482    const {
5483      open = false,
5484      onOpenChange,
5485      elements = {}
5486    } = options;
5487    const floatingId = useId();
5488    const nested = useFloatingParentNodeId() != null;
5489    if (true) {
5490      const optionDomReference = elements.reference;
5491      if (optionDomReference && !isElement(optionDomReference)) {
5492        console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
5493      }
5494    }
5495    const store2 = useRefWithInit(() => new FloatingRootStore({
5496      open,
5497      transitionStatus: void 0,
5498      onOpenChange,
5499      referenceElement: elements.reference ?? null,
5500      floatingElement: elements.floating ?? null,
5501      triggerElements: new PopupTriggerMap(),
5502      floatingId,
5503      syncOnly: false,
5504      nested
5505    })).current;
5506    useIsoLayoutEffect(() => {
5507      const valuesToSync = {
5508        open,
5509        floatingId
5510      };
5511      if (elements.reference !== void 0) {
5512        valuesToSync.referenceElement = elements.reference;
5513        valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;
5514      }
5515      if (elements.floating !== void 0) {
5516        valuesToSync.floatingElement = elements.floating;
5517      }
5518      store2.update(valuesToSync);
5519    }, [open, floatingId, elements.reference, elements.floating, store2]);
5520    store2.context.onOpenChange = onOpenChange;
5521    store2.context.nested = nested;
5522    return store2;
5523  }
5524  
5525  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloating.js
5526  function useFloating2(options = {}) {
5527    const {
5528      nodeId,
5529      externalTree
5530    } = options;
5531    const internalStore = useFloatingRootContext(options);
5532    const store2 = options.rootContext || internalStore;
5533    const referenceElement = store2.useState("referenceElement");
5534    const floatingElement = store2.useState("floatingElement");
5535    const domReferenceElement = store2.useState("domReferenceElement");
5536    const open = store2.useState("open");
5537    const floatingId = store2.useState("floatingId");
5538    const [positionReference, setPositionReferenceRaw] = React25.useState(null);
5539    const [localDomReference, setLocalDomReference] = React25.useState(void 0);
5540    const [localFloatingElement, setLocalFloatingElement] = React25.useState(void 0);
5541    const domReferenceRef = React25.useRef(null);
5542    const tree = useFloatingTree(externalTree);
5543    const storeElements = React25.useMemo(() => ({
5544      reference: referenceElement,
5545      floating: floatingElement,
5546      domReference: domReferenceElement
5547    }), [referenceElement, floatingElement, domReferenceElement]);
5548    const position = useFloating({
5549      ...options,
5550      elements: {
5551        ...storeElements,
5552        ...positionReference && {
5553          reference: positionReference
5554        }
5555      }
5556    });
5557    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
5558    const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
5559    store2.useSyncedValue("referenceElement", localDomReference ?? null);
5560    store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
5561    store2.useSyncedValue("floatingElement", syncedFloatingElement);
5562    const setPositionReference = React25.useCallback((node) => {
5563      const computedPositionReference = isElement(node) ? {
5564        getBoundingClientRect: () => node.getBoundingClientRect(),
5565        getClientRects: () => node.getClientRects(),
5566        contextElement: node
5567      } : node;
5568      setPositionReferenceRaw(computedPositionReference);
5569      position.refs.setReference(computedPositionReference);
5570    }, [position.refs]);
5571    const setReference = React25.useCallback((node) => {
5572      if (isElement(node) || node === null) {
5573        domReferenceRef.current = node;
5574        setLocalDomReference(node);
5575      }
5576      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
5577      // `null` to support `positionReference` + an unstable `reference`
5578      // callback ref.
5579      node !== null && !isElement(node)) {
5580        position.refs.setReference(node);
5581      }
5582    }, [position.refs, setLocalDomReference]);
5583    const setFloating = React25.useCallback((node) => {
5584      setLocalFloatingElement(node);
5585      position.refs.setFloating(node);
5586    }, [position.refs]);
5587    const refs = React25.useMemo(() => ({
5588      ...position.refs,
5589      setReference,
5590      setFloating,
5591      setPositionReference,
5592      domReference: domReferenceRef
5593    }), [position.refs, setReference, setFloating, setPositionReference]);
5594    const elements = React25.useMemo(() => ({
5595      ...position.elements,
5596      domReference: domReferenceElement
5597    }), [position.elements, domReferenceElement]);
5598    const context = React25.useMemo(() => ({
5599      ...position,
5600      dataRef: store2.context.dataRef,
5601      open,
5602      onOpenChange: store2.setOpen,
5603      events: store2.context.events,
5604      floatingId,
5605      refs,
5606      elements,
5607      nodeId,
5608      rootStore: store2
5609    }), [position, refs, elements, nodeId, store2, open, floatingId]);
5610    useIsoLayoutEffect(() => {
5611      if (domReferenceElement) {
5612        domReferenceRef.current = domReferenceElement;
5613      }
5614    }, [domReferenceElement]);
5615    useIsoLayoutEffect(() => {
5616      store2.context.dataRef.current.floatingContext = context;
5617      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
5618      if (node) {
5619        node.context = context;
5620      }
5621    });
5622    return React25.useMemo(() => ({
5623      ...position,
5624      context,
5625      refs,
5626      elements,
5627      rootStore: store2
5628    }), [position, refs, elements, context, store2]);
5629  }
5630  
5631  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js
5632  var React26 = __toESM(require_react(), 1);
5633  var isMacSafari = isMac && isSafari;
5634  function useFocus(context, props = {}) {
5635    const {
5636      enabled = true,
5637      delay
5638    } = props;
5639    const store2 = "rootStore" in context ? context.rootStore : context;
5640    const {
5641      events,
5642      dataRef
5643    } = store2.context;
5644    const blockFocusRef = React26.useRef(false);
5645    const blockedReferenceRef = React26.useRef(null);
5646    const keyboardModalityRef = React26.useRef(true);
5647    const timeout = useTimeout();
5648    React26.useEffect(() => {
5649      const domReference = store2.select("domReferenceElement");
5650      if (!enabled) {
5651        return void 0;
5652      }
5653      const win = getWindow(domReference);
5654      function onBlur() {
5655        const currentDomReference = store2.select("domReferenceElement");
5656        if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
5657          blockFocusRef.current = true;
5658        }
5659      }
5660      function onKeyDown() {
5661        keyboardModalityRef.current = true;
5662      }
5663      function onPointerDown() {
5664        keyboardModalityRef.current = false;
5665      }
5666      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
5667    }, [store2, enabled]);
5668    React26.useEffect(() => {
5669      if (!enabled) {
5670        return void 0;
5671      }
5672      function onOpenChangeLocal(details) {
5673        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
5674          const referenceElement = store2.select("domReferenceElement");
5675          if (isElement(referenceElement)) {
5676            blockedReferenceRef.current = referenceElement;
5677            blockFocusRef.current = true;
5678          }
5679        }
5680      }
5681      events.on("openchange", onOpenChangeLocal);
5682      return () => {
5683        events.off("openchange", onOpenChangeLocal);
5684      };
5685    }, [events, enabled, store2]);
5686    const reference = React26.useMemo(() => {
5687      function resetBlockedFocus() {
5688        blockFocusRef.current = false;
5689        blockedReferenceRef.current = null;
5690      }
5691      return {
5692        onMouseLeave() {
5693          resetBlockedFocus();
5694        },
5695        onFocus(event) {
5696          const focusTarget = event.currentTarget;
5697          if (blockFocusRef.current) {
5698            if (blockedReferenceRef.current === focusTarget) {
5699              return;
5700            }
5701            resetBlockedFocus();
5702          }
5703          const target = getTarget(event.nativeEvent);
5704          if (isElement(target)) {
5705            if (isMacSafari && !event.relatedTarget) {
5706              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
5707                return;
5708              }
5709            } else if (!matchesFocusVisible(target)) {
5710              return;
5711            }
5712          }
5713          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
5714          const {
5715            nativeEvent,
5716            currentTarget
5717          } = event;
5718          const delayValue = typeof delay === "function" ? delay() : delay;
5719          if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
5720            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
5721            return;
5722          }
5723          timeout.start(delayValue, () => {
5724            if (blockFocusRef.current) {
5725              return;
5726            }
5727            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
5728          });
5729        },
5730        onBlur(event) {
5731          resetBlockedFocus();
5732          const relatedTarget = event.relatedTarget;
5733          const nativeEvent = event.nativeEvent;
5734          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
5735          timeout.start(0, () => {
5736            const domReference = store2.select("domReferenceElement");
5737            const activeEl = activeElement(ownerDocument(domReference));
5738            if (!relatedTarget && activeEl === domReference) {
5739              return;
5740            }
5741            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
5742              return;
5743            }
5744            const nextFocusedElement = relatedTarget ?? activeEl;
5745            if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
5746              return;
5747            }
5748            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
5749          });
5750        }
5751      };
5752    }, [dataRef, delay, store2, timeout]);
5753    return React26.useMemo(() => enabled ? {
5754      reference,
5755      trigger: reference
5756    } : {}, [enabled, reference]);
5757  }
5758  
5759  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js
5760  var React27 = __toESM(require_react(), 1);
5761  
5762  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js
5763  var HoverInteraction = class _HoverInteraction {
5764    constructor() {
5765      this.pointerType = void 0;
5766      this.interactedInside = false;
5767      this.handler = void 0;
5768      this.blockMouseMove = true;
5769      this.performedPointerEventsMutation = false;
5770      this.pointerEventsScopeElement = null;
5771      this.pointerEventsReferenceElement = null;
5772      this.pointerEventsFloatingElement = null;
5773      this.restTimeoutPending = false;
5774      this.openChangeTimeout = new Timeout();
5775      this.restTimeout = new Timeout();
5776      this.handleCloseOptions = void 0;
5777    }
5778    static create() {
5779      return new _HoverInteraction();
5780    }
5781    dispose = () => {
5782      this.openChangeTimeout.clear();
5783      this.restTimeout.clear();
5784    };
5785    disposeEffect = () => {
5786      return this.dispose;
5787    };
5788  };
5789  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
5790  function clearSafePolygonPointerEventsMutation(instance) {
5791    if (!instance.performedPointerEventsMutation) {
5792      return;
5793    }
5794    const scopeElement = instance.pointerEventsScopeElement;
5795    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
5796      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
5797      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
5798      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
5799      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
5800    }
5801    instance.performedPointerEventsMutation = false;
5802    instance.pointerEventsScopeElement = null;
5803    instance.pointerEventsReferenceElement = null;
5804    instance.pointerEventsFloatingElement = null;
5805  }
5806  function applySafePolygonPointerEventsMutation(instance, options) {
5807    const {
5808      scopeElement,
5809      referenceElement,
5810      floatingElement
5811    } = options;
5812    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
5813    if (existingOwner && existingOwner !== instance) {
5814      clearSafePolygonPointerEventsMutation(existingOwner);
5815    }
5816    clearSafePolygonPointerEventsMutation(instance);
5817    instance.performedPointerEventsMutation = true;
5818    instance.pointerEventsScopeElement = scopeElement;
5819    instance.pointerEventsReferenceElement = referenceElement;
5820    instance.pointerEventsFloatingElement = floatingElement;
5821    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
5822    scopeElement.style.pointerEvents = "none";
5823    referenceElement.style.pointerEvents = "auto";
5824    floatingElement.style.pointerEvents = "auto";
5825  }
5826  function useHoverInteractionSharedState(store2) {
5827    const data = store2.context.dataRef.current;
5828    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
5829    if (!data.hoverInteractionState) {
5830      data.hoverInteractionState = instance;
5831    }
5832    useOnMount(data.hoverInteractionState.disposeEffect);
5833    return data.hoverInteractionState;
5834  }
5835  
5836  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js
5837  function useHoverFloatingInteraction(context, parameters = {}) {
5838    const {
5839      enabled = true,
5840      closeDelay: closeDelayProp = 0,
5841      nodeId: nodeIdProp
5842    } = parameters;
5843    const store2 = "rootStore" in context ? context.rootStore : context;
5844    const open = store2.useState("open");
5845    const floatingElement = store2.useState("floatingElement");
5846    const domReferenceElement = store2.useState("domReferenceElement");
5847    const {
5848      dataRef
5849    } = store2.context;
5850    const tree = useFloatingTree();
5851    const parentId = useFloatingParentNodeId();
5852    const instance = useHoverInteractionSharedState(store2);
5853    const childClosedTimeout = useTimeout();
5854    const isClickLikeOpenEvent2 = useStableCallback(() => {
5855      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
5856    });
5857    const isHoverOpen = useStableCallback(() => {
5858      return isHoverOpenEvent(dataRef.current.openEvent?.type);
5859    });
5860    const clearPointerEvents = useStableCallback(() => {
5861      clearSafePolygonPointerEventsMutation(instance);
5862    });
5863    useIsoLayoutEffect(() => {
5864      if (!open) {
5865        instance.pointerType = void 0;
5866        instance.restTimeoutPending = false;
5867        instance.interactedInside = false;
5868        clearPointerEvents();
5869      }
5870    }, [open, instance, clearPointerEvents]);
5871    React27.useEffect(() => {
5872      return clearPointerEvents;
5873    }, [clearPointerEvents]);
5874    useIsoLayoutEffect(() => {
5875      if (!enabled) {
5876        return void 0;
5877      }
5878      if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
5879        const ref = domReferenceElement;
5880        const floatingEl = floatingElement;
5881        const doc = ownerDocument(floatingElement);
5882        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
5883        if (parentFloating) {
5884          parentFloating.style.pointerEvents = "";
5885        }
5886        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
5887        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
5888        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
5889        applySafePolygonPointerEventsMutation(instance, {
5890          scopeElement,
5891          referenceElement: ref,
5892          floatingElement: floatingEl
5893        });
5894        return () => {
5895          clearPointerEvents();
5896        };
5897      }
5898      return void 0;
5899    }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
5900    React27.useEffect(() => {
5901      if (!enabled) {
5902        return void 0;
5903      }
5904      function hasParentChildren() {
5905        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
5906      }
5907      function closeWithDelay(event) {
5908        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
5909        const close = () => {
5910          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
5911          tree?.events.emit("floating.closed", event);
5912        };
5913        if (closeDelay) {
5914          instance.openChangeTimeout.start(closeDelay, close);
5915        } else {
5916          instance.openChangeTimeout.clear();
5917          close();
5918        }
5919      }
5920      function handleInteractInside(event) {
5921        const target = getTarget(event);
5922        if (!isInteractiveElement(target)) {
5923          instance.interactedInside = false;
5924          return;
5925        }
5926        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
5927      }
5928      function onFloatingMouseEnter() {
5929        instance.openChangeTimeout.clear();
5930        childClosedTimeout.clear();
5931        tree?.events.off("floating.closed", onNodeClosed);
5932        clearPointerEvents();
5933      }
5934      function onFloatingMouseLeave(event) {
5935        if (hasParentChildren() && tree) {
5936          tree.events.on("floating.closed", onNodeClosed);
5937          return;
5938        }
5939        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
5940          return;
5941        }
5942        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
5943        const relatedTarget = event.relatedTarget;
5944        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
5945        if (isMovingIntoDescendantFloating) {
5946          return;
5947        }
5948        if (instance.handler) {
5949          instance.handler(event);
5950          return;
5951        }
5952        clearPointerEvents();
5953        if (!isClickLikeOpenEvent2()) {
5954          closeWithDelay(event);
5955        }
5956      }
5957      function onNodeClosed(event) {
5958        if (!tree || !parentId || hasParentChildren()) {
5959          return;
5960        }
5961        childClosedTimeout.start(0, () => {
5962          tree.events.off("floating.closed", onNodeClosed);
5963          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
5964          tree.events.emit("floating.closed", event);
5965        });
5966      }
5967      const floating = floatingElement;
5968      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
5969        tree?.events.off("floating.closed", onNodeClosed);
5970      });
5971    }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
5972  }
5973  
5974  // node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js
5975  var React28 = __toESM(require_react(), 1);
5976  var ReactDOM4 = __toESM(require_react_dom(), 1);
5977  var EMPTY_REF = {
5978    current: null
5979  };
5980  function useHoverReferenceInteraction(context, props = {}) {
5981    const {
5982      enabled = true,
5983      delay = 0,
5984      handleClose = null,
5985      mouseOnly = false,
5986      restMs = 0,
5987      move = true,
5988      triggerElementRef = EMPTY_REF,
5989      externalTree,
5990      isActiveTrigger = true,
5991      getHandleCloseContext,
5992      isClosing,
5993      shouldOpen: shouldOpenProp
5994    } = props;
5995    const store2 = "rootStore" in context ? context.rootStore : context;
5996    const {
5997      dataRef,
5998      events
5999    } = store2.context;
6000    const tree = useFloatingTree(externalTree);
6001    const instance = useHoverInteractionSharedState(store2);
6002    const isHoverCloseActiveRef = React28.useRef(false);
6003    const handleCloseRef = useValueAsRef(handleClose);
6004    const delayRef = useValueAsRef(delay);
6005    const restMsRef = useValueAsRef(restMs);
6006    const enabledRef = useValueAsRef(enabled);
6007    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6008    const isClosingRef = useValueAsRef(isClosing);
6009    const isClickLikeOpenEvent2 = useStableCallback(() => {
6010      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6011    });
6012    const checkShouldOpen = useStableCallback(() => {
6013      return shouldOpenRef.current?.() !== false;
6014    });
6015    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6016      const allTriggers = store2.context.triggerElements;
6017      if (allTriggers.hasElement(currentTarget)) {
6018        return !currentDomReference || !contains(currentDomReference, currentTarget);
6019      }
6020      if (!isElement(target)) {
6021        return false;
6022      }
6023      const targetElement = target;
6024      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6025    });
6026    const cleanupMouseMoveHandler = useStableCallback(() => {
6027      if (!instance.handler) {
6028        return;
6029      }
6030      const doc = ownerDocument(store2.select("domReferenceElement"));
6031      doc.removeEventListener("mousemove", instance.handler);
6032      instance.handler = void 0;
6033    });
6034    const clearPointerEvents = useStableCallback(() => {
6035      clearSafePolygonPointerEventsMutation(instance);
6036    });
6037    if (isActiveTrigger) {
6038      instance.handleCloseOptions = handleCloseRef.current?.__options;
6039    }
6040    React28.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6041    React28.useEffect(() => {
6042      if (!enabled) {
6043        return void 0;
6044      }
6045      function onOpenChangeLocal(details) {
6046        if (!details.open) {
6047          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6048          cleanupMouseMoveHandler();
6049          instance.openChangeTimeout.clear();
6050          instance.restTimeout.clear();
6051          instance.blockMouseMove = true;
6052          instance.restTimeoutPending = false;
6053        } else {
6054          isHoverCloseActiveRef.current = false;
6055        }
6056      }
6057      events.on("openchange", onOpenChangeLocal);
6058      return () => {
6059        events.off("openchange", onOpenChangeLocal);
6060      };
6061    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6062    React28.useEffect(() => {
6063      if (!enabled) {
6064        return void 0;
6065      }
6066      function closeWithDelay(event, runElseBranch = true) {
6067        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6068        if (closeDelay) {
6069          instance.openChangeTimeout.start(closeDelay, () => {
6070            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6071            tree?.events.emit("floating.closed", event);
6072          });
6073        } else if (runElseBranch) {
6074          instance.openChangeTimeout.clear();
6075          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6076          tree?.events.emit("floating.closed", event);
6077        }
6078      }
6079      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
6080      if (!isElement(trigger)) {
6081        return void 0;
6082      }
6083      function onMouseEnter(event) {
6084        instance.openChangeTimeout.clear();
6085        instance.blockMouseMove = false;
6086        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6087          return;
6088        }
6089        const restMsValue = getRestMs(restMsRef.current);
6090        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6091        const eventTarget = getTarget(event);
6092        const currentTarget = event.currentTarget ?? null;
6093        const currentDomReference = store2.select("domReferenceElement");
6094        let triggerNode = currentTarget;
6095        if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
6096          for (const triggerElement of store2.context.triggerElements.elements()) {
6097            if (contains(triggerElement, eventTarget)) {
6098              triggerNode = triggerElement;
6099              break;
6100            }
6101          }
6102        }
6103        if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6104          triggerNode = currentDomReference;
6105        }
6106        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6107        const isOpen = store2.select("open");
6108        const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
6109        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6110        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6111        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6112        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6113        const shouldOpen = !isOpen || isOverInactive;
6114        if (shouldOpenImmediately) {
6115          if (checkShouldOpen()) {
6116            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6117          }
6118          return;
6119        }
6120        if (isRestOnlyDelay) {
6121          return;
6122        }
6123        if (openDelay) {
6124          instance.openChangeTimeout.start(openDelay, () => {
6125            if (shouldOpen && checkShouldOpen()) {
6126              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6127            }
6128          });
6129        } else if (shouldOpen) {
6130          if (checkShouldOpen()) {
6131            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6132          }
6133        }
6134      }
6135      function onMouseLeave(event) {
6136        if (isClickLikeOpenEvent2()) {
6137          clearPointerEvents();
6138          return;
6139        }
6140        cleanupMouseMoveHandler();
6141        const domReferenceElement = store2.select("domReferenceElement");
6142        const doc = ownerDocument(domReferenceElement);
6143        instance.restTimeout.clear();
6144        instance.restTimeoutPending = false;
6145        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6146        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6147          return;
6148        }
6149        if (handleCloseRef.current && handleCloseContextBase) {
6150          if (!store2.select("open")) {
6151            instance.openChangeTimeout.clear();
6152          }
6153          const currentTrigger = triggerElementRef.current;
6154          instance.handler = handleCloseRef.current({
6155            ...handleCloseContextBase,
6156            tree,
6157            x: event.clientX,
6158            y: event.clientY,
6159            onClose() {
6160              clearPointerEvents();
6161              cleanupMouseMoveHandler();
6162              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
6163                closeWithDelay(event, true);
6164              }
6165            }
6166          });
6167          doc.addEventListener("mousemove", instance.handler);
6168          instance.handler(event);
6169          return;
6170        }
6171        const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
6172        if (shouldClose) {
6173          closeWithDelay(event);
6174        }
6175      }
6176      if (move) {
6177        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6178          once: true
6179        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave));
6180      }
6181      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave));
6182    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen]);
6183    return React28.useMemo(() => {
6184      if (!enabled) {
6185        return void 0;
6186      }
6187      function setPointerRef(event) {
6188        instance.pointerType = event.pointerType;
6189      }
6190      return {
6191        onPointerDown: setPointerRef,
6192        onPointerEnter: setPointerRef,
6193        onMouseMove(event) {
6194          const {
6195            nativeEvent
6196          } = event;
6197          const trigger = event.currentTarget;
6198          const currentDomReference = store2.select("domReferenceElement");
6199          const currentOpen = store2.select("open");
6200          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6201          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6202            return;
6203          }
6204          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6205            const floatingElement = store2.select("floatingElement");
6206            if (floatingElement) {
6207              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6208              applySafePolygonPointerEventsMutation(instance, {
6209                scopeElement,
6210                referenceElement: trigger,
6211                floatingElement
6212              });
6213            }
6214          }
6215          const restMsValue = getRestMs(restMsRef.current);
6216          if (currentOpen && !isOverInactive || restMsValue === 0) {
6217            return;
6218          }
6219          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6220            return;
6221          }
6222          instance.restTimeout.clear();
6223          function handleMouseMove() {
6224            instance.restTimeoutPending = false;
6225            if (isClickLikeOpenEvent2()) {
6226              return;
6227            }
6228            const latestOpen = store2.select("open");
6229            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6230              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6231            }
6232          }
6233          if (instance.pointerType === "touch") {
6234            ReactDOM4.flushSync(() => {
6235              handleMouseMove();
6236            });
6237          } else if (isOverInactive && currentOpen) {
6238            handleMouseMove();
6239          } else {
6240            instance.restTimeoutPending = true;
6241            instance.restTimeout.start(restMsValue, handleMouseMove);
6242          }
6243        }
6244      };
6245    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
6246  }
6247  
6248  // node_modules/@base-ui/react/esm/floating-ui-react/safePolygon.js
6249  var CURSOR_SPEED_THRESHOLD = 0.1;
6250  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6251  var POLYGON_BUFFER = 0.5;
6252  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6253    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6254  }
6255  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6256    let isInsideValue = false;
6257    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6258      isInsideValue = !isInsideValue;
6259    }
6260    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6261      isInsideValue = !isInsideValue;
6262    }
6263    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6264      isInsideValue = !isInsideValue;
6265    }
6266    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6267      isInsideValue = !isInsideValue;
6268    }
6269    return isInsideValue;
6270  }
6271  function isInsideRect(pointX, pointY, rect) {
6272    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6273  }
6274  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6275    const minX = Math.min(x1, x2);
6276    const maxX = Math.max(x1, x2);
6277    const minY = Math.min(y1, y2);
6278    const maxY = Math.max(y1, y2);
6279    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6280  }
6281  function safePolygon(options = {}) {
6282    const {
6283      blockPointerEvents = false
6284    } = options;
6285    const timeout = new Timeout();
6286    const fn = ({
6287      x,
6288      y,
6289      placement,
6290      elements,
6291      onClose,
6292      nodeId,
6293      tree
6294    }) => {
6295      const side = placement?.split("-")[0];
6296      let hasLanded = false;
6297      let lastX = null;
6298      let lastY = null;
6299      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6300      function isCursorMovingSlowly(nextX, nextY) {
6301        const currentTime = performance.now();
6302        const elapsedTime = currentTime - lastCursorTime;
6303        if (lastX === null || lastY === null || elapsedTime === 0) {
6304          lastX = nextX;
6305          lastY = nextY;
6306          lastCursorTime = currentTime;
6307          return false;
6308        }
6309        const deltaX = nextX - lastX;
6310        const deltaY = nextY - lastY;
6311        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6312        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6313        lastX = nextX;
6314        lastY = nextY;
6315        lastCursorTime = currentTime;
6316        return distanceSquared < thresholdSquared;
6317      }
6318      function close() {
6319        timeout.clear();
6320        onClose();
6321      }
6322      return function onMouseMove(event) {
6323        timeout.clear();
6324        const domReference = elements.domReference;
6325        const floating = elements.floating;
6326        if (!domReference || !floating || side == null || x == null || y == null) {
6327          return void 0;
6328        }
6329        const {
6330          clientX,
6331          clientY
6332        } = event;
6333        const target = getTarget(event);
6334        const isLeave = event.type === "mouseleave";
6335        const isOverFloatingEl = contains(floating, target);
6336        const isOverReferenceEl = contains(domReference, target);
6337        if (isOverFloatingEl) {
6338          hasLanded = true;
6339          if (!isLeave) {
6340            return void 0;
6341          }
6342        }
6343        if (isOverReferenceEl) {
6344          hasLanded = false;
6345          if (!isLeave) {
6346            hasLanded = true;
6347            return void 0;
6348          }
6349        }
6350        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6351          return void 0;
6352        }
6353        function hasOpenChildNode() {
6354          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6355        }
6356        function closeIfNoOpenChild() {
6357          if (!hasOpenChildNode()) {
6358            close();
6359          }
6360        }
6361        if (hasOpenChildNode()) {
6362          return void 0;
6363        }
6364        const refRect = domReference.getBoundingClientRect();
6365        const rect = floating.getBoundingClientRect();
6366        const cursorLeaveFromRight = x > rect.right - rect.width / 2;
6367        const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
6368        const isFloatingWider = rect.width > refRect.width;
6369        const isFloatingTaller = rect.height > refRect.height;
6370        const left = (isFloatingWider ? refRect : rect).left;
6371        const right = (isFloatingWider ? refRect : rect).right;
6372        const top = (isFloatingTaller ? refRect : rect).top;
6373        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6374        if (side === "top" && y >= refRect.bottom - 1 || side === "bottom" && y <= refRect.top + 1 || side === "left" && x >= refRect.right - 1 || side === "right" && x <= refRect.left + 1) {
6375          closeIfNoOpenChild();
6376          return void 0;
6377        }
6378        let isInsideTroughRect = false;
6379        switch (side) {
6380          case "top":
6381            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6382            break;
6383          case "bottom":
6384            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6385            break;
6386          case "left":
6387            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6388            break;
6389          case "right":
6390            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6391            break;
6392          default:
6393        }
6394        if (isInsideTroughRect) {
6395          return void 0;
6396        }
6397        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6398          closeIfNoOpenChild();
6399          return void 0;
6400        }
6401        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6402          closeIfNoOpenChild();
6403          return void 0;
6404        }
6405        let isInsidePolygon = false;
6406        switch (side) {
6407          case "top": {
6408            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6409            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6410            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6411            const cursorPointY = y + POLYGON_BUFFER + 1;
6412            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6413            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6414            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6415            break;
6416          }
6417          case "bottom": {
6418            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6419            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6420            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6421            const cursorPointY = y - POLYGON_BUFFER;
6422            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6423            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6424            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6425            break;
6426          }
6427          case "left": {
6428            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6429            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6430            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6431            const cursorPointX = x + POLYGON_BUFFER + 1;
6432            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6433            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6434            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6435            break;
6436          }
6437          case "right": {
6438            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6439            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6440            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6441            const cursorPointX = x - POLYGON_BUFFER;
6442            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6443            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6444            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6445            break;
6446          }
6447          default:
6448        }
6449        if (!isInsidePolygon) {
6450          closeIfNoOpenChild();
6451        } else if (!hasLanded) {
6452          timeout.start(40, closeIfNoOpenChild);
6453        }
6454        return void 0;
6455      };
6456    };
6457    fn.__options = {
6458      ...options,
6459      blockPointerEvents
6460    };
6461    return fn;
6462  }
6463  
6464  // node_modules/@base-ui/react/esm/utils/popupStateMapping.js
6465  var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
6466    CommonPopupDataAttributes2["open"] = "data-open";
6467    CommonPopupDataAttributes2["closed"] = "data-closed";
6468    CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
6469    CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
6470    CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
6471    CommonPopupDataAttributes2["side"] = "data-side";
6472    CommonPopupDataAttributes2["align"] = "data-align";
6473    return CommonPopupDataAttributes2;
6474  })({});
6475  var CommonTriggerDataAttributes = /* @__PURE__ */ (function(CommonTriggerDataAttributes2) {
6476    CommonTriggerDataAttributes2["popupOpen"] = "data-popup-open";
6477    CommonTriggerDataAttributes2["pressed"] = "data-pressed";
6478    return CommonTriggerDataAttributes2;
6479  })({});
6480  var TRIGGER_HOOK = {
6481    [CommonTriggerDataAttributes.popupOpen]: ""
6482  };
6483  var PRESSABLE_TRIGGER_HOOK = {
6484    [CommonTriggerDataAttributes.popupOpen]: "",
6485    [CommonTriggerDataAttributes.pressed]: ""
6486  };
6487  var POPUP_OPEN_HOOK = {
6488    [CommonPopupDataAttributes.open]: ""
6489  };
6490  var POPUP_CLOSED_HOOK = {
6491    [CommonPopupDataAttributes.closed]: ""
6492  };
6493  var ANCHOR_HIDDEN_HOOK = {
6494    [CommonPopupDataAttributes.anchorHidden]: ""
6495  };
6496  var triggerOpenStateMapping = {
6497    open(value) {
6498      if (value) {
6499        return TRIGGER_HOOK;
6500      }
6501      return null;
6502    }
6503  };
6504  var popupStateMapping = {
6505    open(value) {
6506      if (value) {
6507        return POPUP_OPEN_HOOK;
6508      }
6509      return POPUP_CLOSED_HOOK;
6510    },
6511    anchorHidden(value) {
6512      if (value) {
6513        return ANCHOR_HIDDEN_HOOK;
6514      }
6515      return null;
6516    }
6517  };
6518  
6519  // node_modules/@base-ui/utils/esm/inertValue.js
6520  function inertValue(value) {
6521    if (isReactVersionAtLeast(19)) {
6522      return value;
6523    }
6524    return value ? "true" : void 0;
6525  }
6526  
6527  // node_modules/@base-ui/react/esm/utils/useAnchorPositioning.js
6528  var React29 = __toESM(require_react(), 1);
6529  
6530  // node_modules/@base-ui/react/esm/floating-ui-react/middleware/arrow.js
6531  var baseArrow = (options) => ({
6532    name: "arrow",
6533    options,
6534    async fn(state) {
6535      const {
6536        x,
6537        y,
6538        placement,
6539        rects,
6540        platform: platform3,
6541        elements,
6542        middlewareData
6543      } = state;
6544      const {
6545        element,
6546        padding = 0,
6547        offsetParent = "real"
6548      } = evaluate(options, state) || {};
6549      if (element == null) {
6550        return {};
6551      }
6552      const paddingObject = getPaddingObject(padding);
6553      const coords = {
6554        x,
6555        y
6556      };
6557      const axis = getAlignmentAxis(placement);
6558      const length = getAxisLength(axis);
6559      const arrowDimensions = await platform3.getDimensions(element);
6560      const isYAxis = axis === "y";
6561      const minProp = isYAxis ? "top" : "left";
6562      const maxProp = isYAxis ? "bottom" : "right";
6563      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6564      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6565      const startDiff = coords[axis] - rects.reference[axis];
6566      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
6567      let clientSize = elements.floating[clientProp] || rects.floating[length];
6568      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
6569        clientSize = elements.floating[clientProp] || rects.floating[length];
6570      }
6571      const centerToReference = endDiff / 2 - startDiff / 2;
6572      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6573      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6574      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6575      const min2 = minPadding;
6576      const max2 = clientSize - arrowDimensions[length] - maxPadding;
6577      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6578      const offset4 = clamp(min2, center, max2);
6579      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6580      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6581      return {
6582        [axis]: coords[axis] + alignmentOffset,
6583        data: {
6584          [axis]: offset4,
6585          centerOffset: center - offset4 - alignmentOffset,
6586          ...shouldAddOffset && {
6587            alignmentOffset
6588          }
6589        },
6590        reset: shouldAddOffset
6591      };
6592    }
6593  });
6594  var arrow4 = (options, deps) => ({
6595    ...baseArrow(options),
6596    options: [options, deps]
6597  });
6598  
6599  // node_modules/@base-ui/react/esm/utils/hideMiddleware.js
6600  var hide4 = {
6601    name: "hide",
6602    async fn(state) {
6603      const {
6604        width,
6605        height,
6606        x,
6607        y
6608      } = state.rects.reference;
6609      const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;
6610      const nativeHideResult = await hide3().fn(state);
6611      return {
6612        data: {
6613          referenceHidden: nativeHideResult.data?.referenceHidden || anchorHidden
6614        }
6615      };
6616    }
6617  };
6618  
6619  // node_modules/@base-ui/react/esm/utils/adaptiveOriginMiddleware.js
6620  var DEFAULT_SIDES = {
6621    sideX: "left",
6622    sideY: "top"
6623  };
6624  var adaptiveOrigin = {
6625    name: "adaptiveOrigin",
6626    async fn(state) {
6627      const {
6628        x: rawX,
6629        y: rawY,
6630        rects: {
6631          floating: floatRect
6632        },
6633        elements: {
6634          floating
6635        },
6636        platform: platform3,
6637        strategy,
6638        placement
6639      } = state;
6640      const win = getWindow(floating);
6641      const styles = win.getComputedStyle(floating);
6642      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
6643      if (!hasTransition) {
6644        return {
6645          x: rawX,
6646          y: rawY,
6647          data: DEFAULT_SIDES
6648        };
6649      }
6650      const offsetParent = await platform3.getOffsetParent?.(floating);
6651      let offsetDimensions = {
6652        width: 0,
6653        height: 0
6654      };
6655      if (strategy === "fixed" && win?.visualViewport) {
6656        offsetDimensions = {
6657          width: win.visualViewport.width,
6658          height: win.visualViewport.height
6659        };
6660      } else if (offsetParent === win) {
6661        const doc = ownerDocument(floating);
6662        offsetDimensions = {
6663          width: doc.documentElement.clientWidth,
6664          height: doc.documentElement.clientHeight
6665        };
6666      } else if (await platform3.isElement?.(offsetParent)) {
6667        offsetDimensions = await platform3.getDimensions(offsetParent);
6668      }
6669      const currentSide = getSide(placement);
6670      let x = rawX;
6671      let y = rawY;
6672      if (currentSide === "left") {
6673        x = offsetDimensions.width - (rawX + floatRect.width);
6674      }
6675      if (currentSide === "top") {
6676        y = offsetDimensions.height - (rawY + floatRect.height);
6677      }
6678      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
6679      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
6680      return {
6681        x,
6682        y,
6683        data: {
6684          sideX,
6685          sideY
6686        }
6687      };
6688    }
6689  };
6690  
6691  // node_modules/@base-ui/react/esm/utils/useAnchorPositioning.js
6692  function getLogicalSide(sideParam, renderedSide, isRtl) {
6693    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
6694    const logicalRight = isRtl ? "inline-start" : "inline-end";
6695    const logicalLeft = isRtl ? "inline-end" : "inline-start";
6696    return {
6697      top: "top",
6698      right: isLogicalSideParam ? logicalRight : "right",
6699      bottom: "bottom",
6700      left: isLogicalSideParam ? logicalLeft : "left"
6701    }[renderedSide];
6702  }
6703  function getOffsetData(state, sideParam, isRtl) {
6704    const {
6705      rects,
6706      placement
6707    } = state;
6708    const data = {
6709      side: getLogicalSide(sideParam, getSide(placement), isRtl),
6710      align: getAlignment(placement) || "center",
6711      anchor: {
6712        width: rects.reference.width,
6713        height: rects.reference.height
6714      },
6715      positioner: {
6716        width: rects.floating.width,
6717        height: rects.floating.height
6718      }
6719    };
6720    return data;
6721  }
6722  function useAnchorPositioning(params) {
6723    const {
6724      // Public parameters
6725      anchor,
6726      positionMethod = "absolute",
6727      side: sideParam = "bottom",
6728      sideOffset = 0,
6729      align = "center",
6730      alignOffset = 0,
6731      collisionBoundary,
6732      collisionPadding: collisionPaddingParam = 5,
6733      sticky = false,
6734      arrowPadding = 5,
6735      disableAnchorTracking = false,
6736      inline: inlineMiddleware,
6737      // Private parameters
6738      keepMounted = false,
6739      floatingRootContext,
6740      mounted,
6741      collisionAvoidance,
6742      shiftCrossAxis = false,
6743      nodeId,
6744      adaptiveOrigin: adaptiveOrigin2,
6745      lazyFlip = false,
6746      externalTree
6747    } = params;
6748    const [mountSide, setMountSide] = React29.useState(null);
6749    if (!mounted && mountSide !== null) {
6750      setMountSide(null);
6751    }
6752    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
6753    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
6754    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
6755    const anchorFn = typeof anchor === "function" ? anchor : void 0;
6756    const anchorFnCallback = useStableCallback(anchorFn);
6757    const anchorDep = anchorFn ? anchorFnCallback : anchor;
6758    const anchorValueRef = useValueAsRef(anchor);
6759    const mountedRef = useValueAsRef(mounted);
6760    const direction = useDirection();
6761    const isRtl = direction === "rtl";
6762    const side = mountSide || {
6763      top: "top",
6764      right: "right",
6765      bottom: "bottom",
6766      left: "left",
6767      "inline-end": isRtl ? "left" : "right",
6768      "inline-start": isRtl ? "right" : "left"
6769    }[sideParam];
6770    const placement = align === "center" ? side : `$side}-$align}`;
6771    let collisionPadding = collisionPaddingParam;
6772    const bias = 1;
6773    const biasTop = sideParam === "bottom" ? bias : 0;
6774    const biasBottom = sideParam === "top" ? bias : 0;
6775    const biasLeft = sideParam === "right" ? bias : 0;
6776    const biasRight = sideParam === "left" ? bias : 0;
6777    if (typeof collisionPadding === "number") {
6778      collisionPadding = {
6779        top: collisionPadding + biasTop,
6780        right: collisionPadding + biasRight,
6781        bottom: collisionPadding + biasBottom,
6782        left: collisionPadding + biasLeft
6783      };
6784    } else if (collisionPadding) {
6785      collisionPadding = {
6786        top: (collisionPadding.top || 0) + biasTop,
6787        right: (collisionPadding.right || 0) + biasRight,
6788        bottom: (collisionPadding.bottom || 0) + biasBottom,
6789        left: (collisionPadding.left || 0) + biasLeft
6790      };
6791    }
6792    const commonCollisionProps = {
6793      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
6794      padding: collisionPadding
6795    };
6796    const arrowRef = React29.useRef(null);
6797    const sideOffsetRef = useValueAsRef(sideOffset);
6798    const alignOffsetRef = useValueAsRef(alignOffset);
6799    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
6800    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
6801    const middleware = [];
6802    if (inlineMiddleware) {
6803      middleware.push(inlineMiddleware);
6804    }
6805    middleware.push(offset3((state) => {
6806      const data = getOffsetData(state, sideParam, isRtl);
6807      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
6808      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
6809      return {
6810        mainAxis: sideAxis,
6811        crossAxis: alignAxis,
6812        alignmentAxis: alignAxis
6813      };
6814    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
6815    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
6816    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
6817    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
6818      ...commonCollisionProps,
6819      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
6820      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
6821      padding: {
6822        top: collisionPadding.top + bias,
6823        right: collisionPadding.right + bias,
6824        bottom: collisionPadding.bottom + bias,
6825        left: collisionPadding.left + bias
6826      },
6827      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
6828      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
6829      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
6830    });
6831    const shiftMiddleware = shiftDisabled ? null : shift3((data) => {
6832      const html = ownerDocument(data.elements.floating).documentElement;
6833      return {
6834        ...commonCollisionProps,
6835        // Use the Layout Viewport to avoid shifting around when pinch-zooming
6836        // for context menus.
6837        rootBoundary: shiftCrossAxis ? {
6838          x: 0,
6839          y: 0,
6840          width: html.clientWidth,
6841          height: html.clientHeight
6842        } : void 0,
6843        mainAxis: collisionAvoidanceAlign !== "none",
6844        crossAxis: crossAxisShiftEnabled,
6845        limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
6846          if (!arrowRef.current) {
6847            return {};
6848          }
6849          const {
6850            width,
6851            height
6852          } = arrowRef.current.getBoundingClientRect();
6853          const sideAxis = getSideAxis(getSide(limitData.placement));
6854          const arrowSize = sideAxis === "y" ? width : height;
6855          const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
6856          return {
6857            offset: arrowSize / 2 + offsetAmount / 2
6858          };
6859        })
6860      };
6861    }, [commonCollisionProps, sticky, shiftCrossAxis, collisionPadding, collisionAvoidanceAlign]);
6862    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
6863      middleware.push(shiftMiddleware, flipMiddleware);
6864    } else {
6865      middleware.push(flipMiddleware, shiftMiddleware);
6866    }
6867    middleware.push(size3({
6868      ...commonCollisionProps,
6869      apply({
6870        elements: {
6871          floating
6872        },
6873        availableWidth,
6874        availableHeight,
6875        rects
6876      }) {
6877        if (!mountedRef.current) {
6878          return;
6879        }
6880        const floatingStyle = floating.style;
6881        floatingStyle.setProperty("--available-width", `$availableWidth}px`);
6882        floatingStyle.setProperty("--available-height", `$availableHeight}px`);
6883        const dpr = getWindow(floating).devicePixelRatio || 1;
6884        const {
6885          x: x2,
6886          y: y2,
6887          width,
6888          height
6889        } = rects.reference;
6890        const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
6891        const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
6892        floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
6893        floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
6894      }
6895    }), arrow4((state) => ({
6896      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
6897      // we'll create a fake element.
6898      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
6899      padding: arrowPadding,
6900      offsetParent: "floating"
6901    }), [arrowPadding]), {
6902      name: "transformOrigin",
6903      fn(state) {
6904        const {
6905          elements: elements2,
6906          middlewareData: middlewareData2,
6907          placement: renderedPlacement2,
6908          rects,
6909          y: y2
6910        } = state;
6911        const currentRenderedSide = getSide(renderedPlacement2);
6912        const currentRenderedAxis = getSideAxis(currentRenderedSide);
6913        const arrowEl = arrowRef.current;
6914        const arrowX = middlewareData2.arrow?.x || 0;
6915        const arrowY = middlewareData2.arrow?.y || 0;
6916        const arrowWidth = arrowEl?.clientWidth || 0;
6917        const arrowHeight = arrowEl?.clientHeight || 0;
6918        const transformX = arrowX + arrowWidth / 2;
6919        const transformY = arrowY + arrowHeight / 2;
6920        const shiftY = Math.abs(middlewareData2.shift?.y || 0);
6921        const halfAnchorHeight = rects.reference.height / 2;
6922        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
6923        const isOverlappingAnchor = shiftY > sideOffsetValue;
6924        const adjacentTransformOrigin = {
6925          top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
6926          bottom: `$transformX}px ${-sideOffsetValue}px`,
6927          left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
6928          right: `${-sideOffsetValue}px $transformY}px`
6929        }[currentRenderedSide];
6930        const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y2}px`;
6931        elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
6932        return {};
6933      }
6934    }, hide4, adaptiveOrigin2);
6935    useIsoLayoutEffect(() => {
6936      if (!mounted && floatingRootContext) {
6937        floatingRootContext.update({
6938          referenceElement: null,
6939          floatingElement: null,
6940          domReferenceElement: null,
6941          positionReference: null
6942        });
6943      }
6944    }, [mounted, floatingRootContext]);
6945    const autoUpdateOptions = React29.useMemo(() => ({
6946      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
6947      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
6948    }), [disableAnchorTracking]);
6949    const {
6950      refs,
6951      elements,
6952      x,
6953      y,
6954      middlewareData,
6955      update: update2,
6956      placement: renderedPlacement,
6957      context,
6958      isPositioned,
6959      floatingStyles: originalFloatingStyles
6960    } = useFloating2({
6961      rootContext: floatingRootContext,
6962      open: keepMounted ? mounted : void 0,
6963      placement,
6964      middleware,
6965      strategy: positionMethod,
6966      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
6967      nodeId,
6968      externalTree
6969    });
6970    const {
6971      sideX,
6972      sideY
6973    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
6974    const resolvedPosition = isPositioned ? positionMethod : "fixed";
6975    const floatingStyles = React29.useMemo(() => {
6976      const base = adaptiveOrigin2 ? {
6977        position: resolvedPosition,
6978        [sideX]: x,
6979        [sideY]: y
6980      } : {
6981        position: resolvedPosition,
6982        ...originalFloatingStyles
6983      };
6984      if (!isPositioned) {
6985        base.opacity = 0;
6986      }
6987      return base;
6988    }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
6989    const registeredPositionReferenceRef = React29.useRef(null);
6990    useIsoLayoutEffect(() => {
6991      if (!mounted) {
6992        return;
6993      }
6994      const anchorValue = anchorValueRef.current;
6995      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
6996      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
6997      const finalAnchor = unwrappedElement || null;
6998      if (finalAnchor !== registeredPositionReferenceRef.current) {
6999        refs.setPositionReference(finalAnchor);
7000        registeredPositionReferenceRef.current = finalAnchor;
7001      }
7002    }, [mounted, refs, anchorDep, anchorValueRef]);
7003    React29.useEffect(() => {
7004      if (!mounted) {
7005        return;
7006      }
7007      const anchorValue = anchorValueRef.current;
7008      if (typeof anchorValue === "function") {
7009        return;
7010      }
7011      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7012        refs.setPositionReference(anchorValue.current);
7013        registeredPositionReferenceRef.current = anchorValue.current;
7014      }
7015    }, [mounted, refs, anchorDep, anchorValueRef]);
7016    React29.useEffect(() => {
7017      if (keepMounted && mounted && elements.domReference && elements.floating) {
7018        return autoUpdate(elements.domReference, elements.floating, update2, autoUpdateOptions);
7019      }
7020      return void 0;
7021    }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7022    const renderedSide = getSide(renderedPlacement);
7023    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7024    const renderedAlign = getAlignment(renderedPlacement) || "center";
7025    const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
7026    useIsoLayoutEffect(() => {
7027      if (lazyFlip && mounted && isPositioned) {
7028        setMountSide(renderedSide);
7029      }
7030    }, [lazyFlip, mounted, isPositioned, renderedSide]);
7031    const arrowStyles = React29.useMemo(() => ({
7032      position: "absolute",
7033      top: middlewareData.arrow?.y,
7034      left: middlewareData.arrow?.x
7035    }), [middlewareData.arrow]);
7036    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7037    return React29.useMemo(() => ({
7038      positionerStyles: floatingStyles,
7039      arrowStyles,
7040      arrowRef,
7041      arrowUncentered,
7042      side: logicalRenderedSide,
7043      align: renderedAlign,
7044      physicalSide: renderedSide,
7045      anchorHidden,
7046      refs,
7047      context,
7048      isPositioned,
7049      update: update2
7050    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
7051  }
7052  function isRef(param) {
7053    return param != null && "current" in param;
7054  }
7055  
7056  // node_modules/@base-ui/react/esm/utils/getDisabledMountTransitionStyles.js
7057  function getDisabledMountTransitionStyles(transitionStatus) {
7058    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7059  }
7060  
7061  // node_modules/@base-ui/react/esm/utils/usePositioner.js
7062  function usePositioner(componentProps, state, {
7063    styles,
7064    transitionStatus,
7065    props,
7066    refs,
7067    hidden,
7068    inert = false
7069  }) {
7070    const style = {
7071      ...styles
7072    };
7073    if (inert) {
7074      style.pointerEvents = "none";
7075    }
7076    return useRenderElement("div", componentProps, {
7077      state,
7078      ref: refs,
7079      props: [{
7080        role: "presentation",
7081        hidden,
7082        style
7083      }, getDisabledMountTransitionStyles(transitionStatus), props],
7084      stateAttributesMapping: popupStateMapping
7085    });
7086  }
7087  
7088  // node_modules/@base-ui/react/esm/utils/usePopupViewport.js
7089  var React32 = __toESM(require_react(), 1);
7090  var ReactDOM5 = __toESM(require_react_dom(), 1);
7091  
7092  // node_modules/@base-ui/utils/esm/usePreviousValue.js
7093  var React30 = __toESM(require_react(), 1);
7094  function usePreviousValue(value) {
7095    const [state, setState] = React30.useState({
7096      current: value,
7097      previous: null
7098    });
7099    if (value !== state.current) {
7100      setState({
7101        current: value,
7102        previous: state.current
7103      });
7104    }
7105    return state.previous;
7106  }
7107  
7108  // node_modules/@base-ui/react/esm/utils/usePopupAutoResize.js
7109  var React31 = __toESM(require_react(), 1);
7110  
7111  // node_modules/@base-ui/react/esm/utils/getCssDimensions.js
7112  function getCssDimensions2(element) {
7113    const css = getComputedStyle2(element);
7114    let width = parseFloat(css.width) || 0;
7115    let height = parseFloat(css.height) || 0;
7116    const hasOffset = isHTMLElement(element);
7117    const offsetWidth = hasOffset ? element.offsetWidth : width;
7118    const offsetHeight = hasOffset ? element.offsetHeight : height;
7119    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7120    if (shouldFallback) {
7121      width = offsetWidth;
7122      height = offsetHeight;
7123    }
7124    return {
7125      width,
7126      height
7127    };
7128  }
7129  
7130  // node_modules/@base-ui/react/esm/utils/usePopupAutoResize.js
7131  var DEFAULT_ENABLED = () => true;
7132  function usePopupAutoResize(parameters) {
7133    const {
7134      popupElement,
7135      positionerElement,
7136      content,
7137      mounted,
7138      enabled = DEFAULT_ENABLED,
7139      onMeasureLayout: onMeasureLayoutParam,
7140      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7141      side,
7142      direction
7143    } = parameters;
7144    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true, false);
7145    const animationFrame = useAnimationFrame();
7146    const committedDimensionsRef = React31.useRef(null);
7147    const liveDimensionsRef = React31.useRef(null);
7148    const isInitialRenderRef = React31.useRef(true);
7149    const restoreAnchoringStylesRef = React31.useRef(NOOP);
7150    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7151    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7152    const anchoringStyles = React31.useMemo(() => {
7153      let isOriginSide = side === "top";
7154      let isPhysicalLeft = side === "left";
7155      if (direction === "rtl") {
7156        isOriginSide = isOriginSide || side === "inline-end";
7157        isPhysicalLeft = isPhysicalLeft || side === "inline-end";
7158      } else {
7159        isOriginSide = isOriginSide || side === "inline-start";
7160        isPhysicalLeft = isPhysicalLeft || side === "inline-start";
7161      }
7162      return isOriginSide ? {
7163        position: "absolute",
7164        [side === "top" ? "bottom" : "top"]: "0",
7165        [isPhysicalLeft ? "right" : "left"]: "0"
7166      } : EMPTY_OBJECT;
7167    }, [side, direction]);
7168    useIsoLayoutEffect(() => {
7169      if (!mounted || !enabled() || typeof ResizeObserver !== "function") {
7170        restoreAnchoringStylesRef.current = NOOP;
7171        isInitialRenderRef.current = true;
7172        committedDimensionsRef.current = null;
7173        liveDimensionsRef.current = null;
7174        return void 0;
7175      }
7176      if (!popupElement || !positionerElement) {
7177        return void 0;
7178      }
7179      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7180      const observer = new ResizeObserver((entries) => {
7181        const entry = entries[0];
7182        if (entry) {
7183          liveDimensionsRef.current = {
7184            width: Math.ceil(entry.borderBoxSize[0].inlineSize),
7185            height: Math.ceil(entry.borderBoxSize[0].blockSize)
7186          };
7187        }
7188      });
7189      observer.observe(popupElement);
7190      setPopupCssSize(popupElement, "auto");
7191      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7192      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7193      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7194      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7195        "--available-width": "max-content",
7196        "--available-height": "max-content"
7197      });
7198      function restoreMeasurementOverrides() {
7199        restorePopupPosition();
7200        restorePopupTransform();
7201        restorePositionerAvailableSize();
7202      }
7203      function restoreMeasurementOverridesIncludingScale() {
7204        restoreMeasurementOverrides();
7205        restorePopupScale();
7206      }
7207      onMeasureLayout?.();
7208      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7209        setPositionerCssSize(positionerElement, "max-content");
7210        const dimensions = getCssDimensions2(popupElement);
7211        committedDimensionsRef.current = dimensions;
7212        setPositionerCssSize(positionerElement, dimensions);
7213        restoreMeasurementOverridesIncludingScale();
7214        onMeasureLayoutComplete?.(null, dimensions);
7215        isInitialRenderRef.current = false;
7216        return () => {
7217          observer.disconnect();
7218          restoreAnchoringStylesRef.current();
7219          restoreAnchoringStylesRef.current = NOOP;
7220        };
7221      }
7222      setPopupCssSize(popupElement, "auto");
7223      setPositionerCssSize(positionerElement, "max-content");
7224      const previousDimensions = committedDimensionsRef.current ?? liveDimensionsRef.current;
7225      const newDimensions = getCssDimensions2(popupElement);
7226      committedDimensionsRef.current = newDimensions;
7227      if (!previousDimensions) {
7228        setPositionerCssSize(positionerElement, newDimensions);
7229        restoreMeasurementOverridesIncludingScale();
7230        onMeasureLayoutComplete?.(null, newDimensions);
7231        return () => {
7232          observer.disconnect();
7233          animationFrame.cancel();
7234          restoreAnchoringStylesRef.current();
7235          restoreAnchoringStylesRef.current = NOOP;
7236        };
7237      }
7238      setPopupCssSize(popupElement, previousDimensions);
7239      restoreMeasurementOverridesIncludingScale();
7240      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7241      setPositionerCssSize(positionerElement, newDimensions);
7242      const abortController = new AbortController();
7243      animationFrame.request(() => {
7244        setPopupCssSize(popupElement, newDimensions);
7245        runOnceAnimationsFinish(() => {
7246          popupElement.style.setProperty("--popup-width", "auto");
7247          popupElement.style.setProperty("--popup-height", "auto");
7248        }, abortController.signal);
7249      });
7250      return () => {
7251        observer.disconnect();
7252        abortController.abort();
7253        animationFrame.cancel();
7254        restoreAnchoringStylesRef.current();
7255        restoreAnchoringStylesRef.current = NOOP;
7256      };
7257    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, enabled, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7258  }
7259  function overrideElementStyle(element, property, value) {
7260    const originalValue = element.style.getPropertyValue(property);
7261    element.style.setProperty(property, value);
7262    return () => {
7263      element.style.setProperty(property, originalValue);
7264    };
7265  }
7266  function applyElementStyles(element, styles) {
7267    const restorers = [];
7268    for (const [key, value] of Object.entries(styles)) {
7269      restorers.push(overrideElementStyle(element, key, value));
7270    }
7271    return restorers.length ? () => {
7272      restorers.forEach((restore) => restore());
7273    } : NOOP;
7274  }
7275  function setPopupCssSize(popupElement, size4) {
7276    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7277    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7278    popupElement.style.setProperty("--popup-width", width);
7279    popupElement.style.setProperty("--popup-height", height);
7280  }
7281  function setPositionerCssSize(positionerElement, size4) {
7282    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7283    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7284    positionerElement.style.setProperty("--positioner-width", width);
7285    positionerElement.style.setProperty("--positioner-height", height);
7286  }
7287  
7288  // node_modules/@base-ui/react/esm/utils/usePopupViewport.js
7289  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7290  function usePopupViewport(parameters) {
7291    const {
7292      store: store2,
7293      side,
7294      cssVars,
7295      children
7296    } = parameters;
7297    const direction = useDirection();
7298    const activeTrigger = store2.useState("activeTriggerElement");
7299    const activeTriggerId = store2.useState("activeTriggerId");
7300    const open = store2.useState("open");
7301    const payload = store2.useState("payload");
7302    const mounted = store2.useState("mounted");
7303    const popupElement = store2.useState("popupElement");
7304    const positionerElement = store2.useState("positionerElement");
7305    const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
7306    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7307    const capturedNodeRef = React32.useRef(null);
7308    const [previousContentNode, setPreviousContentNode] = React32.useState(null);
7309    const [newTriggerOffset, setNewTriggerOffset] = React32.useState(null);
7310    const currentContainerRef = React32.useRef(null);
7311    const previousContainerRef = React32.useRef(null);
7312    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true, false);
7313    const cleanupFrame = useAnimationFrame();
7314    const [previousContentDimensions, setPreviousContentDimensions] = React32.useState(null);
7315    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React32.useState(false);
7316    useIsoLayoutEffect(() => {
7317      store2.set("hasViewport", true);
7318      return () => {
7319        store2.set("hasViewport", false);
7320      };
7321    }, [store2]);
7322    const handleMeasureLayout = useStableCallback(() => {
7323      currentContainerRef.current?.style.setProperty("animation", "none");
7324      currentContainerRef.current?.style.setProperty("transition", "none");
7325      previousContainerRef.current?.style.setProperty("display", "none");
7326    });
7327    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7328      currentContainerRef.current?.style.removeProperty("animation");
7329      currentContainerRef.current?.style.removeProperty("transition");
7330      previousContainerRef.current?.style.removeProperty("display");
7331      if (previousDimensions) {
7332        setPreviousContentDimensions(previousDimensions);
7333      }
7334    });
7335    const lastHandledTriggerRef = React32.useRef(null);
7336    useIsoLayoutEffect(() => {
7337      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7338        setPreviousContentNode(capturedNodeRef.current);
7339        setShowStartingStyleAttribute(true);
7340        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7341        setNewTriggerOffset(offset4);
7342        cleanupFrame.request(() => {
7343          ReactDOM5.flushSync(() => {
7344            setShowStartingStyleAttribute(false);
7345          });
7346          onAnimationsFinished(() => {
7347            setPreviousContentNode(null);
7348            setPreviousContentDimensions(null);
7349            capturedNodeRef.current = null;
7350          });
7351        });
7352        lastHandledTriggerRef.current = activeTrigger;
7353      }
7354    }, [activeTrigger, previousActiveTrigger, previousContentNode, onAnimationsFinished, cleanupFrame]);
7355    useIsoLayoutEffect(() => {
7356      const source = currentContainerRef.current;
7357      if (!source) {
7358        return;
7359      }
7360      const wrapper = ownerDocument(source).createElement("div");
7361      for (const child of Array.from(source.childNodes)) {
7362        wrapper.appendChild(child.cloneNode(true));
7363      }
7364      capturedNodeRef.current = wrapper;
7365    });
7366    const isTransitioning = previousContentNode != null;
7367    let childrenToRender;
7368    if (!isTransitioning) {
7369      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7370        "data-current": true,
7371        ref: currentContainerRef,
7372        children
7373      }, currentContentKey);
7374    } else {
7375      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(React32.Fragment, {
7376        children: [/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7377          "data-previous": true,
7378          inert: inertValue(true),
7379          ref: previousContainerRef,
7380          style: {
7381            ...previousContentDimensions ? {
7382              [cssVars.popupWidth]: `$previousContentDimensions.width}px`,
7383              [cssVars.popupHeight]: `$previousContentDimensions.height}px`
7384            } : null,
7385            position: "absolute"
7386          },
7387          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7388        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7389          "data-current": true,
7390          ref: currentContainerRef,
7391          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7392          children
7393        }, currentContentKey)]
7394      });
7395    }
7396    useIsoLayoutEffect(() => {
7397      const container = previousContainerRef.current;
7398      if (!container || !previousContentNode) {
7399        return;
7400      }
7401      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7402    }, [previousContentNode]);
7403    usePopupAutoResize({
7404      popupElement,
7405      positionerElement,
7406      mounted,
7407      content: payload,
7408      onMeasureLayout: handleMeasureLayout,
7409      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7410      side,
7411      direction
7412    });
7413    const state = {
7414      activationDirection: getActivationDirection(newTriggerOffset),
7415      transitioning: isTransitioning
7416    };
7417    return {
7418      children: childrenToRender,
7419      state
7420    };
7421  }
7422  function getActivationDirection(offset4) {
7423    if (!offset4) {
7424      return void 0;
7425    }
7426    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7427  }
7428  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7429    if (value > tolerance) {
7430      return positiveLabel;
7431    }
7432    if (value < -tolerance) {
7433      return negativeLabel;
7434    }
7435    return "";
7436  }
7437  function calculateRelativePosition(from, to) {
7438    const fromRect = from.getBoundingClientRect();
7439    const toRect = to.getBoundingClientRect();
7440    const fromCenter = {
7441      x: fromRect.left + fromRect.width / 2,
7442      y: fromRect.top + fromRect.height / 2
7443    };
7444    const toCenter = {
7445      x: toRect.left + toRect.width / 2,
7446      y: toRect.top + toRect.height / 2
7447    };
7448    return {
7449      horizontal: toCenter.x - fromCenter.x,
7450      vertical: toCenter.y - fromCenter.y
7451    };
7452  }
7453  function usePopupContentKey(activeTriggerId, payload) {
7454    const [contentKey, setContentKey] = React32.useState(0);
7455    const previousActiveTriggerIdRef = React32.useRef(activeTriggerId);
7456    const previousPayloadRef = React32.useRef(payload);
7457    const pendingPayloadUpdateRef = React32.useRef(false);
7458    useIsoLayoutEffect(() => {
7459      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7460      const previousPayload = previousPayloadRef.current;
7461      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7462      const payloadChanged = payload !== previousPayload;
7463      if (triggerIdChanged) {
7464        setContentKey((value) => value + 1);
7465        pendingPayloadUpdateRef.current = !payloadChanged;
7466      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7467        setContentKey((value) => value + 1);
7468        pendingPayloadUpdateRef.current = false;
7469      }
7470      previousActiveTriggerIdRef.current = activeTriggerId;
7471      previousPayloadRef.current = payload;
7472    }, [activeTriggerId, payload]);
7473    return `$activeTriggerId ?? "current"}-$contentKey}`;
7474  }
7475  
7476  // node_modules/@base-ui/react/esm/utils/FloatingPortalLite.js
7477  var React33 = __toESM(require_react(), 1);
7478  var ReactDOM6 = __toESM(require_react_dom(), 1);
7479  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7480  var FloatingPortalLite = /* @__PURE__ */ React33.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7481    const {
7482      children,
7483      container,
7484      className,
7485      render,
7486      style,
7487      ...elementProps
7488    } = componentProps;
7489    const {
7490      portalNode,
7491      portalSubtree
7492    } = useFloatingPortalNode({
7493      container,
7494      ref: forwardedRef,
7495      componentProps,
7496      elementProps
7497    });
7498    if (!portalSubtree && !portalNode) {
7499      return null;
7500    }
7501    return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React33.Fragment, {
7502      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM6.createPortal(children, portalNode)]
7503    });
7504  });
7505  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7506  
7507  // node_modules/@base-ui/react/esm/tooltip/index.parts.js
7508  var index_parts_exports = {};
7509  __export(index_parts_exports, {
7510    Arrow: () => TooltipArrow,
7511    Handle: () => TooltipHandle,
7512    Popup: () => TooltipPopup,
7513    Portal: () => TooltipPortal,
7514    Positioner: () => TooltipPositioner,
7515    Provider: () => TooltipProvider,
7516    Root: () => TooltipRoot,
7517    Trigger: () => TooltipTrigger,
7518    Viewport: () => TooltipViewport,
7519    createHandle: () => createTooltipHandle
7520  });
7521  
7522  // node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
7523  var React36 = __toESM(require_react(), 1);
7524  
7525  // node_modules/@base-ui/react/esm/tooltip/root/TooltipRootContext.js
7526  var React34 = __toESM(require_react(), 1);
7527  var TooltipRootContext = /* @__PURE__ */ React34.createContext(void 0);
7528  if (true) TooltipRootContext.displayName = "TooltipRootContext";
7529  function useTooltipRootContext(optional) {
7530    const context = React34.useContext(TooltipRootContext);
7531    if (context === void 0 && !optional) {
7532      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7533    }
7534    return context;
7535  }
7536  
7537  // node_modules/@base-ui/react/esm/tooltip/store/TooltipStore.js
7538  var React35 = __toESM(require_react(), 1);
7539  var ReactDOM7 = __toESM(require_react_dom(), 1);
7540  var selectors2 = {
7541    ...popupStoreSelectors,
7542    disabled: createSelector((state) => state.disabled),
7543    instantType: createSelector((state) => state.instantType),
7544    isInstantPhase: createSelector((state) => state.isInstantPhase),
7545    trackCursorAxis: createSelector((state) => state.trackCursorAxis),
7546    disableHoverablePopup: createSelector((state) => state.disableHoverablePopup),
7547    lastOpenChangeReason: createSelector((state) => state.openChangeReason),
7548    closeOnClick: createSelector((state) => state.closeOnClick),
7549    closeDelay: createSelector((state) => state.closeDelay),
7550    hasViewport: createSelector((state) => state.hasViewport)
7551  };
7552  var TooltipStore = class _TooltipStore extends ReactStore {
7553    constructor(initialState2, floatingId, nested = false) {
7554      const triggerElements = new PopupTriggerMap();
7555      const state = {
7556        ...createInitialState(),
7557        ...initialState2
7558      };
7559      state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
7560      super(state, {
7561        popupRef: /* @__PURE__ */ React35.createRef(),
7562        onOpenChange: void 0,
7563        onOpenChangeComplete: void 0,
7564        triggerElements
7565      }, selectors2);
7566    }
7567    setOpen = (nextOpen, eventDetails) => {
7568      const reason = eventDetails.reason;
7569      const isHover = reason === reason_parts_exports.triggerHover;
7570      const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
7571      const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
7572      eventDetails.preventUnmountOnClose = () => {
7573        this.set("preventUnmountingOnClose", true);
7574      };
7575      this.context.onOpenChange?.(nextOpen, eventDetails);
7576      if (eventDetails.isCanceled) {
7577        return;
7578      }
7579      this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
7580      const changeState = () => {
7581        const updatedState = {
7582          open: nextOpen,
7583          openChangeReason: reason
7584        };
7585        if (isFocusOpen) {
7586          updatedState.instantType = "focus";
7587        } else if (isDismissClose) {
7588          updatedState.instantType = "dismiss";
7589        } else if (reason === reason_parts_exports.triggerHover) {
7590          updatedState.instantType = void 0;
7591        }
7592        setOpenTriggerState(updatedState, nextOpen, eventDetails.trigger);
7593        this.update(updatedState);
7594      };
7595      if (isHover) {
7596        ReactDOM7.flushSync(changeState);
7597      } else {
7598        changeState();
7599      }
7600    };
7601    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7602    cancelPendingOpen(event) {
7603      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7604    }
7605    static useStore(externalStore, initialState2) {
7606      const store2 = usePopupStore(externalStore, (floatingId, nested) => new _TooltipStore(initialState2, floatingId, nested)).store;
7607      return store2;
7608    }
7609  };
7610  function createInitialState() {
7611    return {
7612      ...createInitialPopupStoreState(),
7613      disabled: false,
7614      instantType: void 0,
7615      isInstantPhase: false,
7616      trackCursorAxis: "none",
7617      disableHoverablePopup: false,
7618      openChangeReason: null,
7619      closeOnClick: true,
7620      closeDelay: 0,
7621      hasViewport: false
7622    };
7623  }
7624  
7625  // node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
7626  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7627  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
7628    const {
7629      disabled: disabled2 = false,
7630      defaultOpen = false,
7631      open: openProp,
7632      disableHoverablePopup = false,
7633      trackCursorAxis = "none",
7634      actionsRef,
7635      onOpenChange,
7636      onOpenChangeComplete,
7637      handle,
7638      triggerId: triggerIdProp,
7639      defaultTriggerId: defaultTriggerIdProp = null,
7640      children
7641    } = props;
7642    const store2 = TooltipStore.useStore(handle?.store, {
7643      open: defaultOpen,
7644      openProp,
7645      activeTriggerId: defaultTriggerIdProp,
7646      triggerIdProp
7647    });
7648    useOnFirstRender(() => {
7649      if (openProp === void 0 && store2.state.open === false && defaultOpen === true) {
7650        store2.update({
7651          open: true,
7652          activeTriggerId: defaultTriggerIdProp
7653        });
7654      }
7655    });
7656    store2.useControlledProp("openProp", openProp);
7657    store2.useControlledProp("triggerIdProp", triggerIdProp);
7658    store2.useContextCallback("onOpenChange", onOpenChange);
7659    store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
7660    const openState = store2.useState("open");
7661    const open = !disabled2 && openState;
7662    const activeTriggerId = store2.useState("activeTriggerId");
7663    const mounted = store2.useState("mounted");
7664    const payload = store2.useState("payload");
7665    store2.useSyncedValues({
7666      trackCursorAxis,
7667      disableHoverablePopup
7668    });
7669    store2.useSyncedValue("disabled", disabled2);
7670    useImplicitActiveTrigger(store2);
7671    const {
7672      forceUnmount,
7673      transitionStatus
7674    } = useOpenStateTransitions(open, store2);
7675    const isInstantPhase = store2.useState("isInstantPhase");
7676    const instantType = store2.useState("instantType");
7677    const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
7678    const previousInstantTypeRef = React36.useRef(null);
7679    useIsoLayoutEffect(() => {
7680      if (openState && disabled2) {
7681        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
7682      }
7683    }, [openState, disabled2, store2]);
7684    useIsoLayoutEffect(() => {
7685      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
7686        if (instantType !== "delay") {
7687          previousInstantTypeRef.current = instantType;
7688        }
7689        store2.set("instantType", "delay");
7690      } else if (previousInstantTypeRef.current !== null) {
7691        store2.set("instantType", previousInstantTypeRef.current);
7692        previousInstantTypeRef.current = null;
7693      }
7694    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
7695    useIsoLayoutEffect(() => {
7696      if (open) {
7697        if (activeTriggerId == null) {
7698          store2.set("payload", void 0);
7699        }
7700      }
7701    }, [store2, activeTriggerId, open]);
7702    const handleImperativeClose = React36.useCallback(() => {
7703      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
7704    }, [store2]);
7705    React36.useImperativeHandle(actionsRef, () => ({
7706      unmount: forceUnmount,
7707      close: handleImperativeClose
7708    }), [forceUnmount, handleImperativeClose]);
7709    const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
7710    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(TooltipRootContext.Provider, {
7711      value: store2,
7712      children: [shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TooltipInteractions, {
7713        store: store2,
7714        disabled: disabled2,
7715        trackCursorAxis
7716      }), typeof children === "function" ? children({
7717        payload
7718      }) : children]
7719    });
7720  });
7721  if (true) TooltipRoot.displayName = "TooltipRoot";
7722  function TooltipInteractions({
7723    store: store2,
7724    disabled: disabled2,
7725    trackCursorAxis
7726  }) {
7727    const floatingRootContext = store2.useState("floatingRootContext");
7728    const dismiss = useDismiss(floatingRootContext, {
7729      enabled: !disabled2,
7730      referencePress: () => store2.select("closeOnClick")
7731    });
7732    const clientPoint = useClientPoint(floatingRootContext, {
7733      enabled: !disabled2 && trackCursorAxis !== "none",
7734      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
7735    });
7736    const activeTriggerProps = React36.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
7737    const inactiveTriggerProps = React36.useMemo(() => mergeProps(clientPoint.trigger, dismiss.trigger), [clientPoint.trigger, dismiss.trigger]);
7738    const popupProps = React36.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, clientPoint.floating, dismiss.floating), [clientPoint.floating, dismiss.floating]);
7739    usePopupInteractionProps(store2, {
7740      activeTriggerProps,
7741      inactiveTriggerProps,
7742      popupProps
7743    });
7744    return null;
7745  }
7746  
7747  // node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js
7748  var React38 = __toESM(require_react(), 1);
7749  
7750  // node_modules/@base-ui/react/esm/tooltip/provider/TooltipProviderContext.js
7751  var React37 = __toESM(require_react(), 1);
7752  var TooltipProviderContext = /* @__PURE__ */ React37.createContext(void 0);
7753  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
7754  function useTooltipProviderContext() {
7755    return React37.useContext(TooltipProviderContext);
7756  }
7757  
7758  // node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTriggerDataAttributes.js
7759  var TooltipTriggerDataAttributes = (function(TooltipTriggerDataAttributes2) {
7760    TooltipTriggerDataAttributes2[TooltipTriggerDataAttributes2["popupOpen"] = CommonTriggerDataAttributes.popupOpen] = "popupOpen";
7761    TooltipTriggerDataAttributes2["triggerDisabled"] = "data-trigger-disabled";
7762    return TooltipTriggerDataAttributes2;
7763  })({});
7764  
7765  // node_modules/@base-ui/react/esm/tooltip/utils/constants.js
7766  var OPEN_DELAY = 600;
7767  
7768  // node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js
7769  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
7770  function getTargetElement(event) {
7771    if ("composedPath" in event) {
7772      const path = event.composedPath();
7773      for (let i = 0; i < path.length; i += 1) {
7774        const element = path[i];
7775        if (isElement(element)) {
7776          return element;
7777        }
7778      }
7779    }
7780    const target = event.target;
7781    if (isElement(target)) {
7782      return target;
7783    }
7784    return null;
7785  }
7786  function closestEnabledTooltipTrigger(element) {
7787    let current = element;
7788    while (current) {
7789      if (current.hasAttribute(TOOLTIP_TRIGGER_IDENTIFIER)) {
7790        return current;
7791      }
7792      const parentElement = current.parentElement;
7793      if (parentElement) {
7794        current = parentElement;
7795        continue;
7796      }
7797      const root = current.getRootNode();
7798      current = "host" in root && isElement(root.host) ? root.host : null;
7799    }
7800    return null;
7801  }
7802  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
7803    const {
7804      render,
7805      className,
7806      style,
7807      handle,
7808      payload,
7809      disabled: disabledProp,
7810      delay,
7811      closeOnClick = true,
7812      closeDelay,
7813      id: idProp,
7814      ...elementProps
7815    } = componentProps;
7816    const rootContext = useTooltipRootContext(true);
7817    const store2 = handle?.store ?? rootContext;
7818    if (!store2) {
7819      throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82));
7820    }
7821    const thisTriggerId = useBaseUiId(idProp);
7822    const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
7823    const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
7824    const floatingRootContext = store2.useState("floatingRootContext");
7825    const triggerElementRef = React38.useRef(null);
7826    const delayWithDefault = delay ?? OPEN_DELAY;
7827    const closeDelayWithDefault = closeDelay ?? 0;
7828    const {
7829      registerTrigger,
7830      isMountedByThisTrigger
7831    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
7832      payload,
7833      closeOnClick,
7834      closeDelay: closeDelayWithDefault
7835    });
7836    const providerContext = useTooltipProviderContext();
7837    const {
7838      delayRef,
7839      isInstantPhase,
7840      hasProvider
7841    } = useDelayGroup(floatingRootContext, {
7842      open: isOpenedByThisTrigger
7843    });
7844    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
7845    store2.useSyncedValue("isInstantPhase", isInstantPhase);
7846    const rootDisabled = store2.useState("disabled");
7847    const disabled2 = disabledProp ?? rootDisabled;
7848    const disabledRef = useValueAsRef(disabled2);
7849    const trackCursorAxis = store2.useState("trackCursorAxis");
7850    const disableHoverablePopup = store2.useState("disableHoverablePopup");
7851    const isNestedTriggerHoveredRef = React38.useRef(false);
7852    const nestedTriggerOpenTimeout = useTimeout();
7853    const pointerTypeRef = React38.useRef(void 0);
7854    function getOpenDelay() {
7855      const providerDelay = providerContext?.delay;
7856      const groupOpenValue = typeof delayRef.current === "object" ? delayRef.current.open : void 0;
7857      let computedOpenDelay = delayWithDefault;
7858      if (hasProvider) {
7859        if (groupOpenValue !== 0) {
7860          computedOpenDelay = delay ?? providerDelay ?? delayWithDefault;
7861        } else {
7862          computedOpenDelay = 0;
7863        }
7864      }
7865      return computedOpenDelay;
7866    }
7867    function isEnabledNestedTriggerTarget(target) {
7868      const triggerEl = triggerElementRef.current;
7869      if (!triggerEl || !target) {
7870        return false;
7871      }
7872      const nearestTrigger = closestEnabledTooltipTrigger(target);
7873      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
7874    }
7875    function detectNestedTriggerHover(target) {
7876      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
7877      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
7878      if (nestedTriggerHovered) {
7879        hoverInteraction.openChangeTimeout.clear();
7880        hoverInteraction.restTimeout.clear();
7881        hoverInteraction.restTimeoutPending = false;
7882        nestedTriggerOpenTimeout.clear();
7883      }
7884      return nestedTriggerHovered;
7885    }
7886    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
7887      enabled: !disabled2,
7888      mouseOnly: true,
7889      move: false,
7890      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
7891      restMs: getOpenDelay,
7892      delay() {
7893        const closeValue = typeof delayRef.current === "object" ? delayRef.current.close : void 0;
7894        let computedCloseDelay = closeDelayWithDefault;
7895        if (closeDelay == null && hasProvider) {
7896          computedCloseDelay = closeValue;
7897        }
7898        return {
7899          close: computedCloseDelay
7900        };
7901      },
7902      triggerElementRef,
7903      isActiveTrigger: isTriggerActive,
7904      isClosing: () => store2.select("transitionStatus") === "ending",
7905      shouldOpen() {
7906        return !isNestedTriggerHoveredRef.current;
7907      }
7908    });
7909    const focusProps = useFocus(floatingRootContext, {
7910      enabled: !disabled2
7911    }).reference;
7912    const handleNestedTriggerHover = (event) => {
7913      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
7914      const target = getTargetElement(event);
7915      const nestedTriggerHovered = detectNestedTriggerHover(target);
7916      const triggerEl = triggerElementRef.current;
7917      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
7918      if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
7919        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7920        return;
7921      }
7922      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
7923      isMouseLikePointerType(pointerTypeRef.current)) {
7924        const open = () => {
7925          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
7926            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
7927          }
7928        };
7929        const openDelay = getOpenDelay();
7930        if (openDelay === 0) {
7931          nestedTriggerOpenTimeout.clear();
7932          open();
7933        } else {
7934          nestedTriggerOpenTimeout.start(openDelay, open);
7935        }
7936      }
7937    };
7938    const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
7939    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
7940    const state = {
7941      open: isOpenedByThisTrigger
7942    };
7943    const element = useRenderElement("button", componentProps, {
7944      state,
7945      ref: [forwardedRef, registerTrigger, triggerElementRef],
7946      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
7947        onMouseOver(event) {
7948          handleNestedTriggerHover(event.nativeEvent);
7949        },
7950        onFocus(event) {
7951          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
7952            event.preventBaseUIHandler();
7953          }
7954        },
7955        onMouseLeave() {
7956          isNestedTriggerHoveredRef.current = false;
7957          nestedTriggerOpenTimeout.clear();
7958          pointerTypeRef.current = void 0;
7959        },
7960        onPointerEnter(event) {
7961          pointerTypeRef.current = event.pointerType;
7962        },
7963        onPointerDown(event) {
7964          pointerTypeRef.current = event.pointerType;
7965          store2.set("closeOnClick", closeOnClick);
7966          if (closeOnClick && !store2.select("open")) {
7967            store2.cancelPendingOpen(event.nativeEvent);
7968          }
7969        },
7970        onClick(event) {
7971          if (closeOnClick && !store2.select("open")) {
7972            store2.cancelPendingOpen(event.nativeEvent);
7973          }
7974        },
7975        id: thisTriggerId,
7976        [TooltipTriggerDataAttributes.triggerDisabled]: disabled2 ? "" : void 0,
7977        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
7978      }, elementProps],
7979      stateAttributesMapping: triggerOpenStateMapping
7980    });
7981    return element;
7982  });
7983  if (true) TooltipTrigger.displayName = "TooltipTrigger";
7984  
7985  // node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
7986  var React40 = __toESM(require_react(), 1);
7987  
7988  // node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortalContext.js
7989  var React39 = __toESM(require_react(), 1);
7990  var TooltipPortalContext = /* @__PURE__ */ React39.createContext(void 0);
7991  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
7992  function useTooltipPortalContext() {
7993    const value = React39.useContext(TooltipPortalContext);
7994    if (value === void 0) {
7995      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
7996    }
7997    return value;
7998  }
7999  
8000  // node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
8001  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8002  var TooltipPortal = /* @__PURE__ */ React40.forwardRef(function TooltipPortal2(props, forwardedRef) {
8003    const {
8004      keepMounted = false,
8005      ...portalProps
8006    } = props;
8007    const store2 = useTooltipRootContext();
8008    const mounted = store2.useState("mounted");
8009    const shouldRender = mounted || keepMounted;
8010    if (!shouldRender) {
8011      return null;
8012    }
8013    return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipPortalContext.Provider, {
8014      value: keepMounted,
8015      children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FloatingPortalLite, {
8016        ref: forwardedRef,
8017        ...portalProps
8018      })
8019    });
8020  });
8021  if (true) TooltipPortal.displayName = "TooltipPortal";
8022  
8023  // node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
8024  var React42 = __toESM(require_react(), 1);
8025  
8026  // node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositionerContext.js
8027  var React41 = __toESM(require_react(), 1);
8028  var TooltipPositionerContext = /* @__PURE__ */ React41.createContext(void 0);
8029  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8030  function useTooltipPositionerContext() {
8031    const context = React41.useContext(TooltipPositionerContext);
8032    if (context === void 0) {
8033      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8034    }
8035    return context;
8036  }
8037  
8038  // node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
8039  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8040  var TooltipPositioner = /* @__PURE__ */ React42.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8041    const {
8042      render,
8043      className,
8044      anchor,
8045      positionMethod = "absolute",
8046      side = "top",
8047      align = "center",
8048      sideOffset = 0,
8049      alignOffset = 0,
8050      collisionBoundary = "clipping-ancestors",
8051      collisionPadding = 5,
8052      arrowPadding = 5,
8053      sticky = false,
8054      disableAnchorTracking = false,
8055      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8056      style,
8057      ...elementProps
8058    } = componentProps;
8059    const store2 = useTooltipRootContext();
8060    const keepMounted = useTooltipPortalContext();
8061    const open = store2.useState("open");
8062    const mounted = store2.useState("mounted");
8063    const trackCursorAxis = store2.useState("trackCursorAxis");
8064    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8065    const floatingRootContext = store2.useState("floatingRootContext");
8066    const instantType = store2.useState("instantType");
8067    const transitionStatus = store2.useState("transitionStatus");
8068    const hasViewport = store2.useState("hasViewport");
8069    const positioning = useAnchorPositioning({
8070      anchor,
8071      positionMethod,
8072      floatingRootContext,
8073      mounted,
8074      side,
8075      sideOffset,
8076      align,
8077      alignOffset,
8078      collisionBoundary,
8079      collisionPadding,
8080      sticky,
8081      arrowPadding,
8082      disableAnchorTracking,
8083      keepMounted,
8084      collisionAvoidance,
8085      adaptiveOrigin: hasViewport ? adaptiveOrigin : void 0
8086    });
8087    const state = React42.useMemo(() => ({
8088      open,
8089      side: positioning.side,
8090      align: positioning.align,
8091      anchorHidden: positioning.anchorHidden,
8092      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8093    }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8094    const element = usePositioner(componentProps, state, {
8095      styles: positioning.positionerStyles,
8096      transitionStatus,
8097      props: elementProps,
8098      refs: [forwardedRef, store2.useStateSetter("positionerElement")],
8099      hidden: !mounted,
8100      inert: !open || trackCursorAxis === "both" || disableHoverablePopup
8101    });
8102    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPositionerContext.Provider, {
8103      value: positioning,
8104      children: element
8105    });
8106  });
8107  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8108  
8109  // node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js
8110  var React43 = __toESM(require_react(), 1);
8111  var stateAttributesMapping = {
8112    ...popupStateMapping,
8113    ...transitionStatusMapping
8114  };
8115  var TooltipPopup = /* @__PURE__ */ React43.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8116    const {
8117      render,
8118      className,
8119      style,
8120      ...elementProps
8121    } = componentProps;
8122    const store2 = useTooltipRootContext();
8123    const {
8124      side,
8125      align
8126    } = useTooltipPositionerContext();
8127    const open = store2.useState("open");
8128    const instantType = store2.useState("instantType");
8129    const transitionStatus = store2.useState("transitionStatus");
8130    const popupProps = store2.useState("popupProps");
8131    const floatingContext = store2.useState("floatingRootContext");
8132    const disabled2 = store2.useState("disabled");
8133    const closeDelay = store2.useState("closeDelay");
8134    useOpenChangeComplete({
8135      open,
8136      ref: store2.context.popupRef,
8137      onComplete() {
8138        if (open) {
8139          store2.context.onOpenChangeComplete?.(true);
8140        }
8141      }
8142    });
8143    useHoverFloatingInteraction(floatingContext, {
8144      enabled: !disabled2,
8145      closeDelay
8146    });
8147    const setPopupElement = store2.useStateSetter("popupElement");
8148    const state = {
8149      open,
8150      side,
8151      align,
8152      instant: instantType,
8153      transitionStatus
8154    };
8155    const element = useRenderElement("div", componentProps, {
8156      state,
8157      ref: [forwardedRef, store2.context.popupRef, setPopupElement],
8158      props: [popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8159      stateAttributesMapping
8160    });
8161    return element;
8162  });
8163  if (true) TooltipPopup.displayName = "TooltipPopup";
8164  
8165  // node_modules/@base-ui/react/esm/tooltip/arrow/TooltipArrow.js
8166  var React44 = __toESM(require_react(), 1);
8167  var TooltipArrow = /* @__PURE__ */ React44.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8168    const {
8169      render,
8170      className,
8171      style,
8172      ...elementProps
8173    } = componentProps;
8174    const store2 = useTooltipRootContext();
8175    const {
8176      arrowRef,
8177      side,
8178      align,
8179      arrowUncentered,
8180      arrowStyles
8181    } = useTooltipPositionerContext();
8182    const open = store2.useState("open");
8183    const instantType = store2.useState("instantType");
8184    const state = {
8185      open,
8186      side,
8187      align,
8188      uncentered: arrowUncentered,
8189      instant: instantType
8190    };
8191    const element = useRenderElement("div", componentProps, {
8192      state,
8193      ref: [forwardedRef, arrowRef],
8194      props: [{
8195        style: arrowStyles,
8196        "aria-hidden": true
8197      }, elementProps],
8198      stateAttributesMapping: popupStateMapping
8199    });
8200    return element;
8201  });
8202  if (true) TooltipArrow.displayName = "TooltipArrow";
8203  
8204  // node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js
8205  var React45 = __toESM(require_react(), 1);
8206  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8207  var TooltipProvider = function TooltipProvider2(props) {
8208    const {
8209      delay,
8210      closeDelay,
8211      timeout = 400
8212    } = props;
8213    const contextValue = React45.useMemo(() => ({
8214      delay,
8215      closeDelay
8216    }), [delay, closeDelay]);
8217    const delayValue = React45.useMemo(() => ({
8218      open: delay,
8219      close: closeDelay
8220    }), [delay, closeDelay]);
8221    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipProviderContext.Provider, {
8222      value: contextValue,
8223      children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FloatingDelayGroup, {
8224        delay: delayValue,
8225        timeoutMs: timeout,
8226        children: props.children
8227      })
8228    });
8229  };
8230  if (true) TooltipProvider.displayName = "TooltipProvider";
8231  
8232  // node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewport.js
8233  var React46 = __toESM(require_react(), 1);
8234  
8235  // node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewportCssVars.js
8236  var TooltipViewportCssVars = /* @__PURE__ */ (function(TooltipViewportCssVars2) {
8237    TooltipViewportCssVars2["popupWidth"] = "--popup-width";
8238    TooltipViewportCssVars2["popupHeight"] = "--popup-height";
8239    return TooltipViewportCssVars2;
8240  })({});
8241  
8242  // node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewport.js
8243  var stateAttributesMapping2 = {
8244    activationDirection: (value) => value ? {
8245      "data-activation-direction": value
8246    } : null
8247  };
8248  var TooltipViewport = /* @__PURE__ */ React46.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8249    const {
8250      render,
8251      className,
8252      style,
8253      children,
8254      ...elementProps
8255    } = componentProps;
8256    const store2 = useTooltipRootContext();
8257    const positioner = useTooltipPositionerContext();
8258    const instantType = store2.useState("instantType");
8259    const {
8260      children: childrenToRender,
8261      state: viewportState
8262    } = usePopupViewport({
8263      store: store2,
8264      side: positioner.side,
8265      cssVars: TooltipViewportCssVars,
8266      children
8267    });
8268    const state = {
8269      activationDirection: viewportState.activationDirection,
8270      transitioning: viewportState.transitioning,
8271      instant: instantType
8272    };
8273    return useRenderElement("div", componentProps, {
8274      state,
8275      ref: forwardedRef,
8276      props: [elementProps, {
8277        children: childrenToRender
8278      }],
8279      stateAttributesMapping: stateAttributesMapping2
8280    });
8281  });
8282  if (true) TooltipViewport.displayName = "TooltipViewport";
8283  
8284  // node_modules/@base-ui/react/esm/tooltip/store/TooltipHandle.js
8285  var TooltipHandle = class {
8286    /**
8287     * Internal store holding the tooltip state.
8288     * @internal
8289     */
8290    constructor() {
8291      this.store = new TooltipStore();
8292    }
8293    /**
8294     * Opens the tooltip and associates it with the trigger with the given ID.
8295     * The trigger must be a Tooltip.Trigger component with this handle passed as a prop.
8296     *
8297     * This method should only be called in an event handler or an effect (not during rendering).
8298     *
8299     * @param triggerId ID of the trigger to associate with the tooltip.
8300     */
8301    open(triggerId) {
8302      const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) : void 0;
8303      if (triggerId && !triggerElement) {
8304        throw new Error(true ? `Base UI: TooltipHandle.open: No trigger found with id "$triggerId}".` : formatErrorMessage_default(81, triggerId));
8305      }
8306      this.store.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
8307    }
8308    /**
8309     * Closes the tooltip.
8310     */
8311    close() {
8312      this.store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, void 0));
8313    }
8314    /**
8315     * Indicates whether the tooltip is currently open.
8316     */
8317    get isOpen() {
8318      return this.store.select("open");
8319    }
8320  };
8321  function createTooltipHandle() {
8322    return new TooltipHandle();
8323  }
8324  
8325  // node_modules/@base-ui/react/esm/use-render/useRender.js
8326  function useRender(params) {
8327    return useRenderElement(params.defaultTagName ?? "div", params, params);
8328  }
8329  
8330  // packages/ui/build-module/text/text.mjs
8331  var import_element10 = __toESM(require_element(), 1);
8332  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8333  function getRuntime() {
8334    const globalScope = globalThis;
8335    if (globalScope.__wpStyleRuntime) {
8336      return globalScope.__wpStyleRuntime;
8337    }
8338    globalScope.__wpStyleRuntime = {
8339      documents: /* @__PURE__ */ new Map(),
8340      styles: /* @__PURE__ */ new Map(),
8341      injectedStyles: /* @__PURE__ */ new WeakMap()
8342    };
8343    if (typeof document !== "undefined") {
8344      registerDocument(document);
8345    }
8346    return globalScope.__wpStyleRuntime;
8347  }
8348  function documentContainsStyleHash(targetDocument, hash) {
8349    if (!targetDocument.head) {
8350      return false;
8351    }
8352    for (const style of targetDocument.head.querySelectorAll(
8353      `style[$STYLE_HASH_ATTRIBUTE}]`
8354    )) {
8355      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8356        return true;
8357      }
8358    }
8359    return false;
8360  }
8361  function injectStyle(targetDocument, hash, css) {
8362    if (!targetDocument.head) {
8363      return;
8364    }
8365    const runtime = getRuntime();
8366    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8367    if (!injectedStyles) {
8368      injectedStyles = /* @__PURE__ */ new Set();
8369      runtime.injectedStyles.set(targetDocument, injectedStyles);
8370    }
8371    if (injectedStyles.has(hash)) {
8372      return;
8373    }
8374    if (documentContainsStyleHash(targetDocument, hash)) {
8375      injectedStyles.add(hash);
8376      return;
8377    }
8378    const style = targetDocument.createElement("style");
8379    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8380    style.appendChild(targetDocument.createTextNode(css));
8381    targetDocument.head.appendChild(style);
8382    injectedStyles.add(hash);
8383  }
8384  function registerDocument(targetDocument) {
8385    const runtime = getRuntime();
8386    runtime.documents.set(
8387      targetDocument,
8388      (runtime.documents.get(targetDocument) ?? 0) + 1
8389    );
8390    for (const [hash, css] of runtime.styles) {
8391      injectStyle(targetDocument, hash, css);
8392    }
8393    return () => {
8394      const count = runtime.documents.get(targetDocument);
8395      if (count === void 0) {
8396        return;
8397      }
8398      if (count <= 1) {
8399        runtime.documents.delete(targetDocument);
8400        return;
8401      }
8402      runtime.documents.set(targetDocument, count - 1);
8403    };
8404  }
8405  function registerStyle(hash, css) {
8406    const runtime = getRuntime();
8407    runtime.styles.set(hash, css);
8408    for (const targetDocument of runtime.documents.keys()) {
8409      injectStyle(targetDocument, hash, css);
8410    }
8411  }
8412  if (typeof process === "undefined" || true) {
8413    registerStyle("0c5702ddca", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
8414  }
8415  var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
8416  if (typeof process === "undefined" || true) {
8417    registerStyle("d5c1b736fd", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");
8418  }
8419  var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
8420  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8421    const element = useRender({
8422      render,
8423      defaultTagName: "span",
8424      ref,
8425      props: mergeProps(props, {
8426        className: clsx_default(
8427          style_default.text,
8428          global_css_defense_default.heading,
8429          global_css_defense_default.p,
8430          style_default[variant],
8431          className
8432        )
8433      })
8434    });
8435    return element;
8436  });
8437  
8438  // packages/icons/build-module/icon/index.mjs
8439  var import_element11 = __toESM(require_element(), 1);
8440  var icon_default = (0, import_element11.forwardRef)(
8441    ({ icon, size: size4 = 24, ...props }, ref) => {
8442      return (0, import_element11.cloneElement)(icon, {
8443        width: size4,
8444        height: size4,
8445        ...props,
8446        ref
8447      });
8448    }
8449  );
8450  
8451  // packages/icons/build-module/library/arrow-up-left.mjs
8452  var import_primitives = __toESM(require_primitives(), 1);
8453  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8454  var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
8455  
8456  // packages/icons/build-module/library/arrow-up-right.mjs
8457  var import_primitives2 = __toESM(require_primitives(), 1);
8458  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8459  var arrow_up_right_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives2.Path, { d: "M10 6H18V14H16.5V8.5L7 18L6 17L15.5 7.5H10V6Z" }) });
8460  
8461  // packages/icons/build-module/library/check.mjs
8462  var import_primitives3 = __toESM(require_primitives(), 1);
8463  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
8464  var check_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives3.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
8465  
8466  // packages/icons/build-module/library/chevron-down-small.mjs
8467  var import_primitives4 = __toESM(require_primitives(), 1);
8468  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
8469  var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives4.Path, { d: "m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z" }) });
8470  
8471  // packages/icons/build-module/library/chevron-left-small.mjs
8472  var import_primitives5 = __toESM(require_primitives(), 1);
8473  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
8474  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives5.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
8475  
8476  // packages/icons/build-module/library/chevron-left.mjs
8477  var import_primitives6 = __toESM(require_primitives(), 1);
8478  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
8479  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives6.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
8480  
8481  // packages/icons/build-module/library/chevron-right-small.mjs
8482  var import_primitives7 = __toESM(require_primitives(), 1);
8483  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
8484  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives7.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
8485  
8486  // packages/icons/build-module/library/chevron-right.mjs
8487  var import_primitives8 = __toESM(require_primitives(), 1);
8488  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
8489  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives8.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
8490  
8491  // packages/icons/build-module/library/menu.mjs
8492  var import_primitives9 = __toESM(require_primitives(), 1);
8493  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
8494  var menu_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives9.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
8495  
8496  // packages/icons/build-module/library/search.mjs
8497  var import_primitives10 = __toESM(require_primitives(), 1);
8498  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
8499  var search_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives10.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
8500  
8501  // packages/icons/build-module/library/wordpress.mjs
8502  var import_primitives11 = __toESM(require_primitives(), 1);
8503  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
8504  var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives11.Path, { d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z" }) });
8505  
8506  // packages/ui/build-module/utils/render-slot-with-children.mjs
8507  var import_element12 = __toESM(require_element(), 1);
8508  function renderSlotWithChildren(slot, defaultSlot, children) {
8509    return (0, import_element12.cloneElement)(slot ?? defaultSlot, { children });
8510  }
8511  
8512  // packages/ui/build-module/lock-unlock.mjs
8513  var import_private_apis = __toESM(require_private_apis(), 1);
8514  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
8515    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
8516    "@wordpress/ui"
8517  );
8518  
8519  // packages/ui/build-module/stack/stack.mjs
8520  var import_element13 = __toESM(require_element(), 1);
8521  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8522  function getRuntime2() {
8523    const globalScope = globalThis;
8524    if (globalScope.__wpStyleRuntime) {
8525      return globalScope.__wpStyleRuntime;
8526    }
8527    globalScope.__wpStyleRuntime = {
8528      documents: /* @__PURE__ */ new Map(),
8529      styles: /* @__PURE__ */ new Map(),
8530      injectedStyles: /* @__PURE__ */ new WeakMap()
8531    };
8532    if (typeof document !== "undefined") {
8533      registerDocument2(document);
8534    }
8535    return globalScope.__wpStyleRuntime;
8536  }
8537  function documentContainsStyleHash2(targetDocument, hash) {
8538    if (!targetDocument.head) {
8539      return false;
8540    }
8541    for (const style of targetDocument.head.querySelectorAll(
8542      `style[$STYLE_HASH_ATTRIBUTE2}]`
8543    )) {
8544      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8545        return true;
8546      }
8547    }
8548    return false;
8549  }
8550  function injectStyle2(targetDocument, hash, css) {
8551    if (!targetDocument.head) {
8552      return;
8553    }
8554    const runtime = getRuntime2();
8555    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8556    if (!injectedStyles) {
8557      injectedStyles = /* @__PURE__ */ new Set();
8558      runtime.injectedStyles.set(targetDocument, injectedStyles);
8559    }
8560    if (injectedStyles.has(hash)) {
8561      return;
8562    }
8563    if (documentContainsStyleHash2(targetDocument, hash)) {
8564      injectedStyles.add(hash);
8565      return;
8566    }
8567    const style = targetDocument.createElement("style");
8568    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8569    style.appendChild(targetDocument.createTextNode(css));
8570    targetDocument.head.appendChild(style);
8571    injectedStyles.add(hash);
8572  }
8573  function registerDocument2(targetDocument) {
8574    const runtime = getRuntime2();
8575    runtime.documents.set(
8576      targetDocument,
8577      (runtime.documents.get(targetDocument) ?? 0) + 1
8578    );
8579    for (const [hash, css] of runtime.styles) {
8580      injectStyle2(targetDocument, hash, css);
8581    }
8582    return () => {
8583      const count = runtime.documents.get(targetDocument);
8584      if (count === void 0) {
8585        return;
8586      }
8587      if (count <= 1) {
8588        runtime.documents.delete(targetDocument);
8589        return;
8590      }
8591      runtime.documents.set(targetDocument, count - 1);
8592    };
8593  }
8594  function registerStyle2(hash, css) {
8595    const runtime = getRuntime2();
8596    runtime.styles.set(hash, css);
8597    for (const targetDocument of runtime.documents.keys()) {
8598      injectStyle2(targetDocument, hash, css);
8599    }
8600  }
8601  if (typeof process === "undefined" || true) {
8602    registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
8603  }
8604  var style_default2 = { "stack": "_19ce0419607e1896__stack" };
8605  var gapTokens = {
8606    xs: "var(--wpds-dimension-gap-xs, 4px)",
8607    sm: "var(--wpds-dimension-gap-sm, 8px)",
8608    md: "var(--wpds-dimension-gap-md, 12px)",
8609    lg: "var(--wpds-dimension-gap-lg, 16px)",
8610    xl: "var(--wpds-dimension-gap-xl, 24px)",
8611    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
8612    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
8613  };
8614  var Stack = (0, import_element13.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
8615    const style = {
8616      gap: gap && gapTokens[gap],
8617      alignItems: align,
8618      justifyContent: justify,
8619      flexDirection: direction,
8620      flexWrap: wrap
8621    };
8622    const element = useRender({
8623      render,
8624      ref,
8625      props: mergeProps(props, { style, className: style_default2.stack })
8626    });
8627    return element;
8628  });
8629  
8630  // packages/ui/build-module/tooltip/index.mjs
8631  var tooltip_exports = {};
8632  __export(tooltip_exports, {
8633    Popup: () => Popup,
8634    Portal: () => Portal,
8635    Positioner: () => Positioner,
8636    Provider: () => Provider,
8637    Root: () => Root,
8638    Trigger: () => Trigger
8639  });
8640  
8641  // packages/ui/build-module/tooltip/popup.mjs
8642  var import_element16 = __toESM(require_element(), 1);
8643  var import_theme = __toESM(require_theme(), 1);
8644  
8645  // packages/ui/build-module/tooltip/portal.mjs
8646  var import_element14 = __toESM(require_element(), 1);
8647  
8648  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8649  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8650  function getRuntime3() {
8651    const globalScope = globalThis;
8652    if (globalScope.__wpStyleRuntime) {
8653      return globalScope.__wpStyleRuntime;
8654    }
8655    globalScope.__wpStyleRuntime = {
8656      documents: /* @__PURE__ */ new Map(),
8657      styles: /* @__PURE__ */ new Map(),
8658      injectedStyles: /* @__PURE__ */ new WeakMap()
8659    };
8660    if (typeof document !== "undefined") {
8661      registerDocument3(document);
8662    }
8663    return globalScope.__wpStyleRuntime;
8664  }
8665  function documentContainsStyleHash3(targetDocument, hash) {
8666    if (!targetDocument.head) {
8667      return false;
8668    }
8669    for (const style of targetDocument.head.querySelectorAll(
8670      `style[$STYLE_HASH_ATTRIBUTE3}]`
8671    )) {
8672      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8673        return true;
8674      }
8675    }
8676    return false;
8677  }
8678  function injectStyle3(targetDocument, hash, css) {
8679    if (!targetDocument.head) {
8680      return;
8681    }
8682    const runtime = getRuntime3();
8683    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8684    if (!injectedStyles) {
8685      injectedStyles = /* @__PURE__ */ new Set();
8686      runtime.injectedStyles.set(targetDocument, injectedStyles);
8687    }
8688    if (injectedStyles.has(hash)) {
8689      return;
8690    }
8691    if (documentContainsStyleHash3(targetDocument, hash)) {
8692      injectedStyles.add(hash);
8693      return;
8694    }
8695    const style = targetDocument.createElement("style");
8696    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8697    style.appendChild(targetDocument.createTextNode(css));
8698    targetDocument.head.appendChild(style);
8699    injectedStyles.add(hash);
8700  }
8701  function registerDocument3(targetDocument) {
8702    const runtime = getRuntime3();
8703    runtime.documents.set(
8704      targetDocument,
8705      (runtime.documents.get(targetDocument) ?? 0) + 1
8706    );
8707    for (const [hash, css] of runtime.styles) {
8708      injectStyle3(targetDocument, hash, css);
8709    }
8710    return () => {
8711      const count = runtime.documents.get(targetDocument);
8712      if (count === void 0) {
8713        return;
8714      }
8715      if (count <= 1) {
8716        runtime.documents.delete(targetDocument);
8717        return;
8718      }
8719      runtime.documents.set(targetDocument, count - 1);
8720    };
8721  }
8722  function registerStyle3(hash, css) {
8723    const runtime = getRuntime3();
8724    runtime.styles.set(hash, css);
8725    for (const targetDocument of runtime.documents.keys()) {
8726      injectStyle3(targetDocument, hash, css);
8727    }
8728  }
8729  if (typeof process === "undefined" || true) {
8730    registerStyle3("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
8731  }
8732  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8733  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8734  function resolveOwnerDocument() {
8735    return typeof document === "undefined" ? null : document;
8736  }
8737  function isInWordPressEnvironment() {
8738    let topWp;
8739    try {
8740      topWp = window.top?.wp;
8741    } catch {
8742    }
8743    const wp = topWp ?? window.wp;
8744    return typeof wp?.components === "object" && wp.components !== null;
8745  }
8746  var cachedSlot = null;
8747  function createSlot(ownerDocument2) {
8748    const element = ownerDocument2.createElement("div");
8749    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8750    if (wp_compat_overlay_slot_default.slot) {
8751      element.classList.add(wp_compat_overlay_slot_default.slot);
8752    }
8753    ownerDocument2.body.appendChild(element);
8754    return element;
8755  }
8756  function getWpCompatOverlaySlot() {
8757    if (typeof window === "undefined") {
8758      return void 0;
8759    }
8760    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
8761      return void 0;
8762    }
8763    const ownerDocument2 = resolveOwnerDocument();
8764    if (!ownerDocument2 || !ownerDocument2.body) {
8765      return void 0;
8766    }
8767    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
8768      return cachedSlot;
8769    }
8770    const existing = ownerDocument2.querySelector(
8771      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
8772    );
8773    if (existing instanceof HTMLDivElement) {
8774      cachedSlot = existing;
8775      return existing;
8776    }
8777    if (cachedSlot?.isConnected) {
8778      cachedSlot.remove();
8779    }
8780    cachedSlot = createSlot(ownerDocument2);
8781    return cachedSlot;
8782  }
8783  
8784  // packages/ui/build-module/tooltip/portal.mjs
8785  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
8786  var Portal = (0, import_element14.forwardRef)(
8787    function TooltipPortal3({ container, ...restProps }, ref) {
8788      return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
8789        index_parts_exports.Portal,
8790        {
8791          container: container ?? getWpCompatOverlaySlot(),
8792          ...restProps,
8793          ref
8794        }
8795      );
8796    }
8797  );
8798  
8799  // packages/ui/build-module/tooltip/positioner.mjs
8800  var import_element15 = __toESM(require_element(), 1);
8801  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
8802  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
8803  function getRuntime4() {
8804    const globalScope = globalThis;
8805    if (globalScope.__wpStyleRuntime) {
8806      return globalScope.__wpStyleRuntime;
8807    }
8808    globalScope.__wpStyleRuntime = {
8809      documents: /* @__PURE__ */ new Map(),
8810      styles: /* @__PURE__ */ new Map(),
8811      injectedStyles: /* @__PURE__ */ new WeakMap()
8812    };
8813    if (typeof document !== "undefined") {
8814      registerDocument4(document);
8815    }
8816    return globalScope.__wpStyleRuntime;
8817  }
8818  function documentContainsStyleHash4(targetDocument, hash) {
8819    if (!targetDocument.head) {
8820      return false;
8821    }
8822    for (const style of targetDocument.head.querySelectorAll(
8823      `style[$STYLE_HASH_ATTRIBUTE4}]`
8824    )) {
8825      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
8826        return true;
8827      }
8828    }
8829    return false;
8830  }
8831  function injectStyle4(targetDocument, hash, css) {
8832    if (!targetDocument.head) {
8833      return;
8834    }
8835    const runtime = getRuntime4();
8836    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8837    if (!injectedStyles) {
8838      injectedStyles = /* @__PURE__ */ new Set();
8839      runtime.injectedStyles.set(targetDocument, injectedStyles);
8840    }
8841    if (injectedStyles.has(hash)) {
8842      return;
8843    }
8844    if (documentContainsStyleHash4(targetDocument, hash)) {
8845      injectedStyles.add(hash);
8846      return;
8847    }
8848    const style = targetDocument.createElement("style");
8849    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
8850    style.appendChild(targetDocument.createTextNode(css));
8851    targetDocument.head.appendChild(style);
8852    injectedStyles.add(hash);
8853  }
8854  function registerDocument4(targetDocument) {
8855    const runtime = getRuntime4();
8856    runtime.documents.set(
8857      targetDocument,
8858      (runtime.documents.get(targetDocument) ?? 0) + 1
8859    );
8860    for (const [hash, css] of runtime.styles) {
8861      injectStyle4(targetDocument, hash, css);
8862    }
8863    return () => {
8864      const count = runtime.documents.get(targetDocument);
8865      if (count === void 0) {
8866        return;
8867      }
8868      if (count <= 1) {
8869        runtime.documents.delete(targetDocument);
8870        return;
8871      }
8872      runtime.documents.set(targetDocument, count - 1);
8873    };
8874  }
8875  function registerStyle4(hash, css) {
8876    const runtime = getRuntime4();
8877    runtime.styles.set(hash, css);
8878    for (const targetDocument of runtime.documents.keys()) {
8879      injectStyle4(targetDocument, hash, css);
8880    }
8881  }
8882  if (typeof process === "undefined" || true) {
8883    registerStyle4("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
8884  }
8885  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
8886  if (typeof process === "undefined" || true) {
8887    registerStyle4("4811d023d1", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
8888  }
8889  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
8890  var Positioner = (0, import_element15.forwardRef)(
8891    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
8892      return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
8893        index_parts_exports.Positioner,
8894        {
8895          ref,
8896          align,
8897          side,
8898          sideOffset,
8899          ...props,
8900          className: clsx_default(
8901            resets_default["box-sizing"],
8902            style_default3.positioner,
8903            className
8904          )
8905        }
8906      );
8907    }
8908  );
8909  
8910  // packages/ui/build-module/tooltip/popup.mjs
8911  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
8912  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
8913  function getRuntime5() {
8914    const globalScope = globalThis;
8915    if (globalScope.__wpStyleRuntime) {
8916      return globalScope.__wpStyleRuntime;
8917    }
8918    globalScope.__wpStyleRuntime = {
8919      documents: /* @__PURE__ */ new Map(),
8920      styles: /* @__PURE__ */ new Map(),
8921      injectedStyles: /* @__PURE__ */ new WeakMap()
8922    };
8923    if (typeof document !== "undefined") {
8924      registerDocument5(document);
8925    }
8926    return globalScope.__wpStyleRuntime;
8927  }
8928  function documentContainsStyleHash5(targetDocument, hash) {
8929    if (!targetDocument.head) {
8930      return false;
8931    }
8932    for (const style of targetDocument.head.querySelectorAll(
8933      `style[$STYLE_HASH_ATTRIBUTE5}]`
8934    )) {
8935      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
8936        return true;
8937      }
8938    }
8939    return false;
8940  }
8941  function injectStyle5(targetDocument, hash, css) {
8942    if (!targetDocument.head) {
8943      return;
8944    }
8945    const runtime = getRuntime5();
8946    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8947    if (!injectedStyles) {
8948      injectedStyles = /* @__PURE__ */ new Set();
8949      runtime.injectedStyles.set(targetDocument, injectedStyles);
8950    }
8951    if (injectedStyles.has(hash)) {
8952      return;
8953    }
8954    if (documentContainsStyleHash5(targetDocument, hash)) {
8955      injectedStyles.add(hash);
8956      return;
8957    }
8958    const style = targetDocument.createElement("style");
8959    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
8960    style.appendChild(targetDocument.createTextNode(css));
8961    targetDocument.head.appendChild(style);
8962    injectedStyles.add(hash);
8963  }
8964  function registerDocument5(targetDocument) {
8965    const runtime = getRuntime5();
8966    runtime.documents.set(
8967      targetDocument,
8968      (runtime.documents.get(targetDocument) ?? 0) + 1
8969    );
8970    for (const [hash, css] of runtime.styles) {
8971      injectStyle5(targetDocument, hash, css);
8972    }
8973    return () => {
8974      const count = runtime.documents.get(targetDocument);
8975      if (count === void 0) {
8976        return;
8977      }
8978      if (count <= 1) {
8979        runtime.documents.delete(targetDocument);
8980        return;
8981      }
8982      runtime.documents.set(targetDocument, count - 1);
8983    };
8984  }
8985  function registerStyle5(hash, css) {
8986    const runtime = getRuntime5();
8987    runtime.styles.set(hash, css);
8988    for (const targetDocument of runtime.documents.keys()) {
8989      injectStyle5(targetDocument, hash, css);
8990    }
8991  }
8992  if (typeof process === "undefined" || true) {
8993    registerStyle5("4811d023d1", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
8994  }
8995  var style_default4 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
8996  var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
8997  var POPUP_COLOR = { background: "#1e1e1e" };
8998  var Popup = (0, import_element16.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
8999    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9000      index_parts_exports.Popup,
9001      {
9002        ref,
9003        className: clsx_default(style_default4.popup, className),
9004        ...props,
9005        children
9006      }
9007    ) });
9008    const positionedPopup = renderSlotWithChildren(
9009      positioner,
9010      /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Positioner, {}),
9011      popupContent
9012    );
9013    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Portal, {}), positionedPopup);
9014  });
9015  
9016  // packages/ui/build-module/tooltip/trigger.mjs
9017  var import_element17 = __toESM(require_element(), 1);
9018  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9019  var Trigger = (0, import_element17.forwardRef)(
9020    function TooltipTrigger3(props, ref) {
9021      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(index_parts_exports.Trigger, { ref, ...props });
9022    }
9023  );
9024  
9025  // packages/ui/build-module/tooltip/root.mjs
9026  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9027  function Root(props) {
9028    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(index_parts_exports.Root, { ...props });
9029  }
9030  
9031  // packages/ui/build-module/tooltip/provider.mjs
9032  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9033  function Provider({ ...props }) {
9034    return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(index_parts_exports.Provider, { ...props });
9035  }
9036  
9037  // packages/admin-ui/build-module/navigable-region/index.mjs
9038  var import_element18 = __toESM(require_element(), 1);
9039  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
9040  var NavigableRegion = (0, import_element18.forwardRef)(
9041    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
9042      return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
9043        Tag,
9044        {
9045          ref,
9046          className: clsx_default("admin-ui-navigable-region", className),
9047          "aria-label": ariaLabel,
9048          role: "region",
9049          tabIndex: "-1",
9050          ...props,
9051          children
9052        }
9053      );
9054    }
9055  );
9056  NavigableRegion.displayName = "NavigableRegion";
9057  var navigable_region_default = NavigableRegion;
9058  
9059  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
9060  var import_components = __toESM(require_components(), 1);
9061  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
9062  
9063  // packages/admin-ui/build-module/page/header.mjs
9064  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
9065  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9066  function getRuntime6() {
9067    const globalScope = globalThis;
9068    if (globalScope.__wpStyleRuntime) {
9069      return globalScope.__wpStyleRuntime;
9070    }
9071    globalScope.__wpStyleRuntime = {
9072      documents: /* @__PURE__ */ new Map(),
9073      styles: /* @__PURE__ */ new Map(),
9074      injectedStyles: /* @__PURE__ */ new WeakMap()
9075    };
9076    if (typeof document !== "undefined") {
9077      registerDocument6(document);
9078    }
9079    return globalScope.__wpStyleRuntime;
9080  }
9081  function documentContainsStyleHash6(targetDocument, hash) {
9082    if (!targetDocument.head) {
9083      return false;
9084    }
9085    for (const style of targetDocument.head.querySelectorAll(
9086      `style[$STYLE_HASH_ATTRIBUTE6}]`
9087    )) {
9088      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9089        return true;
9090      }
9091    }
9092    return false;
9093  }
9094  function injectStyle6(targetDocument, hash, css) {
9095    if (!targetDocument.head) {
9096      return;
9097    }
9098    const runtime = getRuntime6();
9099    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9100    if (!injectedStyles) {
9101      injectedStyles = /* @__PURE__ */ new Set();
9102      runtime.injectedStyles.set(targetDocument, injectedStyles);
9103    }
9104    if (injectedStyles.has(hash)) {
9105      return;
9106    }
9107    if (documentContainsStyleHash6(targetDocument, hash)) {
9108      injectedStyles.add(hash);
9109      return;
9110    }
9111    const style = targetDocument.createElement("style");
9112    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9113    style.appendChild(targetDocument.createTextNode(css));
9114    targetDocument.head.appendChild(style);
9115    injectedStyles.add(hash);
9116  }
9117  function registerDocument6(targetDocument) {
9118    const runtime = getRuntime6();
9119    runtime.documents.set(
9120      targetDocument,
9121      (runtime.documents.get(targetDocument) ?? 0) + 1
9122    );
9123    for (const [hash, css] of runtime.styles) {
9124      injectStyle6(targetDocument, hash, css);
9125    }
9126    return () => {
9127      const count = runtime.documents.get(targetDocument);
9128      if (count === void 0) {
9129        return;
9130      }
9131      if (count <= 1) {
9132        runtime.documents.delete(targetDocument);
9133        return;
9134      }
9135      runtime.documents.set(targetDocument, count - 1);
9136    };
9137  }
9138  function registerStyle6(hash, css) {
9139    const runtime = getRuntime6();
9140    runtime.styles.set(hash, css);
9141    for (const targetDocument of runtime.documents.keys()) {
9142      injectStyle6(targetDocument, hash, css);
9143    }
9144  }
9145  if (typeof process === "undefined" || true) {
9146    registerStyle6("683dd16f2c", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
9147  }
9148  var style_default5 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
9149  function Header({
9150    headingLevel = 1,
9151    breadcrumbs,
9152    badges,
9153    visual,
9154    title,
9155    subTitle,
9156    actions,
9157    showSidebarToggle = true
9158  }) {
9159    const HeadingTag = `h$headingLevel}`;
9160    return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack, { direction: "column", className: style_default5.header, children: [
9161      /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
9162        Stack,
9163        {
9164          className: style_default5["header-content"],
9165          direction: "row",
9166          gap: "sm",
9167          justify: "space-between",
9168          children: [
9169            /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
9170              showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9171                SidebarToggleSlot,
9172                {
9173                  bubblesVirtually: true,
9174                  className: style_default5["sidebar-toggle-slot"]
9175                }
9176              ),
9177              visual && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9178                "div",
9179                {
9180                  className: style_default5["header-visual"],
9181                  "aria-hidden": "true",
9182                  children: visual
9183                }
9184              ),
9185              title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9186                Text,
9187                {
9188                  className: style_default5["header-title"],
9189                  render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HeadingTag, {}),
9190                  variant: "heading-lg",
9191                  children: title
9192                }
9193              ),
9194              breadcrumbs,
9195              badges
9196            ] }),
9197            actions && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9198              Stack,
9199              {
9200                align: "center",
9201                className: style_default5["header-actions"],
9202                direction: "row",
9203                gap: "sm",
9204                children: actions
9205              }
9206            )
9207          ]
9208        }
9209      ),
9210      subTitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9211        Text,
9212        {
9213          render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", {}),
9214          variant: "body-md",
9215          className: style_default5["header-subtitle"],
9216          children: subTitle
9217        }
9218      )
9219    ] });
9220  }
9221  
9222  // packages/admin-ui/build-module/page/index.mjs
9223  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
9224  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9225  function getRuntime7() {
9226    const globalScope = globalThis;
9227    if (globalScope.__wpStyleRuntime) {
9228      return globalScope.__wpStyleRuntime;
9229    }
9230    globalScope.__wpStyleRuntime = {
9231      documents: /* @__PURE__ */ new Map(),
9232      styles: /* @__PURE__ */ new Map(),
9233      injectedStyles: /* @__PURE__ */ new WeakMap()
9234    };
9235    if (typeof document !== "undefined") {
9236      registerDocument7(document);
9237    }
9238    return globalScope.__wpStyleRuntime;
9239  }
9240  function documentContainsStyleHash7(targetDocument, hash) {
9241    if (!targetDocument.head) {
9242      return false;
9243    }
9244    for (const style of targetDocument.head.querySelectorAll(
9245      `style[$STYLE_HASH_ATTRIBUTE7}]`
9246    )) {
9247      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9248        return true;
9249      }
9250    }
9251    return false;
9252  }
9253  function injectStyle7(targetDocument, hash, css) {
9254    if (!targetDocument.head) {
9255      return;
9256    }
9257    const runtime = getRuntime7();
9258    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9259    if (!injectedStyles) {
9260      injectedStyles = /* @__PURE__ */ new Set();
9261      runtime.injectedStyles.set(targetDocument, injectedStyles);
9262    }
9263    if (injectedStyles.has(hash)) {
9264      return;
9265    }
9266    if (documentContainsStyleHash7(targetDocument, hash)) {
9267      injectedStyles.add(hash);
9268      return;
9269    }
9270    const style = targetDocument.createElement("style");
9271    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9272    style.appendChild(targetDocument.createTextNode(css));
9273    targetDocument.head.appendChild(style);
9274    injectedStyles.add(hash);
9275  }
9276  function registerDocument7(targetDocument) {
9277    const runtime = getRuntime7();
9278    runtime.documents.set(
9279      targetDocument,
9280      (runtime.documents.get(targetDocument) ?? 0) + 1
9281    );
9282    for (const [hash, css] of runtime.styles) {
9283      injectStyle7(targetDocument, hash, css);
9284    }
9285    return () => {
9286      const count = runtime.documents.get(targetDocument);
9287      if (count === void 0) {
9288        return;
9289      }
9290      if (count <= 1) {
9291        runtime.documents.delete(targetDocument);
9292        return;
9293      }
9294      runtime.documents.set(targetDocument, count - 1);
9295    };
9296  }
9297  function registerStyle7(hash, css) {
9298    const runtime = getRuntime7();
9299    runtime.styles.set(hash, css);
9300    for (const targetDocument of runtime.documents.keys()) {
9301      injectStyle7(targetDocument, hash, css);
9302    }
9303  }
9304  if (typeof process === "undefined" || true) {
9305    registerStyle7("683dd16f2c", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
9306  }
9307  var style_default6 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
9308  function Page({
9309    headingLevel,
9310    breadcrumbs,
9311    badges,
9312    visual,
9313    title,
9314    subTitle,
9315    children,
9316    className,
9317    actions,
9318    ariaLabel,
9319    hasPadding = false,
9320    showSidebarToggle = true
9321  }) {
9322    const classes = clsx_default(style_default6.page, className);
9323    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
9324    return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
9325      (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9326        Header,
9327        {
9328          headingLevel,
9329          breadcrumbs,
9330          badges,
9331          visual,
9332          title,
9333          subTitle,
9334          actions,
9335          showSidebarToggle
9336        }
9337      ),
9338      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9339        "div",
9340        {
9341          className: clsx_default(
9342            style_default6.content,
9343            style_default6["has-padding"]
9344          ),
9345          children
9346        }
9347      ) : children
9348    ] });
9349  }
9350  Page.SidebarToggleFill = SidebarToggleFill;
9351  var page_default = Page;
9352  
9353  // packages/admin-ui/build-module/admin-theme-colors/index.mjs
9354  var DEFAULT_THEME_COLORS = {
9355    primary: "#3858e9",
9356    background: "#25292b"
9357  };
9358  var ADMIN_THEME_COLORS = /* @__PURE__ */ new Map([
9359    ["fresh", DEFAULT_THEME_COLORS],
9360    ["modern", { primary: "#3858e9", background: "#222524" }],
9361    ["midnight", { primary: "#cf4339", background: "#3d4042" }],
9362    ["coffee", { primary: "#916745", background: "#5b534d" }],
9363    ["ocean", { primary: "#567958", background: "#5f787f" }],
9364    ["blue", { primary: "#437aa8", background: "#3876a8" }],
9365    ["ectoplasm", { primary: "#646c3e", background: "#4f386e" }],
9366    ["sunrise", { primary: "#ad631e", background: "#cc4541" }],
9367    ["light", { primary: "#007cba", background: "#eaeeed" }]
9368  ]);
9369  function getAdminThemeColors() {
9370    const scheme = document.body.className.match(/admin-color-([\w-]+)/)?.[1] ?? "fresh";
9371    return ADMIN_THEME_COLORS.get(scheme) ?? DEFAULT_THEME_COLORS;
9372  }
9373  
9374  // packages/boot/build-module/components/app/router.mjs
9375  var import_data11 = __toESM(require_data(), 1);
9376  var import_core_data6 = __toESM(require_core_data(), 1);
9377  import {
9378    privateApis as routePrivateApis6
9379  } from "@wordpress/route";
9380  
9381  // packages/boot/build-module/components/root/index.mjs
9382  var import_notices = __toESM(require_notices(), 1);
9383  var import_compose4 = __toESM(require_compose(), 1);
9384  var import_components14 = __toESM(require_components(), 1);
9385  import { privateApis as routePrivateApis5 } from "@wordpress/route";
9386  var import_element29 = __toESM(require_element(), 1);
9387  var import_i18n11 = __toESM(require_i18n(), 1);
9388  var import_theme2 = __toESM(require_theme(), 1);
9389  
9390  // packages/boot/build-module/components/sidebar/index.mjs
9391  var import_components10 = __toESM(require_components(), 1);
9392  var import_data9 = __toESM(require_data(), 1);
9393  var import_i18n7 = __toESM(require_i18n(), 1);
9394  
9395  // packages/boot/build-module/components/site-hub/index.mjs
9396  var import_data3 = __toESM(require_data(), 1);
9397  var import_components2 = __toESM(require_components(), 1);
9398  var import_i18n2 = __toESM(require_i18n(), 1);
9399  var import_core_data2 = __toESM(require_core_data(), 1);
9400  var import_html_entities = __toESM(require_html_entities(), 1);
9401  var import_keycodes = __toESM(require_keycodes(), 1);
9402  var import_commands = __toESM(require_commands(), 1);
9403  var import_url = __toESM(require_url(), 1);
9404  
9405  // packages/boot/build-module/components/site-icon-link/index.mjs
9406  import { Link, privateApis as routePrivateApis } from "@wordpress/route";
9407  
9408  // packages/boot/build-module/lock-unlock.mjs
9409  var import_private_apis2 = __toESM(require_private_apis(), 1);
9410  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9411    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9412    "@wordpress/boot"
9413  );
9414  
9415  // packages/boot/build-module/components/site-icon/index.mjs
9416  var import_data = __toESM(require_data(), 1);
9417  var import_i18n = __toESM(require_i18n(), 1);
9418  var import_core_data = __toESM(require_core_data(), 1);
9419  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
9420  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ada0e3b8a']")) {
9421    const style = document.createElement("style");
9422    style.setAttribute("data-wp-hash", "3ada0e3b8a");
9423    style.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}"));
9424    document.head.appendChild(style);
9425  }
9426  function SiteIcon({ className }) {
9427    const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
9428      const { getEntityRecord } = select(import_core_data.store);
9429      const siteData = getEntityRecord(
9430        "root",
9431        "__unstableBase",
9432        void 0
9433      );
9434      return {
9435        isRequestingSite: !siteData,
9436        siteIconUrl: siteData?.site_icon_url
9437      };
9438    }, []);
9439    let icon = null;
9440    if (isRequestingSite && !siteIconUrl) {
9441      icon = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-site-icon__image" });
9442    } else {
9443      icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9444        "img",
9445        {
9446          className: "boot-site-icon__image",
9447          alt: (0, import_i18n.__)("Site Icon"),
9448          src: siteIconUrl
9449        }
9450      ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9451        icon_default,
9452        {
9453          className: "boot-site-icon__icon",
9454          icon: wordpress_default,
9455          size: 48
9456        }
9457      );
9458    }
9459    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
9460  }
9461  var site_icon_default = SiteIcon;
9462  
9463  // packages/boot/build-module/components/site-icon-link/index.mjs
9464  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
9465  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='5aacc86eea']")) {
9466    const style = document.createElement("style");
9467    style.setAttribute("data-wp-hash", "5aacc86eea");
9468    style.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}"));
9469    document.head.appendChild(style);
9470  }
9471  var { useCanGoBack, useRouter } = unlock2(routePrivateApis);
9472  function SiteIconLink({
9473    to,
9474    isBackButton,
9475    ...props
9476  }) {
9477    const router = useRouter();
9478    const canGoBack = useCanGoBack();
9479    return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(tooltip_exports.Root, { children: [
9480      /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9481        tooltip_exports.Trigger,
9482        {
9483          render: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9484            Link,
9485            {
9486              to,
9487              "aria-label": props["aria-label"],
9488              className: "boot-site-icon-link",
9489              onClick: (event) => {
9490                if (canGoBack && isBackButton) {
9491                  event.preventDefault();
9492                  router.history.back();
9493                }
9494              },
9495              children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(site_icon_default, {})
9496            }
9497          )
9498        }
9499      ),
9500      /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(tooltip_exports.Popup, { positioner: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(tooltip_exports.Positioner, { side: "right" }), children: props["aria-label"] })
9501    ] });
9502  }
9503  var site_icon_link_default = SiteIconLink;
9504  
9505  // packages/boot/build-module/store/index.mjs
9506  var import_data2 = __toESM(require_data(), 1);
9507  
9508  // packages/boot/build-module/store/reducer.mjs
9509  var initialState = {
9510    menuItems: {},
9511    routes: [],
9512    dashboardLink: void 0
9513  };
9514  function reducer(state = initialState, action) {
9515    switch (action.type) {
9516      case "REGISTER_MENU_ITEM":
9517        return {
9518          ...state,
9519          menuItems: {
9520            ...state.menuItems,
9521            [action.id]: action.menuItem
9522          }
9523        };
9524      case "UPDATE_MENU_ITEM":
9525        return {
9526          ...state,
9527          menuItems: {
9528            ...state.menuItems,
9529            [action.id]: {
9530              ...state.menuItems[action.id],
9531              ...action.updates
9532            }
9533          }
9534        };
9535      case "REGISTER_ROUTE":
9536        return {
9537          ...state,
9538          routes: [...state.routes, action.route]
9539        };
9540      case "SET_DASHBOARD_LINK":
9541        return {
9542          ...state,
9543          dashboardLink: action.dashboardLink
9544        };
9545    }
9546    return state;
9547  }
9548  
9549  // packages/boot/build-module/store/actions.mjs
9550  var actions_exports = {};
9551  __export(actions_exports, {
9552    registerMenuItem: () => registerMenuItem,
9553    registerRoute: () => registerRoute,
9554    setDashboardLink: () => setDashboardLink,
9555    updateMenuItem: () => updateMenuItem
9556  });
9557  function registerMenuItem(id, menuItem) {
9558    return {
9559      type: "REGISTER_MENU_ITEM",
9560      id,
9561      menuItem
9562    };
9563  }
9564  function updateMenuItem(id, updates) {
9565    return {
9566      type: "UPDATE_MENU_ITEM",
9567      id,
9568      updates
9569    };
9570  }
9571  function registerRoute(route) {
9572    return {
9573      type: "REGISTER_ROUTE",
9574      route
9575    };
9576  }
9577  function setDashboardLink(dashboardLink) {
9578    return {
9579      type: "SET_DASHBOARD_LINK",
9580      dashboardLink
9581    };
9582  }
9583  
9584  // packages/boot/build-module/store/selectors.mjs
9585  var selectors_exports = {};
9586  __export(selectors_exports, {
9587    getDashboardLink: () => getDashboardLink,
9588    getMenuItems: () => getMenuItems,
9589    getRoutes: () => getRoutes
9590  });
9591  function getMenuItems(state) {
9592    return Object.values(state.menuItems);
9593  }
9594  function getRoutes(state) {
9595    return state.routes;
9596  }
9597  function getDashboardLink(state) {
9598    return state.dashboardLink;
9599  }
9600  
9601  // packages/boot/build-module/store/index.mjs
9602  var STORE_NAME = "wordpress/boot";
9603  var store = (0, import_data2.createReduxStore)(STORE_NAME, {
9604    reducer,
9605    actions: actions_exports,
9606    selectors: selectors_exports
9607  });
9608  (0, import_data2.register)(store);
9609  
9610  // packages/boot/build-module/components/site-hub/index.mjs
9611  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
9612  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='bc60675bd6']")) {
9613    const style = document.createElement("style");
9614    style.setAttribute("data-wp-hash", "bc60675bd6");
9615    style.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#707070);font-size:12px}"));
9616    document.head.appendChild(style);
9617  }
9618  function SiteHub() {
9619    const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
9620      const { getEntityRecord } = select(import_core_data2.store);
9621      const _base = getEntityRecord(
9622        "root",
9623        "__unstableBase"
9624      );
9625      return {
9626        dashboardLink: select(store).getDashboardLink(),
9627        homeUrl: _base?.home,
9628        siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
9629      };
9630    }, []);
9631    const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
9632    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "boot-site-hub", children: [
9633      /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9634        site_icon_link_default,
9635        {
9636          to: dashboardLink || "/",
9637          "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
9638        }
9639      ),
9640      /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9641        import_components2.ExternalLink,
9642        {
9643          href: homeUrl ?? "/",
9644          className: "boot-site-hub__title",
9645          children: [
9646            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
9647            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
9648          ]
9649        }
9650      ),
9651      /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components2.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9652        import_components2.Button,
9653        {
9654          variant: "tertiary",
9655          icon: search_default,
9656          onClick: () => openCommandCenter(),
9657          size: "compact",
9658          label: (0, import_i18n2.__)("Open command palette"),
9659          shortcut: import_keycodes.displayShortcut.primary("k")
9660        }
9661      ) })
9662    ] });
9663  }
9664  var site_hub_default = SiteHub;
9665  
9666  // packages/boot/build-module/components/navigation/index.mjs
9667  var import_element22 = __toESM(require_element(), 1);
9668  var import_data6 = __toESM(require_data(), 1);
9669  
9670  // packages/boot/build-module/components/navigation/navigation-item/index.mjs
9671  var import_components5 = __toESM(require_components(), 1);
9672  
9673  // packages/boot/build-module/components/navigation/router-link-item.mjs
9674  var import_element19 = __toESM(require_element(), 1);
9675  var import_components3 = __toESM(require_components(), 1);
9676  import { privateApis as routePrivateApis2 } from "@wordpress/route";
9677  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
9678  var { createLink } = unlock2(routePrivateApis2);
9679  function AnchorOnlyItem(props, forwardedRef) {
9680    return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components3.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
9681  }
9682  var RouterLinkItem = createLink((0, import_element19.forwardRef)(AnchorOnlyItem));
9683  var router_link_item_default = RouterLinkItem;
9684  
9685  // packages/boot/build-module/components/navigation/items.mjs
9686  var import_element20 = __toESM(require_element(), 1);
9687  var import_components4 = __toESM(require_components(), 1);
9688  var import_primitives12 = __toESM(require_primitives(), 1);
9689  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
9690  function isSvg(element) {
9691    return (0, import_element20.isValidElement)(element) && (element.type === import_primitives12.SVG || element.type === "svg");
9692  }
9693  function wrapIcon(icon, shouldShowPlaceholder = true) {
9694    if (isSvg(icon)) {
9695      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components4.Icon, { icon });
9696    }
9697    if (typeof icon === "string" && icon.startsWith("dashicons-")) {
9698      const iconKey = icon.replace(
9699        /^dashicons-/,
9700        ""
9701      );
9702      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9703        import_components4.Dashicon,
9704        {
9705          style: { padding: "2px" },
9706          icon: iconKey,
9707          "aria-hidden": "true"
9708        }
9709      );
9710    }
9711    if (typeof icon === "string" && icon.startsWith("data:")) {
9712      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9713        "img",
9714        {
9715          src: icon,
9716          alt: "",
9717          "aria-hidden": "true",
9718          style: {
9719            width: "20px",
9720            height: "20px",
9721            display: "block",
9722            padding: "2px"
9723          }
9724        }
9725      );
9726    }
9727    if (icon) {
9728      return icon;
9729    }
9730    if (shouldShowPlaceholder) {
9731      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9732        "div",
9733        {
9734          style: { width: "24px", height: "24px" },
9735          "aria-hidden": "true"
9736        }
9737      );
9738    }
9739    return null;
9740  }
9741  
9742  // packages/boot/build-module/components/navigation/navigation-item/index.mjs
9743  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
9744  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='26b8e27d3f']")) {
9745    const style = document.createElement("style");
9746    style.setAttribute("data-wp-hash", "26b8e27d3f");
9747    style.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}'));
9748    document.head.appendChild(style);
9749  }
9750  function NavigationItem({
9751    className,
9752    icon,
9753    shouldShowPlaceholder = true,
9754    children,
9755    to
9756  }) {
9757    const isExternal = !String(
9758      new URL(to, window.location.origin)
9759    ).startsWith(window.location.origin);
9760    const content = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components5.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
9761      wrapIcon(icon, shouldShowPlaceholder),
9762      /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components5.FlexBlock, { children })
9763    ] });
9764    if (isExternal) {
9765      return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
9766        import_components5.__experimentalItem,
9767        {
9768          as: "a",
9769          href: to,
9770          className: clsx_default("boot-navigation-item", className),
9771          children: content
9772        }
9773      );
9774    }
9775    return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
9776      router_link_item_default,
9777      {
9778        to,
9779        className: clsx_default("boot-navigation-item", className),
9780        children: content
9781      }
9782    );
9783  }
9784  
9785  // packages/boot/build-module/components/navigation/drilldown-item/index.mjs
9786  var import_components6 = __toESM(require_components(), 1);
9787  var import_i18n3 = __toESM(require_i18n(), 1);
9788  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
9789  function DrilldownItem({
9790    className,
9791    id,
9792    icon,
9793    shouldShowPlaceholder = true,
9794    children,
9795    onNavigate
9796  }) {
9797    const handleClick = (e) => {
9798      e.preventDefault();
9799      onNavigate({ id, direction: "forward" });
9800    };
9801    return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
9802      import_components6.__experimentalItem,
9803      {
9804        className: clsx_default("boot-navigation-item", className),
9805        onClick: handleClick,
9806        children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
9807          import_components6.__experimentalHStack,
9808          {
9809            justify: "flex-start",
9810            spacing: 2,
9811            style: { flexGrow: "1" },
9812            children: [
9813              wrapIcon(icon, shouldShowPlaceholder),
9814              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components6.FlexBlock, { children }),
9815              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
9816                import_components6.Icon,
9817                {
9818                  icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default
9819                }
9820              )
9821            ]
9822          }
9823        )
9824      }
9825    );
9826  }
9827  
9828  // packages/boot/build-module/components/navigation/dropdown-item/index.mjs
9829  var import_components7 = __toESM(require_components(), 1);
9830  var import_compose = __toESM(require_compose(), 1);
9831  var import_data4 = __toESM(require_data(), 1);
9832  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
9833  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='608eff82f3']")) {
9834    const style = document.createElement("style");
9835    style.setAttribute("data-wp-hash", "608eff82f3");
9836    style.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}"));
9837    document.head.appendChild(style);
9838  }
9839  var ANIMATION_DURATION = 0.2;
9840  function DropdownItem({
9841    className,
9842    id,
9843    icon,
9844    children,
9845    isExpanded,
9846    onToggle
9847  }) {
9848    const menuItems = (0, import_data4.useSelect)(
9849      (select) => (
9850        // @ts-ignore
9851        select(STORE_NAME).getMenuItems()
9852      ),
9853      []
9854    );
9855    const items = menuItems.filter((item) => item.parent === id);
9856    const disableMotion = (0, import_compose.useReducedMotion)();
9857    return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "boot-dropdown-item", children: [
9858      /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
9859        import_components7.__experimentalItem,
9860        {
9861          className: clsx_default("boot-navigation-item", className),
9862          onClick: (e) => {
9863            e.preventDefault();
9864            e.stopPropagation();
9865            onToggle();
9866          },
9867          onMouseDown: (e) => e.preventDefault(),
9868          children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
9869            import_components7.__experimentalHStack,
9870            {
9871              justify: "flex-start",
9872              spacing: 2,
9873              style: { flexGrow: "1" },
9874              children: [
9875                wrapIcon(icon, false),
9876                /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components7.FlexBlock, { children }),
9877                /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
9878                  import_components7.Icon,
9879                  {
9880                    icon: chevron_down_small_default,
9881                    className: clsx_default("boot-dropdown-item__chevron", {
9882                      "is-up": isExpanded
9883                    })
9884                  }
9885                )
9886              ]
9887            }
9888          )
9889        }
9890      ),
9891      /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components7.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
9892        import_components7.__unstableMotion.div,
9893        {
9894          initial: { height: 0 },
9895          animate: { height: "auto" },
9896          exit: { height: 0 },
9897          transition: {
9898            type: "tween",
9899            duration: disableMotion ? 0 : ANIMATION_DURATION,
9900            ease: "easeOut"
9901          },
9902          className: "boot-dropdown-item__children",
9903          children: items.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
9904            NavigationItem,
9905            {
9906              to: item.to,
9907              shouldShowPlaceholder: false,
9908              children: item.label
9909            },
9910            index2
9911          ))
9912        }
9913      ) })
9914    ] });
9915  }
9916  
9917  // packages/boot/build-module/components/navigation/navigation-screen/index.mjs
9918  var import_components8 = __toESM(require_components(), 1);
9919  var import_i18n4 = __toESM(require_i18n(), 1);
9920  var import_compose2 = __toESM(require_compose(), 1);
9921  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
9922  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c5e42e1495']")) {
9923    const style = document.createElement("style");
9924    style.setAttribute("data-wp-hash", "c5e42e1495");
9925    style.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}"));
9926    document.head.appendChild(style);
9927  }
9928  var ANIMATION_DURATION2 = 0.3;
9929  var slideVariants = {
9930    initial: (direction) => ({
9931      x: direction === "forward" ? 100 : -100,
9932      opacity: 0
9933    }),
9934    animate: {
9935      x: 0,
9936      opacity: 1
9937    },
9938    exit: (direction) => ({
9939      x: direction === "forward" ? 100 : -100,
9940      opacity: 0
9941    })
9942  };
9943  function NavigationScreen({
9944    isRoot,
9945    title,
9946    actions,
9947    content,
9948    description,
9949    animationDirection,
9950    backMenuItem,
9951    backButtonRef,
9952    navigationKey,
9953    onNavigate
9954  }) {
9955    const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
9956    const disableMotion = (0, import_compose2.useReducedMotion)();
9957    const handleBackClick = (e) => {
9958      e.preventDefault();
9959      onNavigate({ id: backMenuItem, direction: "backward" });
9960    };
9961    return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
9962      "div",
9963      {
9964        className: "boot-navigation-screen",
9965        style: {
9966          overflow: "hidden",
9967          position: "relative",
9968          display: "grid",
9969          gridTemplateColumns: "1fr",
9970          gridTemplateRows: "1fr"
9971        },
9972        children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
9973          import_components8.__unstableMotion.div,
9974          {
9975            custom: animationDirection,
9976            variants: slideVariants,
9977            initial: "initial",
9978            animate: "animate",
9979            exit: "exit",
9980            transition: {
9981              type: "tween",
9982              duration: disableMotion ? 0 : ANIMATION_DURATION2,
9983              ease: [0.33, 0, 0, 1]
9984            },
9985            style: {
9986              width: "100%",
9987              gridColumn: "1",
9988              gridRow: "1"
9989            },
9990            children: [
9991              /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
9992                import_components8.__experimentalHStack,
9993                {
9994                  spacing: 2,
9995                  className: "boot-navigation-screen__title-icon",
9996                  children: [
9997                    !isRoot && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
9998                      import_components8.Button,
9999                      {
10000                        ref: backButtonRef,
10001                        icon,
10002                        onClick: handleBackClick,
10003                        label: (0, import_i18n4.__)("Back"),
10004                        size: "small",
10005                        variant: "tertiary"
10006                      }
10007                    ),
10008                    /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
10009                      import_components8.__experimentalHeading,
10010                      {
10011                        className: "boot-navigation-screen__title",
10012                        level: 1,
10013                        size: "15px",
10014                        children: title
10015                      }
10016                    ),
10017                    actions && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
10018                  ]
10019                }
10020              ),
10021              description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
10022              content
10023            ]
10024          },
10025          navigationKey
10026        ) })
10027      }
10028    );
10029  }
10030  
10031  // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
10032  var import_element21 = __toESM(require_element(), 1);
10033  var import_data5 = __toESM(require_data(), 1);
10034  import { privateApis as routePrivateApis3 } from "@wordpress/route";
10035  
10036  // packages/boot/build-module/components/navigation/path-matching.mjs
10037  var isValidParentPath = (currentPath, menuPath) => {
10038    if (!menuPath || menuPath === currentPath) {
10039      return false;
10040    }
10041    const normalizePath = (path) => {
10042      const normalized = path.startsWith("/") ? path : "/" + path;
10043      return normalized.endsWith("/") && normalized.length > 1 ? normalized.slice(0, -1) : normalized;
10044    };
10045    const normalizedCurrent = normalizePath(currentPath);
10046    const normalizedMenu = normalizePath(menuPath);
10047    return normalizedCurrent.startsWith(normalizedMenu) && (normalizedCurrent[normalizedMenu.length] === "/" || normalizedMenu === "/");
10048  };
10049  var findClosestMenuItem = (currentPath, menuItems) => {
10050    const exactMatch = menuItems.find((item) => item.to === currentPath);
10051    if (exactMatch) {
10052      return exactMatch;
10053    }
10054    let bestMatch = null;
10055    let bestPathLength = 0;
10056    for (const item of menuItems) {
10057      if (!item.to) {
10058        continue;
10059      }
10060      if (isValidParentPath(currentPath, item.to)) {
10061        if (item.to.length > bestPathLength) {
10062          bestMatch = item;
10063          bestPathLength = item.to.length;
10064        }
10065      }
10066    }
10067    return bestMatch;
10068  };
10069  var findDrilldownParent = (id, menuItems) => {
10070    if (!id) {
10071      return void 0;
10072    }
10073    const currentItem = menuItems.find((item) => item.id === id);
10074    if (!currentItem) {
10075      return void 0;
10076    }
10077    if (currentItem.parent) {
10078      const parentItem = menuItems.find(
10079        (item) => item.id === currentItem.parent
10080      );
10081      if (parentItem?.parent_type === "drilldown") {
10082        return parentItem.id;
10083      }
10084      if (parentItem) {
10085        return findDrilldownParent(parentItem.id, menuItems);
10086      }
10087    }
10088    return void 0;
10089  };
10090  var findDropdownParent = (id, menuItems) => {
10091    if (!id) {
10092      return void 0;
10093    }
10094    const currentItem = menuItems.find((item) => item.id === id);
10095    if (!currentItem) {
10096      return void 0;
10097    }
10098    if (currentItem.parent) {
10099      const parentItem = menuItems.find(
10100        (item) => item.id === currentItem.parent
10101      );
10102      if (parentItem?.parent_type === "dropdown") {
10103        return parentItem.id;
10104      }
10105    }
10106    return void 0;
10107  };
10108  
10109  // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
10110  var { useRouter: useRouter2, useMatches } = unlock2(routePrivateApis3);
10111  function useSidebarParent() {
10112    const matches = useMatches();
10113    const router = useRouter2();
10114    const menuItems = (0, import_data5.useSelect)(
10115      (select) => (
10116        // @ts-ignore
10117        select(STORE_NAME).getMenuItems()
10118      ),
10119      []
10120    );
10121    const currentPath = matches[matches.length - 1].pathname.slice(
10122      router.options.basepath?.length ?? 0
10123    );
10124    const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
10125    const [parentId, setParentId] = (0, import_element21.useState)(
10126      findDrilldownParent(currentMenuItem?.id, menuItems)
10127    );
10128    const [parentDropdownId, setParentDropdownId] = (0, import_element21.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
10129    (0, import_element21.useEffect)(() => {
10130      const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
10131      const updatedParentId = findDrilldownParent(
10132        matchedMenuItem?.id,
10133        menuItems
10134      );
10135      const updatedDropdownParent = findDropdownParent(
10136        matchedMenuItem?.id,
10137        menuItems
10138      );
10139      setParentId(updatedParentId);
10140      setParentDropdownId(updatedDropdownParent);
10141    }, [currentPath, menuItems]);
10142    return [
10143      parentId,
10144      setParentId,
10145      parentDropdownId,
10146      setParentDropdownId
10147    ];
10148  }
10149  
10150  // packages/boot/build-module/components/navigation/index.mjs
10151  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
10152  function Navigation() {
10153    const backButtonRef = (0, import_element22.useRef)(null);
10154    const [animationDirection, setAnimationDirection] = (0, import_element22.useState)(null);
10155    const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
10156    const menuItems = (0, import_data6.useSelect)(
10157      (select) => (
10158        // @ts-ignore
10159        select(STORE_NAME).getMenuItems()
10160      ),
10161      []
10162    );
10163    const parent = (0, import_element22.useMemo)(
10164      () => menuItems.find((item) => item.id === parentId),
10165      [menuItems, parentId]
10166    );
10167    const navigationKey = parent ? `drilldown-$parent.id}` : "root";
10168    const handleNavigate = ({
10169      id,
10170      direction
10171    }) => {
10172      setAnimationDirection(direction);
10173      setParentId(id);
10174    };
10175    const handleDropdownToggle = (dropdownId) => {
10176      setParentDropdownId(
10177        parentDropdownId === dropdownId ? void 0 : dropdownId
10178      );
10179    };
10180    const items = (0, import_element22.useMemo)(
10181      () => menuItems.filter((item) => item.parent === parentId),
10182      [menuItems, parentId]
10183    );
10184    const hasRealIcons = items.some((item) => !!item.icon);
10185    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10186      NavigationScreen,
10187      {
10188        isRoot: !parent,
10189        title: parent ? parent.label : "",
10190        backMenuItem: parent?.parent,
10191        backButtonRef,
10192        animationDirection: animationDirection || void 0,
10193        navigationKey,
10194        onNavigate: handleNavigate,
10195        content: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { role: "list", children: items.map((item) => {
10196          if (item.parent_type === "dropdown") {
10197            return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10198              DropdownItem,
10199              {
10200                id: item.id,
10201                className: "boot-navigation-item",
10202                icon: item.icon,
10203                shouldShowPlaceholder: hasRealIcons,
10204                isExpanded: parentDropdownId === item.id,
10205                onToggle: () => handleDropdownToggle(item.id),
10206                children: item.label
10207              },
10208              item.id
10209            );
10210          }
10211          if (item.parent_type === "drilldown") {
10212            return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10213              DrilldownItem,
10214              {
10215                id: item.id,
10216                icon: item.icon,
10217                shouldShowPlaceholder: hasRealIcons,
10218                onNavigate: handleNavigate,
10219                children: item.label
10220              },
10221              item.id
10222            );
10223          }
10224          return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10225            NavigationItem,
10226            {
10227              to: item.to,
10228              icon: item.icon,
10229              shouldShowPlaceholder: hasRealIcons,
10230              children: item.label
10231            },
10232            item.id
10233          );
10234        }) })
10235      }
10236    );
10237  }
10238  var navigation_default = Navigation;
10239  
10240  // packages/boot/build-module/components/save-button/index.mjs
10241  var import_element24 = __toESM(require_element(), 1);
10242  var import_data8 = __toESM(require_data(), 1);
10243  var import_i18n6 = __toESM(require_i18n(), 1);
10244  var import_core_data4 = __toESM(require_core_data(), 1);
10245  var import_keycodes2 = __toESM(require_keycodes(), 1);
10246  var import_editor2 = __toESM(require_editor(), 1);
10247  var import_components9 = __toESM(require_components(), 1);
10248  
10249  // packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
10250  var import_element23 = __toESM(require_element(), 1);
10251  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
10252  var import_i18n5 = __toESM(require_i18n(), 1);
10253  var import_data7 = __toESM(require_data(), 1);
10254  var import_core_data3 = __toESM(require_core_data(), 1);
10255  var import_editor = __toESM(require_editor(), 1);
10256  var shortcutName = "core/boot/save";
10257  function useSaveShortcut({
10258    openSavePanel
10259  }) {
10260    const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
10261    const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
10262    const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
10263    const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
10264      import_keyboard_shortcuts.store
10265    );
10266    (0, import_element23.useEffect)(() => {
10267      registerShortcut({
10268        name: shortcutName,
10269        category: "global",
10270        description: (0, import_i18n5.__)("Save your changes."),
10271        keyCombination: {
10272          modifier: "primary",
10273          character: "s"
10274        }
10275      });
10276      return () => {
10277        unregisterShortcut(shortcutName);
10278      };
10279    }, [registerShortcut, unregisterShortcut]);
10280    (0, import_keyboard_shortcuts.useShortcut)(shortcutName, (event) => {
10281      event.preventDefault();
10282      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
10283      const hasDirtyEntities = !!dirtyEntityRecords.length;
10284      const isSaving = dirtyEntityRecords.some(
10285        (record) => isSavingEntityRecord(record.kind, record.name, record.key)
10286      );
10287      if (!hasDirtyEntities || isSaving) {
10288        return;
10289      }
10290      if (hasNonPostEntityChanges()) {
10291        openSavePanel();
10292      } else if (!isPostSavingLocked()) {
10293        savePost();
10294      }
10295    });
10296  }
10297  
10298  // packages/boot/build-module/components/save-button/index.mjs
10299  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
10300  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='020f606c18']")) {
10301    const style = document.createElement("style");
10302    style.setAttribute("data-wp-hash", "020f606c18");
10303    style.appendChild(document.createTextNode(".boot-save-button{width:100%}.boot-save-button__shortcut:not(:first-child){margin-left:8px}"));
10304    document.head.appendChild(style);
10305  }
10306  function SaveButton() {
10307    const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element24.useState)(false);
10308    const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
10309      const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
10310      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
10311      return {
10312        isSaving: dirtyEntityRecords.some(
10313          (record) => isSavingEntityRecord(record.kind, record.name, record.key)
10314        ),
10315        dirtyEntityRecordsCount: dirtyEntityRecords.length
10316      };
10317    }, []);
10318    const [showSavedState, setShowSavedState] = (0, import_element24.useState)(false);
10319    (0, import_element24.useEffect)(() => {
10320      if (isSaving) {
10321        setShowSavedState(true);
10322      }
10323    }, [isSaving]);
10324    const hasChanges = dirtyEntityRecordsCount > 0;
10325    (0, import_element24.useEffect)(() => {
10326      if (!isSaving && hasChanges) {
10327        setShowSavedState(false);
10328      }
10329    }, [isSaving, hasChanges]);
10330    function hideSavedState() {
10331      if (showSavedState) {
10332        setShowSavedState(false);
10333      }
10334    }
10335    const shouldShowButton = hasChanges || showSavedState;
10336    useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
10337    if (!shouldShowButton) {
10338      return null;
10339    }
10340    const isInSavedState = showSavedState && !hasChanges;
10341    const disabled2 = isSaving || isInSavedState;
10342    const getLabel = () => {
10343      if (isInSavedState) {
10344        return (0, import_i18n6.__)("Saved");
10345      }
10346      return (0, import_i18n6.sprintf)(
10347        // translators: %d: number of unsaved changes (number).
10348        (0, import_i18n6._n)(
10349          "Review %d change\u2026",
10350          "Review %d changes\u2026",
10351          dirtyEntityRecordsCount
10352        ),
10353        dirtyEntityRecordsCount
10354      );
10355    };
10356    const label = getLabel();
10357    const shortcut = import_keycodes2.displayShortcut.primary("s");
10358    return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
10359      /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(tooltip_exports.Root, { children: [
10360        /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10361          tooltip_exports.Trigger,
10362          {
10363            render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10364              import_components9.Button,
10365              {
10366                variant: "primary",
10367                size: "compact",
10368                onClick: () => setIsSaveViewOpened(true),
10369                onBlur: hideSavedState,
10370                disabled: disabled2,
10371                accessibleWhenDisabled: true,
10372                isBusy: isSaving,
10373                "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
10374                className: "boot-save-button",
10375                icon: isInSavedState ? check_default : void 0,
10376                children: label
10377              }
10378            )
10379          }
10380        ),
10381        /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(tooltip_exports.Popup, { children: [
10382          hasChanges && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: label }),
10383          /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "boot-save-button__shortcut", children: shortcut })
10384        ] })
10385      ] }),
10386      isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10387        import_components9.Modal,
10388        {
10389          title: (0, import_i18n6.__)("Review changes"),
10390          onRequestClose: () => setIsSaveViewOpened(false),
10391          size: "small",
10392          children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10393            import_editor2.EntitiesSavedStates,
10394            {
10395              close: () => setIsSaveViewOpened(false),
10396              variant: "inline"
10397            }
10398          )
10399        }
10400      )
10401    ] });
10402  }
10403  
10404  // packages/boot/build-module/components/sidebar/index.mjs
10405  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
10406  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='1f27eae1b9']")) {
10407    const style = document.createElement("style");
10408    style.setAttribute("data-wp-hash", "1f27eae1b9");
10409    style.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}.boot-sidebar__back-button{margin:8px 12px}"));
10410    document.head.appendChild(style);
10411  }
10412  function DashboardBackButton() {
10413    const dashboardLink = (0, import_data9.useSelect)(
10414      (select) => select(store).getDashboardLink(),
10415      []
10416    );
10417    return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
10418      import_components10.Button,
10419      {
10420        __next40pxDefaultSize: true,
10421        className: "boot-sidebar__back-button",
10422        href: dashboardLink || "/",
10423        icon: (0, import_i18n7.isRTL)() ? chevron_right_default : chevron_left_default,
10424        label: (0, import_i18n7.__)("Go to the Dashboard"),
10425        children: (0, import_i18n7.__)("Dashboard")
10426      }
10427    );
10428  }
10429  function Sidebar() {
10430    const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
10431    return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
10432      hasAdminBarInEditor ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DashboardBackButton, {}) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(site_hub_default, {}),
10433      /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(navigation_default, {}) }),
10434      /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SaveButton, {}) })
10435    ] });
10436  }
10437  
10438  // packages/boot/build-module/components/save-panel/index.mjs
10439  var import_element25 = __toESM(require_element(), 1);
10440  var import_components11 = __toESM(require_components(), 1);
10441  var import_editor3 = __toESM(require_editor(), 1);
10442  var import_i18n8 = __toESM(require_i18n(), 1);
10443  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
10444  function SavePanel() {
10445    const [isOpen, setIsOpen] = (0, import_element25.useState)(false);
10446    useSaveShortcut({
10447      openSavePanel: () => setIsOpen(true)
10448    });
10449    if (!isOpen) {
10450      return false;
10451    }
10452    return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
10453      import_components11.Modal,
10454      {
10455        className: "edit-site-save-panel__modal",
10456        onRequestClose: () => setIsOpen(false),
10457        title: (0, import_i18n8.__)("Review changes"),
10458        size: "small",
10459        children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
10460          import_editor3.EntitiesSavedStates,
10461          {
10462            close: () => setIsOpen(false),
10463            variant: "inline"
10464          }
10465        )
10466      }
10467    );
10468  }
10469  
10470  // packages/boot/build-module/components/canvas-renderer/index.mjs
10471  var import_element27 = __toESM(require_element(), 1);
10472  
10473  // packages/boot/build-module/components/canvas/index.mjs
10474  var import_element26 = __toESM(require_element(), 1);
10475  var import_components13 = __toESM(require_components(), 1);
10476  import { useNavigate } from "@wordpress/route";
10477  
10478  // packages/boot/build-module/components/canvas/back-button.mjs
10479  var import_components12 = __toESM(require_components(), 1);
10480  var import_compose3 = __toESM(require_compose(), 1);
10481  var import_i18n9 = __toESM(require_i18n(), 1);
10482  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
10483  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c51646152c']")) {
10484    const style = document.createElement("style");
10485    style.setAttribute("data-wp-hash", "c51646152c");
10486    style.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:hsla(0,0%,100%,.6)}.interface-interface-skeleton__header{margin-top:0!important}"));
10487    document.head.appendChild(style);
10488  }
10489  var toggleHomeIconVariants = {
10490    edit: {
10491      opacity: 0,
10492      scale: 0.2
10493    },
10494    hover: {
10495      opacity: 1,
10496      scale: 1,
10497      clipPath: "inset( 22% round 2px )"
10498    }
10499  };
10500  function BootBackButton({ length }) {
10501    const disableMotion = (0, import_compose3.useReducedMotion)();
10502    const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
10503    const handleBack = () => {
10504      window.history.back();
10505    };
10506    if (length > 1) {
10507      return null;
10508    }
10509    const transition = {
10510      duration: disableMotion ? 0 : 0.3
10511    };
10512    const arrowIcon = (0, import_i18n9.isRTL)() ? arrow_up_right_default : arrow_up_left_default;
10513    return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
10514      import_components12.__unstableMotion.div,
10515      {
10516        className: "boot-canvas-back-button",
10517        animate: "edit",
10518        initial: "edit",
10519        whileHover: "hover",
10520        whileTap: "tap",
10521        transition,
10522        children: [
10523          /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
10524            import_components12.Button,
10525            {
10526              className: "boot-canvas-back-button__link",
10527              onClick: handleBack,
10528              "aria-label": (0, import_i18n9.__)("Go back"),
10529              __next40pxDefaultSize: true,
10530              children: !hasAdminBarInEditor && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(site_icon_default, {})
10531            }
10532          ),
10533          hasAdminBarInEditor ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "boot-canvas-back-button__icon", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components12.Icon, { icon: arrowIcon }) }) : (
10534            /* Overlay arrow that appears on hover */
10535            /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
10536              import_components12.__unstableMotion.div,
10537              {
10538                className: "boot-canvas-back-button__icon",
10539                variants: toggleHomeIconVariants,
10540                children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components12.Icon, { icon: arrowIcon })
10541              }
10542            )
10543          )
10544        ]
10545      }
10546    );
10547  }
10548  
10549  // packages/boot/build-module/components/canvas/index.mjs
10550  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
10551  function Canvas({ canvas }) {
10552    const [Editor, setEditor] = (0, import_element26.useState)(null);
10553    const navigate = useNavigate();
10554    (0, import_element26.useEffect)(() => {
10555      import("@wordpress/lazy-editor").then((module) => {
10556        setEditor(() => module.Editor);
10557      }).catch((error) => {
10558        console.error("Failed to load lazy editor:", error);
10559      });
10560    }, []);
10561    if (!Editor) {
10562      return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10563        "div",
10564        {
10565          style: {
10566            display: "flex",
10567            justifyContent: "center",
10568            alignItems: "center",
10569            height: "100%",
10570            padding: "2rem"
10571          },
10572          children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components13.Spinner, {})
10573        }
10574      );
10575    }
10576    const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BootBackButton, { length }) : void 0;
10577    return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
10578      /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10579        "div",
10580        {
10581          style: { height: "100%" },
10582          inert: canvas.isPreview ? "true" : void 0,
10583          children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10584            Editor,
10585            {
10586              postType: canvas.postType,
10587              postId: canvas.postId,
10588              settings: {
10589                isPreviewMode: canvas.isPreview,
10590                styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : []
10591              },
10592              backButton
10593            }
10594          )
10595        }
10596      ),
10597      canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10598        "div",
10599        {
10600          onClick: () => navigate({ to: canvas.editLink }),
10601          onKeyDown: (e) => {
10602            if (e.key === "Enter" || e.key === " ") {
10603              e.preventDefault();
10604              navigate({ to: canvas.editLink });
10605            }
10606          },
10607          style: {
10608            position: "absolute",
10609            inset: 0,
10610            cursor: "pointer",
10611            zIndex: 1
10612          },
10613          role: "button",
10614          tabIndex: 0,
10615          "aria-label": "Click to edit"
10616        }
10617      )
10618    ] });
10619  }
10620  
10621  // packages/boot/build-module/components/canvas-renderer/index.mjs
10622  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
10623  function CanvasRenderer({
10624    canvas,
10625    routeContentModule
10626  }) {
10627    const [CustomCanvas, setCustomCanvas] = (0, import_element27.useState)(null);
10628    (0, import_element27.useEffect)(() => {
10629      if (canvas === null && routeContentModule) {
10630        import(routeContentModule).then((module) => {
10631          setCustomCanvas(() => module.canvas);
10632        }).catch((error) => {
10633          console.error("Failed to load custom canvas:", error);
10634        });
10635      } else {
10636        setCustomCanvas(null);
10637      }
10638    }, [canvas, routeContentModule]);
10639    if (canvas === void 0) {
10640      return null;
10641    }
10642    if (canvas === null) {
10643      if (!CustomCanvas) {
10644        return null;
10645      }
10646      return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CustomCanvas, {});
10647    }
10648    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Canvas, { canvas });
10649  }
10650  
10651  // packages/boot/build-module/components/app/use-route-title.mjs
10652  var import_element28 = __toESM(require_element(), 1);
10653  var import_data10 = __toESM(require_data(), 1);
10654  var import_core_data5 = __toESM(require_core_data(), 1);
10655  var import_i18n10 = __toESM(require_i18n(), 1);
10656  var import_html_entities2 = __toESM(require_html_entities(), 1);
10657  import { speak } from "@wordpress/a11y";
10658  import { privateApis as routePrivateApis4 } from "@wordpress/route";
10659  var { useLocation, useMatches: useMatches2 } = unlock2(routePrivateApis4);
10660  function useRouteTitle() {
10661    const location = useLocation();
10662    const matches = useMatches2();
10663    const currentMatch = matches[matches.length - 1];
10664    const routeTitle = currentMatch?.loaderData?.title;
10665    const siteTitle = (0, import_data10.useSelect)(
10666      (select) => select(import_core_data5.store).getEntityRecord(
10667        "root",
10668        "__unstableBase"
10669      )?.name,
10670      []
10671    );
10672    const isInitialLocationRef = (0, import_element28.useRef)(true);
10673    (0, import_element28.useEffect)(() => {
10674      isInitialLocationRef.current = false;
10675    }, [location]);
10676    (0, import_element28.useEffect)(() => {
10677      if (isInitialLocationRef.current) {
10678        return;
10679      }
10680      if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
10681        const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
10682        const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
10683        const formattedTitle = (0, import_i18n10.sprintf)(
10684          /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
10685          (0, import_i18n10.__)("%1$s \u2039 %2$s \u2014 WordPress"),
10686          decodedRouteTitle,
10687          decodedSiteTitle
10688        );
10689        document.title = formattedTitle;
10690        if (decodedRouteTitle) {
10691          speak(decodedRouteTitle, "assertive");
10692        }
10693      }
10694    }, [routeTitle, siteTitle, location]);
10695  }
10696  
10697  // packages/boot/build-module/components/root/index.mjs
10698  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
10699  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='80382f1901']")) {
10700    const style = document.createElement("style");
10701    style.setAttribute("data-wp-hash", "80382f1901");
10702    style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
10703    document.head.appendChild(style);
10704  }
10705  var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock2(routePrivateApis5);
10706  var { ThemeProvider: ThemeProvider2 } = unlock2(import_theme2.privateApis);
10707  function Root2() {
10708    const matches = useMatches3();
10709    const location = useLocation2();
10710    const currentMatch = matches[matches.length - 1];
10711    const canvas = currentMatch?.loaderData?.canvas;
10712    const routeContentModule = currentMatch?.loaderData?.routeContentModule;
10713    const isFullScreen = canvas && !canvas.isPreview;
10714    useRouteTitle();
10715    const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
10716    const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element29.useState)(false);
10717    const disableMotion = (0, import_compose4.useReducedMotion)();
10718    (0, import_element29.useEffect)(() => {
10719      setIsMobileSidebarOpen(false);
10720    }, [location.pathname, isMobileViewport]);
10721    const themeColors = (0, import_element29.useMemo)(getAdminThemeColors, []);
10722    return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(tooltip_exports.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10723      ThemeProvider2,
10724      {
10725        isRoot: true,
10726        color: { ...themeColors, background: "#f8f8f8" },
10727        children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ThemeProvider2, { color: themeColors, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
10728          "div",
10729          {
10730            className: clsx_default("boot-layout", {
10731              "has-canvas": !!canvas || canvas === null,
10732              "has-full-canvas": isFullScreen
10733            }),
10734            children: [
10735              /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SavePanel, {}),
10736              /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
10737              isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10738                import_components14.Button,
10739                {
10740                  icon: menu_default,
10741                  onClick: () => setIsMobileSidebarOpen(true),
10742                  label: (0, import_i18n11.__)("Open navigation panel"),
10743                  size: "compact"
10744                }
10745              ) }),
10746              /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10747                import_components14.__unstableMotion.div,
10748                {
10749                  initial: { opacity: 0 },
10750                  animate: { opacity: 1 },
10751                  exit: { opacity: 0 },
10752                  transition: {
10753                    type: "tween",
10754                    duration: disableMotion ? 0 : 0.2,
10755                    ease: "easeOut"
10756                  },
10757                  className: "boot-layout__sidebar-backdrop",
10758                  onClick: () => setIsMobileSidebarOpen(false),
10759                  onKeyDown: (event) => {
10760                    if (event.key === "Escape") {
10761                      setIsMobileSidebarOpen(
10762                        false
10763                      );
10764                    }
10765                  },
10766                  role: "button",
10767                  tabIndex: -1,
10768                  "aria-label": (0, import_i18n11.__)(
10769                    "Close navigation panel"
10770                  )
10771                }
10772              ) }),
10773              /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10774                import_components14.__unstableMotion.div,
10775                {
10776                  initial: { x: "-100%" },
10777                  animate: { x: 0 },
10778                  exit: { x: "-100%" },
10779                  transition: {
10780                    type: "tween",
10781                    duration: disableMotion ? 0 : 0.2,
10782                    ease: "easeOut"
10783                  },
10784                  className: "boot-layout__sidebar is-mobile",
10785                  children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Sidebar, {})
10786                }
10787              ) }),
10788              !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Sidebar, {}) }),
10789              /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
10790                ThemeProvider2,
10791                {
10792                  color: {
10793                    ...themeColors,
10794                    background: "#ffffff"
10795                  },
10796                  children: [
10797                    /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Outlet, {}),
10798                    (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
10799                      "div",
10800                      {
10801                        className: clsx_default(
10802                          "boot-layout__canvas",
10803                          {
10804                            "has-mobile-drawer": canvas?.isPreview && isMobileViewport
10805                          }
10806                        ),
10807                        children: [
10808                          canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10809                            import_components14.Button,
10810                            {
10811                              icon: menu_default,
10812                              onClick: () => setIsMobileSidebarOpen(
10813                                true
10814                              ),
10815                              label: (0, import_i18n11.__)(
10816                                "Open navigation panel"
10817                              ),
10818                              size: "compact"
10819                            }
10820                          ) }),
10821                          /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10822                            CanvasRenderer,
10823                            {
10824                              canvas,
10825                              routeContentModule
10826                            }
10827                          )
10828                        ]
10829                      }
10830                    )
10831                  ]
10832                }
10833              ) })
10834            ]
10835          }
10836        ) })
10837      }
10838    ) }) });
10839  }
10840  
10841  // packages/boot/build-module/components/app/router.mjs
10842  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
10843  var {
10844    createLazyRoute,
10845    createRouter,
10846    createRootRoute,
10847    createRoute,
10848    RouterProvider,
10849    createBrowserHistory,
10850    parseHref,
10851    useLoaderData
10852  } = unlock2(routePrivateApis6);
10853  function NotFoundComponent() {
10854    return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(page_default, { title: (0, import_i18n12.__)("Route not found"), hasPadding: true, children: (0, import_i18n12.__)("The page you're looking for does not exist") }) });
10855  }
10856  function createRouteFromDefinition(route, parentRoute) {
10857    let tanstackRoute = createRoute({
10858      getParentRoute: () => parentRoute,
10859      path: route.path,
10860      beforeLoad: async (opts) => {
10861        if (route.route_module) {
10862          const module = await import(route.route_module);
10863          const routeConfig = module.route || {};
10864          if (routeConfig.beforeLoad) {
10865            return routeConfig.beforeLoad({
10866              params: opts.params || {},
10867              search: opts.search || {}
10868            });
10869          }
10870        }
10871      },
10872      loader: async (opts) => {
10873        let routeConfig = {};
10874        if (route.route_module) {
10875          const module = await import(route.route_module);
10876          routeConfig = module.route || {};
10877        }
10878        const context = {
10879          params: opts.params || {},
10880          search: opts.deps || {}
10881        };
10882        const [, loaderData, canvasData, titleData] = await Promise.all([
10883          (0, import_data11.resolveSelect)(import_core_data6.store).getEntityRecord(
10884            "root",
10885            "__unstableBase"
10886          ),
10887          routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
10888          routeConfig.canvas ? routeConfig.canvas(context) : Promise.resolve(void 0),
10889          routeConfig.title ? routeConfig.title(context) : Promise.resolve(void 0)
10890        ]);
10891        let inspector = true;
10892        if (routeConfig.inspector) {
10893          inspector = await routeConfig.inspector(context);
10894        }
10895        return {
10896          ...loaderData,
10897          canvas: canvasData,
10898          inspector,
10899          title: titleData,
10900          routeContentModule: route.content_module
10901        };
10902      },
10903      loaderDeps: (opts) => opts.search
10904    });
10905    tanstackRoute = tanstackRoute.lazy(async () => {
10906      const module = route.content_module ? await import(route.content_module) : {};
10907      const Stage = module.stage;
10908      const Inspector = module.inspector;
10909      return createLazyRoute(route.path)({
10910        component: function RouteComponent() {
10911          const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
10912          return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
10913            Stage && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Stage, {}) }),
10914            Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Inspector, {}) })
10915          ] });
10916        }
10917      });
10918    });
10919    return tanstackRoute;
10920  }
10921  function createRouteTree(routes, rootComponent = Root2) {
10922    const rootRoute = createRootRoute({
10923      component: rootComponent,
10924      context: () => ({})
10925    });
10926    const dynamicRoutes = routes.map(
10927      (route) => createRouteFromDefinition(route, rootRoute)
10928    );
10929    return rootRoute.addChildren(dynamicRoutes);
10930  }
10931  function createPathHistory() {
10932    return createBrowserHistory({
10933      parseLocation: () => {
10934        const url = new URL(window.location.href);
10935        const path = url.searchParams.get("p") || "/";
10936        const pathHref = `$path}$url.hash}`;
10937        return parseHref(pathHref, window.history.state);
10938      },
10939      createHref: (href) => {
10940        const searchParams = new URLSearchParams(window.location.search);
10941        searchParams.set("p", href);
10942        return `$window.location.pathname}?$searchParams}`;
10943      }
10944    });
10945  }
10946  function Router({
10947    routes,
10948    rootComponent = Root2
10949  }) {
10950    const router = (0, import_element30.useMemo)(() => {
10951      const history = createPathHistory();
10952      const routeTree = createRouteTree(routes, rootComponent);
10953      return createRouter({
10954        history,
10955        routeTree,
10956        defaultPreload: "intent",
10957        defaultNotFoundComponent: NotFoundComponent,
10958        defaultViewTransition: {
10959          types: ({
10960            fromLocation
10961          }) => {
10962            if (!fromLocation) {
10963              return false;
10964            }
10965            return ["navigate"];
10966          }
10967        }
10968      });
10969    }, [routes, rootComponent]);
10970    return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RouterProvider, { router });
10971  }
10972  
10973  // packages/boot/build-module/components/root/single-page.mjs
10974  var import_notices2 = __toESM(require_notices(), 1);
10975  var import_components15 = __toESM(require_components(), 1);
10976  var import_element31 = __toESM(require_element(), 1);
10977  import { privateApis as routePrivateApis7 } from "@wordpress/route";
10978  var import_theme3 = __toESM(require_theme(), 1);
10979  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
10980  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='80382f1901']")) {
10981    const style = document.createElement("style");
10982    style.setAttribute("data-wp-hash", "80382f1901");
10983    style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
10984    document.head.appendChild(style);
10985  }
10986  var { useMatches: useMatches4, Outlet: Outlet2 } = unlock2(routePrivateApis7);
10987  var { ThemeProvider: ThemeProvider3 } = unlock2(import_theme3.privateApis);
10988  function RootSinglePage() {
10989    const matches = useMatches4();
10990    const currentMatch = matches[matches.length - 1];
10991    const canvas = currentMatch?.loaderData?.canvas;
10992    const routeContentModule = currentMatch?.loaderData?.routeContentModule;
10993    const isFullScreen = canvas && !canvas.isPreview;
10994    useRouteTitle();
10995    const themeColors = (0, import_element31.useMemo)(getAdminThemeColors, []);
10996    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components15.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10997      ThemeProvider3,
10998      {
10999        isRoot: true,
11000        color: { ...themeColors, background: "#f8f8f8" },
11001        children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ThemeProvider3, { color: themeColors, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11002          "div",
11003          {
11004            className: clsx_default(
11005              "boot-layout boot-layout--single-page",
11006              {
11007                "has-canvas": !!canvas || canvas === null,
11008                "has-full-canvas": isFullScreen
11009              }
11010            ),
11011            children: [
11012              /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SavePanel, {}),
11013              /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
11014              /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11015                ThemeProvider3,
11016                {
11017                  color: {
11018                    ...themeColors,
11019                    background: "#ffffff"
11020                  },
11021                  children: [
11022                    /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Outlet2, {}),
11023                    (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11024                      CanvasRenderer,
11025                      {
11026                        canvas,
11027                        routeContentModule
11028                      }
11029                    ) })
11030                  ]
11031                }
11032              ) })
11033            ]
11034          }
11035        ) })
11036      }
11037    ) });
11038  }
11039  
11040  // packages/boot/build-module/components/app/index.mjs
11041  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
11042  function App({ rootComponent }) {
11043    const routes = (0, import_data12.useSelect)((select) => select(store).getRoutes(), []);
11044    return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Router, { routes, rootComponent });
11045  }
11046  async function init({
11047    mountId,
11048    menuItems,
11049    routes,
11050    initModules,
11051    dashboardLink
11052  }) {
11053    (menuItems ?? []).forEach((menuItem) => {
11054      (0, import_data12.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
11055    });
11056    (routes ?? []).forEach((route) => {
11057      (0, import_data12.dispatch)(store).registerRoute(route);
11058    });
11059    if (dashboardLink) {
11060      (0, import_data12.dispatch)(store).setDashboardLink(dashboardLink);
11061    }
11062    for (const moduleId of initModules ?? []) {
11063      const module = await import(moduleId);
11064      await module.init();
11065    }
11066    const rootElement = document.getElementById(mountId);
11067    if (rootElement) {
11068      const root = (0, import_element32.createRoot)(rootElement);
11069      root.render(
11070        /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_element32.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(App, {}) })
11071      );
11072    }
11073  }
11074  async function initSinglePage({
11075    mountId,
11076    routes
11077  }) {
11078    (routes ?? []).forEach((route) => {
11079      (0, import_data12.dispatch)(store).registerRoute(route);
11080    });
11081    const rootElement = document.getElementById(mountId);
11082    if (rootElement) {
11083      const root = (0, import_element32.createRoot)(rootElement);
11084      root.render(
11085        /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_element32.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(App, { rootComponent: RootSinglePage }) })
11086      );
11087    }
11088  }
11089  
11090  // packages/boot/build-module/index.mjs
11091  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='e05a929a61']")) {
11092    const style = document.createElement("style");
11093    style.setAttribute("data-wp-hash", "e05a929a61");
11094    style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-bg-surface-neutral:#fcfcfc;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f4f4f4;--wpds-color-bg-surface-brand:#ecf0fa;--wpds-color-bg-surface-success:#c6f7cd;--wpds-color-bg-surface-success-weak:#ebffed;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f3f9ff;--wpds-color-bg-surface-warning:#fde6be;--wpds-color-bg-surface-warning-weak:#fff7e1;--wpds-color-bg-surface-caution:#fee995;--wpds-color-bg-surface-caution-weak:#fff9ca;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f5;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#ededed;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f5;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-track-neutral-weak:#f0f0f0;--wpds-color-bg-track-neutral:#dbdbdb;--wpds-color-bg-thumb-neutral-weak:#8d8d8d;--wpds-color-bg-thumb-neutral-weak-active:#6e6e6e;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#dbdbdb;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#707070;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#008030;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-weak:#707070;--wpds-color-fg-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#f0f0f0;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#b0bbd6;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#94d29e;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#a9c6e7;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#e1bc7c;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-error:#dab1aa;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus-brand:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-size-5xs:4px;--wpds-dimension-size-4xs:8px;--wpds-dimension-size-3xs:12px;--wpds-dimension-size-2xs:16px;--wpds-dimension-size-xs:20px;--wpds-dimension-size-sm:24px;--wpds-dimension-size-md:32px;--wpds-dimension-size-lg:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}body.has-admin-bar-in-editor #wpadminbar{display:block}body.has-admin-bar-in-editor .boot-canvas-back-button__link{background:transparent}body.has-admin-bar-in-editor .boot-canvas-back-button__icon{background-color:transparent}body.has-admin-bar-in-editor #site-editor-v2-app{bottom:0;height:calc(100vh - 32px)!important;left:0;position:fixed;right:0;top:32px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas{height:calc(100vh - 32px);top:32px}@media (max-width:782px){body.has-admin-bar-in-editor #site-editor-v2-app{height:calc(100vh - 46px)!important;top:46px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas,body.has-admin-bar-in-editor .boot-layout__canvas:not(.has-mobile-drawer),body.has-admin-bar-in-editor .boot-layout__inspector,body.has-admin-bar-in-editor .boot-layout__stage{height:calc(100vh - 46px);top:46px}body.has-admin-bar-in-editor .boot-layout__mobile-sidebar-drawer{top:46px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
11095    document.head.appendChild(style);
11096  }
11097  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cc217bc358']")) {
11098    const style = document.createElement("style");
11099    style.setAttribute("data-wp-hash", "cc217bc358");
11100    style.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}"));
11101    document.head.appendChild(style);
11102  }
11103  export {
11104    init,
11105    initSinglePage,
11106    store
11107  };
11108  /*! Bundled license information:
11109  
11110  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
11111    (**
11112     * @license React
11113     * use-sync-external-store-shim.development.js
11114     *
11115     * Copyright (c) Meta Platforms, Inc. and affiliates.
11116     *
11117     * This source code is licensed under the MIT license found in the
11118     * LICENSE file in the root directory of this source tree.
11119     *)
11120  
11121  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
11122    (**
11123     * @license React
11124     * use-sync-external-store-shim/with-selector.development.js
11125     *
11126     * Copyright (c) Meta Platforms, Inc. and affiliates.
11127     *
11128     * This source code is licensed under the MIT license found in the
11129     * LICENSE file in the root directory of this source tree.
11130     *)
11131  */


Generated : Sun Jul 5 08:20:13 2026 Cross-referenced by PHPXref